[PATCH] D96181: Have stripDebugInfo() also strip !llvm.loop annotations.
Vedant Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 5 14:59:58 PST 2021
vsk added inline comments.
================
Comment at: llvm/lib/IR/DebugInfo.cpp:344
+ if (auto *MD = I.getMetadata(LLVMContext::MD_loop))
+ I.setMetadata(LLVMContext::MD_loop, nullptr);
}
----------------
We should consider keeping the non-debug info metadata within MD_loop to avoid affecting optimization or opt-remarks. I think we can do that with `I.setMD(MD_loop, stripDebugLocFromLoopID(MD))`.
================
Comment at: llvm/test/Verifier/llvm.loop-cu-strip.ll:1
+; RUN: llvm-as -disable-output < %s -o /dev/null 2>&1 | FileCheck %s
+; CHECK: DICompileUnit not listed in llvm.dbg.cu
----------------
Can you round-trip this through `llvm-dis` so we can check that the !llvm.loop metadata sticks around (I'm imagining some `CHECK: !5 = distinct !{!5}`).
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96181/new/
https://reviews.llvm.org/D96181
More information about the llvm-commits
mailing list