Commit Graph

138 Commits

Author SHA1 Message Date
Chris Lattner
04c85dcad8 Rename SwapStructureContents -> IPO/SimpleStructMutation
Move MutateStructTypes.(cpp|h) -> IPO/MutateStructTypes.(cpp|h)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1510 91177308-0d34-0410-b5e6-96231b3b80d8
2002-01-21 07:52:35 +00:00
Chris Lattner
f4de63f65f 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1507 91177308-0d34-0410-b5e6-96231b3b80d8
2002-01-21 07:31:50 +00:00
Chris Lattner
697954c15d Changes to build successfully with GCC 3.02
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1503 91177308-0d34-0410-b5e6-96231b3b80d8
2002-01-20 22:54:45 +00:00
Chris Lattner
528e8b58a5 Add instruction combining pass
Rename -mergecons to -constmerge


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1478 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-14 16:50:35 +00:00
Chris Lattner
d584dcc6ef Add more passes to run after raising
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1476 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-14 16:48:30 +00:00
Chris Lattner
e20bcd81eb Build runtime library with local GCCAS
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1447 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-13 00:44:23 +00:00
Chris Lattner
75ad704490 Implement strlen strdup strcmp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1446 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-13 00:44:09 +00:00
Chris Lattner
952d365a3a Tell the user if a file is corrupt or not... not that the file cannot be
found.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1433 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-08 20:31:32 +00:00
Chris Lattner
0d7a474463 Run DCE before cleanupGCCoutput which will cause some dead types (like FILE) to be removed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1429 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-07 04:25:36 +00:00
Chris Lattner
e04a967e7e Remove unnecesary namespace impot
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1419 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-05 06:35:30 +00:00
Chris Lattner
9c6f2ac665 Simplify induction variables before 'raising' the representation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1418 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-05 06:34:58 +00:00
Chris Lattner
fe196cf98b Use new induction variable simplification code with -indvars option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1410 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-04 04:32:04 +00:00
Chris Lattner
df89f6efbc Induction variables must be phi nodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1402 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-03 17:27:42 +00:00
Chris Lattner
cee8f9ae67 Create a new #include "Support/..." directory structure to move things
from "llvm/Support/..." that are not llvm dependant.

Move files and fix #includes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1400 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-27 00:03:19 +00:00
Chris Lattner
2409ddb5b2 -raise includes constprop and dce
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1397 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-26 19:37:43 +00:00
Chris Lattner
63202328d3 * Add hooks to globaldce
* Fix ugly hacks by implementing IPOs correctly
* Use an auto_ptr to manage the module lifecycle


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1395 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-26 19:22:39 +00:00
Chris Lattner
aa4730d9c3 Link to ipo library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1394 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-26 19:21:02 +00:00
Chris Lattner
aca8e90cd9 Fix problem where lli < foo.bc would have argc = 0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1393 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-26 19:20:38 +00:00
Chris Lattner
de3b862a18 Add support to enable -lfoo to be processed correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1390 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-26 19:18:30 +00:00
Chris Lattner
75deac6b12 Add hooks to print natural loop information and induction variables
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1389 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-26 19:18:11 +00:00
Chris Lattner
ee6826b5e3 Change swapstructs itf
Add nasty hack to be removed later


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1356 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-26 18:18:53 +00:00
Chris Lattner
a8b3015d40 Run constprop before -raise
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1354 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-26 18:16:07 +00:00
Chris Lattner
c2ae4f6d3b Fix link prob
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1297 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-14 11:03:17 +00:00
Chris Lattner
854acb996e Add hooks to call the new swap structcontents pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1243 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-10 07:16:10 +00:00
Chris Lattner
e764f60710 add Yet Another Instance of a Static Library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1242 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-10 07:15:53 +00:00
Chris Lattner
9f8ae2b8cc Add hooks for the FindUsedTypes pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1233 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-09 05:27:34 +00:00
Chris Lattner
483c3ee18e Add analysis pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1182 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-07 21:16:29 +00:00
Chris Lattner
068f487ee5 Move the Raise xform from opt to transforms
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1072 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-01 02:41:09 +00:00
Chris Lattner
dbe0514e12 crunch the output of GCC a bit to make it nicer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1068 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-31 06:36:48 +00:00
Chris Lattner
11c862cf46 Fix dumb copy and paste typos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1063 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-31 04:33:33 +00:00
Chris Lattner
e166fe1910 Add hook for GCC cleanup pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1060 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-31 04:29:44 +00:00
Chris Lattner
f83bcfcd00 Build new gccas tool
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1059 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-31 04:29:30 +00:00
Chris Lattner
ecbde333a2 Initial checkin of GCCAS
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1058 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-31 04:28:11 +00:00
Chris Lattner
53b20c34dc Implement memset memcpy, calloc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1055 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-30 22:37:01 +00:00
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