Details
- Reviewers
hfinkel
Diff Detail
Event Timeline
Thanks for doing this; I want to try using it for PPC too...
lib/CodeGen/BranchRelaxation.cpp | ||
---|---|---|
53 | Can you use OffsetToAlignment (from MathExtras.h) here? | |
171 | I'm not sure this is correct, the PowerPC branch relaxation pass has this: unsigned Align = MBB.getAlignment(); if (!Align) return 0; unsigned AlignAmt = 1 << Align; unsigned ParentAlign = MBB.getParent()->getAlignment(); if (Align <= ParentAlign) return OffsetToAlignment(Offset, AlignAmt); // The alignment of this MBB is larger than the function's alignment, so we // can't tell whether or not it will insert nops. Assume that it will. return AlignAmt + OffsetToAlignment(Offset, AlignAmt); It is this last part of the check, where if the alignment is greater than the parent-function's alignment, we conservatively assume we get the full adjustment, that I don't see reflected here. |
lib/CodeGen/BranchRelaxation.cpp | ||
---|---|---|
171 | With that, this LGTM. |
Committed in rL283459. Please specify "Differential revision: <URL>" as last line of commit message.
Can you use OffsetToAlignment (from MathExtras.h) here?