[PATCH] D56772: [MIR] Add simple PRE pass to MachineCSE

Anton Afanasyev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 26 14:17:09 PST 2019


anton-afanasyev marked an inline comment as done.
anton-afanasyev added inline comments.


================
Comment at: lib/CodeGen/MachineCSE.cpp:800
+      if (BB != nullptr && BB1 != nullptr &&
+          (isPotentiallyReachable(BB1, BB) ||
+           isPotentiallyReachable(BB, BB1))) {
----------------
hfinkel wrote:
> Are these calls expensive?
> 
> SingleSour.../Benchmarks/Misc-C++/Large/ray     0.68              0.74             7.6%
> 
> That 7% increase in compile time, and a few other others, look significant.
> 
> (Maybe there's something you can cache?)
I believe caching this gives nothing, cause two common subexpressions unlikely belong to the same basic blocks pair. 7% are only for one test among hundreds, there are also -5% and so on. I'm to run benchmarks again to compare results.


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

https://reviews.llvm.org/D56772





More information about the llvm-commits mailing list