mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-26 07:24:25 +00:00
determine whether a change was made
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31265 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -57,13 +57,17 @@ public:
|
|||||||
|
|
||||||
/// ReplaceMBBInJumpTables - If Old is the target of any jump tables, update
|
/// ReplaceMBBInJumpTables - If Old is the target of any jump tables, update
|
||||||
/// the jump tables to branch to New instead.
|
/// the jump tables to branch to New instead.
|
||||||
void ReplaceMBBInJumpTables(MachineBasicBlock *Old, MachineBasicBlock *New) {
|
bool ReplaceMBBInJumpTables(MachineBasicBlock *Old, MachineBasicBlock *New) {
|
||||||
|
bool MadeChange = false;
|
||||||
for (unsigned i = 0, e = JumpTables.size(); i != e; ++i) {
|
for (unsigned i = 0, e = JumpTables.size(); i != e; ++i) {
|
||||||
MachineJumpTableEntry &JTE = JumpTables[i];
|
MachineJumpTableEntry &JTE = JumpTables[i];
|
||||||
for (unsigned j = 0, e = JTE.MBBs.size(); j != e; ++j)
|
for (unsigned j = 0, e = JTE.MBBs.size(); j != e; ++j)
|
||||||
if (JTE.MBBs[j] == Old)
|
if (JTE.MBBs[j] == Old) {
|
||||||
JTE.MBBs[j] = New;
|
JTE.MBBs[j] = New;
|
||||||
|
MadeChange = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
return MadeChange;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// getEntrySize - returns the size of an individual field in a jump table
|
/// getEntrySize - returns the size of an individual field in a jump table
|
||||||
|
Reference in New Issue
Block a user