- Jun 20, 2011
-
-
Jay Foad authored
Change PHINodes to store simple pointers to their incoming basic blocks, instead of full-blown Uses. Note that this loses an optimization in SplitCriticalEdge(), because we can no longer walk the use list of a BasicBlock to find phi nodes. See the comment I removed starting "However, the foreach loop is slow for blocks with lots of predecessors". Extend replaceAllUsesWith() on a BasicBlock to also update any phi nodes in the block's successors. This mimics what would have happened when PHINodes were proper Users of their incoming blocks. (Note that this only works if OldBB->replaceAllUsesWith(NewBB) is called when OldBB still has a terminator instruction, so it still has some successors.) llvm-svn: 133435
-
Jay Foad authored
Change various bits of code to make better use of the existing PHINode API, to insulate them from forthcoming changes in how PHINodes store their operands. llvm-svn: 133434
-
Chris Lattner authored
all over the place in different styles and variants. Standardize on two preferred entrypoints: one that takes a StructType and ArrayRef, and one that takes StructType and varargs. In cases where there isn't a struct type convenient, we now add a ConstantStruct::getAnon method (whose name will make more sense after a few more patches land). It would be "really really nice" if the ConstantStruct::get and ConstantVector::get methods didn't make temporary std::vectors. llvm-svn: 133412
-
- Jun 19, 2011
-
-
Chris Lattner authored
much cleaner. llvm-svn: 133364
-
- Jun 18, 2011
-
-
Hans Wennborg authored
In cases such as the attached test, where the case value for a switch destination is used in a phi node that follows the destination, it might be better to replace that value with the condition value of the switch, so that more blocks can be folded away with TryToSimplifyUncondBranchFromEmptyBlock because there are less conflicts in the phi node. llvm-svn: 133344
-
Cameron Zwarich authored
type's bitwidth matches the (allocated) size of the alloca. This severely pessimizes vector scalar replacement when the only vector type being used is something like <3 x float> on x86 or ARM whose allocated size matches a <4 x float>. I hope to fix some of the flawed assumptions about allocated size throughout scalar replacement and reenable this in most cases. llvm-svn: 133338
-
Cameron Zwarich authored
alloca. Fixes part of <rdar://problem/9580800>. llvm-svn: 133336
-
Cameron Zwarich authored
unless ScalarKind is Vector. llvm-svn: 133335
-
Chad Rosier authored
llvm-svn: 133301
-
- Jun 17, 2011
-
-
Devang Patel authored
llvm-svn: 133298
-
Stuart Hastings authored
Followup to 132926. rdar://problem/9265821 llvm-svn: 133285
-
Nick Lewycky authored
llvm-svn: 133251
-
- Jun 16, 2011
-
-
Dan Gohman authored
than trying to insert them immediately after the invoke. llvm-svn: 133188
-
John McCall authored
llvm-svn: 133108
-
- Jun 15, 2011
-
-
Eli Friedman authored
llvm-svn: 133086
-
Rafael Espindola authored
llvm-svn: 133085
-
Eli Friedman authored
llvm-svn: 133078
-
Eli Friedman authored
Stop using memdep for a check that didn't really make sense with memdep. In terms of specific issues, using memdep here checks irrelevant instructions and won't work properly once we start returning "unknown" more aggressively from memdep. llvm-svn: 133035
-
Eli Friedman authored
Add "unknown" results for memdep, which mean "I don't know whether a dependence for the given instruction exists in the given block". This cleans up all the existing hacks in memdep which represent this concept by returning clobber with various unrelated instructions. llvm-svn: 133031
-
- Jun 14, 2011
-
-
Cameron Zwarich authored
llvm-svn: 132982
-
John McCall authored
line info correctly. llvm-svn: 132961
-
Nick Lewycky authored
llvm-svn: 132954
-
Cameron Zwarich authored
llvm-svn: 132952
-
- Jun 13, 2011
-
-
Cameron Zwarich authored
llvm-svn: 132940
-
Cameron Zwarich authored
llvm-svn: 132939
-
Cameron Zwarich authored
llvm-svn: 132938
-
Cameron Zwarich authored
spartan right now, but I plan to encode more information in this enum to improve the correctness and reliability of SRoA. At least this first pass makes it possible to make VectorTy an actual VectorType. llvm-svn: 132937
-
Cameron Zwarich authored
llvm-svn: 132936
-
Stuart Hastings authored
might overflow. Re-typing the alloca to a larger type (e.g. double) hoists a shift into the alloca, potentially exposing overflow in the expression. rdar://problem/9265821 llvm-svn: 132926
-
Benjamin Kramer authored
The backend already knew this trick. llvm-svn: 132915
-
Nick Lewycky authored
intrinsics. In fact, we'll optimize a bitcast to that when possible. Detect it when looking for the lifetime intrinsics. No test case, noticed by inspection. llvm-svn: 132906
-
Benjamin Kramer authored
InstCombine: Shrink ((zext X) & C1) == C2 to fold away the cast if the "zext" and the "and" have one use. llvm-svn: 132897
-
Benjamin Kramer authored
llvm-svn: 132896
-
- Jun 09, 2011
-
-
John McCall authored
llvm-svn: 132803
-
John McCall authored
pad, separating the exception and selector calls from the new lpad. Teaching it not to do that, or to properly adjust the CFG afterwards, is out of scope because it would require the other edges to the landing pad to be split as well (effectively). Instead, just recover from the most likely cases during inlining. The best long-term solution is to change the exception representation and commit to either requiring or not requiring the more complex edge-splitting logic; this is just a shorter-term hack. llvm-svn: 132799
-
John McCall authored
llvm-svn: 132797
-
Rafael Espindola authored
llvm-svn: 132775
-
Cameron Zwarich authored
llvm-svn: 132767
-
Cameron Zwarich authored
assuming that all offsets are legal vector accesses, and thus trying to access the float member of { <2 x float>, float } as the 3rd element of the first member. llvm-svn: 132766
-
Cameron Zwarich authored
former was using the size of the entire alloca, whereas the latter was correctly using the allocated size of the immediate type being converted (which may differ from the size of the alloca). This fixes PR10082. llvm-svn: 132759
-