This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Fix insertion point for deduplicated runtime call to honor def-use order

Authored by wenlei on Feb 24 2020, 11:35 PM.



A recently added OpenMP optimization pass (D69930) tries to deduplicate omp runtime calls by merging the calls and insert a new one in entry block. However the insertion didn't honor def-use chain of parameters, so it can introduce use-before-def. This change fixed the problem by taking def-use into account for finding insertion point of the merged runtime call.

Event Timeline

wenlei created this revision.Feb 24 2020, 11:35 PM
jdoerfert requested changes to this revision.Feb 25 2020, 8:03 AM

This was reported as PR44893, and will be fixed by

This revision now requires changes to proceed.Feb 25 2020, 8:03 AM

@jdoerfert good to know it's being fixed - thanks! I saw that fix is accepted, do you plan to land it now, asking because this broke dozens of internal builds, so we want to resolve it asap - deciding whether to wait for your fix to go in or we need to port over your fix manually.

wenlei abandoned this revision.Feb 25 2020, 8:26 AM