mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
Use target specific interface instead of forcing it to be target-generic
llvm-svn: 7413
This commit is contained in:
parent
1fd37738b6
commit
cf28d0f799
@ -219,9 +219,12 @@ namespace {
|
||||
/// of the long value.
|
||||
///
|
||||
unsigned makeAnotherReg(const Type *Ty) {
|
||||
assert(dynamic_cast<const X86RegisterInfo*>(TM.getRegisterInfo()) &&
|
||||
"Current target doesn't have X86 reg info??");
|
||||
const X86RegisterInfo *MRI =
|
||||
static_cast<const X86RegisterInfo*>(TM.getRegisterInfo());
|
||||
if (Ty == Type::LongTy || Ty == Type::ULongTy) {
|
||||
const TargetRegisterClass *RC =
|
||||
TM.getRegisterInfo()->getRegClassForType(Type::IntTy);
|
||||
const TargetRegisterClass *RC = MRI->getRegClassForType(Type::IntTy);
|
||||
// Create the lower part
|
||||
F->getSSARegMap()->createVirtualRegister(RC);
|
||||
// Create the upper part.
|
||||
@ -229,8 +232,7 @@ namespace {
|
||||
}
|
||||
|
||||
// Add the mapping of regnumber => reg class to MachineFunction
|
||||
const TargetRegisterClass *RC =
|
||||
TM.getRegisterInfo()->getRegClassForType(Ty);
|
||||
const TargetRegisterClass *RC = MRI->getRegClassForType(Ty);
|
||||
return F->getSSARegMap()->createVirtualRegister(RC);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user