summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenObjC/exceptions.m
Commit message (Collapse)AuthorAgeFilesLines
* Re-commit r357452 (take 3): "SimplifyCFG SinkCommonCodeFromPredecessors: ↵Hans Wennborg2019-06-171-1/+1
| | | | | | | | | | | Also sink function calls without used results (PR41259)" Third time's the charm. This was reverted in r363220 due to being suspected of an internal benchmark regression and a test failure, none of which turned out to be caused by this. llvm-svn: 363529
* Revert r361811: 'Re-commit r357452 (take 2): "SimplifyCFG ↵David L. Jones2019-06-131-1/+1
| | | | | | | | | | | | | | | | SinkCommonCodeFromPredecessors ...' We have observed some failures with internal builds with this revision. - Performance regressions: - llvm's SingleSource/Misc evalloop shows performance regressions (although these may be red herrings). - Benchmarks for Abseil's SwissTable. - Correctness: - Failures for particular libicu tests when building the Google AppEngine SDK (for PHP). hwennborg has already been notified, and is aware of reproducer failures. llvm-svn: 363220
* Re-commit r357452 (take 2): "SimplifyCFG SinkCommonCodeFromPredecessors: ↵Hans Wennborg2019-05-281-1/+1
| | | | | | | | | | | | | | | | | | | | Also sink function calls without used results (PR41259)" This was reverted in r360086 as it was supected of causing mysterious test failures internally. However, it was never concluded that this patch was the root cause. > The code was previously checking that candidates for sinking had exactly > one use or were a store instruction (which can't have uses). This meant > we could sink call instructions only if they had a use. > > That limitation seemed a bit arbitrary, so this patch changes it to > "instruction has zero or one use" which seems more natural and removes > the need to special-case stores. > > Differential revision: https://reviews.llvm.org/D59936 llvm-svn: 361811
* Revert "Re-commit r357452: SimplifyCFG SinkCommonCodeFromPredecessors: Also ↵Jordan Rupprecht2019-05-061-1/+1
| | | | | | | | | | sink function calls without used results (PR41259)" This reverts r357452 (git commit 21eb771dcb5c11d7500fa6ad551c97a921997f05). This was causing strange optimization-related test failures on an internal test. Will followup with more details offline. llvm-svn: 360086
* Re-commit r357452: SimplifyCFG SinkCommonCodeFromPredecessors: Also sink ↵Hans Wennborg2019-04-161-1/+1
| | | | | | | | | | | | | | | | | | | function calls without used results (PR41259) The original commit caused false positives from AddressSanitizer's use-after-scope checks, which have now been fixed in r358478. > The code was previously checking that candidates for sinking had exactly > one use or were a store instruction (which can't have uses). This meant > we could sink call instructions only if they had a use. > > That limitation seemed a bit arbitrary, so this patch changes it to > "instruction has zero or one use" which seems more natural and removes > the need to special-case stores. > > Differential revision: https://reviews.llvm.org/D59936 llvm-svn: 358483
* Revert r357452 - 'SimplifyCFG SinkCommonCodeFromPredecessors: Also sink ↵David L. Jones2019-04-041-1/+1
| | | | | | | | | | function calls without used results (PR41259)' This revision causes tests to fail under ASAN. Since the cause of the failures is not clear (could be ASAN, could be a Clang bug, could be a bug in this revision), the safest course of action seems to be to revert while investigating. llvm-svn: 357667
* SimplifyCFG SinkCommonCodeFromPredecessors: Also sink function calls without ↵Hans Wennborg2019-04-021-1/+1
| | | | | | | | | | | | | | | | used results (PR41259) The code was previously checking that candidates for sinking had exactly one use or were a store instruction (which can't have uses). This meant we could sink call instructions only if they had a use. That limitation seemed a bit arbitrary, so this patch changes it to "instruction has zero or one use" which seems more natural and removes the need to special-case stores. Differential revision: https://reviews.llvm.org/D59936 llvm-svn: 357452
* Update for lifetime intrinsic signature changeMatt Arsenault2017-04-101-2/+2
| | | | llvm-svn: 299877
* Update clang unittests for rL281586.Wei Mi2016-09-151-1/+1
| | | | | | | The change in rL281586 is in llvm component and tests updated here are in clang component, so I have to commit them consecutively. llvm-svn: 281587
* Rebase tests after LLVM r247707.Nico Weber2015-09-151-1/+1
| | | | llvm-svn: 247712
* Adjust clang side tests effected by 239795 before reapplying said changePhilip Reames2015-06-161-11/+11
| | | | llvm-svn: 239848
* Revert "Revert r234581, it might have caused a few miscompiles in Chromium."David Majnemer2015-04-221-0/+3
| | | | | | | | This reverts commit r234700. It turns out that the lifetime markers were not the cause of Chromium failing but a bug which was uncovered by optimizations exposed by the markers. llvm-svn: 235553
* Revert r234581, it might have caused a few miscompiles in Chromium.Nico Weber2015-04-111-3/+0
| | | | | | | If the revert helps, I'll get a repro this Monday. Else I'll put the change back in. llvm-svn: 234700
* Remove threshold for inserting lifetime markers for named temporariesArnaud A. de Grandmaison2015-04-101-0/+3
| | | | | | | | | | | | | | | | | | | Now that TailRecursionElimination has been fixed with r222354, the threshold on size for lifetime marker insertion can be removed. This only affects named temporary though, as the patch for unnamed temporaries is still in progress. My previous commit (r222993) was not handling debuginfo correctly, but this could only be seen with some asan tests. Basically, lifetime markers are just instrumentation for the compiler's usage and should not affect debug information; however, the cleanup infrastructure was assuming it contained only destructors, i.e. actual code to be executed, and was setting the breakpoint for the end of the function to the closing '}', and not the return statement, in order to show some destructors have been called when leaving the function. This is wrong when the cleanups are only lifetime markers, and this is now fixed. llvm-svn: 234581
* Update Clang tests to handle explicitly typed load changes in LLVM.David Blaikie2015-02-271-2/+2
| | | | llvm-svn: 230795
* Revert "Remove threshold for lifetime marker insertion of named temporaries"Arnaud A. de Grandmaison2014-12-011-3/+0
| | | | | | Revert r222993 while I investigate some MemorySanitizer failures. llvm-svn: 222995
* Remove threshold for lifetime marker insertion of named temporariesArnaud A. de Grandmaison2014-12-011-0/+3
| | | | | | | | | Now that TailRecursionElimination has been fixed with r222354, the threshold on size for lifetime marker insertion can be removed. This only affects named temporary though, as the patch for unnamed temporaries is still in progress. llvm-svn: 222993
* Revert "Remove threshold on object size for inserting lifetime begin / end"Arnaud A. de Grandmaison2014-10-081-3/+0
| | | | | | Revert this patch while I investigate some sanitizer failures off-line. llvm-svn: 219307
* Remove threshold on object size for inserting lifetime begin / endArnaud A. de Grandmaison2014-10-081-0/+3
| | | | | | | | | Boostrapping LLVM+Clang+LLDB without threshold on object size for lifetime markers insertion has shown there was no significant change in compile time, so let the stack slot colorizer do its optimization for all slots. llvm-svn: 219303
* CHECK-LABEL-ify some code gen tests to improve diagnostic experience when ↵Stephen Lin2013-08-151-4/+4
| | | | | | tests fail. llvm-svn: 188447
* In ObjC++ on legacy runtimes, push an EH cleanup as well asJohn McCall2013-04-031-2/+2
| | | | | | | | | | | | a normal cleanup when entering a @try or @synchronized to ensure that we clean that up if an exception is triggered. Apparently GCC did this, so it's hard to argue that we shouldn't do at least as much. rdar://12364847 llvm-svn: 178599
* Re-enable this test to reflect re-enabling the new SROA pass.Chandler Carruth2012-10-021-4/+0
| | | | llvm-svn: 164987
* Turn off this test, as the new and old SROA cause it produce different output.Nick Lewycky2012-09-261-0/+4
| | | | | | | Left in a note that we need to turn it back on once the SROA fallout is cleared up. llvm-svn: 164733
* Update the Clang tests which run with a full optimization pipeline forChandler Carruth2012-09-241-2/+2
| | | | | | | the new SROA pass. This is a benign change: the order of PHI nodes changed. llvm-svn: 164481
* Restructure how the driver communicates information about theJohn McCall2012-06-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | target Objective-C runtime down to the frontend: break this down into a single target runtime kind and version, and compute all the relevant information from that. This makes it relatively painless to add support for new runtimes to the compiler. Make the new -cc1 flag, -fobjc-runtime=blah-x.y.z, available at the driver level as a better and more general alternative to -fgnu-runtime and -fnext-runtime. This new concept of an Objective-C runtime also encompasses what we were previously separating out as the "Objective-C ABI", so fragile vs. non-fragile runtimes are now really modelled as different kinds of runtime, paving the way for better overall differentiation. As a sort of special case, continue to accept the -cc1 flag -fobjc-runtime-has-weak, as a sop to PLCompatibilityWeak. I won't go so far as to say "no functionality change", even ignoring the new driver flag, but subtle changes in driver semantics are almost certainly not intended. llvm-svn: 158793
* The optimizers figured out how to make this store 6.Nick Lewycky2011-11-151-5/+1
| | | | llvm-svn: 144597
* Make -fobjc-nonfragile-abi the -cc1 default, since it's theJohn McCall2011-10-021-1/+1
| | | | | | | | | | | | | | | | | | | increasingly prevailing case to the point that new features like ARC don't even support the fragile ABI anymore. This required a little bit of reshuffling with exceptions because a check was assuming that ObjCNonFragileABI was only being set in ObjC mode, and that's actually a bit obnoxious to do. Most, though, it involved a perl script to translate a ton of test cases. Mostly no functionality change for driver users, although there are corner cases with disabling language-specific exceptions that we should handle more correctly now. llvm-svn: 140957
* Make clang -cc1 disable Objective-C exceptions by default, and add a ↵Anders Carlsson2011-02-221-1/+1
| | | | | | | | -fobjc-exceptions flag to turn them on. Update all tests accordingly. llvm-svn: 126177
* update this test now that reassociate isn't stripping nsw's pointlessly.Chris Lattner2011-02-171-2/+2
| | | | llvm-svn: 125705
* Update this test following recent optimizer changes.Dan Gohman2011-02-021-2/+2
| | | | llvm-svn: 124715
* Not really any point to testing control flow in this test withoutJohn McCall2011-01-281-8/+1
| | | | | | ret duplication. llvm-svn: 124476
* Update exceptions.m for r124462.Eric Christopher2011-01-281-4/+7
| | | | llvm-svn: 124474
* In the fragile ObjC ABI, save the caught exception to the side if there areJohn McCall2010-10-041-0/+56
| | | | | | | both @catches and a @finally, because the second call to @objc_exception_try_enter will clobber the exception slot. Fixes rdar://problem/8440970. llvm-svn: 115575
* Make this test a little less dependent on exact optimizer results.John McCall2010-08-111-6/+6
| | | | llvm-svn: 110770
* Fix a bug in @finally emission in both the fragile and non-fragile EH schemesJohn McCall2010-08-111-0/+51
| | | | | | | | | where we weren't accounting for the possibility that a @finally block might have internal cleanups and therefore might write to the cleanup destination slot. Fixes <rdar://problem/8293901>. llvm-svn: 110760
* Some more correctness fixes and code-size optimizations for fragile-ABIJohn McCall2010-08-041-20/+19
| | | | | | | | | | | 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
* Fix fragile-ABI ObjC exceptions in the presence of optimization withJohn McCall2010-07-311-0/+46
| | | | | | | | | 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
* Validated by nightly-test runs on x86 and x86-64 darwin, including afterJohn McCall2010-07-061-4/+25
| | | | | | | | | | | | | | | | | | | | | | | | 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
* NeXT/EH: When generating the rethrow code for a finally block, make sure toDaniel Dunbar2010-04-231-0/+18
chain outwards when inside a nested exception scope. - A real test for this is going into LLVM test-suite. llvm-svn: 102204
OpenPOWER on IntegriCloud