Add support for lowering pointer arguments.
Changing type from pointer to integer is already done in MipsTargetLowering::getRegisterTypeForCallingConv.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Target/Mips/MipsCallLowering.cpp | ||
---|---|---|
189 ↗ | (On Diff #155852) | Maybe a stupid question - why does this function return true for pointer types of any size (32/64) and the only size of integer type (32)? |
lib/Target/Mips/MipsCallLowering.cpp | ||
---|---|---|
189 ↗ | (On Diff #155852) | As MipsCallLowering class is incomplete, it can only lower i32 and pointer arguments at this moment. |
lib/Target/Mips/MipsCallLowering.cpp | ||
---|---|---|
189 ↗ | (On Diff #155852) | What happens if we try to generate 64-bit code with 64-bit pointers - will the isSupportedType be called or not? |
lib/Target/Mips/MipsCallLowering.cpp | ||
---|---|---|
189 ↗ | (On Diff #155852) | In that case isSupportedType will be called, later TLI.getRegisterTypeForCallingConv will change pointer type to appropriate integer type(i64 in this case) and forward it to the calling convention. |
LGTM
lib/Target/Mips/MipsCallLowering.cpp | ||
---|---|---|
189 ↗ | (On Diff #155852) | Thanks for the explanation. I just want to be sure that we cannot silently produce incorrect code. |