Add a new FastISel method, getRegForValue, which takes care of

the details of materializing constants and other values into
registers, and make use of it in several places.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55426 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman
2008-08-27 18:10:19 +00:00
parent 96a9999d79
commit ad368ac2b5
2 changed files with 98 additions and 138 deletions

View File

@@ -194,6 +194,9 @@ protected:
uint64_t Imm);
private:
unsigned getRegForValue(Value *V,
DenseMap<const Value*, unsigned> &ValueMap);
unsigned createResultReg(const TargetRegisterClass *RC);
bool SelectBinaryOp(Instruction *I, ISD::NodeType ISDOpcode,
@@ -207,11 +210,6 @@ private:
bool SelectCast(Instruction *I, ISD::NodeType Opcode,
DenseMap<const Value*, unsigned> &ValueMap);
bool SelectConstantCast(Instruction *I, ISD::NodeType Opcode,
DenseMap<const Value*, unsigned> &ValueMap);
bool SelectConstantFPCast(Instruction *I, ISD::NodeType Opcode,
DenseMap<const Value*, unsigned> &ValueMap);
};
}