summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-05-04 01:26:39 +0000
committerChris Lattner <sabre@nondot.org>2006-05-04 01:26:39 +0000
commitee64b6b40fd01eb37ae8225b5bc342b79846b245 (patch)
tree2d330eb38aeab43085bda6c8067eb2ff2e8fe448 /llvm/lib/CodeGen
parent940cc978ef23d2f3e35904a6ebd9bd456b00f963 (diff)
downloadbcm5719-llvm-ee64b6b40fd01eb37ae8225b5bc342b79846b245.tar.gz
bcm5719-llvm-ee64b6b40fd01eb37ae8225b5bc342b79846b245.zip
Remove a bunch more dead V9 specific stuff
llvm-svn: 28094
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/LiveVariables.cpp14
-rw-r--r--llvm/lib/CodeGen/MachineBasicBlock.cpp2
-rw-r--r--llvm/lib/CodeGen/MachineInstr.cpp27
3 files changed, 9 insertions, 34 deletions
diff --git a/llvm/lib/CodeGen/LiveVariables.cpp b/llvm/lib/CodeGen/LiveVariables.cpp
index c85d40b04f0..5c7818d330a 100644
--- a/llvm/lib/CodeGen/LiveVariables.cpp
+++ b/llvm/lib/CodeGen/LiveVariables.cpp
@@ -296,14 +296,12 @@ bool LiveVariables::runOnMachineFunction(MachineFunction &MF) {
"Didn't find an entry for our predecessor??");
if (MI->getOperand(i+1).getMachineBasicBlock() == MBB) {
MachineOperand &MO = MI->getOperand(i);
- if (!MO.getVRegValueOrNull()) {
- VarInfo &VRInfo = getVarInfo(MO.getReg());
- assert(VRInfo.DefInst && "Register use before def (or no def)!");
-
- // Only mark it alive only in the block we are representing.
- MarkVirtRegAliveInBlock(VRInfo, MBB);
- break; // Found the PHI entry for this block.
- }
+ VarInfo &VRInfo = getVarInfo(MO.getReg());
+ assert(VRInfo.DefInst && "Register use before def (or no def)!");
+
+ // Only mark it alive only in the block we are representing.
+ MarkVirtRegAliveInBlock(VRInfo, MBB);
+ break; // Found the PHI entry for this block.
}
}
}
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp
index ee8da6744e3..5b095196d8d 100644
--- a/llvm/lib/CodeGen/MachineBasicBlock.cpp
+++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp
@@ -47,7 +47,7 @@ void ilist_traits<MachineBasicBlock>::removeNodeFromList(MachineBasicBlock* N) {
MachineInstr* ilist_traits<MachineInstr>::createSentinel() {
- MachineInstr* dummy = new MachineInstr(0, 0);
+ MachineInstr* dummy = new MachineInstr(0, 0, true, true);
LeakDetector::removeGarbageObject(dummy);
return dummy;
}
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp
index 367631c60ec..e300993a10f 100644
--- a/llvm/lib/CodeGen/MachineInstr.cpp
+++ b/llvm/lib/CodeGen/MachineInstr.cpp
@@ -36,15 +36,6 @@ namespace llvm {
extern const TargetInstrDescriptor *TargetInstrDescriptors;
}
-// Constructor for instructions with variable #operands
-MachineInstr::MachineInstr(short opcode, unsigned numOperands)
- : Opcode(opcode),
- operands(numOperands, MachineOperand()),
- parent(0) {
- // Make sure that we get added to a machine basicblock
- LeakDetector::addGarbageObject(this);
-}
-
/// MachineInstr ctor - This constructor only does a _reserve_ of the operands,
/// not a resize for them. It is expected that if you use this that you call
/// add* methods below to fill up the operands, instead of the Set methods.
@@ -178,14 +169,7 @@ static void print(const MachineOperand &MO, std::ostream &OS,
switch (MO.getType()) {
case MachineOperand::MO_VirtualRegister:
- if (MO.getVRegValue()) {
- OS << "%reg";
- OutputValue(OS, MO.getVRegValue());
- if (MO.hasAllocatedReg())
- OS << "==";
- }
- if (MO.hasAllocatedReg())
- OutputReg(OS, MO.getReg(), MRI);
+ OutputReg(OS, MO.getReg(), MRI);
break;
case MachineOperand::MO_SignExtendedImmed:
OS << (long)MO.getImmedValue();
@@ -285,14 +269,7 @@ std::ostream &llvm::operator<<(std::ostream &os, const MachineInstr &MI) {
std::ostream &llvm::operator<<(std::ostream &OS, const MachineOperand &MO) {
switch (MO.getType()) {
case MachineOperand::MO_VirtualRegister:
- if (MO.hasAllocatedReg())
- OutputReg(OS, MO.getReg());
-
- if (MO.getVRegValue()) {
- if (MO.hasAllocatedReg()) OS << "==";
- OS << "%vreg";
- OutputValue(OS, MO.getVRegValue());
- }
+ OutputReg(OS, MO.getReg());
break;
case MachineOperand::MO_SignExtendedImmed:
OS << (long)MO.getImmedValue();
OpenPOWER on IntegriCloud