oota-llvm.git
22 years agoSupport function declarations with either %XXX or "XXX" style for now
Chris Lattner [Wed, 22 May 2002 22:33:00 +0000 (22:33 +0000)]
Support function declarations with either %XXX or "XXX" style for now
"XXX" style should be considered deprecated, and will hopefully be removed
in the future.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2727 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoPrint out function name with % style instead of "" style
Chris Lattner [Wed, 22 May 2002 22:29:26 +0000 (22:29 +0000)]
Print out function name with % style instead of "" style

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2726 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoRemove spaces from function names
Chris Lattner [Wed, 22 May 2002 22:28:27 +0000 (22:28 +0000)]
Remove spaces from function names
While I was at it, I converted functions to new style % name

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2725 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoNew testcase
Chris Lattner [Wed, 22 May 2002 22:17:54 +0000 (22:17 +0000)]
New testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2724 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoRun profile paths tests
Chris Lattner [Wed, 22 May 2002 22:02:24 +0000 (22:02 +0000)]
Run profile paths tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2723 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoTest cases for profile paths pass
Chris Lattner [Wed, 22 May 2002 22:02:14 +0000 (22:02 +0000)]
Test cases for profile paths pass

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2722 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoConvert code to use the DEBUG macro so that debug code can simply be
Chris Lattner [Wed, 22 May 2002 21:56:32 +0000 (21:56 +0000)]
Convert code to use the DEBUG macro so that debug code can simply  be
enabled with the -debug command line option.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2721 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoFix and implement ADCE to finally work!
Chris Lattner [Wed, 22 May 2002 21:32:16 +0000 (21:32 +0000)]
Fix and implement ADCE to finally work!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2720 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoAdd the ADCE pass to gccas finally!
Chris Lattner [Wed, 22 May 2002 21:30:24 +0000 (21:30 +0000)]
Add the ADCE pass to gccas finally!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2719 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoNew testcase
Chris Lattner [Wed, 22 May 2002 20:46:30 +0000 (20:46 +0000)]
New testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2718 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoBuild the extract utility
Chris Lattner [Wed, 22 May 2002 20:27:15 +0000 (20:27 +0000)]
Build the extract utility

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2717 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoInitial checkin of the "extract" utility
Chris Lattner [Wed, 22 May 2002 20:27:00 +0000 (20:27 +0000)]
Initial checkin of the "extract" utility

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2716 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoAdd more testcases for ADCE
Chris Lattner [Wed, 22 May 2002 19:22:45 +0000 (19:22 +0000)]
Add more testcases for ADCE

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2715 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoConvert transforms over to standardize debugging output on -debug option
Chris Lattner [Wed, 22 May 2002 17:27:12 +0000 (17:27 +0000)]
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

22 years agoUse the new DEBUG(x) macro to allow debugging code to be enabled on the commandline
Chris Lattner [Wed, 22 May 2002 17:17:27 +0000 (17:17 +0000)]
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

22 years agoMove debug options out of header files so that the header does not have
Chris Lattner [Wed, 22 May 2002 17:08:27 +0000 (17:08 +0000)]
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

22 years agoMove the DEBUG_LV option out of the public header file into a private header.
Chris Lattner [Wed, 22 May 2002 17:07:26 +0000 (17:07 +0000)]
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

22 years agoAvoid #including CommandLine.h
Chris Lattner [Wed, 22 May 2002 17:06:56 +0000 (17:06 +0000)]
Avoid #including CommandLine.h

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2710 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoImplement a new command line option, -debug, which is meant to unify all of
Chris Lattner [Wed, 22 May 2002 17:06:20 +0000 (17:06 +0000)]
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

22 years agoAdd ability to update existing variables with values read from the command line
Chris Lattner [Wed, 22 May 2002 17:03:05 +0000 (17:03 +0000)]
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

22 years agoFix bug: test/Regression/Transforms/SCCP/2002-05-21-InvalidSimplify.ll
Chris Lattner [Wed, 22 May 2002 16:07:20 +0000 (16:07 +0000)]
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

22 years agoMust run cfgsimplify to eliminate dead blocks
Chris Lattner [Wed, 22 May 2002 15:49:14 +0000 (15:49 +0000)]
Must run cfgsimplify to eliminate dead blocks

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2706 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoNew testcase
Chris Lattner [Tue, 21 May 2002 22:23:38 +0000 (22:23 +0000)]
New testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2705 91177308-0d34-0410-b5e6-96231b3b80d8

