- Oct 24, 2009
-
-
Chris Lattner authored
llvm-svn: 84993
-
Chris Lattner authored
Duncan for the nice tiny testcase. llvm-svn: 84992
-
- Oct 23, 2009
-
-
Chris Lattner authored
implements something out of Target/README.txt producing: _foo: ## @foo movl 4(%esp), %eax movapd LCPI1_0, %xmm0 movapd %xmm0, (%eax) ret $4 instead of: _foo: ## @foo movl 4(%esp), %eax movapd _b, %xmm0 mulpd LCPI1_0, %xmm0 addpd _a, %xmm0 movapd %xmm0, (%eax) ret $4 llvm-svn: 84942
-
Chris Lattner authored
bytes (i256). llvm-svn: 84941
-
Chris Lattner authored
non-type-safe constant initializers. This sort of thing happens quite a bit for 4-byte loads out of string constants, unions, bitfields, and an interesting endianness check from sqlite, which is something like this: const int sqlite3one = 1; # define SQLITE_BIGENDIAN (*(char *)(&sqlite3one)==0) # define SQLITE_LITTLEENDIAN (*(char *)(&sqlite3one)==1) # define SQLITE_UTF16NATIVE (SQLITE_BIGENDIAN?SQLITE_UTF16BE:SQLITE_UTF16LE) all of these macros now constant fold away. This implements PR3152 and is based on a patch started by Eli, but heavily modified and extended. llvm-svn: 84936
-
- Oct 22, 2009
-
-
Chris Lattner authored
llvm-svn: 84841
-
Chris Lattner authored
to libanalysis. Instcombine shrinking... does this even make sense??? llvm-svn: 84840
-
Chris Lattner authored
Analysis/ConstantFolding.cpp. This doesn't change the behavior of instcombine but makes other clients of ConstantFoldInstruction able to handle loads. This was partially extracted from Eli's patch in PR3152. llvm-svn: 84836
-
- Oct 06, 2009
-
-
Evan Phoenix authored
llvm-svn: 83338
-
- Oct 05, 2009
-
-
Dan Gohman authored
ConstantFoldLoadThroughGEPConstantExpr. llvm-svn: 83311
-
Chris Lattner authored
llvm-svn: 83295
-
Chris Lattner authored
llvm-svn: 83294
-
Chris Lattner authored
llvm-svn: 83292
-
- Sep 16, 2009
-
-
Chris Lattner authored
llvm-svn: 81961
-
- Sep 11, 2009
-
-
Dan Gohman authored
how to fold notionally-out-of-bounds array getelementptr indices instead of just doing these in lib/Analysis/ConstantFolding.cpp, because it can be done in a fairly general way without TargetData, and because not all constants are visited by lib/Analysis/ConstantFolding.cpp. This enables more constant folding. Also, set the "inbounds" flag when the getelementptr indices are one-past-the-end. llvm-svn: 81483
-
Dan Gohman authored
llvm-svn: 81473
-
- Sep 04, 2009
-
-
Dan Gohman authored
introduced regressions in the Ocaml bindings tests. llvm-svn: 80969
-
Dan Gohman authored
and exact flags. Because ConstantExprs are uniqued, creating an expression with this flag causes all expressions with the same operands to have the same flag, which may not be safe. Add, sub, mul, and sdiv ConstantExprs are usually folded anyway, so the main interesting flag here is inbounds, and the constant folder already knows how to set the inbounds flag automatically in most cases, so there isn't an urgent need for the API support. This can be reconsidered in the future, but for now just removing these API bits eliminates a source of potential trouble with little downside. llvm-svn: 80959
-
- Sep 02, 2009
-
-
Chris Lattner authored
and we get the original pointer type. This doesn't mean that we're at the first pointer being indexed. Correct the predicate. llvm-svn: 80762
-
- Aug 21, 2009
-
-
Dan Gohman authored
llvm-svn: 79651
-
Dan Gohman authored
offset computations. This fixes a truncation bug on targets that don't have 64-bit pointers. llvm-svn: 79639
-
- Aug 20, 2009
-
-
Dan Gohman authored
llvm-svn: 79533
-
Dan Gohman authored
array member of a struct, it's possible to land in an arbitrary position inside that struct, such that attempting to find further getelementptr indices will fail. In such cases, folding cannot be done. llvm-svn: 79485
-
- Aug 19, 2009
-
-
Dan Gohman authored
static extents of the static array type, it causes GlobalOpt and other passes to be more conservative. This canonicalization also allows the constant folder to add "inbounds" to GEPs. llvm-svn: 79440
-
- Aug 13, 2009
-
-
Owen Anderson authored
llvm-svn: 78948
-
- Jul 31, 2009
-
-
Owen Anderson authored
metadata related, which I'm waiting on to avoid conflicting with Devang. llvm-svn: 77721
-
Owen Anderson authored
llvm-svn: 77635
-
- Jul 30, 2009
-
-
Owen Anderson authored
llvm-svn: 77516
-
- Jul 29, 2009
-
-
Owen Anderson authored
llvm-svn: 77494
-
- Jul 28, 2009
-
-
Owen Anderson authored
llvm-svn: 77366
-
- Jul 27, 2009
-
-
Owen Anderson authored
llvm-svn: 77247
-
- Jul 26, 2009
-
-
Daniel Dunbar authored
llvm-svn: 77148
-
- Jul 25, 2009
-
-
Owen Anderson authored
Revert the ConstantInt constructors back to their 2.5 forms where possible, thanks to contexts-on-types. More to come. llvm-svn: 77011
-
- Jul 22, 2009
-
-
Owen Anderson authored
llvm-svn: 76702
-
- Jul 14, 2009
-
-
Torok Edwin authored
This adds location info for all llvm_unreachable calls (which is a macro now) in !NDEBUG builds. In NDEBUG builds location info and the message is off (it only prints "UREACHABLE executed"). llvm-svn: 75640
-
- Jul 11, 2009
-
-
Torok Edwin authored
Make llvm_unreachable take an optional string, thus moving the cerr<< out of line. LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for NDEBUG builds. llvm-svn: 75379
-
- Jul 08, 2009
-
-
Nick Lewycky authored
these instructions, no autoupgrade or backwards compatibility support is provided. llvm-svn: 74991
-
- Jul 07, 2009
-
-
Owen Anderson authored
llvm-svn: 74878
-
- Jul 06, 2009
-
-
Owen Anderson authored
llvm-svn: 74844
-
- Jun 16, 2009
-
-
Dan Gohman authored
failures. To support this, add some utility functions to Type to help support vector/scalar-independent code. Change ConstantInt::get and ConstantFP::get to support vector types, and add an overload to ConstantInt::get that uses a static IntegerType type, for convenience. Introduce a new getConstant method for ScalarEvolution, to simplify common use cases. llvm-svn: 73431
-