[PATCH] Handle some cases of mismatched types in IRCE

hfinkel at anl.gov hfinkel at anl.gov
Fri Jan 23 04:58:44 PST 2015


In http://reviews.llvm.org/D7082#112586, @sanjoy wrote:

> > This sounds like a bug in indvars. Is it obvious how to fix it there?
>
>
> I think this is intentional -- `IndVarSimplify` has code to deal with this when verifying that the loop-backedge counts have not changed:
>
> https://github.com/llvm-mirror/llvm/blob/master/lib/Transforms/Scalar/IndVarSimplify.cpp#L2026


Intentional or not, I think this is a bad idea. The results of an analysis should not depend on what transformations were run previously, but only on the current state of the IR. Do you agree?

If nothing else, there should at least be a loud warning about it on the interface to getBackedgeTakenCount in ScalarEvolution.h. I'd rather fix this so that we can get the backedge count of the proper size (maybe we need a better updating interface in SE? -- IndVars seems to *have* the correct updated BETC).


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D7082

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list