forked from OSchip/llvm-project
[Hexagon] Use MF reference from parent class in HexagonPacketizerList
llvm-svn: 240403
This commit is contained in:
parent
b440c4214d
commit
c3966017b9
|
@ -272,9 +272,8 @@ static bool IsIndirectCall(MachineInstr* MI) {
|
|||
// reservation fail.
|
||||
void HexagonPacketizerList::reserveResourcesForConstExt(MachineInstr* MI) {
|
||||
const HexagonInstrInfo *QII = (const HexagonInstrInfo *) TII;
|
||||
MachineFunction *MF = MI->getParent()->getParent();
|
||||
MachineInstr *PseudoMI = MF->CreateMachineInstr(QII->get(Hexagon::A4_ext),
|
||||
MI->getDebugLoc());
|
||||
MachineInstr *PseudoMI = MF.CreateMachineInstr(QII->get(Hexagon::A4_ext),
|
||||
MI->getDebugLoc());
|
||||
|
||||
if (ResourceTracker->canReserveResources(PseudoMI)) {
|
||||
ResourceTracker->reserveResources(PseudoMI);
|
||||
|
@ -290,11 +289,10 @@ bool HexagonPacketizerList::canReserveResourcesForConstExt(MachineInstr *MI) {
|
|||
const HexagonInstrInfo *QII = (const HexagonInstrInfo *) TII;
|
||||
assert((QII->isExtended(MI) || QII->isConstExtended(MI)) &&
|
||||
"Should only be called for constant extended instructions");
|
||||
MachineFunction *MF = MI->getParent()->getParent();
|
||||
MachineInstr *PseudoMI = MF->CreateMachineInstr(QII->get(Hexagon::A4_ext),
|
||||
MI->getDebugLoc());
|
||||
MachineInstr *PseudoMI = MF.CreateMachineInstr(QII->get(Hexagon::A4_ext),
|
||||
MI->getDebugLoc());
|
||||
bool CanReserve = ResourceTracker->canReserveResources(PseudoMI);
|
||||
MF->DeleteMachineInstr(PseudoMI);
|
||||
MF.DeleteMachineInstr(PseudoMI);
|
||||
return CanReserve;
|
||||
}
|
||||
|
||||
|
@ -302,9 +300,8 @@ bool HexagonPacketizerList::canReserveResourcesForConstExt(MachineInstr *MI) {
|
|||
// true, otherwise, return false.
|
||||
bool HexagonPacketizerList::tryAllocateResourcesForConstExt(MachineInstr* MI) {
|
||||
const HexagonInstrInfo *QII = (const HexagonInstrInfo *) TII;
|
||||
MachineFunction *MF = MI->getParent()->getParent();
|
||||
MachineInstr *PseudoMI = MF->CreateMachineInstr(QII->get(Hexagon::A4_ext),
|
||||
MI->getDebugLoc());
|
||||
MachineInstr *PseudoMI = MF.CreateMachineInstr(QII->get(Hexagon::A4_ext),
|
||||
MI->getDebugLoc());
|
||||
|
||||
if (ResourceTracker->canReserveResources(PseudoMI)) {
|
||||
ResourceTracker->reserveResources(PseudoMI);
|
||||
|
|
Loading…
Reference in New Issue