diff options
author | Afanasyev Ivan <ivafanas@gmail.com> | 2025-09-25 12:59:36 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-09-25 14:59:36 +0900 |
commit | 3e639930d3ba3d6401992ab1d54dc625d5a299a5 (patch) | |
tree | 34220f6f834be74829d5349c0635381dec1c7974 /llvm/lib/CodeGen/MachineBasicBlock.cpp | |
parent | f9305c900ba23de7a9088ed00912cc6113eba506 (diff) | |
download | llvm-3e639930d3ba3d6401992ab1d54dc625d5a299a5.zip llvm-3e639930d3ba3d6401992ab1d54dc625d5a299a5.tar.gz llvm-3e639930d3ba3d6401992ab1d54dc625d5a299a5.tar.bz2 |
[CodeGen] Extract copy-paste on PHI MachineInstr income removal. (#158634)
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineBasicBlock.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp index 08a51b9..d4b64ab9 100644 --- a/llvm/lib/CodeGen/MachineBasicBlock.cpp +++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp @@ -1802,6 +1802,12 @@ bool MachineBasicBlock::sizeWithoutDebugLargerThan(unsigned Limit) const { return false; } +void MachineBasicBlock::removePHIsIncomingValuesForPredecessor( + const MachineBasicBlock &PredMBB) { + for (MachineInstr &Phi : phis()) + Phi.removePHIIncomingValueFor(PredMBB); +} + const MBBSectionID MBBSectionID::ColdSectionID(MBBSectionID::SectionType::Cold); const MBBSectionID MBBSectionID::ExceptionSectionID(MBBSectionID::SectionType::Exception); |