summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86AvoidStoreForwardingBlocks.cpp
diff options
context:
space:
mode:
authorRobert Lougher <rob.lougher@gmail.com>2019-07-03 17:43:55 +0000
committerRobert Lougher <rob.lougher@gmail.com>2019-07-03 17:43:55 +0000
commit720baf04163983ad885dcec17b61e74fe42b9933 (patch)
tree821d2846c83a3569601ce2da08dfc5e550a6eaa7 /llvm/lib/Target/X86/X86AvoidStoreForwardingBlocks.cpp
parent4e8b99a5c375551ad0e07bfdc62ed838d2f1874d (diff)
downloadbcm5719-llvm-720baf04163983ad885dcec17b61e74fe42b9933.tar.gz
bcm5719-llvm-720baf04163983ad885dcec17b61e74fe42b9933.zip
[X86] Avoid SFB - Skip meta instructions
This patch generalizes the fix in D61680 to ignore all meta instructions, not just debug info. Patch by Chris Dawson. Differential Revision: https://reviews.llvm.org/D62605 llvm-svn: 365061
Diffstat (limited to 'llvm/lib/Target/X86/X86AvoidStoreForwardingBlocks.cpp')
-rw-r--r--llvm/lib/Target/X86/X86AvoidStoreForwardingBlocks.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Target/X86/X86AvoidStoreForwardingBlocks.cpp b/llvm/lib/Target/X86/X86AvoidStoreForwardingBlocks.cpp
index 3dcc1015dc7..c307700e70b 100644
--- a/llvm/lib/Target/X86/X86AvoidStoreForwardingBlocks.cpp
+++ b/llvm/lib/Target/X86/X86AvoidStoreForwardingBlocks.cpp
@@ -408,7 +408,7 @@ void X86AvoidSFBPass::buildCopy(MachineInstr *LoadInst, unsigned NLoadOpcode,
// If the load and store are consecutive, use the loadInst location to
// reduce register pressure.
MachineInstr *StInst = StoreInst;
- auto PrevInstrIt = skipDebugInstructionsBackward(
+ auto PrevInstrIt = skipMetaInstructionsBackward(
std::prev(MachineBasicBlock::instr_iterator(StoreInst)),
MBB->instr_begin());
if (PrevInstrIt.getNodePtr() == LoadInst)
@@ -496,7 +496,7 @@ void X86AvoidSFBPass::buildCopies(int Size, MachineInstr *LoadInst,
static void updateKillStatus(MachineInstr *LoadInst, MachineInstr *StoreInst) {
MachineOperand &LoadBase = getBaseOperand(LoadInst);
MachineOperand &StoreBase = getBaseOperand(StoreInst);
- auto StorePrevNonDbgInstr = skipDebugInstructionsBackward(
+ auto StorePrevNonMetaInstr = skipMetaInstructionsBackward(
std::prev(MachineBasicBlock::instr_iterator(StoreInst)),
LoadInst->getParent()->instr_begin()).getNodePtr();
if (LoadBase.isReg()) {
@@ -505,13 +505,13 @@ static void updateKillStatus(MachineInstr *LoadInst, MachineInstr *StoreInst) {
// then the partial copies were also created in
// a consecutive order to reduce register pressure,
// and the location of the last load is before the last store.
- if (StorePrevNonDbgInstr == LoadInst)
+ if (StorePrevNonMetaInstr == LoadInst)
LastLoad = LoadInst->getPrevNode()->getPrevNode();
getBaseOperand(LastLoad).setIsKill(LoadBase.isKill());
}
if (StoreBase.isReg()) {
MachineInstr *StInst = StoreInst;
- if (StorePrevNonDbgInstr == LoadInst)
+ if (StorePrevNonMetaInstr == LoadInst)
StInst = LoadInst;
getBaseOperand(StInst->getPrevNode()).setIsKill(StoreBase.isKill());
}
OpenPOWER on IntegriCloud