History log of /external/llvm/lib/Analysis/ValueTracking.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
cd81d94322a39503e4a3e87b6ee03d4fcb3465fb 21-Jul-2014 Stephen Hines <srhines@google.com> Update LLVM for rebase to r212749.

Includes a cherry-pick of:
r212948 - fixes a small issue with atomic calls

Change-Id: Ib97bd980b59f18142a69506400911a6009d9df18
/external/llvm/lib/Analysis/ValueTracking.cpp
dce4a407a24b04eebc6a376f8e62b41aaa7b071f 29-May-2014 Stephen Hines <srhines@google.com> Update LLVM for 3.5 rebase (r209712).

Change-Id: I149556c940fb7dc92d075273c87ff584f400941f
/external/llvm/lib/Analysis/ValueTracking.cpp
36b56886974eae4f9c5ebc96befd3e7bfe5de338 24-Apr-2014 Stephen Hines <srhines@google.com> Update to LLVM 3.5a.

Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617
/external/llvm/lib/Analysis/ValueTracking.cpp
390ff499f053771cba51a2f42651f126a7e096f7 15-Oct-2013 Craig Topper <craig.topper@gmail.com> Remove x86_sse42_crc32_64_8 intrinsic. It has no functional difference from x86_sse42_crc32_32_8 and was not mapped to a clang builtin. I'm not even sure why this form of the instruction is even called out explicitly in the docs. Also add AutoUpgrade support to convert it into the other intrinsic with appropriate trunc and zext.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192672 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
6629210aaf9d2e4fcbecc80b35f72108304da4b4 24-Sep-2013 Benjamin Kramer <benny.kra@googlemail.com> Teach MemoryBuiltins and InstructionSimplify that operator new never returns NULL.

This is safe per C++11 18.6.1.1p3: [operator new returns] a non-null pointer to
suitably aligned storage (3.7.4), or else throw a bad_alloc exception. This
requirement is binding on a replacement version of this function.

Brings us a tiny bit closer to eliminating more vector push_backs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191310 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
c4d070ad07c606f77af15604dbbe817edd11ca9c 19-Aug-2013 Matt Arsenault <Matthew.Arsenault@amd.com> Fix assert with GEP ptr vector indexing structs

Also fix it calculating the wrong value. The struct index
is not a ConstantInt, so it was being interpreted as an array
index.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188713 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
d080fb103fdc18c4e4b8977fd3fb4e0eef18adcf 10-Aug-2013 Matt Arsenault <Matthew.Arsenault@amd.com> Teach ValueTracking about address spaces

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188140 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
36850ad779cb77930ab9e03bc1bde4ad47dc9dce 30-Jul-2013 David Majnemer <david.majnemer@gmail.com> isKnownToBeAPowerOfTwo: Strengthen isKnownToBeAPowerOfTwo's analysis on add instructions

Call into ComputeMaskedBits to figure out which bits are set on both add
operands and determine if the value is a power-of-two-or-zero or not.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187445 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
9e639e8fd95488cb4c8ef2f7f3a41919acb29ac4 11-Jul-2013 Craig Topper <craig.topper@gmail.com> Use SmallVectorImpl& instead of SmallVector to avoid repeating small vector size.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186098 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
ab6ceab8a65e26667a437a4ace7fe93a3772c6ff 09-Jul-2013 David Majnemer <david.majnemer@gmail.com> ValueTracking: Fix bugs in isKnownToBeAPowerOfTwo

(add nsw x, (and x, y)) isn't a power of two if x is zero, it's zero
(add nsw x, (xor x, y)) isn't a power of two if y has bits set that aren't set in x


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185954 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
429aead0693c4c2811029cb243c20153775ca71d 06-Jul-2013 David Majnemer <david.majnemer@gmail.com> isKnownToBeAPowerOfTwo: Fix a typo in a comment


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185748 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
58b6dc032a668e637a9a9e63290652f32d372a5f 30-Jun-2013 David Majnemer <david.majnemer@gmail.com> ValueTracking: Teach isKnownToBeAPowerOfTwo about (ADD X, (XOR X, Y)) where X is a power of two

This allows us to simplify urem instructions involving the add+xor to
turn into simpler math.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185272 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
c6af2432c802d241c8fffbe0371c023e6c58844e 25-May-2013 Michael J. Spencer <bigcheesegs@gmail.com> Replace Count{Leading,Trailing}Zeros_{32,64} with count{Leading,Trailing}Zeros.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182680 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
cb9d4667b7159944598c178dbb6568bc20ae069b 18-May-2013 David Majnemer <david.majnemer@gmail.com> isKnownToBeAPowerOfTwo: (X & Y) + Y is a power of 2 or zero if y is also.

This is useful if something that looks like (x & (1 << y)) ? 64 : 32 is
the divisor in a modulo operation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182200 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
90842427b2f6ab5c0aab6049fd9177033101847f 18-Mar-2013 Manman Ren <mren@apple.com> Check whether a pointer is non-null (isKnownNonNull) in isKnownNonZero.

This handles the case where we have an inbounds GEP with alloca as the pointer.
This fixes the regression in PR12750 and rdar://13286434.
Note that we can also fix this by handling some GEP cases in isKnownNonNull.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177321 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
603e874c64c2328cf29395e328bf77c1851068d2 06-Mar-2013 Jakub Staszak <kubastaszak@gmail.com> Use dyn_cast instead of isa && cast. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176537 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
de0eb19248f3053c07a5b1dad9c47b8435458337 31-Jan-2013 Dan Gohman <dan433584@gmail.com> Move isKnownNonNull out of AliasAnalysis.h and into ValueTracking.cpp since
it isn't really an AliasAnalysis concept, and ValueTracking has similar things
that it could plausibly share code with some day.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174027 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
a070d2a0355c4993240b5206ebc1d517c151331d 31-Jan-2013 Dan Gohman <dan433584@gmail.com> Change GetPointerBaseWithConstantOffset's DataLayout argument from a
reference to a pointer, so that it can handle the case where DataLayout
is not available and behave conservatively.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174024 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
96f498bd9f140a98321c478f517877c4767b94fa 13-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> Remove redundant 'llvm::' qualifications


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172358 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
0b8c9a80f20772c3793201ab5b251d3520b9cea3 02-Jan-2013 Chandler Carruth <chandlerc@gmail.com> Move all of the header files which are involved in modelling the LLVM IR
into their new header subdirectory: include/llvm/IR. This matches the
directory structure of lib, and begins to correct a long standing point
of file layout clutter in LLVM.

There are still more header files to move here, but I wanted to handle
them in separate commits to make tracking what files make sense at each
layer easier.

The only really questionable files here are the target intrinsic
tablegen files. But that's a battle I'd rather not fight today.

I've updated both CMake and Makefile build systems (I think, and my
tests think, but I may have missed something).

I've also re-sorted the includes throughout the project. I'll be
committing updates to Clang, DragonEgg, and Polly momentarily.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171366 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
5cec34754d540faac87fc0173fce42005c76b7d9 31-Dec-2012 Nuno Lopes <nunoplopes@sapo.pt> reimplement GetPointerBaseWithConstantOffset().
The new code is an improved copy of the code I deleted from Analysis/Loads.cpp.
One less compute-constant-gep-offset implementation. yay :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171326 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
c4265e1d68a88791a004224aac7af9e914a0d411 22-Dec-2012 Craig Topper <craig.topper@gmail.com> Remove trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170991 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
521396ab378ba3578cdfdda7422ba8bd79ffee40 19-Dec-2012 Nadav Rotem <nrotem@apple.com> Fix a bug that was found by building clang with -fsanitize.
I introduced it in r166785. PR14291.

