forked from OSchip/llvm-project
Revert "AArch64: use std::vector for temp array"
This reverts commit r216365. llvm-svn: 216433
This commit is contained in:
parent
43f49cad78
commit
b06f77b608
|
@ -1054,8 +1054,7 @@ bool AArch64CollectLOH::runOnMachineFunction(MachineFunction &MF) {
|
||||||
bool Modified = false;
|
bool Modified = false;
|
||||||
|
|
||||||
// Start with ADRP.
|
// Start with ADRP.
|
||||||
std::vector<InstrToInstrs> COTRUVector(NbReg);
|
InstrToInstrs *ColorOpToReachedUses = new InstrToInstrs[NbReg];
|
||||||
auto ColorOpToReachedUses = COTRUVector.data();
|
|
||||||
|
|
||||||
// Compute the reaching def in ADRP mode, meaning ADRP definitions
|
// Compute the reaching def in ADRP mode, meaning ADRP definitions
|
||||||
// are first considered as uses.
|
// are first considered as uses.
|
||||||
|
@ -1070,9 +1069,10 @@ bool AArch64CollectLOH::runOnMachineFunction(MachineFunction &MF) {
|
||||||
|
|
||||||
// Compute LOH for ADRP.
|
// Compute LOH for ADRP.
|
||||||
computeADRP(ADRPToReachingDefs, *AArch64FI, MDT);
|
computeADRP(ADRPToReachingDefs, *AArch64FI, MDT);
|
||||||
|
delete[] ColorOpToReachedUses;
|
||||||
|
|
||||||
// Continue with general ADRP -> ADD/LDR -> LDR/STR pattern.
|
// Continue with general ADRP -> ADD/LDR -> LDR/STR pattern.
|
||||||
COTRUVector.clear();
|
ColorOpToReachedUses = new InstrToInstrs[NbReg];
|
||||||
COTRUVector.resize(NbReg);
|
|
||||||
|
|
||||||
// first perform a regular reaching def analysis.
|
// first perform a regular reaching def analysis.
|
||||||
reachingDef(MF, ColorOpToReachedUses, RegToId, false, DummyOp);
|
reachingDef(MF, ColorOpToReachedUses, RegToId, false, DummyOp);
|
||||||
|
@ -1086,6 +1086,7 @@ bool AArch64CollectLOH::runOnMachineFunction(MachineFunction &MF) {
|
||||||
// Compute other than AdrpAdrp LOH.
|
// Compute other than AdrpAdrp LOH.
|
||||||
computeOthers(UsesToReachingDefs, ColorOpToReachedUses, *AArch64FI, RegToId,
|
computeOthers(UsesToReachingDefs, ColorOpToReachedUses, *AArch64FI, RegToId,
|
||||||
MDT);
|
MDT);
|
||||||
|
delete[] ColorOpToReachedUses;
|
||||||
|
|
||||||
if (BasicBlockScopeOnly)
|
if (BasicBlockScopeOnly)
|
||||||
MF.DeleteMachineInstr(DummyOp);
|
MF.DeleteMachineInstr(DummyOp);
|
||||||
|
|
Loading…
Reference in New Issue