[PATCH] D68898: JumpThreading: enhance JT to handle BB with no successor and address comparison

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 14 13:15:51 PDT 2019


efriedma added a comment.

> Handling what Wei's case will be a nice thing to have, but it may require more significant change in JT.

I think we need to have a plan for what this is going to look like, so the new code here doesn't immediately become obsolete.

> Another thing to consider is the cost model difference.

I think the necessary cost model is effectively the same for ret vs. other instructions.  In particular, the "ret" might go away after after inlining.



================
Comment at: lib/Transforms/Scalar/JumpThreading.cpp:2005
     LVI->enableDT();
   LVI->threadEdge(PredBB, BB, SuccBB);
 
----------------
I'm surprised threadEdge still works.  Probably want to update the documentation for that API if we really want to allow SuccBB to be null.


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

https://reviews.llvm.org/D68898





More information about the llvm-commits mailing list