summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/lifetime2.c
Commit message (Collapse)AuthorAgeFilesLines
* Update for lifetime intrinsic signature changeMatt Arsenault2017-04-101-12/+12
| | | | llvm-svn: 299877
* Fix test case committed in r293106 so that it passes on targets whoseAkira Hatanaka2017-01-251-1/+4
| | | | | | pointers are 4-bytes instead of 8-bytes. llvm-svn: 293111
* Remove the return type from the check string in test case.Akira Hatanaka2017-01-251-1/+1
| | | | | | Bots were failing because some targets emit signext before i32. llvm-svn: 293108
* [CodeGen] Suppress emission of lifetime markers if a label has been seenAkira Hatanaka2017-01-251-6/+25
| | | | | | | | | | | | | | | | | | | | | | | | | in the current lexical scope. clang currently emits the lifetime.start marker of a variable when the variable comes into scope even though a variable's lifetime starts at the entry of the block with which it is associated, according to the C standard. This normally doesn't cause any problems, but in the rare case where a goto jumps backwards past the variable declaration to an earlier point in the block (see the test case added to lifetime2.c), it can cause mis-compilation. To prevent such mis-compiles, this commit conservatively disables emitting lifetime variables when a label has been seen in the current block. This problem was discussed on cfe-dev here: http://lists.llvm.org/pipermail/cfe-dev/2016-July/050066.html rdar://problem/30153946 Differential Revision: https://reviews.llvm.org/D27680 llvm-svn: 293106
* Add a cc1 option to force disabling lifetime-markers emission from clangMehdi Amini2017-01-061-0/+2
| | | | | | | | Summary: This intended as a debugging/development flag only. Differential Revision: https://reviews.llvm.org/D28385 llvm-svn: 291300
* [CodeGen] Don't emit lifetime intrinsics for some local variablesVitaly Buka2016-10-261-2/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Current generation of lifetime intrinsics does not handle cases like: ``` { char x; l1: bar(&x, 1); } goto l1; ``` We will get code like this: ``` %x = alloca i8, align 1 call void @llvm.lifetime.start(i64 1, i8* nonnull %x) br label %l1 l1: %call = call i32 @bar(i8* nonnull %x, i32 1) call void @llvm.lifetime.end(i64 1, i8* nonnull %x) br label %l1 ``` So the second time bar was called for x which is marked as dead. Lifetime markers here are misleading so it's better to remove them at all. This type of bypasses are rare, e.g. code detects just 8 functions building clang (2329 targets). PR28267 Reviewers: eugenis Subscribers: beanz, mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D24693 llvm-svn: 285176
* Make clang to mark static stack allocations with lifetime markers to enable ↵Nadav Rotem2013-03-231-0/+17
a more aggressive stack coloring. Patch by John McCall with help by Shuxin Yang. rdar://13115369 llvm-svn: 177819
OpenPOWER on IntegriCloud