From c53037205b9f48dec853d992c58e57c73bf33385 Mon Sep 17 00:00:00 2001 From: "Vikram S. Adve" Date: Thu, 8 Nov 2001 04:47:06 +0000 Subject: Major overhaul of stack frame management. llvm-svn: 1185 --- llvm/lib/CodeGen/InstrSelection/InstrForest.cpp | 9 +++++++++ llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp | 2 +- llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp | 4 ++-- 3 files changed, 12 insertions(+), 3 deletions(-) (limited to 'llvm/lib/CodeGen/InstrSelection') diff --git a/llvm/lib/CodeGen/InstrSelection/InstrForest.cpp b/llvm/lib/CodeGen/InstrSelection/InstrForest.cpp index 199ed6569be..d460bb77e23 100644 --- a/llvm/lib/CodeGen/InstrSelection/InstrForest.cpp +++ b/llvm/lib/CodeGen/InstrSelection/InstrForest.cpp @@ -80,6 +80,15 @@ InstructionNode::InstructionNode(Instruction* I) { opLabel = opLabel + 100; // load/getElem with index vector } + else if (opLabel == Instruction::And || + opLabel == Instruction::Or || + opLabel == Instruction::Xor || + opLabel == Instruction::Not) + { + // Distinguish bitwise operators from logical operators! + if (I->getType() != Type::BoolTy) + opLabel = opLabel + 100; // bitwise operator + } else if (opLabel == Instruction::Cast) { const Type *ITy = I->getType(); diff --git a/llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp b/llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp index abbd2f94f7e..fafe0234e34 100644 --- a/llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp +++ b/llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp @@ -130,7 +130,7 @@ SelectInstructionsForMethod(Method* method, TargetMachine &target) { cout << endl << "*** Machine instructions after INSTRUCTION SELECTION" << endl; - method->getMachineCode().dump(); + MachineCodeForMethod::get(method).dump(); } return false; diff --git a/llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp b/llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp index 88fd4a41386..0a6d7d331d3 100644 --- a/llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp +++ b/llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp @@ -337,7 +337,7 @@ FixConstantOperandsForInstr(Instruction* vmInstr, if (constantThatMustBeLoaded) { // register the value so it is emitted in the assembly - method->getMachineCode().addToConstantPool( + MachineCodeForMethod::get(method).addToConstantPool( cast(opValue)); } } @@ -372,7 +372,7 @@ FixConstantOperandsForInstr(Instruction* vmInstr, if (isa(oldVal)) { // register the value so it is emitted in the assembly - method->getMachineCode().addToConstantPool( + MachineCodeForMethod::get(method).addToConstantPool( cast(oldVal)); } } -- cgit v1.2.3