The freed pointer should be at operand 0 of the CallInst.

git-svn-id: http://llvm.org/svn/llvm-project/poolalloc/trunk@158326 91177308-0d34-0410-b5e6-96231b3b80d8
Local: Check for aliasing (EC'd) globals after processing each function.

In global-heavy programs (403.gcc) saves a fair chunk of runtime and memory:
16s -> 13s, 487M -> 413M .

Across SPECCINT2006 all -dsa-local is faster and uses less memory.

git-svn-id: http://llvm.org/svn/llvm-project/poolalloc/trunk@159062 91177308-0d34-0410-b5e6-96231b3b80d8
DSGraph::removeFunctionCalls: Actually remove all calls to the specified func.

Update StdLibPass to avoid invalidating iterators as a result of this.

Doesn't seem to have any significant impact AFAICT, but this is
the right thing regardless.

git-svn-id: http://llvm.org/svn/llvm-project/poolalloc/trunk@159063 91177308-0d34-0410-b5e6-96231b3b80d8
Introduce new type(def) to represent a DSGraph's set of callsites.

No functionality change intended.

git-svn-id: http://llvm.org/svn/llvm-project/poolalloc/trunk@159064 91177308-0d34-0410-b5e6-96231b3b80d8
BU: Change the way we process function list while inlining.

Instead of TempFCS and splicing/erasing each element at a time,
  make a pass through and copy over the DSC's we want to keep.

No significant impact on runtime/memory across BU on CINT2006.
(Other than 471.omnetpp which goes 175M->150M and saves .4s heh)

Does change the order in which we inline graphs a tad, however.

git-svn-id: http://llvm.org/svn/llvm-project/poolalloc/trunk@159065 91177308-0d34-0410-b5e6-96231b3b80d8
Introduce 'stl_util.h' to abstract common operations on stl containers.

This abstraction is really to make changing the underlying datastructure
easy (but code still uses appropriately efficient implementations).

git-svn-id: http://llvm.org/svn/llvm-project/poolalloc/trunk@159066 91177308-0d34-0410-b5e6-96231b3b80d8
removeDeadNodes: Change AFC pruning algo to swap to end + single erase.

Performance and memory win across CINT2006 for the most part.

403.gcc is the only exception, going from 11s to 13s (460M -> 400M).
However others see significant improvements such as 400.perlbmk
which goes 6.6s -> 3.6s, 303M -> 192M.

git-svn-id: http://llvm.org/svn/llvm-project/poolalloc/trunk@159067 91177308-0d34-0410-b5e6-96231b3b80d8
DSGraph: Cleanup messy removeIdenticalCalls.

* Leverage std::adjacent_find to do the hard work for us.
* Remove long-dead code, it's still in our VCS history.
* Fix incorrect statistic regarding removed calls.
    (Double-counted the direct calls removed)

Other than wrong stat, no functionality change intended.

Runtime/memory/stats same across CINT2006.

git-svn-id: http://llvm.org/svn/llvm-project/poolalloc/trunk@159068 91177308-0d34-0410-b5e6-96231b3b80d8
Everywhere: Use svset when collecting list of globals from diverse sources.

This saves quite a few duplicates in practice, and better matches
the desired operation (the comments already say "compute the set", etc).

Leave the old "addFullFunctionList" interface around to ensure not to break
things like SAFECode.  However, the implementation is now simply a wrapper
around the set version and as such should probably be converted at some point.

git-svn-id: http://llvm.org/svn/llvm-project/poolalloc/trunk@159069 91177308-0d34-0410-b5e6-96231b3b80d8
DSCallGraph: Remove unused variables.
No functionality changed.

git-svn-id: http://llvm.org/svn/llvm-project/poolalloc/trunk@159085 91177308-0d34-0410-b5e6-96231b3b80d8
Update to 3.1, mostly.
Add support for ConstantDataSequential in Local.