diff options
author | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2016-08-19 18:46:13 +0000 |
---|---|---|
committer | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2016-08-19 18:46:13 +0000 |
commit | 8849a5137009509ef6c76115ffef62118f1b7fee (patch) | |
tree | 0fbd1017bc6d13bb443a280af94040eee285d60e /llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp | |
parent | 181f924beb494c2ac778eff09559132c3c942d31 (diff) | |
download | bcm5719-llvm-8849a5137009509ef6c76115ffef62118f1b7fee.tar.gz bcm5719-llvm-8849a5137009509ef6c76115ffef62118f1b7fee.zip |
[Hexagon] Do not cache alloca instructions during isel
They can be deleted or replicated, so the cache may become outdated.
They only need to be visited once during frame lowering, so just scan
the function instead.
llvm-svn: 279297
Diffstat (limited to 'llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp')
-rw-r--r-- | llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp b/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp index cc1fdd4fbf2..644c643d066 100644 --- a/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp +++ b/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp @@ -532,8 +532,11 @@ void HexagonFrameLowering::insertPrologueInBlock(MachineBasicBlock &MBB, unsigned MaxCF = MFI.getMaxCallFrameSize(); MachineBasicBlock::iterator InsertPt = MBB.begin(); - auto *FuncInfo = MF.getInfo<HexagonMachineFunctionInfo>(); - auto &AdjustRegs = FuncInfo->getAllocaAdjustInsts(); + SmallVector<MachineInstr *, 4> AdjustRegs; + for (auto &MBB : MF) + for (auto &MI : MBB) + if (MI.getOpcode() == Hexagon::PS_alloca) + AdjustRegs.push_back(&MI); for (auto MI : AdjustRegs) { assert((MI->getOpcode() == Hexagon::PS_alloca) && "Expected alloca"); |