summaryrefslogtreecommitdiff
path: root/lib/CodeGen/PHIElimination.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-02-09 19:54:29 +0000
committerChris Lattner <sabre@nondot.org>2010-02-09 19:54:29 +0000
commit518bb53485df640d7b7e3f6b0544099020c42aa7 (patch)
tree92b8684baa417c83b197e4abeaf1ab3f06930cbb /lib/CodeGen/PHIElimination.h
parent4152778605dcab9e650b2cd03e2d8dc12f20aff6 (diff)
downloadllvm-518bb53485df640d7b7e3f6b0544099020c42aa7.tar.gz
llvm-518bb53485df640d7b7e3f6b0544099020c42aa7.tar.bz2
llvm-518bb53485df640d7b7e3f6b0544099020c42aa7.tar.xz
move target-independent opcodes out of TargetInstrInfo
into TargetOpcodes.h. #include the new TargetOpcodes.h into MachineInstr. Add new inline accessors (like isPHI()) to MachineInstr, and start using them throughout the codebase. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95687 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/PHIElimination.h')
-rw-r--r--lib/CodeGen/PHIElimination.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/PHIElimination.h b/lib/CodeGen/PHIElimination.h
index 1bcc9dc7d9..895aaa4115 100644
--- a/lib/CodeGen/PHIElimination.h
+++ b/lib/CodeGen/PHIElimination.h
@@ -14,10 +14,11 @@
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
-#include "llvm/Target/TargetInstrInfo.h"
+#include "llvm/CodeGen/MachineRegisterInfo.h"
namespace llvm {
-
+ class LiveVariables;
+
/// Lower PHI instructions to copies.
class PHIElimination : public MachineFunctionPass {
MachineRegisterInfo *MRI; // Machine register information
@@ -112,8 +113,7 @@ namespace llvm {
MachineBasicBlock::iterator I) {
// Rather than assuming that EH labels come before other kinds of labels,
// just skip all labels.
- while (I != MBB.end() &&
- (I->getOpcode() == TargetInstrInfo::PHI || I->isLabel()))
+ while (I != MBB.end() && (I->isPHI() || I->isLabel()))
++I;
return I;
}