History log of /external/llvm/lib/Transforms/InstCombine/InstCombine.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
78f8ef42173a3a9867ed789073d4ddc652fb7ff2 09-Jul-2012 Nuno Lopes <nunoplopes@sapo.pt> instcombine: merge the functions that remove dead allocas and dead mallocs/callocs/...
This patch removes ~70 lines in InstCombineLoadStoreAlloca.cpp and makes both functions a bit more aggressive than before :)
In theory, we can be more aggressive when removing an alloca than a malloc, because an alloca pointer should never escape, but we are not taking advantage of this anyway

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159952 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombine.h
06cb8ed00696eb14d1b831921452e50ec0568ea2 29-Jun-2012 Chandler Carruth <chandlerc@gmail.com> Move llvm/Support/IRBuilder.h -> llvm/IRBuilder.h

This was always part of the VMCore library out of necessity -- it deals
entirely in the IR. The .cpp file in fact was already part of the VMCore
library. This is just a mechanical move.

I've tried to go through and re-apply the coding standard's preferred
header sort, but at 40-ish files, I may have gotten some wrong. Please
let me know if so.

I'll be committing the corresponding updates to Clang and Polly, and
Duncan has DragonEgg.

Thanks to Bill and Eric for giving the green light for this bit of cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159421 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombine.h
5c525b59d5e0036a778d278eeff4832edfd41357 22-May-2012 Nuno Lopes <nunoplopes@sapo.pt> add a new pass to instrument loads and stores for run-time bounds checking
move EmitGEPOffset from InstCombine to Transforms/Utils/Local.h

(a draft of this) patch reviewed by Andrew, thanks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157261 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombine.h
9d236f909cec671ef2ff186c8fce6d2e1540a0a9 11-May-2012 Nuno Lopes <nunoplopes@sapo.pt> objectsize: add support for GEPs with non-constant indexes
add an additional parameter to InstCombiner::EmitGEPOffset() to force it to *not* emit operations with NUW flag

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156585 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombine.h
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/Transforms/InstCombine/InstCombine.h
aab8e28d5e470711d80276bbf717408c3ab966fd 02-Dec-2011 Chad Rosier <mcrosier@apple.com> Fix a few more places where TargetData/TargetLibraryInfo is not being passed.
Add FIXMEs to places that are non-trivial to fix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145661 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombine.h
00737bdb488cc7157ca5f7a40d6cd8467ad09a79 01-Dec-2011 Chad Rosier <mcrosier@apple.com> Last bit of TargetLibraryInfo propagation. Also fixed a case for TargetData
where it appeared beneficial to pass.
More of rdar://10500969

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145630 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombine.h
0ad7b6e773b33f4c4fd3c82c8a5c10ac0597792c 30-Sep-2011 Duncan Sands <baldrick@free.fr> Inlining often produces landingpad instructions with repeated
catch or repeated filter clauses. Teach instcombine a bunch
of tricks for simplifying landingpad clauses. Currently the
code only recognizes the GNU C++ and Ada personality functions,
but that doesn't stop it doing a bunch of "generic" transforms
which are hopefully fine for any real-world personality function.
If these "generic" transforms turn out not to be generic, they
can always be conditioned on the personality function. Probably
someone should add the ObjC++ personality function. I didn't as
I don't know anything about it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140852 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombine.h
4a544a79bd735967f1d33fe675ae4566dbd17813 06-Sep-2011 Duncan Sands <baldrick@free.fr> Split the init.trampoline intrinsic, which currently combines GCC's
init.trampoline and adjust.trampoline intrinsics, into two intrinsics
like in GCC. While having one combined intrinsic is tempting, it is
not natural because typically the trampoline initialization needs to
be done in one function, and the result of adjust trampoline is needed
in a different (nested) function. To get around this llvm-gcc hacks the
nested function lowering code to insert an additional parent variable
holding the adjust.trampoline result that can be accessed from the child
function. Dragonegg doesn't have the luxury of tweaking GCC code, so it
stored the result of adjust.trampoline in the memory GCC set aside for
the trampoline itself (this is always available in the child function),
and set up some new memory (using an alloca) to hold the trampoline.
Unfortunately this breaks Go which allocates trampoline memory on the
heap and wants to use it even after the parent has exited (!). Rather
than doing even more hacks to get Go working, it seemed best to just use
two intrinsics like in GCC. Patch mostly by Sanjoy Das.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139140 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombine.h
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/Transforms/InstCombine/InstCombine.h
6fd5a6000bb6d23d6e41f6a8b8d07ad3cca3ea76 19-May-2011 Eli Friedman <eli.friedman@gmail.com> Make the demanded bits/elements optimizations preserve debug line information.

