Support call ABI. For now only Linux C and X86_64_SysV calling conventions supported. Variadic function not supported.
Details
Diff Detail
- Build Status
Buildable 7902 Build 7902: arc lint + arc unit
Event Timeline
| lib/Target/X86/X86CallLowering.cpp | ||
|---|---|---|
| 300 | Since you do not modify OrigArg you can define it as const & | |
| 317 | Could you please add a test that checks the case where the callee is a register? | |
| 324 | typo arguments | |
| 327 | Please consider having a separate method for handling call results. | |
| 344 | Could you please document the immediate additions? | |
| test/CodeGen/X86/GlobalISel/callingconv.ll | ||
| 184 | Could you please add tests that exercise arguments and return values that are spitted (like structures)? | |
| lib/Target/X86/X86CallLowering.cpp | ||
|---|---|---|
| 317 | test_indirect_call cover this case | |
| lib/Target/X86/X86CallLowering.cpp | ||
|---|---|---|
| 77 | You don't realy need to pass the DataLayout. MachineFunction &MF = MIRBuilder.getMF(); Same goes for STI. | |
| 84 | Consider calling DL.getPointerSizeOnBits(0) once and assign it to a variable | |
| 109 | Please don't submit commented code | |
| 122 | Since you don't handle variadic functions, an assert should be added before returning true | |
- Fix according to comments and rebase.
| lib/Target/X86/X86CallLowering.cpp | ||
|---|---|---|
| 122 | I need graceful fallback to DAGSEL in case something not supported yet. Eventually it should be supported. | |
| lib/Target/X86/X86CallLowering.cpp | ||
|---|---|---|
| 130 | I am not sure why you made this members as public but i believe that they should be private as no one outside the class scope should change them. It is especially important for non const members. | |
| test/CodeGen/X86/GlobalISel/callingconv.ll | ||
| 3–4 | Remove --check-prefix=X64_GISEL which is not needed. | |
| 184 | Where are the tests for returned/passed structures? | |
| test/CodeGen/X86/GlobalISel/callingconv.ll | ||
|---|---|---|
| 184 | struct not supported yet. | |
You don't realy need to pass the DataLayout.
You can get it from the MIRBuilder, something like this:
MachineFunction &MF = MIRBuilder.getMF();
auto &DL = MF.getDataLayout();
Same goes for STI.