Misha Brukman
ba5c703619
Do not hastily change the Opcode from 'r' to 'i' type if we're not actually
...
SETTING the operand to be an immediate or have verified that one of the operands
is really a SignExtended or Unextended immediate value already, which warrants
an 'i' opcode.
llvm-svn: 6662
2003-06-07 02:34:43 +00:00
Misha Brukman
b126ea43eb
I have finally seen the light. The code to change the opcode must live higher in
...
the loop, and in both cases. In the first case, it is a VReg that is a constant
so it may be actually converted to a constant. In the second case, it is already
a constant, but then if it doesn't change its type (e.g. to become a register
and have the value loaded from memory if it is too large to live in its
instruction field), we must change the opcode BEFORE the 'continue', otherwise
we miss the opportunity.
llvm-svn: 6602
2003-06-04 04:54:06 +00:00
Misha Brukman
7a5eac8485
Moved code to modify the opcode from 'reg' to 'imm' form to a more logical place.
...
llvm-svn: 6563
2003-06-03 03:18:20 +00:00
Vikram S. Adve
d43c10b583
Added MachineCodeForInstruction object as an argument to
...
TmpInstruction constructors because every TmpInstruction object has
to be registered with a MachineCodeForInstruction to prevent leaks.
This simplifies the user's code.
llvm-svn: 6469
2003-05-31 07:41:24 +00:00
Misha Brukman
b1b8a6732e
When converting virtual registers to immediate constants, change the opcode.
...
llvm-svn: 6452
2003-05-30 20:36:27 +00:00
Chris Lattner
3e687b8b65
Remove unneccesary &*
...
llvm-svn: 5871
2003-04-23 16:36:11 +00:00
Chris Lattner
301e1307d2
Move sparc specific code into the Sparc backend
...
llvm-svn: 5317
2003-01-15 21:36:50 +00:00
Chris Lattner
ec5237b2fe
Fix bug in previous checkin
...
llvm-svn: 5310
2003-01-15 20:32:15 +00:00
Chris Lattner
c934e3fa5f
Minor changes
...
llvm-svn: 5302
2003-01-15 19:47:53 +00:00
Chris Lattner
4c178a5732
Remove dead code
...
llvm-svn: 5298
2003-01-15 19:22:38 +00:00
Chris Lattner
b27d60ccf1
Rename MachineInstrInfo -> TargetInstrInfo
...
llvm-svn: 5272
2003-01-14 22:00:31 +00:00
Chris Lattner
dfa3c21f1c
More renamings of Target/Machine*Info to Target/Target*Info
...
llvm-svn: 5204
2002-12-29 03:13:05 +00:00
Chris Lattner
0141841bc4
Fix warning
...
llvm-svn: 4649
2002-11-09 00:49:43 +00:00
Chris Lattner
c3e30fed7b
Use higher level method
...
llvm-svn: 4386
2002-10-29 17:25:41 +00:00
Chris Lattner
7d6709e213
MachineInstrInfo no longer #includes this header, so we must
...
llvm-svn: 4366
2002-10-28 23:54:47 +00:00
Chris Lattner
fdca057f8d
Remove usage of MachineBasicBlock::get
...
llvm-svn: 4342
2002-10-28 19:01:16 +00:00
Chris Lattner
7cdc2977f0
Change MachineBasicBlock's to not be Annotations, instead they are kept as
...
part of a linked list tracked by MachineFunction. MachineBasicBlock::get
is now linear time instead of constant time, and thus is deprecated!
llvm-svn: 4337
2002-10-28 05:30:46 +00:00
Chris Lattner
e309cdbc95
Rename the redundant MachineOperand::getOperandType() to MachineOperand::getType()
...
llvm-svn: 4331
2002-10-28 04:45:29 +00:00
Chris Lattner
dd22b9e8b6
Add #includes now that MachineInstr.h doesn't include llvm/Target/MachineInstrInfo.h
...
llvm-svn: 4327
2002-10-28 02:28:39 +00:00
Chris Lattner
df1d87f5f3
*** empty log message ***
...
llvm-svn: 4323
2002-10-28 02:01:37 +00:00
Chris Lattner
b8c6acfbc0
Rename MachineCodeForBasicBlock to MachineBasicBlock
...
llvm-svn: 4318
2002-10-28 01:41:47 +00:00
Misha Brukman
142795fd17
Changed MachineCodeForMethod' to
MachineFunction'.
...
llvm-svn: 4301
2002-10-28 00:28:31 +00:00
Chris Lattner
47508d5c0f
Tell PassManager that this pass does not invalidate the CFG so that dominator
...
information and Loop info will not have to be recomputed after this runs.
llvm-svn: 4269
2002-10-23 03:30:47 +00:00
Vikram S. Adve
3a54b695ce
Significant improvement: GEP used by a load or store no longer generates
...
a separate ADD; instead just use the indexed load/store instruction!
Also, a bug fix: folding a GEP with a leading non-zero index with
its predecessor was incorrect: now it only happens if the predecessor
is pointing to an indexable type (aka SequentialType).
llvm-svn: 4168
2002-10-14 16:30:55 +00:00
Vikram S. Adve
01e64b5eef
Bug fix in folding getElementPtr instructions: don't fold one into
...
a predecessor if it has a non-zero first index and the predecessor
ends with a struct index.
llvm-svn: 3982
2002-09-29 22:55:05 +00:00
Vikram S. Adve
c795b90eac
Sign-extend integer constants from original type size to 64 bits!
...
llvm-svn: 3958
2002-09-27 14:26:20 +00:00
Chris Lattner
7c1b7e5889
Add support for GCC 2.96
...
llvm-svn: 3777
2002-09-17 17:23:09 +00:00
Vikram S. Adve
533c888d4a
Add a version of ChooseRegOrImmed to handle numerical constants
...
introduced by InstrSelection.
llvm-svn: 3735
2002-09-16 15:15:57 +00:00
Chris Lattner
23bd92aeeb
Fix a bug I introduced into the code generator. :(
...
llvm-svn: 3694
2002-09-12 20:27:10 +00:00
Chris Lattner
18e3c4ff50
- Change getelementptr instruction to use long indexes instead of uint
...
indexes for sequential types.
llvm-svn: 3681
2002-09-11 01:21:29 +00:00
Chris Lattner
22bcab6bd5
Make sure the leakdetector is told about temporary Phi nodes also, so it doesn't
...
erroneously report them as leaks
llvm-svn: 3624
2002-09-08 21:19:29 +00:00
Chris Lattner
1c2e1ebb5c
Inform the memory leak detector that TmpInstruction objects should not be
...
subject to memory leak checking.
llvm-svn: 3623
2002-09-08 21:08:43 +00:00
Chris Lattner
3ce5b343c5
- Renamed Type::isIntegral() to Type::isInteger()
...
- Added new method Type::isIntegral() that is the same as isInteger, but
also accepts bool.
llvm-svn: 3574
2002-09-03 01:08:28 +00:00
Vikram S. Adve
b8a0f00662
Use newly-added type inspection support in InstTreeNode subclasses.
...
llvm-svn: 3501
2002-08-24 21:02:09 +00:00
Vikram S. Adve
3190395e10
Moved code here to extract memory instruction indices and to check
...
whether FoldGetElemNodes should be called. This is machine-independent
but was in the Sparc directory. This is in a new function: GetMemInstArgs.
llvm-svn: 3500
2002-08-24 21:00:08 +00:00
Anand Shukla
656de9732b
Added #include <alloca.h>
...
llvm-svn: 3491
2002-08-23 10:54:26 +00:00
Chris Lattner
20b85d96e4
Eliminated the MemAccessInst class, folding contents into GEP class.
...
llvm-svn: 3487
2002-08-22 23:37:20 +00:00
Vikram S. Adve
0672c43566
dumpNode() does not need to print MachineInstrs.
...
llvm-svn: 3444
2002-08-22 02:59:46 +00:00
Vikram S. Adve
21b0deb4ab
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
Chris Lattner
8a4787495a
* 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
c95ce32146
We are using std::vector, so remove extraneous namespace prefixes
...
llvm-svn: 3275
2002-08-09 20:05:34 +00:00
Vikram S. Adve
3489677a7e
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
44a988ebf2
* 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
17bb18af72
Remove unused vector
...
llvm-svn: 3143
2002-07-30 02:52:40 +00:00
Mehwish Nagda
7311aa4f84
moving to the Reoptimizer/Mapping dir
...
llvm-svn: 2993
2002-07-22 22:10:55 +00:00
Chris Lattner
99ad379582
*** empty log message ***
...
llvm-svn: 2985
2002-07-22 02:10:13 +00:00
Mehwish Nagda
78d892eb4f
changed size computation
...
llvm-svn: 2974
2002-07-19 22:54:08 +00:00
Mehwish Nagda
219eac01f4
added check for Function with 0 BB
...
llvm-svn: 2942
2002-07-17 23:40:33 +00:00
Mehwish Nagda
01b0cf5ea1
Now will profile all Basic Blocks
...
llvm-svn: 2922
2002-07-16 17:48:27 +00:00
Mehwish Nagda
b73d836e54
Initial checking : Writes LLVM - MI mappiing to the .s file
...
llvm-svn: 2911
2002-07-15 23:08:49 +00:00