Brian Gaeke
d25f86d683
Put all LLVM code into the llvm namespace, as per bug 109.
...
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
Misha Brukman
22e5a5848b
Make code layout more consistent.
...
llvm-svn: 9426
2003-10-23 17:39:37 +00:00
John Criswell
b402729b30
Added LLVM project notice to the top of every C++ source file.
...
Header files will be on the way.
llvm-svn: 9298
2003-10-20 19:43:21 +00:00
Vikram S. Adve
1414fba288
All constant-evaluation code now unified into
...
TargetInstrInfo::ConvertConstantToIntType().
llvm-svn: 7390
2003-07-29 19:50:12 +00:00
Chris Lattner
9c569f48a0
Remove unnecessary casts
...
llvm-svn: 7250
2003-07-23 15:17:51 +00:00
Chris Lattner
67138b2c59
Remove using decl
...
llvm-svn: 7246
2003-07-23 14:55:59 +00:00
Vikram S. Adve
d7b18ee501
Choose register instead of immediate for ConstantExpr in ChooseRegOrImmed.
...
llvm-svn: 7112
2003-07-06 20:33:21 +00:00
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
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
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
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
Misha Brukman
142795fd17
Changed MachineCodeForMethod' to
MachineFunction'.
...
llvm-svn: 4301
2002-10-28 00:28:31 +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
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
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
Chris Lattner
20b85d96e4
Eliminated the MemAccessInst class, folding contents into GEP class.
...
llvm-svn: 3487
2002-08-22 23:37:20 +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
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
17bb18af72
Remove unused vector
...
llvm-svn: 3143
2002-07-30 02:52:40 +00:00
Vikram S. Adve
3d968bccd8
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
Chris Lattner
fd8d5b852c
Replace all usages of Type::isPointerType with isa<PointerType>
...
llvm-svn: 2486
2002-05-06 16:15:30 +00:00
Chris Lattner
96e0c48175
Eliminate duplicate or unneccesary #include's
...
llvm-svn: 2397
2002-04-29 17:42:12 +00:00
Chris Lattner
321a8cf4ba
Split ConstantVals.h into Constant.h and Constants.h
...
llvm-svn: 2378
2002-04-28 19:55:58 +00:00
Chris Lattner
bc15ae64dd
Change references to the Method class to be references to the Function
...
class. The Method class is obsolete (renamed) and all references to it
are being converted over to Function.
llvm-svn: 2144
2002-04-07 20:49:59 +00:00
Vikram S. Adve
1e6ab6f476
Fix a bug in previous bug fix.
...
llvm-svn: 2069
2002-03-31 18:56:51 +00:00
Vikram S. Adve
34306e0e1c
Major overhaul to FoldGetElemPtr to handle mixed array and struct refs.
...
llvm-svn: 1968
2002-03-24 03:37:53 +00:00
Vikram S. Adve
b26ed73c33
Constants are now added to the constant pool only when a load
...
instruction is actually generated for them.
Rename the different versions of SetMachineOperand.
llvm-svn: 1903
2002-03-18 03:33:43 +00:00
Chris Lattner
92340322ab
* Switch over to cleaner TmpInstruction model
...
llvm-svn: 1648
2002-02-03 07:39:06 +00:00
Chris Lattner
3dc9a2a61f
Changes to build successfully with GCC 3.02
...
llvm-svn: 1503
2002-01-20 22:54:45 +00:00
Vikram S. Adve
0607fbbf01
Eliminate all uses of memInst->getIndicesBROKEN().
...
llvm-svn: 1485
2001-12-15 00:36:32 +00:00
Chris Lattner
f6b7da2bb5
Rename ConstPoolVal -> Constant
...
Rename ConstPool* -> Constant*
Rename ConstPoolVals.h -> ConstantVals.h
llvm-svn: 1407
2001-12-03 22:26:30 +00:00
Chris Lattner
9236d30e29
The old getIndices has been deprecated, because it no longer works. It now
...
is named getIndicesBROKEN() and shall be removed when the codebase is updated
to not call it
llvm-svn: 1338
2001-11-26 16:56:19 +00:00
Vikram S. Adve
a8f8fd19c0
Don't assume constant operand can only be in position 1!
...
llvm-svn: 1308
2001-11-14 18:49:45 +00:00