This patch uses the metadata created by the llvm.unpredictable intrinsic in D12341 to avoid creating an unpredictable branch.
Details
Details
Diff Detail
Diff Detail
Event Timeline
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | ||
---|---|---|
1601–1602 | bikeshed: Check the isJumpExpensive first |
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | ||
---|---|---|
1601–1602 | and after the hasOneUse. The metadata is the weirdest case reason to not this, so it makes sense to be the last thing checked |
Comment Actions
Patch updated:
- Reordered branch conditions
- Added a temp variable for the opcode, so we don't repeat getOpcode() three times
Comment Actions
Patch updated:
Added 'TODO' comment assuming that 'unpredictable' now carries a value rather being a boolean.
Comment Actions
Patch updated:
Removed comment about threshold value; we can add that feature when we have profile data to feed into this metadata.
bikeshed: Check the isJumpExpensive first