History log of /external/llvm/include/llvm/Analysis/InstructionSimplify.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
dce4a407a24b04eebc6a376f8e62b41aaa7b071f 29-May-2014 Stephen Hines <srhines@google.com> Update LLVM for 3.5 rebase (r209712).

Change-Id: I149556c940fb7dc92d075273c87ff584f400941f
/external/llvm/include/llvm/Analysis/InstructionSimplify.h
00d7baad90040cd117d717ff93c41a22f767759b 06-Aug-2013 Matt Arsenault <Matthew.Arsenault@amd.com> Fix missing -*- C++ -*-s

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187758 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/InstructionSimplify.h
43d836343e56b78d9a660272c84a8feb1683d861 31-Jan-2013 Dan Gohman <dan433584@gmail.com> Document another instsimplify assumption.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174100 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/InstructionSimplify.h
c4e441804ebe5a2d0eadbd9b0840d4f1b12d5a6f 28-Jan-2013 Dan Gohman <dan433584@gmail.com> Add a comment mentioning that InstructionSimplify routines do,
in fact, resolve undef uses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173721 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/InstructionSimplify.h
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/include/llvm/Analysis/InstructionSimplify.h
e949aa1c91132094a9073c82a8aef729fa8c9eca 28-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Teach instsimplify to use the constant folder where appropriate for
constant folding calls. Add the initial tests for this which show that
now instsimplify can simplify blindingly obvious code patterns expressed
with both intrinsics and library calls.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171194 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/InstructionSimplify.h
c98bd9f1a79adffe73acd337b6f7f9afa6bae078 28-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Add entry points to instsimplify for simplifying calls. The entry points
are nice and decomposed so that we can simplify synthesized calls as
easily as actually call instructions. The internal utility still has the
same behavior, it just now operates on a more generic interface so that
I can extend the set of call simplifications that instsimplify knows
about.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171189 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/InstructionSimplify.h
09ee250e728ccdb7afc6354d777f8319c5a0465c 12-Dec-2012 Michael Ilseman <milseman@apple.com> Added a slew of SimplifyInstruction floating-point optimizations, many of which take advantage of fast-math flags. Test cases included.

fsub X, +0 ==> X
fsub X, -0 ==> X, when we know X is not -0
fsub +/-0.0, (fsub -0.0, X) ==> X
fsub nsz +/-0.0, (fsub +/-0.0, X) ==> X
fsub nnan ninf X, X ==> 0.0
fadd nsz X, 0 ==> X
fadd [nnan ninf] X, (fsub [nnan ninf] 0, X) ==> 0
where nnan and ninf have to occur at least once somewhere in this expression
fmul X, 1.0 ==> X



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169940 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/InstructionSimplify.h
1638b839090a35adcd5a4b4cc0a649352276e703 09-Dec-2012 Michael Ilseman <milseman@apple.com> Reorganize FastMathFlags to be a wrapper around unsigned, and streamline some interfaces.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169712 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/InstructionSimplify.h
eb61c920f12cacee38815bf10821d2f294b66f3a 27-Nov-2012 Michael Ilseman <milseman@apple.com> Fast-math optimization: fold multiply by zero

Added in first optimization using fast-math flags to serve as an example for following optimizations. SimplifyInstruction will now try to optimize an fmul observing its FastMathFlags to see if it can fold multiply by zero when 'nnan' and 'nsz' flags are set.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168648 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/InstructionSimplify.h
407a6169b729c72c3a7ddb01b8454ab0b4f6897c 15-Nov-2012 Michael Ilseman <milseman@apple.com> Remove trailing whitespace

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168103 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/InstructionSimplify.h
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/include/llvm/Analysis/InstructionSimplify.h
6b980541df5846ad335c377c8803b517968daee2 24-Mar-2012 Chandler Carruth <chandlerc@gmail.com> Refactor the interface to recursively simplifying instructions to be tad
bit simpler by handling a common case explicitly.

Also, refactor the implementation to use a worklist based walk of the
recursive users, rather than trying to use value handles to detect and
recover from RAUWs during the recursive descent. This fixes a very
subtle bug in the previous implementation where degenerate control flow
structures could cause mutually recursive instructions (PHI nodes) to
collapse in just such a way that From became equal to To after some
amount of recursion. At that point, we hit the inf-loop that the assert
at the top attempted to guard against. This problem is defined away when
not using value handles in this manner. There are lots of comments
claiming that the WeakVH will protect against just this sort of error,
but they're not accurate about the actual implementation of WeakVHs,
which do still track RAUWs.

