Re: [Mesa-dev] [PATCH 3/6] ac/nir: rewrite local variable handling

2017-07-07 Thread Matt Arsenault
> On Jul 6, 2017, at 19:02, Connor Abbott wrote: > > On Thu, Jul 6, 2017 at 6:36 PM, Matt Arsenault wrote: >> >> On Jul 6, 2017, at 18:31, Connor Abbott wrote: >> >> After looking into it some more, I think LLVM won't promote allocas to >> registers at all when there are non-constant indices

Re: [Mesa-dev] [PATCH 3/6] ac/nir: rewrite local variable handling

2017-07-06 Thread Connor Abbott
On Thu, Jul 6, 2017 at 6:36 PM, Matt Arsenault wrote: > > On Jul 6, 2017, at 18:31, Connor Abbott wrote: > > After looking into it some more, I think LLVM won't promote allocas to > registers at all when there are non-constant indices in the mix, and > fixing it seems kinda involved. I guess a be

Re: [Mesa-dev] [PATCH 3/6] ac/nir: rewrite local variable handling

2017-07-06 Thread Matt Arsenault
> On Jul 6, 2017, at 18:31, Connor Abbott wrote: > > After looking into it some more, I think LLVM won't promote allocas to > registers at all when there are non-constant indices in the mix, and > fixing it seems kinda involved. I guess a better solution for now AMDGPUPromoteAlloca does this, b

Re: [Mesa-dev] [PATCH 3/6] ac/nir: rewrite local variable handling

2017-07-06 Thread Connor Abbott
On Thu, Jul 6, 2017 at 2:18 PM, Connor Abbott wrote: > On Thu, Jul 6, 2017 at 2:01 PM, Bas Nieuwenhuizen > wrote: >> On Thu, Jul 6, 2017 at 9:48 PM, Connor Abbott >> wrote: >>> From: Connor Abbott >>> >>> The old way was very TGSI-based, and couldn't handle indirect >>> dereferences at all. In

Re: [Mesa-dev] [PATCH 3/6] ac/nir: rewrite local variable handling

2017-07-06 Thread Connor Abbott
On Thu, Jul 6, 2017 at 2:01 PM, Bas Nieuwenhuizen wrote: > On Thu, Jul 6, 2017 at 9:48 PM, Connor Abbott > wrote: >> From: Connor Abbott >> >> The old way was very TGSI-based, and couldn't handle indirect >> dereferences at all. Instead, pass through the type information NIR has > > I think the

Re: [Mesa-dev] [PATCH 3/6] ac/nir: rewrite local variable handling

2017-07-06 Thread Bas Nieuwenhuizen
On Thu, Jul 6, 2017 at 9:48 PM, Connor Abbott wrote: > From: Connor Abbott > > The old way was very TGSI-based, and couldn't handle indirect > dereferences at all. Instead, pass through the type information NIR has I think the old code should handle indirect derefs just fine? See the indir_index

[Mesa-dev] [PATCH 3/6] ac/nir: rewrite local variable handling

2017-07-06 Thread Connor Abbott
From: Connor Abbott The old way was very TGSI-based, and couldn't handle indirect dereferences at all. Instead, pass through the type information NIR has about local variables to LLVM, and translate NIR dereferences directly into the equivalent GEP instructions in LLVM. --- src/amd/common/ac_nir