Commit Graph

724 Commits

Author SHA1 Message Date
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
b3eac89323 Implement DataTypes.h in terms of inttypes.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2729 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-23 15:48:12 +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
Chris Lattner
1ea5c56795 Spell aggressive right
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2549 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-07 22:12:52 +00:00
Chris Lattner
a7980c0a08 Fix misspelling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2548 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-07 22:12:36 +00:00
Chris Lattner
3bcf74e298 These files are supersumed by include/llvm/Transforms/Scalar.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2534 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-07 19:38:42 +00:00
Chris Lattner
332f3679d0 New header file to replace all of the Scalar/*.h files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2533 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-07 19:37:18 +00:00
Chris Lattner
148a0bfcea Checkin headers for Utils library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2528 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-07 18:52:48 +00:00