Commit Graph

215 Commits

Author SHA1 Message Date
Chris Lattner
c6d52e07e5 Expose the internalize pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2365 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 05:49:53 +00:00
Chris Lattner
7bf5dfec19 Run the internalize pass to mark all functions except main internal when
linking the final program to allow smarter optimizations


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2364 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 05:49:45 +00:00
Chris Lattner
d43035e1d7 Use operator << to print modules
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2360 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 05:13:45 +00:00
Chris Lattner
598d21c7e5 Run GCSE as part of gccas.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2340 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 01:00:15 +00:00
Chris Lattner
e5fb83ebb8 Expose new GCSE pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2339 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 00:48:17 +00:00
Chris Lattner
483e14ee04 s/Method/Function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2336 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-27 07:27:19 +00:00
Chris Lattner
f57b845547 * Rename MethodPass class to FunctionPass
- Rename runOnMethod to runOnFunction
* Transform getAnalysisUsageInfo into getAnalysisUsage
  - Method is now const
  - It now takes one AnalysisUsage object to fill in instead of 3 vectors
    to fill in
  - Pass's now specify which other passes they _preserve_ not which ones
    they modify (be conservative!)
  - A pass can specify that it preserves all analyses (because it never
    modifies the underlying program)
* s/Method/Function/g in other random places as well


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2333 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-27 06:56:12 +00:00
Chris Lattner
76d12299b5 Make sure that there is no case where a signal can occur leaving a partially
written output file.  This is important because crashing testcases often write
part of a file out, and the testing harness decides the file is up-to-date next
time the test is run.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2303 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-18 19:55:25 +00:00
Chris Lattner
30af368082 * Add the printm pass to allow dumping the entire module after a transformation.
* s/Method/Function/


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2234 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-13 18:32:47 +00:00
Chris Lattner
9d6e7eb74f Expose funcresolve pass through opt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2231 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-12 18:21:13 +00:00
Chris Lattner
f8b90ee366 * The cleangcc pass is broken into two parts, we only want to
FunctionResolvingPass one.
* We run it *after* the symbol stripping pass so that -strip can be
  pipelined with the constant merging pass or something else if desired.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2226 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-10 20:37:47 +00:00
Chris Lattner
6a1f6940a1 The cleangcc pass is brokeninto two pieces, execute both of them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2225 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-10 20:33:32 +00:00
Chris Lattner
bc55a3140c Remove extranous #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2183 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-08 22:05:10 +00:00
Chris Lattner
02d6ef8976 s/PrintMethodPass/PrintFunctionPass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2182 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-08 22:05:01 +00:00
Chris Lattner
8bfa89c7f5 Add #includes
s/PrintMethodPass/PrintFunctionPass


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2181 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-08 22:04:24 +00:00
Chris Lattner
2b59837f02 Add support for the gnu ld -s (strip) option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2157 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-08 05:18:12 +00:00
Chris Lattner
ad202a0620 GCCLD actually does transformations to simplify the linked program now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2155 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-08 00:14:58 +00:00
Chris Lattner
94202988a8 Remove asmwriter library from link line, because the useful contents of it
have been incorporated into the vmcore library.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2153 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-07 22:35:30 +00:00
Chris Lattner
5bdf161418 Perform debug outputs with ->dump() instead of <<
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2152 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-07 22:34:44 +00:00
Chris Lattner
06272dcfb2 use dump method instead of Asm/Writer to do debug printing
Rename C to M because C used to be 'Class' and now we are 'Module'


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2151 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-07 22:34:19 +00:00
Chris Lattner
2fbfdcffd3 Change references to the Method class to be references to the Function
class.  The Method class is obsolete (renamed) and all references to it
are being converted over to Function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2144 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-07 20:49:59 +00:00
Chris Lattner
69cd2b1ade Move the PromoteMemoryToRegister pass to be run _after_ the raise pointer
references pass, so it is given the chance to do some good!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2089 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-01 19:45:11 +00:00
Chris Lattner
bfd3a6afb0 Makefile change for IPO's that use the Datastructure analysis stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2015 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-28 18:10:31 +00:00
Chris Lattner
328207c3ff Add hook for pool allocation pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2013 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-28 18:08:07 +00:00
Chris Lattner
fe59454fa2 Checking for Cameron
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2011 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-28 17:56:28 +00:00
Cameron Buschardt
0732c70ffb Rename constructor function for mem2reg pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2008 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-27 23:29:23 +00:00
Chris Lattner
bc132d62d3 * Add support for DataStructure analysis
* Parameterize pass outputting with the printPass template, so analysis
  output can optionally take more arguments than just a stream.  The
  default output mode is just to use operator<< on the analysis.
* Remove CurrentModule hack, in favor of using printPass
* Remove special operator<<'s defined for FindUsedTypes and
  FindUnsafePointerTypes, in favor of printPass specializations
* Use std::cout instead of cout


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1995 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-26 22:43:12 +00:00
Vikram S. Adve
d32e70a09f Rename pass to DecomposeMultiDimRefs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1960 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-24 03:19:54 +00:00
Chris Lattner
081c409e27 Add a debugging option to gccas to cause it to not do level raise or anything
after it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1934 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-21 21:21:50 +00:00
Chris Lattner
2b72c360bb Expose dead instruction elimination pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1877 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-14 22:36:15 +00:00
Chris Lattner
084235a989 Echo the right tool name on error
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1865 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-12 15:41:36 +00:00
Chris Lattner
2dc78088b7 Remove runtime library in favor of users linking against real libraries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1853 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-11 17:57:13 +00:00
Chris Lattner
41c3465812 * Implement linking to libraries
* Pass arguments to program through shell script


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1851 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-11 17:49:53 +00:00
Chris Lattner
71e7bb4bc0 Pull interprocedural analyses out of Analysis library into their own lib
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1827 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-06 18:44:29 +00:00
Chris Lattner
cabc17a293 Don't forget to build gccld!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1826 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-06 18:05:02 +00:00
Chris Lattner
70d12b037b Since verifier and SlotCalculator are now in VMCore library, libanalysis is
no longer required


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1823 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-06 17:41:18 +00:00
Chris Lattner
e2aed35319 Pull callgraph out of Cfg namespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1822 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-06 17:40:37 +00:00
Chris Lattner
417fbe5287 Change to use new pass accessor functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1817 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-26 21:47:29 +00:00
Chris Lattner
bd0ef77cde Change over to use new style pass mechanism, now passes only expose small
creation functions in their public header file, unless they can help it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1816 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-26 21:46:54 +00:00
Chris Lattner
4ddcd54751 * Make all command line arguments static
* Change -trace & -tracem options to use a 3 values enum option
* Change to use new style interface to passes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1813 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-26 21:36:53 +00:00
Chris Lattner
eded4916d6 Move ProfilePaths class into ProfilePaths library, only expose a creation function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1812 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-26 20:04:59 +00:00
Anand Shukla
dc9a1f5ce8 Includes -paths option to trace paths in the program
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1811 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-26 19:57:59 +00:00
Anand Shukla
06e84ed495 Link in the PathProfiles library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1800 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-26 18:29:20 +00:00
Chris Lattner
ec4913ea7c Remove hack. This is better fixed in Makefile.common
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1795 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-24 23:25:46 +00:00
Chris Lattner
5b077b00a5 Cleanup to build with GCC 3.0.4
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1794 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-24 23:25:24 +00:00
Chris Lattner
1156edf01c Build with newer compiler, with same bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1793 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-24 23:11:05 +00:00
Chris Lattner
bee1940791 GCC3.0.4 crashes when compiling this. Comment it out for now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1792 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-24 23:03:37 +00:00
Chris Lattner
04bb837cc0 Genericize the ReversePostOrderIterator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1785 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-24 21:48:59 +00:00
Chris Lattner
22d26d7c7d * Expose the verifier pass as one that can be ran
* Force the verifier to run before bytecode is written


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1783 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-20 17:56:53 +00:00
Chris Lattner
221d688a5e Method.h no longer includes BasicBlock.h
Method::inst_* is now in llvm/Support/InstIterator.h
GraphTraits specializations for BasicBlock and Methods are now in llvm/Support/CFG.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1746 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-12 21:07:25 +00:00