History log of /llvm-project-15.0.7/clang/lib/CodeGen/CGExprAgg.cpp (Results 251 – 275 of 476)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 294c2db4 13-Jan-2011 John McCall <[email protected]>

Ensure an insertion point at the end of a statement-expression.
Fixes PR8967.

llvm-svn: 123360


# acc6b4e2 30-Dec-2010 Benjamin Kramer <[email protected]>

Simplify mem{cpy, move, set} creation with IRBuilder.

llvm-svn: 122634


# 5d413781 06-Dec-2010 John McCall <[email protected]>

Rename CXXExprWithTemporaries -> ExprWithCleanups; there's no theoretical
reason this is limited to C++, and it's certainly not limited to temporaries.

llvm-svn: 120996


# d0a30016 06-Dec-2010 John McCall <[email protected]>

__block variables require us to evaluate the RHS of an assignment before
the LHS, or else the pointer might be invalid. This is kindof dumb, but
go ahead and make sure we're doing that for l-value s

__block variables require us to evaluate the RHS of an assignment before
the LHS, or else the pointer might be invalid. This is kindof dumb, but
go ahead and make sure we're doing that for l-value scalar assignment,
which fixes a miscompile of obj-c++.dg/block-seq.mm.

Leave a FIXME for how to solve this problem for agg __blocks.

llvm-svn: 120992

show more ...


# a2342eb8 05-Dec-2010 John McCall <[email protected]>

Fix a bug in the emission of __real/__imag l-values on scalar operands.
Fix a bug in the emission of complex compound assignment l-values.
Introduce a method to emit an expression whose value isn't r

Fix a bug in the emission of __real/__imag l-values on scalar operands.
Fix a bug in the emission of complex compound assignment l-values.
Introduce a method to emit an expression whose value isn't relevant.
Make that method evaluate its operand as an l-value if it is one.
Fixes our volatile compliance in C++.

llvm-svn: 120931

show more ...


# 34376a68 04-Dec-2010 John McCall <[email protected]>

Although we currently have explicit lvalue-to-rvalue conversions, they're
not actually frequently used, because ImpCastExprToType only creates a node
if the types differ. So explicitly create an ICE

Although we currently have explicit lvalue-to-rvalue conversions, they're
not actually frequently used, because ImpCastExprToType only creates a node
if the types differ. So explicitly create an ICE in the lvalue-to-rvalue
conversion code in DefaultFunctionArrayLvalueConversion() as well as several
other new places, and consistently deal with the consequences throughout the
compiler.

In addition, introduce a new cast kind for loading an ObjCProperty l-value,
and make sure we emit those nodes whenever an ObjCProperty l-value appears
that's not on the LHS of an assignment operator.

This breaks a couple of rewriter tests, which I've x-failed until future
development occurs on the rewriter.

Ted Kremenek kindly contributed the analyzer workarounds in this patch.

llvm-svn: 120890

show more ...


# f3eb96fc 04-Dec-2010 John McCall <[email protected]>

Kill the KVC l-value kind and calculate the base expression when emitting
the l-value.

llvm-svn: 120884


# 5cd84755 02-Dec-2010 Chris Lattner <[email protected]>

Reflow to a style doug prefers, increasing indentation :-)

llvm-svn: 120746


# c5cc2fb9 02-Dec-2010 Chris Lattner <[email protected]>

fix PR8726 by teaching the aggregate init optimization code to handle
structs with references in them correctly.

llvm-svn: 120722


# 27a3631b 02-Dec-2010 Chris Lattner <[email protected]>

Improve codegen for initializer lists to use memset more aggressively
when an initializer is variable (I handled the constant case in a previous
patch). This has three pieces:

1. Enhance AggValueSl

Improve codegen for initializer lists to use memset more aggressively
when an initializer is variable (I handled the constant case in a previous
patch). This has three pieces:

1. Enhance AggValueSlot to have a 'isZeroed' bit to tell CGExprAgg that
the memory being stored into has previously been memset to zero.
2. Teach CGExprAgg to not emit stores of zero to isZeroed memory.
3. Teach CodeGenFunction::EmitAggExpr to scan initializers to determine
whether they are profitable to emit a memset + inividual stores vs
stores for everything.

The heuristic used is that a global has to be more than 16 bytes and
has to be 3/4 zero to be candidate for this xform. The two testcases
are illustrative of the scenarios this catches. We now codegen test9 into:

call void @llvm.memset.p0i8.i64(i8* %0, i8 0, i64 400, i32 4, i1 false)
%.array = getelementptr inbounds [100 x i32]* %Arr, i32 0, i32 0
%tmp = load i32* %X.addr, align 4
store i32 %tmp, i32* %.array

and test10 into:

