mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 12:12:47 +01:00
Remove caching of the target machine and initialization of the
subtarget from ARMISelDAGtoDAG. The former is unnecessary and the latter is initialized on each runOnMachineFunction. llvm-svn: 212297
This commit is contained in:
parent
5c282923d9
commit
a364288ae8
@ -60,22 +60,17 @@ enum AddrMode2Type {
|
||||
};
|
||||
|
||||
class ARMDAGToDAGISel : public SelectionDAGISel {
|
||||
ARMBaseTargetMachine &TM;
|
||||
|
||||
/// Subtarget - Keep a pointer to the ARMSubtarget around so that we can
|
||||
/// make the right decision when generating code for different targets.
|
||||
const ARMSubtarget *Subtarget;
|
||||
|
||||
public:
|
||||
explicit ARMDAGToDAGISel(ARMBaseTargetMachine &tm,
|
||||
CodeGenOpt::Level OptLevel)
|
||||
: SelectionDAGISel(tm, OptLevel), TM(tm),
|
||||
Subtarget(&TM.getSubtarget<ARMSubtarget>()) {
|
||||
}
|
||||
explicit ARMDAGToDAGISel(ARMBaseTargetMachine &tm, CodeGenOpt::Level OptLevel)
|
||||
: SelectionDAGISel(tm, OptLevel) {}
|
||||
|
||||
bool runOnMachineFunction(MachineFunction &MF) override {
|
||||
// Reset the subtarget each time through.
|
||||
Subtarget = &TM.getSubtarget<ARMSubtarget>();
|
||||
Subtarget = &MF.getTarget().getSubtarget<ARMSubtarget>();
|
||||
SelectionDAGISel::runOnMachineFunction(MF);
|
||||
return true;
|
||||
}
|
||||
@ -429,8 +424,8 @@ bool ARMDAGToDAGISel::hasNoVMLxHazardUse(SDNode *N) const {
|
||||
if (Use->getOpcode() == ISD::CopyToReg)
|
||||
return true;
|
||||
if (Use->isMachineOpcode()) {
|
||||
const ARMBaseInstrInfo *TII =
|
||||
static_cast<const ARMBaseInstrInfo*>(TM.getInstrInfo());
|
||||
const ARMBaseInstrInfo *TII = static_cast<const ARMBaseInstrInfo *>(
|
||||
CurDAG->getTarget().getInstrInfo());
|
||||
|
||||
const MCInstrDesc &MCID = TII->get(Use->getMachineOpcode());
|
||||
if (MCID.mayStore())
|
||||
|
Loading…
Reference in New Issue
Block a user