diff options
author | Brian Gaeke <gaeke@uiuc.edu> | 2004-12-12 06:01:26 +0000 |
---|---|---|
committer | Brian Gaeke <gaeke@uiuc.edu> | 2004-12-12 06:01:26 +0000 |
commit | aa40b7d08076921dcfa476df75224fbd86a54cc4 (patch) | |
tree | 37603565ab268c1b00959bf21c5cdab9aeb6c8db | |
parent | 40e4cec9eedaae504101d40bca92c198e007b740 (diff) | |
download | bcm5719-llvm-aa40b7d08076921dcfa476df75224fbd86a54cc4.tar.gz bcm5719-llvm-aa40b7d08076921dcfa476df75224fbd86a54cc4.zip |
Add stubs for setcc-branch folding support.
llvm-svn: 18818
-rw-r--r-- | llvm/lib/Target/SparcV8/SparcV8ISelSimple.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/Target/SparcV8/SparcV8ISelSimple.cpp b/llvm/lib/Target/SparcV8/SparcV8ISelSimple.cpp index 5959c47afdf..68bc28a0f32 100644 --- a/llvm/lib/Target/SparcV8/SparcV8ISelSimple.cpp +++ b/llvm/lib/Target/SparcV8/SparcV8ISelSimple.cpp @@ -1010,6 +1010,14 @@ static inline BasicBlock *getBlockAfter(BasicBlock *BB) { 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::visitBinaryOperator (Instruction &I) { } 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); |