| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
union type variables and their nesting inside other
aggregate types.
llvm-svn: 110448
|
|
|
|
|
|
| |
(objc gc and blocks in NeXt runtime).
llvm-svn: 110377
|
|
|
|
| |
llvm-svn: 110287
|
|
|
|
|
|
|
|
|
|
|
| |
ObjC exceptions:
- don't enter a try for the catch blocks unless there's a finally
- put the setjmp buffer in the locals set for liveness reasons
- dump the sync object into an alloca in the locals set for liveness reasons
Some of this can go away if the backend starts to properly calculate liveness
in the presence of setjmp (which would also be a *much* stabler solution).
llvm-svn: 110188
|
|
|
|
|
|
|
|
|
| |
the magic of inline assembly. Essentially we use read and write hazards
on the set of local variables to force flushing locals to memory
immediately before any protected calls and to inhibit optimizing locals
across the setjmp->catch edge. Fixes rdar://problem/8160285
llvm-svn: 109960
|
|
|
|
|
|
|
| |
sections on", this change uncovered a possible linker bug which resulted in the
wrong messages getting dispatched. Backing this out while we investigate...
llvm-svn: 109817
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for return values too. Instead of compiling something like:
struct foo {
int *X;
float *Y;
};
struct foo test(struct foo *P) { return *P; }
to:
%1 = type { i64, i64 }
define %1 @test(%struct.foo* %P) nounwind {
entry:
%retval = alloca %struct.foo, align 8 ; <%struct.foo*> [#uses=2]
%P.addr = alloca %struct.foo*, align 8 ; <%struct.foo**> [#uses=2]
store %struct.foo* %P, %struct.foo** %P.addr
%tmp = load %struct.foo** %P.addr ; <%struct.foo*> [#uses=1]
%tmp1 = bitcast %struct.foo* %retval to i8* ; <i8*> [#uses=1]
%tmp2 = bitcast %struct.foo* %tmp to i8* ; <i8*> [#uses=1]
call void @llvm.memcpy.p0i8.p0i8.i64(i8* %tmp1, i8* %tmp2, i64 16, i32 8, i1 false)
%0 = bitcast %struct.foo* %retval to %1* ; <%1*> [#uses=1]
%1 = load %1* %0, align 1 ; <%1> [#uses=1]
ret %1 %1
}
We now get the result more type safe, with:
define %struct.foo @test(%struct.foo* %P) nounwind {
entry:
%retval = alloca %struct.foo, align 8 ; <%struct.foo*> [#uses=2]
%P.addr = alloca %struct.foo*, align 8 ; <%struct.foo**> [#uses=2]
store %struct.foo* %P, %struct.foo** %P.addr
%tmp = load %struct.foo** %P.addr ; <%struct.foo*> [#uses=1]
%tmp1 = bitcast %struct.foo* %retval to i8* ; <i8*> [#uses=1]
%tmp2 = bitcast %struct.foo* %tmp to i8* ; <i8*> [#uses=1]
call void @llvm.memcpy.p0i8.p0i8.i64(i8* %tmp1, i8* %tmp2, i64 16, i32 8, i1 false)
%0 = load %struct.foo* %retval ; <%struct.foo> [#uses=1]
ret %struct.foo %0
}
That memcpy is completely terrible, but I don't know how to fix it.
llvm-svn: 109729
|
|
|
|
|
|
|
|
| |
use of property-dot syntax using 'super' as receiver
is 'void'. This fixes a bug in generating correct
API for setter call. Fixes radar 8203426.
llvm-svn: 109297
|
|
|
|
|
|
|
| |
as well as some significant asymptotic inefficiencies with threading
multiple jumps through deep cleanups.
llvm-svn: 109274
|
|
|
|
|
|
| |
ObjC ABI version 2 this time.
llvm-svn: 108847
|
|
|
|
| |
llvm-svn: 108766
|
|
|
|
| |
llvm-svn: 108754
|
|
|
|
| |
llvm-svn: 108713
|
|
|
|
|
|
| |
multiple reasons. Rethrow with _objc_exception_throw instead. Fixes PR7656.
llvm-svn: 108595
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
mostly in avoiding unnecessary work at compile time but also in producing more
sensible block orderings.
Move the destructor cleanups for local variables over to use lazy cleanups.
Eventually all cleanups will do this; for now we have some awkward code
duplication.
Tell IR generation just to never produce landing pads in -fno-exceptions.
This is a much more comprehensive solution to a problem which previously was
half-solved by checks in most cleanup-generation spots.
llvm-svn: 108270
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
self-host. Hopefully these results hold up on different platforms.
I tried to keep the GNU ObjC runtime happy, but it's hard for me to test.
Reimplement how clang generates IR for exceptions. Instead of creating new
invoke destinations which sequentially chain to the previous destination,
push a more semantic representation of *why* we need the cleanup/catch/filter
behavior, then collect that information into a single landing pad upon request.
Also reorganizes how normal cleanups (i.e. cleanups triggered by non-exceptional
control flow) are generated, since it's actually fairly closely tied in with
the former. Remove the need to track which cleanup scope a block is associated
with.
Document a lot of previously poorly-understood (by me, at least) behavior.
The new framework implements the Horrible Hack (tm), which requires every
landing pad to have a catch-all so that inlining will work. Clang no longer
requires the Horrible Hack just to make exceptions flow correctly within
a function, however. The HH is an unfortunate requirement of LLVM's EH IR.
llvm-svn: 107631
|
|
|
|
|
|
|
|
| |
complex values either. Previously we did this properly for regular assignment,
but not for compound assignment.
- Also, tidy up assignment code a bit to look more like the scalar path.
llvm-svn: 107217
|
|
|
|
|
|
|
|
| |
would trigger an extra method call).
- While in the area, I also changed Clang to not emit an unnecessary load from
'x' in cases like 'y = (x = 1)'.
llvm-svn: 107210
|
|
|
|
| |
llvm-svn: 106553
|
|
|
|
|
|
|
| |
category implementation whereby property list was missing.
NeXt ObjC runtime (radar 8093297).
llvm-svn: 106550
|
|
|
|
| |
llvm-svn: 106522
|
|
|
|
| |
llvm-svn: 106494
|
|
|
|
| |
llvm-svn: 106118
|
|
|
|
|
|
|
| |
type of rhs need be compared to setter's argument and
not the getter type. Fixes radar 8062778
llvm-svn: 105560
|
|
|
|
|
|
|
|
| |
an existing ir for load of a bock variable. This cannot be
done across basic blocks.
Fixes radar 8064140.
llvm-svn: 105549
|
|
|
|
|
|
| |
the encoding used by GCC.
llvm-svn: 105451
|
|
|
|
| |
llvm-svn: 104618
|
|
|
|
| |
llvm-svn: 104319
|
|
|
|
|
|
|
|
|
|
| |
'self' variable arising from uses of the 'super' keyword. Also reorganize
some code so that BlockInfo (now CGBlockInfo) can be opaque outside of
CGBlocks.cpp.
Fixes rdar://problem/8010633.
llvm-svn: 104312
|
|
|
|
|
|
| |
classes whose base class have GC'able object pointers.
llvm-svn: 104296
|
|
|
|
|
|
| |
in Objective-C++ mode.
llvm-svn: 104281
|
|
|
|
| |
llvm-svn: 104253
|
|
|
|
| |
llvm-svn: 104176
|
|
|
|
|
|
| |
Fixes rdar://problem/7992749
llvm-svn: 103965
|
|
|
|
|
|
|
|
|
| |
user directive is needed to force a property implementation.
It is decided based on those propeties which are declared in
the class (or in its protocols) but not those which must be
default implemented by one of its super classes. Implements radar 7923851.
llvm-svn: 103787
|
|
|
|
| |
llvm-svn: 103487
|
|
|
|
| |
llvm-svn: 103446
|
|
|
|
|
|
| |
This fixes radar 7959934.
llvm-svn: 103408
|
|
|
|
| |
llvm-svn: 102357
|
|
|
|
| |
llvm-svn: 102332
|
|
|
|
|
|
|
|
|
| |
- Fix some places that had the alignment hard coded.
- Use ABI type alignment, not preferred type alignment -- neither of this is exactly right, as we really want the C type alignment as required by the runtime, but the ABI alignment is a more correct choice.
This should be equivalent for x86_64, but fixes the alignment for ARM.
llvm-svn: 102314
|
|
|
|
| |
llvm-svn: 102313
|
|
|
|
|
|
| |
fixes Clang to correctly emit the "CorrectedSynthesize" bit when using the non-fragile ABI.
llvm-svn: 102312
|
|
|
|
|
|
|
|
|
|
| |
- Replace -cc1 level -fobjc-legacy-dispatch with -fobjc-dispatch-method={legacy,non-legacy,mixed}.
- Lift "mixed" vs "non-mixed" policy choice up to driver level, instead of being buried in CGObjCMac.cpp.
- No intended functionality change.
llvm-svn: 102255
|
|
|
|
|
|
|
| |
chain outwards when inside a nested exception scope.
- A real test for this is going into LLVM test-suite.
llvm-svn: 102204
|
|
|
|
|
|
|
|
|
| |
This mirror's Dan's patch for llvm-gcc in r97989, and
fixes the miscompilation in PR6525. There is some contention
over whether this is the right thing to do, but it is the
conservative answer and demonstrably fixes a miscompilation.
llvm-svn: 101877
|
|
|
|
| |
llvm-svn: 101797
|
|
|
|
|
|
|
| |
in for pre-snowleoprd (NeXt runtime). Fixes
radar 7866951
llvm-svn: 101791
|
|
|
|
|
|
|
| |
property (atomic/nonatomic) is of aggregate type with
gc'able member objects) (NeXT runtime).
llvm-svn: 101156
|
|
|
|
|
|
| |
why it keeps failing on buildbot (but not for me).
llvm-svn: 101115
|