[PATCH] D11768: FastISel fails to remove dead code

Hans Wennborg via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 18 13:08:17 PDT 2015


hans added a comment.

This seems reasonable, but I don't know this code well enough to feel comfortable signing off here.

I'm afraid you'll have to get Eric or someone else to take a look.


================
Comment at: lib/CodeGen/SelectionDAG/FastISel.cpp:1330
@@ -1329,2 +1329,3 @@
 bool FastISel::selectInstruction(const Instruction *I) {
+  MachineInstr *SaveLastLocalValue = getLastLocalValue();
   // Just before the terminator instruction, insert instructions to
----------------
How about SavedLastLocalValue, to make the name a noun?

================
Comment at: test/CodeGen/X86/fast-isel-deadcode.ll:15
@@ +14,3 @@
+
+define zeroext i1 @_Z3fooee(x86_fp80 %x, x86_fp80 %y) {
+entry:
----------------
Let's pretend the code above was C code and just call this "foo". Same thing for "_Z3bare" below: I'd just call it "bar".

================
Comment at: test/CodeGen/X86/fast-isel-deadcode.ll:38
@@ +37,3 @@
+
+; CHECK: movb $1
+; CHECK-NOT: movb $1
----------------
I would probably have a CHECK-LABEL, and move these lines closer to the IR that they're generated from.

As it is now, the reader only sees "check that movb $1 isn't followed by another movb $1", and that really doesn't provide much of a clue to what's going on.


http://reviews.llvm.org/D11768





More information about the llvm-commits mailing list