[PATCH] D20017: Aggressive choosing best loop top
David Li via llvm-commits
llvm-commits at lists.llvm.org
Wed May 11 21:23:23 PDT 2016
davidxl added a comment.
The missing weight fixes can be extracted out separately.
I don't think the change in MBP is the right thing to make -- we don't any more 'pattern' matching code like this in MBP, which can be very fragile. Please try the cost based loop rotation which is a general solution. For different targets, there are also tuning parameters JumpInstCost and MisfetchCost that can be tuned in a target dependent way.
================
Comment at: lib/CodeGen/AtomicExpandPass.cpp:900
@@ -898,2 +899,3 @@
BasicBlock *LoopBB = BasicBlock::Create(Ctx, "atomicrmw.start", F, ExitBB);
+ MDNode *BrWeight = MDBuilder(AI->getContext()).createBranchWeights(1, 1);
----------------
chandlerc wrote:
> Sink this to where it is used?
please split out change in this file into a different patch.
================
Comment at: lib/Target/SystemZ/SystemZISelLowering.cpp:5271
@@ -5270,1 +5270,3 @@
+ const BranchProbability VeryHighProb(999, 1000); // 99.9%
+ const BranchProbability VeryLowProb(1, 1000); // 0.1%
----------------
This should also be split out into a different patch.
http://reviews.llvm.org/D20017
More information about the llvm-commits
mailing list