summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* IRgen: Tweak CGBitFieldInfo doxyments & add an accessor.Daniel Dunbar2010-04-141-0/+10
| | | | llvm-svn: 101221
* implement altivec.h and a bunch of support code, patch by Anton Yartsev!Chris Lattner2010-04-141-0/+44
| | | | llvm-svn: 101215
* IRgen: Move EmitLoadOfBitfieldLValue to use new CGBitfieldInfo::AccessInfo ↵Daniel Dunbar2010-04-131-51/+61
| | | | | | | | | | | | decomposition, instead of computing the access policy itself. - This lets the method focus slightly more on emitting clean IR to honor the policy which has been selected. On 403.gcc's combine.c, x86_64, -O0, this reduces the number of lines in the .ll file (~= # of instructions) by 2.5%. - No intended functionality change -- at -O3 this should produce equivalent if not identical output. On 403.gcc's combine.c, x86_64, -O3, this isn't quite true and some of the changes are regressions, but I'm not going to worry about that until we move to a new access policy. - There is still some room for improvement in the generated IR, in particular we can usually fold the sign-extension of the bit-field into one of the component access. See the FIXME. llvm-svn: 101192
* IRgen: Enhance CGBitFieldInfo with enough information to fully describe the ↵Daniel Dunbar2010-04-133-6/+159
| | | | | | | | | | "policy" with which a bit-field should be accessed. - For now, these policies are computed to match the current IRgen strategy, although the new information isn't being used yet (except in -fdump-record-layouts). - Design comments appreciated. llvm-svn: 101178
* Removes a FIXME.Fariborz Jahanian2010-04-131-4/+2
| | | | llvm-svn: 101161
* Variation of objc_copyStruct API generation whenFariborz Jahanian2010-04-132-7/+22
| | | | | | | property (atomic/nonatomic) is of aggregate type with gc'able member objects) (NeXT runtime). llvm-svn: 101156
* Rework the ConstStructBuilder code to emit missing initializerChris Lattner2010-04-131-25/+31
| | | | | | | | | | | | | | | | | | | | | | | | elements with explicit zero values instead of with tail padding. On an example like this: struct foo { int a; int b; }; struct foo fooarray[] = { {1, 2}, {4}, }; We now lay this out as: @fooarray = global [2 x %struct.foo] [%struct.foo { i32 1, i32 2 }, %struct.foo { i32 4, i32 0 }] instead of as: @fooarray = global %0 <{ %struct.foo { i32 1, i32 2 }, %1 { i32 4, [4 x i8] zeroinitializer } }> Preserving both the struct type of the second element, but also the array type of the entire thing. llvm-svn: 101155
* unbreak tests.Chris Lattner2010-04-131-6/+6
| | | | llvm-svn: 101153
* move a bunch of ConstStructBuilder methods out of line.Chris Lattner2010-04-131-260/+282
| | | | llvm-svn: 101152
* minor cleanupsChris Lattner2010-04-131-26/+28
| | | | llvm-svn: 101151
* Add support for objc_copyStruct to enforceFariborz Jahanian2010-04-132-1/+80
| | | | | | | atomicity of aggregate properties in setter/getter methods. wip. llvm-svn: 101107
* Fix debug info for cleanup block.Devang Patel2010-04-132-1/+6
| | | | llvm-svn: 101100
* fix PR6660/6168: emit padding as zeros instead of undef. Because Chris Lattner2010-04-121-3/+3
| | | | | | | | trailing fields may not be represented in initializer lists, they are being handled as padding and those fields *must* be zero initialized. llvm-svn: 101067
* IRgen: Factor out ComputeBitFieldInfo.Daniel Dunbar2010-04-121-18/+21
| | | | llvm-svn: 101066
* Add some API code for future work.Fariborz Jahanian2010-04-123-0/+37
| | | | llvm-svn: 101052
* IRgen: Add CGRecordLayout::dump, and dump (irgen) record layouts as part of ↵Daniel Dunbar2010-04-122-1/+47
| | | | | | -fdump-record-layouts. llvm-svn: 101051
* Have the CXXBaseOrMemberInitializer keep track of whether an initializer ↵Anders Carlsson2010-04-121-11/+1
| | | | | | initializes a virtual base or not. llvm-svn: 101004
* Fix another bug where we wouldn't generate secondary vtables for ↵Anders Carlsson2010-04-111-5/+9
| | | | | | construction vtables in some cases. llvm-svn: 100998
* More renames.Anders Carlsson2010-04-111-46/+46
| | | | llvm-svn: 100991
* Rename a function parameter.Anders Carlsson2010-04-111-6/+10
| | | | llvm-svn: 100990
* Clarify an assertion.Anders Carlsson2010-04-111-1/+2
| | | | llvm-svn: 100986
* Fix a bug where we were adding too many vcall offsets in some cases.Anders Carlsson2010-04-111-20/+7
| | | | llvm-svn: 100985
* Enable an assert and remove a now unnecessary assert.Anders Carlsson2010-04-101-12/+0
| | | | llvm-svn: 100953
* Fix a bug where we would add the same function twice in a vtable.Anders Carlsson2010-04-101-18/+20
| | | | llvm-svn: 100949
* revert 100942, pending discussion.Chris Lattner2010-04-101-1/+1
| | | | llvm-svn: 100946
* Rename VtableComponent and VtableBuilder.Anders Carlsson2010-04-101-90/+90
| | | | llvm-svn: 100945
* Fix for PR6811.David Chisnall2010-04-101-1/+1
| | | | llvm-svn: 100942
* fix PR6805: llvm.objectsize changed to take an i1 instead of an i32.Chris Lattner2010-04-101-8/+5
| | | | llvm-svn: 100938
* A bunch of string-related microoptimizations in Mangler.Benjamin Kramer2010-04-101-22/+22
| | | | llvm-svn: 100928
* Fix use after free. Incrementing an use_iterator after its user is erased is ↵Benjamin Kramer2010-04-101-3/+4
| | | | | | unsafe. llvm-svn: 100926
* Doug pointed out that we have a perfectly reasonable expression here toJohn McCall2010-04-101-2/+4
| | | | | | serve as a source of source locations for the can't-yet-mangle diagnostic. llvm-svn: 100924
* rely even less on CallInst internalsGabor Greif2010-04-101-7/+6
| | | | llvm-svn: 100919
* do not rely on CallInst interna, use CallSite to access argumentsGabor Greif2010-04-101-1/+3
| | | | llvm-svn: 100918
* Mangle some expressions with codegen implications but no mangling "overhead".John McCall2010-04-091-0/+12
| | | | llvm-svn: 100909
* Provide an extremely unsatisfactory diagnostic (instead of crashing) whenJohn McCall2010-04-093-4/+23
| | | | | | | mangling an unknown expression kind. Also conveniently tells the user what kind of expression they should add to the mangler! llvm-svn: 100907
* Provide manglings for bool and character literal expressions. These areJohn McCall2010-04-091-0/+13
| | | | | | | | just integer-literal expressions with special case implementations in the AST. Fixes rdar://problem/7825453. llvm-svn: 100905
* Rename CGVtable files to CGVTables.Anders Carlsson2010-04-085-5/+5
| | | | llvm-svn: 100778
* Clarify an assert.Anders Carlsson2010-04-081-0/+3
| | | | llvm-svn: 100776
* Unbreak the buildDouglas Gregor2010-04-081-1/+2
| | | | llvm-svn: 100775
* Eliminate excessive PCH deserialization caused by the search forDouglas Gregor2010-04-083-36/+12
| | | | | | | | | | | | | | | | | | | | | | __cxxabiv1::__fundamental_type_info in every translation unit. Previously, we would perform name lookup for __cxxabiv1::__fundamental_type_info at the end of IRGen for a each translation unit, to determine whether it was present. If so, we we produce type information for all of the fundamental types. However, this name lookup causes PCH deserialization of a significant part of the translation unit, which has a woeful impact on performance. With this change, we now look at each record type after we've generated its vtable to see if it is __cxxabiv1::__fundamental_type_info. If so, we generate type info for all of the fundamental types. This works because __cxxabiv1::__fundamental_type_info should always have a key function (typically the virtual destructor), that will be defined once in the support library. The fundamental type information will end up there. Fixes <rdar://problem/7840011>. llvm-svn: 100772
* IRgen: Move the bit-field access type into CGBitFieldInfo, and change ↵Daniel Dunbar2010-04-085-27/+39
| | | | | | bit-field LValues to just store the base address of object containing the bit-field. llvm-svn: 100745
* @llvm.sqrt isn't really close enough to C's sqrt to justify emitting callsJohn McCall2010-04-071-7/+6
| | | | | | | | to the intrinsic, even when math-errno is off. Fixes rdar://problem/7828230 by falling back on the library function. llvm-svn: 100613
* a ridiculous amount of propagation through the backend later, Chris Lattner2010-04-071-2/+9
| | | | | | | | | | | | | | | | have the code generate slap a srcloc metadata on inline asm nodes. This allows us to diagnose invalid inline asms with such nice diagnostics as: <inline asm>:1:2: error: unrecognized instruction abc incl %eax ^ asm.c:2:12: note: generated from here __asm__ ("abc incl %0" : "+r" (X)); ^ 2 diagnostics generated. llvm-svn: 100608
* fit in 80 colsChris Lattner2010-04-061-2/+3
| | | | llvm-svn: 100534
* IRgen: Move BitFieldIsSigned bit into CGBitFieldInfo.Daniel Dunbar2010-04-065-23/+22
| | | | llvm-svn: 100513
* Simplify.Daniel Dunbar2010-04-061-28/+11
| | | | llvm-svn: 100512
* Simplify.Daniel Dunbar2010-04-061-6/+2
| | | | llvm-svn: 100511
* IRgen: Move BitField LValues to just hold a reference to the CGBitFieldInfo.Daniel Dunbar2010-04-055-43/+52
| | | | | | | | | - Unfortunately, this requires some horrible code in CGObjCMac which always allocats a CGBitFieldInfo because we don't currently build a proper layout for Objective-C classes. It needs to be cleaned up, but I don't want the bit-field cleanups to be blocked on that. llvm-svn: 100474
* Emit debug info for objc getters and setters.Devang Patel2010-04-052-4/+7
| | | | llvm-svn: 100462
* IRgen: Lift BitFieldInfo to CGBitFieldInfo at namespace level.Daniel Dunbar2010-04-054-18/+16
| | | | llvm-svn: 100433
OpenPOWER on IntegriCloud