Chris Lattner
e8c237b1ce
Run another local value numbering phase after redundancy elimination
...
llvm-svn: 2625
2002-05-14 16:23:14 +00:00
Chris Lattner
b04d5ecc11
expose LICM pass
...
llvm-svn: 2614
2002-05-10 22:44:37 +00:00
Chris Lattner
97b501879c
Add LICM pass to compiler
...
llvm-svn: 2613
2002-05-10 22:44:31 +00:00
Chris Lattner
24656ee8e4
Expose the lowerallocs pass
...
llvm-svn: 2602
2002-05-10 15:43:07 +00:00
Chris Lattner
25ae3ddf64
Expose the pi node insertion pass.
...
llvm-svn: 2594
2002-05-10 05:41:49 +00:00
Chris Lattner
c95479a283
Clean up dis so that it does not print out code in various traversal orders.
...
Now it only output llvm or C code.
llvm-svn: 2564
2002-05-09 01:25:55 +00:00
Chris Lattner
0c171e22a8
Expose expression reassociation
...
llvm-svn: 2557
2002-05-08 22:18:34 +00:00
Chris Lattner
fd2ecfc2a5
Run expression reassociation as part of gccas
...
llvm-svn: 2556
2002-05-08 22:18:20 +00:00
Sumant Kowshik
64cf4b95c9
*** empty log message ***
...
llvm-svn: 2552
2002-05-08 18:09:58 +00:00
Chris Lattner
07a6a20a96
Spell aggressive correctly
...
llvm-svn: 2551
2002-05-07 22:15:01 +00:00
Chris Lattner
466c66f47a
Merge all include/llvm/Transforms/Scalar/* into a single Scalar.h
...
llvm-svn: 2538
2002-05-07 20:03:27 +00:00
Chris Lattner
5cae7abf34
Fix makefiles after shuffling passes around the libraries
...
llvm-svn: 2532
2002-05-07 19:27:33 +00:00
Chris Lattner
f7806b0212
Move UnifyFunctionExitNodes to Utils library: final resting place this time
...
llvm-svn: 2531
2002-05-07 19:18:48 +00:00
Chris Lattner
e17a86e8a2
Oops, somehow lost a slash. Fixed
...
llvm-svn: 2524
2002-05-07 18:39:52 +00:00
Chris Lattner
9e1c79995e
Updates to move some header files out of include/llvm/Transforms into
...
the Scalar and Utils subdirectories
llvm-svn: 2523
2002-05-07 18:36:35 +00:00
Chris Lattner
cb8c2d31c2
Straighten out makefiles after moving code to new Transform Utils library
...
llvm-svn: 2520
2002-05-07 18:18:26 +00:00
Chris Lattner
ee7b1b29a9
GCSE is faster than SCCP, and it makes SCCP's job easier, so run it first.
...
llvm-svn: 2503
2002-05-06 18:54:12 +00:00
Chris Lattner
6ba1c2d113
Instruction Combination can create a ton of trivially dead instructions. Remove
...
them with an DIE pass before more expensive optimizations are run.
llvm-svn: 2491
2002-05-06 16:52:15 +00:00
Chris Lattner
0ba1f2e45f
Run DCE AFTER SCCP and GCSE!
...
llvm-svn: 2476
2002-05-06 03:04:17 +00:00
Chris Lattner
453a66845a
Remove unneccesary pass.
...
llvm-svn: 2421
2002-04-30 20:53:05 +00:00
Chris Lattner
3b2084a357
These aren't tools
...
llvm-svn: 2412
2002-04-29 20:29:30 +00:00
Chris Lattner
9cbf621bb5
Move constant merging pass earlier
...
Include the SCCP pass in gccas
llvm-svn: 2410
2002-04-29 20:11:38 +00:00
Chris Lattner
9689364fee
Remove InstForest from analysis namespace
...
llvm-svn: 2401
2002-04-29 18:13:31 +00:00
Chris Lattner
96e0c48175
Eliminate duplicate or unneccesary #include's
...
llvm-svn: 2397
2002-04-29 17:42:12 +00:00
Chris Lattner
589debc4ba
Add new optional getPassName() virtual function that a Pass can override
...
to make debugging output a lot nicer.
llvm-svn: 2395
2002-04-29 14:57:45 +00:00
Chris Lattner
119fd9172e
Rename functions to be more consistend with other pass constructors
...
llvm-svn: 2388
2002-04-28 21:45:36 +00:00
Chris Lattner
ec70d92221
Tighten up the AnalysisUsage of lots of passes, primarily to correctly indicate whether or not they invalidate the CFGA
...
llvm-svn: 2386
2002-04-28 21:27:06 +00:00
Chris Lattner
d17fdd5494
Eliminate the cfg namespace
...
llvm-svn: 2371
2002-04-28 16:21:53 +00:00
Chris Lattner
d5c0eb722e
Expose the internalize pass.
...
llvm-svn: 2365
2002-04-28 05:49:53 +00:00
Chris Lattner
55a350ffa8
Run the internalize pass to mark all functions except main internal when
...
linking the final program to allow smarter optimizations
llvm-svn: 2364
2002-04-28 05:49:45 +00:00
Chris Lattner
7c02462361
Use operator << to print modules
...
llvm-svn: 2360
2002-04-28 05:13:45 +00:00
Chris Lattner
f5cc80a3cb
Run GCSE as part of gccas.
...
llvm-svn: 2340
2002-04-28 01:00:15 +00:00
Chris Lattner
c8022bc84b
Expose new GCSE pass
...
llvm-svn: 2339
2002-04-28 00:48:17 +00:00
Chris Lattner
2f0ee1833d
s/Method/Function
...
llvm-svn: 2336
2002-04-27 07:27:19 +00:00
Chris Lattner
536cf1b13f
* 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
llvm-svn: 2333
2002-04-27 06:56:12 +00:00
Chris Lattner
ded2679ed0
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.
llvm-svn: 2303
2002-04-18 19:55:25 +00:00
Chris Lattner
04c7eda945
* Add the printm pass to allow dumping the entire module after a transformation.
...
* s/Method/Function/
llvm-svn: 2234
2002-04-13 18:32:47 +00:00
Chris Lattner
7b28f092cb
Expose funcresolve pass through opt
...
llvm-svn: 2231
2002-04-12 18:21:13 +00:00
Chris Lattner
b78ee9705b
* 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.
llvm-svn: 2226
2002-04-10 20:37:47 +00:00
Chris Lattner
d69c7543b9
The cleangcc pass is brokeninto two pieces, execute both of them.
...
llvm-svn: 2225
2002-04-10 20:33:32 +00:00
Chris Lattner
ba71c8f7e1
Remove extranous #include
...
llvm-svn: 2183
2002-04-08 22:05:10 +00:00
Chris Lattner
53b18fe247
s/PrintMethodPass/PrintFunctionPass
...
llvm-svn: 2182
2002-04-08 22:05:01 +00:00
Chris Lattner
71b2140b94
Add #includes
...
s/PrintMethodPass/PrintFunctionPass
llvm-svn: 2181
2002-04-08 22:04:24 +00:00
Chris Lattner
4522bc2f02
Add support for the gnu ld -s (strip) option
...
llvm-svn: 2157
2002-04-08 05:18:12 +00:00
Chris Lattner
0c23bfd2d8
GCCLD actually does transformations to simplify the linked program now.
...
llvm-svn: 2155
2002-04-08 00:14:58 +00:00
Chris Lattner
8b16900b1b
Remove asmwriter library from link line, because the useful contents of it
...
have been incorporated into the vmcore library.
llvm-svn: 2153
2002-04-07 22:35:30 +00:00
Chris Lattner
471c717f9e
Perform debug outputs with ->dump() instead of <<
...
llvm-svn: 2152
2002-04-07 22:34:44 +00:00
Chris Lattner
d61440d34f
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'
llvm-svn: 2151
2002-04-07 22:34:19 +00:00
Chris Lattner
bc15ae64dd
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.
llvm-svn: 2144
2002-04-07 20:49:59 +00:00
Chris Lattner
dc6c89b725
Move the PromoteMemoryToRegister pass to be run _after_ the raise pointer
...
references pass, so it is given the chance to do some good!
llvm-svn: 2089
2002-04-01 19:45:11 +00:00
Chris Lattner
362aa65cca
Makefile change for IPO's that use the Datastructure analysis stuff
...
llvm-svn: 2015
2002-03-28 18:10:31 +00:00
Chris Lattner
73edb721e8
Add hook for pool allocation pass
...
llvm-svn: 2013
2002-03-28 18:08:07 +00:00
Chris Lattner
6e01190339
Checking for Cameron
...
llvm-svn: 2011
2002-03-28 17:56:28 +00:00
Cameron Buschardt
788a1aaab0
Rename constructor function for mem2reg pass.
...
llvm-svn: 2008
2002-03-27 23:29:23 +00:00
Chris Lattner
d425cc5987
* 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
llvm-svn: 1995
2002-03-26 22:43:12 +00:00
Vikram S. Adve
1231c34e04
Rename pass to DecomposeMultiDimRefs.
...
llvm-svn: 1960
2002-03-24 03:19:54 +00:00
Chris Lattner
42439b8827
Add a debugging option to gccas to cause it to not do level raise or anything
...
after it.
llvm-svn: 1934
2002-03-21 21:21:50 +00:00
Chris Lattner
9036b8c899
Expose dead instruction elimination pass
...
llvm-svn: 1877
2002-03-14 22:36:15 +00:00
Chris Lattner
6a2a2e40f3
Echo the right tool name on error
...
llvm-svn: 1865
2002-03-12 15:41:36 +00:00
Chris Lattner
558efd4bf0
Remove runtime library in favor of users linking against real libraries.
...
llvm-svn: 1853
2002-03-11 17:57:13 +00:00
Chris Lattner
4489946ab0
* Implement linking to libraries
...
* Pass arguments to program through shell script
llvm-svn: 1851
2002-03-11 17:49:53 +00:00
Chris Lattner
cc1fa55c61
Pull interprocedural analyses out of Analysis library into their own lib
...
llvm-svn: 1827
2002-03-06 18:44:29 +00:00
Chris Lattner
06711c728d
Don't forget to build gccld!
...
llvm-svn: 1826
2002-03-06 18:05:02 +00:00
Chris Lattner
319dec9cea
Since verifier and SlotCalculator are now in VMCore library, libanalysis is
...
no longer required
llvm-svn: 1823
2002-03-06 17:41:18 +00:00
Chris Lattner
0c342ec032
Pull callgraph out of Cfg namespace
...
llvm-svn: 1822
2002-03-06 17:40:37 +00:00
Chris Lattner
9287e88e26
Change to use new pass accessor functions
...
llvm-svn: 1817
2002-02-26 21:47:29 +00:00
Chris Lattner
e2383e8592
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.
llvm-svn: 1816
2002-02-26 21:46:54 +00:00
Chris Lattner
5e721a352c
* 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
llvm-svn: 1813
2002-02-26 21:36:53 +00:00
Chris Lattner
1b9b843452
Move ProfilePaths class into ProfilePaths library, only expose a creation function
...
llvm-svn: 1812
2002-02-26 20:04:59 +00:00
Anand Shukla
19d77241bc
Includes -paths option to trace paths in the program
...
llvm-svn: 1811
2002-02-26 19:57:59 +00:00
Anand Shukla
209b88c6fc
Link in the PathProfiles library
...
llvm-svn: 1800
2002-02-26 18:29:20 +00:00
Chris Lattner
44d96e69f4
Remove hack. This is better fixed in Makefile.common
...
llvm-svn: 1795
2002-02-24 23:25:46 +00:00
Chris Lattner
98aa08c950
Cleanup to build with GCC 3.0.4
...
llvm-svn: 1794
2002-02-24 23:25:24 +00:00
Chris Lattner
dcdf0532ff
Build with newer compiler, with same bug
...
llvm-svn: 1793
2002-02-24 23:11:05 +00:00
Chris Lattner
a3ec3f6fd0
GCC3.0.4 crashes when compiling this. Comment it out for now
...
llvm-svn: 1792
2002-02-24 23:03:37 +00:00
Chris Lattner
5ece03aed8
Genericize the ReversePostOrderIterator.
...
llvm-svn: 1785
2002-02-24 21:48:59 +00:00
Chris Lattner
3b17492321
* Expose the verifier pass as one that can be ran
...
* Force the verifier to run before bytecode is written
llvm-svn: 1783
2002-02-20 17:56:53 +00:00
Chris Lattner
b0a2c5546b
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
llvm-svn: 1746
2002-02-12 21:07:25 +00:00
Chris Lattner
589decaa98
Enable register promotion pass
...
llvm-svn: 1740
2002-02-12 17:17:33 +00:00
Chris Lattner
fbe7890cc4
Trim down makefile, again.
...
llvm-svn: 1691
2002-02-04 17:37:25 +00:00
Chris Lattner
32703676f4
Cut down number of times libraries are included to link a little bit faster
...
llvm-svn: 1678
2002-02-04 06:43:56 +00:00
Chris Lattner
4e02006161
* Remove -noasm option. If we're not compiling, what's the point?
...
* convert over to pass based target backend. Much cleaner now
llvm-svn: 1665
2002-02-03 23:43:19 +00:00
Chris Lattner
ed11b34f8d
Switch over to a model where we compile each method, emit assembly, then free
...
machineinstr memory before starting on the next method.
llvm-svn: 1659
2002-02-03 07:54:10 +00:00
Chris Lattner
bfdc4a546a
Catch the parse exception if bad input is provided. Much better than an abort
...
llvm-svn: 1631
2002-02-01 05:09:35 +00:00
Chris Lattner
d4cdf2337a
Add mergereturn pass
...
llvm-svn: 1629
2002-02-01 04:54:11 +00:00
Chris Lattner
5786d62ec7
Add dependency
...
llvm-svn: 1620
2002-01-31 18:33:23 +00:00
Chris Lattner
c03f994e04
Fix dependency problem
...
llvm-svn: 1619
2002-01-31 18:33:09 +00:00
Chris Lattner
15709802b8
Resolve deps
...
llvm-svn: 1615
2002-01-31 15:52:41 +00:00
Chris Lattner
f03244d976
Resolve dependencies
...
llvm-svn: 1614
2002-01-31 15:43:11 +00:00
Chris Lattner
88bd8acf90
Convert to use new Pass framework...
...
llvm-svn: 1610
2002-01-31 00:47:12 +00:00
Chris Lattner
70f03681e8
PassManager is now in its own header file
...
MethodPass's now cannot be run on external methods
llvm-svn: 1609
2002-01-31 00:46:45 +00:00
Chris Lattner
5e70addcea
PassManager is now in it's own header file
...
llvm-svn: 1608
2002-01-31 00:46:22 +00:00
Chris Lattner
525a04cef7
Convert analyze over to use new pass framework for its analyses
...
llvm-svn: 1607
2002-01-31 00:46:09 +00:00
Chris Lattner
eb93690918
Accept, but ignore -lfoo options.
...
llvm-svn: 1585
2002-01-25 03:59:39 +00:00
Chris Lattner
51e409d5ce
Initial Checkin of gccld
...
llvm-svn: 1578
2002-01-24 19:12:12 +00:00
Chris Lattner
d4ebfa46da
In an amazing fit of stupidity, I flipped the conditional and didn't test
...
it right. Sheesh :)
llvm-svn: 1550
2002-01-22 21:07:24 +00:00
Chris Lattner
bf0c3377fd
Only run DeadInst elimination early, because it is quick and painless and
...
pipelines well
llvm-svn: 1549
2002-01-22 21:06:44 +00:00
Chris Lattner
fd5a4f7123
Misc cleanups. Allocate ofstream statically, and use a pass to write out the bytecode
...
llvm-svn: 1529
2002-01-22 03:30:46 +00:00
Chris Lattner
819df41a64
Try again, now it works right
...
llvm-svn: 1526
2002-01-22 02:28:50 +00:00
Chris Lattner
4cecd63a42
Rename LowerAllocations.h to ChangeAllocations.h since it now contains the
...
RaiseAllocations pass as well.
llvm-svn: 1525
2002-01-22 01:04:08 +00:00
Chris Lattner
d3a94cc67a
Fix ordering dependency problem
...
llvm-svn: 1524
2002-01-22 01:03:39 +00:00
Chris Lattner
83056c99ec
Pull RaiseAllocations stuff out of the CleanGCC pass into it's own pass in
...
the ChangeAllocations.h header file.
llvm-svn: 1522
2002-01-22 00:13:51 +00:00
Chris Lattner
4454cdc5c0
Move stuff out of the Optimizations directories into the appropriate Transforms
...
directories. Eliminate the opt namespace.
llvm-svn: 1520
2002-01-21 23:17:48 +00:00
Chris Lattner
071f08916e
Chuck fixed the GCC problems so this hack is now unneccesary
...
llvm-svn: 1519
2002-01-21 23:17:07 +00:00
Chris Lattner
10a9b7627d
Eliminate opt library
...
llvm-svn: 1516
2002-01-21 23:13:46 +00:00
Chris Lattner
bbb4dcdcd1
Rename SwapStructureContents -> IPO/SimpleStructMutation
...
Move MutateStructTypes.(cpp|h) -> IPO/MutateStructTypes.(cpp|h)
llvm-svn: 1510
2002-01-21 07:52:35 +00:00
Chris Lattner
2521ae1011
Implement a more powerful, simpler, pass system. This pass system can figure
...
out how to run a collection of passes optimially given their behaviors and
charactaristics.
Convert code to use it.
llvm-svn: 1507
2002-01-21 07:31:50 +00:00
Chris Lattner
3dc9a2a61f
Changes to build successfully with GCC 3.02
...
llvm-svn: 1503
2002-01-20 22:54:45 +00:00
Chris Lattner
085560caa2
Add instruction combining pass
...
Rename -mergecons to -constmerge
llvm-svn: 1478
2001-12-14 16:50:35 +00:00
Chris Lattner
e6523ce62b
Add more passes to run after raising
...
llvm-svn: 1476
2001-12-14 16:48:30 +00:00
Chris Lattner
eed30bc7da
Build runtime library with local GCCAS
...
llvm-svn: 1447
2001-12-13 00:44:23 +00:00
Chris Lattner
c513c2ef29
Implement strlen strdup strcmp
...
llvm-svn: 1446
2001-12-13 00:44:09 +00:00
Chris Lattner
b0b2af33c7
Tell the user if a file is corrupt or not... not that the file cannot be
...
found.
llvm-svn: 1433
2001-12-08 20:31:32 +00:00
Chris Lattner
6d97b3a7be
Run DCE before cleanupGCCoutput which will cause some dead types (like FILE) to be removed
...
llvm-svn: 1429
2001-12-07 04:25:36 +00:00
Chris Lattner
447d8fd004
Remove unnecesary namespace impot
...
llvm-svn: 1419
2001-12-05 06:35:30 +00:00
Chris Lattner
b1aa7e795d
Simplify induction variables before 'raising' the representation
...
llvm-svn: 1418
2001-12-05 06:34:58 +00:00
Chris Lattner
f2e6a6be44
Use new induction variable simplification code with -indvars option
...
llvm-svn: 1410
2001-12-04 04:32:04 +00:00
Chris Lattner
a302c202ab
Induction variables must be phi nodes
...
llvm-svn: 1402
2001-12-03 17:27:42 +00:00
Chris Lattner
463cc31132
Create a new #include "Support/..." directory structure to move things
...
from "llvm/Support/..." that are not llvm dependant.
Move files and fix #includes
llvm-svn: 1400
2001-11-27 00:03:19 +00:00
Chris Lattner
9da08d6abf
-raise includes constprop and dce
...
llvm-svn: 1397
2001-11-26 19:37:43 +00:00
Chris Lattner
cc821cf542
* Add hooks to globaldce
...
* Fix ugly hacks by implementing IPOs correctly
* Use an auto_ptr to manage the module lifecycle
llvm-svn: 1395
2001-11-26 19:22:39 +00:00
Chris Lattner
a148c8ca93
Link to ipo library
...
llvm-svn: 1394
2001-11-26 19:21:02 +00:00
Chris Lattner
2b12cae948
Fix problem where lli < foo.bc would have argc = 0
...
llvm-svn: 1393
2001-11-26 19:20:38 +00:00
Chris Lattner
9588b188db
Add support to enable -lfoo to be processed correctly
...
llvm-svn: 1390
2001-11-26 19:18:30 +00:00
Chris Lattner
b0bd512e44
Add hooks to print natural loop information and induction variables
...
llvm-svn: 1389
2001-11-26 19:18:11 +00:00
Chris Lattner
195bbf88ba
Change swapstructs itf
...
Add nasty hack to be removed later
llvm-svn: 1356
2001-11-26 18:18:53 +00:00
Chris Lattner
e0ca60fc70
Run constprop before -raise
...
llvm-svn: 1354
2001-11-26 18:16:07 +00:00
Chris Lattner
5908013cfc
Fix link prob
...
llvm-svn: 1297
2001-11-14 11:03:17 +00:00
Chris Lattner
6f00b04246
Add hooks to call the new swap structcontents pass
...
llvm-svn: 1243
2001-11-10 07:16:10 +00:00
Chris Lattner
c9486bac28
add Yet Another Instance of a Static Library
...
llvm-svn: 1242
2001-11-10 07:15:53 +00:00
Chris Lattner
3659e104ec
Add hooks for the FindUsedTypes pass
...
llvm-svn: 1233
2001-11-09 05:27:34 +00:00
Chris Lattner
821d1b8d30
Add analysis pass.
...
llvm-svn: 1182
2001-11-07 21:16:29 +00:00
Chris Lattner
943810898d
Move the Raise xform from opt to transforms
...
llvm-svn: 1072
2001-11-01 02:41:09 +00:00
Chris Lattner
81a5b6edbf
crunch the output of GCC a bit to make it nicer
...
llvm-svn: 1068
2001-10-31 06:36:48 +00:00
Chris Lattner
0db277e65e
Fix dumb copy and paste typos
...
llvm-svn: 1063
2001-10-31 04:33:33 +00:00
Chris Lattner
882675498b
Add hook for GCC cleanup pass
...
llvm-svn: 1060
2001-10-31 04:29:44 +00:00
Chris Lattner
a2ae364718
Build new gccas tool
...
llvm-svn: 1059
2001-10-31 04:29:30 +00:00
Chris Lattner
4506f72080
Initial checkin of GCCAS
...
llvm-svn: 1058
2001-10-31 04:28:11 +00:00
Chris Lattner
396a23cffb
Implement memset memcpy, calloc
...
llvm-svn: 1055
2001-10-30 22:37:01 +00:00
Chris Lattner
b02a9d8ce4
Initialize map for purify
...
llvm-svn: 1049
2001-10-30 20:28:46 +00:00
Chris Lattner
fbbdca242a
I screwed up the macros, so of course strtol didn't work. *sigh*
...
llvm-svn: 1035
2001-10-29 17:47:10 +00:00
Chris Lattner
067667b61e
Oops, accidentally broke reading from stdin when doing command line arguments
...
llvm-svn: 1026
2001-10-29 14:00:48 +00:00
Chris Lattner
52736dc8e3
Implement a -trace command line option and a trace option in the interpreter.
...
llvm-svn: 989
2001-10-27 08:43:52 +00:00
Chris Lattner
9def26ab6b
* Make pointer values work better by treating them uniformly as 64 bit values.
...
This causes code that is generated by gcc to work better.
* Implement mul & div
* Export malloc, free, and pow
* add strtol, atoi, and atol to the runtime library
llvm-svn: 988
2001-10-27 08:28:11 +00:00
Chris Lattner
de2726ed00
Provide argv for commands
...
llvm-svn: 987
2001-10-27 05:54:31 +00:00
Chris Lattner
e04a4efa13
* Implement exit() builtin function
...
* Implement linked in runtime library with puts(char*) in it
* implement builtin putchar(int) function
llvm-svn: 985
2001-10-27 04:15:57 +00:00
Chris Lattner
fc68c300ce
Add support for building a runtime library for LLI
...
llvm-svn: 983
2001-10-24 19:52:41 +00:00
Chris Lattner
b75ed5de9d
Implement a -L command line argument to specify a search path. Implement minimal ar compatibility stuff
...
llvm-svn: 975
2001-10-24 06:23:00 +00:00
Chris Lattner
7ec504f5dc
Changes to get some meaningful feedback from the bytecode reader. At some point this stuff should all be exception driven, but for now it is not.
...
llvm-svn: 970
2001-10-24 01:15:12 +00:00
Chris Lattner
aa8d1c9987
Add '-v' option to enable verbose output from the linker
...
llvm-svn: 966
2001-10-23 20:44:55 +00:00
Chris Lattner
1c682e89db
Fix to reference the right header
...
llvm-svn: 915
2001-10-19 15:39:14 +00:00
Chris Lattner
127fa2e39d
Enhancements to pass argc & argv to main if required
...
llvm-svn: 909
2001-10-18 21:55:32 +00:00
Chris Lattner
3b77672a36
Remove unneccesary retcode var
...
llvm-svn: 905
2001-10-18 20:33:21 +00:00
Chris Lattner
80630ae4ed
Refactor Assembly/Bytecode writer code into Assembly & bytecode libraries
...
llvm-svn: 904
2001-10-18 20:32:07 +00:00
Chris Lattner
8195375b7d
Expose more xforms to the opt utility
...
llvm-svn: 900
2001-10-18 20:06:45 +00:00
Chris Lattner
a5d14f7a24
Bytecode writer is yanked out of Module printer
...
llvm-svn: 899
2001-10-18 20:06:31 +00:00
Vikram S. Adve
a70aaaf07a
Move malloc/free lowering after tracing until lli supports
...
calls to external malloc/free functions.
llvm-svn: 893
2001-10-18 18:20:20 +00:00
Chris Lattner
236f063966
Only output code if file open is successful
...
llvm-svn: 890
2001-10-18 17:07:22 +00:00
Vikram S. Adve
6c1fee9a85
Trace code should always be exported just before code generation;
...
this is not a debugging option. But we can export it as assembly
instead of bytecode if -debugtrace is specified.
llvm-svn: 889
2001-10-18 13:51:20 +00:00
Chris Lattner
3b8499c02a
Use the standard header not the old one
...
llvm-svn: 886
2001-10-18 06:13:08 +00:00
Chris Lattner
b3e1e7eae0
Add support to insert trace code as an "optimization"
...
llvm-svn: 884
2001-10-18 06:05:15 +00:00
Chris Lattner
0a383effcc
Convert to new simpler, more powerful pass structure
...
llvm-svn: 882
2001-10-18 05:28:44 +00:00
Chris Lattner
8081f23a2d
* Passes return true if they change something, not if they fail
...
* Convert opt to use Pass's and convert optimizations to pass structure
llvm-svn: 870
2001-10-18 01:31:43 +00:00
Chris Lattner
2322c8bab6
Passes return true if they change something, not if they fail
...
llvm-svn: 869
2001-10-18 01:31:22 +00:00
Chris Lattner
463b90cb78
ConcretePass should not be a templated class!
...
llvm-svn: 838
2001-10-15 17:47:13 +00:00
Chris Lattner
902a7235a7
Minor cleanups
...
llvm-svn: 837
2001-10-15 17:41:24 +00:00
Chris Lattner
c8af2adc9f
Use the new Pass infrastructure to clean up llc
...
llvm-svn: 835
2001-10-15 17:30:47 +00:00
Chris Lattner
971a585f77
Add library
...
llvm-svn: 827
2001-10-15 15:55:15 +00:00
Chris Lattner
a68fff6614
Minor code cleanups
...
llvm-svn: 825
2001-10-15 13:47:13 +00:00
Chris Lattner
af1d77e07c
Implement global variables. Struct and Pointer initializers are not implemented yet though
...
llvm-svn: 818
2001-10-15 05:51:48 +00:00
Vikram S. Adve
dc3f0d62c7
*** empty log message ***
...
llvm-svn: 811
2001-10-14 23:29:28 +00:00
Chris Lattner
ff0aa0fb39
Add a new -d argument to dump the internal rep as assembly.
...
llvm-svn: 804
2001-10-14 23:23:33 +00:00
Chris Lattner
96e32057bc
MethodTypes take an explicit isVarArg argument
...
llvm-svn: 782
2001-10-13 07:07:28 +00:00
Chris Lattner
98615da75e
Fix comment flyer
...
llvm-svn: 781
2001-10-13 07:06:57 +00:00
Chris Lattner
9ceec4152d
Add new linker
...
llvm-svn: 780
2001-10-13 07:06:23 +00:00
Chris Lattner
38eaf883e9
Build the new linker
...
llvm-svn: 779
2001-10-13 07:06:06 +00:00
Vikram S. Adve
7449b96c4c
Repeat some libs due to circular dependences between Sparc and other
...
code gen libraries.
llvm-svn: 722
2001-10-10 20:58:57 +00:00
Chris Lattner
7a83259579
Add hack to get rid of malloc & free instructions for code generation
...
llvm-svn: 713
2001-10-04 01:40:53 +00:00
Chris Lattner
9b45b18404
Pull iterators out of CFG.h and CFGdecls and put them in Support directory
...
llvm-svn: 664
2001-09-28 22:56:31 +00:00
Chris Lattner
58938f465f
Add support to print a call graph, and also add support for module level interprocedural analyses
...
llvm-svn: 659
2001-09-28 00:07:36 +00:00
Chris Lattner
43647563f5
Add proper support to send output to the right place
...
llvm-svn: 649
2001-09-19 16:52:09 +00:00
Chris Lattner
d5ca24e73e
Emit assembly language from the target...
...
llvm-svn: 640
2001-09-19 13:56:47 +00:00
Chris Lattner
b28fb4bcf5
C++ gives us auto_ptr's, so we might as well use them. :)
...
llvm-svn: 629
2001-09-18 17:04:18 +00:00
Vikram S. Adve
ee361e80bc
Minor changes.
...
llvm-svn: 622
2001-09-18 13:10:45 +00:00
Ruchira Sasanka
474b31bae5
Added regalloc
...
llvm-svn: 584
2001-09-15 00:28:37 +00:00
Chris Lattner
fa4a5998cd
Oops, accidentally checked my debugging makefile
...
llvm-svn: 583
2001-09-14 23:21:08 +00:00
Chris Lattner
a0a3946882
Make a new llvm/Target #include directory.
...
Move files from lib/CodeGen/TargetMachine to lib/Target
Move TargetData.h and TargetMachine.h to Target/{Data.h|Machine.h}
Prepare to split TargetMachine.h into several smaller files
llvm-svn: 566
2001-09-14 05:34:53 +00:00
Chris Lattner
7e70cdb641
Checkin changes to:
...
1. Clean up the TargetMachine structure. No more wierd pointers that have to
be cast around and taken care of by the target.
2. Instruction Scheduling now takes the schedinfo as an argument. The same
should be done with the instinfo, it just isn't now.
llvm-svn: 565
2001-09-14 04:32:55 +00:00
Chris Lattner
3e2a85a0e3
This checkin represents some cleanup of the backend, implementing the following things:
...
1. The TargetMachine structure is free to decide the process a particular target uses to generate code.
2. All of the gooee details of the sparc backend are now localized in the lib/CodeGen/TargetMAchine/Sparc directory. The Sparc.h file that is globally visible is just a stub.
3. The Sparc.h file that esxists now will dissapear entirely someday when we have multiple backends chosen by a factory of some sort.
llvm-svn: 559
2001-09-14 03:37:52 +00:00
Chris Lattner
90029607e5
Export the instruction forest support from the analysis library
...
llvm-svn: 556
2001-09-14 01:42:42 +00:00
Chris Lattner
34c9e1a6fb
Genericize support for calling functions a bit
...
Add external method support
llvm-svn: 528
2001-09-10 04:49:44 +00:00
Chris Lattner
9707ae0cac
iFix dependence order
...
llvm-svn: 517
2001-09-09 21:03:12 +00:00
Chris Lattner
82cfdefa2e
Remove extraneous space
...
llvm-svn: 509
2001-09-09 19:35:33 +00:00
Chris Lattner
5e9c4e67c2
Make use of the new TOOLNAME/USEDLIBS options provided in Makefile.common
...
llvm-svn: 501
2001-09-07 22:59:25 +00:00
Chris Lattner
6e3c622650
Remove old old file
...
llvm-svn: 497
2001-09-07 22:52:07 +00:00
Chris Lattner
f87b8ba9e3
Convert llc driver to standard tool format
...
llvm-svn: 496
2001-09-07 22:20:50 +00:00
Chris Lattner
bd7fcd6163
Uhm... that was really bad
...
llvm-svn: 493
2001-09-07 21:26:51 +00:00
Chris Lattner
df5b2e934f
Clean up driver
...
llvm-svn: 492
2001-09-07 21:26:31 +00:00
Chris Lattner
aaf1b240ff
Remove support for const pool merging, which is obsolete now.
...
llvm-svn: 471
2001-09-07 16:59:35 +00:00
Chris Lattner
79edfb1e82
Build lli first
...
llvm-svn: 469
2001-09-07 16:58:57 +00:00
Vikram S. Adve
c90d21f261
Makefile for tools/tests/
...
llvm-svn: 409
2001-08-28 23:28:25 +00:00
Vikram S. Adve
b61f869552
Driver to test IsPowerOf2. Could be extended for other library routines.
...
llvm-svn: 408
2001-08-28 23:28:10 +00:00
Vikram S. Adve
9a19bf6cc8
Changed link line.
...
llvm-svn: 405
2001-08-28 23:23:35 +00:00
Vikram S. Adve
35eed0ce61
Add calls to NormalizeMethod() and to ScheduleInstructionsWithSSA().
...
llvm-svn: 404
2001-08-28 23:23:14 +00:00
Chris Lattner
0a85e4845d
Lots of new functionality
...
llvm-svn: 372
2001-08-27 05:16:50 +00:00
Vikram S. Adve
8c449a314b
Add dependence to libvmcore.
...
llvm-svn: 370
2001-08-25 12:43:25 +00:00
Chris Lattner
e29ed4849f
Compile LLI
...
llvm-svn: 368
2001-08-23 17:09:06 +00:00
Chris Lattner
8e225d7a21
Initial checkin of interpreter
...
llvm-svn: 361
2001-08-23 17:05:04 +00:00
Chris Lattner
e61088e761
Add library dep
...
llvm-svn: 300
2001-07-25 22:48:43 +00:00
Chris Lattner
1a94273fc3
Parenthesize output for expranalyze so that pointer stuff being multiplied isn't confusing
...
llvm-svn: 299
2001-07-25 22:48:37 +00:00
Chris Lattner
0acf605cd9
Build as before dis
...
llvm-svn: 298
2001-07-25 22:48:09 +00:00
Chris Lattner
aad0f6afd0
Change option name slightly
...
llvm-svn: 287
2001-07-23 23:02:51 +00:00
Chris Lattner
d058d93a30
Use the new Alias command line option
...
llvm-svn: 284
2001-07-23 20:22:30 +00:00
Chris Lattner
3e365b974b
CommandLine library cleanup. No longer use getValue/setValue, instead, just treat the commandline
...
args as the objects they represent and the "right thing" will happen
llvm-svn: 283
2001-07-23 19:27:24 +00:00
Chris Lattner
f94c44bc70
-help is verbose enough that we don't need this anymore
...
llvm-svn: 281
2001-07-23 18:31:02 +00:00
Chris Lattner
ff6c44f04f
Moved inline/llvm/Tools/* to include/llvm/Support/*
...
llvm-svn: 279
2001-07-23 17:46:59 +00:00
Chris Lattner
d73669f4c6
Removal of the redundant CompileContext wrapper
...
llvm-svn: 274
2001-07-23 03:09:03 +00:00
Chris Lattner
90f8ecfda4
Verbosify descriptions
...
llvm-svn: 273
2001-07-23 02:54:25 +00:00
Chris Lattner
f42a7804c8
Large scale changes to implement new command line argument facility
...
llvm-svn: 272
2001-07-23 02:35:57 +00:00
Chris Lattner
c5758cb574
Privatize LLCOptions. It had no business being visible to the entire
...
program.
llvm-svn: 267
2001-07-22 04:40:02 +00:00
Chris Lattner
833a705036
Convert from using C style char*'s to strings.
...
Look ma, no strdups
llvm-svn: 265
2001-07-22 03:57:31 +00:00
Chris Lattner
3688fb97e2
Instructions for use
...
llvm-svn: 255
2001-07-21 21:05:39 +00:00
Chris Lattner
95de507872
Make sure we build all of the code!
...
llvm-svn: 254
2001-07-21 21:04:03 +00:00
Chris Lattner
f1a2e3b6bb
Renamed include/llvm/Codegen to include/llvm/CodeGen
...
llvm-svn: 253
2001-07-21 20:58:30 +00:00
Chris Lattner
303c1214a0
Make the makefile work
...
llvm-svn: 247
2001-07-21 19:31:40 +00:00
Chris Lattner
9416784407
Support changed expression api
...
llvm-svn: 242
2001-07-21 19:08:44 +00:00
Chris Lattner
d57dde0964
Autodep functionality broken. Remove so we get successful builds
...
llvm-svn: 239
2001-07-21 18:59:13 +00:00
Vikram S. Adve
b7ca711494
Driver and options for the llc compiler.
...
llvm-svn: 234
2001-07-21 12:42:29 +00:00
Chris Lattner
997db49baf
Add support to call LevelRaise
...
llvm-svn: 217
2001-07-20 19:16:47 +00:00
Chris Lattner
02097a9700
Update makefile for more accurate deps
...
Include support to print out Expression types
llvm-svn: 216
2001-07-20 19:16:29 +00:00
Chris Lattner
7069a38446
Fix clean target
...
llvm-svn: 203
2001-07-18 23:43:53 +00:00
Vikram S. Adve
deddb40e91
Reordered link line for correct static linking.
...
llvm-svn: 198
2001-07-15 21:13:29 +00:00
Chris Lattner
a1f8bdb501
Add better support for post dominator information.
...
Print method name for each analysis.
llvm-svn: 144
2001-07-06 16:59:10 +00:00
Chris Lattner
ed83549672
Initial checkin of analyze tool.
...
llvm-svn: 137
2001-07-03 15:30:38 +00:00
Chris Lattner
69e4c98a21
Build new analyze tool
...
llvm-svn: 136
2001-07-03 15:30:21 +00:00
Chris Lattner
6b0779699c
Include ADCE pass, rename include/Opt directory to llvm/Optimizations
...
Optimizations now in opt namespace.
Rename SCCP pass to DoSCCP
llvm-svn: 118
2001-06-30 06:38:31 +00:00
Chris Lattner
d616582a7a
Miscellaneous cleanups:
...
* Convert post to pre-increment for for loops
* Use generic programming more
* Use new Value::cast* instructions
* Use new Module, Method, & BasicBlock forwarding methods
* Use new facilities in STLExtras.h
* Use new Instruction::isPHINode() method
llvm-svn: 96
2001-06-27 23:41:11 +00:00
Chris Lattner
9e4c6fe810
Add command line arguments for Constant Pool Merging & Sparse Conditional Constant Prop
...
llvm-svn: 94
2001-06-27 23:37:58 +00:00
Chris Lattner
3223c77455
Add stub for induction variable code
...
llvm-svn: 38
2001-06-20 19:27:34 +00:00
Chris Lattner
6158b2b9f9
Removed silly test code
...
llvm-svn: 31
2001-06-13 19:55:50 +00:00
Chris Lattner
b22f404e1b
Added options to print out basic blocks in a variety of different orderings
...
as a testcase for cfg iterators.
llvm-svn: 30
2001-06-13 19:55:41 +00:00
Chris Lattner
f6f820bfac
Added a stupid testcase for iterators.
...
llvm-svn: 17
2001-06-08 00:35:25 +00:00
Chris Lattner
e6b9b382e2
Initial revision
...
llvm-svn: 2
2001-06-06 20:29:01 +00:00