[LLVMdev] Register Alias Sets

Chris Lattner sabre at nondot.org
Mon Apr 9 17:18:01 PDT 2007


On Mon, 9 Apr 2007, David Greene wrote:
>
>> Sure, but where these comparisons are needed, for example? RAX and
>> EAX alias sets intersect and that's enough to decide that these regs
>> can't be assigned simultaneously.
>
> One place these comparisons are used is to build a provably optimal
> register class tree in a Smith/Ramsey/Holloway allocator.  Building it
> algorithmically is portable to all architectures without requiring
> the person writing the machine-specific parts to care about what
> the register allocator does.

I strongly agree this is a good thing to do.  Ideally the target 
description stuff has no idea what algorithms the code generator is using.

> In any case I can work around the problem by building temporary
> alias sets, but that's ugly and wasteful.  It sounds like there
> are too many dependencies on the current specification to make
> changing it possible, though.

This sounds like you should just compute the sets you want 
(programatically) at the start of your pass.  Then your algorithm uses 
that info instead.  Why is this bad?

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/



More information about the llvm-dev mailing list