You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[CIR][CodeGen][LowerToLLVM] Set calling convention for call ops (#836)
This PR implements the CIRGen and Lowering part of calling convention
attribute of `cir.call`-like operations. Here we have **4 kinds of
operations**: (direct or indirect) x (`call` or `try_call`).
According to our need and feasibility of constructing a test case, this
PR includes:
* For CIRGen, only direct `call`. Until now, the only extra calling
conventions are SPIR ones, which cannot be set from source code manually
using attributes. Meanwhile, OpenCL C *does not allow* function pointers
or exceptions, therefore the only case remaining is direct call.
* For Lowering, direct and indirect `call`, but not any `try_call`.
Although it's possible to write all 4 kinds of calls with calling
convention in ClangIR assembly, exceptions is quite hard to write and
read. I prefer source-code-level test for it when it's available in the
future. For example, possibly C++ `thiscall` with exceptions.
* Extra: the verification of calling convention consistency for direct
`call` and direct `try_call`.
All unsupported cases are guarded by assertions or MLIR diags.
0 commit comments