[RemoveDIs][DebugInfo] Correctly visit DPValues in StackInfoBuilder::visit (#81247)
In `StackInfoBuilder::visit(Instruction &Inst)`, operations are performed on memory-related instructions, including debug intrinsics that refer to "interesting" allocas. There is a block that also visits DPValues attached to the instruction, but this block is near the end of the function; this has two problems: 1. The DPValues attached to an instruction precede that instruction, so they should always be processed before the instruction itself. 2. More importantly, some of the paths for visiting other instructions contain early returns, which will result in the DPValues not being visited at all. This patch simply moves the DPValue-visiting block to the top of the function, which should resolve both of these problems.
parent
8373ceef
Please register or sign in to comment