[PATCH] D28583: CodeGen: Allow small copyable blocks to "break" the CFG.
Kyle Butt via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 31 11:36:39 PST 2017
iteratee marked 4 inline comments as done.
iteratee added inline comments.
================
Comment at: lib/CodeGen/MachineBlockPlacement.cpp:156
+ "Percent as integer."),
+ cl::init(2),
+ cl::Hidden);
----------------
davidxl wrote:
> Is this default value too low? Increase it 5 or 10 perhaps?
No, I think we should leave it. Now that it's a flag it's easy to change, and especially comparing with the entry frequency 2% is a big enough margin.
================
Comment at: lib/CodeGen/MachineBlockPlacement.cpp:625
+ BlockFrequency Gain = A - B;
+ if (Gain.getFrequency() < (uint64_t) 1 << 32) {
+ if (EntryFreq < (uint64_t) 1 << 40) {
----------------
davidxl wrote:
> I suppose this logic here is for rounding errors or overflow? Can you explain why the simple scaling with branch prob (in BranchProbablity.cpp) does not work?
>
> return Gain > EntryFreq*ThresholdProb;
>
>
I did the math, and found a way to do it simply.
https://reviews.llvm.org/D28583
More information about the llvm-commits
mailing list