[PATCH] D128657: [VPlan] Move setDebugLocFromInst to VPTransformState (NFC).
Ayal Zaks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 27 13:00:30 PDT 2022
Ayal accepted this revision.
Ayal added inline comments.
This revision is now accepted and ready to land.
================
Comment at: llvm/lib/Transforms/Vectorize/VPlan.cpp:251
+void VPTransformState::setDebugLocFromInst(const Value *V) {
+ if (const Instruction *Inst = dyn_cast_or_null<Instruction>(V)) {
+ const DILocation *DIL = Inst->getDebugLoc();
----------------
nit: while we're here, this function could use an early-exit or two, potentially via `return Builder.SetCurrentDebugLocation()`'s, possibly in a separate patch.
================
Comment at: llvm/lib/Transforms/Vectorize/VPlan.h:321
+ /// Set the debug location in the builder \p Ptr using the debug location in
+ /// \p V. If \p Ptr is None then it uses the class member's Builder.
+ void setDebugLocFromInst(const Value *V);
----------------
\p Ptr?
Note that the original version uses ILV's Builder, this one uses State's Builder, but it's fine.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128657/new/
https://reviews.llvm.org/D128657
More information about the llvm-commits
mailing list