[llvm-commits] CVS: llvm/lib/Target/SparcV8/SparcV8ISelSimple.cpp
Brian Gaeke
gaeke at cs.uiuc.edu
Sat Dec 11 22:01:42 PST 2004
Changes in directory llvm/lib/Target/SparcV8:
SparcV8ISelSimple.cpp updated: 1.82 -> 1.83
---
Log message:
Add stubs for setcc-branch folding support.
---
Diffs of the changes: (+11 -0)
Index: llvm/lib/Target/SparcV8/SparcV8ISelSimple.cpp
diff -u llvm/lib/Target/SparcV8/SparcV8ISelSimple.cpp:1.82 llvm/lib/Target/SparcV8/SparcV8ISelSimple.cpp:1.83
--- llvm/lib/Target/SparcV8/SparcV8ISelSimple.cpp:1.82 Fri Dec 10 23:19:02 2004
+++ llvm/lib/Target/SparcV8/SparcV8ISelSimple.cpp Sun Dec 12 00:01:26 2004
@@ -1010,6 +1010,14 @@
return I != BB->getParent()->end() ? &*I : 0;
}
+/// canFoldSetCCIntoBranch - Return the setcc instruction if we can fold it
+/// into the conditional branch which is the only user of the cc instruction.
+/// This is the case if the conditional branch is the only user of the setcc.
+///
+static SetCondInst *canFoldSetCCIntoBranch(Value *V) {
+ return 0; // disable.
+}
+
/// visitBranchInst - Handles conditional and unconditional branches.
///
void V8ISel::visitBranchInst(BranchInst &I) {
@@ -1480,6 +1488,9 @@
}
void V8ISel::visitSetCondInst(SetCondInst &I) {
+ if (canFoldSetCCIntoBranch(&I))
+ return; // Fold this into a branch.
+
unsigned Op0Reg = getReg (I.getOperand (0));
unsigned Op1Reg = getReg (I.getOperand (1));
unsigned DestReg = getReg (I);
More information about the llvm-commits
mailing list