Commit Graph

1256 Commits

Author SHA1 Message Date
Chris Lattner c020bcf850 Change ET-Forest to automatically recalculate its DFSnum's if too many slow
queries are made.

Patch by Daniel Berlin!

llvm-svn: 25323
2006-01-14 20:55:09 +00:00
Chris Lattner 00ca8d2de8 Add a new CallGraph::getOrInsertFunction for clients to use when updating
the callgraph.

llvm-svn: 25317
2006-01-14 20:03:00 +00:00
Chris Lattner bc351e171f add a dump method to CallGraph
llvm-svn: 25314
2006-01-14 19:17:02 +00:00
Nate Begeman 82049eba2c Add bswap intrinsics as documented in the Language Reference
llvm-svn: 25309
2006-01-14 01:25:24 +00:00
Chris Lattner 9db9f8a902 Switch loopinfo to using ETForest instead of DominatorSet to compute itself.
Patch by Daniel Berlin!

llvm-svn: 25199
2006-01-11 05:08:29 +00:00
Reid Spencer cfc60f3484 Remove unused inclusion of SymbolTable.h
llvm-svn: 25170
2006-01-10 03:48:34 +00:00
Chris Lattner a60738316e Fix a problem exposed by the et-forest work. Load-vn needs these passes live
whenever it is live, not just when load-vn is computed initially

llvm-svn: 25146
2006-01-08 09:10:04 +00:00
Chris Lattner 6c9cbdba1a Initial implementation of the ET-Forest data structure for dominators and
post-dominators.  This code was written/adapted by Daniel Berlin!

llvm-svn: 25144
2006-01-08 08:22:18 +00:00
Chris Lattner 44497859f9 Make the -print-alias-sets pass work for printing out something other than
the default aa impl results.

llvm-svn: 25062
2006-01-03 06:05:22 +00:00
Chris Lattner be19877731 Separate the call graph implementation from its interface. This implements
the rough idea sketched out in http://nondot.org/sabre/LLVMNotes/CallGraphClass.txt,
allowing new spiffy implementations of the callgraph interface to be built.

Many thanks to Saem Ghani for contributing this!

llvm-svn: 24944
2005-12-22 06:07:52 +00:00
John Criswell 757035ead9 Prefix DSA specific options with dsa.
Make the dsa-alloc-list and dsa-free-list options hidden.

llvm-svn: 24864
2005-12-19 20:14:38 +00:00
John Criswell 45bb70d8f9 Added an option to specify the names of heap freeing functions.
llvm-svn: 24863
2005-12-19 19:54:23 +00:00
John Criswell aa0fed0148 Added a command line option that allows the user to specify a list of
functions that allocate memory.

llvm-svn: 24862
2005-12-19 17:38:39 +00:00
Sumant Kowshik a69fcbdeb8 Collapsing node if variable length struct with final field of length zero
llvm-svn: 24621
2005-12-06 18:04:30 +00:00
Chris Lattner b14c41378d post-dom-frontiers requires proper post-dominance
llvm-svn: 24409
2005-11-18 07:28:26 +00:00
Andrew Lenharth 5278ca3fa2 prevent cse of readcyclecounter
llvm-svn: 24303
2005-11-11 19:02:54 +00:00
Andrew Lenharth 01aa56397d continued readcyclecounter support
llvm-svn: 24300
2005-11-11 16:47:30 +00:00
Chris Lattner f0b77f9acc 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

llvm-svn: 24102
2005-10-30 06:24:33 +00:00
Chris Lattner 21193ac3c0 remove a dead file
llvm-svn: 24085
2005-10-29 04:43:38 +00:00
John Criswell 970af11af8 Move some constant folding functions into LLVMAnalysis since they are used
by Analysis and Transformation passes.

llvm-svn: 24038
2005-10-27 16:00:10 +00:00
John Criswell fe5f33b120 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.

llvm-svn: 24036
2005-10-27 15:54:34 +00:00
Chris Lattner 90b0c99066 Remove this pass, it is not useful
llvm-svn: 23949
2005-10-24 02:35:43 +00:00
Chris Lattner bde3845548 DONT_BUILD_RELINKED is gone and implied by BUILD_ARCHIVE now
llvm-svn: 23940
2005-10-24 02:26:13 +00:00
Chris Lattner 8c087e962c Only build .a file versions of these libraries, instead of .a and .o versions.
This should speed up build times.