I don't have any test case for the bug this fixes because it requires
running the recursive simplification on unreachable phi nodes. I've no
way to either run this or easily write an input that triggers it. It was
found when using instruction simplification inside the inliner when
running over the nightly test-suite.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153393 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/InstructionSimplify.h
bd0fe5642544d4ec3aee1ede7af60c006bae5cbf 13-Mar-2012 Duncan Sands <baldrick@free.fr> Generalize the "trunc(ptrtoint(x)) - trunc(ptrtoint(y)) ->
trunc(ptrtoint(x-y))" optimization introduced by Chandler.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152626 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/InstructionSimplify.h
0aa85eb231dc76bcabcd35f6dc9a50536f607df3 13-Mar-2012 Duncan Sands <baldrick@free.fr> Uniformize the InstructionSimplify interface by ensuring that all routines
take a TargetLibraryInfo parameter. Internally, rather than passing TD, TLI
and DT parameters around all over the place, introduce a struct for holding
them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152623 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/InstructionSimplify.h
618c1dbd293d15ee19f61b1156ab8086ad28311a 01-Dec-2011 Chad Rosier <mcrosier@apple.com> Propagate TargetLibraryInfo throughout ConstantFolding.cpp and
InstructionSimplify.cpp. Other fixups as needed.
Part of rdar://10500969

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145559 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/InstructionSimplify.h
dabc2806726a286b00313419fac8461ebe0f774c 05-Sep-2011 Duncan Sands <baldrick@free.fr> Add some simple insertvalue simplifications, for the purpose of cleaning
up do-nothing exception handling code produced by dragonegg.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139113 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/InstructionSimplify.h
b9b54ebfed02f0654897d37e8a4448d3f8087558 19-Jul-2011 Jay Foad <jay.foad@gmail.com> Convert SimplifyGEPInst to use ArrayRef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135482 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/InstructionSimplify.h
194cfb08ffe5d1c6f457b8fd1d688540a29dfc75 02-May-2011 Duncan Sands <baldrick@free.fr> Forgot to commit the changes to this file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130695 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/InstructionSimplify.h
81a0dc911586c77421c2255aa417dc9b350b9e20 09-Feb-2011 Chris Lattner <sabre@nondot.org> Teach instsimplify some tricks about exact/nuw/nsw shifts.
improve interfaces to instsimplify to take this info.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125196 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/InstructionSimplify.h
1fca2c32cc99197215d3fd32a4ad05214c74edd1 29-Jan-2011 Frits van Bommel <fvbommel@gmail.com> Move InstCombine's knowledge of fdiv to SimplifyInstruction().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124534 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/InstructionSimplify.h
593faa53fa6d89841e601cc4571d143a6a05f0b4 28-Jan-2011 Duncan Sands <baldrick@free.fr> My auto-simplifier noticed that ((X/Y)*Y)/Y occurs several times in SPEC
benchmarks, and that it can be simplified to X/Y. (In general you can only
simplify (Z*Y)/Y to Z if the multiplication did not overflow; if Z has the
form "X/Y" then this is the case). This patch implements that transform and
moves some Div logic out of instcombine and into InstructionSimplify.
Unfortunately instcombine gets in the way somewhat, since it likes to change
(X/Y)*Y into X-(X rem Y), so I had to teach instcombine about this too.
Finally, thanks to the NSW/NUW flags, sometimes we know directly that "Z*Y"
does not overflow, because the flag says so, so I added that logic too. This
eliminates a bunch of divisions and subtractions in 447.dealII, and has good
effects on some other benchmarks too. It seems to have quite an effect on
tramp3d-v4 but it's hard to say if it's good or bad because inlining decisions
changed, resulting in massive changes all over.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124487 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/InstructionSimplify.h
c43cee3fbb3098f0647e50dd2c13bc55b027a228 14-Jan-2011 Duncan Sands <baldrick@free.fr> Move some shift transforms out of instcombine and into InstructionSimplify.
While there, I noticed that the transform "undef >>a X -> undef" was wrong.
For example if X is 2 then the top two bits must be equal, so the result can
not be anything. I fixed this in the constant folder as well. Also, I made
the transform for "X << undef" stronger: it now folds to undef always, even
though X might be zero. This is in accordance with the LangRef, but I must
admit that it is fairly aggressive. Also, I added "i32 X << 32 -> undef"
following the LangRef and the constant folder, likewise fairly aggressive.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123417 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/InstructionSimplify.h
19f14dcf6af11b5520acfc5c2fd4100ec1972b44 28-Dec-2010 Duncan Sands <baldrick@free.fr> Clarify that InstructionSimplify only returns values that dominate the
original instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122601 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/InstructionSimplify.h
82fdab335881cd90f8f7ab3ad1f1ca0bb3ee886a 21-Dec-2010 Duncan Sands <baldrick@free.fr> Pull a few more simplifications out of instcombine (there are still
plenty left though!), in particular for multiplication.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122330 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/InstructionSimplify.h
fea3b218d61708ea3577f4ef14c8f7677a94db95 15-Dec-2010 Duncan Sands <baldrick@free.fr> Move Sub simplifications and additional Add simplifications out of
instcombine and into InstructionSimplify.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121861 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/InstructionSimplify.h
4cd2ad15b43f21d641330b4b09961af08646445e 23-Nov-2010 Duncan Sands <baldrick@free.fr> Expand a little on the description of what InstructionSimplify does.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120016 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/InstructionSimplify.h
2b749870d0488c3b049edf5d0c8875f56f5b1bed 17-Nov-2010 Duncan Sands <baldrick@free.fr> Move some those Xor simplifications which don't require creating new
instructions out of InstCombine and into InstructionSimplify. While
there, introduce an m_AllOnes pattern to simplify matching with integers
and vectors with all bits equal to one.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/InstructionSimplify.h
d261dc650a01ac5c51ab10f97f1e35aa6a770721 17-Nov-2010 Duncan Sands <baldrick@free.fr> Previously SimplifyInstruction could report that an instruction
simplified to itself (this can only happen in unreachable blocks).
Change it to return null instead. Hopefully this will fix some
buildbot failures.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119490 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/InstructionSimplify.h
1845009290e4d804ad377927bd8a08cca3036adc 16-Nov-2010 Duncan Sands <baldrick@free.fr> In which I discover the existence of loops. Threading an operation
over a phi node by applying it to each operand may be wrong if the
operation and the phi node are mutually interdependent (the testcase
has a simple example of this). So only do this transform if it would
be correct to perform the operation in each predecessor of the block
containing the phi, i.e. if the other operands all dominate the phi.
This should fix the FFMPEG snow.c regression reported by İsmail Dönmez.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119347 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/InstructionSimplify.h
eff0581583ef10e2872e9baf537a04b67d992101 14-Nov-2010 Duncan Sands <baldrick@free.fr> If dom tree information is available, make it possible to pass
it to get better phi node simplification.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119055 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/InstructionSimplify.h
12a86f5b3199e72e6d967781acc76340f5920e46 14-Nov-2010 Duncan Sands <baldrick@free.fr> Strip trailing whitespace.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119038 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/InstructionSimplify.h
4e282decf3960bfa6b1fe3fd77bb51ff96121515 16-Sep-2010 Owen Anderson <resistor@mac.com> Revert r114097, adding back in the assertion against replacing an Instruction by itself. Now that CorrelatedValuePropagation is
more careful not to call SimplifyInstructionsInBlock() on an unreachable block, the issue has been fixed at a higher level. Add
a big warning to SimplifyInstructionsInBlock() to hopefully prevent this in the future.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114117 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/InstructionSimplify.h
047542669a20505fc7c5f2d93caa5610aa3db2c5 20-Apr-2010 Chris Lattner <sabre@nondot.org> move some select simplifications out out instcombine into
inst simplify. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101873 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/InstructionSimplify.h
8aee8efc0c2e387faa7dae39fdf613a22889b566 27-Nov-2009 Chris Lattner <sabre@nondot.org> factor some logic out of instcombine into a new SimplifyAddInst method.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90011 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/InstructionSimplify.h
c514c1f5218b8fe7499a0b9a4737860344cf4c43 27-Nov-2009 Chris Lattner <sabre@nondot.org> factor some instcombine simplifications for getelementptr out to a new
SimplifyGEPInst method in InstructionSimplify.h. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89980 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/InstructionSimplify.h
40d8c28b27377199b7465ba2c5a2c59c6fd12fa9 10-Nov-2009 Chris Lattner <sabre@nondot.org> move some generally useful functions out of jump threading
into libanalysis and transformutils.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86735 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/InstructionSimplify.h
e34537856a544c83513e390ac9552a8bc3823346 10-Nov-2009 Chris Lattner <sabre@nondot.org> add a new SimplifyInstruction API, which is like ConstantFoldInstruction,
except that the result may not be a constant. Switch jump threading to
use it so that it gets things like (X & 0) -> 0, which occur when phi preds
are deleted and the remaining phi pred was a zero.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86637 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/InstructionSimplify.h
d06094f0682f2ede03caff4892b1a57469896d48 10-Nov-2009 Chris Lattner <sabre@nondot.org> factor simplification logic for AND and OR out to InstSimplify from instcombine.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86635 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/InstructionSimplify.h
9dbb42944c4d7caddab21016b24cca31019a3faf 10-Nov-2009 Chris Lattner <sabre@nondot.org> rename SimplifyCompare -> SimplifyCmpInst and split it into
Simplify[IF]Cmp pieces. Add some predicates to CmpInst to
determine whether a predicate is fp or int.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86624 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/InstructionSimplify.h
9f3c25aeb3df77a336693308dc0f19a4983c99af 09-Nov-2009 Chris Lattner <sabre@nondot.org> stub out a new libanalysis "instruction simplify" interface that
takes decimated instructions and applies identities to them. This
is pretty minimal at this point, but I plan to pull some instcombine
logic out into these and similar routines.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86613 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/InstructionSimplify.h