uint64_t SliceSizeInBytes, Instruction *OldInst,
Instruction *Inst, Value *Dest, Value *Value,
const DataLayout &DL) {
- auto MarkerRange = at::getAssignmentMarkers(OldInst);
- // Nothing to do if OldInst has no linked dbg.assign intrinsics.
- if (MarkerRange.empty())
- return;
-
uint64_t RelativeOffset = bytesToBits(RelativeOffsetInBytes);
uint64_t SliceSize = bytesToBits(SliceSizeInBytes);
DIBuilder DIB(*OldInst->getModule(), /*AllowUnresolved*/ false);
uint64_t AllocaSize = *OldAlloca->getAllocationSizeInBits(DL);
assert(OldAlloca->isStaticAlloca());
- for (DbgAssignIntrinsic *DbgAssign : MarkerRange) {
+
+ for (DbgAssignIntrinsic *DbgAssign : at::getAssignmentMarkers(OldInst)) {
LLVM_DEBUG(dbgs() << " existing dbg.assign is: " << *DbgAssign
<< "\n");
auto *Expr = DbgAssign->getExpression();