I'm not sure this is quite ideal, but I can't really think of any better way to do it.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131616 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombine.h
089a246333eff6b9d01e5d4510809db14371628f 27-Apr-2011 Duncan Sands <baldrick@free.fr> Stop trying to have instcombine preserve LCSSA form: this was not
effective in avoiding recomputation of LCSSA form; the widespread
use of instsimplify (which looks through phi nodes) means it was
not preserving LCSSA form anyway; and instcombine is no longer
scheduled in the middle of the loop passes so this doesn't matter
anymore.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130301 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombine.h
562b84b3aea359d1f918184e355da82bf05eb290 11-Apr-2011 Jay Foad <jay.foad@gmail.com> Don't include Operator.h from InstrTypes.h.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129271 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombine.h
0a30c42008f88c3fba64127da8d73ba2fcd16fd6 01-Apr-2011 Benjamin Kramer <benny.kra@googlemail.com> InstCombine: Move (sext icmp) transforms into their own method. No intended functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128731 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombine.h
f56762a96dbd602f1205ff9e6d1b700d5b4a6c8a 28-Mar-2011 Frits van Bommel <fvbommel@gmail.com> Add some debug output when -instcombine uses RAUW. This can make debug output for those cases much clearer since without this it only showed that the original instruction was removed, not what it was replaced with.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128399 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombine.h
5aa3fa6d827e162893534454b2a2c4b6e50884fc 08-Mar-2011 Devang Patel <dpatel@apple.com> llvm.dbg.declare intrinsic does not use any llvm::Values. It's magic!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127282 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombine.h
74542aa5001fb6ff3d7d0958b5c391cde63df1ca 13-Feb-2011 Chris Lattner <sabre@nondot.org> refactor some code out into a helper method.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125451 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombine.h
31726c154dafa9fef08b1bcac9822c2a4618ec19 29-Jan-2011 Frits van Bommel <fvbommel@gmail.com> Call SimplifyFDivInst() in InstCombiner::visitFDiv().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124535 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombine.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/lib/Transforms/InstCombine/InstCombine.h
9922ccf4b483ce37524047879f9b2f9bb73e3ccb 16-Jan-2011 Chris Lattner <sabre@nondot.org> remove the AllowAggressive argument to FoldOpIntoPhi. It is forced to false in the
first line of the function because it isn't a good idea, even for compares.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123566 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombine.h
687140c818ba4b896329a83324714140b6580ef8 25-Dec-2010 Chris Lattner <sabre@nondot.org> Move getOrEnforceKnownAlignment out of instcombine into Transforms/Utils.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122554 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombine.h
37bf92b5238434b00fde79347ba5336e7554e562 22-Dec-2010 Duncan Sands <baldrick@free.fr> Add a generic expansion transform: A op (B op' C) -> (A op B) op' (A op C)
if both A op B and A op C simplify. This fires fairly often but doesn't
make that much difference. On gcc-as-one-file it removes two "and"s and
turns one branch into a select.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122399 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombine.h
50f2625b22e05d838ddfa17f6861de78cb5e2779 23-Nov-2010 Duncan Sands <baldrick@free.fr> Rename SimplifyDistributed to the more meaningfull name SimplifyByFactorizing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120051 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombine.h
5057f381418ddc8c96699c40479ead993cd62e7b 23-Nov-2010 Duncan Sands <baldrick@free.fr> Exploit distributive laws (eg: And distributes over Or, Mul over Add, etc) in a
fairly systematic way in instcombine. Some of these cases were already dealt
with, in which case I removed the existing code. The case of Add has a bunch of
funky logic which covers some of this plus a few variants (considers shifts to be
a form of multiplication), which I didn't touch. The simplification performed is:
A*B+A*C -> A*(B+C). The improvement is to do this in cases that were not already
handled [such as A*B-A*C -> A*(B-C), which was reported on the mailing list], and
also to do it more often by not checking for "only one use" if "B+C" simplifies.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120024 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombine.h
096aa79276b8527a3cbbb3691e40e729dea09523 13-Nov-2010 Duncan Sands <baldrick@free.fr> Generalize the reassociation transform in SimplifyCommutative (now renamed to
SimplifyAssociativeOrCommutative) "(A op C1) op C2" -> "A op (C1 op C2)",
which previously was only done if C1 and C2 were constants, to occur whenever
"C1 op C2" simplifies (a la InstructionSimplify). Since the simplifying operand
combination can no longer be assumed to be the right-hand terms, consider all of
the possible permutations. When compiling "gcc as one big file", transform 2
(i.e. using right-hand operands) fires about 4000 times but it has to be said
that most of the time the simplifying operands are both constants. Transforms
3, 4 and 5 each fired once. Transform 6, which is an existing transform that
I didn't change, never fired. With this change, the testcase is now optimized
perfectly with one run of instcombine (previously it required instcombine +
reassociate + instcombine, and it may just have been luck that this worked).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119002 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombine.h
081c34b725980f995be9080eaec24cd3dfaaf065 19-Oct-2010 Owen Anderson <resistor@mac.com> Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which
must be called in the pass's constructor. This function uses static dependency declarations to recursively initialize
the pass's dependencies.

Clients that only create passes through the createFooPass() APIs will require no changes. Clients that want to use the
CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h
before parsing commandline arguments.

I have tested this with all standard configurations of clang and llvm-gcc on Darwin. It is possible that there are problems
with the static dependencies that will only be visible with non-standard options. If you encounter any crash in pass
registration/creation, please send the testcase to me directly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116820 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombine.h
90c579de5a383cee278acc3f7e7b9d0a656e6a35 06-Aug-2010 Owen Anderson <resistor@mac.com> Reapply r110396, with fixes to appease the Linux buildbot gods.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110460 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombine.h
1f74590e9d1b9cf0f1f81a156efea73f76546e05 06-Aug-2010 Owen Anderson <resistor@mac.com> Revert r110396 to fix buildbots.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110410 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombine.h
9ccaf53ada99c63737547c0235baeb8454b04e80 06-Aug-2010 Owen Anderson <resistor@mac.com> Don't use PassInfo* as a type identifier for passes. Instead, use the address of the static
ID member as the sole unique type identifier. Clean up APIs related to this change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110396 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombine.h
916973706d9b2559c7f88cef8b0f4e40a6450c06 24-Jun-2010 Gabor Greif <ggreif@gmail.com> use ArgOperand API, also tighten the type of visitFree to make this work out smoothly

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106736 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombine.h
1d9b973fd7e60e4149678a03aac762551c846f13 27-May-2010 Duncan Sands <baldrick@free.fr> Teach instCombine to remove malloc+free if malloc's only uses are comparisons
to null. Patch by Matti Niemenmaa.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104871 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombine.h
16d8f8bd919b72866e687d99f3aa94a140137c59 11-May-2010 Duncan Sands <baldrick@free.fr> I got tired of VISIBILITY_HIDDEN colliding with the gcc enum. Rename it
to LLVM_LIBRARY_VISIBILITY and introduce LLVM_GLOBAL_VISIBILITY, which is
the opposite, for future use by dragonegg.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103495 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombine.h
27ceaa13f820e33c44e29adc2095dd3e1e69d09f 06-Mar-2010 Eric Christopher <echristo@apple.com> Migrate _chk call lowering from SimplifyLibCalls to InstCombine. Stub
out the remainder of the calls that we should lower in some way and
move the tests to the new correct directory. Fix up tests that are now
optimized more than they were before by -instcombine.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97875 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombine.h
f34f48c57870cf4eb4d48e23b11e29b95d1950c3 05-Mar-2010 Chris Lattner <sabre@nondot.org> Fix PR6503. This turned into a much more interesting and nasty bug. Various
parts of the cmp|cmp and cmp&cmp folding logic wasn't prepared for vectors
(unrelated to the bug but noticed while in the code) and the code was
*definitely* not safe to use by the (cast icmp)|(cast icmp) handling logic
that I added in r95855. Fix all this up by changing the various routines
to more consistently use IRBuilder and not pass in the I which had the wrong
type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97801 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombine.h
8c5ad3a5da7419af4d31963c3824836b5da52478 11-Feb-2010 Chris Lattner <sabre@nondot.org> Rename ValueRequiresCast to ShouldOptimizeCast, to better reflect
what it does. Enhance it to return false to optimizing vector
sign extensions from vector comparisions, which is the idiom used
to get a splatted vector for a vector comparison.

Doing this breaks vector-casts.ll, add some compensating
transformations to handle the important case they cover without
depending on this canonicalization.

This fixes rdar://7434900 a serious pessimization of vector compares.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95855 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombine.h
d84dfa43f25c4f4b84e51fc1060353a738a9812e 10-Jan-2010 Chris Lattner <sabre@nondot.org> inline and remove the rest of commonIntCastTransforms.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93091 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombine.h
94aab49339ee1158b6aa7735ff1de9041ef2d334 05-Jan-2010 Chris Lattner <sabre@nondot.org> make this a static function instead of a method.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92795 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombine.h
d12c27ce0079ba14e73e0c422a30dac68c631a23 05-Jan-2010 Chris Lattner <sabre@nondot.org> split mul/div/rem instructions out to their own file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92689 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombine.h
43fd9017a69a6314fb780f87083b1e57a0981287 05-Jan-2010 Chris Lattner <sabre@nondot.org> convert various IntrinsicInst's to use class instead of struct.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92681 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombine.h
da92fb430ecad8ef9cf189232cca946d51e7e950 05-Jan-2010 Daniel Dunbar <daniel@zuster.org> Fix some struct/class specifier mismatches.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92550 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombine.h
80f43d339f0a5904c62ca6268939c14ab148b94f 04-Jan-2010 Chris Lattner <sabre@nondot.org> split 943 lines of instcombine out to a new InstCombineCasts.cpp
file. InstructionCombining.cpp is now down to a svelte 9300 lines :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92468 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombine.h
02446fc99abb06d3117d65c0b1f5fba4f906db2e 04-Jan-2010 Chris Lattner <sabre@nondot.org> split instcombine of compares (visit[FI]Cmp) out to
a new InstCombineCompares.cpp file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92467 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombine.h
e0b4b721aa82796c6ee5cf501ecd85f4974732ee 04-Jan-2010 Chris Lattner <sabre@nondot.org> move the 'SimplifyDemandedFoo' methods out to their own file, cutting 1K lines out of instcombine.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92465 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombine.h
ac8f2fd2e217d063d7ef57b8698894739f707431 04-Jan-2010 Chris Lattner <sabre@nondot.org> split the instcombine class definition out to a header shared
among the instcombine library.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92463 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombine.h