Skip to content

Commit f2c2cdf

Browse files
[speculative-execution] Hoists debug values unnecessarily.
After https://reviews.llvm.org/D81730: `SpeculativeExecutionPass::considerHoistingFromTo` hoists instructions, including debug intrinsics, as long as none of their used values are instructions that appear prior in the block that are not being hoisted. This behaviour has been duplicated for DPValues to get rid of a binary difference. The correct solution is not hoist these debug values at all, whichever format they're in. nit: Remove 'If' from comment.
1 parent 60621d1 commit f2c2cdf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/Scalar/SpeculativeExecution.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ static InstructionCost ComputeSpeculationCost(const Instruction *I,
274274
// call void @llvm.dbg.value(%x, !"x", !DIExpression())
275275
// call void foo()
276276
//
277-
// If SpeculativeExecution might decide to hoist the 'y * z' calculation
277+
// SpeculativeExecution might decide to hoist the 'y * z' calculation
278278
// out of the 'if' block, because it is more efficient that way, so the
279279
// '%x = mul i32 %y, %z' moves to the block above. But it might also
280280
// decide to hoist the 'llvm.dbg.value' call.

0 commit comments

Comments
 (0)