[PATCH] D86864: [MachineSinking] sink more profitable loads

ChenZheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 2 03:47:11 PDT 2020


shchenz added a comment.

In D86864#2250785 <https://reviews.llvm.org/D86864#2250785>, @efriedma wrote:

> Do we need some threshold to limit the analysis?  I'm worried this could get very expensive.

I add a new cache to save compiling time. Could you be more specific on how to add the threshold? Thanks.



================
Comment at: llvm/lib/CodeGen/MachineSink.cpp:890
+    return true;
+
+  // Does these two blocks pair cache as no store before?
----------------
efriedma wrote:
> Are the post-dominance checks necessary?  I'm not sure what invariants you're trying to enforce.
they are not necessary. I add the post-dominance check for the convenience of finding all blocks which are in the path from block From to To.
With these checks, it is easy to judge if a block BB(reachable from From) is in the path from From to To. Just check `PDT->dominates(To, BB))`
`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86864



More information about the llvm-commits mailing list