aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/llvm/CodeGen/FastISel.h6
-rw-r--r--lib/Target/X86/X86FastISel.cpp6
2 files changed, 7 insertions, 5 deletions
diff --git a/include/llvm/CodeGen/FastISel.h b/include/llvm/CodeGen/FastISel.h
index 95280c9..6ac401d 100644
--- a/include/llvm/CodeGen/FastISel.h
+++ b/include/llvm/CodeGen/FastISel.h
@@ -227,8 +227,10 @@ protected:
unsigned createResultReg(const TargetRegisterClass *RC);
- virtual unsigned TargetSelectConstantPoolLoad(Constant* C,
- MachineConstantPool* MCP) {
+ /// TargetMaterializeConstant - Emit a constant in a register using
+ /// target-specific logic, such as constant pool loads.
+ virtual unsigned TargetMaterializeConstant(Constant* C,
+ MachineConstantPool* MCP) {
return 0;
}
diff --git a/lib/Target/X86/X86FastISel.cpp b/lib/Target/X86/X86FastISel.cpp
index 37640bb..e63120d 100644
--- a/lib/Target/X86/X86FastISel.cpp
+++ b/lib/Target/X86/X86FastISel.cpp
@@ -61,7 +61,7 @@ private:
bool X86SelectSelect(Instruction *I);
- unsigned TargetSelectConstantPoolLoad(Constant *C, MachineConstantPool* MCP);
+ unsigned TargetMaterializeConstant(Constant *C, MachineConstantPool* MCP);
};
/// X86SelectConstAddr - Select and emit code to materialize constant address.
@@ -549,8 +549,8 @@ X86FastISel::TargetSelectInstruction(Instruction *I) {
return false;
}
-unsigned X86FastISel::TargetSelectConstantPoolLoad(Constant *C,
- MachineConstantPool* MCP) {
+unsigned X86FastISel::TargetMaterializeConstant(Constant *C,
+ MachineConstantPool* MCP) {
unsigned CPLoad = getRegForValue(C);
if (CPLoad != 0)
return CPLoad;