If TD is unavailable use getScalarSizeInBits, but don't optimize
pointers or vectors of pointers.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170586 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
fd360c3e242e6317b241107a1db2b7d4a6276476 14-Dec-2012 Nadav Rotem <nrotem@apple.com> Fix a crash in ValueTracking on vectors of pointers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170240 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
dbaa2376f7b3c027e895ff4bee3ae08351f3ea88 13-Dec-2012 Rafael Espindola <rafael.espindola@gmail.com> Rename isPowerOfTwo to isKnownToBeAPowerOfTwo.

In a previous thread it was pointed out that isPowerOfTwo is not a very precise
name since it can return false for powers of two if it is unable to show that
they are powers of two.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170093 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
b09c146b116359616f6cbd4c8b3328607e00ff42 12-Dec-2012 Rafael Espindola <rafael.espindola@gmail.com> The TargetData is not used for the isPowerOfTwo determination. It has never
been used in the first place. It simply was passed to the function and to the
recursive invocations. Simply drop the parameter and update the callers for the
new signature.

Patch by Saleem Abdulrasool!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169988 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
70d3bebc8bc857fcf3d7fac44bda884d5e2a7040 07-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Add support to ValueTracking for determining that a pointer is non-null
by virtue of inbounds GEPs that preclude a null pointer.

This is a very common pattern in the code generated by std::vector and
other standard library routines which use allocators that test for null
pervasively. This is one step closer to teaching Clang+LLVM to be able
to produce an empty function for:

void f() {
std::vector<int> v;
v.push_back(1);
v.push_back(2);
v.push_back(3);
v.push_back(4);
}

Which is related to getting them to completely fold SmallVector
push_back sequences into constants when inlining and other optimizations
make that a possibility.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169573 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
85893f48a6994d71414773175440c421e5341810 06-Dec-2012 Michael Ilseman <milseman@apple.com> Have CannotBeNegativeZero() be aware of the nsz fast-math flag

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169452 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
d04a8d4b33ff316ca4cf961e06c9e312eff8e64f 03-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Use the new script to sort the includes of every file under lib.

Sooooo many of these had incorrect or strange main module includes.
I have manually inspected all of these, and fixed the main module
include to be the nearest plausible thing I could find. If you own or
care about any of these source files, I encourage you to take some time
and check that these edits were sensible. I can't have broken anything
(I strictly added headers, and reordered them, never removed), but they
may not be the headers you'd really like to identify as containing the
API being implemented.

Many forward declarations and missing includes were added to a header
files to allow them to parse cleanly when included first. The main
module rule does in fact have its merits. =]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169131 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
426c2bf5cdd2173e4a33aea8cb92cf684a724f4b 01-Nov-2012 Chandler Carruth <chandlerc@gmail.com> Revert the majority of the next patch in the address space series:

r165941: Resubmit the changes to llvm core to update the functions to
support different pointer sizes on a per address space basis.

Despite this commit log, this change primarily changed stuff outside of
VMCore, and those changes do not carry any tests for correctness (or
even plausibility), and we have consistently found questionable or flat
out incorrect cases in these changes. Most of them are probably correct,
but we need to devise a system that makes it more clear when we have
handled the address space concerns correctly, and ideally each pass that
gets updated would receive an accompanying test case that exercises that
pass specificaly w.r.t. alternate address spaces.

However, from this commit, I have retained the new C API entry points.
Those were an orthogonal change that probably should have been split
apart, but they seem entirely good.

In several places the changes were very obvious cleanups with no actual
multiple address space code added; these I have not reverted when
I spotted them.

In a few other places there were merge conflicts due to a cleaner
solution being implemented later, often not using address spaces at all.
In those cases, I've preserved the new code which isn't address space
dependent.

This is part of my ongoing effort to clean out the partial address space
code which carries high risk and low test coverage, and not likely to be
finished before the 3.2 release looms closer. Duncan and I would both
like to see the above issues addressed before we return to these
changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167222 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
12145f0339648426af2a33ed50c11de7cfcdbdf8 26-Oct-2012 Nadav Rotem <nrotem@apple.com> Fix a crash in SimpliftDemandedBits of vectors of pointers.

PR14183.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166785 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
0636291137c874388617d9ca59dbb7a86e8de84e 26-Oct-2012 Nadav Rotem <nrotem@apple.com> Revert 166726 because it may have broken a number of SPEC tests. PR14183.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166739 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
4f3c676102bc69f10920d05313ac71cb180ecc75 25-Oct-2012 Nadav Rotem <nrotem@apple.com> Fix a crash in ValueTracking. Add support for vectors of pointers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166726 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
2c39b15073db81d93bb629303915b7d7e5d088dc 15-Oct-2012 Micah Villmow <villmow@gmail.com> Resubmit the changes to llvm core to update the functions to support different pointer sizes on a per address space basis.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165941 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
fb384d61c78b60787ed65475d8403aee65023962 11-Oct-2012 Micah Villmow <villmow@gmail.com> Revert 165732 for further review.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165747 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
f3840d2c16a4ec4c879a8ded402835746de380f8 11-Oct-2012 Micah Villmow <villmow@gmail.com> Add in the first iteration of support for llvm/clang/lldb to allow variable per address space pointer sizes to be optimized correctly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165726 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
3574eca1b02600bac4e625297f4ecf745f4c4f32 08-Oct-2012 Micah Villmow <villmow@gmail.com> Move TargetData to DataLayout.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165402 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
ffcf6dffee69bd586ab8aa3e24ebbca1d5d279e7 04-Oct-2012 Duncan Sands <baldrick@free.fr> The alignment of an sret parameter is known: it must be at least the
alignment of the return type. Teach the optimizers this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165226 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
94c22716d60ff5edf6a98a3c67e0faa001be1142 27-Sep-2012 Sylvestre Ledru <sylvestre@debian.org> Revert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. See: http://en.wikipedia.org/wiki/If_and_only_if Commit 164767

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164768 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
7e2c793a2b5c746344652b6579e958ee42fafdcc 27-Sep-2012 Sylvestre Ledru <sylvestre@debian.org> Fix a typo 'iff' => 'if'

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164767 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
1144af3c9b4da48cd581156e05b24261c8de366a 25-Aug-2012 Richard Smith <richard-llvm@metafoo.co.uk> Fix integer undefined behavior due to signed left shift overflow in LLVM.
Reviewed offline by chandlerc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162623 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
0fd518beb38568e58eeec86876bb597bab06b722 03-Jul-2012 Nuno Lopes <nunoplopes@sapo.pt> PHINode::hasConstantValue(): return undef if the PHI is fully recursive.
Thanks Duncan for the idea

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159687 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
b401e3bd16c3d648464606d5e5b496dd61d12afc 10-May-2012 Dan Gohman <gohman@apple.com> Teach DeadStoreElimination to eliminate exit-block stores with phi addresses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156558 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
5ff30e70f8dc4ddfdb3bd6925ccdf524130a7b95 30-Apr-2012 Duncan Sands <baldrick@free.fr> Just mark the sign bit as known zero, rather than any other irrelevant bits
known zero in the LHS. Fixes PR12541.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155818 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
c0d18b669674d3b173e6a3eca6ada98871bb808f 07-Apr-2012 Chandler Carruth <chandlerc@gmail.com> Fix ValueTracking to conclude that debug intrinsics are safe to
speculate. Without this, loop rotate (among many other places) would
suddenly stop working in the presence of debug info. I found this
looking at loop rotate, and have augmented its tests with a reduction
out of a very hot loop in yacr2 where failing to do this rotation costs
sometimes more than 10% in runtime performance, perturbing numerous
downstream optimizations.

