- Dec 13, 2010
-
-
Chris Lattner authored
llvm-svn: 121689
-
Chris Lattner authored
per terminator kind. llvm-svn: 121688
-
Chris Lattner authored
llvm-svn: 121687
-
Chris Lattner authored
doing a cfg search for every block simplified. llvm-svn: 121686
-
Chris Lattner authored
llvm-svn: 121685
-
Chris Lattner authored
llvm-svn: 121684
-
Chris Lattner authored
getSinglePredecessor to simplify code. llvm-svn: 121683
-
Chris Lattner authored
llvm-svn: 121682
-
Chris Lattner authored
llvm-svn: 121681
-
Chris Lattner authored
'or sequence' that it doesn't understand. This allows us to optimize something insane like this: int crud (unsigned char c, unsigned x) { if(((((((((( (int) c <= 32 || (int) c == 46) || (int) c == 44) || (int) c == 58) || (int) c == 59) || (int) c == 60) || (int) c == 62) || (int) c == 34) || (int) c == 92) || (int) c == 39) != 0) foo(); } into: define i32 @crud(i8 zeroext %c, i32 %x) nounwind ssp noredzone { entry: %cmp = icmp ult i8 %c, 33 br i1 %cmp, label %if.then, label %switch.early.test switch.early.test: ; preds = %entry switch i8 %c, label %if.end [ i8 39, label %if.then i8 44, label %if.then i8 58, label %if.then i8 59, label %if.then i8 60, label %if.then i8 62, label %if.then i8 46, label %if.then i8 92, label %if.then i8 34, label %if.then ] by pulling the < comparison out ahead of the newly formed switch. llvm-svn: 121680
-
Chris Lattner authored
llvm-svn: 121679
-
Chris Lattner authored
llvm-svn: 121678
-
Evan Cheng authored
llvm-svn: 121677
-
Chris Lattner authored
llvm-svn: 121676
-
Chris Lattner authored
llvm-svn: 121675
-
Chris Lattner authored
bootstrap buildbot tripped over. llvm-svn: 121674
-
Chris Lattner authored
llvm-svn: 121673
-
Chris Lattner authored
llvm-svn: 121672
-
Chris Lattner authored
or'd conditions. Previously we'd compile something like this: int crud (unsigned char c) { return c == 62 || c == 34 || c == 92; } into: switch i8 %c, label %lor.rhs [ i8 62, label %lor.end i8 34, label %lor.end ] lor.rhs: ; preds = %entry %cmp8 = icmp eq i8 %c, 92 br label %lor.end lor.end: ; preds = %entry, %entry, %lor.rhs %0 = phi i1 [ true, %entry ], [ %cmp8, %lor.rhs ], [ true, %entry ] %lor.ext = zext i1 %0 to i32 ret i32 %lor.ext which failed to merge the compare-with-92 into the switch. With this patch we simplify this all the way to: switch i8 %c, label %lor.rhs [ i8 62, label %lor.end i8 34, label %lor.end i8 92, label %lor.end ] lor.rhs: ; preds = %entry br label %lor.end lor.end: ; preds = %entry, %entry, %entry, %lor.rhs %0 = phi i1 [ true, %entry ], [ false, %lor.rhs ], [ true, %entry ], [ true, %entry ] %lor.ext = zext i1 %0 to i32 ret i32 %lor.ext which is much better for codegen's switch lowering stuff. This kicks in 33 times on 176.gcc (for example) cutting 103 instructions off the generated code. llvm-svn: 121671
-
Chris Lattner authored
llvm-svn: 121670
-
Chris Lattner authored
llvm-svn: 121669
-
Chris Lattner authored
location in simplifycfg. In the old days, SimplifyCFG was never run on the entry block, so we had to scan over all preds of the BB passed into simplifycfg to do this xform, now we can just check blocks ending with a condbranch. This avoids a scan over all preds of every simplified block, which should be a significant compile-time perf win on functions with lots of edges. No functionality change. llvm-svn: 121668
-
Chris Lattner authored
llvm-svn: 121667
-
Bill Wendling authored
class A<bit a, bits<3> x, bits<3> y> { bits<3> z; let z = !if(a, x, y); } The variable z will get the value of x when 'a' is 1 and 'y' when a is '0'. llvm-svn: 121666
-
Chandler Carruth authored
cases. First, omit all builtin overloads when no non-record type is in the set of candidate types. Second, avoid arithmetic type overloads for non-arithmetic or enumeral types (counting vector types as arithmetic due to Clang extensions). When heavily using constructs such as STL's '<<' based stream logging, this can have a significant impact. One logging-heavy test case's compile time dropped by 10% with this. Self-host shows 1-2% improvement in compile time, but that's likely in the noise. llvm-svn: 121665
-
Chris Lattner authored
llvm-svn: 121664
-
Sean Callanan authored
very minor changes, changing how we get the target type from a TypedefType, adding a parameter to EnumDecl::Create(), and other minor tweaks. llvm-svn: 121663
-
Chris Lattner authored
llvm-svn: 121662
-
Bill Wendling authored
llvm-svn: 121661
-
Bill Wendling authored
llvm-svn: 121660
-
Chris Lattner authored
llvm-svn: 121659
-
Chris Lattner authored
llvm-svn: 121658
-
Chris Lattner authored
llvm-svn: 121657
-
Chris Lattner authored
llvm-svn: 121656
-
Howard Hinnant authored
llvm-svn: 121655
-
Peter Collingbourne authored
llvm-svn: 121654
-
Peter Collingbourne authored
llvm-svn: 121653
-
- Dec 12, 2010
-
-
Wesley Peck authored
llvm-svn: 121652
-
Wesley Peck authored
llvm-svn: 121651
-
Wesley Peck authored
MBlaze delay slot filler was not capable of using ADDK and variants to fill delay slots. This broke several test cases when 121649 was committed. This fixes the regression. llvm-svn: 121650
-