[llvm-commits] [llvm] r77221 - in /llvm/trunk/lib/Target/ARM: ARMBaseInstrInfo.cpp ARMBaseInstrInfo.h
Evan Cheng
evan.cheng at apple.com
Mon Jul 27 11:25:24 PDT 2009
Author: evancheng
Date: Mon Jul 27 13:25:24 2009
New Revision: 77221
URL: http://llvm.org/viewvc/llvm-project?rev=77221&view=rev
Log:
Clean up.
Modified:
llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp
llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.h
Modified: llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp?rev=77221&r1=77220&r2=77221&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp Mon Jul 27 13:25:24 2009
@@ -251,11 +251,7 @@
// ...likewise if it ends with a branch table followed by an unconditional
// branch. The branch folder can create these, and we must get rid of them for
// correctness of Thumb constant islands.
- if ((SecondLastOpc == ARM::BR_JTr ||
- SecondLastOpc == ARM::BR_JTm ||
- SecondLastOpc == ARM::BR_JTadd ||
- SecondLastOpc == ARM::tBR_JTr ||
- SecondLastOpc == ARM::t2BR_JT) &&
+ if (isJumpTableBranchOpcode(SecondLastOpc) &&
isUncondBranchOpcode(LastOpc)) {
I = LastInst;
if (AllowModify)
Modified: llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.h?rev=77221&r1=77220&r2=77221&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.h (original)
+++ llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.h Mon Jul 27 13:25:24 2009
@@ -301,6 +301,11 @@
return Opc == ARM::Bcc || Opc == ARM::tBcc || Opc == ARM::t2Bcc;
}
+ bool isJumpTableBranchOpcode(int Opc) const {
+ return Opc == ARM::BR_JTr || Opc == ARM::BR_JTm || Opc == ARM::BR_JTadd ||
+ Opc == ARM::tBR_JTr || Opc == ARM::t2BR_JT;
+ }
+
int getMatchingCondBranchOpcode(int Opc) const;
};
}
More information about the llvm-commits
mailing list