[PATCH] D12170: Const propagatin after hitting assume bugfix

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 20 19:31:50 PDT 2015


dberlin added a comment.

I assume you are hitting this in switch statements or something similar.  I triggered the same in NewGVN.

Note that the comment in dominates is simply wrong.
I discussed with this Rafael (who added this). The callers can, in fact, do *nothing* different than what the function would have to do, and in fact, would have to duplicate a ton of complicated critical edge logic that Dominates handles.  That seems really bad to me.

Nowhere else in LLVM do we *assert* because a very dumb caller may cause a performance problem.
The right fix here is to  simply remove the assert, and make sure your caller is smart about not calling this unnecessarily.

(IE cache the value of edge domination in cases like this).


http://reviews.llvm.org/D12170





More information about the llvm-commits mailing list