diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2022-06-24 12:09:34 -0400 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2022-07-18 17:23:41 -0400 |
commit | 8d0383eb694e13a999c9c95adc4b56771429e551 (patch) | |
tree | d8a1bf195a3deb4dcc79f5f5036fbaf6f41c50c7 /llvm/lib/CodeGen/MachineCSE.cpp | |
parent | bf7f01d857eda2ea0753e92149c2941c7ad84bbc (diff) | |
download | llvm-8d0383eb694e13a999c9c95adc4b56771429e551.zip llvm-8d0383eb694e13a999c9c95adc4b56771429e551.tar.gz llvm-8d0383eb694e13a999c9c95adc4b56771429e551.tar.bz2 |
CodeGen: Remove AliasAnalysis from regalloc
This was stored in LiveIntervals, but not actually used for anything
related to LiveIntervals. It was only used in one check for if a load
instruction is rematerializable. I also don't think this was entirely
correct, since it was implicitly assuming constant loads are also
dereferenceable.
Remove this and rely only on the invariant+dereferenceable flags in
the memory operand. Set the flag based on the AA query upfront. This
should have the same net benefit, but has the possible disadvantage of
making this AA query nonlazy.
Preserve the behavior of assuming pointsToConstantMemory implying
dereferenceable for now, but maybe this should be changed.
Diffstat (limited to 'llvm/lib/CodeGen/MachineCSE.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineCSE.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineCSE.cpp b/llvm/lib/CodeGen/MachineCSE.cpp index e60fd9f..c6756b1 100644 --- a/llvm/lib/CodeGen/MachineCSE.cpp +++ b/llvm/lib/CodeGen/MachineCSE.cpp @@ -415,7 +415,7 @@ bool MachineCSE::isCSECandidate(MachineInstr *MI) { // Okay, this instruction does a load. As a refinement, we allow the target // to decide whether the loaded value is actually a constant. If so, we can // actually use it as a load. - if (!MI->isDereferenceableInvariantLoad(AA)) + if (!MI->isDereferenceableInvariantLoad()) // FIXME: we should be able to hoist loads with no other side effects if // there are no other instructions which can change memory in this loop. // This is a trivial form of alias analysis. |