Vikram S. Adve
3db97eb499
Unary Not (boolean and bitwise) is no longer a separate LLVM instruction
...
but is instead implemented with XOR. Note that the InstrForest opLabels
for Not and BNot remain the same, i.e., the XOR is recognized and
represented as a (boolean or bitwise) Not when building the instruction
trees. But these tree nodes are now binary, not unary.
llvm-svn: 3343
2002-08-15 14:19:22 +00:00
Vikram S. Adve
fa99db77a8
Add method MachineInstr::substituteValue() which substitutes
...
one Value with another one in all operands and implicit references
of the machine instruction.
llvm-svn: 3306
2002-08-14 16:52:58 +00:00
Chris Lattner
959a5fbf8e
* Removed extraneous #includes
...
* Fixed file headers to be consistent with the rest of LLVM
* Other minor fixes
llvm-svn: 3278
2002-08-09 20:08:06 +00:00
Chris Lattner
02e7a86fec
* Removed extraneous #includes
...
* Fixed file headers to be consistent with the rest of LLVM
* Other minor fixes
llvm-svn: 3277
2002-08-09 20:08:03 +00:00
Chris Lattner
3c3457ccea
We are using std::vector, so remove extraneous namespace prefixes
...
llvm-svn: 3275
2002-08-09 20:05:34 +00:00
Chris Lattner
e08000ac9f
Very minor cleanups
...
llvm-svn: 3271
2002-08-09 18:55:18 +00:00
Chris Lattner
f0ed55d1ee
- Cleaned up the interface to AnalysisUsage to take analysis class names
...
instead of ::ID's.
- Pass::getAnalysis<> now no longer takes an optional argument
llvm-svn: 3265
2002-08-08 19:01:30 +00:00
Chris Lattner
40eb9dafed
- Cleaned up the interface to AnalysisUsage to take analysis class names
...
instead of ::ID's.
- Pass::getAnalysis<> now no longer takes an optional argument
llvm-svn: 3264
2002-08-08 19:01:28 +00:00
Vikram S. Adve
1a1c3ed56d
Add function GetConstantValueAsUnsignedInt.
...
Fix 2 bugs in FoldGetElemChain so index vector is not modified
when no GEPs are folded in, and so a hasLeadingZero is computed
only for the last folded GEP, not the one after that if any.
llvm-svn: 3244
2002-08-04 20:49:49 +00:00
Chris Lattner
4bc962d1d5
* Move InstructionSelection Pass here instead of living in Sparc.cpp. It
...
is platform independant afterall.
* Object orientize the functions, cleanup code a bit. Instead of static
global functions, the helpers for instruction selection are now part of
the InstructionSelection Pass class.
llvm-svn: 3147
2002-07-30 03:57:36 +00:00
Chris Lattner
05e148710e
Remove unused vector
...
llvm-svn: 3143
2002-07-30 02:52:40 +00:00
Chris Lattner
e38dce72a7
Refix stuff for GCC 2.95, 3.0.4 & 3.1
...
llvm-svn: 3094
2002-07-25 18:04:48 +00:00
Mehwish Nagda
7a167de851
now removes deleted nops from MachineCodeForInstruction
...
llvm-svn: 3090
2002-07-25 17:31:05 +00:00
Chris Lattner
10073a9080
*** empty log message ***
...
llvm-svn: 3075
2002-07-25 06:17:51 +00:00
Chris Lattner
6c21f2454b
*** empty log message ***
...
llvm-svn: 3058
2002-07-24 21:21:33 +00:00
Chris Lattner
e583333ec9
Non-standard hash classes are not in the std:: namespace
...
llvm-svn: 3057
2002-07-24 21:21:33 +00:00
Chris Lattner
e98dd5fcac
*** empty log message ***
...
llvm-svn: 3056
2002-07-24 21:21:32 +00:00
Mehwish Nagda
c4ffab60d5
moving to the Reoptimizer/Mapping dir
...
llvm-svn: 2993
2002-07-22 22:10:55 +00:00
Chris Lattner
f5cad15a67
*** empty log message ***
...
llvm-svn: 2985
2002-07-22 02:10:13 +00:00
Mehwish Nagda
0644a84a5f
changed size computation
...
llvm-svn: 2974
2002-07-19 22:54:08 +00:00
Mehwish Nagda
98b9e48981
added check for Function with 0 BB
...
llvm-svn: 2942
2002-07-17 23:40:33 +00:00
Mehwish Nagda
81264e6bed
Now will profile all Basic Blocks
...
llvm-svn: 2922
2002-07-16 17:48:27 +00:00
Mehwish Nagda
6c9544a2a0
Initial checking : Writes LLVM - MI mappiing to the .s file
...
llvm-svn: 2911
2002-07-15 23:08:49 +00:00
Anand Shukla
3de6fcfdec
added std:: to endl
...
llvm-svn: 2875
2002-07-11 00:17:17 +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
Anand Shukla
046fe57511
changed mem_fun to std::mem_fun
...
llvm-svn: 2847
2002-07-09 19:18:56 +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
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
Chris Lattner
dec26513ad
Remove tag that just clutters diffs
...
llvm-svn: 2807
2002-06-30 16:08:25 +00:00
Anand Shukla
458496c060
changes to make it compatible with 64bit gcc
...
llvm-svn: 2791
2002-06-25 20:55:50 +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
abe98198a8
Convert RegClass::IsColorUsedArr from a dynamically allocated array to
...
a vector. This makes asserting on array bounds easier.
llvm-svn: 2731
2002-05-23 15:50:03 +00:00
Chris Lattner
afc86e9a35
Move debug options out of header files so that the header does not have
...
to #include CommandLine.h.
llvm-svn: 2712
2002-05-22 17:08:27 +00:00
Chris Lattner
d5ed3694ae
Avoid #including CommandLine.h
...
llvm-svn: 2710
2002-05-22 17:06:56 +00:00
Chris Lattner
99bd13b415
Hide debugging options
...
llvm-svn: 2676
2002-05-20 21:39:10 +00:00
Chris Lattner
9af99f8c74
Don't lose namespace qualifications on previous patch.
...
llvm-svn: 2664
2002-05-20 17:38:26 +00:00
Vikram S. Adve
5d78db2afb
InstrnsBefore and InstrnsAfter are now vectors instead of deques.
...
May be slightly less efficient but significantly reduces special
cases interfaces in code generation.
llvm-svn: 2649
2002-05-19 15:41:33 +00:00
Vikram S. Adve
16384011d2
Better folding getelementptr operations with mixed
...
array and struct indexes.
Update operand values in CallArgsDescriptor (a new class)
when replacing constant values with immediates.
llvm-svn: 2645
2002-05-19 15:34:29 +00:00
Vikram S. Adve
069d51612f
cpValue2Value now needs a vector of MachineInstr to store return values.
...
llvm-svn: 2644
2002-05-19 15:31:08 +00:00