[PATCH] D83523: MachineSink: permit sinking into INLINEASM_BR indirect targets
Bill Wendling via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 12 20:03:10 PDT 2020
void added a comment.
Here are a few other places to contemplate similar changes:
diff --git a/llvm/lib/CodeGen/MachineCSE.cpp b/llvm/lib/CodeGen/MachineCSE.cpp
index 09531276bc1..a6873c7acba 100644
--- a/llvm/lib/CodeGen/MachineCSE.cpp
+++ b/llvm/lib/CodeGen/MachineCSE.cpp
@@ -404,6 +404,7 @@ bool MachineCSE::isCSECandidate(MachineInstr *MI) {
// Ignore stuff that we obviously can't move.
if (MI->mayStore() || MI->isCall() || MI->isTerminator() ||
+ MI->getOpcode() == TargetOpcode::INLINEASM_BR ||
MI->mayRaiseFPException() || MI->hasUnmodeledSideEffects())
return false;
diff --git a/llvm/lib/CodeGen/ReachingDefAnalysis.cpp b/llvm/lib/CodeGen/ReachingDefAnalysis.cpp
index 5bd8b4b8e27..90e829c925e 100644
--- a/llvm/lib/CodeGen/ReachingDefAnalysis.cpp
+++ b/llvm/lib/CodeGen/ReachingDefAnalysis.cpp
@@ -519,6 +519,7 @@ MachineInstr* ReachingDefAnalysis::getLocalLiveOutMIDef(MachineBasicBlock *MBB,
static bool mayHaveSideEffects(MachineInstr &MI) {
return MI.mayLoadOrStore() || MI.mayRaiseFPException() ||
MI.hasUnmodeledSideEffects() || MI.isTerminator() ||
+ MI.getOpcode() == TargetOpcode::INLINEASM_BR ||
MI.isCall() || MI.isBarrier() || MI.isBranch() || MI.isReturn();
}
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83523/new/
https://reviews.llvm.org/D83523
More information about the llvm-commits
mailing list