-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Open
Labels
enhancementImproving things as opposed to bug fixing, e.g. new or missing featureImproving things as opposed to bug fixing, e.g. new or missing feature
Description
This stems from the discussion in #159522. That PR aims to use PGOForceFunctionAttrsPass (added in #69030) to prevent SimpleLoopUnswitch from increasing the code size of cold functions.
Is it worthwhile to have a loop-level equivalent, something like PGOForceLoopAttrsPass that annotates cold loops with a llvm.loop.optsize
attribute or equivalent?
We have the llvm.loop.unroll.disable attribute for LoopUnroll, but this would be more general. Just from a quick grep in llvm/lib/Transforms/Scalar it looks like LoopUnroll, SimpleLoopUnswitch, LoopBoundSplit, LoopLoadElimination and LoopIdiomRecognize could take advantage of this to get more granular behaviour.
Metadata
Metadata
Assignees
Labels
enhancementImproving things as opposed to bug fixing, e.g. new or missing featureImproving things as opposed to bug fixing, e.g. new or missing feature