aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CIR/CodeGen
AgeCommit message (Collapse)AuthorFilesLines
7 hours[CIR] Upstream ParenExpr for AggregateExpr (#160998)HEADmainAmr Hesham1-3/+1
Upstream ParenExpr support for AggregateExpr
10 hours[OpenACC][CIR] Generate private recipe pointer/array 'alloca's (#160911)Erich Keane2-23/+121
As a next step to generating pointer/array recipes, this patch generates just the 'alloca' lines that are necessary. Copying pointers over to restore the structure is held off to the next patch. In the case of a pointer, we need to allocate the level 'below' it (if we index into it), then copy the values into the pointers. In the case of an array, we skip the alloca (since the array's alloca contains the value). After this, we'll need a patch that copies the pointers into place, and finally one that does the initialization of these values.
26 hours[CIR] fix enumeration value 'OMPFuseDirectiveClass' not handled in switch ↵Maksim Levental1-0/+1
(#161278)
27 hours[CIR] Add virtual base support to getAddressOfBaseClass (#159162)Morris Hafner1-13/+29
This patch enables calling virtual functions of virtual base classes of a derived class.
28 hours[CIR] Upstream UnaryExtension for Scalar Expr (#160997)Amr Hesham1-0/+4
Upstream UnaryExtension for Scalar Expr
28 hours[CIR] Implement UO real on result from imag with type promotion (#160996)Amr Hesham1-3/+0
Implement UO real on the result from imag with type promotion Issue: https://github.com/llvm/llvm-project/issues/141365
30 hours[CIR] Add initial support for operator delete (#160574)Andy Kaylor3-0/+224
This adds basic operator delete handling in CIR. This does not yet handle destroying delete or array delete, which will be added later. It also does not insert non-null checks when not optimizing for size.
30 hours[CIR] Set the module name to the input filename (#160934)Andy Kaylor1-0/+13
This sets the MLIR module name to the main filename (according to the SourceManager), if one is available. The module name gets used when creating global init functions, so we will need it to be set.
4 days[CIR] Implement logical not for VectorType (#160762)Amr Hesham1-4/+8
This change implements logical not for VectorType
4 days[CIR] Implement UO real on result from real with type promotion (#160951)Amr Hesham1-3/+4
Implement UO real on the result from real with type promotion Issue: https://github.com/llvm/llvm-project/issues/141365
4 days[NFC][OpenACC][CIR] Extract 'base' class for Recipe generation (#160603)Erich Keane3-293/+357
It was brought up on a previous review that the CIRGenOpenACCRecipe.h file was getting too large. I noticed that the 'dependent on template argument' parts were actually quite small, so I extract a base class in this patch that allows me to implement it in the .cpp file, plus minimize the amount of code that needs instantiating.
5 days[CIR] Implement AtomicExpr for ComplexType (#160563)Amr Hesham2-4/+2
This change implements AtomicExpr for ComplexType Issue: https://github.com/llvm/llvm-project/issues/141365
6 days[NFC][OpenACC] Reorder 'recipe' generation to be lexical (#160585)Erich Keane3-18/+41
It was noticed on a previous patch that I could have emitted recipes in lexical order instead of reverse order, which would improve the readability of a lot of tests. This patch implements that, and changes all of the required test.
6 days[CIR] Implement Unary real & imag on scalar expr (#159916)Amr Hesham1-4/+16
This change implements Unary real & imag on scalar expr Issue: https://github.com/llvm/llvm-project/issues/141365
6 days[CIR][OpenACC] Implement pointer/array recipe destructors (#160189)Erich Keane4-64/+314
After previous implementation, I discovered that we were both doing arrays incorrectly for recipes, plus didn't get the pointer allocations done correctly. This patch is the first of a few in a series that attempts to make sure we get all pointers/arrays correct. This patch is limited to just 'private' and destructors, which simplifies the review significantly. Destructors are simply looped through and called at each level. The 'recipe-decl' is the 'least bounded' (that is, the type of the expression, in the type of `int[5] i; #pragma acc parallel private(i[1])`, the type of the `recipe-decl` is `int`. This allows us to do init/destruction at the element level. This patch also adds infrastructure for the rest of the series of private (for the init section), as well as extensive testing for 'private', with a lot of 'TODO' locations. Future patches will fill these in, but at the moment, there is an NYI warning for bounds, so a number of tests are updated to handle that.
7 days[CIR] Upstream support Agg init with lvalue ComplexType (#159974)Amr Hesham1-1/+1
Upstream the support of Agg init with lvalue ComplexType Issue: https://github.com/llvm/llvm-project/issues/141365
7 days[CIR] Implement Complex real & imag for non scalar GLValue (#159931)Amr Hesham1-15/+8
This change implements Complex real & imag for non-scalar GLValue Issue: https://github.com/llvm/llvm-project/issues/141365
7 days[CIR] Upstream LValue Unary Inc & Dec for ComplexType (#160201)Amr Hesham1-2/+1
Upstream LValue Unary Inc & Dec for ComplexType Issue: https://github.com/llvm/llvm-project/issues/141365
7 days[CIR] Implement static lambda invoker (#160137)Andy Kaylor5-1/+114
This adds support for handling static lambda invokers.
7 days[CIR] Implement CXX new for ComplexType with init (#159973)Amr Hesham1-2/+2
This change implements CXX new for ComplexType with init Issue: https://github.com/llvm/llvm-project/issues/141365
7 days[CIR][NFC] Fix copy constructed AP real and imag values (#159935)Amr Hesham1-12/+11
Fix warning about copy-constructed APInt & APFloat values
7 days[CIR] Implement UnaryExtension support for ComplexType (#159913)Amr Hesham1-2/+1
This change implements UnaryExtension for ComplexType Issue: https://github.com/llvm/llvm-project/issues/141365
8 days[CIR] Add support for lambda expressions (#157751)Andy Kaylor6-10/+215
This adds support for lambda operators and lambda calls. This does not include support for static lambda invoke, which will be added in a later change.
11 days[CIR] Implement Type promotion for VectorType (#158715)Amr Hesham1-5/+4
This change adds support for type promotion for VectorType Issue https://github.com/llvm/llvm-project/issues/136487
11 days[CIR] Add atomic exchange operation (#158089)Sirui Mu1-4/+30
This patch adds atomic exchange operation which covers the following C/C++ intrinsic functions: - `__c11_atomic_exchange` - `__atomic_exchange` - `__atomic_exchange_n`
11 days[CIR][NFC] Fix Missing Decl::OMPGroupPrivate warning (#159631)Amr Hesham1-1/+1
Fix the Missing enum element `Decl::OMPGroupPrivate` warning
11 days[CIR] Fix structors for multidimensional arrrays (#159820)Morris Hafner3-10/+31
This patchs implements array constructors and destructors for multidimensional arrays. This works by bitcasting the pointer to the first element to a one-dimensional array type of the same extent before lowering to a loop.
11 days[CIR] Implement Logical AND for VectorType (#158696)Amr Hesham1-2/+14
This change adds support for local AND op for VectorType Issue https://github.com/llvm/llvm-project/issues/136487
12 days[Clang][CIR] fix enumeration value 'OMPGroupPrivate' not handled in switch ↵Maksim Levental1-1/+2
(#159694)
12 days[CIR] Implement Logical OR for VectorType (#158668)Amr Hesham1-3/+15
This change adds support for local OR op for VectorType Issue #136487
12 days[CIR] Support type promotion for Scalar unary plus & minus ops (#158486)Amr Hesham1-13/+32
Support type promotion for Scalar unary plus & minus ops
12 days[CIR] Support type promotion for Scalar unary real & imag ops (#158473)Amr Hesham1-27/+41
This change adds support for type promotion in Scalar unary real & imag ops Issue: https://github.com/llvm/llvm-project/issues/141365
12 days[CIR] Implement OpaqueValueExpr for Complex in C (#158423)Amr Hesham2-5/+3
This change adds support for the OpaqueValueExpr for Complex in C Issue: https://github.com/llvm/llvm-project/issues/141365
2025-09-13[CIR] Upstream FPToFPBuiltin CosOp (#158342)Amr Hesham1-0/+13
Upstream support for FPToFPBuiltin CosOp
2025-09-13[CIR] Upstream VisitOpaqueValueExpr support for Complex & Scalar (#157331)Amr Hesham4-4/+59
This change adds support for the OpaqueValueExpr for Complex & Scalar Issue: https://github.com/llvm/llvm-project/issues/141365
2025-09-11[CIR] Upstream FPToFPBuiltin ATanOp (#157496)Amr Hesham1-0/+2
Upstream support for FPToFPBuiltin ATanOp
2025-09-10[CIR] Upstream FPToFPBuiltin ASinOp (#157350)Amr Hesham1-0/+2
Upstream support for FPToFPBuiltin ASinOp
2025-09-09[CIR] Add support for copy elision (#157713)Andy Kaylor5-13/+65
This adds basic support for eliding copy constructors. In order to make this possible, it also adds support for returning structures. This support does not include setting an NRVO flag when the class whose copy is being elided has a non-trivial destructor.
2025-09-09[CIR][NFC] Fix build warnings after #154142 (#157724)Andy Kaylor1-0/+2
A recent change introduced a new dtor kind, which caused a build warning in the CIR code where this dtor kind wasn't handled in a switch. This fixes the problem.
2025-09-09[CIR] Add support for __builtin_alloca (#157116)Morris Hafner1-0/+51
This patch adds support for the alloca builtin and extends AllocaOp with a dynamic size argument.
2025-09-08[CIR] Add support for atomic compare-and-swap (#156253)Sirui Mu1-7/+137
This patch adds support for atomic compare-and-swap operations, including the following C/C++ instrinsics: - `__atomic_compare_exchange` - `__atomic_compare_exchange_n` - `__c11_atomic_compare_exchange_strong` - `__c11_atomic_compare_exchange_weak`
2025-09-08[CIR] Fix assertion order in 'Address' (#157477)Erich Keane1-3/+3
We are checking the 'type' of 'pointer' before we are checking whether it is null or not! This is clearly incorrect, so this patch reorders the asserts.
2025-09-06[clang] Polymorphic Cleanup type is moved despite not being POD types (#156607)Oliver Hunt1-1/+1
Clang as a number of Cleanup types used in exception handling, these are presumed to be POD types that can be memmoved as needed, however this is not correct by default on platforms with pointer authentication that make vtable pointers address discriminated. This PR mitigates this problem by introducing a LLVM_MOVABLE_POLYMORPHIC_TYPE macro that can be used to annotate polymorphic types that are required to be movable, to override the use of address discrimination of the vtable pointer.
2025-09-05[CIR][NFC] Consildate CIRGenExprCXX.cpp files (#157169)Andy Kaylor3-427/+409
Somewhere in the upstreaming process, we created a file CIRGenCXXExpr.cpp that corresponded to the file CIRGenExprCXX.cpp in the incubator. Later we created a CIRGenExprCXX.cpp file. This change consolidates those files, keeping the name used in the incubator.
2025-09-05[CIR] Implement CXX field default initialization (#157140)Andy Kaylor5-14/+76
This adds the code needed to handle default initialization for fields of various types.
2025-09-05[CIR] Add support for delegating constructors with VTT args (#156970)Andy Kaylor1-3/+2
This adds support for handling delegating constructors with VTT arguments.
2025-09-05[OpenACC][NFCI] Split recipe generation into its own class (#157160)Erich Keane2-308/+347
The recipe generation was dependent on the clause kind, which meant we had all of the recipe generation duplicated in each of clauses. This patch copy/pastes all of them into their own type to do recipe generation, which should reduce clang's size. Additionally, we've moved it off into its own file, which should make readability/organization improvements.
2025-09-05[CIR] Fix Complex emit promotion for Div op (#156963)Amr Hesham1-0/+1
This change fixes emitting promotion type for div op Issue: https://github.com/llvm/llvm-project/issues/141365
2025-09-04[CIR] Add constant record ILE support (#155663)Morris Hafner8-23/+700
This patch adds basic support for constant record initializer list expressions. There's a couple of limitations: * No zero initialized padding bytes in C mode * No bitfields * No designated initializer lists * Record alignments are not calculated, yet * ILEs of derived records don't work, yet * The constant attribute is not propagated to the backend, resulting in non-constants being emitted in the LLVM IR
2025-09-04[CIR] Add support for delegating constructor initialization (#156757)Andy Kaylor1-7/+15
This adds support for zero-initialization during delegating constructor processing. Note, this also adds code to skip emitting constructors that are trivial and default to match the classic codegen behavior. The incubator does not skip these constructors, but I have found a case where this results in a call to a default constructor that is never defined.