[llvm] [MachineBlockPlacement][X86] Use max of MDAlign and TLIAlign to align Loops. (PR #71026)
Freddy Ye via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 20 18:52:25 PST 2023
================
@@ -2919,8 +2919,30 @@ void MachineBlockPlacement::alignBlocks() {
if (!L)
continue;
- const Align Align = TLI->getPrefLoopAlignment(L);
- if (Align == 1)
+ const Align TLIAlign = TLI->getPrefLoopAlignment(L);
+ unsigned MDAlign = 1;
+ MDNode *LoopID = L->getLoopID();
+ if (LoopID) {
+ for (unsigned i = 1, e = LoopID->getNumOperands(); i < e; ++i) {
----------------
FreddyLeaf wrote:
eb597889e79b6d8cf113d5d81f2c38b9b5a203da
https://github.com/llvm/llvm-project/pull/71026
More information about the llvm-commits
mailing list