[PATCH] D14080: [PowerPC] Add an MI SSA peephole pass.
Bill Schmidt via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 2 11:43:43 PST 2015
wschmidt added a comment.
Sorry it took me a while to get back to this. I'll make all suggested fixes except for the ToErase one, as noted.
================
Comment at: lib/Target/PowerPC/PPCMIPeephole.cpp:177
@@ +176,3 @@
+ if (ToErase) {
+ ToErase->eraseFromParent();
+ ToErase = nullptr;
----------------
hfinkel wrote:
> You need to make sure that the MI you want to erase does not have other users before you erase it.
That's not necessary here because I'm replacing the ToErase instruction with a different instruction that defines the same virtual register.
================
Comment at: lib/Target/PowerPC/PPCMIPeephole.cpp:208
@@ +207,3 @@
+
+ return lookThruCopyLike(CopySrcReg);
+}
----------------
hfinkel wrote:
> We should not use unbounded recursion without a good reason, and making this into a loop seems straightforward. Please make this loop instead.
>
>
Good point. Will do.
Repository:
rL LLVM
http://reviews.llvm.org/D14080
More information about the llvm-commits
mailing list