llvm / clangir

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

[CIR][CIRGen] Add dynamic builtin alloca intrinsics support #547

Closed orbiri closed 3 months ago

orbiri commented 4 months ago

This patch adds the CIRGen for the following builtin functions:

Missing support to add in the future:


P.S.: I'm aware this is rather an "esoteric" feature to be supported and I'm sure there are more valuable features to implement before that! Implementing this feature was my method of learning more about the development flow for CIR - working along side clang's codegen, testing and debugging flow, etc.

orbiri commented 4 months ago

Embarrassing formatting and lit-tests errors fixed and verified locally šŸ¤¦

orbiri commented 4 months ago

Thanks for the review!! Will address the comments in the coming days. New push is just rebasing on top of Nathan's rebase, didn't address any comment yet! :)

orbiri commented 3 months ago

Addressed all comments, main changes:

orbiri commented 3 months ago

@bcardosolopes do you think we can land this? :)