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
Vikram S. Adve
9ed66f8e94
Idiotic error in last fix.
...
llvm-svn: 1306
2001-11-14 17:55:02 +00:00
Vikram S. Adve
e3c0a06ef9
Don't need to load a NULL pointer constant from memory!
...
llvm-svn: 1305
2001-11-14 17:24:49 +00:00
Chris Lattner
4046596beb
Remove much cruft from the MemAccessInst instruction
...
llvm-svn: 1298
2001-11-14 11:27:58 +00:00
Vikram S. Adve
2cdcbfb6e0
Major overhaul of stack frame management.
...
llvm-svn: 1185
2001-11-08 04:47:06 +00:00
Chris Lattner
ea63d43a07
Minor method rename
...
llvm-svn: 1119
2001-11-04 08:08:34 +00:00
Vikram S. Adve
7cb485ebbd
Record constants that need to be emitted in the assembly code.
...
llvm-svn: 1010
2001-10-28 21:46:23 +00:00
Vikram S. Adve
34b17e8a37
1. Add a bottom-up pass on BURG trees that is used to fix constant operands.
...
Needs to be bottom up because constant values may be forward-substituted
to their uses (i.e., into the parent in the BURG tree).
2. Move most of the constant-fixup code into machine-indepedent file
InstrSelectionSupport.cpp.
llvm-svn: 859
2001-10-17 23:57:50 +00:00
Vikram S. Adve
2c19cf9a69
Machine-independent code generation routines used in instruction
...
selection. These used to live in several different places before.
llvm-svn: 719
2001-10-10 20:50:43 +00:00