Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ABI-aware calling conventions #417

Open
bcardosolopes opened this issue Jan 23, 2024 · 1 comment
Open

ABI-aware calling conventions #417

bcardosolopes opened this issue Jan 23, 2024 · 1 comment

Comments

@bcardosolopes
Copy link
Member

Right now CIRGen mostly uses direct lowering (1 to 1 correspondence between C/C++ and IR), this is not how things are expected to work, since the LLVM emitted is not ABI compatible with what traditional LLVM codegen does, nor matches what ABI specs expect.

The current plan is to handle all ABI logic before we lower down to LLVM, these are the high level items needed in order to implement this:

  1. Add cir.call support for holding attributes for each param.
  2. In CIRGen, add ABI attributes that represent how these params need to be broken down in a later passes.
  3. Add a new pass or teach LoweringPrepare how to break the params based on each param attributes

(cc: @sitio-couto @sommerlukas)

@smeenai
Copy link
Collaborator

smeenai commented Oct 14, 2024

Can we close this out now given how much of ABI lowering has landed, or are there still TODO items here? If there's still things to do, it might be better to open specific issues for those instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants