[PATCH] D55974: [GVN] Update BlockRPONumber prior to use.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 8 15:40:45 PST 2019


efriedma added a comment.

Thinking about it a bit more, I think I'd prefer to put the change to make EnablePRE control PRE for GEPs in a separate patch.  That will make it clear what's happening, and it could affect performance for anyone using that setting.

It should be straightforward to find a testcase where the old code would have used incorrect RPO numbers, even if EnablePRE isn't overridden; just add an assertion like `assert(BlockRPONumber.count(P) && BlockRPONumber.count(CurrentBlock);` to GVN::performScalarPRE, and run that compiler over some code.  Actually, maybe worth adding that assert anyway.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55974/new/

https://reviews.llvm.org/D55974





More information about the llvm-commits mailing list