Skip to content

evaluate benefits of TFA tracking constant values and lengths of arrays #37710

Open
@mraleph

Description

@mraleph

There are some indications that tracking this information might allow to tree-shake more code from AOT compiled applications.

One of the motivating examples would be to fold away defaultTargetPlatform getter (which returns a constant value based on the target compilation platform) and propagate it's value into the uses - which should enable more constant folding and subsequently tree-shaking of code that is only used on some specific platforms.

There are some challenges associated with it - currently TFA is control-flow insensitive. To successfully propagate defaultTargetPlatform we would need certain control flow sensitivity. These changes might result in a significant increase in compile times for AOT code - but potential gains are worth the try.

Metadata

Metadata

Assignees

Labels

P3A lower priority bug or feature requestarea-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.triagedIssue has been triaged by sub teamtype-performanceIssue relates to performance or code sizevm-tfa

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions