Commit Graph

1329 Commits

Author SHA1 Message Date
Chris Lattner
df14a04b5c Fix a problem that Nate noticed with LSR:
When inserting code for an addrec expression with a non-unit stride, be
more careful where we insert the multiply.  In particular, insert the multiply
in the outermost loop we can, instead of the requested insertion point.

This allows LSR to notice the mul in the right loop, reducing it when it gets
to it.  This allows it to reduce the multiply, where before it missed it.

This happens quite a bit in the test suite, for example, eliminating 2
multiplies in art, 3 in ammp, 4 in apsi, reducing from 1050 multiplies to
910 muls in galgel (!), from 877 to 859 in applu, and 36 to 30 in bzip2.

This speeds up galgel from 16.45s to 16.01s, applu from 14.21 to 13.94s and
fourinarow from 66.67s to 63.48s.

This implements Transforms/LoopStrengthReduce/nested-reduce.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24102 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-30 06:24:33 +00:00
Chris Lattner
eb99bd30e9 remove a dead file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24085 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-29 04:43:38 +00:00
John Criswell
bd9d37026a Move some constant folding functions into LLVMAnalysis since they are used
by Analysis and Transformation passes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24038 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-27 16:00:10 +00:00
John Criswell
a115643357 Move some constant folding code shared by Analysis and Transform passes
into the LLVMAnalysis library.
This allows LLVMTranform and LLVMTransformUtils to be archives and linked
with LLVMAnalysis.a, which provides any missing definitions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24036 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-27 15:54:34 +00:00
Chris Lattner
f941a0fe6c Remove this pass, it is not useful
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23949 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 02:35:43 +00:00
Chris Lattner
f36aeedaa3 DONT_BUILD_RELINKED is gone and implied by BUILD_ARCHIVE now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23940 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 02:26:13 +00:00
Chris Lattner
ab0ed3592b Only build .a file versions of these libraries, instead of .a and .o versions.
This should speed up build times.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23933 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 01:59:48 +00:00
Chris Lattner
83753937a6 don't bother building the archive version of this library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23927 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 01:08:20 +00:00
Chris Lattner
4fb1b21b31 expose a ctor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23924 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 01:00:45 +00:00
Chris Lattner
6d796238b2 implement some prototypes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23920 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 00:38:38 +00:00
Chris Lattner
25d196880b move this to the analyze tool
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23918 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 00:27:36 +00:00
Chris Lattner
bed21de39b wrap a long line
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23507 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-28 22:30:58 +00:00
Chris Lattner
b6a69e70e0 Add a new getLoopLatch() method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23315 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-12 17:03:55 +00:00
Chris Lattner
ab466d769a floor/ceil don't read/write memory. This allows gcse to eliminate 6 calls
in mesa.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23015 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-24 16:58:56 +00:00
Chris Lattner
ff2006aa74 Fix Transforms/LoopStrengthReduce/2005-08-15-AddRecIV.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22797 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-16 00:37:01 +00:00
Chris Lattner
db25de496c Teach LLVM to know how many times a loop executes when constructed with
a < expression, e.g.: for (i = m; i < n; ++i)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22793 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-15 23:33:51 +00:00
Chris Lattner
05bd374b1f Fix an obvious oops
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22742 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-10 00:59:40 +00:00
Chris Lattner
a0740fbcc7 implement two helper methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22736 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-09 23:36:33 +00:00
Misha Brukman
e2d7fdf62c * Unbreak optimized build (noticed by Eric van Riet Paap)
* Comment #endif clauses for readability


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22646 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-04 14:16:48 +00:00
Chris Lattner
b06f677c53 add support for Graphviz when viewing CFGs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22620 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-03 17:55:05 +00:00
Nate Begeman
36f891bdf6 Break SCEVExpander out of IndVarSimplify into its own .h/.cpp file so that
other passes may use it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22557 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-30 00:12:19 +00:00
Jeff Cohen
00b16889ab Eliminate all remaining tabs and trailing spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22523 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-27 06:12:32 +00:00
Andrew Lenharth
d3513e026b Remove glibc specific functions, and mark a couple as C99
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22384 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-11 20:35:20 +00:00
Andrew Lenharth
d9793e6c0a because on alpha:
#   define errno (*__errno_location ())

