| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
modify the semantics slightly to accomodate default constructors (I
hope).
llvm-svn: 131087
|
|
|
|
| |
llvm-svn: 130550
|
|
|
|
|
|
|
|
| |
rhs when its 'forwarding' pointer may be modified
in rhs evaluation as result of call to Block_copy.
// rdar://9309454
llvm-svn: 130545
|
|
|
|
|
|
|
| |
-C++ objects with user-declared constructor don't need zero'ing.
-We can zero-initialize arrays of C++ objects in "bulk" now, in which case don't zero-initialize each object again.
llvm-svn: 130453
|
|
|
|
| |
llvm-svn: 130427
|
|
|
|
|
|
|
|
|
|
| |
initializer make sure
that a non-trivial C++ constructor gets called.
Fixes rdar://9347552 & http://llvm.org/PR9801
llvm-svn: 130421
|
|
|
|
|
|
| |
change in functionality intended.
llvm-svn: 130113
|
|
|
|
|
|
| |
No change in functionality intended.
llvm-svn: 130112
|
|
|
|
|
|
| |
change in functionality intended.
llvm-svn: 130111
|
|
|
|
|
|
| |
EmitFinalDestCopy() to CharUnits. No change in functionality intended.
llvm-svn: 130110
|
|
|
|
|
|
|
| |
ASTContext::getTypeSize() when only the size part is used. No change in
functionality intended.
llvm-svn: 130109
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
double data[20000000] = {0};
we would blow out the memory by creating 20M Exprs to fill out the initializer.
To fix this, if the initializer list initializes an array with more elements than
there are initializers in the list, have InitListExpr store a single 'ArrayFiller' expression
that specifies an expression to be used for value initialization of the rest of the elements.
Fixes rdar://9275920.
llvm-svn: 129896
|
|
|
|
|
|
|
| |
As an extension, generic selection support has been added for all
supported languages. The syntax is the same as for C1X.
llvm-svn: 129554
|
|
|
|
|
|
|
|
|
| |
because the result is ignored. The particular example here is with
property l-values, but there could be all sorts of lovely casts that this
isn't safe for. Sink the check into the one case that seems to actually
be capable of honoring this.
llvm-svn: 129397
|
|
|
|
|
|
|
|
|
| |
for __unknown_anytype resolution to destructively modify the AST. So that's
what it does now, which significantly simplifies some of the implementation.
Normal member calls work pretty cleanly now, and I added support for
propagating unknown-ness through &.
llvm-svn: 129331
|
|
|
|
| |
llvm-svn: 129269
|
|
|
|
| |
llvm-svn: 129265
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
represents a dynamic cast where we know that the result is always null.
For example:
struct A {
virtual ~A();
};
struct B final : A { };
struct C { };
bool f(B* b) {
return dynamic_cast<C*>(b);
}
llvm-svn: 129256
|
|
|
|
|
|
|
|
|
|
|
|
| |
The idea is that you can create a VarDecl with an unknown type, or a
FunctionDecl with an unknown return type, and it will still be valid to
access that object as long as you explicitly cast it at every use. I'm
still going back and forth about how I want to test this effectively, but
I wanted to go ahead and provide a skeletal implementation for the LLDB
folks' benefit and because it also improves some diagnostic goodness for
placeholder expressions.
llvm-svn: 129065
|
|
|
|
|
|
| |
for prperty reference types. // rdar://9208606.
llvm-svn: 128551
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
class and to bind the shared value using OpaqueValueExpr. This fixes an
unnoticed problem with deserialization of these expressions where the
deserialized form would lose the vital pointer-equality trait; or rather,
it fixes it because this patch also does the right thing for deserializing
OVEs.
Change OVEs to not be a "temporary object" in the sense that copy elision is
permitted.
This new representation is not totally unawkward to work with, but I think
that's really part and parcel with the semantics we're modelling here. In
particular, it's much easier to fix things like the copy elision bug and to
make the CFG look right.
I've tried to update the analyzer to deal with this in at least some
obvious cases, and I think we get a much better CFG out, but the printing
of OpaqueValueExprs probably needs some work.
llvm-svn: 125744
|
|
|
|
| |
llvm-svn: 125661
|
|
|
|
|
|
|
|
| |
Block{Function,Module} base class. Minor other refactorings.
Fixed a few address-space bugs while I was there.
llvm-svn: 125085
|
|
|
|
|
|
|
|
| |
I'm separately committing this because it incidentally changes some
block orderings and minor IR issues, like using a phi instead of
an unnecessary alloca.
llvm-svn: 124277
|
|
|
|
|
|
| |
Fixes PR8967.
llvm-svn: 123360
|
|
|
|
| |
llvm-svn: 122634
|
|
|
|
|
|
| |
reason this is limited to C++, and it's certainly not limited to temporaries.
llvm-svn: 120996
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
the l-value.
llvm-svn: 120884
|
|
|
|
| |
llvm-svn: 120746
|
|
|
|
|
|
| |
structs with references in them correctly.
llvm-svn: 120722
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
ObjCPropertyRefExpr
into the latter.
llvm-svn: 120643
|
|
|
|
| |
llvm-svn: 120555
|
|
|
|
| |
llvm-svn: 120433
|
|
|
|
|
|
| |
about the reliability of this yet.
llvm-svn: 120422
|
|
|
|
|
|
| |
branches. Fixes PR8623.
llvm-svn: 119408
|
|
|
|
| |
llvm-svn: 119331
|
|
|
|
|
|
| |
the patch.
llvm-svn: 117159
|
|
|
|
|
|
| |
statement expressions, //rdar: //8540501
llvm-svn: 117146
|
|
|
|
|
|
|
| |
brokenness in the designated-initializer ASTs. The ASTs were fixed by
Alp Toker's patch (r116098) for PR6955. Fixes PR6537.
llvm-svn: 116101
|
|
|
|
|
|
| |
Prospective fix for broken commit in r114045.
llvm-svn: 114060
|
|
|
|
|
|
| |
AggValueSlot slot.
llvm-svn: 114045
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
fixing the ICE in PR7151
llvm-svn: 113130
|
|
|
|
| |
llvm-svn: 113129
|
|
|
|
|
|
| |
to the new constants.
llvm-svn: 112047
|
|
|
|
|
|
|
|
| |
but not in C++, so don't emit aggregate loads of volatile references
in null context in C++. Happens to have been caught by an assertion.
We do not get the scalar case right. Volatiles are really broken.
llvm-svn: 112019
|