| 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.
|
|
Unlike the incubator, this adds the inline attribute directly to FuncOp
instead of adding the ExtraFnAttr dict.
This adds three new optional keywords to CIR: inline_always,
inline_never and inline_hint. Just like in OGCG -O0 implies inline_never
on functions withoutt the C++ `inline` keyword and no other
inlining-related attribute.
This patch also adapts all tests that use functions so they account for
LLVM attributes being attached now.
|
|
This mirrors changes from https://github.com/llvm/clangir/pull/1933
|
|
(#161431)
This mirrors incubator changes from https://github.com/llvm/clangir/pull/1922
|
|
Upstream the support of Agg init with lvalue ComplexType
Issue: https://github.com/llvm/llvm-project/issues/141365
|
|
If an array initializer list leaves eight or more elements that require
zero fill, we had been generating an individual zero element for every
one of them. This change instead follows the behavior of classic
codegen, which creates a constant structure with the specified elements
followed by a zero-initializer for the trailing zeros.
|
|
This updates the array initialization loop to use a do..while loop
rather than a fully serialized initialization. It also allows the
initialization of destructed objects when exception handling is not
enabled.
Array initialization when exception handling is enabled remains
unimplemented, but more precise messages are now emitted.
|
|
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.
|
|
Update `isSized` function with the upstreamed types
|
|
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 change adds code to defer emitting declarations and tentative
definitions until they are referenced or trigger by a call to
CompleteTentativeDefinition. This is needed to avoid premature handling
of declarations and definitions that might not be referenced in the
current translation unit. It also avoids incorrectly adding an
initializer to external declarations.
This change also updates the way the insertion location for globals is
chosen so that all globals will be emitted together at the top of the
module. This makes no functional difference, but it is very useful for
writing sensible tests.
Some tests are modified in this change to reorder global variables so
that they can be checked in the order in which they will be emitted.
|
|
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.
|
|
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.
|
|
(#135493)
This change adds an ArraySubscriptExpr from the function parameter with
base type as Pointer
Issue https://github.com/llvm/llvm-project/issues/130197
|
|
Follow-up patch to improve variable names in LLVM and OGCG in
https://github.com/llvm/llvm-project/pull/134536
|
|
This change adds ArraySubscriptExpr for fixed size ArrayType
Issue #130197
|
|
This change adds local initialization for ArrayType
Issue #130197
|
|
This change adds zero initialization for global variables
|
|
CIR uses aliases for standard integer types and void. This change adds
upstream support for those aliases and updates existing tests.
|
|
This change adds global initialization for ArrayType
Issue #130197
|
|
This change adds the basic support for ArrayType
Issue #130197
|