History log of /llvm-project-15.0.7/clang/lib/CodeGen/CGExprAgg.cpp (Results 176 – 200 of 476)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# ed90df38 22-Feb-2012 Douglas Gregor <[email protected]>

Generate an AST for the conversion from a lambda closure type to a
block pointer that returns a block literal which captures (by copy)
the lambda closure itself. Some aspects of the block literal are

Generate an AST for the conversion from a lambda closure type to a
block pointer that returns a block literal which captures (by copy)
the lambda closure itself. Some aspects of the block literal are left
unspecified, namely the capture variable (which doesn't actually
exist) and the body (which will be filled in by IRgen because it can't
be written as an AST).

Because we're switching to this model, this patch also eliminates
tracking the copy-initialization expression for the block capture of
the conversion function, since that information is now embedded in the
synthesized block literal. -1 side tables FTW.

llvm-svn: 151131

show more ...


# d026dc49 19-Feb-2012 Sebastian Redl <[email protected]>

Make heap-allocation of std::initializer_list 'work'.

llvm-svn: 150931


# 8eb351d7 19-Feb-2012 Sebastian Redl <[email protected]>

Get recursive initializer lists to work and add a test. Codegen of std::initializer_list is now complete. Onward to array new.

llvm-svn: 150926


# c83ed824 17-Feb-2012 Sebastian Redl <[email protected]>

Basic code generation support for std::initializer_list.

We now generate temporary arrays to back std::initializer_list objects
initialized with braces. The initializer_list is then made to point at

Basic code generation support for std::initializer_list.

We now generate temporary arrays to back std::initializer_list objects
initialized with braces. The initializer_list is then made to point at
the array. We support both ptr+size and start+end forms, although
the latter is untested.

Array lifetime is correct for temporary std::initializer_lists (e.g.
call arguments) and local variables. It is untested for new expressions
and member initializers.

Things left to do:
Massively increase the amount of testing. I need to write tests for
start+end init lists, temporary objects created as a side effect of
initializing init list objects, new expressions, member initialization,
creation of temporary objects (e.g. std::vector) for initializer lists,
and probably more.
Get lifetime "right" for member initializers and new expressions. Not
that either are very useful.
Implement list-initialization of array new expressions.

llvm-svn: 150803

show more ...


# c62bb391 15-Feb-2012 John McCall <[email protected]>

