aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
AgeCommit message (Collapse)Author
2009-05-23Fix thinko, and implement aggregate volatile reads.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72347 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-23More volatile fixes. Can't testcase these yet as ultimately volatileMike Stump
is still ignored. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72344 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-23Collapse a few FIXMEs together and refactor to make fixing the code easier.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72342 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-23Add support for volatile RValues.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72341 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-23One step to fixing up codegen for a=b, where a is a volatile struct.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72315 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-23Initialize Obj-C GC attributes when emitting BlockDeclRefExprs.Daniel Dunbar
- Otherwise we may incorrectly miss generation of some write barriers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72313 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-23Fix typo.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72308 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-22This patch adds support for sender-aware dispatch in Objective-C for the GNU ↵Fariborz Jahanian
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72275 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-22Fixup codegen for __block int i; i += rhs();. Should also slightlyMike Stump
improve codegen in some cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72273 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-22x86_64 ABI: Account for sret parameters consuming an integer register.Daniel Dunbar
- PR4242. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72268 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-22Targets like PIC16 generate Static decls for automatic variables, emit the ↵Sanjiv Gupta
appropriate debug descriptor as well in that case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72261 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-22Set correct calling convention even if there is a bitcast in the way.Torok Edwin
This attempts to fix PR4239. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72251 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-21Fixup blocks codegen for { __block i; i = rhs(); }, we want the rhsMike Stump
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72226 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-21Use v.data() instead of &v[0] when SmallVector v might be empty.Jay Foad
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72210 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-21Minor refactoring. Uses an existing API to lookup a class method.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72203 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-20This patch provides preliminary support for non-fragile instance variables ↵Fariborz Jahanian
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72175 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-20Handle the remaining unhandled cases in EmitReferenceBindingToExpr.Eli Friedman
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72159 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-20irgen for references to complex rvales (Very important...)Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72157 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-20Create a temporary if the lvalue is a bitfield. Reported by Eli.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72155 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-20Add support for binding references to scalar rvalues.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72153 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-20Bind references to lvalues correctly.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72150 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-20Add EmitReferenceBindingToExpr. Have EmitCallArg use it for now. Doesn't ↵Anders Carlsson
support anything but at least we don't crash ;) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72147 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-19Improve support for irgen of references.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72133 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-19Only do the bitcast in EmitStoreOfScalar if the type is a boolean.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72125 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-19Pass the destination QualType to EmitStoreOfScalar. No functionality change.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72118 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-19Don't always zext the result of the not unary operator to an int.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72117 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-19Have AggExprEmitter::VisitCXXConstructExpr make new variables if necessary. ↵Anders Carlsson
Stub out VisitCXXExprWithTemporaries. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72103 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-19Clean up some unnecessary includes.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72101 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-19This patch allows clang to generate code for declared properties on the GNU ↵Fariborz Jahanian
runtime. As with @synchronized, this requires some extra functions that are included with other libraries (not with the GNU runtime itself) and so will cause linker errors when these are not present. Patch by David Chisnall. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72079 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-18Debug info: Initialize runtime language field correctly for Objective-CDaniel Dunbar
interface types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72036 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-18Since we miscompile many cases when declaring a variable with a reference ↵Anders Carlsson
type, make them unsupported for now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72034 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-18Remove an unused builtin.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72033 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-18Add 'cmp' SSE builtins and get rid of a bunch of other builtins.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72032 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-17Add support for converting member pointer types to LLVM types. Also mangle ↵Anders Carlsson
pointer to member functions correctly and add tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71981 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-17This patch fixes two bugs in the GNU Objective-C runtime implementation. ↵Fariborz Jahanian
One is a case in rethrowing exceptions where the C types don't match correctly (I already sent this patch to Daniel Dunbar, who found the bug, so it may have already been committed). The other fixes the case properties so that the methods generated as property accessors are added to the class structure correctly. Patch by David Chisnall. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71980 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-16extern "C" should preserve the 'extern' qualifier for VarDecls. Fixes 6853728.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71957 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-16Reflow some comments.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71937 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-15Classes with "+load" methods need to go in the non-lazy class list (orDaniel Dunbar
else the method will not be found by the runtime at class load time). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71904 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-15Factor code for adding module-level class lists into separate method.Daniel Dunbar
- No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71898 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-15A C++ member function always has either weak linkage (if it's inline or ↵Anders Carlsson
defined inline) or strong linkage (other cases). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71873 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-15Name mangling for class template specializations and template arguments.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71861 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-15Fixup debug information for the location information for __blockMike Stump
variables. For this to work, the backend needs to handle more complex forms for locations. A typical utterance would be: %forwarding = getelementptr %0* %use_by_ref, i32 0, i32 1 ; <i8**> [#uses=1] %0 = load i8** %forwarding ; <i8*> [#uses=1] %1 = bitcast i8* %0 to %0* ; <%0*> [#uses=1] %x = getelementptr %0* %1, i32 0, i32 4 ; <i32*> [#uses=1] %2 = bitcast i32* %x to { }* ; <{ }*> [#uses=1] call void @llvm.dbg.declare({ }* %2, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable to { }*)) Presently when selection finds something it doesn't understand, it just avoids generating any information, which is safe, just incomplete. Radar 6867696 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71824 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-14Skip the asm prefix when storing the name in block info.Daniel Dunbar
- Otherwise we emit internal names with embedded '\01' characters, which confuses some tools. - Ideally all the code which wants to get a "display name" for the given function should follow one code path, but this should be a monotonic improvement for now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71774 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-14Enhance debug information for block literals. Radar 6867696Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71763 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-14We need to specify the "linkage name" to the subprogram now that weDaniel Dunbar
emit the correct "display name". I suspect we need more work here, see FIXME for example. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71761 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-13Make sure not to include the LLVM asm prefix in function names forDaniel Dunbar
debug info. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71736 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-13ABI handling: Fix invalid assertion, it is possible for a validDaniel Dunbar
coercion to be specified which truncates padding bits. It would be nice to still have the assert, but we don't have any API call for the unpadding size of a type yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71695 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-13Removed 4-letter :) word in comment.Fariborz Jahanian
Used simple array for Selector build. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71674 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-13implement __sync_synchronize and __sync_lock_release,Chris Lattner
rdar://6880573 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71637 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-13add support for __sync_nand_and_fetch and __sync_fetch_and_nand,Chris Lattner
rdar://6880573 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71636 91177308-0d34-0410-b5e6-96231b3b80d8