[llvm-dev] Differentiate array access at IR level

Michael Kruse via llvm-dev llvm-dev at lists.llvm.org
Tue Feb 18 09:26:39 PST 2020


Note that a[i] are a[i-1] are accessing the same memory addresses,
just not in the same loop iteration. You may want to look into
DependenceInfo.

Michael

Am Mo., 17. Feb. 2020 um 00:04 Uhr schrieb Michael Meng via llvm-dev
<llvm-dev at lists.llvm.org>:
>
> Hi LLVM community,
>
> I am trying to differentiate access to different array elements, for example:
>
> for (int i = 1; i < 10; i++) {
>
>     a[i] = a[i] + 10;
>
>      b[i] = a[i - 1]  * 2;
>
> }
>
> If it is possible to tell it loads/stores 3 different array elements: a[i], b[i] and a[i - 1] at IR level?
>
>
> Thanks for your time in advance!
>
>
> Best,
> Michael
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev


More information about the llvm-dev mailing list