| Age | Commit message (Collapse) | Author |
|
(#167033)
This adds code that was previously missing from emitAutoVarAlloca to
identify when an aggregate auto var is being emitted with a constant
initializer, and the associated code that is called from emitAutoVarInit
to store the constant. This allows significantly more efficient
initialization.
This was previously committed in
https://github.com/llvm/llvm-project/pull/166850 but that change
contained an unintended modification to an unrelated test.
|
|
(#166850)"
This reverts commit 5fc1b74af52093cd5229ba0e1c368d41735bb990.
This broke premerge (and premerge was failing on the patch itself):
1. https://lab.llvm.org/staging/#/builders/192/builds/10053
2. https://lab.llvm.org/staging/#/builders/21/builds/8268
|
|
This adds code that was previously missing from emitAutoVarAlloca to
identify when an aggregate auto var is being emitted with a constant
initializer, and the associated code that is called from emitAutoVarInit
to store the constant. This allows significantly more efficient
initialization.
|
|
Upstream the CXXDefaultArgExpr support for AggregateExpr
|
|
Upstream support the const member expr for struct type
|
|
This upstreams the implementation for handling binary assignment
involving aggregate types.
|
|
Implement the DesignatedInitUpdateExpr support for AggregateExpr
|
|
Implement emitAtomicInit support for AggregateExpr
|
|
Implement the UnaryExtension support for AggregateExpr
|
|
Implement the BinComma Expr support for AggregateExpr
|
|
Implement the GenericSelectionExpr for AggregateExpr
|
|
Implement the ChooseExpr for aggregate expr
|
|
Upstream ParenExpr support for AggregateExpr
|
|
This change adds support for function linkage and visibility and related
attributes. Most of the test changes are generalizations to allow
'dso_local' to be accepted where we aren't specifically testing for it.
Some tests based on CIR inputs have been updated to add 'private' to
function declarations where required by newly supported interfaces.
The dso-local.c test has been updated to add specific tests for
dso_local being set correctly, and a new test, func-linkage.cpp tests
other linkage settings.
This change sets `comdat` correctly in CIR, but it is not yet applied to
functions when lowering to LLVM IR. That will be handled in a later
change.
|
|
This enables us to compile C++ code with nested structures. The
necessary support for this was already in place, but we were hitting an
NYI error in a place where the implementation only needed to check for
base classes. Base classes really aren't implemented yet, so the error
is left in place but it is now behind a check for a non-zero number of
bases so that the simple case is unblocked.
|
|
This change adds support for the CIRGlobalValueInterface and attributes
for visibility and comdat to GlobalOp.
The comdat attribute isn't correctly calculated yet, but it was required
for the CIRGlobalValueInterface interface. There are also some cases
where dso_local isn't set correctly, but it is better than it was before
this change. Those issues will be addressed in a future patch.
|
|
This adds alignment support for GlobalOp, LoadOp, and StoreOp.
Tests which failed because cir.store/cir.load now print alignment were
updated with wildcard matches, except where the alignment was relevant
to the test. Tests which check for cir.store/cir.load in cases that
don't have explicit alignment were not updated.
New tests for alignment are alignment.c, align-load.c, and
align-store.c.
|
|
This change adds additional checks to a few places where a simple struct
in C++ code was triggering `errorNYI` in places where no additional
handling was needed, and adds a very small amount of trivial
initialization. The code now checks for the conditions that do require
extra handling before issuing the diagnostic.
New tests are added for declaring and using a simple struct in C++ code.
|
|
We have been using the default names for global symbols to this point.
This change introduces proper name mangling for functions.
This requires introducing a CXXABI class in the CIRGenModule. Because
only target independent name mangling is handled in this patch, the
CXXABI class does not require a target-specific implementation. The
general mechanism for selecting an implementation is introduced here,
but the actual target-specific subclasses are deferred until needed.
|
|
This introduces MLIR aliases for ClangIR record types. These are used in
the incubator and having skipped over them upstream is causing the tests
to diverge.
|
|
This change adds minimal support for structure types. To keep the
initial change small, only incomplete declarations are being supported
in this patch. More complete support will follow.
|