Vikram S. Adve
2a5085af8c
Include Makefile.singlesrc in order to compile .c tests.
...
Some of these are not regression tests and this directory needs
to be reorganized, but the tests are important.
llvm-svn: 2866
2002-07-10 22:02:37 +00:00
Vikram S. Adve
253d9e40a2
Some of these are feature tests, not regression tests.
...
This directory needs to be reorganized and some of the tests
need changes to make them executable. Also comments would help...
llvm-svn: 2865
2002-07-10 21:54:05 +00:00
Vikram S. Adve
72623d57e4
Bug fix: cast (bool) has higher precedence than %... who knew!
...
llvm-svn: 2864
2002-07-10 21:51:46 +00:00
Vikram S. Adve
546b6ac3e3
Add support for marking each operand as a %hh, %hm, %lm or %lo.
...
Represent previous bools and these ones with flags in a single byte
per operand.
llvm-svn: 2863
2002-07-10 21:50:57 +00:00
Vikram S. Adve
a7f736eeea
Added a few more methods for creating instructions.
...
llvm-svn: 2862
2002-07-10 21:49:38 +00:00
Vikram S. Adve
6a36c8f2b9
Fix print of BB name in dump().
...
llvm-svn: 2861
2002-07-10 21:45:30 +00:00
Vikram S. Adve
f089faa7f6
Add support for marking each operand as a %hh, %hm, %lm or %lo.
...
Represent previous bools and these ones with flags in a single byte
per operand.
llvm-svn: 2860
2002-07-10 21:45:04 +00:00
Vikram S. Adve
c5f8b52bd0
Changed interface to insertCallerSavingCode().
...
llvm-svn: 2859
2002-07-10 21:42:42 +00:00
Vikram S. Adve
e997a11251
Stop using pseudo-instructions (SETX, SETUW, SETSW)
...
and generate actual machine instruction sequences directly.
llvm-svn: 2858
2002-07-10 21:42:13 +00:00
Vikram S. Adve
4e1ee14694
Add support to print %hh, %hm, %lm, or %lo in an operand field.
...
llvm-svn: 2857
2002-07-10 21:41:21 +00:00
Vikram S. Adve
58c904ace6
Major overhaul to stop using pseudo-instructions (SETX, SETUW, SETSW)
...
and generate actual machine instruction sequences directly.
Also a couple of bug fixes in code for putting constants into registers:
-- Do *not* sign-extend unsigned constant that is shorter than int reg size
-- Fix handling of address constant (a GlobalValue) vs. constant that
must be loaded.
llvm-svn: 2856
2002-07-10 21:39:50 +00:00
Vikram S. Adve
4aee77c70b
More important fixes:
...
-- FP argument to a function with no prototype going on stack
was not being copied to the stack in colorCallArgs().
-- Put caller-saving code *before* argument copying code so that
we don't trash a register before saving it!
-- Two other minor fixes.
llvm-svn: 2855
2002-07-10 21:36:00 +00:00
Vikram S. Adve
9423a4d0a5
Put caller-saving code *before* argument copying code!
...
(This file has a minor change required for this fix.)
llvm-svn: 2854
2002-07-10 21:30:17 +00:00
Vikram S. Adve
075ee8a836
Minor change in comments.
...
llvm-svn: 2853
2002-07-10 21:29:22 +00:00
Chris Lattner
5a9f63ef4e
*** empty log message ***
...
llvm-svn: 2852
2002-07-10 16:48:17 +00:00
Chris Lattner
fd5e6e0fb8
Allow specifying a module for context instead of a slot calculator directly
...
llvm-svn: 2851
2002-07-10 16:48:14 +00:00
Chris Lattner
54ef5ab8a0
Add a new testcase. It actually is not infinite looping. It just takes
...
FOREVER to run. That's the bug. :)
llvm-svn: 2850
2002-07-09 19:58:06 +00:00
Vikram S. Adve
acceb1edff
Disabling reassociate pass until it is fixed.
...
llvm-svn: 2849
2002-07-09 19:53:09 +00:00
Chris Lattner
2c13d473ef
New testcase for problem effecting mst
...
llvm-svn: 2848
2002-07-09 19:41:21 +00:00
Anand Shukla
046fe57511
changed mem_fun to std::mem_fun
...
llvm-svn: 2847
2002-07-09 19:18:56 +00:00
Anand Shukla
4ddf053a63
added std:: to hash_set
...
llvm-svn: 2846
2002-07-09 19:18:16 +00:00
Anand Shukla
7e882db2f4
Added std:: to mem_fun for 64-bit gcc
...
llvm-svn: 2845
2002-07-09 19:16:59 +00:00
Chris Lattner
f6d3cb95cf
Implementing shift left & shift right on pointers
...
llvm-svn: 2844
2002-07-09 18:42:36 +00:00
Chris Lattner
d6e237ff52
Include header in the compiler-neutral location
...
llvm-svn: 2843
2002-07-09 16:50:24 +00:00
Vikram S. Adve
a3697666eb
Added support for printing constant global references to
...
assembly.
llvm-svn: 2842
2002-07-09 12:30:29 +00:00
Vikram S. Adve
24132e8983
Add makefile-mode flag for emacs.
...
llvm-svn: 2841
2002-07-09 12:04:21 +00:00
Vikram S. Adve
4b581be494
Fix iteration and InsertPos bugs introduced when Chris changed over to ilist.
...
llvm-svn: 2840
2002-07-08 23:37:07 +00:00
Vikram S. Adve
5eb69429aa
Numerous changes in interface to class SparcRegInfo corresponding to
...
changes in class MachineRegInfo (see MachineRegInfo.h for details).
Added {LD,ST}[X]FSR instructions.
llvm-svn: 2839
2002-07-08 23:34:10 +00:00
Vikram S. Adve
1ce4096033
class MachineCodeForBasicBlock is now an annotation on BasicBlock.
...
llvm-svn: 2838
2002-07-08 23:31:24 +00:00
Vikram S. Adve
3bb830d337
BA no longer has the unused CC operand.
...
llvm-svn: 2837
2002-07-08 23:30:59 +00:00
Vikram S. Adve
82190d3e73
Have to save a boolean (setCC) value whenever use is outside the current
...
basic block.
Mark setCCInstr used as dest. of conditional-move as both a def and a use.
BA instruction no longer has the unused CC argument.
llvm-svn: 2836
2002-07-08 23:30:14 +00:00
Vikram S. Adve
c564520c5c
BA has only one argument.
...
Added LDFSR, LDXFSR, STFSR and STXFSR.
Fixed operands info for RDCCR, WRCCR.
llvm-svn: 2835
2002-07-08 23:25:17 +00:00
Vikram S. Adve
aee6701e63
Significant changes to correctly spill CC registers and to correctly
...
handle conditional move instructions:
-- cpMem<->Reg functions now support CC registers (int and FP) correctly.
Also, cpMem<->Reg functions now return a vector of machine instructions.
-- Scratch registers must be explicitly provided to cpMem<->Reg when
needed, since CC regs need one to be copied to/from memory.
-- CC regs are saved to a scratch register instead of stack.
-- All regs used by a instruction are now recorded in MachineInstr::regsUsed,
since regs used to save values *across* an instruction are not obvious
either from the operands or from the LiveVar sets.
-- An (explicit or implicit) operand may now be both a def and a use.
This is needed for conditional move operations.
So an operand may need spill code both before and after the instruction.
Other changes:
-- Added several get{Class,Type} functions.
-- Added unified-to-local register number conversion.
-- class MachineCodeForBasicBlock is now an annotation on BasicBlock.
-- Suggest/Color methods may modify the MachineInstr (and always did),
so don't make that argument const!
-- Caller-saving code doesn't need its special purpose code for
handling CC registers since cpMem<->Reg handle those correctly now.
llvm-svn: 2834
2002-07-08 23:23:12 +00:00
Vikram S. Adve
7228f0c404
Significant changes to correctly spill CC registers and to correctly
...
handle conditional move instructions:
-- cpMem<->Reg functions now support CC registers (int and FP) correctly.
-- Scratch registers must be explicitly provided to cpMem<->Reg when
needed, since CC regs need one to be copied to/from memory.
-- CC regs are saved to a scratch register instead of stack.
-- All regs used by a instruction are now recorded in MachineInstr::regsUsed,
since regs used to save values *across* an instruction are not obvious
either from the operands or from the LiveVar sets.
-- An (explicit or implicit) operand may now be both a def and a use.
This is needed for conditional move operations.
So an operand may need spill code both before and after the instruction.
-- class MachineCodeForBasicBlock is now an annotation on BasicBlock.
llvm-svn: 2833
2002-07-08 23:15:32 +00:00
Vikram S. Adve
1dfb4079b7
MachineInstr* in vector are not const (and never really were)
...
because operands may be modified directly to set register.
Also, class MachineCodeForBasicBlock is now an annotation on BasicBlock.
llvm-svn: 2832
2002-07-08 23:07:26 +00:00
Vikram S. Adve
35bac4a658
Rename static struct Initializer to avoid name conflict with BB.
...
llvm-svn: 2831
2002-07-08 23:04:31 +00:00
Vikram S. Adve
4180fe41c2
Fix printing of BB in dump.
...
llvm-svn: 2830
2002-07-08 23:03:54 +00:00
Vikram S. Adve
2bd7ae169d
Moved class MachineCodeForBasicBlock to MachineCodeForBasicBlock.h.
...
This class is now an annotation on BasicBlock.
llvm-svn: 2829
2002-07-08 23:03:10 +00:00
Vikram S. Adve
a9c93af49f
MachineInstr::dump() now takes no arguments.
...
llvm-svn: 2828
2002-07-08 23:01:46 +00:00
Vikram S. Adve
f0b84cefb0
Implementation of class MachineCodeForBasicBlock.
...
Moved here from MachineInstr.cpp to make it an annotation on BasicBlock.
llvm-svn: 2827
2002-07-08 23:01:11 +00:00
Vikram S. Adve
19c55db0d9
A single MachineInstr operand may now be both a def and a use,
...
so additional dep. edges have to be added.
This was needed to correctly handle conditional move instructions!
MachineCodeForBasicBlock is now an annotation on BasicBlock.
Renamed "earliestForNode" to "earliestReadyTimeForNode".
llvm-svn: 2826
2002-07-08 22:59:23 +00:00
Vikram S. Adve
ae219e24ba
A single MachineInstr operand may now be both a def and a use.
...
llvm-svn: 2825
2002-07-08 22:56:34 +00:00
Vikram S. Adve
00ee3ee0d3
cpMem<->Reg functions now support CC registers (int and FP) correctly.
...
A scratch register has to be provided when needed to do the copy.
Also, cpMem<->Reg functions now return a vector of machine instructions.
Added several get{Class,Type} functions.
Suggest/Color methods may modify the MachineInstr (and always did),
so don't make that argument const!
llvm-svn: 2824
2002-07-08 22:44:14 +00:00
Vikram S. Adve
dc21fb7775
Interface to class MachineCodeForBasicBlock.
...
Moved here from MachineInstr.h to make it an annotation on BasicBlock.
llvm-svn: 2823
2002-07-08 22:40:34 +00:00
Vikram S. Adve
beb364051b
getUsableUniRegAtMI interface simplified slightly.
...
llvm-svn: 2822
2002-07-08 22:39:36 +00:00
Vikram S. Adve
6c013a9689
Moved class MachineCodeForBasicBlock to MachineCodeForBasicBlock.{cpp,h}.
...
An (explicit or implicit) operand may now be both a def and a use.
Also add a set of regs used by each instruction.
dump() no longer takes an optional argument, which doesn't work in gdb.
llvm-svn: 2821
2002-07-08 22:38:45 +00:00
Vikram S. Adve
ff045b2e18
MachineInstr* in vector are not const (and never really were)
...
because operands may be modified directly to set register.
llvm-svn: 2820
2002-07-08 22:34:40 +00:00
Vikram S. Adve
50684c092d
Added two more helper functions for instruction creation.
...
llvm-svn: 2819
2002-07-08 22:33:45 +00:00
Vikram S. Adve
6e792fca91
Moved MachineCodeForBB to be an annotation on BasicBlock.
...
llvm-svn: 2818
2002-07-08 22:31:11 +00:00
Anand Shukla
2d3d20b09f
changes BBsorting and oredering
...
llvm-svn: 2817
2002-07-08 19:37:06 +00:00
Anand Shukla
ff72c798ac
small corrections
...
llvm-svn: 2816
2002-07-08 19:36:39 +00:00
Anand Shukla
11f4262874
changed function numbering
...
llvm-svn: 2815
2002-07-08 19:36:01 +00:00
Anand Shukla
bc7054b466
Add new << to allow printing modules by reference.
...
llvm-svn: 2814
2002-07-03 16:52:15 +00:00
Chris Lattner
33422fedc2
*** empty log message ***
...
llvm-svn: 2813
2002-06-30 16:25:25 +00:00
Chris Lattner
a3a1ba1d6a
Clean up anands patch
...
llvm-svn: 2812
2002-06-30 16:25:21 +00:00
Chris Lattner
e3e86f7027
Strip the symbols out of the bytecode to inflate generated executables less.
...
llvm-svn: 2811
2002-06-30 16:25:07 +00:00
Chris Lattner
c19be16c7b
YEs, we really do want to sort.
...
llvm-svn: 2810
2002-06-30 16:20:02 +00:00
Chris Lattner
f119a2b1df
Yes, we REALLY DO want to run the reassociate pass.
...
llvm-svn: 2809
2002-06-30 16:19:14 +00:00
Chris Lattner
c28c7b9ccf
Remove diff-cluttering tags
...
llvm-svn: 2808
2002-06-30 16:12:03 +00:00
Chris Lattner
dec26513ad
Remove tag that just clutters diffs
...
llvm-svn: 2807
2002-06-30 16:08:25 +00:00
Chris Lattner
e8b6196f28
Fix anands changes
...
llvm-svn: 2806
2002-06-30 16:07:20 +00:00
Chris Lattner
0a30bda280
Convert tabs to spaces
...
llvm-svn: 2805
2002-06-30 16:04:37 +00:00
Chris Lattner
9e5b6904e5
Fix anand's last checkin
...
llvm-svn: 2804
2002-06-30 16:01:15 +00:00
Chris Lattner
03b18721be
Fix comment
...
llvm-svn: 2803
2002-06-30 15:50:09 +00:00
Chris Lattner
0a0c5341da
Cleanup
...
llvm-svn: 2802
2002-06-28 22:06:39 +00:00
Anand Shukla
8c37789a33
changes for 64bit gcc
...
llvm-svn: 2801
2002-06-25 22:07:38 +00:00
Anand Shukla
949659c0e2
added include<iostream> for cerr
...
llvm-svn: 2800
2002-06-25 22:04:00 +00:00
Anand Shukla
fef3241cc6
Changes for 64bit gcc
...
llvm-svn: 2799
2002-06-25 21:57:48 +00:00
Anand Shukla
dfe130c161
correcting makefile: incorrectly checked in wrong version earlier
...
llvm-svn: 2798
2002-06-25 21:44:44 +00:00
Anand Shukla
68c9977d7f
Changes for 64bit gcc
...
llvm-svn: 2797
2002-06-25 21:43:28 +00:00
Anand Shukla
7e9d0710e6
added include<iostream> for cerr
...
llvm-svn: 2796
2002-06-25 21:29:10 +00:00
Anand Shukla
2ac04a0083
changes to make it compatible with 64bit gcc
...
llvm-svn: 2795
2002-06-25 21:18:19 +00:00
Anand Shukla
21906891d7
additions and bug fixes
...
llvm-svn: 2794
2002-06-25 21:14:58 +00:00
Anand Shukla
af26b39bc5
added include<iostream> for cerr
...
llvm-svn: 2793
2002-06-25 21:12:25 +00:00
Anand Shukla
2bc6419a82
changes to make it compatible with 64bit gcc
...
llvm-svn: 2792
2002-06-25 21:07:58 +00:00
Anand Shukla
458496c060
changes to make it compatible with 64bit gcc
...
llvm-svn: 2791
2002-06-25 20:55:50 +00:00
Anand Shukla
eaa2e7204e
changes to make it compatible with 64bit gcc
...
llvm-svn: 2790
2002-06-25 20:44:04 +00:00
Anand Shukla
ff4c42b7c3
changes to make it compatible with 64bit gcc
...
llvm-svn: 2789
2002-06-25 20:35:19 +00:00
Anand Shukla
4fc92edcc6
minor change in removing endl
...
llvm-svn: 2788
2002-06-25 20:34:54 +00:00
Chris Lattner
2d38db3b45
We must with with GCC 2.95 :(
...
llvm-svn: 2787
2002-06-25 20:33:28 +00:00
Anand Shukla
f1c0d920e3
changes to make it compatible with 64bit gcc
...
llvm-svn: 2786
2002-06-25 20:22:25 +00:00
Chris Lattner
55d3b0d266
Avoid calling LLVM "Strongly typed"
...
llvm-svn: 2785
2002-06-25 20:20:08 +00:00
Anand Shukla
f1aafa4236
Added setSuccessor() method to terminator instructions
...
llvm-svn: 2784
2002-06-25 20:17:40 +00:00
Chris Lattner
268e8dd791
New testcase
...
llvm-svn: 2783
2002-06-25 19:53:12 +00:00
Chris Lattner
daf228fe8b
Add borders to truth tables
...
llvm-svn: 2782
2002-06-25 18:06:50 +00:00
Chris Lattner
d8f8ede5eb
Minor tuning and fleshing out of the language reference.
...
llvm-svn: 2781
2002-06-25 18:03:17 +00:00
Chris Lattner
7965113d22
Build all subdirectories
...
llvm-svn: 2780
2002-06-25 16:16:20 +00:00
Chris Lattner
113f4f4609
MEGAPATCH checkin.
...
For details, See: docs/2002-06-25-MegaPatchInfo.txt
llvm-svn: 2779
2002-06-25 16:13:24 +00:00
Chris Lattner
7076ff29ed
MEGAPATCH checkin.
...
For details, See: docs/2002-06-25-MegaPatchInfo.txt
llvm-svn: 2778
2002-06-25 16:13:21 +00:00
Chris Lattner
fda72b1aad
*** empty log message ***
...
llvm-svn: 2777
2002-06-25 16:12:52 +00:00
Chris Lattner
6e3c5fada6
Description of a large patch that I checked in
...
llvm-svn: 2776
2002-06-25 16:09:22 +00:00
Chris Lattner
5aa3a0779e
Simplify the code that adds passes so compilation can stop after any step
...
llvm-svn: 2775
2002-06-25 15:57:43 +00:00
Chris Lattner
f8b0668cc1
* Update with MegaPatch
...
* Fix various bugs
llvm-svn: 2774
2002-06-25 15:57:03 +00:00
Chris Lattner
069a795940
* Update to work with Megapatch
...
* Add two new checks:
* PHI nodes must be the first thing in a basic block, all grouped together
* All basic blocks should only end with terminator insts, not contain them
llvm-svn: 2773
2002-06-25 15:56:27 +00:00
Chris Lattner
2ae9cda097
Remove DynamicConstantMerge pass, because it did not fit in with the Pass
...
system correctly.
llvm-svn: 2772
2002-06-25 15:55:29 +00:00
Chris Lattner
6eeda027c7
Remove "fixers" for problems in GCC generated code that cannot be generated
...
anymore.
llvm-svn: 2771
2002-06-25 15:55:03 +00:00
Anand Shukla
8c1c854022
Relocating Graph.h
...
llvm-svn: 2770
2002-06-25 14:28:55 +00:00
Chris Lattner
08dd46a661
Test more thoroughly
...
llvm-svn: 2769
2002-06-24 21:37:08 +00:00
Chris Lattner
0da785168b
Expose the analyzer
...
llvm-svn: 2768
2002-06-24 21:35:50 +00:00
Chris Lattner
e2d7896d9b
Basic test of the inlinr
...
llvm-svn: 2767
2002-06-24 17:46:05 +00:00