mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
[Hexagon] Use MF reference from parent class in HexagonPacketizerList
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240403 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
29e004491e
commit
14e438dfb3
@ -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
Block a user