This should have no impact on performance without debug info, but the
change in performance when debug info is enabled can be extreme. As
a consequence (and this how I got to this yak) any profiling of
performance problems should be treated with deep suspicion -- they may
have been wildly innacurate of debug info was enabled for profiling. =/
Just a heads up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154263 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
26c8dcc692fb2addd475446cfff24d6a4e958bca 04-Apr-2012 Rafael Espindola <rafael.espindola@gmail.com> Always compute all the bits in ComputeMaskedBits.
This allows us to keep passing reduced masks to SimplifyDemandedBits, but
know about all the bits if SimplifyDemandedBits fails. This allows instcombine
to simplify cases like the one in the included testcase.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154011 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
95d594cac3737ae1594a391276942a443cac426b 31-Mar-2012 Rafael Espindola <rafael.espindola@gmail.com> Teach CodeGen's version of computeMaskedBits to understand the range metadata.
This is the CodeGen equivalent of r153747. I tested that there is not noticeable
performance difference with any combination of -O0/-O2 /-g when compiling
gcc as a single compilation unit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153817 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
7c7121edb9d3560cdc0b57f20212176c0697ec51 30-Mar-2012 Rafael Espindola <rafael.espindola@gmail.com> Add computeMaskedBitsLoad back, as it was the change to instsimplify that
caused the slowdown last time.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153747 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
89e2b318e2266a7e3fe44151642c1850ec9bd275 28-Mar-2012 Chad Rosier <mcrosier@apple.com> Revert r153521 as it's causing large regressions on the nightly testers.
Original commit message for r153521 (aka r153423):
Use the new range metadata in computeMaskedBits and add a new optimization to
instruction simplify that lets us remove an and when loding a boolean value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153587 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
d23a64cc164529739adaedb397e6279269f78efb 27-Mar-2012 Chad Rosier <mcrosier@apple.com> Reapply r153423; the original commit was fine. The failing test, distray, had
undefined behavior, which Rafael was kind enough to fix.

Original commit message for r153423:
Use the new range metadata in computeMaskedBits and add a new optimization to
instruction simplify that lets us remove an and when loding a boolean value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153521 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
cde6650bd05a745e78920e1cd508c3899ebbd644 26-Mar-2012 Chad Rosier <mcrosier@apple.com> Revert r153423 as this is causing failures on our internal nightly testers.

Original commit message:
Use the new range metadata in computeMaskedBits and add a new optimization to
instruction simplify that lets us remove an and when loading a boolean value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153452 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
7ddcd35d6beb99118f0b960329b304f9e9a2bf58 26-Mar-2012 Rafael Espindola <rafael.espindola@gmail.com> Use the new range metadata in computeMaskedBits and add a new optimization to
instruction simplify that lets us remove an and when loding a boolean value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153423 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
f201a066625e32884c9d2b766ff48fe0b70e179a 19-Mar-2012 Nick Lewycky <nicholas@mxc.ca> Factor out the multiply analysis code in ComputeMaskedBits and apply it to the
overflow checking multiply intrinsic as well.

Add a test for this, updating the test from grep to FileCheck.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153028 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
00cbccceb395899c127f2ce0ed485441fc307fa3 09-Mar-2012 Nick Lewycky <nicholas@mxc.ca> Factor out the analysis of addition and subtraction in ComputeMaskedBits. Reuse
it to analyze extractvalue(llvm.[us](add|sub).with.overflow.*) intrinsics!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152398 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
891495e67607e7f1403bb8223fad652b8c2c1e72 07-Mar-2012 Nick Lewycky <nicholas@mxc.ca> No functionality change. Type::isSized() can be expensive, so avoid calling it
until after other inexpensive tests.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152195 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
923bb4117a13eac03a6ff630a108829ab767d519 06-Mar-2012 Eli Friedman <eli.friedman@gmail.com> A few more cases of missing masking in ComputeMaskedBits; found by inspection.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152070 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
049d08f5c9e4f9f5c71d8f8d08d846ba15f2ae99 06-Mar-2012 Eli Friedman <eli.friedman@gmail.com> Make sure we don't return bits outside the mask in ComputeMaskedBits. PR12189.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152066 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
7302d80490feabfc8a01bee0fa698aab55169544 06-Feb-2012 Chris Lattner <sabre@nondot.org> Remove some dead code and tidy things up now that vectors use ConstantDataVector
instead of always using ConstantVector.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149912 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
8833ef03b9ceaa52063116819fff8b3d16fd8933 06-Feb-2012 Bill Wendling <isanbard@gmail.com> [unwind removal] Remove all of the code for the dead 'unwind' instruction. There
were no 'unwind' instructions being generated before this, so this is in effect
a no-op.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149906 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
18c7f80b3e83ab584bd8572695a3cde8bafd9d3c 05-Feb-2012 Chris Lattner <sabre@nondot.org> reapply the patches reverted in r149470 that reenable ConstantDataArray,
but with a critical fix to the SelectionDAG code that optimizes copies
from strings into immediate stores: the previous code was stopping reading
string data at the first nul. Address this by adding a new argument to
llvm::getConstantStringInfo, preserving the behavior before the patch.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149800 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
91766fe066efe6e0969ba805a2e3726a70ed34a3 01-Feb-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Revert Chris' commits up to r149348 that started causing VMCoreTests unit test to fail.

These are:

r149348
r149351
r149352
r149354
r149356
r149357
r149361
r149362
r149364
r149365

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149470 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
f0e1053a63f5522ecfe1df8fe3ea07b24cb6b193 31-Jan-2012 Chris Lattner <sabre@nondot.org> remove the last vestiges of llvm::GetConstantStringInfo, in CodeGen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149356 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
3ef9cfef13d7c7208b98b2d9995c3df6dcfe0d99 31-Jan-2012 Chris Lattner <sabre@nondot.org> Change ConstantArray::get to form a ConstantDataArray when possible,
kicking in the big win of ConstantDataArray. As part of this, change
the implementation of GetConstantStringInfo in ValueTracking to work
with ConstantDataArray (and not ConstantArray) making it dramatically,
amazingly, more efficient in the process and renaming it to
getConstantStringInfo.

This keeps around a GetConstantStringInfo entrypoint that (grossly)
forwards to getConstantStringInfo and constructs the std::string
required, but existing clients should move over to
getConstantStringInfo instead.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149351 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
6b0dc92043ab1f63d78b8796098575e1d777b701 26-Jan-2012 Chris Lattner <sabre@nondot.org> progress making the world safe to ConstantDataVector. While
we're at it, allow PatternMatch's "neg" pattern to match integer
vector negations, and enhance ComputeNumSigned bits to handle
shl of vectors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149082 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
a1f00f4d488eb5daff52faaf99c62ee652fd3b85 25-Jan-2012 Chris Lattner <sabre@nondot.org> use Constant::getAggregateElement to simplify a bunch of code.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148934 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
0f193b8a6846dab25323788638e760ae03b7cd87 25-Jan-2012 Chris Lattner <sabre@nondot.org> Use the right method to get the # elements in a CDS.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148897 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
df39028607ca751f0a3f50a76144464b825ff97a 24-Jan-2012 Chris Lattner <sabre@nondot.org> teach valuetracking about ConstantDataSequential


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148790 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
febaf8401779fedf8db7b02e499c5e39848fb9f5 05-Jan-2012 Dan Gohman <gohman@apple.com> Generalize isSafeToSpeculativelyExecute to work on arbitrary
Values, rather than just Instructions, since it's interesting
for ConstantExprs too.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147560 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
55c6d57734cd2f141dc2d6912fc22746d5eeae54 01-Jan-2012 Benjamin Kramer <benny.kra@googlemail.com> PatternMatch: Introduce a matcher for instructions with the "exact" bit. Use it to simplify a few matchers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147403 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
009da05e750b7bac7e1902fcdc85394de4ea63b3 24-Dec-2011 Benjamin Kramer <benny.kra@googlemail.com> ComputeMaskedBits: Make knownzero computation more aggressive for ctlz with undef zero.

