Commit Graph

728 Commits

Author SHA1 Message Date
Vikram S. Adve
975f6d4f44 Bug fix: cast (bool) has higher precedence than %... who knew!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2864 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-10 21:51:46 +00:00
Vikram S. Adve
69cacd4710 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2863 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-10 21:50:57 +00:00
Vikram S. Adve
e694366259 Added a few more methods for creating instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2862 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-10 21:49:38 +00:00
Vikram S. Adve
9d22cd4535 Put caller-saving code *before* argument copying code!
(This file has a minor change required for this fix.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2854 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-10 21:30:17 +00:00
Vikram S. Adve
bba2485c70 Minor change in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2853 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-10 21:29:22 +00:00
Chris Lattner
46f824f21d Allow specifying a module for context instead of a slot calculator directly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2851 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-10 16:48:14 +00:00
Anand Shukla
e086f4e897 added std:: to hash_set
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2846 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-09 19:18:16 +00:00
Chris Lattner
53e9983790 Include header in the compiler-neutral location
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2843 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-09 16:50:24 +00:00
Vikram S. Adve
5023bd4a64 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!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2824 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-08 22:44:14 +00:00
Vikram S. Adve
deb9654056 Interface to class MachineCodeForBasicBlock.
Moved here from MachineInstr.h to make it an annotation on BasicBlock.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2823 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-08 22:40:34 +00:00
Vikram S. Adve
7a4be9580e 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2821 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-08 22:38:45 +00:00
Vikram S. Adve
c920dc714d Added two more helper functions for instruction creation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2819 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-08 22:33:45 +00:00
Vikram S. Adve
08272fbdb2 Moved MachineCodeForBB to be an annotation on BasicBlock.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2818 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-08 22:31:11 +00:00
Anand Shukla
4b244ac1b4 Add new << to allow printing modules by reference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2814 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-03 16:52:15 +00:00
Chris Lattner
8137a203f3 Fix comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2803 91177308-0d34-0410-b5e6-96231b3b80d8
2002-06-30 15:50:09 +00:00
Anand Shukla
60a786e9e9 added include<iostream> for cerr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2800 91177308-0d34-0410-b5e6-96231b3b80d8
2002-06-25 22:04:00 +00:00
Chris Lattner
0d1fa55200 We must with with GCC 2.95 :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2787 91177308-0d34-0410-b5e6-96231b3b80d8
2002-06-25 20:33:28 +00:00
Anand Shukla
4a9f933751 changes to make it compatible with 64bit gcc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2786 91177308-0d34-0410-b5e6-96231b3b80d8
2002-06-25 20:22:25 +00:00
Anand Shukla
0bdbfe0b15 Added setSuccessor() method to terminator instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2784 91177308-0d34-0410-b5e6-96231b3b80d8
2002-06-25 20:17:40 +00:00
Chris Lattner
7e70829632 MEGAPATCH checkin.
For details, See: docs/2002-06-25-MegaPatchInfo.txt


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2779 91177308-0d34-0410-b5e6-96231b3b80d8
2002-06-25 16:13:24 +00:00
Chris Lattner
18961504fc *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2777 91177308-0d34-0410-b5e6-96231b3b80d8
2002-06-25 16:12:52 +00:00
Chris Lattner
a51b767df4 Allow const bb's to be checked for containment in a loop
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2754 91177308-0d34-0410-b5e6-96231b3b80d8
2002-06-03 22:10:48 +00:00
Chris Lattner
a338016c7c Simplify the interface to local dce and constprop
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2750 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-26 20:18:35 +00:00
Chris Lattner
85c5465e07 Convert RegClass::IsColorUsedArr from a dynamically allocated array to
a vector.  This makes asserting on array bounds easier.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2731 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-23 15:50:03 +00:00
Chris Lattner
195755ced7 Add a new setSuccessor method to terminator instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2730 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-23 15:48:41 +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
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
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
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
Vikram S. Adve
14e3c44486 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
2002-05-19 15:44:07 +00:00
Vikram S. Adve
c864fde15c 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
2002-05-19 15:43:31 +00:00
Vikram S. Adve
febfae46a7 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
2002-05-19 15:42:21 +00:00
Vikram S. Adve
67d6208d05 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
2002-05-19 15:40:41 +00:00
Vikram S. Adve
8eb04905e8 MachineInstr now inherits from Annotable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2647 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-19 15:39:59 +00:00
Vikram S. Adve
7e684a956a Annotation class for MachineInstr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2643 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-19 15:30:21 +00:00
Vikram S. Adve
f66723fc4b 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
2002-05-19 15:28:02 +00:00
Chris Lattner
017489cfa2 Invoke inst has side effects!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2619 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-14 04:20:25 +00:00
Chris Lattner
ef704a23b4 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
2002-05-13 22:03:16 +00:00
Chris Lattner
0fe2153507 Add prototype for LICM pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2612 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-10 22:44:16 +00:00
Chris Lattner
dd63a37c87 Make sure to call the derived visit versions from the ranged iterator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2607 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-10 22:21:05 +00:00
Chris Lattner
b498cce6b2 Add explicit abort so optimized build knows that the function does not return
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2605 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-10 18:53:55 +00:00
Chris Lattner
cba7a1545a Add an explicit abort so that the optimized build knows the function does
not return.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2604 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-10 18:53:21 +00:00
Chris Lattner
fa10fdf5eb Initial checkin of Statistic class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2599 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-10 15:36:56 +00:00
Chris Lattner
9f7fab5feb remove deprecated getInstType() method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2595 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-10 13:28:47 +00:00
Chris Lattner
531823f125 Add prototype for the PiNodeInserter pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2592 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-10 05:40:37 +00:00
Chris Lattner
540d63cbc7 Add expr reassociation pass prototype
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2558 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-08 22:19:01 +00:00
Sumant Kowshik
9ddc86c6e5 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2552 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-08 18:09:58 +00:00