[PATCH] D32324: CodeGen: BlockPlacement: Increase tail duplication size for O3.

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 12 09:32:37 PDT 2017


davidxl added inline comments.


================
Comment at: lib/CodeGen/MachineBlockPlacement.cpp:2662
+  // conservative.
+  if (PassConfig->getOptLevel() >= CodeGenOpt::Aggressive) {
+    // At O3 we should be more willing to copy blocks for tail duplication. This
----------------
iteratee wrote:
> davidxl wrote:
> > I think when the aggressive threshold is also explicitly specified, then it should take precedence even at O2. Basically this is the order:
> > 
> > Explicit Aggressive Threshold
> > Explicit regular Threshold
> > 
> > Implicit Aggressive at O3 and implicit regular at O2.
> At O3 I think it should be:
> 
> Explicit Aggressive Threshold
> Explicit Regular Threshold
> Implicit Aggressive Threshold
> 
> At O2 I think it should be:
> 
> Explicit Regular Threshold
> Explicit Aggressive Threshold
> Implicit Regular Threshold
> 
> For instance someone may want to adjust both flags globally and compile individual modules at O2 or O3.
> 
Do you have an updated patch with the proposed logic?


https://reviews.llvm.org/D32324





More information about the llvm-commits mailing list