*shakes head


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22383 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-11 17:41:12 +00:00
Andrew Lenharth
c826aea982 the correct fix was to fix AliasAnalysis.getModRefInfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22268 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-20 15:25:22 +00:00
Andrew Lenharth
e3e1739b7d prevent GCSE from forwarding stores to loads around vaarg. This is uggly, and I am trying to fix the AliasInfo, as it should catch the problem instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22266 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-20 15:02:05 +00:00
Andrew Lenharth
558bc88a00 core changes for varargs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22254 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-18 18:34:52 +00:00
Chris Lattner
42e3c81c5f By definition, 'tail' calls cannot access the stack frame of their caller.
Expose this as a simple form of mod/ref information.  This implements
BasicAA/tailcall-modref.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21796 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-08 23:58:12 +00:00
Chris Lattner
998fffdda1 These intrinsics do not access memory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21718 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-06 05:21:04 +00:00
Misha Brukman
f4f85998bf Remove extra blank line
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21706 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-05 23:43:47 +00:00
Chris Lattner
eed37bad01 Add llvm.sqrt intrinsic, patch contributed by Morten Ofstad
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21627 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-30 03:44:07 +00:00
Chris Lattner
5b103c20e3 These functions can set errno!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21609 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-28 21:52:31 +00:00
Chris Lattner
318c149823 Make interval partition print correctly, patch contributed by
Vladimir Prus!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21566 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-26 14:48:28 +00:00
Chris Lattner
a1198b5254 Correctly handle global-argument aliases induced in main
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21537 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-25 19:16:31 +00:00
Chris Lattner
63320cc841 Don't mess up SCC traversal when a node has null edges out of it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21536 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-25 19:16:17 +00:00
Chris Lattner
cc1f24585e Propagate eq sets through the bu graphs to the cbu and eq graphs, fixing
a crash of the sfv on 188.ammp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21478 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-23 21:11:05 +00:00
Chris Lattner
3fe4d3cb5b Malloc/Free have mod/ref effects. Do not allow CSE of function calls that
call malloc/free.  This fixes PR555.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21443 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-22 05:36:59 +00:00
Misha Brukman
dedf2bd5a3 Convert tabs to spaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21439 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-22 04:01:18 +00:00
Misha Brukman
fd93908ae8 Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21427 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 23:48:37 +00:00
Misha Brukman
2b37d7cf28 Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21416 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 21:13:18 +00:00
Chris Lattner
a5ed1bd00b add support for taking and resolving the address of free.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21396 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 16:09:43 +00:00
Chris Lattner
af2e3e0859 Fix a crash analyzing MultiSource/Benchmarks/MallocBench/gs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21245 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-12 03:59:27 +00:00
Chris Lattner
6128690c62 Don't make this require loopsimplify. It works BETTER with loop simplify
but should not require it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21123 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-06 21:45:00 +00:00
Chris Lattner
bd135c7706 do not crash when using -debug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21092 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-05 01:12:03 +00:00
Chris Lattner
8a9763c3cd do not dereference an extra layer of pointers to determine if an external
call can modify a memory location.  This fixes
test/Regression/Analysis/Andersens/modreftest.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21088 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-04 22:23:21 +00:00
Chris Lattner
1231aa3fa6 fix some VC compilation problems, thanks to Jeff C for pointing this out!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21044 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 20:17:09 +00:00
Chris Lattner
0700123431 EquivClassGraphs is now in DataStructure.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21042 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 20:08:17 +00:00
Chris Lattner
2ccc5f1081 use a callee_iterator typedef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21038 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 20:02:41 +00:00
Chris Lattner
021decc82d Change the ActualCallees callgraph from hash_multimap<Instruction,Function>
to std::set<std::pair<Inst,Func>> to avoid duplicate entries.

This speeds up the CompleteBU pass from 1.99s to .15s on povray and the
eqgraph passes from 1.5s to .16s on the same.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21031 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 19:17:18 +00:00
Chris Lattner
175b9635cc import all of the rest of the stubs that dsa uses for direct comparison
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20932 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-29 20:36:05 +00:00
Chris Lattner
77b505670c learn about some more functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20929 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-29 20:04:24 +00:00
Chris Lattner
9342a939eb Fix a problem where we not marking incoming arguments to functions with
external linkage as incomplete.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20927 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-29 19:16:59 +00:00
Chris Lattner
cfba7981eb there is no point comparing against null pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20925 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-29 17:44:52 +00:00
Chris Lattner
76bc5ce5c4 Fix a major problem with global variable initializers. This could cause
us to have stuff pointing to the null pointer, which makes no sense
(the null ptr is an ssa value, not the null object)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20922 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-29 17:21:53 +00:00
Chris Lattner
4de57fd9e9 add some more functions, ignore setcc for constraints!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20917 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-29 06:52:20 +00:00
Chris Lattner
8a44643d61 Handle "known" external calls context sensitively, add support for realloc
and a couple of other functions that are important.

