Commit Graph

42 Commits

Author SHA1 Message Date
Chris Lattner ac6db755c3 Adjust to the changed StructType interface. In particular, getElementTypes() is gone.
llvm-svn: 11228
2004-02-09 04:37:31 +00:00
Chris Lattner bb661c18c8 finegrainify namespacification
add new getIntPtrType() method

llvm-svn: 10579
2003-12-22 05:01:15 +00:00
Brian Gaeke 960707c335 Put all LLVM code into the llvm namespace, as per bug 109.
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
John Criswell 482202a601 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
Chris Lattner e34e200e16 Add support for 'any' pointer size and endianness
llvm-svn: 8120
2003-08-24 13:49:22 +00:00
Misha Brukman 7eb05a170a Spell `necessary' correctly.
llvm-svn: 7944
2003-08-18 14:43:39 +00:00
Chris Lattner f26a8ee580 Remove redundant const qualifiers from cast<> expressions
llvm-svn: 7253
2003-07-23 15:30:06 +00:00
Chris Lattner fee44070a1 No really, you _cannot use_ getelementptr on an unsized type: that makes
no sense.

llvm-svn: 6595
2003-06-04 02:35:35 +00:00
Vikram S. Adve 680ee9f634 Undo one of those last fixes -- it was incorrect.
llvm-svn: 6593
2003-06-04 02:10:37 +00:00
Chris Lattner 7b66a726f8 Minor cleanups
llvm-svn: 6535
2003-06-02 05:21:06 +00:00
Chris Lattner 6532e427b4 * Fix divide by zero error with empty structs
* Empty structs should have ALIGNMENT 1, not SIZE 1.

llvm-svn: 6263
2003-05-21 18:08:44 +00:00
Chris Lattner 4f6cdbdf81 Remove two fields from TargetData which are target specific.
llvm-svn: 5963
2003-04-26 20:11:09 +00:00
Chris Lattner b05f851d59 Whoops, 32 bit targets have _4_ byte pointers, not _32_ byte pointers!
llvm-svn: 5937
2003-04-25 06:06:43 +00:00
Chris Lattner e483398516 Allow for easy detection of when a "default" TargetData is created by the
passmanager, which is never the right thing to do.

llvm-svn: 5922
2003-04-25 02:50:45 +00:00
Chris Lattner 42516baf76 add a new targetdata ctor to create a target data appropriate to the module
llvm-svn: 5903
2003-04-24 19:09:05 +00:00
Chris Lattner ae1f73b4f5 Remove wierd case that can never happen
llvm-svn: 5623
2003-02-25 20:27:09 +00:00
Chris Lattner b848956370 * Privatize the TargetName
* Move optSizeForSubWordData to TargetData
* Remove unused fields

llvm-svn: 4417
2002-10-29 21:48:17 +00:00
Chris Lattner 5156bba4c7 - Add an endianness field to the TargetData datastructure
llvm-svn: 4174
2002-10-14 22:41:13 +00:00
Vikram S. Adve a202c0dbfa Don't try to compute the size of an "array" element if the index is 0:
the size may be unknown, and is not needed.

llvm-svn: 4153
2002-10-13 21:47:44 +00:00
Chris Lattner 09cfdcb1a3 Convert TargetData to be an ImmutablePass
llvm-svn: 3927
2002-09-25 23:46:55 +00:00
Chris Lattner 136dab7d86 - Change getelementptr instruction to use long indexes instead of uint
indexes for sequential types.

llvm-svn: 3682
2002-09-11 01:21:33 +00:00
Vikram S. Adve 9068efdce6 Fix sign-extension: it needs to happen *after* multiplying by type size.
llvm-svn: 3497
2002-08-24 14:44:58 +00:00
Vikram S. Adve b342572667 Simplify previous hack slightly.
llvm-svn: 3490
2002-08-23 03:21:01 +00:00
Vikram S. Adve 1c84243d47 Force sign-extension for uint array indexes from 32-bit to 64-bits
since uint is not normally sign-extended when casting to uint64_t.

llvm-svn: 3489
2002-08-23 02:55:51 +00:00
Vikram S. Adve a3efa260ea Bug fix in TargetData::getIndexedOffset: We were using the pointer
type instead of the element type for the element size for arrays.

llvm-svn: 3302
2002-08-13 18:17:56 +00:00
Vikram S. Adve 71895b28cc Bug fix in TargetData::getIndexedOffset(): handle struct offset
after array offset correctly.  The type was not being updated for
array offsets!

llvm-svn: 3246
2002-08-04 20:52:39 +00:00
Chris Lattner 10073a9080 *** empty log message ***
llvm-svn: 3075
2002-07-25 06:17:51 +00:00
Vikram S. Adve 8b831746be Add integer register size field.
Make all sizes and offsets uint64_t instead of uint.
Fixed GetIndexedOffset to handle mixed array and struct indices.

llvm-svn: 2641
2002-05-19 15:28:02 +00:00
Chris Lattner 8b1e4d63fe Extend TargetData::getIndexedOffset to support arrays and pointers!
llvm-svn: 2535
2002-05-07 20:00:33 +00:00
Chris Lattner 181cc32365 Replace all usages of Type::isPointerType with isa<PointerType>
llvm-svn: 2486
2002-05-06 16:15:30 +00:00
Chris Lattner ca14237696 Split ConstantVals.h into Constant.h and Constants.h
llvm-svn: 2378
2002-04-28 19:55:58 +00:00
Chris Lattner b07bf170c6 Remove dead variable
llvm-svn: 1515
2002-01-21 22:50:38 +00:00
Chris Lattner 7f74a56e24 Changes to build successfully with GCC 3.02
llvm-svn: 1503
2002-01-20 22:54:45 +00:00
Vikram S. Adve 721fee255c getIndexedOffset() shd take vector of Values, not of Constants!
llvm-svn: 1484
2001-12-15 00:35:48 +00:00
Chris Lattner 6650d18892 Not just arrays are unsized
llvm-svn: 1450
2001-12-13 00:46:11 +00:00
Chris Lattner 2413b160ec Renamed inst_const_iterator -> const_inst_iterator
Renamed op_const_iterator   -> const_op_iterator
Renamed PointerType::getValueType() -> PointerType::getElementType()

llvm-svn: 1408
2001-12-04 00:03:30 +00:00
Chris Lattner 3462ae3ad7 Rename ConstPoolVal -> Constant
Rename ConstPool*   -> Constant*
Rename ConstPoolVals.h -> ConstantVals.h

llvm-svn: 1407
2001-12-03 22:26:30 +00:00
Vikram S. Adve 3fb79e61c2 Fix cute little bug that was causing the last
structure offset to be ignored in computing an offset!

llvm-svn: 1310
2001-11-14 21:24:44 +00:00
Chris Lattner da55810666 Commit more code over to new cast style
llvm-svn: 697
2001-10-02 03:41:24 +00:00
Chris Lattner 8f19112923 Add more support for new style casts
Convert more code to use them

llvm-svn: 695
2001-10-01 18:26:53 +00:00
Vikram S. Adve 6cefc7072d Renamed files to match the main classes they provide.
Some other minor changes.

llvm-svn: 615
2001-09-18 12:58:33 +00:00
Chris Lattner 22a6a90511 Make a new llvm/Target #include directory.
Move files from lib/CodeGen/TargetMachine to lib/Target
Move TargetData.h and TargetMachine.h to Target/{Data.h|Machine.h}
Prepare to split TargetMachine.h into several smaller files

llvm-svn: 566
2001-09-14 05:34:53 +00:00