Mike Stump
df0fe27b66
Fixup the rest of the trivial cases of the codegen of volatile. If
...
any body can spot codegen bugs with volatile, or knows of any in the
bug database, let me know.
llvm-svn: 72572
2009-05-29 15:46:01 +00:00
Eli Friedman
2a69547f38
PR4281: Fix bogus CodeGen assertion. The issue is that
...
getUnqualifiedType() doesn't strip off all qualifiers for non-canonical
types.
llvm-svn: 72552
2009-05-28 23:04:00 +00:00
Mike Stump
01c2d0a17c
Not setting all the fields is confusing...
...
llvm-svn: 72506
2009-05-28 00:16:27 +00:00
Daniel Dunbar
16f422ec86
Fix a use-of-undefined, IRgen expects the RValue for "void" to be a scalar RValue.
...
llvm-svn: 72504
2009-05-27 23:45:33 +00:00
Fariborz Jahanian
7c1baf46d6
No write-barrier for initializations.
...
llvm-svn: 72492
2009-05-27 19:54:11 +00:00
Fariborz Jahanian
7551257f00
Change a confusing variable name.
...
llvm-svn: 72491
2009-05-27 19:48:48 +00:00
Anders Carlsson
ddcbfe7b53
IRgen support for calls to functions that return references to aggregate exressions.
...
llvm-svn: 72479
2009-05-27 16:45:02 +00:00
Eli Friedman
751aa72b72
Fix up constant expression handling to deal with the address
...
of a reference correctly.
llvm-svn: 72463
2009-05-27 06:04:58 +00:00
Eli Friedman
55422ad068
Add IRGen support for local variables of reference type.
...
llvm-svn: 72462
2009-05-27 05:39:06 +00:00
Eli Friedman
b909bf4937
Add IRGen support for return statements in functions with reference
...
type.
llvm-svn: 72459
2009-05-27 04:56:12 +00:00
Anders Carlsson
4034a95dc8
Handle operator call expressions where the callee is a member function.
...
llvm-svn: 72458
2009-05-27 04:18:27 +00:00
Anders Carlsson
d8b7ae205e
Functions that return references can be rvalues as well.
...
llvm-svn: 72457
2009-05-27 03:37:57 +00:00
Anders Carlsson
4ae70ff9a3
Add support for emitting calls to functions that return references (as lvalues only for now)
...
llvm-svn: 72449
2009-05-27 01:45:47 +00:00
Mike Stump
3e97f3b35d
Fix typo. I also fixed the hard to read case differences, so that no
...
one else is tempted to copy the style, incorrectly.
llvm-svn: 72448
2009-05-27 01:42:21 +00:00
Anders Carlsson
3a9463bfda
Rename an EmitCallExpr function to EmitCall to make it clear that it doesn't emit an expr.
...
llvm-svn: 72446
2009-05-27 01:22:39 +00:00
Mike Stump
ec3cbfe8c6
Fixup codegen for volatile structs in the trivial cases (a a=a and a=a=a).
...
llvm-svn: 72439
2009-05-26 22:03:21 +00:00
Daniel Dunbar
bee70bd1e7
Use .data() instead of &...[0].
...
- Just SmallVectors this time.
llvm-svn: 72432
2009-05-26 19:40:20 +00:00
Mike Stump
25306cacc6
Esnure that if we have a volatile structure as the destination, that
...
we actually have a destination.
llvm-svn: 72429
2009-05-26 18:57:45 +00:00
Daniel Dunbar
1518b64ddc
When trying to pass an argument on the stack, assume LLVM will do the right
...
thing for non-aggregate types.
- Otherwise we unnecessarily pin values to the stack and currently end up
triggering a backend bug in one case.
- This loose cooperation with LLVM to implement the ABI is pretty ugly.
- <rdar://problem/6918722> [irgen] clang miscompile of many pointer varargs on
x86-64
llvm-svn: 72419
2009-05-26 16:37:37 +00:00
Eli Friedman
895771aa4b
Handle the edge case of a weak function with incomplete type correctly.
...
Found by code inspection; I haven't seen this in real-world code.
llvm-svn: 72408
2009-05-26 01:22:57 +00:00
Mike Stump
b9f2518626
Propagate volatile for implicit property refernces.
...
llvm-svn: 72353
2009-05-23 23:52:31 +00:00
Mike Stump
9afc476d4a
Propagate volatile around for property references.
...
llvm-svn: 72352
2009-05-23 23:48:13 +00:00
Mike Stump
5e9e61b8d2
Track volatile aggregate copies better. I'm hoping someone else will decide
...
how to get the backend to know that the operation is volatile.
llvm-svn: 72348
2009-05-23 22:29:41 +00:00
Mike Stump
332ec2ce81
Fix thinko, and implement aggregate volatile reads.
...
llvm-svn: 72347
2009-05-23 22:01:27 +00:00
Mike Stump
23abd46b79
More volatile fixes. Can't testcase these yet as ultimately volatile
...
is still ignored.
llvm-svn: 72344
2009-05-23 21:40:07 +00:00
Mike Stump
ca9fc09c61
Collapse a few FIXMEs together and refactor to make fixing the code easier.
...
llvm-svn: 72342
2009-05-23 20:28:01 +00:00
Mike Stump
93700fc988
Add support for volatile RValues.
...
llvm-svn: 72341
2009-05-23 20:21:36 +00:00
Mike Stump
8673657275
One step to fixing up codegen for a=b, where a is a volatile struct.
...
llvm-svn: 72315
2009-05-23 04:13:59 +00:00
Daniel Dunbar
223db1c9e5
Initialize Obj-C GC attributes when emitting BlockDeclRefExprs.
...
- Otherwise we may incorrectly miss generation of some write barriers.
llvm-svn: 72313
2009-05-23 02:49:02 +00:00
Mike Stump
a35af82429
Fix typo.
...
llvm-svn: 72308
2009-05-23 02:02:29 +00:00
Fariborz Jahanian
a4404f21d1
This patch adds support for sender-aware dispatch in Objective-C for the GNU runtime, when
...
compiled with -fobjc-sender-dependent-dispatch. This is used in AOP, COP, implementing object
planes, and a few other things.
Patch by David Chisnall.
llvm-svn: 72275
2009-05-22 20:17:16 +00:00
Mike Stump
c63428b192
Fixup codegen for __block int i; i += rhs();. Should also slightly
...
improve codegen in some cases.
llvm-svn: 72273
2009-05-22 19:07:20 +00:00
Daniel Dunbar
499f3f9c5d
x86_64 ABI: Account for sret parameters consuming an integer register.
...
- PR4242.
llvm-svn: 72268
2009-05-22 17:33:44 +00:00
Sanjiv Gupta
47e296149e
Targets like PIC16 generate Static decls for automatic variables, emit the appropriate debug descriptor as well in that case.
...
llvm-svn: 72261
2009-05-22 13:54:25 +00:00
Torok Edwin
5b34933b90
Set correct calling convention even if there is a bitcast in the way.
...
This attempts to fix PR4239.
llvm-svn: 72251
2009-05-22 07:25:06 +00:00
Mike Stump
aed08f9929
Fixup blocks codegen for { __block i; i = rhs(); }, we want the rhs
...
evaluated first. This can also improve codegen just a bit as we might
have another register to play with for the evaluation of the rhs.
llvm-svn: 72226
2009-05-21 21:05:15 +00:00
Jay Foad
7d0479f2c2
Use v.data() instead of &v[0] when SmallVector v might be empty.
...
llvm-svn: 72210
2009-05-21 09:52:38 +00:00
Fariborz Jahanian
a6bed8370e
Minor refactoring. Uses an existing API to lookup a class method.
...
llvm-svn: 72203
2009-05-21 01:03:45 +00:00
Fariborz Jahanian
d20a03f308
This patch provides preliminary support for non-fragile instance variables on the GNU runtime.
...
It currently requires a patches to GNU libobjc (and so is not enabled by default) which are currently
being tested and reviewed by GNUstep before being pushed upstream.
This patch does not allow support for synthesized ivars, but does provide the infrastructure
needed for supporting them.
Patch by David Chisnall
llvm-svn: 72175
2009-05-20 18:41:51 +00:00
Eli Friedman
c21cb44de2
Handle the remaining unhandled cases in EmitReferenceBindingToExpr.
...
It would be nice if someone could write an ObjC++ testcase for the case
of passing a property returning a struct to a function taking a const
reference.
llvm-svn: 72159
2009-05-20 02:31:19 +00:00
Anders Carlsson
02bb7f0ac8
irgen for references to complex rvales (Very important...)
...
llvm-svn: 72157
2009-05-20 01:35:03 +00:00
Anders Carlsson
ad007d44b6
Create a temporary if the lvalue is a bitfield. Reported by Eli.
...
llvm-svn: 72155
2009-05-20 01:24:22 +00:00
Anders Carlsson
145eae5224
Add support for binding references to scalar rvalues.
...
llvm-svn: 72153
2009-05-20 01:03:17 +00:00
Anders Carlsson
7d4c083c19
Bind references to lvalues correctly.
...
llvm-svn: 72150
2009-05-20 00:36:58 +00:00
Anders Carlsson
6f5a015bd9
Add EmitReferenceBindingToExpr. Have EmitCallArg use it for now. Doesn't support anything but at least we don't crash ;)
...
llvm-svn: 72147
2009-05-20 00:24:07 +00:00
Anders Carlsson
2d228cef50
Improve support for irgen of references.
...
llvm-svn: 72133
2009-05-19 20:40:02 +00:00
Anders Carlsson
29a1be34b7
Only do the bitcast in EmitStoreOfScalar if the type is a boolean.
...
llvm-svn: 72125
2009-05-19 19:36:19 +00:00
Anders Carlsson
8370964257
Pass the destination QualType to EmitStoreOfScalar. No functionality change.
...
llvm-svn: 72118
2009-05-19 18:50:41 +00:00
Anders Carlsson
775640d248
Don't always zext the result of the not unary operator to an int.
...
llvm-svn: 72117
2009-05-19 18:44:53 +00:00
Anders Carlsson
c82b86dfaa
Have AggExprEmitter::VisitCXXConstructExpr make new variables if necessary. Stub out VisitCXXExprWithTemporaries.
...
llvm-svn: 72103
2009-05-19 04:48:36 +00:00