22 years ago* Fix typeo
Chris Lattner [Tue, 21 May 2002 21:10:04 +0000 (21:10 +0000)]
* 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

22 years agoAdd implementation of SimplifyCFG
Chris Lattner [Tue, 21 May 2002 20:50:24 +0000 (20:50 +0000)]
Add implementation of SimplifyCFG

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2701 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoNew CFG Simplification pass: removed from the old DCE pass
Chris Lattner [Tue, 21 May 2002 20:49:37 +0000 (20:49 +0000)]
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

22 years agoExpose cfg simplification pass
Chris Lattner [Tue, 21 May 2002 20:05:16 +0000 (20:05 +0000)]
Expose cfg simplification pass

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2699 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoSimplify CFG after code generation is done
Chris Lattner [Tue, 21 May 2002 20:05:08 +0000 (20:05 +0000)]
Simplify CFG after code generation is done

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2698 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoSimplify interface to ConstantFoldTerminator
Chris Lattner [Tue, 21 May 2002 20:04:50 +0000 (20:04 +0000)]
Simplify interface to ConstantFoldTerminator

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2697 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoExpose CFG simplification pass
Chris Lattner [Tue, 21 May 2002 20:04:15 +0000 (20:04 +0000)]
Expose CFG simplification pass

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2696 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoNew testcase
Chris Lattner [Tue, 21 May 2002 20:03:42 +0000 (20:03 +0000)]
New testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2695 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoFix bug: test/Regression/Transforms/CFGSimplify/2002-05-21-PHIElimination.ll
Chris Lattner [Tue, 21 May 2002 19:52:49 +0000 (19:52 +0000)]
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

22 years agoUpdate run line
Chris Lattner [Tue, 21 May 2002 19:33:17 +0000 (19:33 +0000)]
Update run line

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2693 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoThis testcase was very broken! The block could not be merged because then
Chris Lattner [Tue, 21 May 2002 19:32:58 +0000 (19:32 +0000)]
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

22 years agoNew testcase
Chris Lattner [Tue, 21 May 2002 19:22:10 +0000 (19:22 +0000)]
New testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2691 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoFix bug: test/Regression/CBackend/2002-05-21-MissingReturn.ll
Chris Lattner [Tue, 21 May 2002 18:05:19 +0000 (18:05 +0000)]
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

22 years agoNew TEstcase
Chris Lattner [Tue, 21 May 2002 18:04:58 +0000 (18:04 +0000)]
New TEstcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2689 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoFixed the makefile to not die when compiling a new, empty, source directory
Mehwish Nagda [Tue, 21 May 2002 15:58:24 +0000 (15:58 +0000)]
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

22 years agoRemove unneccesary path from link line now
Chris Lattner [Mon, 20 May 2002 21:47:40 +0000 (21:47 +0000)]
Remove unneccesary path from link line now

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2679 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoAllow libraries to specify other libraries to link to
Chris Lattner [Mon, 20 May 2002 21:45:44 +0000 (21:45 +0000)]
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

22 years ago* Change commandline options a bit to be nicer
Chris Lattner [Mon, 20 May 2002 21:43:59 +0000 (21:43 +0000)]
* 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

22 years agoHide debugging options
Chris Lattner [Mon, 20 May 2002 21:39:10 +0000 (21:39 +0000)]
Hide debugging options

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2676 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoFix tracing code support to link in the tracing routines if neccesary.
Chris Lattner [Mon, 20 May 2002 21:20:08 +0000 (21:20 +0000)]
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

22 years agoRemove explicit support for tracing code. It should be linked into the
Chris Lattner [Mon, 20 May 2002 21:17:16 +0000 (21:17 +0000)]
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

22 years agoRemove tracing code hack
Chris Lattner [Mon, 20 May 2002 21:16:46 +0000 (21:16 +0000)]
Remove tracing code hack

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2673 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoTracelib is now an LLVM library just like all other libraries in this
Chris Lattner [Mon, 20 May 2002 21:16:19 +0000 (21:16 +0000)]
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

22 years ago* If hashing a pointer, cast it to a 64 bit number so gcc doesn't warn
Chris Lattner [Mon, 20 May 2002 21:15:30 +0000 (21:15 +0000)]
* 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

22 years agoNew testcase for bug
Chris Lattner [Mon, 20 May 2002 20:48:24 +0000 (20:48 +0000)]
New testcase for bug

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2670 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoFix bug: test/Regression/Transforms/SCCP/2002-05-20-MissedIncomingValue.ll
Chris Lattner [Mon, 20 May 2002 20:48:03 +0000 (20:48 +0000)]
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

