This is an archive of the discontinued LLVM Phabricator instance.

[Attributor] Use abstract call sites to determine associated arguments
ClosedPublic

Authored by jdoerfert on Sep 24 2019, 11:21 PM.

Details

Summary
Summary:
This is the second step after D67871 to make use of abstract call sites.
In this patch the argument we associate with a abstract call site
argument can be the one in the callback callee instead of the one in the
callback broker.

Caveat: We cannot allow no-alias arguments for problematic callbacks:
As described in [1], adding no-alias (or restrict) to arguments could
break synchronization as the synchronization effect, e.g., a barrier,
does not "alias" with the pointer anymore. This disables no-alias
annotation for potentially problematic arguments until we implement the
fix described in [1].

Reviewers: sstefan1, uenoku

Subscribers: hiraditya, bollu, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D68008

[1] Compiler Optimizations for OpenMP, J. Doerfert and H. Finkel,
    International Workshop on OpenMP 2018,
    http://compilers.cs.uni-saarland.de/people/doerfert/par_opt18.pdf

Diff Detail

Event Timeline

jdoerfert created this revision.Sep 24 2019, 11:21 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 24 2019, 11:21 PM
jdoerfert updated this revision to Diff 224255.Oct 9 2019, 11:14 PM

Add no-alias restriction and test

jdoerfert edited the summary of this revision. (Show Details)Oct 9 2019, 11:17 PM
jdoerfert updated this revision to Diff 224769.Oct 12 2019, 9:56 PM
jdoerfert edited the summary of this revision. (Show Details)

Fixes and check line update

uenoku added inline comments.Nov 7 2019, 10:35 PM
llvm/lib/Transforms/IPO/Attributor.cpp
209–219

I couldn't understand this part. Is it sound to return an argument of the callback callee we have found first?

jdoerfert marked an inline comment as done.Nov 7 2019, 10:42 PM
jdoerfert added inline comments.
llvm/lib/Transforms/IPO/Attributor.cpp
209–219

You are right. I'll add code to ensure we do not return a callback callee argument if there is not a unique one mapped to the requested call site argument.

jdoerfert marked an inline comment as done.Dec 11 2019, 3:22 PM

@uenoku @sstefan1 any other comments on this one?

uenoku accepted this revision.Dec 17 2019, 11:12 AM

LGTM

This revision is now accepted and ready to land.Dec 17 2019, 11:12 AM
This revision was automatically updated to reflect the committed changes.