llvm-svn: 23933
2005-10-24 01:59:48 +00:00
Chris Lattner 8df7c01299 don't bother building the archive version of this library
llvm-svn: 23927
2005-10-24 01:08:20 +00:00
Chris Lattner ca014adf8e expose a ctor
llvm-svn: 23924
2005-10-24 01:00:45 +00:00
Chris Lattner 75d4f6fbcb implement some prototypes
llvm-svn: 23920
2005-10-24 00:38:38 +00:00
Chris Lattner b45e57c2dd move this to the analyze tool
llvm-svn: 23918
2005-10-24 00:27:36 +00:00
Chris Lattner cd002b2461 wrap a long line
llvm-svn: 23507
2005-09-28 22:30:58 +00:00
Chris Lattner b35df5f5bc Add a new getLoopLatch() method.
llvm-svn: 23315
2005-09-12 17:03:55 +00:00
Chris Lattner 898e50ecb3 floor/ceil don't read/write memory. This allows gcse to eliminate 6 calls
in mesa.

llvm-svn: 23015
2005-08-24 16:58:56 +00:00
Chris Lattner e515416396 Fix Transforms/LoopStrengthReduce/2005-08-15-AddRecIV.ll
llvm-svn: 22797
2005-08-16 00:37:01 +00:00
Chris Lattner 587a75b6e0 Teach LLVM to know how many times a loop executes when constructed with
a < expression, e.g.: for (i = m; i < n; ++i)

llvm-svn: 22793
2005-08-15 23:33:51 +00:00
Chris Lattner 35c0e2ee33 Fix an obvious oops
llvm-svn: 22742
2005-08-10 00:59:40 +00:00
Chris Lattner b310ac4a86 implement two helper methods
llvm-svn: 22736
2005-08-09 23:36:33 +00:00
Misha Brukman 41acd5e08d * Unbreak optimized build (noticed by Eric van Riet Paap)
* Comment #endif clauses for readability

llvm-svn: 22646
2005-08-04 14:16:48 +00:00
Chris Lattner 590642eb91 add support for Graphviz when viewing CFGs
llvm-svn: 22620
2005-08-03 17:55:05 +00:00
Nate Begeman 2bca4d9b7b Break SCEVExpander out of IndVarSimplify into its own .h/.cpp file so that
other passes may use it.

llvm-svn: 22557
2005-07-30 00:12:19 +00:00
Jeff Cohen 5f4ef3c5a8 Eliminate all remaining tabs and trailing spaces.
llvm-svn: 22523
2005-07-27 06:12:32 +00:00
Andrew Lenharth 23167c3be9 Remove glibc specific functions, and mark a couple as C99
llvm-svn: 22384
2005-07-11 20:35:20 +00:00
Andrew Lenharth c51a74cc02 because on alpha:
#   define errno (*__errno_location ())

*shakes head

llvm-svn: 22383
2005-07-11 17:41:12 +00:00
Andrew Lenharth 5488847304 the correct fix was to fix AliasAnalysis.getModRefInfo
llvm-svn: 22268
2005-06-20 15:25:22 +00:00
Andrew Lenharth 805d84a077 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.
llvm-svn: 22266
2005-06-20 15:02:05 +00:00
Andrew Lenharth 9144ec4764 core changes for varargs
llvm-svn: 22254
2005-06-18 18:34:52 +00:00
Chris Lattner bb0bfc4702 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

llvm-svn: 21796
2005-05-08 23:58:12 +00:00
Chris Lattner b2d3ac8349 These intrinsics do not access memory
llvm-svn: 21718
2005-05-06 05:21:04 +00:00
Misha Brukman c0aac8e858 Remove extra blank line
llvm-svn: 21706
2005-05-05 23:43:47 +00:00
Chris Lattner 1c636f1118 Add llvm.sqrt intrinsic, patch contributed by Morten Ofstad
llvm-svn: 21627
2005-04-30 03:44:07 +00:00
Chris Lattner 59ecb57e4a These functions can set errno!
llvm-svn: 21609
2005-04-28 21:52:31 +00:00
Chris Lattner eb2a461acf Make interval partition print correctly, patch contributed by
Vladimir Prus!

llvm-svn: 21566
2005-04-26 14:48:28 +00:00