unsigned foo(unsigned x) { return 31 - __builtin_clz(x); }
now compiles into a single "bsrl" instruction on x86.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147255 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
8369687576b062be74c941a4a90dbabb0828e028 21-Dec-2011 Nick Lewycky <nicholas@mxc.ca> Make some intrinsics safe to speculatively execute.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147036 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
f0426601977c3e386d2d26c72a2cca691dc42072 15-Dec-2011 Dan Gohman <gohman@apple.com> Move Instruction::isSafeToSpeculativelyExecute out of VMCore and
into Analysis as a standalone function, since there's no need for
it to be in VMCore. Also, update it to use isKnownNonZero and
other goodies available in Analysis, making it more precise,
enabling more aggressive optimization.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146610 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
dce42b75dc05befb4f43b664951c80752904bcde 06-Dec-2011 Chad Rosier <mcrosier@apple.com> Probably not a good idea to convert a single vector load into a memcpy. We
don't do this now, but add a test case to prevent this from happening in the
future.
Additional test for rdar://9892684

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145879 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
1608769abeb1430dc34f31ffac0d9850f99ae36a 05-Dec-2011 Nadav Rotem <nadav.rotem@intel.com> Add support for vectors of pointers.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145801 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
d3a38ccfbb6be0edad037961df77649db2cb9597 29-Nov-2011 Duncan Sands <baldrick@free.fr> Fix a theoretical problem (not seen in the wild): if different instances of a
weak variable are compiled by different compilers, such as GCC and LLVM, while
LLVM may increase the alignment to the preferred alignment there is no reason to
think that GCC will use anything more than the ABI alignment. Since it is the
GCC version that might end up in the final program (as the linkage is weak), it
is wrong to increase the alignment of loads from the global up to the preferred
alignment as the alignment might only be the ABI alignment.

Increasing alignment up to the ABI alignment might be OK, but I'm not totally
convinced that it is. It seems better to just leave the alignment of weak
globals alone.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145413 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
c4c2a024857ca92687728f573a3017091a79eaf4 28-Nov-2011 Eli Friedman <eli.friedman@gmail.com> Make SelectionDAG::InferPtrAlignment use llvm::ComputeMaskedBits instead of duplicating the logic for globals. Make llvm::ComputeMaskedBits handle GlobalVariables slightly more aggressively, to match what InferPtrAlignment knew how to do.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145304 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
a8f5cd3539580b2fe3c20c748c1374f76992f113 23-Nov-2011 Duncan Sands <baldrick@free.fr> Fix a crash in which a multiplication was being reported as being both negative
and positive: positive, because it could be directly computed to be positive;
negative, because the nsw flags means it is either negative or undefined (the
multiplication always overflowed).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145104 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
4604fc7791314af7ba7b66999e4c7fb75a4d9f6e 28-Oct-2011 Duncan Sands <baldrick@free.fr> A shift of a power of two is a power of two or zero.
For completeness - not spotted in the wild.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143211 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
32a43cc0fc3cd42702d7859eaa58dd42f561a54d 27-Oct-2011 Duncan Sands <baldrick@free.fr> Reapply commit 143028 with a fix: the problem was casting a ConstantExpr Mul
using BinaryOperator (which only works for instructions) when it should have
been a cast to OverflowingBinaryOperator (which also works for constants).
While there, correct a few other dubious looking uses of BinaryOperator.
Thanks to Chad Rosier for the testcase. Original commit message:
My super-optimizer noticed that we weren't folding this expression to
true: (x *nsw x) sgt 0, where x = (y | 1). This occurs in 464.h264ref.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143125 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
090697321b32fe010db07eb03b6a7af94d8caebd 27-Oct-2011 Bob Wilson <bob.wilson@apple.com> Revert Duncan's r143028 expression folding which appears to be the culprit
behind a compile failure on 483.xalancbmk.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143102 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
dd3149d57977d0632cfaf24290dd93416fb2a0ef 26-Oct-2011 Duncan Sands <baldrick@free.fr> The maximum power of 2 dividing a power of 2 is itself. This occurs
in 403.gcc and was spotted by my super-optimizer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143054 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
e8ec225e776c6b73ffc7d28f21677ce53b040df5 26-Oct-2011 Duncan Sands <baldrick@free.fr> My super-optimizer noticed that we weren't folding this expression to
true: (x *nsw x) sgt 0, where x = (y | 1). This occurs in 464.h264ref.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143028 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
0cd0fee91eadcee37d01398e05176e7c63bda2a7 20-Oct-2011 Nick Lewycky <nicholas@mxc.ca> "@string = constant i8 0" is a value i8* string of length zero. Analyze that
correctly in GetStringLength, fixing PR11181!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142558 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
39b5abf507b43da6b92f68b86406e0015ead18e9 18-Jul-2011 Frits van Bommel <fvbommel@gmail.com> Migrate LLVM and Clang to use the new makeArrayRef(...) functions where previously explicit non-default constructors were used.
Mostly mechanical with some manual reformatting.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135390 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
db125cfaf57cc83e7dd7453de2d509bc8efd0e5e 18-Jul-2011 Chris Lattner <sabre@nondot.org> land David Blaikie's patch to de-constify Type, with a few tweaks.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135375 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
fc6d3a49867cd38954dc40936a88f1907252c6d2 13-Jul-2011 Jay Foad <jay.foad@gmail.com> Convert InsertValueInst and ExtractValueInst APIs to use ArrayRef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135040 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
99e0b2a8df7e3a49c0e1edd250d17604fe2fb21c 27-Jun-2011 Nick Lewycky <nicholas@mxc.ca> Move onlyUsedByLifetimeMarkers to ValueTracking so that it can be used by other
passes as well.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133904 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
62660310d9e5f9ecf329fd3cacb67c344a12ddbc 27-May-2011 Chad Rosier <mcrosier@apple.com> Renamed llvm.x86.sse42.crc32 intrinsics; crc64 doesn't exist.
crc32.[8|16|32] have been renamed to .crc32.32.[8|16|32] and
crc64.[8|16|32] have been renamed to .crc32.64.[8|64].




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132163 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
b3f0673d52b72f34434dec13c4e2044c82012ef6 23-May-2011 Chris Lattner <sabre@nondot.org> Teach valuetracking that byval arguments with a specified alignment are
aligned.

Teach memcpyopt to not give up all hope when confonted with an underaligned
memcpy feeding an overaligned byval. If the *source* of the memcpy can be
determined to be adequeately aligned, or if it can be forced to be, we can
eliminate the memcpy.

This addresses PR9794. We now compile the example into:

define i32 @f(%struct.p* nocapture byval align 8 %q) nounwind ssp {
entry:
%call = call i32 @g(%struct.p* byval align 8 %q) nounwind
ret i32 %call
}

in both x86-64 and x86-32 mode. We still don't get a tailcall though,
because tailcalls apparently can't handle byval.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131884 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
cb559c1270a773de2c97c99700dcd5456f24a732 22-May-2011 Evan Cheng <evan.cheng@apple.com> Teach ValueTracking about x86 crc32 intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131861 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
7a2bdde0a0eebcd2125055e0eacaca040f0b766c 15-Apr-2011 Chris Lattner <sabre@nondot.org> Fix a ton of comment typos found by codespell. Patch by
Luis Felipe Strano Moraes!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129558 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
6bdd261df972b5e70e4242721ab16b57c6fe3d1f 03-Apr-2011 Eli Friedman <eli.friedman@gmail.com> Don't assume something which might be a constant expression is an instruction.
Based on PR9429, but no testcase because I can't figure out how to trigger it
anymore given other changes to the relevant code.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128781 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
1f7bc701b030f5b01553f306cc975eeac1e4d99b 21-Mar-2011 Nick Lewycky <nicholas@mxc.ca> Fix INT_MIN gotcha pointed out by Eli Friedman.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128028 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
14b2a59301e9e4065c7b9b07a0c68462b6037a4f 12-Mar-2011 Benjamin Kramer <benny.kra@googlemail.com> Teach ComputeMaskedBits about sub nsw.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127548 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
2715a581494ef0c7f7403f9f7dbe4c0d052d61a5 11-Mar-2011 Benjamin Kramer <benny.kra@googlemail.com> ComputeMaskedBits: sub falls through to add, and sub doesn't have the same overflow semantics as add.

