[PATCH] [Polly] Support ModRef function behaviour

Johannes Doerfert doerfert at cs.uni-saarland.de
Wed Sep 10 11:32:32 PDT 2014


>>! 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.

http://reviews.llvm.org/D5227






More information about the llvm-commits mailing list