Commit Graph

4366 Commits

Author SHA1 Message Date
Nadav Rotem 5dc203e8f4 Reapply the TargerTransformInfo changes, minus the changes to LSR and Lowerinvoke.
llvm-svn: 166248
2012-10-18 23:22:48 +00:00
Bob Wilson d6d9ccca38 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 4be9013ec1 Revert r166157 because some tests fail...
llvm-svn: 166159
2012-10-17 23:56:05 +00:00
Bill Wendling 7c2342467d 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 118a78b977 Cleanup whitespace.
llvm-svn: 166016
2012-10-16 06:10:45 +00:00
Bill Wendling a529ade5a4 Cleanup whitespace.
llvm-svn: 166013
2012-10-16 06:01:44 +00:00
Bill Wendling 147ee8e34f Have AttributesImpl defriend the Attributes class.
llvm-svn: 166012
2012-10-16 05:57:28 +00:00
Bill Wendling 3ffbac4432 Have AttrBuilder defriend the Attributes class.
llvm-svn: 166011
2012-10-16 05:55:09 +00:00
Bill Wendling a517c30ed3 Put simple c'tors inline.
llvm-svn: 166008
2012-10-16 05:22:28 +00:00
Bill Wendling 50d27849f6 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 fbd38fe2e3 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 79d45dbbf9 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 8c3e65db52 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 d079a446d7 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 5ae76a379c Remove dead methods.
llvm-svn: 165902
2012-10-14 09:21:44 +00:00
Bill Wendling 76d2cd2f60 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 6bbdf70818 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 a0f3e8d1cb Don't use the new syntax just yet.
llvm-svn: 165897
2012-10-14 08:25:35 +00:00
Bill Wendling 2a3c1cca7d 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 722b26c0f2 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 5c407ed3ab 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 a05b043c4a 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 85a64c217f 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 1fcc82225a Decode the LLVM attributes from bitcode using the attributes builder.
llvm-svn: 165891
2012-10-14 04:10:01 +00:00
Bill Wendling abd5ba2523 Use builder to create alignment attributes. Remove dead function.
llvm-svn: 165890
2012-10-14 03:58:29 +00:00
Bill Wendling 9d7ba8da47 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 13410278b6 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 e10328737d 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 c399c753d9 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 9b72524e54 Remove unnecessary RTTI from the build.
llvm-svn: 165652
2012-10-10 20:27:20 +00:00
Bill Wendling 7f1c5472b5 Cleanup. Get rid of now dead code.
llvm-svn: 165613
2012-10-10 08:03:34 +00:00
Bill Wendling bbcdf4e2a5 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 ff758fbd45 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 8ccd6ca199 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 b3723341f3 Revert r165547 to fix build.
llvm-svn: 165548
2012-10-09 20:56:48 +00:00
Bill Wendling 5abc0ef174 Use a single location for calculating the alignments.
llvm-svn: 165547
2012-10-09 20:55:16 +00:00
Bill Wendling 4caad41f1e Use appropriate method calls to get the alignment value.
llvm-svn: 165541
2012-10-09 20:28:54 +00:00
Bill Wendling 9864a6557e 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
Bill Wendling 7c04e04a75 Move the 'FunctionOnly' attributes thingy inside of the Attributes class.
llvm-svn: 165530
2012-10-09 19:01:18 +00:00
Micah Villmow 89021e4740 Add in the first step of the multiple pointer support. This adds in support to the data layout for specifying a per address space pointer size.
The next step is to update the optimizers to allow them to optimize the different address spaces with this information.

llvm-svn: 165505
2012-10-09 16:06:12 +00:00
Bill Wendling 908126a745 Move the 'ParameterOnly' variable inside of the Attributes class and make it a method.
llvm-svn: 165497
2012-10-09 09:51:10 +00:00
Bill Wendling 217c9b1916 Remove the now dead VarArgsIncompatible variable.
llvm-svn: 165496
2012-10-09 09:33:01 +00:00
Bill Wendling 1c1b324ccf Use the enum value of the attributes when removing them from the attributes builder.
llvm-svn: 165495
2012-10-09 09:17:28 +00:00
Bill Wendling 93f70b78fd Use the enum value of the attributes when adding them to the attributes builder.
llvm-svn: 165494
2012-10-09 09:11:20 +00:00
Alexey Samsonov 3b861ec989 Fix PR14016.
DeadArgumentElimination pass can replace one LLVM function with another,
invalidating a pointer stored in debug info metadata entry for this function.
To fix this, we collect debug info descriptors for functions before
running a DeadArgumentElimination pass and "patch" pointers in metadata nodes
if we replace a function.

llvm-svn: 165490
2012-10-09 08:13:15 +00:00
Bill Wendling c9b22d735a Create enums for the different attributes.
We use the enums to query whether an Attributes object has that attribute. The
opaque layer is responsible for knowing where that specific attribute is stored.

llvm-svn: 165488
2012-10-09 07:45:08 +00:00
Bill Wendling bcd425b094 Remove some dead methods.
llvm-svn: 165485
2012-10-09 05:54:39 +00:00
Bill Wendling 375eb1f980 Remove more uses of the attribute enums by supplying appropriate query methods for them.
No functionality change intended.

llvm-svn: 165466
2012-10-09 00:28:54 +00:00
Bill Wendling 70f3917b0e Convert to using the Attributes::Builder interface.
llvm-svn: 165465
2012-10-09 00:01:21 +00:00
Bill Wendling c6daefad7e Use the Attributes::Builder to build the attributes in the parser.
llvm-svn: 165458
2012-10-08 23:27:46 +00:00