There is PHINode::getBasicBlockIndex(), PHINode::setIncomingBlock()
and PHINode::getNumOperands(), but no function to replace every
specified BasicBlock* predecessor with some other specified BasicBlock*.
Clearly, there are a lot of places that could use that functionality.
Details
Details
- Reviewers
chandlerc craig.topper spatel danielcdh - Commits
- rZORGcaa9ba16a2e3: [NFC] PHINode: introduce replaceIncomingBlockWith() function, use it
rZORG23299072f492: [NFC] PHINode: introduce replaceIncomingBlockWith() function, use it
rGcaa9ba16a2e3: [NFC] PHINode: introduce replaceIncomingBlockWith() function, use it
rG23299072f492: [NFC] PHINode: introduce replaceIncomingBlockWith() function, use it
rGe3b1d82b5302: [NFC] PHINode: introduce replaceIncomingBlockWith() function, use it
rL359995: [NFC] PHINode: introduce replaceIncomingBlockWith() function, use it
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
include/llvm/IR/Instructions.h | ||
---|---|---|
2742 ↗ | (On Diff #196235) | Would 'replace' be more consistent with other functions than 'change'? And I think we often include 'With' at the end for methods like this. For example User::replaceUsesOfWith |
include/llvm/IR/Instructions.h | ||
---|---|---|
2745 ↗ | (On Diff #196412) | Drop the temporary variable. And then you can probably drop the curly braces. |
lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp | ||
---|---|---|
1366 ↗ | (On Diff #196811) | This one is weird. |