[LLVMdev] Unused argument registers can not be reused ?

Jakob Stoklund Olesen stoklund at 2pi.dk
Thu Jun 3 10:39:05 PDT 2010


On Jun 3, 2010, at 6:33 AM, Arnaud Allard de Grandmaison wrote:

> While migrating my codebase from llvm-2.6 to llvm-2.7, I found a different behaviour in the register allocation. I have been able to reproduce it using the msp430 backend, with the 2.7 release as well as the svn head.
>  
> For the msp430, the first four parameters of a function are passed thru registers. What I observe is that if those parameters are not used inside the function, those registers can not be used.

It looks like you found a bug, R12-R15 should be usable inside the function.

Please file a PR against the code generator.

I think that unused arguments shouldn't have been marked live in at all.

Thanks,
/jakob





More information about the llvm-dev mailing list