Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Don't pass -O0 to clang_cc1, it is the default. | Rafael Espindola | 2013-09-04 | 1 | -1/+1 |
| | | | | llvm-svn: 189910 | ||||
* | For debug and coverage analysis if we're not optimizing go ahead | Eric Christopher | 2012-04-10 | 1 | -22/+9 |
| | | | | | | | | | and emit a relatively empty block for a plain break statement. This enables us to track where we went through a switch. PR9796 & rdar://11215207 llvm-svn: 154420 | ||||
* | Fix a miscompilation I introduced in r129652, thanks for Eli for tracking | Chris Lattner | 2011-04-17 | 1 | -0/+16 |
| | | | | | | | | | | | | | | | it down. we effectively were compile the testcase into: void test14(int x) { switch (x) { case 11: break; case 42: test14(97); // fallthrough default: test14(42); break; which is not the same thing at all. This fixes a miscompilation of MallocBench/gs seen on the clang-x86_64-linux-fnt buildbot. llvm-svn: 129679 | ||||
* | when assertions are disabled, labels go away. Hopefully fixes the windows ↵ | Chris Lattner | 2011-04-17 | 1 | -4/+2 |
| | | | | | | build. llvm-svn: 129660 | ||||
* | implement rdar://9289524 - case followed immediately by break results in ↵ | Chris Lattner | 2011-04-17 | 1 | -0/+15 |
| | | | | | | | | empty IR block, a -O0 code quality issue. llvm-svn: 129652 | ||||
* | Make skipping of vardecls more precise: it's ok to skip a decl if the entire | Chris Lattner | 2011-02-28 | 1 | -0/+20 |
| | | | | | | compound stmt containing the decl is skipped. llvm-svn: 126639 | ||||
* | make switch constant folding a bit stronger, handling a missed case. | Chris Lattner | 2011-02-28 | 1 | -1/+17 |
| | | | | llvm-svn: 126638 | ||||
* | remove a bogus assertion, add a comment. | Chris Lattner | 2011-02-28 | 1 | -0/+13 |
| | | | | llvm-svn: 126603 | ||||
* | make switch condition constant folding much more aggressive, handling | Chris Lattner | 2011-02-28 | 1 | -3/+154 |
| | | | | | | | compound statements and break statements. This implements enough to handle PR9322 and rdar://6970405. llvm-svn: 126602 | ||||
* | First tiny step to implementing PR9322: build infrastructure for only ↵ | Chris Lattner | 2011-02-28 | 1 | -0/+18 |
emitting the live case of a switch statement when switching on a constant. This is terribly limited, but enough to handle the trivial example included. Before we would emit: define void @test1(i32 %i) nounwind { entry: %i.addr = alloca i32, align 4 store i32 %i, i32* %i.addr, align 4 switch i32 1, label %sw.epilog [ i32 1, label %sw.bb ] sw.bb: ; preds = %entry %tmp = load i32* %i.addr, align 4 %inc = add nsw i32 %tmp, 1 store i32 %inc, i32* %i.addr, align 4 br label %sw.epilog sw.epilog: ; preds = %sw.bb, %entry switch i32 0, label %sw.epilog3 [ i32 1, label %sw.bb1 ] sw.bb1: ; preds = %sw.epilog %tmp2 = load i32* %i.addr, align 4 %add = add nsw i32 %tmp2, 2 store i32 %add, i32* %i.addr, align 4 br label %sw.epilog3 sw.epilog3: ; preds = %sw.bb1, %sw.epilog ret void } now we emit: define void @test1(i32 %i) nounwind { entry: %i.addr = alloca i32, align 4 store i32 %i, i32* %i.addr, align 4 %tmp = load i32* %i.addr, align 4 %inc = add nsw i32 %tmp, 1 store i32 %inc, i32* %i.addr, align 4 ret void } This improves -O0 compile time (less IR to generate and shove through the code generator) and the clever linux kernel people found a way to fail to build if we don't do this optimization. This step isn't enough to handle the kernel case though. llvm-svn: 126597 |