[PATCH] Enable ExitValue rewrite only when expansion cost is low.

Wei Mi wmi at google.com
Wed May 20 15:38:47 PDT 2015


> Does this only apply when the loop otherwise has side effects? If the loop can be removed once the exit value is unused, maybe we should do it anyway?


Yes, it makes sense, although it will increase the code complexity a little bit. I think it can be done like this: The loop can be removed only when all the phi nodes in exitBB with incoming values from the loop can be rewritten. We need to hold the transformations of all the phi in every ExitBB of the loop, get the information whether the loop can be removed, then do the transformation for all the phi in the end.

I will get a new patch to implement it.


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D9800

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






More information about the llvm-commits mailing list