[PATCH] D41361: [SimplifyCFG] Avoid quadratic on a predecessors number behavior in instruction sinking.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 20 12:29:13 PST 2017


efriedma added a comment.

> I don't think SimplifyCFG makes any other changes, but the test isn't for SimplifyCFG - as far as I understand it, it's for instructions we generate in the backend. The test was just written to trigger some specific situation, and with this change it stopped triggering it.

Yes, I'm not really worried about that aspect; I'm more concerned that the transform somehow isn't triggering in cases where it should.

I just tried digging a bit; it looks like the generated code is worse, particularly for avoid-cpsr-rmw.ll.  I'm not sure that's really the fault of this patch, exactly... it looks like the sinking does in fact happen, but the end result is different because of related transforms.  Looks like it's exposing a bad heuristic elsewhere?


https://reviews.llvm.org/D41361





More information about the llvm-commits mailing list