Commit Graph

6102 Commits

Author SHA1 Message Date
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
Chris Lattner ed8947fb11 Use the standard header not the old one
llvm-svn: 886
2001-10-18 06:13:08 +00:00
Chris Lattner 6fc7ff4db8 Add support to insert trace code as an "optimization"
llvm-svn: 884
2001-10-18 06:05:15 +00:00
Chris Lattner d054fae5f1 Convert to new simpler, more powerful pass structure
llvm-svn: 882
2001-10-18 05:28:44 +00:00
Chris Lattner 5b6026a13a * 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 2fa0dabf9f Passes return true if they change something, not if they fail
llvm-svn: 869
2001-10-18 01:31:22 +00:00
Chris Lattner 8761d50df7 ConcretePass should not be a templated class!
llvm-svn: 838
2001-10-15 17:47:13 +00:00
Chris Lattner d0c15405af Minor cleanups
llvm-svn: 837
2001-10-15 17:41:24 +00:00
Chris Lattner 97fd6c44db Use the new Pass infrastructure to clean up llc
llvm-svn: 835
2001-10-15 17:30:47 +00:00
Chris Lattner f112d52f2c Add library
llvm-svn: 827
2001-10-15 15:55:15 +00:00
Chris Lattner 41c4ddad51 Minor code cleanups
llvm-svn: 825
2001-10-15 13:47:13 +00:00
Chris Lattner c62e2e5bf7 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 2f084b2c73 *** empty log message ***
llvm-svn: 811
2001-10-14 23:29:28 +00:00
Chris Lattner d631165a45 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 a8f29f8a80 MethodTypes take an explicit isVarArg argument
llvm-svn: 782
2001-10-13 07:07:28 +00:00
Chris Lattner 6d56c6b5b6 Fix comment flyer
llvm-svn: 781
2001-10-13 07:06:57 +00:00
Chris Lattner 9d810e0494 Add new linker
llvm-svn: 780
2001-10-13 07:06:23 +00:00
Chris Lattner 5de85fcb7f Build the new linker
llvm-svn: 779
2001-10-13 07:06:06 +00:00
Vikram S. Adve c524e1c714 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 b27d474201 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 bb09a10929 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 0755deabb5 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 46f1b61d98 Add proper support to send output to the right place
llvm-svn: 649
2001-09-19 16:52:09 +00:00
Chris Lattner 15d8418323 Emit assembly language from the target...
llvm-svn: 640
2001-09-19 13:56:47 +00:00
Chris Lattner 6c2c87099a 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 9d40935697 Minor changes.
llvm-svn: 622
2001-09-18 13:10:45 +00:00
Ruchira Sasanka 7e81e7bf77 Added regalloc
llvm-svn: 584
2001-09-15 00:28:37 +00:00
Chris Lattner 8be8fb9625 Oops, accidentally checked my debugging makefile
llvm-svn: 583
2001-09-14 23:21:08 +00:00
Chris Lattner 22a6a90511 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 f8464e4b8d 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 0a823a062c 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 2a35abb142 Export the instruction forest support from the analysis library
llvm-svn: 556
2001-09-14 01:42:42 +00:00
Chris Lattner 676d4118cf Genericize support for calling functions a bit
Add external method support

