[llvm] 53cda4c - [Transforms] Use LLVMContext::MD_loop (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 28 20:18:10 PDT 2024
Author: Kazu Hirata
Date: 2024-04-28T20:18:03-07:00
New Revision: 53cda4ca3b97b3787e5bf8738119dab2d5bd1889
URL: https://github.com/llvm/llvm-project/commit/53cda4ca3b97b3787e5bf8738119dab2d5bd1889
DIFF: https://github.com/llvm/llvm-project/commit/53cda4ca3b97b3787e5bf8738119dab2d5bd1889.diff
LOG: [Transforms] Use LLVMContext::MD_loop (NFC)
Added:
Modified:
llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp b/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
index 4941f92b94f082..51fc28ef90ef6b 100644
--- a/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
+++ b/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
@@ -1405,13 +1405,13 @@ SplitBlockPredecessorsImpl(BasicBlock *BB, ArrayRef<BasicBlock *> Preds,
if (OldLatch) {
BasicBlock *NewLatch = L->getLoopLatch();
if (NewLatch != OldLatch) {
- MDNode *MD = OldLatch->getTerminator()->getMetadata("llvm.loop");
- NewLatch->getTerminator()->setMetadata("llvm.loop", MD);
+ MDNode *MD = OldLatch->getTerminator()->getMetadata(LLVMContext::MD_loop);
+ NewLatch->getTerminator()->setMetadata(LLVMContext::MD_loop, MD);
// It's still possible that OldLatch is the latch of another inner loop,
// in which case we do not remove the metadata.
Loop *IL = LI->getLoopFor(OldLatch);
if (IL && IL->getLoopLatch() != OldLatch)
- OldLatch->getTerminator()->setMetadata("llvm.loop", nullptr);
+ OldLatch->getTerminator()->setMetadata(LLVMContext::MD_loop, nullptr);
}
}
More information about the llvm-commits
mailing list