Should fix the selfhost failures that started with r127463.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127465 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
b69050a94c1c9266ab048a79c8375e5b14d87c72 11-Mar-2011 Nick Lewycky <nicholas@mxc.ca> Teach ComputeMaskedBits about nsw on add. I don't think there's anything we can
do with nuw here, but sub and mul should be given similar treatment.
Fixes PR9343 #15!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127463 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
606199fb85d1c8407615e575b5e8bb5c71be27bd 08-Mar-2011 Duncan Sands <baldrick@free.fr> Fix PR9331. Simplified version of a patch by Jakub Staszak.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127243 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
c14bc77315ac4867f16c1585181b41919339eb3c 07-Mar-2011 Nick Lewycky <nicholas@mxc.ca> Add more analysis of the sign bit of an srem instruction. If the LHS is negative
then the result could go either way. If it's provably positive then so is the
srem. Fixes PR9343 #7!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127146 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
da834093b73ff67ede909f2ac616e0703ac6ce8e 28-Feb-2011 Nick Lewycky <nicholas@mxc.ca> Fix comment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126645 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
3dc7e49c70726cb47829fb892938ff75a9c9e626 28-Feb-2011 Nick Lewycky <nicholas@mxc.ca> srem doesn't actually have the same resulting sign as its numerator, you could
also have a zero when numerator = denominator. Reverts parts of r126635 and
r126637.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126644 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
3dfd98744c1f6e6c5d13e419b63ac69894ae84cf 28-Feb-2011 Nick Lewycky <nicholas@mxc.ca> Teach value tracking to make use of flags in more situations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126642 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
346018bbe7301f73b4c77a0aa89a4a938ab6af26 28-Feb-2011 Nick Lewycky <nicholas@mxc.ca> Teach ValueTracking to look at the dividend when determining the sign bit of an
srem instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126637 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
41bfbb0a8776674c486682cbf2aa80f15abfef68 19-Feb-2011 Chris Lattner <sabre@nondot.org> Stores of null pointers should turn into memset, we weren't recognizing
them as splat values.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126041 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
3b739d278c87f8ac22b5dc368b319fa278347b2f 11-Feb-2011 Nick Lewycky <nicholas@mxc.ca> Tolerate degenerate phi nodes that can occur in the middle of optimization
passes. Fixes PR9112. Patch by Jakub Staszak!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125319 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
93c780288df9631d11f996b010b2212a8b44d4d3 01-Feb-2011 Duncan Sands <baldrick@free.fr> Add a m_SignBit pattern for convenience.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124656 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
9136782d273cd45b6f19a7d0cc0d146d0791bac9 29-Jan-2011 Duncan Sands <baldrick@free.fr> Fix typo: should have been testing that X was odd, not V.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124533 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
464a4f349c95a25d06d709e79d7df21fbbb155e2 26-Jan-2011 Duncan Sands <baldrick@free.fr> APInt has a method for determining whether a number is a power of 2
which is more efficient than countPopulation - use it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124283 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
227fba11ca168225d913d1cea94a05b883092e76 25-Jan-2011 Duncan Sands <baldrick@free.fr> In which I discover that zero+zero is zero, d'oh!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124188 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
2539b73128e18ecd0511882830f47e08919e1510 25-Jan-2011 Duncan Sands <baldrick@free.fr> See if this fixes llvm-gcc bootstrap.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124184 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
d70d1a5c44609af091f6fc3e29193f9f4756a74f 25-Jan-2011 Duncan Sands <baldrick@free.fr> According to my auto-simplifier the most common missed simplifications in
optimized code are:
(non-negative number)+(power-of-two) != 0 -> true
and
(x | 1) != 0 -> true
Instcombine knows about the second one of course, but only does it if X|1
has only one use. These fire thousands of times in the testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124183 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
bd1801b5553c8be3960255a92738464e0010b6f6 24-Jan-2011 Dan Gohman <gohman@apple.com> Give GetUnderlyingObject a TargetData, to keep it in sync
with BasicAA's DecomposeGEPExpression, which recently began
using a TargetData. This fixes PR8968, though the testcase
is awkward to reduce.

Also, update several off GetUnderlyingObject's users
which happen to have a TargetData handy to pass it in.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124134 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
43b40a4620c155c73ac71b48472ea2411d7c35da 04-Jan-2011 Chris Lattner <sabre@nondot.org> fix an off-by-one bug that caused a crash analyzing
ashr's with huge shift amounts, PR8896


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122814 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
bb89710dddf967199dfc56e8bf5d28b0003f2ee6 26-Dec-2010 Chris Lattner <sabre@nondot.org> move isBytewiseValue out to ValueTracking.h/cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122565 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
9a3dc552022e0e034ef34da889f6ceb9de260c96 18-Dec-2010 Nate Begeman <natebegeman@mac.com> Add vector versions of some existing scalar transforms to aid codegen in matching psign & pblend operations to the IR produced by clang/gcc for their C idioms.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122105 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
c01895c7db4c4d8883dd4c31427c42cdae356567 15-Dec-2010 Dan Gohman <gohman@apple.com> Reapply r121886, and also update DecomposeGEPExpression to keep
it in sync.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121895 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
3928d13808b555139728268930ecffd574430769 15-Dec-2010 Dan Gohman <gohman@apple.com> Revert r121886. DecomposeGEPExpression needs to be kept
in sync.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121892 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
243712720ad1da144d4376bdd854d81260c1beaa 15-Dec-2010 Dan Gohman <gohman@apple.com> Strengthen GetUnderlyingObject using InstructionSimplify.

While LLVM's main design is that analysis code shouldn't
go out of its way to understand code which hasn't been
InstCombined, analysis utility routines like this can
find themselves being called in the middle of transform
passes when instcombine hasn't had a chance to run.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121886 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
5034dd318a9dfa0dc45a3ac01e58e60f2aa2498d 15-Dec-2010 Dan Gohman <gohman@apple.com> Move Value::getUnderlyingObject to be a standalone
function so that it can live in Analysis instead of
VMCore.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121885 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
40f8f6264d5af2c38e797e0dc59827cd231e8ff7 07-Dec-2010 Jay Foad <jay.foad@gmail.com> PR5207: Change APInt methods trunc(), sext(), zext(), sextOrTrunc() and
zextOrTrunc(), and APSInt methods extend(), extOrTrunc() and new method
trunc(), to be const and to return a new value instead of modifying the
object in place.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121120 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
7a874ddda037349184fbeb22838cc11a1a9bb78f 01-Dec-2010 Jay Foad <jay.foad@gmail.com> PR5207: Rename overloaded APInt methods set(), clear(), flip() to
setAllBits(), setBit(unsigned), etc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120564 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
ed58a6f96f605901adc0df3ca76499d52b2d1a1a 30-Nov-2010 Chris Lattner <sabre@nondot.org> move GetPointerBaseWithConstantOffset out of GVN into ValueTracking.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120476 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
a99793c5ea24dd3839f4925b89b1f6acfcb24604 30-Nov-2010 Jay Foad <jay.foad@gmail.com> PR5207: Make APInt::set(), APInt::clear() and APInt::flip() return void.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120413 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
e971131695ac41afd56e82facddccc2807aa9bbd 05-Sep-2010 Chris Lattner <sabre@nondot.org> fix PR8063, a crash in globalopt in the malloc analysis code.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113109 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
30963fbe8fa0ba3a4cc35c7c6e8f24c772f1b40c 19-Aug-2010 Chris Lattner <sabre@nondot.org> move gep decomposition out of ValueTracking into BasicAA. The form of
decomposition that it is doing is very basicaa specific and is only used
by basicaa.

