Commit Graph

104 Commits

Author SHA1 Message Date
Chris Lattner
2b2e5b360e Initialize map for purify
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1049 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-30 20:28:46 +00:00
Chris Lattner
fe83ab527d I screwed up the macros, so of course strtol didn't work. *sigh*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1035 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-29 17:47:10 +00:00
Chris Lattner
aa7420b35b Oops, accidentally broke reading from stdin when doing command line arguments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1026 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-29 14:00:48 +00:00
Chris Lattner
43e3f7c962 Implement a -trace command line option and a trace option in the interpreter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@989 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-27 08:43:52 +00:00
Chris Lattner
c259316730 * 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@988 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-27 08:28:11 +00:00
Chris Lattner
204eec3f57 Provide argv for commands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@987 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-27 05:54:31 +00:00
Chris Lattner
e43db88b2d * Implement exit() builtin function
* Implement linked in runtime library with puts(char*) in it
* implement builtin putchar(int) function


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@985 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-27 04:15:57 +00:00
Chris Lattner
4a82271451 Add support for building a runtime library for LLI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@983 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-24 19:52:41 +00:00
Chris Lattner
65be321fdb Implement a -L command line argument to specify a search path. Implement minimal ar compatibility stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@975 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-24 06:23:00 +00:00
Chris Lattner
d6b65255fe 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@970 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-24 01:15:12 +00:00
Chris Lattner
b81adf14fb Add '-v' option to enable verbose output from the linker
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@966 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-23 20:44:55 +00:00
Chris Lattner
ffa6f9ca06 Fix to reference the right header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@915 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-19 15:39:14 +00:00
Chris Lattner
f8f2afb8cc Enhancements to pass argc & argv to main if required
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@909 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-18 21:55:32 +00:00
Chris Lattner
d7477ee9d9 Remove unneccesary retcode var
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@905 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-18 20:33:21 +00:00
Chris Lattner
2197d21c3b Refactor Assembly/Bytecode writer code into Assembly & bytecode libraries
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@904 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-18 20:32:07 +00:00
Chris Lattner
9effd69ca2 Expose more xforms to the opt utility
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@900 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-18 20:06:45 +00:00
Chris Lattner
c2c9dd1718 Bytecode writer is yanked out of Module printer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@899 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-18 20:06:31 +00:00
Vikram S. Adve
712ac2b951 Move malloc/free lowering after tracing until lli supports
calls to external malloc/free functions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@893 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-18 18:20:20 +00:00
Chris Lattner
c9a1de6d1b Only output code if file open is successful
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@890 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-18 17:07:22 +00:00
Vikram S. Adve
79a334968c 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@889 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-18 13:51:20 +00:00
Chris Lattner
73e11d77aa Use the standard header not the old one
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@886 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-18 06:13:08 +00:00
Chris Lattner
0eafc31684 Add support to insert trace code as an "optimization"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@884 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-18 06:05:15 +00:00
Chris Lattner
685639df42 Convert to new simpler, more powerful pass structure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@882 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-18 05:28:44 +00:00
Chris Lattner
6db0f4795c * Passes return true if they change something, not if they fail
* Convert opt to use Pass's and convert optimizations to pass structure


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@870 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-18 01:31:43 +00:00
Chris Lattner
05e5e070ee Passes return true if they change something, not if they fail
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@869 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-18 01:31:22 +00:00
Chris Lattner
2db4b72017 ConcretePass should not be a templated class!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@838 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-15 17:47:13 +00:00
Chris Lattner
25c1229930 Minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@837 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-15 17:41:24 +00:00
Chris Lattner
3524fc2197 Use the new Pass infrastructure to clean up llc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@835 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-15 17:30:47 +00:00
Chris Lattner
1f4b6eb79f Add library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@827 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-15 15:55:15 +00:00
Chris Lattner
90c5b3d753 Minor code cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@825 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-15 13:47:13 +00:00
Chris Lattner
2e42d3a306 Implement global variables. Struct and Pointer initializers are not implemented yet though
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@818 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-15 05:51:48 +00:00
Vikram S. Adve
2f64f9f264 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@811 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-14 23:29:28 +00:00
Chris Lattner
164cb69e04 Add a new -d argument to dump the internal rep as assembly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@804 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-14 23:23:33 +00:00
Chris Lattner
b27c9e72d1 MethodTypes take an explicit isVarArg argument
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@782 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-13 07:07:28 +00:00
Chris Lattner
1d7b50b4f8 Fix comment flyer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@781 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-13 07:06:57 +00:00
Chris Lattner
075a0b771e Add new linker
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@780 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-13 07:06:23 +00:00
Chris Lattner
38c13463f6 Build the new linker
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@779 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-13 07:06:06 +00:00
Vikram S. Adve
7b70f3f086 Repeat some libs due to circular dependences between Sparc and other
code gen libraries.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@722 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-10 20:58:57 +00:00
Chris Lattner
b79757c621 Add hack to get rid of malloc & free instructions for code generation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@713 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-04 01:40:53 +00:00
Chris Lattner
3ff4387113 Pull iterators out of CFG.h and CFGdecls and put them in Support directory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@664 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-28 22:56:31 +00:00
Chris Lattner
c4199ecf6e Add support to print a call graph, and also add support for module level interprocedural analyses
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@659 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-28 00:07:36 +00:00
Chris Lattner
78f7e1a9cd Add proper support to send output to the right place
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@649 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-19 16:52:09 +00:00
Chris Lattner
565046714e Emit assembly language from the target...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@640 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-19 13:56:47 +00:00
Chris Lattner
da784ee81f C++ gives us auto_ptr's, so we might as well use them. :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@629 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-18 17:04:18 +00:00
Vikram S. Adve
805eb96727 Minor changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@622 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-18 13:10:45 +00:00
Ruchira Sasanka
a5c5abc81b Added regalloc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@584 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-15 00:28:37 +00:00
Chris Lattner
43c6dfea25 Oops, accidentally checked my debugging makefile
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@583 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-14 23:21:08 +00:00
Chris Lattner
b26bcc5087 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@566 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-14 05:34:53 +00:00
Chris Lattner
f6e0e28135 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@565 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-14 04:32:55 +00:00
Chris Lattner
0e6530ee1b 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@559 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-14 03:37:52 +00:00