22 years agoUse literal newline instead of endl
Chris Lattner [Mon, 20 May 2002 19:49:24 +0000 (19:49 +0000)]
Use literal newline instead of endl

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2668 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoDrop something that link will never support, use gccld instead
Chris Lattner [Mon, 20 May 2002 19:48:55 +0000 (19:48 +0000)]
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

22 years agoImplement the printf function, used by assert
Chris Lattner [Mon, 20 May 2002 19:11:23 +0000 (19:11 +0000)]
Implement the printf function, used by assert

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2666 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoDon't lose namespace qualifications on previous patch.
Chris Lattner [Mon, 20 May 2002 17:38:26 +0000 (17:38 +0000)]
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

22 years agoRename IsPowerOf2 to isPowerOf2
Chris Lattner [Sun, 19 May 2002 21:20:19 +0000 (21:20 +0000)]
Rename IsPowerOf2 to isPowerOf2

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2663 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoCleanups, rename IsPowerOf2 to isPowerOf2
Chris Lattner [Sun, 19 May 2002 21:19:55 +0000 (21:19 +0000)]
Cleanups, rename IsPowerOf2 to isPowerOf2

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2662 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoAdd libsparc.a a second time to resolve link errors.
Vikram S. Adve [Sun, 19 May 2002 16:01:03 +0000 (16:01 +0000)]
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

22 years agoLink with test/Libraries/libinstr32.a for runtime routines
Vikram S. Adve [Sun, 19 May 2002 16:00:28 +0000 (16:00 +0000)]
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

22 years agoAdded external functions for hashing pointers to sequence numbers.
Vikram S. Adve [Sun, 19 May 2002 15:59:25 +0000 (15:59 +0000)]
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

22 years agoRuntime routines to support tracing.
Vikram S. Adve [Sun, 19 May 2002 15:49:58 +0000 (15:49 +0000)]
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

22 years agoFix libs and includes for compiling with llc.
Vikram S. Adve [Sun, 19 May 2002 15:47:52 +0000 (15:47 +0000)]
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

22 years agoAdded log2 for log-base-2 and also modified IsPower2 to use it.
Vikram S. Adve [Sun, 19 May 2002 15:46:52 +0000 (15:46 +0000)]
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

22 years agoAdded parameter IntRegSize for standard general-purpose register size.
Vikram S. Adve [Sun, 19 May 2002 15:44:07 +0000 (15:44 +0000)]
Added parameter IntRegSize for standard general-purpose register size.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2652 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoNew function CreateSignExtensionInstructions.
Vikram S. Adve [Sun, 19 May 2002 15:43:31 +0000 (15:43 +0000)]
New function CreateSignExtensionInstructions.
Methods now take MachineCodeForInstruction& as an argument and record
temporary values in it directly, instead of return the temps.
Really simplifies callers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2651 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoMany functions that returned a single MachineInstr now take a
Vikram S. Adve [Sun, 19 May 2002 15:42:21 +0000 (15:42 +0000)]
Many functions that returned a single MachineInstr now take a
vector of MachineInstr* to return multiple ones.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2650 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoInstrnsBefore and InstrnsAfter are now vectors instead of deques.
Vikram S. Adve [Sun, 19 May 2002 15:41:33 +0000 (15:41 +0000)]
InstrnsBefore and InstrnsAfter are now vectors instead of deques.
May be slightly less efficient but significantly reduces special
cases interfaces in code generation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2649 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoBetter interface to generating machine instr for common cases
Vikram S. Adve [Sun, 19 May 2002 15:40:41 +0000 (15:40 +0000)]
Better interface to generating machine instr for common cases
(many places still need to be updated to use this interface).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2648 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoMachineInstr now inherits from Annotable.
Vikram S. Adve [Sun, 19 May 2002 15:39:59 +0000 (15:39 +0000)]
MachineInstr now inherits from Annotable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2647 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoHash pointer values to a sequence number to get identical results from
Vikram S. Adve [Sun, 19 May 2002 15:39:02 +0000 (15:39 +0000)]
Hash pointer values to a sequence number to get identical results from
lli and llc.  This is controlled with options -tracehash on|off.

