af82cadcec
Specifically apply prefer-inline to: * All generated accessors. In general we almost always seem to select them for inlining through small-accessor heuristic, but sometimes it does not hit. Marking with pragma ensures that we are not dependent on specific heuristics to produce good code. * Various helpers involved in creating struct instances from typed data. These we *not* hit by normal heuristics and consequently not inlined prior to this change. Inlining them opens possibilities to fully eliminate allocations associated with `Struct.create(...)` if Struct does not escape. * Array creation helpers and accessors. They were also not inlined which meant we were producing unnecessary temporary objects when reading from inline arrays. TEST=/vm/dart/ffi_structs_optimizations_il_test CoreLibraryReviewExempt: no API or behavioral changes Cq-Include-Trybots: luci.dart.try:vm-aot-linux-product-x64-try,vm-aot-linux-release-x64-try Change-Id: I1650023200446bd5289118777365627ca19d3e5b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/384261 Commit-Queue: Slava Egorov <vegorov@google.com> Reviewed-by: Daco Harkes <dacoharkes@google.com>