Split reinterpret_casts of member pointers out from CK_BitCast; this
is general goodness because representations of member pointers are
not always equivalent across member pointer types on all ABIs
(

Split reinterpret_casts of member pointers out from CK_BitCast; this
is general goodness because representations of member pointers are
not always equivalent across member pointer types on all ABIs
(even though this isn't really standard-endorsed).

Take advantage of the new information to teach IR-generation how
to do these reinterprets in constant initializers. Make sure this
works when intermingled with hierarchy conversions (although
this is not part of our motivating use case). Doing this in the
constant-evaluator would probably have been better, but that would
require a *lot* of extra structure in the representation of
constant member pointers: you'd really have to track an arbitrary
chain of hierarchy conversions and reinterpretations in order to
get this right. Ultimately, this seems less complex. I also
wasn't quite sure how to extend the constant evaluator to handle
foldings that we don't actually want to treat as extended
constant expressions.

llvm-svn: 150551

show more ...


# c370a7ee 09-Feb-2012 Eli Friedman <[email protected]>

Refactor lambda IRGen so AggExprEmitter::VisitLambdaExpr does the right thing.

llvm-svn: 150146


# 79399e88 09-Feb-2012 Eli Friedman <[email protected]>

A tiny bit more lambda IRGen.

llvm-svn: 150140


# ece0409a 07-Feb-2012 Chris Lattner <[email protected]>

simplify a bunch of code to use the well-known LLVM IR types computed by CodeGenModule.

llvm-svn: 149943


# e4d798f0 20-Jan-2012 David Blaikie <[email protected]>

More dead code removal (using -Wunreachable-code)

llvm-svn: 148577


# fa35df62 16-Jan-2012 David Chisnall <[email protected]>

Some improvements to the handling of C11 atomic types:

- Add atomic-to/from-nonatomic cast types
- Emit atomic operations for arithmetic on atomic types
- Emit non-atomic stores for initialisation o

Some improvements to the handling of C11 atomic types:

- Add atomic-to/from-nonatomic cast types
- Emit atomic operations for arithmetic on atomic types
- Emit non-atomic stores for initialisation of atomic types, but atomic stores and loads for every other store / load
- Add a __atomic_init() intrinsic which does a non-atomic store to an _Atomic() type. This is needed for the corresponding C11 stdatomic.h function.
- Enables the relevant __has_feature() checks. The feature isn't 100% complete yet, but it's done enough that we want people testing it.

Still to do:

- Make the arithmetic operations on atomic types (e.g. Atomic(int) foo = 1; foo++;) use the correct LLVM intrinsic if one exists, not a loop with a cmpxchg.
- Add a signal fence builtin
- Properly set the fenv state in atomic operations on floating point values
- Correctly handle things like _Atomic(_Complex double) which are too large for an atomic cmpxchg on some platforms (this requires working out what 'correctly' means in this context)
- Fix the many remaining corner cases

llvm-svn: 148242

show more ...


# 48fd89ad 06-Jan-2012 Eli Friedman <[email protected]>

Revert r147664; it's breaking clang regression tests.

llvm-svn: 147681


# a78c20d7 06-Jan-2012 Jakub Staszak <[email protected]>

Silence GCC warnings.

llvm-svn: 147664


# 6d694a38 05-Dec-2011 Eli Friedman <[email protected]>

Make EmitAggregateCopy take an alignment argument. Make EmitFinalDestCopy pass in the correct alignment when known.

The test includes a FIXME for a related case involving calls; it's a bit more com

Make EmitAggregateCopy take an alignment argument. Make EmitFinalDestCopy pass in the correct alignment when known.

The test includes a FIXME for a related case involving calls; it's a bit more complicated to fix because the RValue class doesn't keep track of alignment.

<rdar://problem/10463337>


llvm-svn: 145862

show more ...


# 2869b5af 03-Dec-2011 Eli Friedman <[email protected]>

Add a utility to get a RValue for a given LValue for an aggregate; switch a few places over to it.

llvm-svn: 145747


# 702b2841 27-Nov-2011 Peter Collingbourne <[email protected]>

When destroying temporaries, instead of a custom cleanup use the
generic pushDestroy function.

This would reduce the number of useful declarations in
CGTemporaries.cpp to one. Since CodeGenFunction

When destroying temporaries, instead of a custom cleanup use the
generic pushDestroy function.

This would reduce the number of useful declarations in
CGTemporaries.cpp to one. Since CodeGenFunction::EmitCXXTemporary
does not deserve its own file, move it to CGCleanup.cpp and delete
CGTemporaries.cpp.

llvm-svn: 145202

show more ...


Revision tags: llvmorg-3.0.0, llvmorg-3.0.0-rc4
# f4beacd0 10-Nov-2011 John McCall <[email protected]>

Whenever explicitly activating or deactivating a cleanup, we
need to provide a 'dominating IP' which is guaranteed to
dominate the (de)activation point but which cannot be avoided
along any execution

Whenever explicitly activating or deactivating a cleanup, we
need to provide a 'dominating IP' which is guaranteed to
dominate the (de)activation point but which cannot be avoided
along any execution path from the (de)activation point to
the push-point of the cleanup. Using the entry block is
bad mojo.

llvm-svn: 144276

show more ...


# 08ef4660 10-Nov-2011 John McCall <[email protected]>

Enter the cleanups for a block outside the enclosing
full-expression. Naturally they're inactive before we enter
the block literal expression. This restores the intended
behavior that blocks belong

Enter the cleanups for a block outside the enclosing
full-expression. Naturally they're inactive before we enter
the block literal expression. This restores the intended
behavior that blocks belong to their enclosing scope.

There's a useful -O0 / compile-time optimization that we're
missing here with activating cleanups following straight-line
code from their inactive beginnings.

llvm-svn: 144268

show more ...


Revision tags: llvmorg-3.0.0-rc3
# ffc8ca2d 07-Nov-2011 John McCall <[email protected]>

Rip out CK_GetObjCProperty.

llvm-svn: 143910


# c109a259 07-Nov-2011 John McCall <[email protected]>

Rip the ObjCPropertyRef l-value kind out of IR-generation.

llvm-svn: 143908


# fe96e0b6 06-Nov-2011 John McCall <[email protected]>

Change the AST representation of operations on Objective-C
property references to use a new PseudoObjectExpr
expression which pairs a syntactic form of the expression
with a set of semantic expressio

Change the AST representation of operations on Objective-C
property references to use a new PseudoObjectExpr
expression which pairs a syntactic form of the expression
with a set of semantic expressions implementing it.
This should significantly reduce the complexity required
elsewhere in the compiler to deal with these kinds of
expressions (e.g. IR generation's special l-value kind,
the static analyzer's Message abstraction), at the lower
cost of specifically dealing with the odd AST structure
of these expressions. It should also greatly simplify
efforts to implement similar language features in the
future, most notably Managed C++'s properties and indexed
properties.

Most of the effort here is in dealing with the various
clients of the AST. I've gone ahead and simplified the
ObjC rewriter's use of properties; other clients, like
IR-gen and the static analyzer, have all the old
complexity *and* all the new complexity, at least
temporarily. Many thanks to Ted for writing and advising
on the necessary changes to the static analyzer.

I've xfailed a small diagnostics regression in the static
analyzer at Ted's request.

llvm-svn: 143867

show more ...


Revision tags: llvmorg-3.0.0-rc2
# 526ab47a 25-Oct-2011 John McCall <[email protected]>

Restore r142914 and r142915, now with missing file and apparent
GCC compiler workaround.

llvm-svn: 142931


# 9a8f1396 25-Oct-2011 NAKAMURA Takumi <[email protected]>

Revert r142914 and r142915, due to possibly missing file.

r142914: "Introduce a placeholder type for "pseudo object""
r142915: "Pull the pseudo-object stuff into its own file."
llvm-svn: 142921


# c4a2d325 25-Oct-2011 John McCall <[email protected]>

Introduce a placeholder type for "pseudo object"
expressions: expressions which refer to a logical rather
than a physical l-value, where the logical object is
actually accessed via custom getter/sett

Introduce a placeholder type for "pseudo object"
expressions: expressions which refer to a logical rather
than a physical l-value, where the logical object is
actually accessed via custom getter/setter code.
A subsequent patch will generalize the AST for these
so that arbitrary "implementing" sub-expressions can
be provided.

Right now the only client is ObjC properties, but
this should be generalizable to similar language
features, e.g. Managed C++'s __property methods.

llvm-svn: 142914

show more ...


Revision tags: llvmorg-3.0.0-rc1
# df14b3a8 11-Oct-2011 Eli Friedman <[email protected]>

Initial implementation of __atomic_* (everything except __atomic_is_lock_free).

llvm-svn: 141632


# 76399eb2 27-Sep-2011 Benjamin Kramer <[email protected]>

de-tmpify clang.

llvm-svn: 140637


12345678910>>...20