Devang Patel
0691019e12
Move getPreferredAlignmentLog from AsmPrinter to TargetData
...
llvm-svn: 31171
2006-10-24 20:32:14 +00:00
Reid Spencer
d414793dbc
For PR950:
...
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
2006-10-20 07:07:24 +00:00
Chris Lattner
6a9ec7e80e
Don't pass target name into TargetData anymore, it is never used or needed.
...
Remove explicit casts to std::string now that there is no overload resolution
issues in the TargetData ctors.
llvm-svn: 28830
2006-06-16 18:22:52 +00:00
Chris Lattner
9fcdb0d7e5
Remove ctor with each piece specifyable (which causes overload ambiguities),
...
add a new init method.
llvm-svn: 28828
2006-06-16 18:11:26 +00:00
Owen Anderson
4a78af08aa
Make TargetData strings less redundant.
...
llvm-svn: 28423
2006-05-20 23:28:54 +00:00
Chris Lattner
c7de368bda
Fix a parsing bug that caused 7 llvm-test regressions on PPC last night.
...
I'm suprised it didn't cause more!
llvm-svn: 28421
2006-05-20 21:16:59 +00:00
Owen Anderson
c6947bf2ce
Make all of the TargetMachine subclasses use the new string TargetData methods.
...
This is part of the on-going work on PR 761.
llvm-svn: 28414
2006-05-20 00:24:56 +00:00
Owen Anderson
ab4cc2c9a5
Fix a stupid bug when parsing TargetData strings.
...
llvm-svn: 28373
2006-05-17 21:56:02 +00:00
Owen Anderson
1245bd420e
Add a method to generate a string representation from a TargetData.
...
This continues the work on PR 761.
llvm-svn: 28239
2006-05-12 07:01:44 +00:00
Owen Anderson
a0a9e4584a
Fix some tabbing issues.
...
llvm-svn: 28237
2006-05-12 06:06:55 +00:00
Owen Anderson
30ffff31f2
Add a new constructor to TargetData that builds a TargetData from its
...
string representation.
This is part of PR 761.
llvm-svn: 28234
2006-05-12 05:49:47 +00:00
Chris Lattner
ab96554280
revert previous patch
...
llvm-svn: 27383
2006-04-03 23:14:49 +00:00
Chris Lattner
758878175b
Align vectors to the size in bytes, not bits.
...
llvm-svn: 27376
2006-04-03 19:28:50 +00:00
Evan Cheng
fc0a2ac06e
TargetData.cpp::getTypeInfo() was returning alignment of element type as the
...
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
2006-03-31 22:33:42 +00:00
Chris Lattner
bf03ecb920
Implement a new InvalidateStructLayoutInfo method and add some comments
...
llvm-svn: 25304
2006-01-14 00:07:34 +00:00
Chris Lattner
cc8ae687e1
Update to use the new MathExtras.h support for log2 computation.
...
Patch contributed by Jim Laskey!
llvm-svn: 22594
2005-08-02 19:26:06 +00:00
Misha Brukman
933cdaf254
Remove trailing whitespace
...
llvm-svn: 21422
2005-04-21 22:55:34 +00:00
Chris Lattner
112de16cf5
add a StructLayout::getElementContainingOffset method.
...
llvm-svn: 20579
2005-03-13 19:04:41 +00:00
Chris Lattner
a94cee5109
Initial support for packed types, contributed by Morten Ofstad
...
llvm-svn: 18406
2004-12-01 17:14:28 +00:00
Chris Lattner
f2976f16ce
Fix this function to not say that longs have 8-byte alignment on X86/PPC.
...
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
2004-11-02 22:18:18 +00:00
Reid Spencer
c4abcbefb1
Changes For Bug 352
...
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
2004-09-01 22:55:40 +00:00
Chris Lattner
07fb5b0df4
Add a new helper method to get log2(type alignment)
...
llvm-svn: 15887
2004-08-17 19:13:00 +00:00
Misha Brukman
2b0205b8ab
* Add BoolAlignment to TargetData, default is 1 byte, size 1 byte
...
* Convert tabs to spaces
llvm-svn: 15120
2004-07-23 01:09:52 +00:00
Chris Lattner
36f2a4eb77
Nuke a clearly bogus assertion
...
llvm-svn: 14854
2004-07-15 07:44:34 +00:00
Brian Gaeke
318c4cf9c2
Fix use-before-def thinko
...
llvm-svn: 14570
2004-07-02 07:01:31 +00:00
Chris Lattner
3fd0ea69f6
Handle targets where alignment can be bigger than the size of the data.
...
Contributed by Vladimir Prus!
llvm-svn: 14534
2004-07-01 17:32:59 +00:00
Chris Lattner
0cd29ae2cd
Rename Type::PrimitiveID to TypeId and ::getPrimitiveID() to ::getTypeID()
...
llvm-svn: 14201
2004-06-17 18:19:28 +00:00
Brian Gaeke
8e2fb33172
Fix typo.
...
llvm-svn: 12953
2004-04-14 21:21:56 +00:00
Chris Lattner
9236135e8f
Support getelementptr instructions which use uint's to index into structure
...
types and can have arbitrary 32- and 64-bit integer types indexing into
sequential types.
llvm-svn: 12653
2004-04-05 01:30:19 +00:00
Chris Lattner
4aff6ec077
Use a map instead of annotations
...
llvm-svn: 11875
2004-02-26 08:02:17 +00:00
Chris Lattner
16690fad3d
Adjust to the changed StructType interface. In particular, getElementTypes() is gone.
...
llvm-svn: 11228
2004-02-09 04:37:31 +00:00
Chris Lattner
be3440d4e3
finegrainify namespacification
...
add new getIntPtrType() method
llvm-svn: 10579
2003-12-22 05:01:15 +00:00
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
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
Chris Lattner
d22a618a27
Add support for 'any' pointer size and endianness
...
llvm-svn: 8120
2003-08-24 13:49:22 +00:00
Misha Brukman
56f7db4178
Spell `necessary' correctly.
...
llvm-svn: 7944
2003-08-18 14:43:39 +00:00
Chris Lattner
1351c304dc
Remove redundant const qualifiers from cast<> expressions
...
llvm-svn: 7253
2003-07-23 15:30:06 +00:00
Chris Lattner
7190c04fc5
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
15a27e40c6
Undo one of those last fixes -- it was incorrect.
...
llvm-svn: 6593
2003-06-04 02:10:37 +00:00
Chris Lattner
a6e3ff1b5a
Minor cleanups
...
llvm-svn: 6535
2003-06-02 05:21:06 +00:00
Chris Lattner
6253a2a210
* 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
bbe1aba425
Remove two fields from TargetData which are target specific.
...
llvm-svn: 5963
2003-04-26 20:11:09 +00:00
Chris Lattner
e26e308afb
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
b258ffd600
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
c06795629d
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
b1aeaf7efb
Remove wierd case that can never happen
...
llvm-svn: 5623
2003-02-25 20:27:09 +00:00
Chris Lattner
5d798b7887
* Privatize the TargetName
...
* Move optSizeForSubWordData to TargetData
* Remove unused fields
llvm-svn: 4417
2002-10-29 21:48:17 +00:00
Chris Lattner
294eae6735
- Add an endianness field to the TargetData datastructure
...
llvm-svn: 4174
2002-10-14 22:41:13 +00:00
Vikram S. Adve
c6fe6822ca
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
0f9d9214ab
Convert TargetData to be an ImmutablePass
...
llvm-svn: 3927
2002-09-25 23:46:55 +00:00