History log of /external/llvm/include/llvm/LinkAllPasses.h
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
dce4a407a24b04eebc6a376f8e62b41aaa7b071f 29-May-2014 Stephen Hines <srhines@google.com> Update LLVM for 3.5 rebase (r209712).

Change-Id: I149556c940fb7dc92d075273c87ff584f400941f
36b56886974eae4f9c5ebc96befd3e7bfe5de338 24-Apr-2014 Stephen Hines <srhines@google.com> Update to LLVM 3.5a.

Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617
bebe48dbfe00078329341945bfb11f778ace6d12 17-Nov-2013 Hal Finkel <hfinkel@anl.gov> Add a loop rerolling pass

This adds a loop rerolling pass: the opposite of (partial) loop unrolling. The
transformation aims to take loops like this:

for (int i = 0; i < 3200; i += 5) {
a[i] += alpha * b[i];
a[i + 1] += alpha * b[i + 1];
a[i + 2] += alpha * b[i + 2];
a[i + 3] += alpha * b[i + 3];
a[i + 4] += alpha * b[i + 4];

and turn them into this:

for (int i = 0; i < 3200; ++i) {
a[i] += alpha * b[i];

and loops like this:

for (int i = 0; i < 500; ++i) {
x[3*i] = foo(0);
x[3*i+1] = foo(0);
x[3*i+2] = foo(0);

and turn them into this:

for (int i = 0; i < 1500; ++i) {
x[i] = foo(0);

There are two motivations for this transformation:

1. Code-size reduction (especially relevant, obviously, when compiling for
code size).

2. Providing greater choice to the loop vectorizer (and generic unroller) to
choose the unrolling factor (and a better ability to vectorize). The loop
vectorizer can take vector lengths and register pressure into account when
choosing an unrolling factor, for example, and a pre-unrolled loop limits that
choice. This is especially problematic if the manual unrolling was optimized
for a machine different from the current target.

The current implementation is limited to single basic-block loops only. The
rerolling recognition should work regardless of how the loop iterations are
intermixed within the loop body (subject to dependency and side-effect
constraints), but the significant restriction is that the order of the
instructions in each iteration must be identical. This seems sufficient to
capture all current use cases.

This pass is not currently enabled by default at any optimization level.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194939 91177308-0d34-0410-b5e6-96231b3b80d8
dd5d86d992eb129ecd0bb013d2db2d6a0e8d2605 02-Oct-2013 Chandler Carruth <chandlerc@gmail.com> Remove the very substantial, largely unmaintained legacy PGO

This was essentially work toward PGO based on a design that had several
flaws, partially dating from a time when LLVM had a different
architecture, and with an effort to modernize it abandoned without being
completed. Since then, it has bitrotted for several years further. The
result is nearly unusable, and isn't helping any of the modern PGO
efforts. Instead, it is getting in the way, adding confusion about PGO
in LLVM and distracting everyone with maintenance on essentially dead
code. Removing it paves the way for modern efforts around PGO.

Among other effects, this removes the last of the runtime libraries from
LLVM. Those are being developed in the separate 'compiler-rt' project
now, with somewhat different licensing specifically more approriate for

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191835 91177308-0d34-0410-b5e6-96231b3b80d8
3748de6e2d7620794ff93b896d85aff6cc0ea9d2 14-Sep-2013 Chandler Carruth <chandlerc@gmail.com> Remove the long, long defunct IR block placement pass.

This pass was based on the previous (essentially unused) profiling
infrastructure and the assumption that by ordering the basic blocks at
the IR level in a particular way, the correct layout would happen in the
end. This sometimes worked, and mostly didn't. It also was a really
naive implementation of the classical paper that dates from when branch
predictors were primarily directional and when loop structure wasn't
commonly available. It also didn't factor into the equation
non-fallthrough branches and other machine level details.

Anyways, for all of these reasons and more, I wrote
MachineBlockPlacement, which completely supercedes this pass. It both
uses modern profile information infrastructure, and actually works. =]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190748 91177308-0d34-0410-b5e6-96231b3b80d8
a8a7099c1849fcbb4a68642a292fd0250aa46505 23-Aug-2013 Richard Sandiford <rsandifo@linux.vnet.ibm.com> Turn MipsOptimizeMathLibCalls into a target-independent scalar transform

...so that it can be used for z too. Most of the code is the same.
The only real change is to use TargetTransformInfo to test when a sqrt
instruction is available.

The pass is opt-in because at the moment it only handles sqrt.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189097 91177308-0d34-0410-b5e6-96231b3b80d8
be87bce32bc9af9bc5918a6e08806b61e3088165 20-Jun-2013 Meador Inge <meadori@codesourcery.com> Remove the simplify-libcalls pass (finally)

This commit completely removes what is left of the simplify-libcalls
pass. All of the functionality has now been migrated to the instcombine
and functionattrs passes. The following C API functions are now NOPs:

1. LLVMAddSimplifyLibCallsPass
2. LLVMPassManagerBuilderSetDisableSimplifyLibCalls

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184459 91177308-0d34-0410-b5e6-96231b3b80d8
ad966ea7a81a538425d5319f6d8568e460639e54 19-Jun-2013 Matt Arsenault <Matthew.Arsenault@amd.com> Move StructurizeCFG out of R600 to generic Transforms.

Register it with PassManager

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184343 91177308-0d34-0410-b5e6-96231b3b80d8
8383b539ff4c039108ee0c202a27b787621d96cf 09-Apr-2013 Nadav Rotem <nrotem@apple.com> Add support for bottom-up SLP vectorization infrastructure.

This commit adds the infrastructure for performing bottom-up SLP vectorization (and other optimizations) on parallel computations.
The infrastructure has three potential users:

1. The loop vectorizer needs to be able to vectorize AOS data structures such as (sum += A[i] + A[i+1]).

2. The BB-vectorizer needs this infrastructure for bottom-up SLP vectorization, because bottom-up vectorization is faster to compute.

3. A loop-roller needs to be able to analyze consecutive chains and roll them into a loop, in order to reduce code size. A loop roller does not need to create vector instructions, and this infrastructure separates the chain analysis from the vectorization.

This patch also includes a simple (100 LOC) bottom up SLP vectorizer that uses the infrastructure, and can vectorize this code:

void SAXPY(int *x, int *y, int a, int i) {
x[i] = a * x[i] + y[i];
x[i+1] = a * x[i+1] + y[i+1];
x[i+2] = a * x[i+2] + y[i+2];
x[i+3] = a * x[i+3] + y[i+3];

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179117 91177308-0d34-0410-b5e6-96231b3b80d8
423de3f0478fd8e4f8aa650d8cf9f64d08963118 08-Mar-2013 David Blaikie <dblaikie@gmail.com> Remove -print-dbginfo as it is unused & bitrotten.

This pass hasn't been touched in two years & would fail with assertions against
the current debug info metadata format (the only test case for it still uses a
many-versions old debug info metadata format)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176707 91177308-0d34-0410-b5e6-96231b3b80d8
68b2faf6be3a08064687a67a19efee0a713435de 09-Feb-2013 Sergei Larin <slarin@codeaurora.org> Enable *BasicBlockPass::createPrinterPass()

Enables raw_ostream I/O for BasicBlockPass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174776 91177308-0d34-0410-b5e6-96231b3b80d8
24c4898973a074713201fb9351d302b9f7733e92 28-Jan-2013 Michael Gottesman <mgottesman@apple.com> Extracted ObjCARC.cpp into its own library libLLVMObjCARCOpts in preparation for refactoring the ARC Optimizer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173647 91177308-0d34-0410-b5e6-96231b3b80d8
a125cacf7d154d0e5cad47f011e619e45517c839 11-Jan-2013 Andrew Trick <atrick@apple.com> Added -view-callgraph module pass.

-dot-callgraph similarly follows a standard module pass pattern.

Patch by Speziale Ettore!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172220 91177308-0d34-0410-b5e6-96231b3b80d8
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
ae3b652f5cc19d83b6466d4fa70a7d1c7fb6d06c 12-Dec-2012 Nadav Rotem <nrotem@apple.com> LoopVectorizer: Use the "optsize" attribute to decide if we are allowed to increase the function size.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170004 91177308-0d34-0410-b5e6-96231b3b80d8
5da804150d418b8b4956b84013f8f67df553c543 12-Dec-2012 Nadav Rotem <nrotem@apple.com> LoopVectorizer: When -Os is used, vectorize only loops that dont require a tail loop. There is no testcase because I dont know of a way to initialize the loop vectorizer pass without adding an additional hidden flag.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169950 91177308-0d34-0410-b5e6-96231b3b80d8
255f89faee13dc491cb64fbeae3c763e7e2ea4e6 03-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Sort the #include lines for the include/... tree with the script.

AKA: Recompile *ALL* the source code!

This one went much better. No manual edits here. I spot-checked for
silliness and grep-checked for really broken edits and everything seemed
good. It all still compiles. Yell if you see something that looks goofy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169133 91177308-0d34-0410-b5e6-96231b3b80d8
6bed58ef240b1e1a1fb41fb867a8ba6e7566e0e9 02-Nov-2012 Nadav Rotem <nrotem@apple.com> Add a cost model analysis that allows us to estimate the cost of IR-level instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167324 91177308-0d34-0410-b5e6-96231b3b80d8
b8b3f6081f8dc409e7281e1597d8d94e50e4b028 26-Oct-2012 Benjamin Kramer <benny.kra@googlemail.com> Remove LoopDependenceAnalysis.

It was unmaintained and not much more than a stub. The new DependenceAnalysis
pass is both more general and complete.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166810 91177308-0d34-0410-b5e6-96231b3b80d8
e5551ed9cec1ae777c4e4b8852a1d7842c2e1c3d 26-Oct-2012 Rafael Espindola <rafael.espindola@gmail.com> Change the internalize pass to internalize all symbols when given an empty
list of externals. This makes sense since a shared library with no symbols
can still be useful if it has static constructors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166795 91177308-0d34-0410-b5e6-96231b3b80d8
d15c0c7ac118cb23241b002e7206221283e36e2d 17-Oct-2012 Nadav Rotem <nrotem@apple.com> Add a loop vectorizer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166112 91177308-0d34-0410-b5e6-96231b3b80d8
ad43499fc4c2879e25e8c83ddd556a3079e41516 11-Oct-2012 Sebastian Pop <spop@codeaurora.org> dependence analysis

Patch from Preston Briggs <preston.briggs@gmail.com>.

This is an updated version of the dependence-analysis patch, including an MIV
test based on Banerjee's inequalities.

It's a fairly complete implementation of the paper

Practical Dependence Testing
Gina Goff, Ken Kennedy, and Chau-Wen Tseng
PLDI 1991

It cannot yet propagate constraints between coupled RDIV subscripts (discussed
in Section 5.3.2 of the paper).

It's organized as a FunctionPass with a single entry point that supports testing
for dependence between two instructions in a function. If there's no dependence,
it returns null. If there's a dependence, it returns a pointer to a Dependence
which can be queried about details (what kind of dependence, is it loop
independent, direction and distance vector entries, etc). I haven't included
every imaginable feature, but there's a good selection that should be adequate
for supporting many loop transformations. Of course, it can be extended as

Included in the patch file are many test cases, commented with C code showing
the loops and array references.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165708 91177308-0d34-0410-b5e6-96231b3b80d8
95f1ef4ac7f3bf7fd0c4636984fe1c5f8e4190a9 11-Sep-2012 Alex Rosenberg <alexr@leftfield.org> Add a pass that renames everything with metasyntatic names. This works well after using bugpoint to reduce the confusion presented by the original names, which no longer mean what they used to.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163592 91177308-0d34-0410-b5e6-96231b3b80d8
d26200423ee818e54d4088bd0c499caf840d866d 29-Aug-2012 Manman Ren <mren@apple.com> Profile: set branch weight metadata with data generated from profiling.

This patch implements ProfileDataLoader which loads profile data generated by
-insert-edge-profiling and updates branch weight metadata accordingly.

Patch by Alastair Murray.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162799 91177308-0d34-0410-b5e6-96231b3b80d8
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
de5e5ec3045a73a06b1054417f9ac6c02929e9ce 01-Feb-2012 Hal Finkel <hfinkel@anl.gov> Add a basic-block autovectorization pass.

This is the initial checkin of the basic-block autovectorization pass along with some supporting vectorization infrastructure.
Special thanks to everyone who helped review this code over the last several months (especially Tobias Grosser).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149468 91177308-0d34-0410-b5e6-96231b3b80d8
2f6263c96a6ed234b8d314cc35c8e2fcc3e81ccc 17-Jan-2012 Dan Gohman <gohman@apple.com> Add a new ObjC ARC optimization pass to eliminate unneeded
autorelease push+pop pairs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148330 91177308-0d34-0410-b5e6-96231b3b80d8
e229248cb187a927c6e06c3c4de7b61eae281b1d 06-Dec-2011 Nick Lewycky <nicholas@mxc.ca> All these arguments are default anyways.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145876 91177308-0d34-0410-b5e6-96231b3b80d8
f940a1a869b4fe6f857e7fd8aeb97e7b7e9b390e 31-Aug-2011 Rafael Espindola <rafael.espindola@gmail.com> Remove the old tail duplication pass. It is not used and is unable to update
ssa, so it has to be run really early in the pipeline. Any replacement
should probably use the SSAUpdater.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138841 91177308-0d34-0410-b5e6-96231b3b80d8
0e122d1c2422285c872f68fc0ae1f7e5d2739572 29-Aug-2011 Andrew Trick <atrick@apple.com> Reapply r138695. Fix PassManager stack depths.

Patch by Xiaoyi Guo!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138737 91177308-0d34-0410-b5e6-96231b3b80d8
8592a0cda4cf4ae76c5a29230fb330d0e952bb62 27-Aug-2011 Andrew Trick <atrick@apple.com> Reverting r138695 to see if it fixes clang self host.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138701 91177308-0d34-0410-b5e6-96231b3b80d8
b84619223051fd965cc64e70c8f6b70f7ae6ae85 27-Aug-2011 Andrew Trick <atrick@apple.com> Fix PassManager stack depths.

Patch by Xiaoyi Guo!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138695 91177308-0d34-0410-b5e6-96231b3b80d8
2626dba9c5515d2e534c117bb16ceb03dd4d0930 04-Aug-2011 Bill Wendling <isanbard@gmail.com> Remove the LowerSetJmp pass. It wasn't used effectively by any of the targets.
This is some of my original LLVM code. *wipes tear*

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136821 91177308-0d34-0410-b5e6-96231b3b80d8
1afcace3a3a138b1b18e5c6270caa8dae2261ae2 09-Jul-2011 Chris Lattner <sabre@nondot.org> Land the long talked about "type system rewrite" patch. This
patch brings numerous advantages to LLVM. One way to look at it
is through diffstat:
109 files changed, 3005 insertions(+), 5906 deletions(-)

Removing almost 3K lines of code is a good thing. Other advantages

1. Value::getType() is a simple load that can be CSE'd, not a mutating
union-find operation.
2. Types a uniqued and never move once created, defining away PATypeHolder.
3. Structs can be "named" now, and their name is part of the identity that
uniques them. This means that the compiler doesn't merge them structurally
which makes the IR much less confusing.
4. Now that there is no way to get a cycle in a type graph without a named
struct type, "upreferences" go away.
5. Type refinement is completely gone, which should make LTO much MUCH faster
in some common cases with C++ code.
6. Types are now generally immutable, so we can use "Type *" instead
"const Type *" everywhere.

Downsides of this patch are that it removes some functions from the C API,
so people using those will have to upgrade to (not yet added) new API.
"LLVM 3.0" is the right time to do this.

There are still some cleanups pending after this, this patch is large enough

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134829 91177308-0d34-0410-b5e6-96231b3b80d8
9da9934e27dfb48de77b80a3e20ed2d869b52024 06-Jul-2011 Jakub Staszak <jstaszak@apple.com> Introduce "expect" intrinsic instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134516 91177308-0d34-0410-b5e6-96231b3b80d8
9fbd318d36e618fb08fb53bb48b7c848e617a8a7 16-Jun-2011 John McCall <rjmccall@apple.com> The ARC language-specific optimizer. Credit to Dan Gohman.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133108 91177308-0d34-0410-b5e6-96231b3b80d8
f5c95b889f270f170ff4f6a24b082be5bb68296e 18-May-2011 Bill Wendling <isanbard@gmail.com> Conditionalize the format of the GCOV files by target type. Darwin uses the 4.2

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131503 91177308-0d34-0410-b5e6-96231b3b80d8
a61e52c9b7cf874b46cef687c1c4627a35952542 21-Apr-2011 Nick Lewycky <nicholas@mxc.ca> Add independent controls for whether GCOV profiling should emit .gcno files or
instrument the program to emit .gcda.
TODO: we should emit slightly different .gcda files when .gcno emission is off.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129903 91177308-0d34-0410-b5e6-96231b3b80d8
b1928704201034c785a26296a49f69355eb56a05 16-Apr-2011 Nick Lewycky <nicholas@mxc.ca> Rename LineProfiling to GCOVProfiling to more accurately represent what it
does. Also mostly implement it. Still a work-in-progress, but generates legal
output on crafted test cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129630 91177308-0d34-0410-b5e6-96231b3b80d8
93b68b20d46f52e2df6914343f1c54c96d6bdf3d 12-Apr-2011 Nick Lewycky <nicholas@mxc.ca> Add support for line profiling. Very work-in-progress.

Use debug info in the IR to find the directory/file:line:col. Each time that location changes, bump a counter.

Unlike the existing profiling system, we don't try to look at argv[], and thusly don't require main() to be present in the IR. This matches GCC's technique where you specify the profiling flag when producing each .o file.

The runtime library is minimal, currently just calling printf at program shutdown time. The API is designed to make it possible to emit GCOV data later on.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129340 91177308-0d34-0410-b5e6-96231b3b80d8
b5f18f5df00e861b68a06d7d6da0664b3e0ba3d8 12-Apr-2011 Chris Lattner <sabre@nondot.org> remove the StructRetPromotion pass. It is unused, not maintained and
has some bugs. If this is interesting functionality, it should be
reimplemented in the argpromotion pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129314 91177308-0d34-0410-b5e6-96231b3b80d8
1a8b9dd7fb945ab78232f3853219cc693bcb5fad 05-Apr-2011 Chris Lattner <sabre@nondot.org> remove postdom frontiers, because it is dead. Forward dom frontiers are
still used by RegionInfo :(

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128943 91177308-0d34-0410-b5e6-96231b3b80d8
00141694fa9fd846a051e335c3ec6ba335aca602 28-Feb-2011 Dan Gohman <gohman@apple.com> Delete the GEPSplitter experiment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126671 91177308-0d34-0410-b5e6-96231b3b80d8
1551abdea6206870df86f730a289a74ef506d259 28-Feb-2011 Dan Gohman <gohman@apple.com> Delete the SimplifyHalfPowrLibCalls pass, which was unused, and
only existed as the result of a misunderstanding.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126669 91177308-0d34-0410-b5e6-96231b3b80d8
c92383fd0d5ec4aea4745e04071fa61d1b24230a 28-Feb-2011 Dan Gohman <gohman@apple.com> Delete the LiveValues pass. I won't get get back to the project it
was started for in the foreseeable future.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126668 91177308-0d34-0410-b5e6-96231b3b80d8
04317cc618aeae28910916469e074d8ce0fcaa03 29-Jan-2011 Andrew Trick <atrick@apple.com> Implementation of path profiling.
Modified patch by Adam Preuss.

This builds on the existing framework for block tracing, edge profiling and optimal edge profiling.
See -help-hidden for new flags.
For documentation, see the technical report "Implementation of Path Profiling..." in llvm.org/pubs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124515 91177308-0d34-0410-b5e6-96231b3b80d8
0092b1142f5d35d204f35ec3cfe19d8de082400f 16-Jan-2011 Chris Lattner <sabre@nondot.org> remove the partial specialization pass. It is unmaintained and has bugs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123554 91177308-0d34-0410-b5e6-96231b3b80d8
12be936cc912b1ff4d1c73c7f2c805a3462da1ab 02-Jan-2011 Chris Lattner <sabre@nondot.org> sketch out a new early cse pass. No functionality yet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122713 91177308-0d34-0410-b5e6-96231b3b80d8
b0db161f5b85c4a31046d2271d9e270991b53a15 26-Dec-2010 Chris Lattner <sabre@nondot.org> Start of a pass for recognizing memset and memcpy idioms.
No functionality yet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122562 91177308-0d34-0410-b5e6-96231b3b80d8
43ff68ded09bf6f722548fa6c62d742483bd133c 20-Dec-2010 Duncan Sands <baldrick@free.fr> Add a new convenience pass for testing InstructionSimplify. Previously
it could only be tested indirectly, via instcombine, gvn or some other
pass that makes use of InstructionSimplify, which means that testcases
had to be carefully contrived to dance around any other transformations
that that pass did.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122264 91177308-0d34-0410-b5e6-96231b3b80d8
d8c5ec6aece5732c766bd7d773ff75976d364168 25-Oct-2010 Tobias Grosser <grosser@fim.uni-passau.de> Reference RegionPass to stop it being eliminated.

Contributed by: ether

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117263 91177308-0d34-0410-b5e6-96231b3b80d8
a8702eaf78e70e1eef8a63882ce97ae6d60edf5b 18-Oct-2010 Dan Gohman <gohman@apple.com> Make AliasSetTracker TBAA-aware, enabling TBAA-enabled LICM.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116743 91177308-0d34-0410-b5e6-96231b3b80d8
d82e9e7d939bb4b4f4773e9853c061e14188f705 08-Oct-2010 Devang Patel <dpatel@apple.com> Remove LoopIndexSplit pass. It is neither maintained nor used by anyone.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116004 91177308-0d34-0410-b5e6-96231b3b80d8
3c99c769eb8995ba25de21aa686b09e53d2a7bbe 29-Sep-2010 Chris Lattner <sabre@nondot.org> remove PointerTracking from mainline, Edwin is going to move it out to ClamAV
for LLVM 2.9

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115062 91177308-0d34-0410-b5e6-96231b3b80d8
ead0109f5bc010af837d0fa7c9bb2401b34fb29d 17-Sep-2010 Dan Gohman <gohman@apple.com> Add a pass which prints out all the memdep dependencies.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114121 91177308-0d34-0410-b5e6-96231b3b80d8
25e9405272630204eb721d8b6ab47a5a25f24885 31-Aug-2010 Owen Anderson <resistor@mac.com> Rename ValuePropagation to a more descriptive CorrelatedValuePropagation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112591 91177308-0d34-0410-b5e6-96231b3b80d8
5f88af537637831451ff9ffa08c597e05e7dc9fb 28-Aug-2010 Chris Lattner <sabre@nondot.org> remove the ABCD and SSI passes. They don't have any clients that
I'm aware of, aren't maintained, and LVI will be replacing their value.
nlewycky approved this on irc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112355 91177308-0d34-0410-b5e6-96231b3b80d8
a0b59f6bd23afaeba923b94f46838cffd5218a12 28-Aug-2010 Owen Anderson <resistor@mac.com> Add a prototype of a new peephole optimizing pass that uses LazyValue info to simplify PHIs and select's.
This pass addresses the missed optimizations from PR2581 and PR4420.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112325 91177308-0d34-0410-b5e6-96231b3b80d8
3bababf880bfeaf1bcda7e4f808007621b6bfac8 03-Aug-2010 Peter Collingbourne <peter@pcc.me.uk> Add an atomic lowering pass

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110113 91177308-0d34-0410-b5e6-96231b3b80d8
c182cb5784cfe557f3c8fa6cfb208c02d2ed42d5 03-Aug-2010 Dan Gohman <gohman@apple.com> Sketch up a preliminary Type-Based Alias Analysis implementation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110077 91177308-0d34-0410-b5e6-96231b3b80d8
f96b0063674e6bf72da5429bd49097e33c2325c7 22-Jul-2010 Tobias Grosser <grosser@fim.uni-passau.de> Add new RegionInfo pass.

The RegionInfo pass detects single entry single exit regions in a function,
where a region is defined as any subgraph that is connected to the remaining
graph at only two spots.
Furthermore an hierarchical region tree is built.
Use it by calling "opt -regions analyze" or "opt -view-regions".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109089 91177308-0d34-0410-b5e6-96231b3b80d8
26d14294de179ada3ba472d206bd25e9785f05a3 01-Jul-2010 Devang Patel <dpatel@apple.com> Debugging infomration is encoded in llvm IR using metadata. This is designed
such a way that debug info for symbols preserved even if symbols are
optimized away by the optimizer.

Add new special pass to remove debug info for such symbols.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107416 91177308-0d34-0410-b5e6-96231b3b80d8
ef0b14593bb8dd5651606925584adb1ac1096ba5 07-May-2010 Dan Gohman <gohman@apple.com> Add a simple module-level debug info printer. It just sets up a
DebugInfoFinder and iterates over all the contents calling print.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103262 91177308-0d34-0410-b5e6-96231b3b80d8
28a193ed8b4b37593afb76f9130eacf393ea9383 07-May-2010 Dan Gohman <gohman@apple.com> Add an LLVM IR version of code sinking. This uses the same simple algorithm
as MachineSink, but it isn't constrained by MachineInstr-level details.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103257 91177308-0d34-0410-b5e6-96231b3b80d8
fd649015795ec187dace55f6c00e9d0999ba0373 13-Apr-2010 Owen Anderson <resistor@mac.com> SCCVN, we hardly knew ye!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101117 91177308-0d34-0410-b5e6-96231b3b80d8
113902e9fba5f4baf3de3c6ac0241d49ffdfa55c 08-Apr-2010 Dan Gohman <gohman@apple.com> Add a -lint pass which checks for common sources of undefined or likely
unintended behavior.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100798 91177308-0d34-0410-b5e6-96231b3b80d8
a9cf19670f50095eac7191a5360ed03839e87465 01-Mar-2010 Chris Lattner <sabre@nondot.org> remove anders-aa from mainline, it isn't maintained and is
tantalyzing enough that people keep trying to use it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97483 91177308-0d34-0410-b5e6-96231b3b80d8
d2592ff69ba86d8d5da5b598429f373cb2842699 09-Feb-2010 Eric Christopher <echristo@apple.com> Pull these back out, they're a little too aggressive and time
consuming for a simple optimization.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95671 91177308-0d34-0410-b5e6-96231b3b80d8
1926b648e132631282aa15d25e4f8278f87c24fb 09-Feb-2010 Eric Christopher <echristo@apple.com> Add a new pass to do llvm.objsize lowering using SCEV.
Initial skeleton and SCEVUnknown lowering implemented,
the rest should come relatively quickly. Move testcase
to new directory.

Move pass to right before SimplifyLibCalls - which is
moved down a bit so we can take advantage of a few opts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95628 91177308-0d34-0410-b5e6-96231b3b80d8
5fadf1770901ae9ce231d9a68cb68da7bc4f2a91 02-Jan-2010 Chris Lattner <sabre@nondot.org> remove the random sampling framework, which is not maintained anymore.
If there is interest, it can be resurrected from SVN. PR4912.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92422 91177308-0d34-0410-b5e6-96231b3b80d8
f8fb7c26ee251e71be8a5372dc4936f3042c7553 11-Nov-2009 Chris Lattner <sabre@nondot.org> remove the now dead condprop pass, PR3906.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86810 91177308-0d34-0410-b5e6-96231b3b80d8
10f2d13d580da348ba9769864f02d0d5a862c1e0 11-Nov-2009 Chris Lattner <sabre@nondot.org> Stub out a new lazy value info pass, which will eventually
vend value constraint information to the optimizer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86767 91177308-0d34-0410-b5e6-96231b3b80d8
9f476e3179713a1e93bbf634855b85a93f8653cd 31-Oct-2009 Dan Gohman <gohman@apple.com> Remove CodeGenLICM. It's largely obsoleted by MachineLICM's new ability
to unfold loop-invariant loads.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85657 91177308-0d34-0410-b5e6-96231b3b80d8
40cc524edee857eab238338200d2cc80f840f52f 28-Oct-2009 Nick Lewycky <nicholas@mxc.ca> Add ABCD, a generalized implementation of the Elimination of Array Bounds
Checks on Demand algorithm which looks at arbitrary branches instead of loop
iterations. This is GSoC work by Andre Tavares with only editorial changes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85382 91177308-0d34-0410-b5e6-96231b3b80d8
8b251c25b2a999f48db47509db2ddb9e80cd49ff 27-Oct-2009 Owen Anderson <resistor@mac.com> Forgot to commit these.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85180 91177308-0d34-0410-b5e6-96231b3b80d8
046e78ce55a7c3d82b7b6758d2d77f2d99f970bf 27-Oct-2009 Victor Hernandez <vhernandez@apple.com> Remove FreeInst.
Remove LowerAllocations pass.
Update some more passes to treate free calls just like they were treating FreeInst.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85176 91177308-0d34-0410-b5e6-96231b3b80d8
6000e253d4b59677030fdf2f53f8d1e5fa00a1a4 26-Oct-2009 Dan Gohman <gohman@apple.com> Check in the experimental GEP splitter pass. This pass splits complex
GEPs (more than one non-zero index) into simple GEPs (at most one
non-zero index). In some simple experiments using this it's not
uncommon to see 3% overall code size wins, because it exposes
redundancies that can be eliminated, however it's tricky to use
because instcombine aggressively undoes the work that this pass does.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85144 91177308-0d34-0410-b5e6-96231b3b80d8
66284e063a1e46500acae48bdc0e4a00652021d1 24-Oct-2009 Victor Hernandez <vhernandez@apple.com> Auto-upgrade free instructions to calls to the builtin free function.
Update all analysis passes and transforms to treat free calls just like FreeInst.
Remove RaiseAllocations and all its tests since FreeInst no longer needs to be raised.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84987 91177308-0d34-0410-b5e6-96231b3b80d8
98b532cf33a3198391f2f411879059f6c7bf99a0 18-Oct-2009 Chris Lattner <sabre@nondot.org> remove the IndMemRemPass, which only made sense for when malloc/free were intrinsic

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84404 91177308-0d34-0410-b5e6-96231b3b80d8
b839c5577d8ecb884ffb6874a14782797faec9c4 18-Oct-2009 Chris Lattner <sabre@nondot.org> add function passes for printing various dominator datastructures
accessible through opt. Patch by Tobias Grosser!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84397 91177308-0d34-0410-b5e6-96231b3b80d8
8ef27511e32bf704e2a25ebc96858439ab58f449 08-Oct-2009 Chris Lattner <sabre@nondot.org> remove LoopVR pass. According to Nick:
"LoopVR's logic was copied into ScalarEvolution::getUnsignedRange and
::getSignedRange. Please delete LoopVR."

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83531 91177308-0d34-0410-b5e6-96231b3b80d8
7963e159515bfb21c39739b84a1abc5b36c0a5a7 06-Oct-2009 Chris Lattner <sabre@nondot.org> remove predicate simplifier, it never got the last bugs beaten
out of it, and jump threading, condprop and gvn are now getting
most of the benefit. This was approved by Nicholas and Nicolas.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83390 91177308-0d34-0410-b5e6-96231b3b80d8
99be299edb6531cad64785196d65414b888e7453 01-Oct-2009 Chris Lattner <sabre@nondot.org> remove the GVNPRE pass. It has been subsumed by the GVN pass.
Ok'd by Owen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83193 91177308-0d34-0410-b5e6-96231b3b80d8
6f65d79750154c92c3e184c8cf3233a66c411c87 16-Sep-2009 Dan Gohman <gohman@apple.com> Add a new pass for doing late hoisting of floating-point and vector
constants out of loops. These aren't covered by the regular LICM
pass, because in LLVM IR constants don't require separate
instructions. They're not always covered by the MachineLICM pass
either, because it doesn't know how to unfold folded constant-pool
loads. This is somewhat experimental at this point, and off by

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82076 91177308-0d34-0410-b5e6-96231b3b80d8
ad09d42e04d16fe4abe36e4642de22805dbe2752 01-Sep-2009 Andreas Neustifter <astifter-llvm@gmx.at> Addedum to r80712, forgot to add files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80713 91177308-0d34-0410-b5e6-96231b3b80d8
e7ddcfdebe357b4067f9c7d68d44616e11351a23 01-Sep-2009 Andreas Neustifter <astifter-llvm@gmx.at> Preparation for Optimal Edge Profiling:
This adds a pass to verify the current profile against the flow conditions.
This is very helpful when later on trying to perserve the profiling information
during all passes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80666 91177308-0d34-0410-b5e6-96231b3b80d8
2385e0e22ca482f2896dfa975a08db2f54926c09 26-Aug-2009 Dan Gohman <gohman@apple.com> Create a ScalarEvolution-based AliasAnalysis implementation.

This is a simple AliasAnalysis implementation which works by making
ScalarEvolution queries. ScalarEvolution has a more complete understanding
of arithmetic than BasicAA's collection of ad-hoc checks, so it handles
some cases that BasicAA misses, for example p[i] and p[i+1] within the
same iteration of a loop.

This is currently experimental. It may be that the main use for this pass
will be to help find cases where BasicAA can be profitably extended, or
to help in the development of the overall AliasAnalysis infrastructure,
however it's also possible that it could grow up to become a directly
useful pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80098 91177308-0d34-0410-b5e6-96231b3b80d8
55e354ac0e294bde258420f80a2cc11ea19db482 08-Aug-2009 Daniel Dunbar <daniel@zuster.org> Add a basic static ProfileInfo provider (ProfileEstimatorPass).
- Part of optimal static profiling patch sequence by Andreas Neustifter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78484 91177308-0d34-0410-b5e6-96231b3b80d8
969f28dfb6478b1759cb13a216d3dc5515a889d1 14-Jul-2009 Torok Edwin <edwintorok@gmail.com> Introduce a pointertracking pass.
For now this only computes the allocated size of the memory pointed to by a
pointer, and offset a pointer from allocated pointer.
The actual checkLimits part will come later, after another round of review.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75657 91177308-0d34-0410-b5e6-96231b3b80d8
4c12ee5f612f5f67af9e7715dba44d28f9c03ad5 09-Jul-2009 Nick Lewycky <nicholas@mxc.ca> Forgot a couple files when adding the -ssi-everything pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75136 91177308-0d34-0410-b5e6-96231b3b80d8
715029478c0a54cab2c366816d11d712bf51efc5 03-Jul-2009 Nick Lewycky <nicholas@mxc.ca> Add Static Single Information construction pass written by André Tavares!
Use it by requiring it through the pass manager, then calling its createSSI
method on the variables that you want in SSI form.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74780 91177308-0d34-0410-b5e6-96231b3b80d8
cb21010fa0d7fd7018ddd966ca5bb48a47022ad0 24-Jun-2009 Andreas Bolka <a@bolka.at> Scaffolding for LDA pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74120 91177308-0d34-0410-b5e6-96231b3b80d8
ca399021d47d640551eb786620bcd108e1758485 14-Jun-2009 Owen Anderson <resistor@mac.com> Add an early implementation of a partial inlining pass. The idea behind this
is that, for functions whose bodies are entirely guarded by an if-statement, it
can be profitable to pull the test out of the callee and into the caller.

This code has had some cursory testing, but still has a number of known issues
on the LLVM test suite.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73338 91177308-0d34-0410-b5e6-96231b3b80d8
3751f564e372071bcbeba26811917fd03dd58850 19-Mar-2009 Dan Gohman <gohman@apple.com> Add a liveness analysis pass for LLVM IR values. This computes
the set of blocks in which values are used, the set in which
values are live-through, and the set in which values are
killed. For the live-through and killed sets, conservative
approximations are used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67309 91177308-0d34-0410-b5e6-96231b3b80d8
e02f724880ddb7ffe296cda3ffb9822761a13ce7 28-Jan-2009 Duncan Sands <baldrick@free.fr> Fix PR3415 (infinite loop in EscapeAnalysis) by
deleting the escape analysis pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63197 91177308-0d34-0410-b5e6-96231b3b80d8
9e89ba31f16a960239a750a26a982b4c9dfe8949 31-Dec-2008 Duncan Sands <baldrick@free.fr> Rename AddReadAttrs to FunctionAttrs, and teach it how
to work out (in a very simplistic way) which function
arguments (pointer arguments only) are only dereferenced
and so do not escape. Mark such arguments 'nocapture'.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61525 91177308-0d34-0410-b5e6-96231b3b80d8
6e68106a47e9774476f2f39df572652c1eb5f75c 16-Dec-2008 Torok Edwin <edwintorok@gmail.com> Add -print-dbginfo pass that prints LLVM IR with comments inserted to show
which source/line a certain BB/instruction comes from, original variable names,
and original (unmangled) C++ name of functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61085 91177308-0d34-0410-b5e6-96231b3b80d8
f17fc461d17f9fa85f8fbc140ded8f3c591791e2 18-Nov-2008 Devang Patel <dpatel@apple.com> Add new helper pass that strips all symbol names except debugging information.
This pass makes it easier to test wheter debugging info. influences optimization passes or not.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59552 91177308-0d34-0410-b5e6-96231b3b80d8
94b29c3eacfad973ea32b7fdfaa5e067d55bbfa4 12-Nov-2008 Devang Patel <dpatel@apple.com> Undo previous check-in.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59092 91177308-0d34-0410-b5e6-96231b3b80d8
90d45b8a4a787739662dc1c781dc0e7c57c2ffa2 11-Nov-2008 Devang Patel <dpatel@apple.com> Add utility pass to remove dbg info.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59068 91177308-0d34-0410-b5e6-96231b3b80d8
8f027c7fea068394be9026a80a8cbe045ed021ee 05-Nov-2008 Dan Gohman <gohman@apple.com> Add a new pass to simplify specific half_powr function calls. This is
a specialized pass that it not likely to be generally useful.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58732 91177308-0d34-0410-b5e6-96231b3b80d8
579a0246616d76bc536de0e41edf069d091604be 02-Nov-2008 Nick Lewycky <nicholas@mxc.ca> Add a new MergeFunctions pass. It finds identical functions and merges them.

This triggers only 60 times in llvm-test (look at .llvm.bc, not .linked.rbc)
and so it probably wont be turned on by default. Also, may of those are likely
to go away when PR2973 is fixed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58557 91177308-0d34-0410-b5e6-96231b3b80d8
f4db3a51c7d806f7dcef5d9625e7cdf7f122dca9 22-Oct-2008 Daniel Dunbar <daniel@zuster.org> Privatize PrintModulePass and PrintFunctionPass and add
createPrintModulePass and createPrintFunctionPass.
- So clients who compile w/o RTTI can use them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57933 91177308-0d34-0410-b5e6-96231b3b80d8
36b708a3188cd02909d102c26ec6c251147890d7 12-Oct-2008 Owen Anderson <resistor@mac.com> Add EscapeAnalysis.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57411 91177308-0d34-0410-b5e6-96231b3b80d8
acdb2eeb45ba6d9e71d0e0d0c5a0d82183422345 19-Sep-2008 Duncan Sands <baldrick@free.fr> Remove the MarkModRef pass (use AddReadAttrs instead).
Unfortunately this means removing one regression test
of GlobalsModRef because I couldn't work out how to
perform it without MarkModRef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56342 91177308-0d34-0410-b5e6-96231b3b80d8
9f07a290b92a8ff06dfb9f3c28d6aa082217d9a6 19-Sep-2008 Duncan Sands <baldrick@free.fr> Add a new pass AddReadAttrs which works out which functions
can get the readnone/readonly attributes, and gives them it.
The plan is to remove markmodref (which did the same thing
by querying GlobalsModRef) and delete the analogous
functionality from GlobalsModRef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56341 91177308-0d34-0410-b5e6-96231b3b80d8
cf996d4b5613616f9de3a816751e2a128dac7d8a 03-Sep-2008 Andrew Lenharth <andrewl@lenharth.org> Initial version of a Partial Specialization IPO pass. It triggers a couple hundred times on 176.gcc. I don't know the performance impact yet, the heuristic is quite simple still.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55734 91177308-0d34-0410-b5e6-96231b3b80d8
3d566ddd05120d1ff85eb4f93283e0e85366fa82 03-Sep-2008 Devang Patel <dpatel@apple.com> Add missing decls.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55719 91177308-0d34-0410-b5e6-96231b3b80d8
3cd652d5304135c8264b1fd63095ab3e47ae73a4 01-Sep-2008 Duncan Sands <baldrick@free.fr> Add a small pass that sets the readnone/readonly
attributes on functions, based on the result of
alias analysis. It's not hardwired to use
GlobalsModRef even though this is the only (AFAIK)
alias analysis that results in this pass actually
doing something. Enable as follows:
opt ... -globalsmodref-aa -markmodref ...
Advantages of this pass: (1) records the result
of globalsmodref in the bitcode, meaning it is
available for use by later passes (currently
the pass manager isn't smart enough to magically
make an advanced alias analysis available to all
later passes), which may expose more optimization
opportunities; (2) hopefully speeds up compilation
when code is optimized twice, for example when a
file is compiled to bitcode, then later LTO is done
on it: marking functions readonly/readnone when
producing the initial bitcode should speed up alias
analysis during LTO; (3) good for discovering that
globalsmodref doesn't work very well :)
Not currently turned on by default.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55604 91177308-0d34-0410-b5e6-96231b3b80d8
3793325cb3b4d97a295e5aaa419cfcf2866940c9 23-Aug-2008 Chris Lattner <sabre@nondot.org> Add a new trivial -inst-namer pass which makes it possible to diff the
before/after effects of a pass, crazy!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55230 91177308-0d34-0410-b5e6-96231b3b80d8
3688f268cb31dbfb5b36131d96af668fa2fc6a8d 15-Aug-2008 Owen Anderson <resistor@mac.com> Remove GCSE, ValueNumbering, and LoadValueNumbering. These have been deprecated for almost a year; it's finally time for them to go away.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54822 91177308-0d34-0410-b5e6-96231b3b80d8
a11e2eb845ffc1ad9aee0a96d6998a3e084edfcd 30-Jun-2008 Nick Lewycky <nicholas@mxc.ca> Add a value range analysis that lazily computes ranges using ScalarEvolutions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52885 91177308-0d34-0410-b5e6-96231b3b80d8
5771d6c16d71dc3bba59b88592686c76f07f4721 29-May-2008 Owen Anderson <resistor@mac.com> Force postdom to be linked into opt and bugpoint, even though it is no longer used by any passes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51686 91177308-0d34-0410-b5e6-96231b3b80d8
029840c93521f5c54380e037a66216c8227ad1e1 07-May-2008 Chris Lattner <sabre@nondot.org> Add a new LibCallAliasAnalysis pass, which is parameterized
by an instance of LibCallInfo to provide mod/ref info of
standard library functions. This is powerful enough to
say that 'sqrt' is readonly except that it modifies errno,
or that "printf doesn't store to memory unless the %n
constraint is present" etc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50827 91177308-0d34-0410-b5e6-96231b3b80d8
0396cd33ca2d879d1cf0e9b252ce43a760449fff 29-Apr-2008 Owen Anderson <resistor@mac.com> Rename DeadLoopElimination to LoopDeletion, part 2.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50437 91177308-0d34-0410-b5e6-96231b3b80d8
0ff7708a5bbde331f9f54fb955bf7a2e96af710e 29-Apr-2008 Owen Anderson <resistor@mac.com> Add dead loop elimination, which removes dead loops for which we can compute
the trip count.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50382 91177308-0d34-0410-b5e6-96231b3b80d8
8383a7b7a6acdae478d4b4c2520915153b73f676 20-Apr-2008 Chris Lattner <sabre@nondot.org> Add a new Jump Threading pass, which will handle cases
such as those in PR2235. Right now the pass is not very
effective. :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50000 91177308-0d34-0410-b5e6-96231b3b80d8
a723d1e48f4a261512c28845c53eda569fa5218c 09-Apr-2008 Owen Anderson <resistor@mac.com> Factor a bunch of functionality related to memcpy and memset transforms out of
GVN and into its own pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49419 91177308-0d34-0410-b5e6-96231b3b80d8
c6791d9fca0ca42c6ccc7b786bbb73dd5ac330eb 07-Mar-2008 Devang Patel <dpatel@apple.com> Add new sretpromotion pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48032 91177308-0d34-0410-b5e6-96231b3b80d8
5f2e4681ce039f29d75fae2d8447e4a31b8e4706 22-Feb-2008 Devang Patel <dpatel@apple.com> Add StripDeadPrototypes pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47488 91177308-0d34-0410-b5e6-96231b3b80d8
75542bd56b4d38d7a2fdf8596a0128509a51e89d 19-Feb-2008 Chris Lattner <sabre@nondot.org> remove the LowerSelect pass. The last client was the old Sparc backend, which is long dead by now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47323 91177308-0d34-0410-b5e6-96231b3b80d8
15f166c7b6ed054e9a9b54161dd9342d9f083564 19-Feb-2008 Chris Lattner <sabre@nondot.org> remove the lower packed pass. It can never work and even the parts that
could work don't work fully. This fixes PR1705. Oh yeah, we don't have
packed types anymore either ;-)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47322 91177308-0d34-0410-b5e6-96231b3b80d8
beefd3d0f81ecd206601e62228975111c4cf84f4 27-Jan-2008 Bill Wendling <isanbard@gmail.com> The CorrelatedExpressionElimination pass is known to be buggy. Remove it.

This fixes PR1769.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46408 91177308-0d34-0410-b5e6-96231b3b80d8
8fa89291774a29ee30adb9d0fd01655c84eaac13 07-Jan-2008 Gordon Henriksen <gordonhenriksen@mac.com> With this patch, the LowerGC transformation becomes the
ShadowStackCollector, which additionally has reduced overhead with
no sacrifice in portability.

Considering a function @fun with 8 loop-local roots,
ShadowStackCollector introduces the following overhead

; shadowstack prologue
movl L_llvm_gc_root_chain$non_lazy_ptr, %eax
movl (%eax), %ecx
movl $___gc_fun, 20(%esp)
movl $0, 24(%esp)
movl $0, 28(%esp)
movl $0, 32(%esp)
movl $0, 36(%esp)
movl $0, 40(%esp)
movl $0, 44(%esp)
movl $0, 48(%esp)
movl $0, 52(%esp)
movl %ecx, 16(%esp)
leal 16(%esp), %ecx
movl %ecx, (%eax)

; shadowstack loop overhead

; shadowstack epilogue
movl 48(%esp), %edx
movl %edx, (%ecx)

; shadowstack metadata
.align 3
___gc_fun: # __gc_fun
.long 8
.space 4

In comparison to LowerGC:

; lowergc prologue
movl L_llvm_gc_root_chain$non_lazy_ptr, %eax
movl (%eax), %ecx
movl %ecx, 48(%esp)
movl $8, 52(%esp)
movl $0, 60(%esp)
movl $0, 56(%esp)
movl $0, 68(%esp)
movl $0, 64(%esp)
movl $0, 76(%esp)
movl $0, 72(%esp)
movl $0, 84(%esp)
movl $0, 80(%esp)
movl $0, 92(%esp)
movl $0, 88(%esp)
movl $0, 100(%esp)
movl $0, 96(%esp)
movl $0, 108(%esp)
movl $0, 104(%esp)
movl $0, 116(%esp)
movl $0, 112(%esp)

; lowergc loop overhead
leal 44(%esp), %eax
movl %eax, 56(%esp)
leal 40(%esp), %eax
movl %eax, 64(%esp)
leal 36(%esp), %eax
movl %eax, 72(%esp)
leal 32(%esp), %eax
movl %eax, 80(%esp)
leal 28(%esp), %eax
movl %eax, 88(%esp)
leal 24(%esp), %eax
movl %eax, 96(%esp)
leal 20(%esp), %eax
movl %eax, 104(%esp)
leal 16(%esp), %eax
movl %eax, 112(%esp)

; lowergc epilogue
movl 48(%esp), %edx
movl %edx, (%ecx)

; lowergc metadata

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45670 91177308-0d34-0410-b5e6-96231b3b80d8
f07b9a76e546e8ee1df9ac7203c1c78133dcea88 06-Jan-2008 Chris Lattner <sabre@nondot.org> fix an accidental commit that broke all the testers :(

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45659 91177308-0d34-0410-b5e6-96231b3b80d8
2e48a70b35635165703838fc8d3796b664207aa1 06-Jan-2008 Chris Lattner <sabre@nondot.org> rename isStore -> mayStore to more accurately reflect what it captures.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45656 91177308-0d34-0410-b5e6-96231b3b80d8
699f5faed58675433907a0a868ffd10a7c235ff8 05-Jan-2008 Owen Anderson <resistor@mac.com> Didn't mean to commit this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45606 91177308-0d34-0410-b5e6-96231b3b80d8
d94b6a16fec7d5021e3922b0e34f9ddb268d54b1 05-Jan-2008 Owen Anderson <resistor@mac.com> Move some more functionality from MRegisterInfo to TargetInstrInfo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45603 91177308-0d34-0410-b5e6-96231b3b80d8
7ed47a13356daed2a34cd2209a31f92552e3bdd8 29-Dec-2007 Chris Lattner <sabre@nondot.org> Don't attribute in file headers anymore. See llvmdev for the
discussion of this change. Boy are my fingers tired. ;-)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45411 91177308-0d34-0410-b5e6-96231b3b80d8
7e9edda51d120c1c7c099929944f909a4f296a39 15-Sep-2007 Owen Anderson <resistor@mac.com> Remove RLE from the headers, since the pass itself is gone now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41971 91177308-0d34-0410-b5e6-96231b3b80d8
fee76bd9ba038a4640259ffcbb2c6e2bd970a3ca 07-Aug-2007 Devang Patel <dpatel@apple.com> Begin loop index split pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40883 91177308-0d34-0410-b5e6-96231b3b80d8
f6a05f949f39d94d846dff9bf5093a838c6ebc4b 01-Aug-2007 Owen Anderson <resistor@mac.com> Rename FastDSE to just DSE.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40668 91177308-0d34-0410-b5e6-96231b3b80d8
1ad2cb75553a30bcec9fdc15733a20df6bc50431 24-Jul-2007 Owen Anderson <resistor@mac.com> Add a GVN pass, using the value numbering code I developed for GVNPRE and the
load elimination code from RedundantLoadElimination.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40469 91177308-0d34-0410-b5e6-96231b3b80d8
a7f98e2919c2e1ac39e6b82b11fd9e3a7aef00a0 24-Jul-2007 Owen Anderson <resistor@mac.com> Rename a lot of things to change FastDLE to RedundantLoadElimination.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40457 91177308-0d34-0410-b5e6-96231b3b80d8
fb80b6e056f3bf8e82eba131220b1dfc8f80f5a0 24-Jul-2007 Owen Anderson <resistor@mac.com> Forgot to commit this file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40447 91177308-0d34-0410-b5e6-96231b3b80d8
b77c457cc87aeeb166995aed793a516e9e431703 11-Jul-2007 Owen Anderson <resistor@mac.com> Add FastDSE, a new algorithm for doing dead store elimination. This algorithm is not as accurate
as the current DSE, but it only a linear scan over each block, rather than quadratic. Eventually
(once it has been improved somewhat), this will replace the current DSE.

NOTE: This has not yet been extensively tested.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38517 91177308-0d34-0410-b5e6-96231b3b80d8
1f476f4d84028c69777b9d309579209666f45543 30-May-2007 Owen Anderson <resistor@mac.com> Put GVN-PRE in all the right places.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37352 91177308-0d34-0410-b5e6-96231b3b80d8
3dc6776b338f81e2d47daa42cc12c9f91053043d 15-Apr-2007 Owen Anderson <resistor@mac.com> Remove ImmediateDominator analysis. The same information can be obtained from DomTree. A lot of code for
constructing ImmediateDominator is now folded into DomTree construction.

This is part of the ongoing work for PR217.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36063 91177308-0d34-0410-b5e6-96231b3b80d8
ba43963e96c9eb28d4f6862e46c5d3fbdc1f3b96 07-Apr-2007 Owen Anderson <resistor@mac.com> Completely purge DomSet. This is the (hopefully) final patch for PR1171.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35731 91177308-0d34-0410-b5e6-96231b3b80d8
6116fb10359fc62914c37bfb80a80d85b4c5e885 07-Apr-2007 Chris Lattner <sabre@nondot.org> add loop rot

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35722 91177308-0d34-0410-b5e6-96231b3b80d8
dbe0deca339585dfbaed5951ef0ca2c6a0df173c 31-Mar-2007 Chris Lattner <sabre@nondot.org> Split the sdisel code munging stuff out into its own opt-pass, CodeGenPrepare.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35528 91177308-0d34-0410-b5e6-96231b3b80d8
a9a23d8faf03b26ade1954693b9570cc72b62ffe 20-Feb-2007 Chris Lattner <sabre@nondot.org> remove some passes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34437 91177308-0d34-0410-b5e6-96231b3b80d8
ef9b9a793949469cdaa4ab6d0173136229dcab7b 05-Feb-2007 Reid Spencer <rspencer@reidspencer.com> For PR411:
This patch replaces the SymbolTable class with ValueSymbolTable which does
not support types planes. This means that all symbol names in LLVM must now
be unique. The patch addresses the necessary changes to deal with this and
removes code no longer needed as a result. This completes the bulk of the
changes for this PR. Some cleanup patches will follow.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33918 91177308-0d34-0410-b5e6-96231b3b80d8
7ba98a90008727e2fa0dfc1787cad71e1b6021eb 04-Feb-2007 Reid Spencer <rspencer@reidspencer.com> For PR1072:
Removing -raise has neglible positive or negative side effects so we are
opting to remove it. See the PR for comparison details.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33844 91177308-0d34-0410-b5e6-96231b3b80d8
fd0cf616709cecf1bbb276ecfa20d489b295eccb 07-Jan-2007 Chris Lattner <sabre@nondot.org> remove an old instrumentation pass that is not used anymore.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32997 91177308-0d34-0410-b5e6-96231b3b80d8
bc8003879124d6c4e31c1cedbf613560bce9212c 13-Dec-2006 John Criswell <criswell@uiuc.edu> Remove DSA header files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32552 91177308-0d34-0410-b5e6-96231b3b80d8
e026c070c4e9001c6023a8c14664e68151e0b30f 13-Dec-2006 John Criswell <criswell@uiuc.edu> Remove DSA.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32542 91177308-0d34-0410-b5e6-96231b3b80d8
472c7918b0bc155e002db6f682c899e21bff852c 14-Nov-2006 Andrew Lenharth <andrewl@lenharth.org> A shim over other AA impls to catch incorrect uses

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31724 91177308-0d34-0410-b5e6-96231b3b80d8
05450ae12828337c52f27d68ec9d611dda93c939 29-Aug-2006 Nick Lewycky <nicholas@mxc.ca> Add PredicateSimplifier pass. Collapses equal variables into one form
and simplifies expressions. This implements the optimization described
in PR807.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29947 91177308-0d34-0410-b5e6-96231b3b80d8
037ce981d8ebbe275236814876441f872d438c26 21-Aug-2006 Reid Spencer <rspencer@reidspencer.com> Fix the documentation for this file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29788 91177308-0d34-0410-b5e6-96231b3b80d8
62c5105adc4f51c6dd07be3471ea2462c8e00c82 21-Aug-2006 Reid Spencer <rspencer@reidspencer.com> For PR885:
Consolidate the LinkAllAnalyses.h and LinkAllPasses.h headers into one
so there is no dupliation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29787 91177308-0d34-0410-b5e6-96231b3b80d8