[llvm-dev] Alias Analysis and backend specific memory intrinsic

Sumanth Gundapaneni via llvm-dev llvm-dev at lists.llvm.org
Mon Jan 29 08:24:30 PST 2018


 

Hi,

        I have a custom backend specific intrinsic with the signature  {i32,
i8*}<return value> {i8*, i32}<arguments>.

The intrinsic is similar to a post increment load but does some thing extra.

It returns the value that is loaded from the memory and the updates the base
pointer.

 

void foo (int *restrict ptr, int *output, int loaded_value, int N) {

   // This updates loaded_value and updates the ptr to ptr+N 

   ptr = intrinsic_call( ptr,&loaded_value, N);

   *output = N;

}

 

The ScheduleDAG creates an ordered memory dependency from the intrinsic_call
to the unrelated store from "output".

which is causing a performance degradation in my case. The value of "ptr" is
updated through

"extractvalue" and that makes it harder for the AA to identify the
underlying object and ends up with a "mayalias".

 

I have tried playing around with attributes to the intrinsic call and none
of them seem appropriate in my case.

Any pointers, ideas and suggestions would be most welcomed.

 

--Sumanth

 

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180129/672fdbb7/attachment.html>


More information about the llvm-dev mailing list