llvm-svn: 528
2001-09-10 04:49:44 +00:00
Chris Lattner 0223c60bf0 iFix dependence order
llvm-svn: 517
2001-09-09 21:03:12 +00:00
Chris Lattner d9c5134806 Remove extraneous space
llvm-svn: 509
2001-09-09 19:35:33 +00:00
Chris Lattner 9373bd69b7 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 a18d083dcc Remove old old file
llvm-svn: 497
2001-09-07 22:52:07 +00:00
Chris Lattner 2cf137b57a Convert llc driver to standard tool format
llvm-svn: 496
2001-09-07 22:20:50 +00:00
Chris Lattner 5e65e4212b Uhm... that was really bad
llvm-svn: 493
2001-09-07 21:26:51 +00:00
Chris Lattner ed22606da2 Clean up driver
llvm-svn: 492
2001-09-07 21:26:31 +00:00
Chris Lattner c3f679f2fe Remove support for const pool merging, which is obsolete now.
llvm-svn: 471
2001-09-07 16:59:35 +00:00
Chris Lattner 754d3cf7e3 Build lli first
llvm-svn: 469
2001-09-07 16:58:57 +00:00
Vikram S. Adve 4968d07d19 Makefile for tools/tests/
llvm-svn: 409
2001-08-28 23:28:25 +00:00
Vikram S. Adve 8ff24b26c9 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 df3c54f41d Changed link line.
llvm-svn: 405
2001-08-28 23:23:35 +00:00
Vikram S. Adve 799aed0af3 Add calls to NormalizeMethod() and to ScheduleInstructionsWithSSA().
llvm-svn: 404
2001-08-28 23:23:14 +00:00
Chris Lattner 2c1a98ef08 Lots of new functionality
llvm-svn: 372
2001-08-27 05:16:50 +00:00
Vikram S. Adve e3590a93e9 Add dependence to libvmcore.
llvm-svn: 370
2001-08-25 12:43:25 +00:00
Chris Lattner addc6258cd Compile LLI
llvm-svn: 368
2001-08-23 17:09:06 +00:00
Chris Lattner d7ff578767 Initial checkin of interpreter
llvm-svn: 361
2001-08-23 17:05:04 +00:00
Chris Lattner d642454bba Add library dep
llvm-svn: 300
2001-07-25 22:48:43 +00:00
Chris Lattner 2d88a8ee37 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 1ca60f71f0 Build as before dis
llvm-svn: 298
2001-07-25 22:48:09 +00:00
Chris Lattner 3dfcf026f0 Change option name slightly
llvm-svn: 287
2001-07-23 23:02:51 +00:00
Chris Lattner d5c3133364 Use the new Alias command line option
llvm-svn: 284
2001-07-23 20:22:30 +00:00
Chris Lattner ab0cc40796 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 a6b2ddeb82 -help is verbose enough that we don't need this anymore
llvm-svn: 281
2001-07-23 18:31:02 +00:00
Chris Lattner e2472bbf6c Moved inline/llvm/Tools/* to include/llvm/Support/*
llvm-svn: 279
2001-07-23 17:46:59 +00:00
Chris Lattner d8f1cc98e8 Removal of the redundant CompileContext wrapper
llvm-svn: 274
2001-07-23 03:09:03 +00:00
Chris Lattner 8767b618ef Verbosify descriptions
llvm-svn: 273
2001-07-23 02:54:25 +00:00
Chris Lattner 0af2464a78 Large scale changes to implement new command line argument facility
llvm-svn: 272
2001-07-23 02:35:57 +00:00
Chris Lattner 9c0f8f24e0 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 5f4b44652f 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 388c608cb9 Instructions for use
llvm-svn: 255
2001-07-21 21:05:39 +00:00
Chris Lattner e696d62ce3 Make sure we build all of the code!
llvm-svn: 254
2001-07-21 21:04:03 +00:00
Chris Lattner dd511760d9 Renamed include/llvm/Codegen to include/llvm/CodeGen
llvm-svn: 253
2001-07-21 20:58:30 +00:00
Chris Lattner 897e02b2c0 Make the makefile work
llvm-svn: 247
2001-07-21 19:31:40 +00:00
Chris Lattner e850a7920e Support changed expression api
llvm-svn: 242
2001-07-21 19:08:44 +00:00
Chris Lattner 24a2d2b7db Autodep functionality broken. Remove so we get successful builds
llvm-svn: 239
2001-07-21 18:59:13 +00:00
Vikram S. Adve 2d94a344f0 Driver and options for the llc compiler.
llvm-svn: 234
2001-07-21 12:42:29 +00:00
Chris Lattner 05132dacd0 Add support to call LevelRaise
llvm-svn: 217
2001-07-20 19:16:47 +00:00
Chris Lattner e49d242603 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 4efb8afd9b Fix clean target
llvm-svn: 203
2001-07-18 23:43:53 +00:00
Vikram S. Adve 868a2aeccc Reordered link line for correct static linking.
llvm-svn: 198
2001-07-15 21:13:29 +00:00
Chris Lattner e166cc8069 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 c002347cf8 Initial checkin of analyze tool.
llvm-svn: 137
2001-07-03 15:30:38 +00:00
Chris Lattner f146536edd Build new analyze tool
llvm-svn: 136
2001-07-03 15:30:21 +00:00
Chris Lattner 57f61a32b0 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 4cee8d8ffb 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 bef00adb40 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 ac6d4fd1b1 Add stub for induction variable code
llvm-svn: 38
2001-06-20 19:27:34 +00:00
Chris Lattner 03d5267ba1 Removed silly test code
llvm-svn: 31
2001-06-13 19:55:50 +00:00
Chris Lattner f284ac55f6 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 4ddc451fb3 Added a stupid testcase for iterators.
llvm-svn: 17
2001-06-08 00:35:25 +00:00
Chris Lattner 2f7c963559 Initial revision
llvm-svn: 2
2001-06-06 20:29:01 +00:00