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

Matt Arsenault arsenm2 at gmail.com
Fri Jul 7 20:12:03 UTC 2017


> On Jul 6, 2017, at 19:02, Connor Abbott <cwabbott0 at gmail.com> wrote:
> 
> On Thu, Jul 6, 2017 at 6:36 PM, Matt Arsenault <arsenm2 at gmail.com> wrote:
>> 
>> On Jul 6, 2017, at 18:31, Connor Abbott <cwabbott0 at gmail.com> 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, but it doesn’t happen very often
> 
> Could we just bump the heuristic on maximum size there to match
> radeonsi? That way we wouldn't need to have these heuristics in
> radeonsi and radv. As-is, we're second-guessing the backend.

There’s also a vague plan to replace this with a machine level pass later that has more knowledge of register pressure. The current pass is pretty stupid and doesn’t even attempt to decide if it’s a good idea for a specific alloca.

-Matt


More information about the mesa-dev mailing list