[PATCH] D42551: [Debug] Add dbg.value intrinsics for PHIs created during LCSSA.
Matt Davis via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 6 14:45:46 PST 2018
mattd added inline comments.
================
Comment at: lib/Transforms/Utils/Local.cpp:1371
+ if (isa<CatchSwitchInst>(*Parent->getFirstNonPHI()))
+ continue;
+ auto PhiMAV = MetadataAsValue::get(C, ValueAsMetadata::get(PHI));
----------------
vsk wrote:
> Would isEHPad work better here (http://llvm.org/doxygen/classllvm_1_1Instruction.html#a5d3d315f678bc76e43b27d18e5d72829)?
I was avoiding being so strict, but now that I think about it, since we are inserting instructions BEFORE the insertionPt and the other EH instructions require that they be the first non-PHI, I think we need to use isEHPad. Thanks for pointing that out.
================
Comment at: test/Transforms/LCSSA/avoid-intrinsics-in-catchswitch.ll:36
+ %0 = bitcast %struct.e* %n to i8*
+ call void @llvm.lifetime.start.p0i8(i64 4, i8* nonnull %0)
+ %1 = bitcast i32* %db to i8*
----------------
vsk wrote:
> Does the bug reproduce with the lifetime intrinsics stripped out? That might be a way to reduce the regression test a bit.
Yes. I will strip those out. Thanks for the suggestion! I also removed some of the Attribute comments.
https://reviews.llvm.org/D42551
More information about the llvm-commits
mailing list