Page MenuHomePhabricator

[GVN] Execute performLoopLoadPRE ahead of PerformLoadPRE

Authored by jaykang10 on Aug 17 2021, 6:05 AM.



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.

It fixes

Diff Detail

Unit TestsFailed

60 msx64 windows > Flang.Driver::output-paths.f90
Script: -- : 'RUN: at line 6'; not c:\ws\w3\llvm-project\premerge-checks\build\bin\flang-new.exe -fc1 -E -o C:\ws\w3\llvm-project\premerge-checks\build\tools\flang\test\Driver\Output\output-paths.f90.tmp.doesnotexist/somename C:\ws\w3\llvm-project\premerge-checks\flang\test\Driver\output-paths.f90 2> C:\ws\w3\llvm-project\premerge-checks\build\tools\flang\test\Driver\Output\output-paths.f90.tmp

Event Timeline

jaykang10 created this revision.Aug 17 2021, 6:05 AM
jaykang10 requested review of this revision.Aug 17 2021, 6:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 17 2021, 6:05 AM
nikic added a subscriber: nikic.Aug 19 2021, 12:27 PM

Could you please pre-commit the test, so the difference becomes visible?

jaykang10 updated this revision to Diff 367736.Aug 20 2021, 1:56 AM

Updated test output with pre-committed test.

Could you please pre-commit the test, so the difference becomes visible?

Yep, done. Thanks for comment!

nikic accepted this revision.Aug 22 2021, 12:49 PM


This revision is now accepted and ready to land.Aug 22 2021, 12:49 PM

@nikic Thanks for updating code. Let me push this change.

This revision was landed with ongoing or failed builds.Aug 24 2021, 1:51 AM
This revision was automatically updated to reflect the committed changes.
fhahn added a comment.Feb 4 2022, 10:07 AM

It looks like this may cause a regression where we fail to remove some dead code

@jaykang10 it would be great if you could take a look