aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-10-07 22:10:33 +0000
committerDan Gohman <gohman@apple.com>2008-10-07 22:10:33 +0000
commit8c3f8b6dea6d8ddcc40e3d996caa93067ee64454 (patch)
tree308cb1e54148ec2d98e9bad4be3eb11d9de3880d /lib
parent1e9e8c3bd5ac018296bddb21a2acb8c643303b39 (diff)
downloadexternal_llvm-8c3f8b6dea6d8ddcc40e3d996caa93067ee64454.zip
external_llvm-8c3f8b6dea6d8ddcc40e3d996caa93067ee64454.tar.gz
external_llvm-8c3f8b6dea6d8ddcc40e3d996caa93067ee64454.tar.bz2
Add MBB successors and physreg Uses in the same order that
SDISel typically adds them in. This makes it a little easier to compare FastISel output with SDISel output. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57266 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/X86/X86FastISel.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/Target/X86/X86FastISel.cpp b/lib/Target/X86/X86FastISel.cpp
index 1f2896c..2ce78ec 100644
--- a/lib/Target/X86/X86FastISel.cpp
+++ b/lib/Target/X86/X86FastISel.cpp
@@ -784,8 +784,8 @@ bool X86FastISel::X86SelectBranch(Instruction *I) {
default:
return false;
}
- MBB->addSuccessor(TrueMBB);
FastEmitBranch(FalseMBB);
+ MBB->addSuccessor(TrueMBB);
return true;
}
}
@@ -797,9 +797,8 @@ bool X86FastISel::X86SelectBranch(Instruction *I) {
BuildMI(MBB, TII.get(X86::TEST8rr)).addReg(OpReg).addReg(OpReg);
BuildMI(MBB, TII.get(X86::JNE)).addMBB(TrueMBB);
- MBB->addSuccessor(TrueMBB);
-
FastEmitBranch(FalseMBB);
+ MBB->addSuccessor(TrueMBB);
return true;
}
@@ -1180,10 +1179,8 @@ bool X86FastISel::X86SelectCall(Instruction *I) {
MIB.addReg(X86::EBX);
// Add implicit physical register uses to the call.
- while (!RegArgs.empty()) {
- MIB.addReg(RegArgs.back());
- RegArgs.pop_back();
- }
+ for (unsigned i = 0, e = RegArgs.size(); i != e; ++i)
+ MIB.addReg(RegArgs[i]);
// Issue CALLSEQ_END
unsigned AdjStackUp = TM.getRegisterInfo()->getCallFrameDestroyOpcode();