[llvm-commits] [llvm] r170704 - in /llvm/trunk: docs/ include/llvm/ include/llvm/Analysis/ lib/Analysis/ lib/AsmParser/ lib/Transforms/Scalar/ lib/VMCore/ test/Transforms/Inline/ test/Transforms/JumpThreading/ test/Transforms/LoopRotate/ test/Transforms/LoopUnroll/ test/Transforms/LoopUnswitch/

Duncan Sands baldrick at free.fr
Thu Dec 20 21:16:29 PST 2012


Hi James,

> Add a new attribute, 'noduplicate'. If a function contains a noduplicate call, the call cannot be duplicated - Jump threading, loop unrolling, loop unswitching, and loop rotation are inhibited if they would duplicate the call.
>
> Similarly inlining of the function is inhibited, if that would duplicate the call (in particular inlining is still allowed when there is only one callsite and the function has internal linkage).

maybe you should add some tests that run the entire optimization pipeline
(-std-compile-opts, -O3, -std-compile-opts + -std-link-opts etc) to check
that some additional places didn't sneak in.

Ciao, Duncan.



More information about the llvm-commits mailing list