Now with less tree breakingness.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111433 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
4ae56d725d25020106d8056c09b19319a4c49e93 18-Aug-2010 Daniel Dunbar <daniel@zuster.org> Revert r111375, "move gep decomposition out of ValueTracking into BasicAA. The
form of", it doesn't pass tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111385 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
6b63037306c5c3dc9bf719a34243de5045a949da 18-Aug-2010 Chris Lattner <sabre@nondot.org> move gep decomposition out of ValueTracking into BasicAA. The form of
decomposition that it is doing is very basicaa specific and is only used
by basicaa.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111375 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
91b2307a89b836f9452cf867e077ce9762d0845b 18-Aug-2010 Chris Lattner <sabre@nondot.org> fix PR7589: In brief:
gep P, (zext x) != gep P, (sext x)

DecomposeGEPExpression was getting this wrong, confusing
basicaa.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111352 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
71339c965ca6268b9bff91213364783c3d06f666 24-Jun-2010 Gabor Greif <ggreif@gmail.com> use ArgOperand accessors

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106697 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
551754c4958086cc6910da7c950f2875e212f5cf 17-Apr-2010 Eric Christopher <echristo@apple.com> Revert 101465, it broke internal OpenGL testing.

Probably the best way to know that all getOperand() calls have been handled
is to replace that API instead of updating.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101579 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
4ec2258ffb495d7ce00177e447740ef1123a27db 16-Apr-2010 Gabor Greif <ggreif@gmail.com> reapply r101434
with a fix for self-hosting

rotate CallInst operands, i.e. move callee to the back
of the operand array

the motivation for this patch are laid out in my mail to llvm-commits:
more efficient access to operands and callee, faster callgraph-construction,
smaller compiler binary


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101465 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
607a7ab3da72a2eb53553a520507cbb8068dd1d8 16-Apr-2010 Gabor Greif <ggreif@gmail.com> back out r101423 and r101397, they break llvm-gcc self-host on darwin10

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101434 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
2ff961f66816daab8bbc58a19025161d969821c2 15-Apr-2010 Gabor Greif <ggreif@gmail.com> reapply r101364, which has been backed out in r101368
with a fix

rotate CallInst operands, i.e. move callee to the back
of the operand array

the motivation for this patch are laid out in my mail to llvm-commits:
more efficient access to operands and callee, faster callgraph-construction,
smaller compiler binary


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101397 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
9ee17208115482441953127615231c59a2f4d052 15-Apr-2010 Gabor Greif <ggreif@gmail.com> back out r101364, as it trips the linux nightlybot on some clang C++ tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101368 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
165dac08d1bb8428b32a5f39cdd3dbee2888987f 15-Apr-2010 Gabor Greif <ggreif@gmail.com> rotate CallInst operands, i.e. move callee to the back
of the operand array

the motivation for this patch are laid out in my mail to llvm-commits:
more efficient access to operands and callee, faster callgraph-construction,
smaller compiler binary


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101364 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
0a60fa33210202a38a59ae3ea8681216f234ce51 15-Apr-2010 Dan Gohman <gohman@apple.com> Constify GetConstantStringInfo.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101298 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
0af20d847ac89f797d613a8a4fc3e7127ccb0b36 13-Mar-2010 Evan Cheng <evan.cheng@apple.com> Fix a typo in ValueTracking that's causing instcombine to delete needed shift instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98416 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
25ec483cfca8d3a3ba8728a4a126e04b92789069 05-Mar-2010 Eric Christopher <echristo@apple.com> Move GetStringLength and helper from SimplifyLibCalls to ValueTracking.
No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97793 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
1df9859c40492511b8aa4321eb76496005d3b75b 16-Feb-2010 Duncan Sands <baldrick@free.fr> There are two ways of checking for a given type, for example isa<PointerType>(T)
and T->isPointerTy(). Convert most instances of the first form to the second form.
Requested by Chris.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96344 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
b0bc6c361da9009e8414efde317d9bbff755f6c0 15-Feb-2010 Duncan Sands <baldrick@free.fr> Uniformize the names of type predicates: rather than having isFloatTy and
isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96223 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
cfd54181a44db5ac75cd4a7d0a3c6a199ab01c29 29-Jan-2010 Duncan Sands <baldrick@free.fr> It looks like the changes to the SRem logic of SimplifyDemandedUseBits
(fix for PR6165) are needed here too.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94801 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
8d10f9d4a836907d7bf048be507787a9233959c9 08-Jan-2010 Chris Lattner <sabre@nondot.org> teach ComputeNumSignBits to look through PHI nodes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92964 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
8c65f6e71c1d46d823b9a884819992a9255edd54 05-Jan-2010 Benjamin Kramer <benny.kra@googlemail.com> Move remaining stuff to the isInteger predicate.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92771 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
524528e614e22362b966c43c084ca113a28b69ad 15-Dec-2009 Chris Lattner <sabre@nondot.org> Fix GetConstantStringInfo to not look into MDString (it works on
real data, not metadata) and fix DbgInfoPrinter to not abuse
GetConstantStringInfo.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91444 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
69a008075b29fbe0644ccbeecf1418ef8cca5e24 02-Dec-2009 Mon P Wang <wangmp@apple.com> Fixed an assertion failure for tracking sext of a vector of integers


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90290 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
ab9530ee5d8fec9ed822a82fa21b588952269897 28-Nov-2009 Chris Lattner <sabre@nondot.org> implement a FIXME: limit the depth that DecomposeGEPExpression goes the same
way that getUnderlyingObject does it.

