[PATCH] D139582: [GVN] Improve PRE on load instructions

Guozhi Wei via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 8 17:27:35 PST 2022


Carrot updated this revision to Diff 481483.
Carrot added a comment.

Compile time improvement.

The original code checks all predecessors of LoadBB and find possible solution for all predecessors. And later checks if the solution is profitable. This versions checks if current solution is still profitable in the process of checking predecessors, and early exit if current solution is already non profitable.


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

https://reviews.llvm.org/D139582

Files:
  llvm/include/llvm/Transforms/Scalar/GVN.h
  llvm/lib/Transforms/Scalar/GVN.cpp
  llvm/test/Transforms/GVN/PRE/2011-06-01-NonLocalMemdepMiscompile.ll
  llvm/test/Transforms/GVN/PRE/pre-load.ll
  llvm/test/Transforms/GVN/PRE/volatile.ll
  llvm/test/Transforms/GVN/condprop.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139582.481483.patch
Type: text/x-patch
Size: 17800 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221209/d0c639b9/attachment.bin>


More information about the llvm-commits mailing list