Commit Graph

2565 Commits

Author SHA1 Message Date
Chris Lattner
579d91411a Initial checkin of the "extract" utility
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2716 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-22 20:27:00 +00:00
Chris Lattner
91c93376ae Add more testcases for ADCE
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2715 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-22 19:22:45 +00:00
Chris Lattner
b3abf9d0d8 Convert transforms over to standardize debugging output on -debug option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2714 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-22 17:27:12 +00:00
Chris Lattner
f016ea4ff8 Use the new DEBUG(x) macro to allow debugging code to be enabled on the commandline
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2713 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-22 17:17:27 +00:00
Chris Lattner
70e60cbd4d Move debug options out of header files so that the header does not have
to #include CommandLine.h.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2712 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-22 17:08:27 +00:00
Chris Lattner
59dcbf9c03 Move the DEBUG_LV option out of the public header file into a private header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2711 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-22 17:07:26 +00:00
Chris Lattner
e87adaac31 Avoid #including CommandLine.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2710 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-22 17:06:56 +00:00
Chris Lattner
4435ac0097 Implement a new command line option, -debug, which is meant to unify all of
the random debugging macros scattered throughout llvm.

The new DEBUG(x) macro should be used instead of special purpose debug macros.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2709 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-22 17:06:20 +00:00
Chris Lattner
71fb71628a Add ability to update existing variables with values read from the command line
to certain classes.  This is nice because it means that in header files we can
just declare a value, and still have that value be set based on a command-line
argument.  The difference is now that the #include of CommandLine.h does not
need to go into the header file as well.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2708 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-22 17:03:05 +00:00
Chris Lattner
7f9412b50d Fix bug: test/Regression/Transforms/SCCP/2002-05-21-InvalidSimplify.ll
Improperly handling edges... by not marking them alive properly


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2707 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-22 16:07:20 +00:00
Chris Lattner
bec7dcad14 Must run cfgsimplify to eliminate dead blocks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2706 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-22 15:49:14 +00:00
Chris Lattner
53eaf1e431 New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2705 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-21 22:23:38 +00:00
Chris Lattner
594b9fadb8 * Fix typeo
* Provide a #include of <malloc.h> so that the sun C compiler does not
  miscompile malloc function calls


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2702 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-21 21:10:04 +00:00
Chris Lattner
01d1ee3a4c Add implementation of SimplifyCFG
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2701 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-21 20:50:24 +00:00
Chris Lattner
573527bd5d New CFG Simplification pass: removed from the old DCE pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2700 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-21 20:49:37 +00:00
Chris Lattner
814908b33c Expose cfg simplification pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2699 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-21 20:05:16 +00:00
Chris Lattner
e3a20e733e Simplify CFG after code generation is done
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2698 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-21 20:05:08 +00:00
Chris Lattner
76ae3445f8 Simplify interface to ConstantFoldTerminator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2697 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-21 20:04:50 +00:00
Chris Lattner
b8bcb086f7 Expose CFG simplification pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2696 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-21 20:04:15 +00:00
Chris Lattner
069667c8bb New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2695 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-21 20:03:42 +00:00
Chris Lattner
87a09b10f8 Fix bug: test/Regression/Transforms/CFGSimplify/2002-05-21-PHIElimination.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2694 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-21 19:52:49 +00:00
Chris Lattner
4a4e39d647 Update run line
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2693 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-21 19:33:17 +00:00
Chris Lattner
2f3ee642a8 This testcase was very broken! The block could not be merged because then
there would be a broken PHI node


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2692 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-21 19:32:58 +00:00
Chris Lattner
58e06e7393 New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2691 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-21 19:22:10 +00:00
Chris Lattner
963b70bbf8 Fix bug: test/Regression/CBackend/2002-05-21-MissingReturn.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2690 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-21 18:05:19 +00:00
Chris Lattner
94c75eccf1 New TEstcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2689 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-21 18:04:58 +00:00
Mehwish Nagda
8532fb0d13 Fixed the makefile to not die when compiling a new, empty, source directory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2688 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-21 15:58:24 +00:00
Chris Lattner
1458cef6b8 Remove unneccesary path from link line now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2679 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-20 21:47:40 +00:00
Chris Lattner
c5208d4222 Allow libraries to specify other libraries to link to
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2678 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-20 21:45:44 +00:00
Chris Lattner
2e0769ea16 * Change commandline options a bit to be nicer
* Insert accurate prototypes for functions
* Insert casts to use accurate prototypes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2677 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-20 21:43:59 +00:00
Chris Lattner
ad86b74baf Hide debugging options
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2676 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-20 21:39:10 +00:00
Chris Lattner
39fd659d68 Fix tracing code support to link in the tracing routines if neccesary.
This is required because trace code can insert calls to functions that
are (now) in an LLVM library, not a native library.

This change makes it easier to use the tracing code because the native
link options don't have to change, and it fits in a lot better with the
LLVM model.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2675 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-20 21:20:08 +00:00
Chris Lattner
1ee34a5a5b Remove explicit support for tracing code. It should be linked into the
executable just like everything else.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2674 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-20 21:17:16 +00:00
Chris Lattner
0fe380c683 Remove tracing code hack
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2673 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-20 21:16:46 +00:00
Chris Lattner
348d165d9b Tracelib is now an LLVM library just like all other libraries in this
directory.

If the test code needs to be resurrected in the future, it should be moved
into the test/Programs directory, linking with tracelib.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2672 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-20 21:16:19 +00:00
Chris Lattner
2bb5c7f6bf * If hashing a pointer, cast it to a 64 bit number so gcc doesn't warn
* Don't put extra stuff after #endif


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2671 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-20 21:15:30 +00:00
Chris Lattner
7add8bdc08 New testcase for bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2670 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-20 20:48:24 +00:00
Chris Lattner
618b4a11bb Fix bug: test/Regression/Transforms/SCCP/2002-05-20-MissedIncomingValue.ll
That was causing a miscompilation of strtol/atoi plus others


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2669 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-20 20:48:03 +00:00
Chris Lattner
a7cc6dd494 Use literal newline instead of endl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2668 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-20 19:49:24 +00:00
Chris Lattner
871c24f6d0 Drop something that link will never support, use gccld instead
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2667 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-20 19:48:55 +00:00
Chris Lattner
cfb81918ed Implement the printf function, used by assert
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2666 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-20 19:11:23 +00:00
Chris Lattner
5245f853c5 Don't lose namespace qualifications on previous patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2664 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-20 17:38:26 +00:00
Chris Lattner
36346c7a1e Rename IsPowerOf2 to isPowerOf2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2663 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-19 21:20:19 +00:00
Chris Lattner
54ea60c69e Cleanups, rename IsPowerOf2 to isPowerOf2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2662 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-19 21:19:55 +00:00
Vikram S. Adve
4335ad5056 Add libsparc.a a second time to resolve link errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2661 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-19 16:01:03 +00:00
Vikram S. Adve
53835b8081 Link with test/Libraries/libinstr32.a for runtime routines
supporting tracing.  That should be moved to a "runtime" directory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2660 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-19 16:00:28 +00:00
Vikram S. Adve
eb1a8453f9 Added external functions for hashing pointers to sequence numbers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2659 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-19 15:59:25 +00:00
Vikram S. Adve
2df1f74b97 Runtime routines to support tracing.
Currently includes code to hash pointers to sequence numbers.
The hash table should be separated out into a separate file
since that is generic.  The rest of this code is pretty small.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2655 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-19 15:49:58 +00:00
Vikram S. Adve
2a4d8d2461 Fix libs and includes for compiling with llc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2654 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-19 15:47:52 +00:00
Vikram S. Adve
bcfa423e3d Added log2 for log-base-2 and also modified IsPower2 to use it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2653 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-19 15:46:52 +00:00