Also, added an option to specify which functions should be traced.
Particularly useful to reduce output volume in basic-block tracing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2646 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoBetter folding getelementptr operations with mixed
Vikram S. Adve [Sun, 19 May 2002 15:34:29 +0000 (15:34 +0000)]
Better folding getelementptr operations with mixed
array and struct indexes.
Update operand values in CallArgsDescriptor (a new class)
when replacing constant values with immediates.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2645 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agocpValue2Value now needs a vector of MachineInstr to store return values.
Vikram S. Adve [Sun, 19 May 2002 15:31:08 +0000 (15:31 +0000)]
cpValue2Value now needs a vector of MachineInstr to store return values.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2644 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoAnnotation class for MachineInstr.
Vikram S. Adve [Sun, 19 May 2002 15:30:21 +0000 (15:30 +0000)]
Annotation class for MachineInstr.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2643 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoNumerous bug fixes:
Vikram S. Adve [Sun, 19 May 2002 15:29:31 +0000 (15:29 +0000)]
Numerous bug fixes:
-- passing FP arguments to functions with more than 6 arguments
-- passing FP arguments to varargs functions
-- passing FP arguments to functions with no prototypes
-- incorrect coloring for CC registers (both int and FP): interferences
   were being completely ignored for int CC and were considered but no
   spills were marked for fp CC!

Also some code improvements:
-- better interface to generating machine instr for common cases
   (many places still need to be updated to use this interface)
-- annotations on MachineInstr to communicate information from
   one codegen phase to another (now used to pass information about
   CALL/JMPLCALL operands from selection to register allocation)
-- all sizes and offests in class TargetData are uint64_t instead of uint

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2642 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoAdd integer register size field.
Vikram S. Adve [Sun, 19 May 2002 15:28:02 +0000 (15:28 +0000)]
Add integer register size field.
Make all sizes and offsets uint64_t instead of uint.
Fixed GetIndexedOffset to handle mixed array and struct indices.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2641 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoNumerous bug fixes:
Vikram S. Adve [Sun, 19 May 2002 15:25:51 +0000 (15:25 +0000)]
Numerous bug fixes:
-- correct sign extensions for integer casts and for shift-by-constant
   instructions generated for integer multiply
-- passing FP arguments to functions with more than 6 arguments
-- passing FP arguments to varargs functions
-- passing FP arguments to functions with no prototypes
-- incorrect stack frame size when padding a section
-- folding getelementptr operations with mixed array and struct indexes
-- use uint64_t instead of uint for constant offsets in mem operands
-- incorrect coloring for CC registers (both int and FP): interferences
   were being completely ignored for int CC and were considered but no
   spills were marked for fp CC!

Also some code improvements:
-- better interface to generating machine instr for common cases
   (many places still need to be updated to use this interface)
-- annotations on MachineInstr to communicate information from
   one codegen phase to another (now used to pass information about
   CALL/JMPLCALL operands from selection to register allocation)
-- all sizes and offests in class TargetData are uint64_t instead of uint

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2640 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoFix bug: test/Regression/CBackend/2002-05-16-NameCollide.ll by tracking
Chris Lattner [Fri, 17 May 2002 04:55:35 +0000 (04:55 +0000)]
Fix bug: test/Regression/CBackend/2002-05-16-NameCollide.ll by tracking
which global variables would have name collisions if they were not mangled,
and use this info to mangle them iff they would collide.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2639 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoNew C backend testcases with first testcase
Chris Lattner [Fri, 17 May 2002 04:53:52 +0000 (04:53 +0000)]
New C backend testcases with first testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2638 91177308-0d34-0410-b5e6-96231b3b80d8

22 years ago* Make debug output conditional on #define
Chris Lattner [Thu, 16 May 2002 04:37:07 +0000 (04:37 +0000)]
* Make debug output conditional on #define
* Add optimization to rank computation to not recursively search when
  unneccesary.
* More agressively negate expressions to open reassociation opportunities.
* Linearize (A+B)+(C+D) into ((A+B)+C)+D

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2637 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoAdd tests of redundant load elimination
Chris Lattner [Thu, 16 May 2002 01:03:12 +0000 (01:03 +0000)]
Add tests of redundant load elimination

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2636 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoNew testcases for sub/neg reassociation
Chris Lattner [Thu, 16 May 2002 00:56:59 +0000 (00:56 +0000)]
New testcases for sub/neg reassociation

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2635 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoFix testcase
Chris Lattner [Thu, 16 May 2002 00:56:36 +0000 (00:56 +0000)]
Fix testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2634 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoNew testcases to ensure sub's are maximally reassociable
Chris Lattner [Wed, 15 May 2002 21:59:31 +0000 (21:59 +0000)]
New testcases to ensure sub's are maximally reassociable

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2633 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoTestcase to ensure trees structures are correctly linearized
Chris Lattner [Wed, 15 May 2002 21:56:51 +0000 (21:56 +0000)]
Testcase to ensure trees structures are correctly linearized

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2632 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoTest to ensure sub -> neg promotion is working and why.
Chris Lattner [Wed, 15 May 2002 20:30:48 +0000 (20:30 +0000)]
Test to ensure sub -> neg promotion is working and why.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2631 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoNew testcase
Chris Lattner [Wed, 15 May 2002 17:22:01 +0000 (17:22 +0000)]
New testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2630 91177308-0d34-0410-b5e6-96231b3b80d8