call void @llvm.memset.p0i8.i64(i8* %0, i8 0, i64 392, i32 8, i1 false)
%tmp = getelementptr inbounds %struct.b* %S, i32 0, i32 0
%tmp1 = getelementptr inbounds %struct.a* %tmp, i32 0, i32 0
%tmp2 = load i32* %X.addr, align 4
store i32 %tmp2, i32* %tmp1, align 4
%tmp5 = getelementptr inbounds %struct.b* %S, i32 0, i32 3
%tmp10 = getelementptr inbounds %struct.a* %tmp5, i32 0, i32 4
%tmp11 = load i32* %X.addr, align 4
store i32 %tmp11, i32* %tmp10, align 4

Previously we produced 99 stores of zero for test9 and also tons for test10.
This xforms should substantially speed up -O0 builds when it kicks in as well
as reducing code size and optimizer heartburn on insane cases. This resolves
PR279.

llvm-svn: 120692

show more ...


# b7bd14fa 02-Dec-2010 John McCall <[email protected]>

Simplify the ASTs by consolidating ObjCImplicitGetterSetterExpr and ObjCPropertyRefExpr
into the latter.

llvm-svn: 120643


# f3735e01 01-Dec-2010 John McCall <[email protected]>

Restore the lvalue-to-rvalue conversion patch with a minimal fix.

llvm-svn: 120555


# 4f22c9de 30-Nov-2010 John McCall <[email protected]>

L-value to r-value conversion is not ready for prime-time.

llvm-svn: 120433


# 824fd1dc 30-Nov-2010 John McCall <[email protected]>

Introduce an r-value to l-value cast kind. I'm not promising anything
about the reliability of this yet.

llvm-svn: 120422


# 5b26f65b 17-Nov-2010 John McCall <[email protected]>

Reset the lifetime-managed flag between emission of the agg conditional
branches. Fixes PR8623.

llvm-svn: 119408


# d50a2711 16-Nov-2010 John McCall <[email protected]>

Kill CK_Unknown and flesh out the documentation for the existing CastKinds.

llvm-svn: 119331


# c123623d 22-Oct-2010 Fariborz Jahanian <[email protected]>

After discussion with Doug and John, I am reverting
the patch.

llvm-svn: 117159


# 0196aa28 22-Oct-2010 Fariborz Jahanian <[email protected]>

Patch fixes miscompile with non-trivial copy constructors and
statement expressions, //rdar: //8540501

llvm-svn: 117146


# 7a2b425e 08-Oct-2010 Douglas Gregor <[email protected]>

Revert the hack Chris Lattner added in r97981 to work around
brokenness in the designated-initializer ASTs. The ASTs were fixed by
Alp Toker's patch (r116098) for PR6955. Fixes PR6537.

llvm-svn: 116

Revert the hack Chris Lattner added in r97981 to work around
brokenness in the designated-initializer ASTs. The ASTs were fixed by
Alp Toker's patch (r116098) for PR6955. Fixes PR6537.

llvm-svn: 116101

show more ...


Revision tags: llvmorg-2.8.0, llvmorg-2.8.0-rc3, llvmorg-2.8.0-rc2
# 58649dc6 16-Sep-2010 John McCall <[email protected]>

Initialize AggValueSlot's flags along all paths, plus minor beautification.
Prospective fix for broken commit in r114045.

llvm-svn: 114060


# b60e70f9 16-Sep-2010 Fariborz Jahanian <[email protected]>

Patch to move RequiresGCollection bit to
AggValueSlot slot.

llvm-svn: 114045


# 7a626f63 15-Sep-2010 John McCall <[email protected]>

one piece of code is responsible for the lifetime of every aggregate
slot. The easiest way to do that was to bundle up the information
we care about for aggregate slots into a new structure which de

one piece of code is responsible for the lifetime of every aggregate
slot. The easiest way to do that was to bundle up the information
we care about for aggregate slots into a new structure which demands
that its creators at least consider the question.

I could probably be convinced that the ObjC 'needs GC' bit should
be rolled into this structure.
Implement generalized copy elision. The main obstacle here is that
IR-generation must be much more careful about making sure that exactly

llvm-svn: 113962

show more ...


Revision tags: llvmorg-2.8.0-rc1
# 52bcf963 06-Sep-2010 Chris Lattner <[email protected]>

move the hackaround for PR6537 to catch unions as well,
fixing the ICE in PR7151

llvm-svn: 113130


# f53c0968 06-Sep-2010 Chris Lattner <[email protected]>

clean up some formatting.

llvm-svn: 113129


Revision tags: llvmorg-2.8.0-rc0
# e302792b 25-Aug-2010 John McCall <[email protected]>

GCC didn't care for my attempt at API compatibility, so brute-force everything
to the new constants.

llvm-svn: 112047


1...<<11121314151617181920