i128 backend or frontend lowering

I am seeing i128 from llvm-gcc on Alpha. I know the calling
convention for them, they are split into two registers, but I don't
know if that should be handled in the frontend or the backend. I
would just as soon do it in the backend, but I didn't see any support
in the new calling convention work for automatically splitting an
argument into multiple registers.

Is the backend the best place to do this or should I attempt to make
llvm-gcc not generate i128 in the first place?

e.g. I need to convert foo(i128) -> foo(i64 (low bits), i64 (high bits))

Andrew

As far as I can tell, i128 already works the way you want it to... is
there some case which isn't generating the right code?

-Eli

Hello, Andrew

Is the backend the best place to do this or should I attempt to make
llvm-gcc not generate i128 in the first place?

It depends whether i128 is a native type for alpha, or not. If it's
not - frontend should not generate it. If it's native type then it
might be useful just to declare new regclass with virtual 'wide'
registers consist of register pairs and then just handle i128 as a
type for such register pairs.

Not native. That is what I was afraid of.

Andrew

No, CodeGen will legalize types like i128 by expanding them into
multiple registers, and this includes the calling-convention code
(both new and old). The arguments and return values are communicated
between target independent code and target dependent code in
register-sized pieces. I'll add some comments to describe this better.

Dan