Commit Graph

234 Commits

Author SHA1 Message Date
Chris Lattner 0e66f3ec92 Remove runtime library in favor of users linking against real libraries.
llvm-svn: 1853
2002-03-11 17:57:13 +00:00
Chris Lattner 6f0d4531ef * Implement linking to libraries
* Pass arguments to program through shell script

llvm-svn: 1851
2002-03-11 17:49:53 +00:00
Chris Lattner 46519418b0 Pull interprocedural analyses out of Analysis library into their own lib
llvm-svn: 1827
2002-03-06 18:44:29 +00:00
Chris Lattner b5ccfe0e32 Don't forget to build gccld!
llvm-svn: 1826
2002-03-06 18:05:02 +00:00
Chris Lattner 2498a1763a 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 2a0c0c46a2 Pull callgraph out of Cfg namespace
llvm-svn: 1822
2002-03-06 17:40:37 +00:00
Chris Lattner 8fdf51f9c0 Change to use new pass accessor functions
llvm-svn: 1817
2002-02-26 21:47:29 +00:00
Chris Lattner 04805fa29c 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 fc2ab9e216 * 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 d209550828 Move ProfilePaths class into ProfilePaths library, only expose a creation function
llvm-svn: 1812
2002-02-26 20:04:59 +00:00
Anand Shukla d7291473cf Includes -paths option to trace paths in the program
llvm-svn: 1811
2002-02-26 19:57:59 +00:00
Anand Shukla 4882708cc9 Link in the PathProfiles library
llvm-svn: 1800
2002-02-26 18:29:20 +00:00
Chris Lattner 5b46fa248f Remove hack. This is better fixed in Makefile.common
llvm-svn: 1795
2002-02-24 23:25:46 +00:00
Chris Lattner fcd31f7534 Cleanup to build with GCC 3.0.4
llvm-svn: 1794
2002-02-24 23:25:24 +00:00
Chris Lattner 5079e2ea56 Build with newer compiler, with same bug
llvm-svn: 1793
2002-02-24 23:11:05 +00:00
Chris Lattner e48f0452fe 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 c141abf8f2 Genericize the ReversePostOrderIterator.
llvm-svn: 1785
2002-02-24 21:48:59 +00:00
Chris Lattner f608d7f4f4 * 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 60a6591d83 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 e5e23525ec Enable register promotion pass
llvm-svn: 1740
2002-02-12 17:17:33 +00:00
Chris Lattner a5e627852d Trim down makefile, again.
llvm-svn: 1691
2002-02-04 17:37:25 +00:00
Chris Lattner 47b65a1025 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 f728637f2e * 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 74f0a5b35e 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 78f1087b01 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 4db2f2cbce Add mergereturn pass
llvm-svn: 1629
2002-02-01 04:54:11 +00:00
Chris Lattner d9d0df0281 Add dependency
llvm-svn: 1620
2002-01-31 18:33:23 +00:00
Chris Lattner 5c29968725 Fix dependency problem
llvm-svn: 1619
2002-01-31 18:33:09 +00:00
Chris Lattner 0716e5f334 Resolve deps
llvm-svn: 1615
2002-01-31 15:52:41 +00:00
Chris Lattner ecd3fae58d Resolve dependencies
llvm-svn: 1614
2002-01-31 15:43:11 +00:00
Chris Lattner c90d6ba9a2 Convert to use new Pass framework...
llvm-svn: 1610
2002-01-31 00:47:12 +00:00
Chris Lattner 7139f2859b 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 ad50ec2f37 PassManager is now in it's own header file
llvm-svn: 1608
2002-01-31 00:46:22 +00:00
Chris Lattner 3d61db42bb Convert analyze over to use new pass framework for its analyses
llvm-svn: 1607
2002-01-31 00:46:09 +00:00
Chris Lattner 30b983ab47 Accept, but ignore -lfoo options.
llvm-svn: 1585
2002-01-25 03:59:39 +00:00
Chris Lattner 5ff2e0510f Initial Checkin of gccld
llvm-svn: 1578
2002-01-24 19:12:12 +00:00
Chris Lattner 0e11e54d20 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 044b5d90d8 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 3bb02e4797 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 cad856b6ed Try again, now it works right
llvm-svn: 1526
2002-01-22 02:28:50 +00:00
Chris Lattner 3787ee6be6 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 4267cedfa5 Fix ordering dependency problem
llvm-svn: 1524
2002-01-22 01:03:39 +00:00
Chris Lattner 4f0f09757d 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 ee965abc36 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 4f32cf118a Chuck fixed the GCC problems so this hack is now unneccesary
llvm-svn: 1519
2002-01-21 23:17:07 +00:00
Chris Lattner 4a75c2b248 Eliminate opt library
llvm-svn: 1516
2002-01-21 23:13:46 +00:00
Chris Lattner c940c536ab 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 0686e435d1 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 7f74a56e24 Changes to build successfully with GCC 3.02
llvm-svn: 1503
2002-01-20 22:54:45 +00:00
Chris Lattner 4f106568d4 Add instruction combining pass
Rename -mergecons to -constmerge

