Duncan Sands
e31c816e49
Factorize code: rather than duplication the logic in getPointerTypeSizeInBits,
...
just call getPointerTypeSizeInBits. No functionality change.
llvm-svn: 166926
2012-10-29 14:30:05 +00:00
Benjamin Kramer
ce620a261d
Lowercase the argument for TargetTransformInfo so it's consistent with all other passes.
...
llvm-svn: 166794
2012-10-26 18:46:15 +00:00
Joerg Sonnenberger
230b3a77a8
Don't explicitly require RTTI and EH.
...
llvm-svn: 166772
2012-10-26 12:15:29 +00:00
Micah Villmow
7c7b8259bc
Add some cleanup to the DataLayout changes requested by Chandler.
...
llvm-svn: 166607
2012-10-24 18:36:13 +00:00
Micah Villmow
ce5e56a156
Back out r166591, not sure why this made it through since I cancelled the command. Bleh, sorry about this!
...
llvm-svn: 166596
2012-10-24 17:25:11 +00:00
Micah Villmow
ae5ce80c36
Delete a directory that wasn't supposed to be checked in yet.
...
llvm-svn: 166591
2012-10-24 17:20:04 +00:00
Micah Villmow
521311700f
Add in support for getIntPtrType to get the pointer type based on the address space.
...
This checkin also adds in some tests that utilize these paths and updates some of the
clients.
llvm-svn: 166578
2012-10-24 15:52:52 +00:00
Elena Demikhovsky
b711ef1960
Special calling conventions for Intel OpenCL built-in library.
...
llvm-svn: 166566
2012-10-24 14:46:16 +00:00
Richard Smith
9a429d8811
Fix ODR violations: a virtual function must be defined, even if it's never
...
called. Provide an (asserting) definition of Operator's private destructor.
Remove destructors from all classes derived from Operator. We don't need them
for safety, because their implicit definitions would be ill-formed (they'd call
Operator's private destructor), and we don't need them to avoid emitting
vtables, because we don't do anything with Operator subclasses which would
trigger vtable instantiation.
The Operator hierarchy is still a complete disaster with regard to undefined
behavior, but this at least allows LLVM to link when using Clang's
-fcatch-undefined-behavior with a new vptr-based type checking mechanism.
llvm-svn: 166530
2012-10-24 00:30:41 +00:00
Nadav Rotem
32e7eee04a
Add a comment which explains why the assert fired and how to fix it.
...
llvm-svn: 166467
2012-10-23 04:35:40 +00:00
Nadav Rotem
afca83738d
Add the "ForceSizeOpt" attribute.
...
Patch by Quentin Colombet <qcolombet@apple.com>
Original description:
"""
The attached patch is the first step to have a better control on Oz related optimizations.
The Oz optimization level focuses on code size, thus I propose to add an attribute called ForceSizeOpt.
"""
llvm-svn: 166422
2012-10-22 17:33:31 +00:00
Hal Finkel
502fe3cc4a
DataLayout should use itself when calculating the size of a vector.
...
This is important for vectors of pointers because only DataLayout,
not the underlying vector type, knows how to calculate the size
of the pointers in the vector. Fixes PR14138.
llvm-svn: 166401
2012-10-21 20:38:03 +00:00
Nadav Rotem
3cce3abf28
Reapply the TargerTransformInfo changes, minus the changes to LSR and Lowerinvoke.
...
llvm-svn: 166248
2012-10-18 23:22:48 +00:00
Bob Wilson
b6adb70bdd
Temporarily revert the TargetTransform changes.
...
The TargetTransform changes are breaking LTO bootstraps of clang. I am
working with Nadav to figure out the problem, but I am reverting it for now
to get our buildbots working.
This reverts svn commits: 165665 165669 165670 165786 165787 165997
and I have also reverted clang svn 165741
llvm-svn: 166168
2012-10-18 05:43:52 +00:00
Bill Wendling
1c85e8a3f4
Revert r166157 because some tests fail...
...
llvm-svn: 166159
2012-10-17 23:56:05 +00:00
Bill Wendling
7f20eaeb70
Check that the operand of the GEP is not the GEP itself. This occurred during an LTO build of LLVM.
...
llvm-svn: 166157
2012-10-17 23:54:19 +00:00
Bill Wendling
b8253baeba
Cleanup whitespace.
...
llvm-svn: 166016
2012-10-16 06:10:45 +00:00
Bill Wendling
86c5a69349
Cleanup whitespace.
...
llvm-svn: 166013
2012-10-16 06:01:44 +00:00
Bill Wendling
2433b08890
Have AttributesImpl defriend the Attributes class.
...
llvm-svn: 166012
2012-10-16 05:57:28 +00:00
Bill Wendling
bd68badfdd
Have AttrBuilder defriend the Attributes class.
...
llvm-svn: 166011
2012-10-16 05:55:09 +00:00
Bill Wendling
86964736b6
Put simple c'tors inline.
...
llvm-svn: 166008
2012-10-16 05:22:28 +00:00
Bill Wendling
7a89835ee4
Move the Attributes::Builder outside of the Attributes class and into its own class named AttrBuilder. No functionality change.
...
llvm-svn: 165960
2012-10-15 20:35:56 +00:00
Bill Wendling
f2fff93263
Add an enum for the return and function indexes into the AttrListPtr object. This gets rid of some magic numbers.
...
llvm-svn: 165924
2012-10-15 07:29:08 +00:00
Bill Wendling
5fb56f15bd
Use a ::get method to create the attribute from Attributes::AttrVals instead of a constructor.
...
llvm-svn: 165923
2012-10-15 06:53:28 +00:00
Bill Wendling
213dd167bc
Move the AttributesImpl header file into the VMCore directory so that it can be opaque.
...
llvm-svn: 165920
2012-10-15 05:40:12 +00:00
Bill Wendling
a77399599d
Attributes Rewrite
...
Convert the internal representation of the Attributes class into a pointer to an
opaque object that's uniqued by and stored in the LLVMContext object. The
Attributes class then becomes a thin wrapper around this opaque
object. Eventually, the internal representation will be expanded to include
attributes that represent code generation options, etc.
llvm-svn: 165917
2012-10-15 04:46:55 +00:00
Bill Wendling
3ce41738d8
Remove dead methods.
...
llvm-svn: 165902
2012-10-14 09:21:44 +00:00
Bill Wendling
ea777202df
Remove operator cast method in favor of querying with the correct method.
...
llvm-svn: 165899
2012-10-14 08:54:26 +00:00
Benjamin Kramer
95200ba870
Fix use after free when deleting attributes in a chained folding set.
...
Can't follow the intrusive linked list when the element is gone.
llvm-svn: 165898
2012-10-14 08:48:40 +00:00
Bill Wendling
5ed900d026
Don't use the new syntax just yet.
...
llvm-svn: 165897
2012-10-14 08:25:35 +00:00
Bill Wendling
7005388897
Remove the bitwise AND operators from the Attributes class. Replace it with the equivalent from the builder class.
...
llvm-svn: 165896
2012-10-14 07:52:48 +00:00
Bill Wendling
03d1b8ef4c
Remove the bitwise assignment OR operator from the Attributes class. Replace it with the equivalent from the builder class.
...
llvm-svn: 165895
2012-10-14 07:35:59 +00:00
Bill Wendling
c04d329902
Remove the bitwise OR operator from the Attributes class. Replace it with the equivalent from the builder class.
...
llvm-svn: 165894
2012-10-14 07:17:34 +00:00
Bill Wendling
ea1286d8bf
Remove the bitwise XOR operator from the Attributes class. Replace it with the equivalent from the builder class.
...
llvm-svn: 165893
2012-10-14 06:56:13 +00:00
Bill Wendling
1dc6f7739b
Remove the bitwise NOT operator from the Attributes class. Replace it with the equivalent from the builder class.
...
llvm-svn: 165892
2012-10-14 06:39:53 +00:00
Bill Wendling
2a54428ca9
Decode the LLVM attributes from bitcode using the attributes builder.
...
llvm-svn: 165891
2012-10-14 04:10:01 +00:00
Bill Wendling
5eda1106ff
Use builder to create alignment attributes. Remove dead function.
...
llvm-svn: 165890
2012-10-14 03:58:29 +00:00
Bill Wendling
d56ce45fd5
Add the LLVM context to this c'tor. It will be needed in the future.
...
llvm-svn: 165687
2012-10-11 01:10:00 +00:00
Bill Wendling
205a5f682c
Support a common idiom on how to build an Attributes class with a single attribute.
...
llvm-svn: 165686
2012-10-11 01:05:52 +00:00
Nadav Rotem
b82a3821f7
Add a new interface to allow IR-level passes to access codegen-specific information.
...
llvm-svn: 165665
2012-10-10 22:04:55 +00:00
Sean Silva
c87a3dcb20
Revert r165652: "Remove unnecessary RTTI from the build."
...
... Apparently the RTTI is still necessary for some reason.
llvm-svn: 165654
2012-10-10 20:50:36 +00:00
Sean Silva
0fd7ecba19
Remove unnecessary RTTI from the build.
...
llvm-svn: 165652
2012-10-10 20:27:20 +00:00
Bill Wendling
196ccddf1b
Cleanup. Get rid of now dead code.
...
llvm-svn: 165613
2012-10-10 08:03:34 +00:00
Bill Wendling
f3c4f64b79
Remove the final bits of Attributes being declared in the Attribute
...
namespace. Use the attribute's enum value instead. No functionality change
intended.
llvm-svn: 165610
2012-10-10 07:36:45 +00:00
Bill Wendling
12999bb1df
Use the attribute enums to query if a function has an attribute.
...
llvm-svn: 165551
2012-10-09 21:49:51 +00:00
Bill Wendling
04e6cf2045
Use the attribute enums to query if a parameter has an attribute.
...
llvm-svn: 165550
2012-10-09 21:38:14 +00:00
Bill Wendling
9a38b18e2d
Revert r165547 to fix build.
...
llvm-svn: 165548
2012-10-09 20:56:48 +00:00
Bill Wendling
0db96c685b
Use a single location for calculating the alignments.
...
llvm-svn: 165547
2012-10-09 20:55:16 +00:00
Bill Wendling
fee7179aa9
Use appropriate method calls to get the alignment value.
...
llvm-svn: 165541
2012-10-09 20:28:54 +00:00
Bill Wendling
31ae26f466
Inline the checks for mutually exclusive attributes since they're used in only one module.
...
llvm-svn: 165539
2012-10-09 20:11:19 +00:00