There are cfgs which both of loop load pre and load pre can handle.
In this case, it could be better to perform loop load pre first because it can reduce the number of execution of load or it can help sccp pass propagate constant.
Paths
| Differential D108204
[GVN] Execute performLoopLoadPRE ahead of PerformLoadPRE ClosedPublic Authored by jaykang10 on Aug 17 2021, 6:05 AM.
Details Summary There are cfgs which both of loop load pre and load pre can handle. In this case, it could be better to perform loop load pre first because it can reduce the number of execution of load or it can help sccp pass propagate constant.
Diff Detail
Event TimelineComment Actions
Yep, done. Thanks for comment! This revision is now accepted and ready to land.Aug 22 2021, 12:49 PM This revision was landed with ongoing or failed builds.Aug 24 2021, 1:51 AM Closed by commit rGb52171629f56: [GVN] Execute performLoopLoadPRE ahead of PerformLoadPRE (authored by jaykang10). · Explain Why This revision was automatically updated to reflect the committed changes. Comment Actions It looks like this may cause a regression where we fail to remove some dead code https://github.com/llvm/llvm-project/issues/53322 @jaykang10 it would be great if you could take a look
Revision Contents
Diff 368304 llvm/lib/Transforms/Scalar/GVN.cpp
llvm/test/Transforms/GVN/gvn-loop-load-pre-order.ll
|