Bruno Cardoso Lopes
Bruno Cardoso Lopes
We should teach `GlobalViewAttr` and `VTableAddrPointOp` to use them instead. _Originally posted by @bcardosolopes in https://github.com/llvm/clangir/pull/252#discussion_r1323843899_
Random comment: If this was a constant vector (which isn't the case), this reminds me of something we discussed in previous patches it would be good to have `#cir.const_vec` of...
The function in `emitStoresForConstant` in [clang/lib/CIR/CodeGen/CIRGenDecl.cpp](https://github.com/llvm/clangir/pull/463/files#diff-7401532c94e0ea27d3ffe5f10a0a43ed80f0957dba0be553519790c63fddebe0) contains lots of unimplemented heuristics, namely: ``` assert(!UnimplementedFeature::addAutoInitAnnotation()); assert(!UnimplementedFeature::vectorConstants()); assert(!UnimplementedFeature::shouldUseBZeroPlusStoresToInitialize()); assert(!UnimplementedFeature::shouldUseMemSetToInitialize()); assert(!UnimplementedFeature::shouldSplitConstantStore()); assert(!UnimplementedFeature::shouldCreateMemCpyFromGlobal()); ``` Those should be implemented in `LoweringPrepare`. Some context from a...
This is fine, the `cir.scope` is created to represent the overall scope where the if codegen actually happens within (it's where init statements will place their alloca, etc). Poking at...
BTW, I ran into an issue with `vla.c` yesterday related with cleanups when adding more skeletons to complete function epilogue, see the FIXME's in https://github.com/llvm/clangir/commit/eaf965e20f62e81586d4862d3697ac4720e19468. This is hinting to the...
Shall we extend the work in https://github.com/llvm/clangir/pull/393 for trailing zeros in const structs? Not a blocker, but I'd like to have that consistency between arrays and structs (you could even...
I still would prefer not to use an IntAttr but a enum kind attr that contains BCTI_Virtual, BCTI_Public, etc (and incrementally add the enums as we get usecases). Using `IntAttr`...
We've been missing several ones (8 in CIRGen versus 70 in IRGen) and it's good practice to keep them. As mentioned by @AaronBallman in the upstream RFC, example here: https://github.com/llvm/llvm-project/blob/fa42589fe31924b6176d7a92691c2f760b04ffd8/clang/lib/CodeGen/CGStmt.cpp#L945
If/when we get upstreamed, we should do this as early as possible. Creating an issue so I won't forget. To do this: 1. Add a CMake flag that can control...