This fixes the 'DecomposeGEPExpression and getUnderlyingObject disagree!'
assertion on sqlite3.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90038 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
a650f770d4cfc9aabacddf41851d23c55f23cb8c 27-Nov-2009 Chris Lattner <sabre@nondot.org> limit the recursion depth of GetLinearExpression. This
fixes a crash analyzing consumer-lame, which had an "%X = add %X, 1"
in unreachable code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90000 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
1ce0eaa25fc6ecead5f9bba3c17b8af612d830ef 26-Nov-2009 Chris Lattner <sabre@nondot.org> Implement PR1143 (at -m64) by making basicaa look through extensions. We
previously already handled it at -m32 because there were no i32->i64
extensions for addressing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89959 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
b18004c13c0c494305b0ce1d748049f8c580bd99 26-Nov-2009 Chris Lattner <sabre@nondot.org> fix two transposed lines duncan caught and add an explanatory comment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89958 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
8fe8ac725b05ffabc9ab49ef7fa3f99746f4ee54 26-Nov-2009 Chris Lattner <sabre@nondot.org> this todo is resolved.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89957 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
e405c64f6b91635c8884411447ff5756c2e6b4c3 26-Nov-2009 Chris Lattner <sabre@nondot.org> move DecomposeGEPExpression out into ValueTracking.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89956 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
11fe72661dac17efa1564ef6fc212acae4f0c07e 26-Nov-2009 Chris Lattner <sabre@nondot.org> remove some redundant braces


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89912 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
ae3d802953b5209e7e9530cd5b5d4e457a6974dc 23-Nov-2009 Nick Lewycky <nicholas@mxc.ca> Remove unused LLVMContext.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89642 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
3dbb9e64d6e9d1e8bf16f75ebe4fe59ffdf93dd3 18-Nov-2009 Dan Gohman <gohman@apple.com> Simplify ComputeMultiple so that it doesn't depend on TargetData.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89175 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
2b6705f5e7c7624bd7fe486298c400f1afc15f6c 10-Nov-2009 Victor Hernandez <vhernandez@apple.com> Add ComputeMultiple() analysis function that recursively determines if a Value V is a multiple of unsigned Base

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86675 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
7b929dad59785f62a66f7c58615082f98441e95e 23-Oct-2009 Victor Hernandez <vhernandez@apple.com> Remove AllocationInst. Since MallocInst went away, AllocaInst is the only subclass of AllocationInst, so it no longer is necessary.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84969 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
a276c603b82a11b0bf0b59f0517a69e4b63adeab 17-Oct-2009 Victor Hernandez <vhernandez@apple.com> Remove MallocInst from LLVM Instructions.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84299 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
9d06175a15a61b977ebbabd0d9cc738ebfa7870c 25-Sep-2009 Dale Johannesen <dalej@apple.com> Handle sqrt in CannotBeNegativeZero. absf and absl
appear to be misspellings, removed in favor of fabs*.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82796 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
307a7c48f15b087663b60d600d23afffb9e211e6 15-Sep-2009 Dan Gohman <gohman@apple.com> Teach ValueTracking how to look through GlobalAliases. GlobalAliases are
not folded in the constant folder because the constant folder doesn't
simplify ConstantExpr operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81864 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
b9a4ddbbcd668a94fe945f0648010c281e272889 08-Sep-2009 Chris Lattner <sabre@nondot.org> fix ComputeMaskedBits handling of zext/sext/trunc to work with vectors.
This fixes PR4905


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81174 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
cf5128ec01f45d2bf7eadc20b253cb44486e473f 08-Sep-2009 Chris Lattner <sabre@nondot.org> add some comments to describe the invariants.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81173 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
148843b0ce6774866132821e866a5d2669300401 02-Sep-2009 Torok Edwin <edwintorok@gmail.com> Fix DbgStopPointInst->getFileName/getDirectory, broken by the MDNodification in
r80406, and readd a -print-dbginfo test.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80778 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
846a2f2703f6bb894098274964faf5dce0b68c4d 27-Aug-2009 Dan Gohman <gohman@apple.com> Handle TargetData with const.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80262 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
8255573835970e7130ba93271972172fb335f2ec 19-Aug-2009 Dan Gohman <gohman@apple.com> Use hasDefinitiveInitializer() instead of testing the same thing
by hand, and fix a few places that were using hasInitializer() that
appear to depend on the initializer value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79441 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
107f41fad5f8df734c72cf39a016a7ea0d874388 19-Aug-2009 Dan Gohman <gohman@apple.com> Fix SimplifyLibcalls and ValueTracking to check mayBeOverridden
before performing optimizations based on constant string values.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79384 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
1d0be15f89cb5056e20e2d24faa8d6afb1573bca 13-Aug-2009 Owen Anderson <resistor@mac.com> Push LLVMContexts through the IntegerType APIs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78948 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
004072508bfc66159ca09be26f06b8b05c1bac4e 11-Aug-2009 Dan Gohman <gohman@apple.com> Don't assume that external global variables are aligned at their preferred
alignment. Only the minimum alignment guaranteed by the ABI may be assumed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78668 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
7db949df789383acce98ef072f08794fdd5bd04e 07-Aug-2009 Dan Gohman <gohman@apple.com> Fix a bunch of namespace pollution.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78363 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
a7235ea7245028a0723e8ab7fd011386b3900777 31-Jul-2009 Owen Anderson <resistor@mac.com> Move a few more APIs back to 2.5 forms. The only remaining ones left to change back are
metadata related, which I'm waiting on to avoid conflicting with Devang.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77721 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
9e9a0d5fc26878e51a58a8b57900fcbf952c2691 31-Jul-2009 Owen Anderson <resistor@mac.com> Move more code back to 2.5 APIs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77635 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
f0443c1eb44d737d9bd78962932fc80f74c6113c 26-Jul-2009 Daniel Dunbar <daniel@zuster.org> Remove Value::getNameLen


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77148 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
e922c0201916e0b980ab3cfe91e1413e68d55647 22-Jul-2009 Owen Anderson <resistor@mac.com> Get rid of the Pass+Context magic.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76702 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
ca178908c8dc2303a1fb54a8a93bab0f0b964e11 17-Jul-2009 Dan Gohman <gohman@apple.com> Add a new Operator class, for handling Instructions and ConstantExprs
in a convenient manner, factoring out some common code from
InstructionCombining and ValueTracking. Move the contents of
BinaryOperators.h into Operator.h and use Operator to generalize them
to support ConstantExprs as well as Instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76232 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
07cf79ef537caff6d39145f190a28a336e629b6f 07-Jul-2009 Owen Anderson <resistor@mac.com> "LLVMContext* " --> "LLVMContext *"


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
76f600b205606a055ec35e7d3fd1a99602329d67 07-Jul-2009 Owen Anderson <resistor@mac.com> Finish LLVMContext-ing lib/Analysis. This required pushing LLVMContext's through the ValueTracking API.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74873 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
0dabb0b177089202dae485d085ed15bd41ef29e6 02-Jul-2009 Chris Lattner <sabre@nondot.org> do not try to analyze bitcasts from i64 to <2 x i32> in ComputedMaskedBits. While
we could do this, doing so requires adjusting the demanded mask and the code isn't
doing that yet. This fixes PR4495


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74699 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
bd5ce52740700bb482fb2b5a03bce781acbf2941 23-Jun-2009 Dan Gohman <gohman@apple.com> Fix llvm::ComputeNumSignBits to handle pointer types
conservatively correctly, instead of aborting.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73908 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
6de29f8d960505421d61c80cdb738e16720b6c0e 16-Jun-2009 Dan Gohman <gohman@apple.com> Support vector casts in more places, fixing a variety of assertion
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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73431 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
ae3a0be92e33bc716722aa600983fc1535acb122 05-Jun-2009 Dan Gohman <gohman@apple.com> Split the Add, Sub, and Mul instruction opcodes into separate
integer and floating-point opcodes, introducing
FAdd, FSub, and FMul.

For now, the AsmParser, BitcodeReader, and IRBuilder all preserve
backwards compatability, and the Core LLVM APIs preserve backwards
compatibility for IR producers. Most front-ends won't need to change
immediately.

