- Jun 02, 2006
-
-
Chris Lattner authored
llvm-svn: 28664
-
Chris Lattner authored
to link in the implementation. Thanks to Anton Korobeynikov for figuring out what was going on here. llvm-svn: 28660
-
- Jun 01, 2006
-
-
Chris Lattner authored
llvm-svn: 28642
-
Chris Lattner authored
code (while cloning) it often gets the branch/switch instructions. Since it knows that edges of the CFG are dead, it need not clone (or even look) at the obviously dead blocks. This should speed up the inliner substantially on code where there are lots of inlinable calls to functions with constant arguments. On C++ code in particular, this kicks in. llvm-svn: 28641
-
Chris Lattner authored
llvm-svn: 28632
-
Owen Anderson authored
llvm-svn: 28619
-
Owen Anderson authored
reimplement getValueDominatingFunction to walk the DominanceTree rather than just searching blindly. llvm-svn: 28618
-
- May 31, 2006
-
-
Chris Lattner authored
but for sub, it really does! Fix fixes a miscompilation of fibheap_cut in llvmgcc4. llvm-svn: 28600
-
Owen Anderson authored
llvm-svn: 28599
-
- May 29, 2006
-
-
Owen Anderson authored
is now theoretically feature-complete. It has not, however, been thoroughly test, and is still considered experimental. llvm-svn: 28529
-
- May 28, 2006
-
-
Owen Anderson authored
other calculations on each individually, rather than trying to delay it and do them all at the end. llvm-svn: 28527
-
- May 27, 2006
-
-
Owen Anderson authored
the iterated Dominance Frontier of the loop-closure Phi's. This is the second phase of the LCSSA pass. The third phase (coming soon) will be to update all uses of loop variables to use the loop-closure Phi's instead. llvm-svn: 28524
-
Chris Lattner authored
ldecod, lencod, and SPASS. llvm-svn: 28523
-
Chris Lattner authored
makes it so that it constant folds instructions on the fly. This is good for several reasons: 0. Many instructions are constant foldable after inlining, particularly if inlining a call with constant arguments. 1. Without this, the inliner has to allocate memory for all of the instructions that can be constant folded, then a subsequent pass has to delete them. This gets the job done without this extra work. 2. This makes the inliner *pass* a bit more aggressive: in particular, it partially solves a phase order issue where the inliner would inline lots of code that folds away to nothing, but think that the resultant function is big because of this code that will be gone. Now the code never exists. This is the first part of a 2-step process. The second part will be smart enough to see when this implicit constant folding propagates a constant into a branch or switch instruction, making CFG edges dead. This implements Transforms/Inline/inline_constprop.ll llvm-svn: 28521
-
Chris Lattner authored
llvm-svn: 28519
-
Chris Lattner authored
Refactor some code to expose an interface to constant fold and instruction given it's opcode, typeand operands. llvm-svn: 28517
-
Owen Anderson authored
llvm-svn: 28512
-
- May 26, 2006
-
-
Owen Anderson authored
llvm-svn: 28507
-
Owen Anderson authored
there's still a lot of work to be done on it. llvm-svn: 28506
-
Chris Lattner authored
llvm-svn: 28503
-
Owen Anderson authored
and documentation updates soo. llvm-svn: 28495
-
Chris Lattner authored
llvm-svn: 28490
-
Chris Lattner authored
No functionality change. llvm-svn: 28489
-
Chris Lattner authored
the program. This exposes more opportunities for the instcombiner, and implements vec_shuffle.ll:test6 llvm-svn: 28487
-
Chris Lattner authored
extractelement from the SV's source. This implement vec_shuffle.ll:test[45] llvm-svn: 28485
-
- May 25, 2006
-
-
Chris Lattner authored
array scopes possibly accessing valid memory in outer subscripts. llvm-svn: 28478
-
- May 24, 2006
-
-
Chris Lattner authored
This implements Transforms/InstCombine/2006-05-10-InvalidIndexUndef.ll llvm-svn: 28450
-
Chris Lattner authored
by Anton Korobeynikov! This is a step towards closing PR786. llvm-svn: 28447
-
- May 21, 2006
-
-
Chris Lattner authored
llvm-svn: 28422
-
- May 19, 2006
-
-
Reid Spencer authored
llvm-svn: 28395
-
- May 17, 2006
-
-
Chris Lattner authored
Patch written by Domagoj Babic! llvm-svn: 28367
-
Chris Lattner authored
to the new module. Patch provided by Nick Lewycky! llvm-svn: 28349
-
- May 14, 2006
-
-
Chris Lattner authored
llvm-svn: 28289
-
Chris Lattner authored
llvm-svn: 28286
-
Evan Cheng authored
llvm-svn: 28284
-
- May 13, 2006
-
-
Chris Lattner authored
bitfield now gives this code: _plus: lwz r2, 0(r3) rlwimi r2, r2, 0, 1, 31 xoris r2, r2, 32768 stw r2, 0(r3) blr instead of this: _plus: lwz r2, 0(r3) srwi r4, r2, 31 slwi r4, r4, 31 addis r4, r4, -32768 rlwimi r2, r4, 0, 0, 0 stw r2, 0(r3) blr this can obviously still be improved. llvm-svn: 28275
-
Chris Lattner authored
currently very limited, but can be extended in the future. For example, we now compile: uint %test30(uint %c1) { %c2 = cast uint %c1 to ubyte %c3 = xor ubyte %c2, 1 %c4 = cast ubyte %c3 to uint ret uint %c4 } to: _xor: movzbl 4(%esp), %eax xorl $1, %eax ret instead of: _xor: movb $1, %al xorb 4(%esp), %al movzbl %al, %eax ret More impressively, we now compile: struct B { unsigned bit : 1; }; void xor(struct B *b) { b->bit = b->bit ^ 1; } To (X86/PPC): _xor: movl 4(%esp), %eax xorl $-2147483648, (%eax) ret _xor: lwz r2, 0(r3) xoris r2, r2, 32768 stw r2, 0(r3) blr instead of (X86/PPC): _xor: movl 4(%esp), %eax movl (%eax), %ecx movl %ecx, %edx shrl $31, %edx # TRUNCATE movb %dl, %dl xorb $1, %dl movzbl %dl, %edx andl $2147483647, %ecx shll $31, %edx orl %ecx, %edx movl %edx, (%eax) ret _xor: lwz r2, 0(r3) srwi r4, r2, 31 xori r4, r4, 1 rlwimi r2, r4, 31, 0, 0 stw r2, 0(r3) blr This implements InstCombine/cast.ll:test30. llvm-svn: 28273
-
Chris Lattner authored
Fix a nasty bug in the memcmp optimizer where we used the wrong variable! llvm-svn: 28269
-
Chris Lattner authored
llvm-svn: 28268
-
- May 11, 2006
-
-
Chris Lattner authored
When doing the initial pass of constant folding, if we get a constantexpr, simplify the constant expr like we would do if the constant is folded in the normal loop. This fixes the missed-optimization regression in Transforms/InstCombine/getelementptr.ll last night. llvm-svn: 28224
-