summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR
Commit message (Collapse)AuthorAgeFilesLines
* Support for half intrinsics. Pushes MMX into slower encoding path.Michael Ilseman2013-01-112-17/+23
| | | | llvm-svn: 172159
* CastInst::castIsValid should return true if the dest type is the same asEvan Cheng2013-01-101-0/+5
| | | | | | Value's current type. The casting is trivial even for aggregate type. llvm-svn: 172143
* Revert s/Raw/getBitMask/g name change. This is possibly causing LTO test ↵Bill Wendling2013-01-093-21/+24
| | | | | | hangings. llvm-svn: 172020
* Alter the hasing computation when inserting into the folding set.Bill Wendling2013-01-091-2/+1
| | | | llvm-svn: 171960
* Add comment to the definition of Constant::isZeroValue(). Shuxin Yang2013-01-091-0/+2
| | | | | | | | (There already has a concise comment to the declaration.) Thank Eric Christopher for his feedback! llvm-svn: 171926
* Forgot the namespace identifier.Bill Wendling2013-01-091-2/+2
| | | | llvm-svn: 171924
* Add the integer value of the ConstantInt instead of the Constant* value.Bill Wendling2013-01-092-6/+9
| | | | | | This is causing some problems. The root cause is unknown at this time. llvm-svn: 171923
* Consider expression "0.0 - X" as the negation of X ifShuxin Yang2013-01-092-3/+15
| | | | | | | - this expression is explicitly marked no-signed-zero, or - no-signed-zero of this expression can be derived from some context. llvm-svn: 171922
* Remove the llvm-local DW_TAG_vector_type tag and add a test toEric Christopher2013-01-082-5/+7
| | | | | | make sure that vector types do work. llvm-svn: 171833
* Fix comment.Eric Christopher2013-01-081-1/+2
| | | | llvm-svn: 171832
* Mark artificial types as such in the annotated debug output.David Blaikie2013-01-081-0/+3
| | | | llvm-svn: 171826
* Remove what appears to be a dead llvm-specific debug tag.Eric Christopher2013-01-081-1/+0
| | | | llvm-svn: 171821
* Move TypeFinder.h into the IR tree, it clearly belongs with the IR library.Chandler Carruth2013-01-072-2/+2
| | | | llvm-svn: 171749
* Rough out a new c'tor for the AttrBuilder class.Bill Wendling2013-01-072-3/+21
| | | | | | | | This c'tor takes the AttributeSet class as the parameter. It will eventually grab the attributes from the specified index and create a new attribute builder with those attributes. llvm-svn: 171712
* PR14759: Debug info support for C++ member pointers.David Blaikie2013-01-072-0/+20
| | | | | | | | This works fine with GDB for member variable pointers, but GDB's support for member function pointers seems to be quite unrelated to DW_TAG_ptr_to_member_type. (see GDB bug 14998 for details) llvm-svn: 171698
* Move the initialization to the Analysis library as well as the pass.Chandler Carruth2013-01-071-1/+0
| | | | | | | This was (somewhat distressingly) only caught be the ocaml bindings tests... llvm-svn: 171690
* Move TargetTransformInfo to live under the Analysis library. This noChandler Carruth2013-01-072-271/+0
| | | | | | | longer would violate any dependency layering and it is in fact an analysis. =] llvm-svn: 171686
* Switch TargetTransformInfo from an immutable analysis pass that requiresChandler Carruth2013-01-071-44/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a TargetMachine to construct (and thus isn't always available), to an analysis group that supports layered implementations much like AliasAnalysis does. This is a pretty massive change, with a few parts that I was unable to easily separate (sorry), so I'll walk through it. The first step of this conversion was to make TargetTransformInfo an analysis group, and to sink the nonce implementations in ScalarTargetTransformInfo and VectorTargetTranformInfo into a NoTargetTransformInfo pass. This allows other passes to add a hard requirement on TTI, and assume they will always get at least on implementation. The TargetTransformInfo analysis group leverages the delegation chaining trick that AliasAnalysis uses, where the base class for the analysis group delegates to the previous analysis *pass*, allowing all but tho NoFoo analysis passes to only implement the parts of the interfaces they support. It also introduces a new trick where each pass in the group retains a pointer to the top-most pass that has been initialized. This allows passes to implement one API in terms of another API and benefit when some other pass above them in the stack has more precise results for the second API. The second step of this conversion is to create a pass that implements the TargetTransformInfo analysis using the target-independent abstractions in the code generator. This replaces the ScalarTargetTransformImpl and VectorTargetTransformImpl classes in lib/Target with a single pass in lib/CodeGen called BasicTargetTransformInfo. This class actually provides most of the TTI functionality, basing it upon the TargetLowering abstraction and other information in the target independent code generator. The third step of the conversion adds support to all TargetMachines to register custom analysis passes. This allows building those passes with access to TargetLowering or other target-specific classes, and it also allows each target to customize the set of analysis passes desired in the pass manager. The baseline LLVMTargetMachine implements this interface to add the BasicTTI pass to the pass manager, and all of the tools that want to support target-aware TTI passes call this routine on whatever target machine they end up with to add the appropriate passes. The fourth step of the conversion created target-specific TTI analysis passes for the X86 and ARM backends. These passes contain the custom logic that was previously in their extensions of the ScalarTargetTransformInfo and VectorTargetTransformInfo interfaces. I separated them into their own file, as now all of the interface bits are private and they just expose a function to create the pass itself. Then I extended these target machines to set up a custom set of analysis passes, first adding BasicTTI as a fallback, and then adding their customized TTI implementations. The fourth step required logic that was shared between the target independent layer and the specific targets to move to a different interface, as they no longer derive from each other. As a consequence, a helper functions were added to TargetLowering representing the common logic needed both in the target implementation and the codegen implementation of the TTI pass. While technically this is the only change that could have been committed separately, it would have been a nightmare to extract. The final step of the conversion was just to delete all the old boilerplate. This got rid of the ScalarTargetTransformInfo and VectorTargetTransformInfo classes, all of the support in all of the targets for producing instances of them, and all of the support in the tools for manually constructing a pass based around them. Now that TTI is a relatively normal analysis group, two things become straightforward. First, we can sink it into lib/Analysis which is a more natural layer for it to live. Second, clients of this interface can depend on it *always* being available which will simplify their code and behavior. These (and other) simplifications will follow in subsequent commits, this one is clearly big enough. Finally, I'm very aware that much of the comments and documentation needs to be updated. As soon as I had this working, and plausibly well commented, I wanted to get it committed and in front of the build bots. I'll be doing a few passes over documentation later if it sticks. Commits to update DragonEgg and Clang will be made presently. llvm-svn: 171681
* Include access modifiers in subprogram metadata IR comment.David Blaikie2013-01-051-0/+5
| | | | | | | Based on code review feedback in r171604 from Chandler Carruth & Eric Christopher. llvm-svn: 171636
* Attribute: Make hashes match when looking up AttributeImpls.Benjamin Kramer2013-01-051-1/+2
| | | | | | | This isn't optimal either but fixes a massive compile time regression from the attribute uniquing work. llvm-svn: 171624
* Convert the TargetTransformInfo from an immutable pass with dynamicChandler Carruth2013-01-052-15/+248
| | | | | | | | | | | | | | | | | | | | | | | | | interfaces which could be extracted from it, and must be provided on construction, to a chained analysis group. The end goal here is that TTI works much like AA -- there is a baseline "no-op" and target independent pass which is in the group, and each target can expose a target-specific pass in the group. These passes will naturally chain allowing each target-specific pass to delegate to the generic pass as needed. In particular, this will allow a much simpler interface for passes that would like to use TTI -- they can have a hard dependency on TTI and it will just be satisfied by the stub implementation when that is all that is available. This patch is a WIP however. In particular, the "stub" pass is actually the one and only pass, and everything there is implemented by delegating to the target-provided interfaces. As a consequence the tools still have to explicitly construct the pass. Switching targets to provide custom passes and sinking the stub behavior into the NoTTI pass is the next step. llvm-svn: 171621
* Switch the empty and tombstone key enumerators to not have explicitChandler Carruth2013-01-051-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | values -- that's not required to fix the bug that was cropping up, and the values selected made the enumeration's underlying type signed and introduced some warnings. This fixes the -Werror build. The underlying issue here was that the DenseMapInfo was casting values completely outside the range of the underlying storage of the enumeration to the enumeration's type. GCC went and "optimized" that into infloops and other misbehavior. By providing designated special values for these keys in the dense map, we ensure they are indeed representable and that they won't be used for anything else. It might be better to reuse None for the empty key and have the tombstone share the value of the sentinel enumerator, but honestly having 2 extra enumerators seemed not to matter and this seems a bit simpler. I'll let Bill shuffle this around (or ask me to shuffle it around) if he prefers it to look a different way. I also made the switch a bit more clear (and produce a better assert) that the enumerators are *never* going to show up and are errors if they do. llvm-svn: 171614
* IR/Attributes: Provide EmptyKey and TombstoneKey in part of enum, as ↵NAKAMURA Takumi2013-01-051-0/+2
| | | | | | | | workaround for gcc-4.4 take #2. I will investigate, later, what was wrong. I am too tired for now. llvm-svn: 171611
* Add a method to create an AttributeSet from an AttrBuilder.Bill Wendling2013-01-052-6/+50
| | | | | | | | The Attribute class is eventually going to represent one attribute. So we need this class to create the set of attributes. Add some iterator methods to the builder to access its internal bits in a nice way. llvm-svn: 171586
* Get rid of the 'Bits' mask in the attribute builder.Bill Wendling2013-01-041-26/+91
| | | | | | | | The bit mask thing will be a thing of the past. It's not extensible enough. Get rid of its use here. Opt instead for using a vector to hold the attributes. Note: Some of this code will become obsolete once the rewrite is further along. llvm-svn: 171553
* General cleanups.Bill Wendling2013-01-042-51/+43
| | | | | | | | | | * Remove dead methods. * Use the 'operator==' method instead of 'contains', which isn't needed. * Fix some comments. No functionality change. llvm-svn: 171523
* Remove unused #includeEli Bendersky2013-01-041-1/+0
| | | | llvm-svn: 171507
* Revert everything to r171366 to try to fix the build.Bill Wendling2013-01-032-24/+5
| | | | llvm-svn: 171450
* Try again to revert the bad patch. The tree was reverted for some unknown reasonBill Wendling2013-01-032-19/+20
| | | | | | | | | | | before the last time. --- Reverse-merging r171442 into '.': U include/llvm/IR/Attributes.h U lib/IR/Attributes.cpp U lib/IR/AttributeImpl.h llvm-svn: 171448
* Revert patch. Something snuck in there that shouldn't be.Bill Wendling2013-01-031-1/+20
| | | | | | | | --- Reverse-merging r171441 into '.': U include/llvm/IR/Attributes.h U lib/IR/Attributes.cpp llvm-svn: 171444
* Remove the 'contains' methods in favor of the 'operator==' method.Bill Wendling2013-01-032-20/+19
| | | | | | | The 'operator==' method is a bit clearer and much less verbose for somethings that should have only one value. Remove from the AttrBuilder for consistency. llvm-svn: 171442
* Revert r171427, "An intermediate step in the Attributes rewrite."NAKAMURA Takumi2013-01-031-20/+1
| | | | llvm-svn: 171441
* Make the type signature more strict.Bill Wendling2013-01-032-4/+4
| | | | llvm-svn: 171434
* An intermediate step in the Attributes rewrite.Bill Wendling2013-01-021-1/+20
| | | | | | | | | | Modify the AttrBuilder class to store the attributes as a set instead of as a bit mask. The Attribute class will represent only one attribute instead of a collection of attributes. This is the wave of the future! llvm-svn: 171427
* Actually update the CMake and Makefile builds correctly, and update theChandler Carruth2013-01-022-7/+7
| | | | | | | | | | code that includes Intrinsics.gen directly. This never showed up in my testing because the old Intrinsics.gen was still kicking around in the make build system and was correct there. =[ Thankfully, some of the bots to clean rebuilds and that caught this. llvm-svn: 171373
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-0240-169/+169
| | | | | | | | | | | | | | | | | | | | | into their new header subdirectory: include/llvm/IR. This matches the directory structure of lib, and begins to correct a long standing point of file layout clutter in LLVM. There are still more header files to move here, but I wanted to handle them in separate commits to make tracking what files make sense at each layer easier. The only really questionable files here are the target intrinsic tablegen files. But that's a battle I'd rather not fight today. I've updated both CMake and Makefile build systems (I think, and my tests think, but I may have missed something). I've also re-sorted the includes throughout the project. I'll be committing updates to Clang, DragonEgg, and Polly momentarily. llvm-svn: 171366
* Rename VMCore directory to IR.Chandler Carruth2013-01-0248-0/+30206
Aside from moving the actual files, this patch only updates the build system and the source file comments under lib/... that are relevant. I'll be updating other docs and other files in smaller subsequnet commits. While I've tried to test this, but it is entirely possible that there will still be some build system fallout. Also, note that I've not changed the library name itself: libLLVMCore.a is still the library name. I'd be interested in others' opinions about whether we should rename this as well (I think we should, just not sure what it might break) llvm-svn: 171359
OpenPOWER on IntegriCloud