Page MenuHomePhabricator

[OpenMP] Add OpenMPOpt as a Module pass
ClosedPublic

Authored by jhuber6 on Mar 23 2021, 11:20 AM.

Details

Summary

This patch registers OpenMPOpt as a Module pass in addition to a CGSCC
pass. This is so certain optimzations that are sensitive to intact
call-sites can happen before inlining. The old openmpopt pass name is
changed to openmp-opt-cgscc and openmp-opt calls the Module pass
which has limited functionality currently.

Diff Detail

Event Timeline

jhuber6 created this revision.Mar 23 2021, 11:20 AM
jhuber6 requested review of this revision.Mar 23 2021, 11:20 AM

This needs PhaseOrdering test

jhuber6 updated this revision to Diff 332743.Mar 23 2021, 11:32 AM

Forgot to format.

jhuber6 updated this revision to Diff 332783.Mar 23 2021, 1:57 PM

Changed the pass registration to happen before the Attributor pass to avoid function specialization. Added a PhaseOrdering test that won't pass without the module pass.

jdoerfert accepted this revision.Mar 23 2021, 5:37 PM

Can you precommit the llvm/test/Transforms/PhaseOrdering/openmp-opt-module.ll test so we can see what changed.

Generally looks good to me otherwise.

llvm/test/Transforms/OpenMP/values_in_offload_arrays.ll
1–2

make two run lines, here and elsewhere if applicable

This revision is now accepted and ready to land.Mar 23 2021, 5:37 PM
jhuber6 updated this revision to Diff 338616.Mon, Apr 19, 1:18 PM
jhuber6 edited the summary of this revision. (Show Details)

Changing the OpenMPOpt module pass to only run selected optimizations. Removed the module pass version from most of the tests, more tests will be added once there are additional uses for the module pass.

jhuber6 updated this revision to Diff 338879.Tue, Apr 20, 8:24 AM

Fixing tests.

This revision was automatically updated to reflect the committed changes.