[llvm-dev] Regarding Dependence distance dump (original) (raw)

Venkataramanan Kumar via llvm-dev llvm-dev at lists.llvm.org
Fri Sep 21 07:57:46 PDT 2018


Hi Sebastian,

Given that "delinerization" fails shall I file a PR in bugzilla?

regards, Venkat,

On Thu, 20 Sep 2018 at 09:57, Venkataramanan Kumar < venkataramanan.kumar.llvm at gmail.com> wrote:

Hi Sebastian ,

On Thu, 20 Sep 2018 at 03:57, Sebastian Pop <sebpop at gmail.com> wrote:

On Wed, Sep 19, 2018 at 4:58 AM Venkataramanan Kumar <_ _venkataramanan.kumar.llvm at gmail.com> wrote: Hi, I tired to see when this behavior changed in LLVM. It seems to start from. --snip-- commit 95e5d37d5868ebde2302bc302c1e0af407c5646d Author: Sebastian Pop <sebpop at gmail.com> Date: Tue Mar 6 21:55:59 2018 +0000 DA: remove uses of GEP, only ask SCEV --snip-- https://reviews.llvm.org/D35430 Review URL says "GEP" based approach was wrong for multidimensional array references. The LLVM-DA now uses SCEV representation. But why we are not getting the distance with SCEV? Current DA will not work for multidimensional arrays? It should work with delinearization of multi-dim arrays. I thought "delinearization" is enabled by default on trunk now.

I need to get dependence distance for a transformation that I am working on. How do I get distance for such cases, esp multidimensional arrays? Thanks and regards, Venkat. On Tue, 18 Sep 2018 at 19:00, Venkataramanan Kumar <_ _venkataramanan.kumar.llvm at gmail.com> wrote: Hi, For the below test case, I need the dependence distance between the array references "a[j][i]" and "a[j-1][i-2]". --Snip-- int a[5][5]; int b[10]; void test() { _for (int j=1;j<5;j++)_ _for (int i=2;i<5;i++)_ _{_ _a[j][i] = 3.0;_ _b[i]= a[j-1][i-2] ;_ _}_ _}_ _--Snip-_ _Compile steps_ _clang -O1 -emit-llvm -S test.c_ _opt -analyze -da dist.ll_ _you are missing the -delinearize flag to opt._ _Tried this flag and I am getting_ _opt -analyze -delinearize -da dist.ll_ _--Snip--_ _Delinearization on function test:_ _Inst: %arrayidx6 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x_ _i32]]* @a, i64 0, i64 %indvars.iv30, i64 %indvars.iv_ _In Loop with Header: for.body4_ _AccessFunction: 0_ _failed to delinearize_ _Inst: %arrayidx6 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x_ _i32]]* @a, i64 0, i64 %indvars.iv30, i64 %indvars.iv_ _In Loop with Header: for.cond1.preheader_ _AccessFunction: 0_ _failed to delinearize_ _....._ _--Snip--_ _regards._ _Venkat._ _I tried dumping the dependence information with LLVM trunk (20180917),_ _it shows:_ _Printing analysis 'Dependence Analysis' for function 'test':_ _da analyze - none!_ _da analyze - flow [< <>]! <== dumps direction vector_ _da analyze - none!_ _da analyze - none!_ _da analyze - none!_ _da analyze - consistent output [S 0]!_ _LLVM Release 6.0.1 dumps the expected distance._ _Printing analysis 'Dependence Analysis' for function 'test':_ _da analyze - none!_ _da analyze - consistent flow [1 2]!_ _da analyze - none!_ _da analyze - none!_ _da analyze - none!_ _da analyze - consistent output [S 0]!_ _In trunk, it is now showing directions instead of distances._ _How to get the dependence distance?_ _regards,_ _Venkat._ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180921/635e1ee8/attachment.html>



More information about the llvm-dev mailing list