[llvm-commits] [llvm] r85914 - in /llvm/trunk/lib/Target/ARM: ARMTargetMachine.cpp NEONMoveFix.cpp
Anton Korobeynikov
asl at math.spbu.ru
Tue Nov 3 10:46:11 PST 2009
Author: asl
Date: Tue Nov 3 12:46:11 2009
New Revision: 85914
URL: http://llvm.org/viewvc/llvm-project?rev=85914&view=rev
Log:
Move subtarget check upper for NEON reg-reg fixup pass.
Modified:
llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp
llvm/trunk/lib/Target/ARM/NEONMoveFix.cpp
Modified: llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp?rev=85914&r1=85913&r2=85914&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp Tue Nov 3 12:46:11 2009
@@ -115,7 +115,8 @@
if (OptLevel != CodeGenOpt::None) {
if (!Subtarget.isThumb1Only())
PM.add(createIfConverterPass());
- PM.add(createNEONMoveFixPass());
+ if (Subtarget.hasNEON())
+ PM.add(createNEONMoveFixPass());
}
if (Subtarget.isThumb2()) {
Modified: llvm/trunk/lib/Target/ARM/NEONMoveFix.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/NEONMoveFix.cpp?rev=85914&r1=85913&r2=85914&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/NEONMoveFix.cpp (original)
+++ llvm/trunk/lib/Target/ARM/NEONMoveFix.cpp Tue Nov 3 12:46:11 2009
@@ -35,7 +35,6 @@
private:
const TargetRegisterInfo *TRI;
const ARMBaseInstrInfo *TII;
- const ARMSubtarget *Subtarget;
typedef DenseMap<unsigned, const MachineInstr*> RegMap;
@@ -71,7 +70,7 @@
Domain = ARMII::DomainNEON;
}
- if ((Domain & ARMII::DomainNEON) && Subtarget->hasNEON()) {
+ if (Domain & ARMII::DomainNEON) {
// Convert FCPYD to VMOVD.
unsigned DestReg = MI->getOperand(0).getReg();
@@ -93,8 +92,7 @@
Modified = true;
++NumVMovs;
} else {
- assert((Domain & ARMII::DomainVFP ||
- !Subtarget->hasNEON()) && "Invalid domain!");
+ assert((Domain & ARMII::DomainVFP) && "Invalid domain!");
// Do nothing.
}
}
@@ -124,7 +122,6 @@
return false;
TRI = TM.getRegisterInfo();
- Subtarget = &TM.getSubtarget<ARMSubtarget>();
TII = static_cast<const ARMBaseInstrInfo*>(TM.getInstrInfo());
bool Modified = false;
More information about the llvm-commits
mailing list