[PATCH] [Polly] Support ModRef function behaviour

Hal Finkel hfinkel at anl.gov
Wed Sep 10 11:39:51 PDT 2014


----- Original Message -----
> From: "Johannes Doerfert" <doerfert at cs.uni-saarland.de>
> To: doerfert at cs.uni-saarland.de, sebpop at gmail.com, simbuerg at fim.uni-passau.de, dpeixott at codeaurora.org,
> tobias at grosser.es
> Cc: llvm-commits at cs.uiuc.edu
> Sent: Wednesday, September 10, 2014 1:32:32 PM
> Subject: Re: [PATCH] [Polly] Support ModRef function behaviour
> 
> >>! In D5227#11, @dpeixott wrote:
> >>>! In D5227#10, @jdoerfert wrote:
> >>>>! In D5227#7, @dpeixott wrote:
> >>> As far as I know detailed mod-ref-behaviour is currently only
> >>> returned in the case of intrinsic functions. These functions are
> >>> defined with the appropriate values and tablegen generates some
> >>> code to return the correct values. You could use an intrinsic
> >>> function in your test (e.g. llvm.prefetch).
> >> 
> >> Unfortunatly I cannot export the "onlyReadsArgumentPointees" of
> >> llvm.prefetch to IR... it gets overaproximated to
> >> "onlyReadsMemory" for now.
> > 
> > You could try the llvm.gcread (OnlyReadsArgumentPointes) and
> > llvm.gcwrite (OnlyAccessesArgumentPointers) if you want to
> > generate a test case. There are also a number of target-specific
> > intrinsics you could use (e.g. llvm.arm.neon.vld1
> >  (OnlyReadsArgumentPointes) llvm.arm.neon.vst1
> >  (OnlyAccessesArgumentPointers)). An easy way find them is to
> > check include/llvm/IR/Intrinsics.gen in the build directory.
> 
> Same problem as for prefetch, they have the attibute only between the
> time they are created and written to IR. In LLVM-IR there is yet no
> onlyReadsArgumentPointees or onlyAccessesArgumentPointees. The first
> attribute gets lowered to onlyReads and the second one will be lost
> in LLVM-IR.
> I talked to Hal about this and offered to help add the new attributes
> to the IR, maybe I should ping him again.

Sure, but I don't understand your statement. You can get at this information at the IR level by using ModRefBehavior getModRefBehavior(ImmutableCallSite CS) or ModRefBehavior getModRefBehavior(const Function *F) functions from AliasAnalysis. BasicAA does understand the properties of these intrinsics.

 -Hal

> 
> http://reviews.llvm.org/D5227
> 
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 

-- 
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory



More information about the llvm-commits mailing list