- Mar 24, 2011
-
-
Cameron Zwarich authored
void; it doesn't need to have a void type. llvm-svn: 128212
-
Devang Patel authored
llvm-svn: 128211
-
Cameron Zwarich authored
void return type. This fixes PR9487. llvm-svn: 128197
-
Cameron Zwarich authored
llvm-svn: 128196
-
Cameron Zwarich authored
use it later. I couldn't make a test that hits this with the current code. llvm-svn: 128195
-
Cameron Zwarich authored
llvm-svn: 128194
-
- Mar 23, 2011
-
-
Cameron Zwarich authored
that were hit in practice. llvm-svn: 128146
-
- Mar 22, 2011
-
-
Anders Carlsson authored
llvm-svn: 128068
-
- Mar 21, 2011
-
-
Devang Patel authored
llvm-svn: 128030
-
Anders Carlsson authored
llvm-svn: 127997
-
Anders Carlsson authored
As suggested by Nick Lewycky, ignore debugging intrinsics when trying to decide whether a destructor is empty or not. llvm-svn: 127985
-
Nick Lewycky authored
llvm-svn: 127984
-
Evan Cheng authored
Re-apply r127953 with fixes: eliminate empty return block if it has no predecessors; update dominator tree if cfg is modified. llvm-svn: 127981
-
- Mar 20, 2011
-
-
Anders Carlsson authored
llvm-svn: 127976
-
Anders Carlsson authored
llvm-svn: 127975
-
Anders Carlsson authored
llvm-svn: 127974
-
Anders Carlsson authored
Add an optimization to GlobalOpt that eliminates calls to __cxa_atexit, if the function passed is empty. llvm-svn: 127970
-
- Mar 19, 2011
-
-
Daniel Dunbar authored
to canonicalize IR", it broke a lot of things. llvm-svn: 127954
-
Evan Cheng authored
to have single return block (at least getting there) for optimizations. This is general goodness but it would prevent some tailcall optimizations. One specific case is code like this: int f1(void); int f2(void); int f3(void); int f4(void); int f5(void); int f6(void); int foo(int x) { switch(x) { case 1: return f1(); case 2: return f2(); case 3: return f3(); case 4: return f4(); case 5: return f5(); case 6: return f6(); } } => LBB0_2: ## %sw.bb callq _f1 popq %rbp ret LBB0_3: ## %sw.bb1 callq _f2 popq %rbp ret LBB0_4: ## %sw.bb3 callq _f3 popq %rbp ret This patch teaches codegenprep to duplicate returns when the return value is a phi and where the phi operands are produced by tail calls followed by an unconditional branch: sw.bb7: ; preds = %entry %call8 = tail call i32 @f5() nounwind br label %return sw.bb9: ; preds = %entry %call10 = tail call i32 @f6() nounwind br label %return return: %retval.0 = phi i32 [ %call10, %sw.bb9 ], [ %call8, %sw.bb7 ], ... [ 0, %entry ] ret i32 %retval.0 This allows codegen to generate better code like this: LBB0_2: ## %sw.bb jmp _f1 ## TAILCALL LBB0_3: ## %sw.bb1 jmp _f2 ## TAILCALL LBB0_4: ## %sw.bb3 jmp _f3 ## TAILCALL rdar://9147433 llvm-svn: 127953
-
Devang Patel authored
If an AllocaInst referred by DbgDeclareInst is used by a LoadInst then the LoadInst should also get a corresponding llvm.dbg.value intrinsic. llvm-svn: 127924
-
Devang Patel authored
llvm-svn: 127923
-
Devang Patel authored
llvm-svn: 127922
-
- Mar 18, 2011
-
-
Andrew Trick authored
llvm-svn: 127842
-
Andrew Trick authored
SCEV may generate expressions composed of multiple pointers, which can lead to invalid GEP expansion. Until we can teach SCEV to follow strict pointer rules, make sure no bad GEPs creep into IR. Fixes rdar://problem/9038671. llvm-svn: 127839
-
Andrew Trick authored
llvm-svn: 127837
-
- Mar 17, 2011
-
-
Devang Patel authored
This is done by lowering dbg.declare intrinsic into dbg.value intrinsic. Radar 9143931. llvm-svn: 127834
-
Devang Patel authored
llvm-svn: 127832
-
- Mar 16, 2011
-
-
Cameron Zwarich authored
llvm-svn: 127728
-
Cameron Zwarich authored
chose is having a non-memcpy/memset use and being larger than any native integer type. Originally I chose having an access of a size smaller than the total size of the alloca, but this caused some minor issues on the spirit benchmark where SRoA runs again after some inlining. This fixes <rdar://problem/8613163>. llvm-svn: 127718
-
Cameron Zwarich authored
llvm-svn: 127716
-
Cameron Zwarich authored
llvm-svn: 127715
-
- Mar 15, 2011
-
-
Cameron Zwarich authored
llvm-svn: 127684
-
Cameron Zwarich authored
llvm-svn: 127674
-
Eli Friedman authored
of pointers in an std::map. llvm-svn: 127650
-
Eric Christopher authored
normal version. Fixes rdar://9123638 llvm-svn: 127636
-
- Mar 14, 2011
-
-
Andrew Trick authored
properties. Added the self-wrap flag for SCEV::AddRecExpr. A slew of temporary FIXMEs indicate the intention of the no-self-wrap flag without changing behavior in this revision. llvm-svn: 127590
-
Andrew Trick authored
llvm-svn: 127589
-
Jin-Gu Kang authored
Early CSE pass so this patch reverts it to original source code. llvm-svn: 127574
-
- Mar 13, 2011
-
-
Jin-Gu Kang authored
load and store reference same memory location, the memory location is represented by getelementptr with two uses (load and store) and the getelementptr's base is alloca with single use. At this point, instructions from alloca to store can be removed. (this pattern is generated when bitfield is accessed.) For example, %u = alloca %struct.test, align 4 ; [#uses=1] %0 = getelementptr inbounds %struct.test* %u, i32 0, i32 0;[#uses=2] %1 = load i8* %0, align 4 ; [#uses=1] %2 = and i8 %1, -16 ; [#uses=1] %3 = or i8 %2, 5 ; [#uses=1] store i8 %3, i8* %0, align 4 llvm-svn: 127565
-
- Mar 12, 2011
-
-
Jin-Gu Kang authored
llvm-svn: 127539
-