summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenObjC
Commit message (Collapse)AuthorAgeFilesLines
* Add more attributes from the command line to functions.Bill Wendling2013-02-255-20/+14
| | | | | | | This is an ongoing process. Any command line option which a back-end cares about should be added here. llvm-svn: 176009
* Update tests so that we don't test for function-only attributes on call sites.Bill Wendling2013-02-221-3/+3
| | | | llvm-svn: 175921
* Update to use references to attribute groups instead of listing the ↵Bill Wendling2013-02-2214-80/+104
| | | | | | attributes on the call/invoke instructions. llvm-svn: 175878
* Patch for debug info of qualified-id types is 'id'Fariborz Jahanian2013-02-211-0/+41
| | | | | | By Adrian Pranti. llvm-svn: 175793
* objective-C arc IR-gen. Retaining of strongFariborz Jahanian2013-02-216-13/+15
| | | | | | | | | | arguments in function prologue is done with objc_StoreStrong to pair it with similar objc_StoreStrong for release in function epilogue. This is done with -O0 only. // rdar://13145317 llvm-svn: 175698
* Modify the tests to use attribute group references instead of listing theBill Wendling2013-02-205-9/+27
| | | | | | function attributes. llvm-svn: 175606
* Use the actual class visibility for the ObjC EHTYPE global,John McCall2013-02-191-0/+27
| | | | | | | | not the global visibility mode. Noticed by inspection. llvm-svn: 175479
* CodeGenFunction::CurFuncDecl can be NULL; fix crash introduced in r175386.Douglas Gregor2013-02-181-1/+13
| | | | llvm-svn: 175448
* Update test cases to account for DIBuilder type changes.David Blaikie2013-02-182-2/+2
| | | | | | Paired commit with LLVM, may produce temporary build breakage. llvm-svn: 175427
* Test ivar-invariant.m: use a more idiomatic RUN line and tighten the testDmitri Gribenko2013-02-171-1/+4
| | | | | | by matching the function name first llvm-svn: 175395
* [clang] fix test execution commandSaleem Abdulrasool2013-02-171-1/+1
| | | | | Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org> llvm-svn: 175387
* [CodeGen] tighten objc ivar invariant.load attributionSaleem Abdulrasool2013-02-171-0/+53
| | | | | | | | | | | | | | | | | An ivar ofset cannot be marked as invariant load in all cases. The ivar offset is a lazily initialised constant, which is dependent on an objc_msgSend invocation to perform a fixup of the offset. If the load is being performed on a method implemented by the class then this load can safely be marked as an inviarant because a message must have been passed to the class at some point, forcing the ivar offset to be resolved. An additional heuristic that can be used to identify an invariant load would be if the ivar offset base is a parameter to an objc method. However, without the parameters available at hand, this is currently not possible. Reviewed-by: John McCall <rjmccall@apple.com> Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org> llvm-svn: 175386
* Add the 'target-cpu' and 'target-features' attributes to functions.Bill Wendling2013-02-153-7/+7
| | | | | | | The back-end will use these values to reconfigure code generation for different features. llvm-svn: 175308
* objective-C: Fixes a compiler crash when encodingFariborz Jahanian2013-02-151-0/+18
| | | | | | | an ivar of type pointer to a typedef'ed object. // rdar://13190095 llvm-svn: 175298
* Make this test determinstic for my last patch.Fariborz Jahanian2013-02-141-18/+18
| | | | | | // rdar://13192366 llvm-svn: 175217
* objective-C: Make order of ivars which are synthesizedFariborz Jahanian2013-02-131-0/+58
| | | | | | | | in the course of property synthesis deterministic (ordered by their type size), instead of having hashtable order (as it is currently). // rdar://13192366 llvm-svn: 175100
* Properly assemble PHIs after a null-checked invoke of objc_msgSend.John McCall2013-02-122-18/+68
| | | | | | rdar://12046763 llvm-svn: 174946
* In ARC, emit non-peepholed +1s within the full-expression insteadJohn McCall2013-02-121-0/+39
| | | | | | of immediately afterwards. llvm-svn: 174922
* Split a couple of tests out into their own file.John McCall2013-02-122-93/+95
| | | | llvm-svn: 174921
* Changed CGObjCMac.cpp to add the marker externally_initialized to ↵Michael Gottesman2013-02-054-8/+16
| | | | | | | | | | | | | SELECTOR_REFERENCES in both the fragile and non-fragile API. This is to ensure that GlobalOpt in LLVM does not attempt to look through a selector reference to a method var name at compile time. I also added a test/updated old tests that need to recognize the new keyword. rdar://12580965. llvm-svn: 174461
* On platforms which do not support ARC natively, do not mark ↵Michael Gottesman2013-02-021-3/+31
| | | | | | | | | objc_retain/objc_release as "nonlazybind". rdar://13108298. rdar://13129783. llvm-svn: 174253
* Generalize DebugInfo tests by avoiding explicit metadata numbersDavid Blaikie2013-02-025-10/+13
| | | | | | | | | | | | | | | This addresses several (not all) debug info tests that use explicit metadata numbers. Wherever the same number appeared more than once in a test I used a named match to ensure the same number appeared in all those cases (this may still be overly constraining test cases as they may not have actually cared about that relationship). For one-off numbers I just replaced them with an unnamed regex. This may underconstrain poorly written test cases that were interested in checking that certain metadata nodes were related but didn't actually match on all the related nodes numbers. llvm-svn: 174247
* Tests: remove disabled llvm-gcc invocationsDmitri Gribenko2013-01-287-7/+0
| | | | llvm-svn: 173703
* PR14566: Debug Info: avoid top level lexical blocks in functionsDavid Blaikie2013-01-261-2/+1
| | | | | | | | | | | | | | | One of the gotchas (see changes to CodeGenFunction) was due to the fix in r139416 (for PR10829). This only worked previously because the top level lexical block would set the location to the end of the function, the debug location would be updated (as per r139416), the location would be set to the end of the function again (but that would no-op, since it was the same as the previous location), then the return instruction would be emitted using the debug location. Once the top level lexical block was no longer emitted, the end-of-function location change was causing the debug loc to be updated, regressing that bug. llvm-svn: 173593
* objC block layout: Patch reorders block layout to Fariborz Jahanian2013-01-176-161/+116
| | | | | | produce more inline layout metadata. // rdar://12752901 llvm-svn: 172683
* Enable the new (more C++-like, less broken) EH model when targeting the GNUstepDavid Chisnall2013-01-111-0/+3
| | | | | | Objective-C runtime 1.7 or greater. llvm-svn: 172207
* In my last patch initialize the destination to null (with a simple store) ↵Fariborz Jahanian2013-01-051-0/+1
| | | | | | | | before doing a storeStrong to it. // rdar://12530881 llvm-svn: 171572
* Fix testing case for Release build (r171493)Manman Ren2013-01-051-2/+3
| | | | | | rdar://11562117 llvm-svn: 171564
* objective-C arc: in copy helper function for Fariborz Jahanian2013-01-041-0/+14
| | | | | | | | | __strong __block variables, perform objc_storeStrong on source and destination instead of direct move. This is done with -O0 and to improve some analysis. // rdar://12530881 llvm-svn: 171555
* Debug Info: fix the line location for cleanup code of a block functionManman Ren2013-01-041-0/+85
| | | | | | | | | | The line information was changed when emitting debug information for all the DeclRefExprs and we should change it back to get ready for PopClenupBlocks called from FinishFunction. rdar://11562117 llvm-svn: 171493
* Change this to an IR test instead of an assembly test (as per comment in ↵David Blaikie2012-12-281-8/+2
| | | | | | | | | | r171134). This makes the test not dependent on LLVM & won't vary/break based on LLVM codegen related changes. Appropriately testing at the Clang level what was fixed at the Clang level originally (in r124210). llvm-svn: 171175
* Update test for backend change.Eric Christopher2012-12-271-1/+1
| | | | | TODO: This test should be moved to the backend. llvm-svn: 171134
* Robustify the @encode code and add support for _Atomic.John McCall2012-12-201-0/+4
| | | | | | Fixes PR14628. llvm-svn: 170639
* Reapply r170344, this time without forgetting to commit the header changes.David Chisnall2012-12-171-0/+1
| | | | llvm-svn: 170354
* Revert "Added support for new property helpers (GNUstep runtime)."Benjamin Kramer2012-12-171-1/+0
| | | | | | This reverts commit r170344. Doesn't even compile. llvm-svn: 170351
* Added support for new property helpers (GNUstep runtime).David Chisnall2012-12-171-0/+1
| | | | llvm-svn: 170344
* Marking the objc_autoreleaseReturnValue and objc_retainAutoreleaseReturnValue Chad Rosier2012-12-125-10/+10
| | | | | | | | | | call sites as tail calls unconditionally. While it's theoretically true that this is just an optimization, it's an optimization that we very much want to happen even at -O0, or else ARC applications become substantially harder to debug. See r169796 for the llvm/fast-isel side of things. rdar://12553082 llvm-svn: 169996
* objective-C blocks: Check for record type when deciding if Fariborz Jahanian2012-12-111-0/+7
| | | | | | | byref variable requires extended layout info. to prevent a crash involving arrays declared __block. // rdar://12787751 llvm-svn: 169908
* Fix the required args count for variadic blocks.John McCall2012-12-071-0/+32
| | | | | | | | | | | | | | | | | We were emitting calls to blocks as if all arguments were required --- i.e. with signature (A,B,C,D,...) rather than (A,B,...). This patch fixes that and accounts for the implicit block-context argument as a required argument. In addition, this patch changes the function type under which we call unprototyped functions on platforms like x86-64 that guarantee compatibility of variadic functions with unprototyped function types; previously we would always call such functions under the LLVM type T (...)*, but now we will call them under the type T (A,B,C,D,...)*. This last change should have no material effect except for making the type conventions more explicit; it was a side-effect of the most convenient implementation. llvm-svn: 169588
* clang/test: Remove "REQUIRES:LP64" in two tests. Each of them have explicit ↵NAKAMURA Takumi2012-12-071-3/+0
| | | | | | triple. llvm-svn: 169587
* Rework the bitfield access IR generation to address PR13619 andChandler Carruth2012-12-061-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | generally support the C++11 memory model requirements for bitfield accesses by relying more heavily on LLVM's memory model. The primary change this introduces is to move from a manually aligned and strided access pattern across the bits of the bitfield to a much simpler lump access of all bits in the bitfield followed by math to extract the bits relevant for the particular field. This simplifies the code significantly, but relies on LLVM to intelligently lowering these integers. I have tested LLVM's lowering both synthetically and in benchmarks. The lowering appears to be functional, and there are no really significant performance regressions. Different code patterns accessing bitfields will vary in how this impacts them. The only real regressions I'm seeing are a few patterns where the LLVM code generation for loads that feed directly into a mask operation don't take advantage of the x86 ability to do a smaller load and a cheap zero-extension. This doesn't regress any benchmark in the nightly test suite on my box past the noise threshold, but my box is quite noisy. I'll be watching the LNT numbers, and will look into further improvements to the LLVM lowering as needed. llvm-svn: 169489
* objective-c blocks: Consider padding due to alignmentFariborz Jahanian2012-12-041-0/+60
| | | | | | | after the fixed size block header when generating captured block variable info. // rdar://12773256 llvm-svn: 169285
* objective-C blocks: Make sure that identical logic is usedFariborz Jahanian2012-11-281-0/+9
| | | | | | | | | | in deciding a copy/dispose field is needed in a byref structure and when generating the copy/dispose helpers. In certain cases, these fields were being added but no copy/dispose was being generated. This was uncovered in ARC, but not in MRR. // rdar://12759433 llvm-svn: 168825
* objective-C arc: load of a __weak object happens via call toFariborz Jahanian2012-11-274-4/+88
| | | | | | | | | | | objc_loadWeak. This retains and autorelease the weakly-refereced object. This hidden autorelease sometimes makes __weak variable alive even after the weak reference is erased, because the object is still referenced by an autorelease pool. This patch overcomes this behavior by loading a weak object via call to objc_loadWeakRetained(), followng it by objc_release at appropriate place, thereby removing the hidden autorelease. // rdar://10849570 llvm-svn: 168740
* block extended signatur option. Change previous optionFariborz Jahanian2012-11-151-3/+3
| | | | | | | | to a cc1 -fencode-extended-block-signature and pass it to cc1 and recognize this option to produce extended block type signature. // rdar://12109031 llvm-svn: 168063
* objective-C blocks: make cc1 flag -encode-extended-block-signatureFariborz Jahanian2012-11-151-2/+2
| | | | | | the default. // rdar://12109031 llvm-svn: 168007
* objective-C blocks: under cc1 flag -encode-extended-block-signature,Fariborz Jahanian2012-11-141-0/+15
| | | | | | | | generate expanded signature encoding to include types as we already do this for protocol method lists. // rdar://12109031 llvm-svn: 167997
* objective-C blocks: Provide layout map for byrefFariborz Jahanian2012-11-144-20/+57
| | | | | | variables captured in a block. // rdar://12184410 llvm-svn: 167931
* objective-C blocks: Change BLOCK_HAS_EXTENDED_LAYOUT to be 1<<31.Fariborz Jahanian2012-11-101-4/+4
| | | | | | lower 24bit is currently being used. llvm-svn: 167678
* Fix the Objective-C exception rethrow from cleanups (GNU runtimes). Note thatDavid Chisnall2012-11-071-1/+1
| | | | | | | a bug in the inliner still causes the wrong thing to happen at -O2 and above (PR14116). llvm-svn: 167534
OpenPOWER on IntegriCloud