Age | Commit message (Collapse) | Author | Files | Lines |
|
This change adds support for type promotion for VectorType
Issue https://github.com/llvm/llvm-project/issues/136487
|
|
This patch adds atomic exchange operation which covers the following
C/C++ intrinsic functions:
- `__c11_atomic_exchange`
- `__atomic_exchange`
- `__atomic_exchange_n`
|
|
Fix the Missing enum element `Decl::OMPGroupPrivate` warning
|
|
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.
|
|
This change adds support for local AND op for VectorType
Issue https://github.com/llvm/llvm-project/issues/136487
|
|
This change adds support for TypeInfoAttr which is needed later for RTTI
in exceptions
Issue https://github.com/llvm/llvm-project/issues/154992
|
|
(#159694)
|
|
This change adds support for local OR op for VectorType
Issue #136487
|
|
Support type promotion for Scalar unary plus & minus ops
|
|
This change adds support for type promotion in Scalar unary real & imag
ops
Issue: https://github.com/llvm/llvm-project/issues/141365
|
|
This change adds support for the OpaqueValueExpr for Complex in C
Issue: https://github.com/llvm/llvm-project/issues/141365
|
|
Most lowering patterns have exactly the same class declaration with
different names and different `matchAndRewrite` implementations, yet
their declaration occupies near 1000 lines of code in `LowerToLLVM.h`,
making this file difficult to read and boring to maintain. In this
patch, I migrate their declarations to be generated from `CIROps.td`
using `clang-tblgen`. Some extra `CIR_Op` TableGen fields are introduced
to help this:
- The `CIR_Op` class now defines a `bit` field `hasLLVMLowering` which
defaults to `true`. If its value is `true`, `clang-tblgen` would
generate an LLVM lowering pattern declaration for the operation.
- Some LLVM lowering patterns has bounded recursion. This could be
enabled by setting the `isLLVMLoweringRecursive` field in a `CIR_Op`
record to `true`.
- Some LLVM lowering patterns have defined additional class members.
They could be listed in the `extraLLVMLoweringPatternDecl` field.
Note that in the incubator we have a similar TableGen code generator
that generates LLVM lowering code for CIR builtin ops which has a
one-to-one correspondence to LLVM dialect operations. This patch does
NOT try to upstream it.
Some additional noticeable changes made by this patch:
- This patch adds the `dataLayout` member to every LLVM lowering pattern
class to make the job easier for a code generator. In the future we
might want to add more members to the lowering patterns, and we will
need to update the code generator to make such changes.
|
|
Remove Covered MissingFeatures flags for Complex
|
|
Upstream support for FPToFPBuiltin CosOp
|
|
This change adds support for the OpaqueValueExpr for Complex & Scalar
Issue: https://github.com/llvm/llvm-project/issues/141365
|
|
Upstream support for FPToFPBuiltin ATanOp
|
|
Upstream support for FPToFPBuiltin ASinOp
|
|
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.
|
|
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.
|
|
This patch adds support for the alloca builtin and extends AllocaOp with
a dynamic size argument.
|
|
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`
|
|
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.
|
|
- After 2929a2978cc3bdb0ff12a0e5d0a9236ff221f668,
`ConversionPatternRewriter::replaceAllUsesWith` behavior is changed
from the previous immediate mode into a delayed fashion. The legacy
operation of `replaceAllUsesWith` followed by `eraseOp` is no longer
working, replace that sequence with `replaceOp`.
|
|
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.
|
|
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.
|
|
This adds the code needed to handle default initialization for fields of
various types.
|
|
This adds support for handling delegating constructors with VTT
arguments.
|
|
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.
|
|
This change fixes emitting promotion type for div op
Issue: https://github.com/llvm/llvm-project/issues/141365
|
|
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
|
|
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.
|
|
Expressions/references with 'bounds' are going to need to do
initialization significantly differently, so we need to have the
initializer and the declaration 'separate' in the future. This patch
splits the AST node into two, and normalizes them a bit.
Additionally, since this required significant work on the recipe
generation, this patch also does a bit of a refactor to improve
readability and future expansion, now that we have a good understanding
of how these are going to look.
|
|
There was a small piece left unimplemented for classes with a primary
virtual base. This adds that implementation.
|
|
This PR adds support for the discrete bit-field layout.
It is the same as this PR: https://github.com/llvm/clangir/pull/1860
|
|
This adds the support for implicit VTT arguments in constructors.
|
|
This adds the implementation of aggEmitFinalDestCopy for the case where
the destination value is not ignored. This requires adding the cir.copy
operation and associated interface code.
|
|
Patch #156545 is introducing a different syntax for the 'destroy'
section of a recipe, which takes the 'original' value as the first
argument, and the one-to-be-destroyed as the 2nd. This patch corrects
the lowering to match that signature.
|
|
This change adds support for Atomic init for ComplexType
Issue: https://github.com/llvm/llvm-project/issues/141365
|
|
Upstream support for FPToFPBuiltin ACosOp
|
|
This fills in the missing pieces to handle volatile loads and stores in
CIR.
This addresses https://github.com/llvm/llvm-project/issues/153280
|
|
Fix the build issue after AST modification
|
|
As mentioned in a previous review, we aren't properly generating
init/destroy/copy (combiner will need to be done correctly too!) regions
for recipe generation. In the case where these have 'bounds', we can do
a much better job of figuring out the type and how much needs to be
done, but that is going to be its own engineering effort.
For now, add an NYI as a note to come back to this.
|
|
(#156241)
- Reorder the CIRGenExprComplex functions to be similar to OCG.
- Add errors for unhandled visitors.
- Rename the test file to be similar to `complex-mul-div`.
Issue: https://github.com/llvm/llvm-project/issues/141365
|
|
This adds support for emitting virtual table tables (VTTs) and
construction vtables.
|
|
This change adds support VAArgExpr for ComplexExpr
Issue: https://github.com/llvm/llvm-project/issues/141365
|
|
These four operators have an initial value of 0, so they are able to use
C/C++ 'zero init'. This patch adds the infrastructure to the Sema init
calculations to differentiate based on the reduction operator, then
enables emission of the inits in CodeGen (which should work for all
inits, once generated).
The rest of this test is just updating validation to make sure that the
inits happen correctly for all 4 operators.
|
|
This change adds support for Complex unary plus and minus expressions
with promoted type
Issue: https://github.com/llvm/llvm-project/issues/141365
|
|
This change adds support for the throw op without sub expression and
with noreturn
Issue #154992
|
|
|
|
This change adds support for DivOp and CompoundAssignmentDiv between
ComplexType and ScalarType
Issue: https://github.com/llvm/llvm-project/issues/141365
|