diff options
author | Sam Parker <sam.parker@arm.com> | 2020-09-30 09:36:57 +0100 |
---|---|---|
committer | Sam Parker <sam.parker@arm.com> | 2020-09-30 09:37:24 +0100 |
commit | 779a8a028f53f16234b41e5252b805304788b989 (patch) | |
tree | f71d5ab1021a0c45b8d443e610da753ee16bd7b7 /llvm/lib/CodeGen/ReachingDefAnalysis.cpp | |
parent | 8392685c2b9f3c2025100dd25b6c6e5eae312d92 (diff) | |
download | llvm-779a8a028f53f16234b41e5252b805304788b989.zip llvm-779a8a028f53f16234b41e5252b805304788b989.tar.gz llvm-779a8a028f53f16234b41e5252b805304788b989.tar.bz2 |
[ARM][LowOverheadLoops] TryRemove helper.
Make a helper function that wraps around RDA::isSafeToRemove and
utilises the existing DCE IT block checks.
Diffstat (limited to 'llvm/lib/CodeGen/ReachingDefAnalysis.cpp')
-rw-r--r-- | llvm/lib/CodeGen/ReachingDefAnalysis.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/ReachingDefAnalysis.cpp b/llvm/lib/CodeGen/ReachingDefAnalysis.cpp index 63989bd..e94e547 100644 --- a/llvm/lib/CodeGen/ReachingDefAnalysis.cpp +++ b/llvm/lib/CodeGen/ReachingDefAnalysis.cpp @@ -635,6 +635,9 @@ void ReachingDefAnalysis::collectKilledOperands(MachineInstr *MI, InstSet &Dead) const { Dead.insert(MI); auto IsDead = [this, &Dead](MachineInstr *Def, int PhysReg) { + if (mayHaveSideEffects(*Def)) + return false; + unsigned LiveDefs = 0; for (auto &MO : Def->operands()) { if (!isValidRegDef(MO)) |