Handle aggregate undef values for gv initializers


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20914 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-29 06:09:07 +00:00
Chris Lattner
f392c64ec6 Teach andersens that non-escaping memory cannot be mod/ref'd by external fn calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20891 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-28 06:21:17 +00:00
Misha Brukman
be5e2f4f9b Fix grammar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20890 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-28 04:32:12 +00:00
Chris Lattner
c3c9fd0dd6 Make anders-aa much more precise by not being completely pessimistic about
external functions.  Teach it about a few important ones.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20889 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-28 04:03:52 +00:00
Chris Lattner
493f6366cb wrap some long lines
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20884 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-27 22:03:46 +00:00
Chris Lattner
93ab219244 remove ...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20883 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-27 21:57:09 +00:00
Chris Lattner
40ee8ce28b speed up steens by using spliceFrom, improve its precision by realizing that
an incomplete node cannot alias a complete node.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20882 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-27 21:56:55 +00:00
Chris Lattner
267a1b02a2 teach andersens about undef
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20881 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-27 18:58:23 +00:00
Chris Lattner
5f4c0a88ee Don't give up completely, maybe other AA can say something about this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20873 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-27 00:02:33 +00:00
Chris Lattner
e70492d0e2 Factor out percentage printing into its own function. Make two changes to
the function: print more precision XX.X% instead of XX%, and cast to ULL
before scaling by 100/1000 to avoid wrap around for large numbers of queries
(such as occur for 253.perlbmk and 176.gcc)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20872 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-26 23:56:33 +00:00
Chris Lattner
1b9a2aac98 Cache mapping information for a call site after computing it for a mod/ref
query.  If the next mod/ref query happens to be for the same call site
(which is extremely likely), use the cache instead of recomputing the
callee/caller mapping.  This makes -aa-eval ***MUCH*** faster with
ds-aa


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20871 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-26 23:29:03 +00:00
Chris Lattner
a7337dc2b9 Remove more long dead code: dsa doesn't provide must alias info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20870 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-26 22:54:46 +00:00
Chris Lattner
5a6a9d4f0c remove some unsafe code that has long been dead
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20869 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-26 22:48:42 +00:00
Chris Lattner
bc499de74f slightly improve mod/ref for DSAA by checking the globals graph for fallback
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20868 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-26 22:47:03 +00:00
Chris Lattner
b7523418b0 Teach steens-aa two things about mod/ref information:
1. If memory never escapes the program, it cannot be mod/ref'd by external
     functions.
  2. If memory is global never mod/ref'd in the program, it cannot be mod/ref'd
     by any call.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20867 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-26 22:43:20 +00:00
Chris Lattner
0772e78789 Interchange this loop so that we test all pointers against one call site
before moving on to the next call site.  This will be a more efficient way
to compute the mod/ref set for AA implementations like DSA.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20866 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-26 22:16:44 +00:00
Chris Lattner
cf9082589c no really, don't double count these nodes either!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20837 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-25 20:54:45 +00:00
Chris Lattner
0423e031d6 Don't count all of the nodes in the SCC once for each function in the SCC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20836 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-25 20:37:32 +00:00
Chris Lattner
33b4276053 Grow the EQ classes for globals at the end of the BU pass. This shrinks
memory usage in the TD pass for 254.gap from 31.3MB to 3.9MB.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20834 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-25 16:45:43 +00:00
Chris Lattner
2958eeabcf Treat free operations as volatile, since they cannot be moved. This fixes
Transforms/LICM/2005-03-24-LICM-Aggregate-Crash.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20830 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-25 05:49:37 +00:00
Chris Lattner
20da24c4b9 remove a debugging timer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20827 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-25 00:06:09 +00:00
Chris Lattner
b2dbdc1301 Two changes here:
1. Instead of copying Local graphs to the BU graphs to start with, use
     spliceFrom to do the job (which is constant time in this case).  On
     176.gcc, this chops off .17s from the bu pass.
  2. When building SCC graphs, simplify the logic and use spliceFrom to
     do the heavy lifting, instead of cloneInto/delete.  This slices
     another .14s off 176.gcc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20826 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-25 00:05:04 +00:00
