summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/GlobalISel/GISelChangeObserver.cpp
diff options
context:
space:
mode:
authorAmara Emerson <aemerson@apple.com>2019-04-13 00:33:25 +0000
committerAmara Emerson <aemerson@apple.com>2019-04-13 00:33:25 +0000
commit93e58d239667294e3699ff9b6aaa2ec0353b82fb (patch)
tree7d4a2129edc3bd99c763982ff68272aa46ffc46b /llvm/lib/CodeGen/GlobalISel/GISelChangeObserver.cpp
parent4614cc3dfd2b735ff9292c7867910219d509d970 (diff)
downloadbcm5719-llvm-93e58d239667294e3699ff9b6aaa2ec0353b82fb.tar.gz
bcm5719-llvm-93e58d239667294e3699ff9b6aaa2ec0353b82fb.zip
[AArch64][GlobalISel] Enable copy elision in the pre-legalizer combine and fix a crash.
This enables the simple copy combine that already exists in the CombinerHelper. However, it exposed a bug in the GISelChangeObserver where it wouldn't clear a set of MIs to process, and so would end up causing a crash when deleted MIs were being added to the combiner worklist again. Differential Revision: https://reviews.llvm.org/D60579 llvm-svn: 358318
Diffstat (limited to 'llvm/lib/CodeGen/GlobalISel/GISelChangeObserver.cpp')
-rw-r--r--llvm/lib/CodeGen/GlobalISel/GISelChangeObserver.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/GISelChangeObserver.cpp b/llvm/lib/CodeGen/GlobalISel/GISelChangeObserver.cpp
index 5a532c995ce..62b903c30b8 100644
--- a/llvm/lib/CodeGen/GlobalISel/GISelChangeObserver.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/GISelChangeObserver.cpp
@@ -26,6 +26,7 @@ void GISelChangeObserver::changingAllUsesOfReg(
void GISelChangeObserver::finishedChangingAllUsesOfReg() {
for (auto *ChangedMI : ChangingAllUsesOfReg)
changedInstr(*ChangedMI);
+ ChangingAllUsesOfReg.clear();
}
RAIIDelegateInstaller::RAIIDelegateInstaller(MachineFunction &MF,
OpenPOWER on IntegriCloud