22 years ago* Fix bug: test/Regression/Transforms/GCSE/2002-05-14-OperandSwap.ll
Chris Lattner [Tue, 14 May 2002 19:57:25 +0000 (19:57 +0000)]
* Fix bug: test/Regression/Transforms/GCSE/2002-05-14-OperandSwap.ll

By making sure to consider binary expressions identical if their operands
are backwards, but swappable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2629 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoNew testcase
Chris Lattner [Tue, 14 May 2002 19:56:14 +0000 (19:56 +0000)]
New testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2628 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoFix bug: test/Regression/Transforms/InstCombine/2002-05-14-SubFailure.ll
Chris Lattner [Tue, 14 May 2002 16:44:07 +0000 (16:44 +0000)]
Fix bug: test/Regression/Transforms/InstCombine/2002-05-14-SubFailure.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2627 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoNew testcase for bug
Chris Lattner [Tue, 14 May 2002 16:40:43 +0000 (16:40 +0000)]
New testcase for bug

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2626 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoRun another local value numbering phase after redundancy elimination
Chris Lattner [Tue, 14 May 2002 16:23:14 +0000 (16:23 +0000)]
Run another local value numbering phase after redundancy elimination

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2625 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoAvoid emitting a useless comment for a basic block with no uses (which
Chris Lattner [Tue, 14 May 2002 16:02:05 +0000 (16:02 +0000)]
Avoid emitting a useless comment for a basic block with no uses (which
often happens for the entry basic block of a function)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2624 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoFix bug: test/Regression/Transforms/InstCombine/2002-05-14-TouchDeletedInst.ll
Chris Lattner [Tue, 14 May 2002 15:24:07 +0000 (15:24 +0000)]
Fix bug: test/Regression/Transforms/InstCombine/2002-05-14-TouchDeletedInst.ll

"This testcase caused instcombine to fail because it got the same instruction on
it's worklist more than once (which is ok), but then deleted the instruction.
Since the inst stayed on the worklist, as soon as it came back up to be
processed, bad things happened, and opt asserted."

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2623 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoNew testcase
Chris Lattner [Tue, 14 May 2002 15:22:50 +0000 (15:22 +0000)]
New testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2622 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoFix a major source of "type unsafety", where a cast is neccesary, but can
Chris Lattner [Tue, 14 May 2002 05:23:45 +0000 (05:23 +0000)]
Fix a major source of "type unsafety", where a cast is neccesary, but can
be put either before or after a load.  We chose to cast the value loaded
instead of the pointer to load from.

Fixes bug: test/Regression/Transforms/LevelRaise/2002-05-10-LoadPeephole.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2621 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoImplement elimination of loads
Chris Lattner [Tue, 14 May 2002 05:02:40 +0000 (05:02 +0000)]
Implement elimination of loads

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2620 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoInvoke inst has side effects!
Chris Lattner [Tue, 14 May 2002 04:20:25 +0000 (04:20 +0000)]
Invoke inst has side effects!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2619 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoNew file
Chris Lattner [Mon, 13 May 2002 22:19:50 +0000 (22:19 +0000)]
New file

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2618 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoTrivial cleanups
Chris Lattner [Mon, 13 May 2002 22:04:46 +0000 (22:04 +0000)]
Trivial cleanups

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2617 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoAdd method to check to see if two _Instructions_ dominate each other
Chris Lattner [Mon, 13 May 2002 22:03:16 +0000 (22:03 +0000)]
Add method to check to see if two _Instructions_ dominate each other

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2616 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoInitial checkin of LICM pass
Chris Lattner [Fri, 10 May 2002 22:44:58 +0000 (22:44 +0000)]
Initial checkin of LICM pass

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2615 91177308-0d34-0410-b5e6-96231b3b80d8

22 years agoexpose LICM pass
Chris Lattner [Fri, 10 May 2002 22:44:37 +0000 (22:44 +0000)]
expose LICM pass

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2614 91177308-0d34-0410-b5e6-96231b3b80d8