Chris Lattner
ce7068d378 Make the spliceFrom case where one graph is completely empty be constant time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20825 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-25 00:02:41 +00:00
Chris Lattner
5734e4331e add a new DSGraph::spliceFrom method, which violently takes the content of
one graph and plops it into another, without breaking a sweat.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20824 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-24 23:46:04 +00:00
Chris Lattner
4da120e5d6 This replaces the correct but slow code with a more aggressive scc-finder
based approach to find globals and call sites that need to be copied.  This
speeds up the BU pass on 176.gcc from 22s back up to 2.3s.  Not as good
as 1.5s, but at least it's correct :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20820 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-24 23:06:02 +00:00
Chris Lattner
09adbbc99e only look at successors of globals. This gets us down to "only" 22s in the
bu pass for 176.gcc


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20818 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-24 21:17:27 +00:00
Chris Lattner
d8642125e4 Unfortunately, a previous patch was not safe. Revert it, reimplement
something correct. Unfortunately this takes 176.gcc's BU phase back
up to 29s from 1.5.  This fixes DSGraph/2005-03-24-Global-Arg-Alias.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20817 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-24 21:07:47 +00:00
Chris Lattner
0d397bd437 don't bother |'ing in 0's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20815 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-24 18:42:51 +00:00
Chris Lattner
d94b4d5b9c be more aggressive about incompleteness marking
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20814 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-24 18:42:28 +00:00
Chris Lattner
c5132e65a6 Fix a crash while promoting a value out of a loop from a global variable
when using ds-aa


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20802 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-24 04:22:04 +00:00
Chris Lattner
7d671b88e8 teach ds-aa about mod/ref for external function calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20801 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-24 03:04:50 +00:00
Chris Lattner
62da315c85 Simplify dead code into a fixme :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20800 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-24 02:41:19 +00:00
Chris Lattner
c4417f98e5 fix a compiler crash in runtime/libprofile
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20799 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-24 01:22:52 +00:00
Chris Lattner
f5eaf3c62c wrap a long line
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20797 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-23 23:51:12 +00:00
Chris Lattner
ec6518ddc2 If we are calling an external function, chain to another AA to potentially
decide, don't just immediately give up.

This implements GlobalsModRef/chaining-analysis.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20796 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-23 23:49:47 +00:00
Chris Lattner
8cfd24df54 Make this more efficient by only making one virtual method call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20793 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-23 23:26:58 +00:00
Chris Lattner
d433bde071 Make this a bit more aggressive
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20792 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-23 22:06:41 +00:00
Chris Lattner
65512d2525 a hack to allow count-aa to work with ds-aa :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20791 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-23 21:59:34 +00:00
Chris Lattner
cf9f20189f Add two options to allow -count-aa to print queries either (1) all queries,
or (2) only queries that are not successful (e.g. return may alias)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20790 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-23 21:59:07 +00:00
Chris Lattner
c14f59cb72 turn a dead conditional into an assert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20787 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-23 20:12:08 +00:00
Chris Lattner
e3f1d8a525 Totally gut mergeInGraph. There is absolutely no reason to be merging
global roots in from callees to callers.  The BU graphs do not have accurate
globals information and all of the clients know it.  Instead, just make sure
the GG is up-to-date, and they will be perfectly satiated.

This speeds up the BU pass on 176.gcc from 5.5s to 1.5s, and Loc+BU+TD
from 7s to 2.7s.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20786 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-23 20:08:59 +00:00
Chris Lattner
eb39492deb wrap a long line
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20785 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-23 16:43:11 +00:00
Chris Lattner
943814bb01 Make -steens-aa more conservative (aka correct) by making sure to obey
incompleteness flags.

Make it more aggressive by taking field sensitive information into
account.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20781 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-23 01:48:09 +00:00
Chris Lattner
2f72f9462b implement Analysis/DSGraph/field-sensitive.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20779 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-23 01:47:19 +00:00
Chris Lattner
1e9d1475bc Several changes here:
1. Increase max node size from 64->256 to avoid collapsing an important
   structure in 181.mcf
2. If we have multiple calls to an indirect call node with an indirect
   callee, fold these call nodes together, to avoid DSA turning apoc into
   a flaming fireball of death when analyzing 176.gcc.
  With this change, 176.gcc now takes ~7s to analyze for loc+bu+td, with
  5.7s of that in the BU pass.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20775 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-22 23:54:52 +00:00