- Jan 01, 2010
-
-
Chris Lattner authored
positive and negative forms of constants together. This allows us to compile: int foo(int x, int y) { return (x-y) + (x-y) + (x-y); } into: _foo: ## @foo subl %esi, %edi leal (%rdi,%rdi,2), %eax ret instead of (where the 3 and -3 were not factored): _foo: imull $-3, 8(%esp), %ecx imull $3, 4(%esp), %eax addl %ecx, %eax ret this started out as: movl 12(%ebp), %ecx imull $3, 8(%ebp), %eax subl %ecx, %eax subl %ecx, %eax subl %ecx, %eax ret This comes from PR5359. llvm-svn: 92381
-
Chris Lattner authored
llvm-svn: 92377
-
Chris Lattner authored
llvm-svn: 92375
-
- Dec 31, 2009
-
-
Chris Lattner authored
This allows us to optimize test12 into: define i32 @test12(i32 %X) { %factor = mul i32 %X, -3 ; <i32> [#uses=1] %Z = add i32 %factor, 6 ; <i32> [#uses=1] ret i32 %Z } instead of: define i32 @test12(i32 %X) { %Y = sub i32 6, %X ; <i32> [#uses=1] %C = sub i32 %Y, %X ; <i32> [#uses=1] %Z = sub i32 %C, %X ; <i32> [#uses=1] ret i32 %Z } llvm-svn: 92373
-
Chris Lattner authored
sorted, so we can just do a linear scan. llvm-svn: 92372
-
Chris Lattner authored
llvm-svn: 92370
-
Chris Lattner authored
llvm-svn: 92369
-
Chris Lattner authored
fix RemoveDeadBinaryOp to actually do something. llvm-svn: 92368
-
Chris Lattner authored
instead of std::vector. llvm-svn: 92366
-
Chris Lattner authored
llvm-svn: 92364
-
Chris Lattner authored
improve some comments, simplify a bit of code. llvm-svn: 92363
-
Chris Lattner authored
llvm-svn: 92362
-
Chris Lattner authored
miscompilation, PR5458. llvm-svn: 92354
-
Chris Lattner authored
llvm-svn: 92347
-
Chris Lattner authored
llvm-svn: 92346
-
Chris Lattner authored
llvm-svn: 92344
-
Chris Lattner authored
llvm-svn: 92343
-
Chris Lattner authored
by moving one method out of line and eliminating redundant checks from other methods. llvm-svn: 92337
-
Chris Lattner authored
things that occur in types. "operands" are things that occur in values. llvm-svn: 92322
-
- Dec 29, 2009
-
-
Benjamin Kramer authored
llvm-svn: 92264
-
Chris Lattner authored
llvm-svn: 92260
-
Chris Lattner authored
getMDKindID/getMDKindNames methods to LLVMContext (and add convenience methods to Module), eliminating MetadataContext. Move the state that it maintains out to LLVMContext. llvm-svn: 92259
-
Chris Lattner authored
llvm-svn: 92256
-
Chris Lattner authored
I asked Devang to do back on Sep 27. Instead of going through the MetadataContext class with methods like getMD() and getMDs(), just ask the instruction directly for its metadata with getMetadata() and getAllMetadata(). This includes a variety of other fixes and improvements: previously all Value*'s were bloated because the HasMetadata bit was thrown into value, adding a 9th bit to a byte. Now this is properly sunk down to the Instruction class (the only place where it makes sense) and it will be folded away somewhere soon. This also fixes some confusion in getMDs and its clients about whether the returned list is indexed by the MDID or densely packed. This is now returned sorted and densely packed and the comments make this clear. This introduces a number of fixme's which I'll follow up on. llvm-svn: 92235
-
- Dec 28, 2009
-
-
Chris Lattner authored
non-templated IRBuilderBase class. Move that large CreateGlobalString out of line, eliminating the need to #include GlobalVariable.h in IRBuilder.h llvm-svn: 92227
-
Chris Lattner authored
doesn't exist already, eliminate registerMDKind. Tidy up a bunch of random stuff. llvm-svn: 92225
-
Chris Lattner authored
llvm-svn: 92211
-
- Dec 24, 2009
-
-
Chris Lattner authored
SDISel. This optimization was causing simplifylibcalls to introduce type-unsafe nastiness. This is the first step, I'll be expanding the memcmp optimizations shortly, covering things that we really really wouldn't want simplifylibcalls to do. llvm-svn: 92098
-
Chris Lattner authored
llvm-svn: 92084
-
- Dec 23, 2009
-
-
David Greene authored
Remove dump routine and the associated Debug.h from a header. Patch up other files to compensate. llvm-svn: 92075
-
Eric Christopher authored
lowering code and update testcases. llvm-svn: 91979
-
- Dec 22, 2009
-
-
Chris Lattner authored
load is needed when we have a small store into a large alloca (at which point we get a load/insert/store sequence), but when you do a full-sized store, this load ends up being dead. This dead load is bad in really large nasty testcases where the load ends up causing mem2reg to insert large chains of dependent phi nodes which only ADCE can delete. Instead of doing this, just don't insert the dead load. This fixes rdar://6864035 llvm-svn: 91917
-
Chris Lattner authored
llvm-svn: 91916
-
Bob Wilson authored
missing check that an array reference doesn't go past the end of the array, and remove some redundant checks for in-bound array and vector references that are no longer needed. llvm-svn: 91897
-
Chris Lattner authored
by merging all returns in a function into a single one, but simplifycfg currently likes to duplicate the return (an unfortunate choice!) llvm-svn: 91890
-
Chris Lattner authored
instead of stored. This reduces memdep memory usage, and also eliminates a bunch of weakvh's. This speeds up gvn on gcc.c-torture/20001226-1.c from 23.9s to 8.45s (2.8x) on a different machine than earlier. llvm-svn: 91885
-
Eric Christopher authored
llvm-svn: 91875
-
Daniel Dunbar authored
llvm-svn: 91853
-
Chris Lattner authored
load to avoid even messing around with SSAUpdate at all. In this case (which is very common, we can just use the input value directly). This speeds up GVN time on gcc.c-torture/20001226-1.c from 36.4s to 16.3s, which still isn't great, but substantially better and this is a simple speedup that applies to lots of different cases. llvm-svn: 91851
-
Chris Lattner authored
llvm-svn: 91849
-