llvm-svn: 1478
2001-12-14 16:50:35 +00:00
Chris Lattner 05377bbe3f Add more passes to run after raising
llvm-svn: 1476
2001-12-14 16:48:30 +00:00
Chris Lattner 403ff802a3 Build runtime library with local GCCAS
llvm-svn: 1447
2001-12-13 00:44:23 +00:00
Chris Lattner fbf1106e2c Implement strlen strdup strcmp
llvm-svn: 1446
2001-12-13 00:44:09 +00:00
Chris Lattner 5053ba9749 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 a57615faaa 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 28fef95650 Remove unnecesary namespace impot
llvm-svn: 1419
2001-12-05 06:35:30 +00:00
Chris Lattner 0f5a8d4749 Simplify induction variables before 'raising' the representation
llvm-svn: 1418
2001-12-05 06:34:58 +00:00
Chris Lattner 27ace6461f Use new induction variable simplification code with -indvars option
llvm-svn: 1410
2001-12-04 04:32:04 +00:00
Chris Lattner 66d9ceaaba Induction variables must be phi nodes
llvm-svn: 1402
2001-12-03 17:27:42 +00:00
Chris Lattner 5de2204fe8 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 5af7da01b0 -raise includes constprop and dce
llvm-svn: 1397
2001-11-26 19:37:43 +00:00
Chris Lattner ba5220d4c4 * 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 b9d5c0ebdd Link to ipo library
llvm-svn: 1394
2001-11-26 19:21:02 +00:00
Chris Lattner 921875394f Fix problem where lli < foo.bc would have argc = 0
llvm-svn: 1393
2001-11-26 19:20:38 +00:00
Chris Lattner 3d9510ccc8 Add support to enable -lfoo to be processed correctly
llvm-svn: 1390
2001-11-26 19:18:30 +00:00
Chris Lattner b89a7e72fb Add hooks to print natural loop information and induction variables
llvm-svn: 1389
2001-11-26 19:18:11 +00:00
Chris Lattner bf3bfebb7b Change swapstructs itf
Add nasty hack to be removed later

llvm-svn: 1356
2001-11-26 18:18:53 +00:00
Chris Lattner 638969c6de Run constprop before -raise
llvm-svn: 1354
2001-11-26 18:16:07 +00:00
Chris Lattner afea660cb5 Fix link prob
llvm-svn: 1297
2001-11-14 11:03:17 +00:00
Chris Lattner fc92c5fa1a Add hooks to call the new swap structcontents pass
llvm-svn: 1243
2001-11-10 07:16:10 +00:00
Chris Lattner dcad3cc848 add Yet Another Instance of a Static Library
llvm-svn: 1242
2001-11-10 07:15:53 +00:00
Chris Lattner 8657606b6e Add hooks for the FindUsedTypes pass
llvm-svn: 1233
2001-11-09 05:27:34 +00:00
Chris Lattner c1c54a2a92 Add analysis pass.
llvm-svn: 1182
2001-11-07 21:16:29 +00:00
Chris Lattner e326957333 Move the Raise xform from opt to transforms
llvm-svn: 1072
2001-11-01 02:41:09 +00:00
Chris Lattner 9fb50fe167 crunch the output of GCC a bit to make it nicer
llvm-svn: 1068
2001-10-31 06:36:48 +00:00
Chris Lattner ae6de303fc Fix dumb copy and paste typos
llvm-svn: 1063
2001-10-31 04:33:33 +00:00
Chris Lattner 7a2d677332 Add hook for GCC cleanup pass
llvm-svn: 1060
2001-10-31 04:29:44 +00:00
Chris Lattner 129aac7468 Build new gccas tool
llvm-svn: 1059
2001-10-31 04:29:30 +00:00
Chris Lattner 1a30617664 Initial checkin of GCCAS
llvm-svn: 1058
2001-10-31 04:28:11 +00:00
Chris Lattner 0d5c295536 Implement memset memcpy, calloc
llvm-svn: 1055
2001-10-30 22:37:01 +00:00
Chris Lattner 3f741a560a Initialize map for purify
llvm-svn: 1049
2001-10-30 20:28:46 +00:00
Chris Lattner eec6046adf 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 c6503e8a2f Oops, accidentally broke reading from stdin when doing command line arguments
llvm-svn: 1026
2001-10-29 14:00:48 +00:00
Chris Lattner 009f8108bc 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 0b00b31c78 * 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 6642eec003 Provide argv for commands
llvm-svn: 987
2001-10-27 05:54:31 +00:00
Chris Lattner 15157b88e9 * 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 f9e623e1f9 Add support for building a runtime library for LLI
llvm-svn: 983
2001-10-24 19:52:41 +00:00
Chris Lattner ae31f5b65f 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 daebd7508d 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 ebaa78852c Add '-v' option to enable verbose output from the linker
llvm-svn: 966
2001-10-23 20:44:55 +00:00
Chris Lattner 3923967f1e Fix to reference the right header
llvm-svn: 915
2001-10-19 15:39:14 +00:00
Chris Lattner d299dbac0e Enhancements to pass argc & argv to main if required
llvm-svn: 909
2001-10-18 21:55:32 +00:00
Chris Lattner 1a9680f708 Remove unneccesary retcode var
llvm-svn: 905
2001-10-18 20:33:21 +00:00
Chris Lattner 95f87b4e5d Refactor Assembly/Bytecode writer code into Assembly & bytecode libraries
llvm-svn: 904
2001-10-18 20:32:07 +00:00
Chris Lattner 75c9f9f958 Expose more xforms to the opt utility
llvm-svn: 900
2001-10-18 20:06:45 +00:00
Chris Lattner b9acf7e49e Bytecode writer is yanked out of Module printer
llvm-svn: 899
2001-10-18 20:06:31 +00:00
Vikram S. Adve 71f16ecf13 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 8c8b9d10c0 Only output code if file open is successful
llvm-svn: 890
2001-10-18 17:07:22 +00:00
Vikram S. Adve b2ac1e76b4 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