llvm / clangir

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

Implement a custom CIR Module Op and attributes #644

Open bcardosolopes opened 4 months ago

bcardosolopes commented 4 months ago

We could then have an interface with getters and setters for attributes that better matches C/C++ translation units, among other nice things!

_Originally posted by @sitio-couto in https://github.com/llvm/clangir/pull/643#discussion_r1621537202_

Lancern commented 4 months ago

The name cir.module may be confused with C++20 modules. Maybe the name cir.translation_unit is better?

bcardosolopes commented 4 months ago

Hell yea. This is what I had in mind too, I'd say even shorter cir.tu