Type legalization of call and return

Hi,

In LLVM, responsibility of legalizing all the illegal types lies on type legalizer.

Why is type legalization of ISD::CALL (call arguments and call return) and ISD::RET nodes being done much earlier?

(e.g. for call in visitCall – through function LowerCallTo)

Regards

Sachin

Hi,

In LLVM, responsibility of legalizing all the illegal types lies on type
legalizer.

Why is type legalization of ISD::CALL (call arguments and call return)
and ISD::RET nodes being done much earlier?

(e.g. for call in visitCall - through function LowerCallTo)

I don't know. Perhaps the legal version is needed very early on?
Maybe Chris can answer?

Ciao,

Duncan.

Hi,

In LLVM, responsibility of legalizing all the illegal types lies on type
legalizer.

Why is type legalization of ISD::CALL (call arguments and call return)
and ISD::RET nodes being done much earlier?

(e.g. for call in visitCall - through function LowerCallTo)

I don't know. Perhaps the legal version is needed very early on?
Maybe Chris can answer?

Types of arguments and return values have to be correct in order to meet calling convention specifications.

Evan

Types of arguments and return values have to be correct in order to
meet calling convention specifications.

And calling convention info is needed before LegalizeTypes runs?

Ciao,

Duncan.