This implements the first step of the plan outlined here:
http://nondot.org/sabre/LLVMNotes/IntegerOverflow.txt


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72897 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
3925043af0ecf1f0a6158c5007c1186797a252cb 24-May-2009 Dan Gohman <gohman@apple.com> When the low bits of one operand of an add are zero, that number
of low bits of the other operand are preserved in the output.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72365 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
9004c8afd4bf7b3f27f4a4f8fd069379afa97c83 21-May-2009 Dan Gohman <gohman@apple.com> Teach ValueTracking a new way to analyze PHI nodes, and and teach
Instcombine to be more aggressive about using SimplifyDemandedBits
on shift nodes. This allows a shift to be simplified to zero in the
included test case.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72204 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
777d2306b36816a53bc1ae1244c0dc7d998ae691 09-May-2009 Duncan Sands <baldrick@free.fr> Rename PaddedSize to AllocSize, in the hope that this
will make it more obvious what it represents, and stop
it being confused with the StoreSize.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71349 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
0582ae99ba75a556d6ff63b254da327d32ba036f 13-Mar-2009 Bill Wendling <isanbard@gmail.com> Oops...I committed too much.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66867 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
c7a09ab3110b9462ad9646cb60c22c8527491ad9 13-Mar-2009 Bill Wendling <isanbard@gmail.com> Temporarily XFAIL this test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66866 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
0001e56f15215ae4bc5fffb82eec5c4828b888f0 24-Feb-2009 Dan Gohman <gohman@apple.com> Fix a ValueTracking rule: RHS means operand 1, not 0. Add a simple
ashr instcombine to help expose this code. And apply the fix to
SelectionDAG's copy of this code too.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65364 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
79abedb83a4dd7d3583c7ca6df8283079acc3ba5 20-Jan-2009 Chris Lattner <sabre@nondot.org> Eliminate use of uint32_t to improve compatibility with cygwin


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62590 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
ceb4d1aecb9deffe59b3dcdc9a783ffde8477be9 12-Jan-2009 Duncan Sands <baldrick@free.fr> Rename getABITypeSize to getTypePaddedSize, as
suggested by Chris.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62099 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
0f2831c820151aa6f2cd6a8bd7b6b633b1035524 08-Jan-2009 Chris Lattner <sabre@nondot.org> ValueTracker can't assume that an alloca with no specified alignment
will get its preferred alignment. It has to be careful and cautiously assume
it will just get the ABI alignment. This prevents instcombine from rounding
up the alignment of a load/store without adjusting the alignment of the alloca.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61934 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
c714f1309049b2fd9e4ab68c8a7b480c63a4be0c 28-Oct-2008 David Greene <greened@obbligato.org> Re-apply 55137 with fixes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58296 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
d611cf6dcdbfcc0115f9ad273f3be903d8956d9b 22-Aug-2008 Bill Wendling <isanbard@gmail.com> Temporarily reverting r55137. This was causing the bootstrap to go into an
infinite loop.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55149 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
dce51c372a9b22aaaca4d8258aa63a336c40e5fd 21-Aug-2008 David Greene <greened@obbligato.org> Fix ComputeMaskedBits to handle phis correctly. We need to take the
minimum of the known zeros.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55137 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
a60832b0187642d01fd726dc766cd62587f6add0 14-Aug-2008 Dan Gohman <gohman@apple.com> Fix a bogus srem rule - a negative value srem'd by a power-of-2
can have a non-negative result; for example, -16%16 is 0. Also,
clarify the related comments. This fixes PR2670.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54767 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
dddc827125d307d8e992339d00ce4a6e3fe21e73 16-Jul-2008 Matthijs Kooijman <matthijs@stdin.nl> Don't use ++idx_begin when I actually mean idx_begin + 1, especially since we
also use *idx_begin in the same expression, giving unpredictable results.

This fixes this bug: http://lists.cs.uiuc.edu/pipermail/llvmdev/2008-July/015877.html



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53670 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
0ff39b3feb10477c224138156941234f5fa46f58 30-Jun-2008 Evan Cheng <evan.cheng@apple.com> - Re-apply 52748 and friends with fix. GetConstantStringInfo() returns an empty string for ConstantAggregateZero case which surprises selectiondag.
- Correctly handle memcpy from constant string which is zero-initialized.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52891 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
6d116bc7ced56a820d33b0dd35ee36af8a810eab 29-Jun-2008 Anton Korobeynikov <asl@math.spbu.ru> Revert (52748 and friends):

Move GetConstantStringInfo to lib/Analysis. Remove
string output routine from Constant. Update all
callers. Change debug intrinsic api slightly to
accomodate move of routine, these now return values
instead of strings.

This unbreaks llvm-gcc bootstrap.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52884 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
b746b82113df707df9555450991eab75b18ffa1b 28-Jun-2008 Chris Lattner <sabre@nondot.org> Add back the capability to include nul characters in strings with
GetConstantStringInfo. This will hopefully restore llvm-gcc to
happy bootstrap land.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52851 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
3284d42c17a7f95a07b73e414b50b3d0e10733a1 28-Jun-2008 Chris Lattner <sabre@nondot.org> Tighten up checking.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52850 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
3648f9f0ae79532c6bdc9c6188d0e46676de212f 27-Jun-2008 Chris Lattner <sabre@nondot.org> fix the regressions from Eric's patch by making GetConstantStringInfo
tolerate a non-nul-terminated string, and handling a direct global
reference.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52813 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
aefacb597298b31f8459970e1b13ef985bfc7a2b 26-Jun-2008 Owen Anderson <resistor@mac.com> Reserve the size we'll need in advance.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52763 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
0d2b0aba424bd3959bb5c807873def8f53e57a3c 26-Jun-2008 Eric Christopher <echristo@apple.com> Move GetConstantStringInfo to lib/Analysis. Remove
string output routine from Constant. Update all
callers. Change debug intrinsic api slightly to
accomodate move of routine, these now return values
instead of strings.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52748 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
9954c76f2c89ab3c70bfe8222534621a86f9085a 19-Jun-2008 Duncan Sands <baldrick@free.fr> Fix some warnings reported by gcc-4.3. Hopefully
this still compiles on windows - I can't test!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52488 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
3faf9df08ff389028050bfbccbef571061bf7cc1 17-Jun-2008 Matthijs Kooijman <matthijs@stdin.nl> Use a SmallVector instead of an array, since auto_ptr doesn't handle arrays
properly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52390 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
0a9aaf46bee75540db16603dd60f7d3bc597842d 16-Jun-2008 Matthijs Kooijman <matthijs@stdin.nl> Make BuildSubAggregate use FindInsertedElement again to prevent it from
inserting extractvalues. In particular, this prevents the insertion of
extractvalues that can't be folded away later. Also add an example of when this
stuff is needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52328 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
977289121996f0afb781592f92a4aee1be3010fe 16-Jun-2008 Matthijs Kooijman <matthijs@stdin.nl> Make the InsertBefore argument to FindInsertedValue optional, so you can find an inserted value without modifying the code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52319 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
0a7413dad84887bee51f20d7a5f1c4c1c7bb4c1e 16-Jun-2008 Matthijs Kooijman <matthijs@stdin.nl> Pass around Instruction* instead of Instruction& in FindInsertedValue and friends.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52318 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
710eb236e67dc021c51ef5cb5d2eb8768840895a 16-Jun-2008 Matthijs Kooijman <matthijs@stdin.nl> 80 column fixes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52316 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
b23d5adbc8230167e711070b9298985de4580f30 16-Jun-2008 Matthijs Kooijman <matthijs@stdin.nl> Move FindScalarValue from InstructionCombining.cpp to ValueTracking.cpp. While
I'm at it, rename it to FindInsertedValue.

The only functional change is that newly created instructions are no longer
added to instcombine's worklist, but that is not really necessary anyway (and
I'll commit some improvements next that will completely remove the need).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52315 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
32a9e7a2654c4aab2e617fbe53140492b3d38066 04-Jun-2008 Chris Lattner <sabre@nondot.org> Add #includes required by GCC 4.3, thanks for Zhongxing Xu
for reporting this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51926 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
d82e511aec0ea27ddd4c1e504b37f689796e965f 02-Jun-2008 Chris Lattner <sabre@nondot.org> Remove unneeded code I added.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
833f25d79ee28f1049f9177c3d2f4c9fbad6f643 02-Jun-2008 Chris Lattner <sabre@nondot.org> move CannotBeNegativeZero to ValueTracking. Simplify some signbit comparisons.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51864 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp
173234a68fb6ece106e77da443d87f09d5906cb9 02-Jun-2008 Chris Lattner <sabre@nondot.org> move ComputeMaskedBits, MaskedValueIsZero, and ComputeNumSignBits
out of instcombine into a new file in libanalysis. This also teaches
ComputeNumSignBits about the number of sign bits in a constantint.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51863 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/ValueTracking.cpp