[PATCH] D96181: Have stripDebugInfo() also strip !llvm.loop annotations.
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 5 15:26:44 PST 2021
aprantl 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);
}
----------------
aprantl wrote:
> aprantl wrote:
> > vsk wrote:
> > > 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))`.
> > I didn't know this was an option! Thanks
> This is weird — the code right below is already supposed to do this and I didn't notice!
Because it only looks at TermInsts.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96181/new/
https://reviews.llvm.org/D96181
More information about the llvm-commits
mailing list