summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/TargetData.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Do not dereference invalid ranges. Generalize targetdata alignment model.Chris Lattner2007-02-171-59/+49
| | | | | | This fixes the UnitTests/Vector/sumarray-dbl regressions. llvm-svn: 34358
* Fix CodeGen/PowerPC/2007-02-16-AlignPacked.llChris Lattner2007-02-161-2/+2
| | | | llvm-svn: 34356
* Remove an unnecessary predicate.Reid Spencer2007-02-161-1/+1
| | | | | | Patch by Scott Michel. llvm-svn: 34354
* simplify some code, ensure that packed structures get abi alignment of 1.Chris Lattner2007-02-161-18/+11
| | | | llvm-svn: 34352
* For PR1195:Reid Spencer2007-02-151-4/+4
| | | | | | PACKED_ALIGN -> VECTOR_ALIGN llvm-svn: 34330
* For PR1202:Reid Spencer2007-02-151-1/+2
| | | | | | Make sure we found an existing Alignment before overwriting it. llvm-svn: 34308
* For PR1195:Reid Spencer2007-02-151-3/+3
| | | | | | | Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and PackedTyID -> VectorTyID. No functional changes. llvm-svn: 34293
* Fixed packed structure breakage from earlier TargetData patch; appliedReid Spencer2007-02-151-75/+31
| | | | | | | | Chris Lattner's code style suggestions. Patch by Scott Michel! llvm-svn: 34292
* Generalize TargetData strings, to support more interesting forms of data.Chris Lattner2007-02-141-214/+307
| | | | | | Patch by Scott Michel. llvm-svn: 34266
* Switch LayoutInfo to be a DenseMap instead of an std::map. This speeds upChris Lattner2007-02-101-13/+31
| | | | | | -load-vn -gcse by 2.3%. llvm-svn: 34160
* add a typedefChris Lattner2007-02-101-9/+8
| | | | llvm-svn: 34159
* eliminate the std::vector from StructLayout, allocating the elements immediatelyChris Lattner2007-02-101-43/+57
| | | | | | | after the StructLayout object in memory. This marginally improves locality, speeding up -load-vn -gcse by ~0.8%. llvm-svn: 34158
* encapsulate the rest of the StructLayout members.Chris Lattner2007-02-101-4/+4
| | | | llvm-svn: 34157
* Privatize StructLayout::MemberOffsets, adding an accessorChris Lattner2007-02-101-2/+1
| | | | llvm-svn: 34156
* Use ManagedStatic to manage LayoutInfo, instead of rolling our own.Chris Lattner2007-02-101-27/+24
| | | | llvm-svn: 34154
* Change TargetData::getIndexedOffset interface to not require indicesChris Lattner2007-02-101-8/+8
| | | | | | in a vector. llvm-svn: 34153
* Although targets are not required to support integers > 64bits, TargetDataReid Spencer2007-02-051-2/+4
| | | | | | | | | | | must in order for backends that do want to support large integer types to be able to function. Consequently, don't assert if the bitwidth > 64 bits when computing the size and alignment. Instead, compute the size by rounding up to the next even number of bytes for the size. Compute the alignment as the same as the LongABIAlignment. These provide reasonable defaults that the target can override. llvm-svn: 33943
* Dead comment.Evan Cheng2007-01-311-1/+0
| | | | llvm-svn: 33719
* For PR761:Reid Spencer2007-01-261-21/+3
| | | | | | | The Module::setEndianness and Module::setPointerSize methods have been removed. Instead you can get/set the DataLayout. Adjust thise accordingly. llvm-svn: 33530
* Renamed getTypeAlignmentShift() to getPreferredTypeAlignmentShift().Evan Cheng2007-01-241-2/+2
| | | | llvm-svn: 33482
* - getTypeAlignmentShift() should be returning preferred alignment, not ABIEvan Cheng2007-01-221-3/+1
| | | | | | | alignment. - getPreferredAlignmentLog(): remove Double special case. llvm-svn: 33445
* Implement a getTypeSizeInBits method. This helps in transforms that wantReid Spencer2007-01-201-0/+10
| | | | | | to ensure the bit size of a type is identical before proceeding. llvm-svn: 33413
* TargetData assumes (and some regression tests depend on it) that the size ofOwen Anderson2007-01-201-4/+11
| | | | | | an unspecified datatype in the datalayout is capped by the size of a pointer. llvm-svn: 33411
* trivial cleanupChris Lattner2007-01-201-2/+0
| | | | llvm-svn: 33410
* Teach TargetData to handle 'preferred' alignment for each target, and useChris Lattner2007-01-201-57/+186
| | | | | | these alignment amounts to align scalars when we can. Patch by Scott Michel! llvm-svn: 33409
* For PR1064:Reid Spencer2007-01-121-6/+15
| | | | | | | | | | | | | | | | | | | | | | | Implement the arbitrary bit-width integer feature. The feature allows integers of any bitwidth (up to 64) to be defined instead of just 1, 8, 16, 32, and 64 bit integers. This change does several things: 1. Introduces a new Derived Type, IntegerType, to represent the number of bits in an integer. The Type classes SubclassData field is used to store the number of bits. This allows 2^23 bits in an integer type. 2. Removes the five integer Type::TypeID values for the 1, 8, 16, 32 and 64-bit integers. These are replaced with just IntegerType which is not a primitive any more. 3. Adjust the rest of LLVM to account for this change. Note that while this incremental change lays the foundation for arbitrary bit-width integers, LLVM has not yet been converted to actually deal with them in any significant way. Most optimization passes, for example, will still only deal with the byte-width integer types. Future increments will rectify this situation. llvm-svn: 33113
* Rename BoolTy as Int1Ty. Patch by Sheng Zhou.Reid Spencer2007-01-111-1/+1
| | | | llvm-svn: 33076
* For PR950:Reid Spencer2006-12-311-12/+8
| | | | | | | | | | | | | | | | | | Three changes: 1. Convert signed integer types to signless versions. 2. Implement the @sext and @zext parameter attributes. Previously the type of an function parameter was used to determine whether it should be sign extended or zero extended before the call. This information is now communicated via the function type's parameter attributes. 3. The interface to LowerCallTo had to be changed in order to accommodate the parameter attribute information. Although it would have been convenient to pass in the FunctionType itself, there isn't always one present in the caller. Consequently, a signedness indication for the result type and for each parameter was provided for in the interface to this method. All implementations were changed to make the adjustment necessary. llvm-svn: 32788
* Packed StructuresAndrew Lenharth2006-12-081-1/+1
| | | | llvm-svn: 32361
* Move getPreferredAlignmentLog from AsmPrinter to TargetDataDevang Patel2006-10-241-0/+23
| | | | llvm-svn: 31171
* For PR950:Reid Spencer2006-10-201-2/+2
| | | | | | | | This patch implements the first increment for the Signless Types feature. All changes pertain to removing the ConstantSInt and ConstantUInt classes in favor of just using ConstantInt. llvm-svn: 31063
* Don't pass target name into TargetData anymore, it is never used or needed.Chris Lattner2006-06-161-1/+1
| | | | | | | Remove explicit casts to std::string now that there is no overload resolution issues in the TargetData ctors. llvm-svn: 28830
* Remove ctor with each piece specifyable (which causes overload ambiguities),Chris Lattner2006-06-161-32/+1
| | | | | | add a new init method. llvm-svn: 28828
* Make TargetData strings less redundant.Owen Anderson2006-05-201-7/+0
| | | | llvm-svn: 28423
* Fix a parsing bug that caused 7 llvm-test regressions on PPC last night.Chris Lattner2006-05-201-7/+7
| | | | | | I'm suprised it didn't cause more! llvm-svn: 28421
* Make all of the TargetMachine subclasses use the new string TargetData methods.Owen Anderson2006-05-201-1/+5
| | | | | | This is part of the on-going work on PR 761. llvm-svn: 28414
* Fix a stupid bug when parsing TargetData strings.Owen Anderson2006-05-171-1/+3
| | | | llvm-svn: 28373
* Add a method to generate a string representation from a TargetData.Owen Anderson2006-05-121-0/+21
| | | | | | This continues the work on PR 761. llvm-svn: 28239
* Fix some tabbing issues.Owen Anderson2006-05-121-29/+29
| | | | llvm-svn: 28237
* Add a new constructor to TargetData that builds a TargetData from itsOwen Anderson2006-05-121-0/+65
| | | | | | | | string representation. This is part of PR 761. llvm-svn: 28234
* revert previous patchChris Lattner2006-04-031-1/+1
| | | | llvm-svn: 27383
* Align vectors to the size in bytes, not bits.Chris Lattner2006-04-031-1/+1
| | | | llvm-svn: 27376
* TargetData.cpp::getTypeInfo() was returning alignment of element type as theEvan Cheng2006-03-311-0/+3
| | | | | | | | | alignment of a packed type. This is obviously wrong. Added a workaround that returns the size of the packed type as its alignment. The correct fix would be to return a target dependent alignment value provided via TargetLowering (or some other interface). llvm-svn: 27319
* Implement a new InvalidateStructLayoutInfo method and add some commentsChris Lattner2006-01-141-0/+18
| | | | llvm-svn: 25304
* Update to use the new MathExtras.h support for log2 computation.Chris Lattner2005-08-021-1/+1
| | | | | | Patch contributed by Jim Laskey! llvm-svn: 22594
* Remove trailing whitespaceMisha Brukman2005-04-211-5/+5
| | | | llvm-svn: 21422
* add a StructLayout::getElementContainingOffset method.Chris Lattner2005-03-131-0/+17
| | | | llvm-svn: 20579
* Initial support for packed types, contributed by Morten OfstadChris Lattner2004-12-011-0/+7
| | | | llvm-svn: 18406
* Fix this function to not say that longs have 8-byte alignment on X86/PPC.Chris Lattner2004-11-021-1/+1
| | | | | | | | | This method is really a gross hack, but at least we can make it work on the targets we support right now. This bug fix stops a crash in a testcase reduced from 176.gcc llvm-svn: 17443
* Changes For Bug 352Reid Spencer2004-09-011-1/+1
| | | | | | | | Move include/Config and include/Support into include/llvm/Config, include/llvm/ADT and include/llvm/Support. From here on out, all LLVM public header files must be under include/llvm/. llvm-svn: 16137
OpenPOWER on IntegriCloud