File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -1149,6 +1149,7 @@ void Optimizer::optimizeTag(CallInst *orig_inst)
11491149{
11501150 auto tag = orig_inst->getArgOperand (2 );
11511151 // `julia.typeof` is only legal on the original pointer, no need to scan recursively
1152+ size_t last_deleted = removed.size ();
11521153 for (auto user: orig_inst->users ()) {
11531154 if (auto call = dyn_cast<CallInst>(user)) {
11541155 auto callee = call->getCalledOperand ();
@@ -1161,6 +1162,8 @@ void Optimizer::optimizeTag(CallInst *orig_inst)
11611162 }
11621163 }
11631164 }
1165+ while (last_deleted < removed.size ())
1166+ removed[last_deleted++]->replaceUsesOfWith (orig_inst, UndefValue::get (orig_inst->getType ()));
11641167}
11651168
11661169void Optimizer::splitOnStack (CallInst *orig_inst)
You can’t perform that action at this time.
0 commit comments