llvm / clangir

A new (MLIR based) high-level IR for clang.
https://clangir.org
Other
307 stars 84 forks source link

[CIR][ABI][NFC] Add CC lowering for void CallOps #668

Closed sitio-couto closed 3 weeks ago

sitio-couto commented 3 weeks ago

This patch implements the lowering of function calls that receive and return void. In practice, nothing has to be done (at least for the x86 ABI), so this case is used as a primer for the target lowering library since it helps populate the base logic for handling calling convention lowering of function calls.

sitio-couto commented 3 weeks ago

@bcardosolopes applied and answered.

I thought we had an agreement about the next PR being about merging the existing ABI

I understood that we would just move all ABI stuff to the same for now and unify them later. Regardless, it would be better to prime the library first and unify the ABI logic later to simplify the process.

please clarify the plans here?

My plan was to leave it as is until I have reached structs/pointers in the calling convention lowering pass. After that, I would start unifying the ABI logic updating stuff like VAArg lowering to follow codegen parity.

bcardosolopes commented 3 weeks ago

My plan was to leave it as is until I have reached structs/pointers in the calling convention lowering pass. After that, I would start unifying the ABI logic updating stuff like VAArg lowering to follow codegen parity.

My problem with that is if another PR shows up that needs to touch that part, we're gonna be creating more techinical debt. In that case we're gonna have to block those on top of your work, and I'd appreciate then if you are the one during the review and making sure the skeleton is appropriate, does that work for you?

sitio-couto commented 3 weeks ago

@bcardosolopes applied.