summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/CppBackend
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert patches to add case-range support for PR1255.Bob Wilson2013-09-091-1/+1
| | | | | | | | | | | | | | | | | The work on this project was left in an unfinished and inconsistent state. Hopefully someone will eventually get a chance to implement this feature, but in the meantime, it is better to put things back the way the were. I have left support in the bitcode reader to handle the case-range bitcode format, so that we do not lose bitcode compatibility with the llvm 3.3 release. This reverts the following commits: 155464, 156374, 156377, 156613, 156704, 156757, 156804 156808, 156985, 157046, 157112, 157183, 157315, 157384, 157575, 157576, 157586, 157612, 157810, 157814, 157815, 157880, 157881, 157882, 157884, 157887, 157901, 158979, 157987, 157989, 158986, 158997, 159076, 159101, 159100, 159200, 159201, 159207, 159527, 159532, 159540, 159583, 159618, 159658, 159659, 159660, 159661, 159703, 159704, 160076, 167356, 172025, 186736 llvm-svn: 190328
* Add function attribute 'optnone'.Andrea Di Biagio2013-08-231-0/+1
| | | | | | | | This function attribute indicates that the function is not optimized by any optimization or code generator passes with the exception of interprocedural optimization passes. llvm-svn: 189101
* Increment arg_count inside the loop in printInline. Patch by Joe Matarazzo.Craig Topper2013-07-311-1/+1
| | | | llvm-svn: 187477
* Revert accidental commit.Craig Topper2013-07-241-1/+1
| | | | llvm-svn: 187021
* Fix aliases for shrd/shld to handle Intel syntax properly. Also suppress ↵Craig Topper2013-07-241-1/+1
| | | | | | them from being used by the asm printer. llvm-svn: 187020
* Remove assert. There may be target-dependent attributes left.Bill Wendling2013-03-251-1/+0
| | | | llvm-svn: 177878
* Convert the CPP backend to use the AttributeSet instead of AttributeWithIndex.Bill Wendling2013-01-271-26/+37
| | | | | | Further removal of the introspective AttributeWithIndex thing. Also fix the #includes. llvm-svn: 173599
* Remove some introspection functions.Bill Wendling2013-01-251-1/+1
| | | | | | | | The 'getSlot' function and its ilk allow introspection into the AttributeSet class. However, that class should be opaque. Allow access through accessor methods instead. llvm-svn: 173522
* Use the new 'getSlotIndex' method to retrieve the attribute's slot index.Bill Wendling2013-01-251-1/+1
| | | | llvm-svn: 173499
* Add the IR attribute 'sspstrong'.Bill Wendling2013-01-231-0/+1
| | | | | | | | | | | | | | | | | | | | | SSPStrong applies a heuristic to insert stack protectors in these situations: * A Protector is required for functions which contain an array, regardless of type or length. * A Protector is required for functions which contain a structure/union which contains an array, regardless of type or length. Note, there is no limit to the depth of nesting. * A protector is required when the address of a local variable (i.e., stack based variable) is exposed. (E.g., such as through a local whose address is taken as part of the RHS of an assignment or a local whose address is taken as part of a function argument.) This patch implements the SSPString attribute to be equivalent to SSPRequired. This will change in a subsequent patch. llvm-svn: 173230
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-023-9/+9
| | | | | | | | | | | | | | | | | | | | | 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
* s/hasAttribute/contains/g to be more consistent with other method names.Bill Wendling2012-12-301-2/+2
| | | | llvm-svn: 171252
* Rename the 'Attributes' class to 'Attribute'. It's going to represent a ↵Bill Wendling2012-12-191-6/+6
| | | | | | single attribute in the future. llvm-svn: 170502
* s/AttrListPtr/AttributeSet/g to better label what this class is going to be ↵Bill Wendling2012-12-071-4/+4
| | | | | | in the near future. llvm-svn: 169651
* Sort includes for all of the .h files under the 'lib' tree. These wereChandler Carruth2012-12-041-1/+1
| | | | | | | | | | missed in the first pass because the script didn't yet handle include guards. Note that the script is now able to handle all of these headers without manual edits. =] llvm-svn: 169224
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-031-6/+6
| | | | | | | | | | | | | | | | | Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] llvm-svn: 169131
* Remove the dependent libraries feature.Bill Wendling2012-11-271-8/+0
| | | | | | The dependent libraries feature was never used and has bit-rotted. Remove it. llvm-svn: 168694
* Update call to the new syntax.Bill Wendling2012-11-231-1/+1
| | | | llvm-svn: 168512
* Change ForceSizeOpt attribute into MinSize attributeQuentin Colombet2012-10-301-0/+1
| | | | llvm-svn: 167020
* Fix CPP backend for method attributes by creating a block where a new ↵Nicolas Geoffray2012-10-261-5/+4
| | | | | | AttrBuilder is defined for each attribute. llvm-svn: 166762
* Pass in the context to the Attributes::get method.Bill Wendling2012-10-161-1/+1
| | | | llvm-svn: 166007
* Move the Attributes::Builder outside of the Attributes class and into its ↵Bill Wendling2012-10-151-2/+2
| | | | | | own class named AttrBuilder. No functionality change. llvm-svn: 165960
* Don't pass in an Attributes object to something that expects an integral value.Bill Wendling2012-10-141-3/+1
| | | | llvm-svn: 165887
* Remove the final bits of Attributes being declared in the AttributeBill Wendling2012-10-101-13/+16
| | | | | | | namespace. Use the attribute's enum value instead. No functionality change intended. llvm-svn: 165610
* Move TargetData to DataLayout.Micah Villmow2012-10-081-2/+2
| | | | llvm-svn: 165402
* Make the 'get*AlignmentFromAttr' functions into member functions within the ↵Bill Wendling2012-09-211-1/+1
| | | | | | Attributes class. Now with fix. llvm-svn: 164370
* Revert r164308 to fix buildbots.Bill Wendling2012-09-201-1/+1
| | | | llvm-svn: 164309
* Make the 'get*AlignmentFromAttr' functions into member functions within the ↵Bill Wendling2012-09-201-1/+1
| | | | | | Attributes class. llvm-svn: 164308
* Change the `linker_private_weak_def_auto' linkage to `linkonce_odr_auto_hide' toBill Wendling2012-08-171-2/+2
| | | | | | | | | | | | | | | | | | | | make it more consistent with its intended semantics. The `linker_private_weak_def_auto' linkage type was meant to automatically hide globals which never had their addresses taken. It has nothing to do with the `linker_private' linkage type, which outputs the symbols with a `l' (ell) prefix among other things. The intended semantic is more like the `linkonce_odr' linkage type. Change the name of the linkage type to `linkonce_odr_auto_hide'. And therefore changing the semantics so that it produces the correct output for the linker. Note: The old linkage name `linker_private_weak_def_auto' will still parse but is not a synonym for `linkonce_odr_auto_hide'. This should be removed in 4.0. <rdar://problem/11754934> llvm-svn: 162114
* Extend TargetPassConfig to allow running only a subset of the normal passes.Bob Wilson2012-07-022-2/+6
| | | | | | | | | | | | | | | | | This is still a work in progress but I believe it is currently good enough to fix PR13122 "Need unit test driver for codegen IR passes". For example, you can run llc with -stop-after=loop-reduce to have it dump out the IR after running LSR. Serializing machine-level IR is not yet supported but we have some patches in progress for that. The plan is to serialize the IR to a YAML file, containing separate sections for the LLVM IR, machine-level IR, and whatever other info is needed. Chad suggested that we stash the stop-after pass in the YAML file and use that instead of the start-after option to figure out where to restart the compilation. I think that's a great idea, but since it's not implemented yet I put the -start-after option into this patch for testing purposes. llvm-svn: 159570
* Extend the IL for selecting TLS models (PR9788)Hans Wennborg2012-06-231-1/+24
| | | | | | | | | | | | | | | This allows the user/front-end to specify a model that is better than what LLVM would choose by default. For example, a variable might be declared as @x = thread_local(initialexec) global i32 42 if it will not be used in a shared library that is dlopen'ed. If the specified model isn't supported by the target, or if LLVM can make a better choice, a different model may be used. llvm-svn: 159077
* Update CPPBackend to new API for AttrListPtr::get.Nicolas Geoffray2012-05-291-1/+1
| | | | llvm-svn: 157624
* ConstantRangesSet renamed to IntegersSubset. CRSBuilder renamed to ↵Stepan Dyatkovskiy2012-05-291-1/+1
| | | | | | IntegersSubsetMapping. llvm-svn: 157612
* Ordinary PR1255 patch: DifferenceEngine and CPPBackend adopted to the new ↵Stepan Dyatkovskiy2012-05-191-1/+1
| | | | | | SwitchInst methods. llvm-svn: 157112
* Include cstdio in a few place that depended on getting it transitively ↵Benjamin Kramer2012-03-231-1/+2
| | | | | | through StringExtras.h llvm-svn: 153328
* Move ftostr into its last user (cppbackend) and simplify it a bit.Benjamin Kramer2012-03-231-0/+12
| | | | | | New code should use raw_ostream. llvm-svn: 153326
* llvm::SwitchInstStepan Dyatkovskiy2012-03-111-1/+1
| | | | | | | Renamed methods caseBegin, caseEnd and caseDefault with case_begin, case_end, and case_default. Added some notes relative to case iterators. llvm-svn: 152532
* Taken into account Duncan's comments for r149481 dated by 2nd Feb 2012:Stepan Dyatkovskiy2012-03-081-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120130/136146.html Implemented CaseIterator and it solves almost all described issues: we don't need to mix operand/case/successor indexing anymore. Base iterator class is implemented as a template since it may be initialized either from "const SwitchInst*" or from "SwitchInst*". ConstCaseIt is just a read-only iterator. CaseIt is read-write iterator; it allows to change case successor and case value. Usage of iterator allows totally remove resolveXXXX methods. All indexing convertions done automatically inside the iterator's getters. Main way of iterator usage looks like this: SwitchInst *SI = ... // intialize it somehow for (SwitchInst::CaseIt i = SI->caseBegin(), e = SI->caseEnd(); i != e; ++i) { BasicBlock *BB = i.getCaseSuccessor(); ConstantInt *V = i.getCaseValue(); // Do something. } If you want to convert case number to TerminatorInst successor index, just use getSuccessorIndex iterator's method. If you want initialize iterator from TerminatorInst successor index, use CaseIt::fromSuccessorIndex(...) method. There are also related changes in llvm-clients: klee and clang. llvm-svn: 152297
* Convert assert(0) to llvm_unreachableCraig Topper2012-02-071-1/+1
| | | | llvm-svn: 149961
* [unwind removal] We no longer have 'unwind' instructions being generated, soBill Wendling2012-02-061-5/+0
| | | | | | remove the code that handles them. llvm-svn: 149901
* Remove dead test: this was already checked and handled a few linesDuncan Sands2012-02-051-5/+0
| | | | | | above. llvm-svn: 149841
* Don't initialize CV in terms of itself! Spotted by GCC.Duncan Sands2012-02-051-4/+4
| | | | llvm-svn: 149833
* reapply the patches reverted in r149470 that reenable ConstantDataArray,Chris Lattner2012-02-051-33/+14
| | | | | | | | | but with a critical fix to the SelectionDAG code that optimizes copies from strings into immediate stores: the previous code was stopping reading string data at the first nul. Address this by adding a new argument to llvm::getConstantStringInfo, preserving the behavior before the patch. llvm-svn: 149800
* SwitchInst refactoring.Stepan Dyatkovskiy2012-02-011-2/+2
| | | | | | | | | | | | | | | | | The purpose of refactoring is to hide operand roles from SwitchInst user (programmer). If you want to play with operands directly, probably you will need lower level methods than SwitchInst ones (TerminatorInst or may be User). After this patch we can reorganize SwitchInst operands and successors as we want. What was done: 1. Changed semantics of index inside the getCaseValue method: getCaseValue(0) means "get first case", not a condition. Use getCondition() if you want to resolve the condition. I propose don't mix SwitchInst case indexing with low level indexing (TI successors indexing, User's operands indexing), since it may be dangerous. 2. By the same reason findCaseValue(ConstantInt*) returns actual number of case value. 0 means first case, not default. If there is no case with given value, ErrorIndex will returned. 3. Added getCaseSuccessor method. I propose to avoid usage of TerminatorInst::getSuccessor if you want to resolve case successor BB. Use getCaseSuccessor instead, since internal SwitchInst organization of operands/successors is hidden and may be changed in any moment. 4. Added resolveSuccessorIndex and resolveCaseIndex. The main purpose of these methods is to see how case successors are really mapped in TerminatorInst. 4.1 "resolveSuccessorIndex" was created if you need to level down from SwitchInst to TerminatorInst. It returns TerminatorInst's successor index for given case successor. 4.2 "resolveCaseIndex" converts low level successors index to case index that curresponds to the given successor. Note: There are also related compatability fix patches for dragonegg, klee, llvm-gcc-4.0, llvm-gcc-4.2, safecode, clang. llvm-svn: 149481
* Revert Chris' commits up to r149348 that started causing VMCoreTests unit ↵Argyrios Kyrtzidis2012-02-011-14/+33
| | | | | | | | | | | | | | | | | | | test to fail. These are: r149348 r149351 r149352 r149354 r149356 r149357 r149361 r149362 r149364 r149365 llvm-svn: 149470
* with recent changes, ConstantArray is never a "string". Remove the associatedChris Lattner2012-01-311-33/+14
| | | | | | methods and constant fold the clients to false. llvm-svn: 149362
* C++, CBE, and TLOF support for ConstantDataSequentialChris Lattner2012-01-241-3/+36
| | | | llvm-svn: 148805
* Use Attributes::None instead of 0 after r148553 change on Attributes from ↵Nicolas Geoffray2012-01-221-1/+1
| | | | | | unsigned to their own class. llvm-svn: 148665
* More dead code removal (using -Wunreachable-code)David Blaikie2012-01-201-1/+0
| | | | llvm-svn: 148578
* Remove unnecessary default cases in switches that cover all enum values.David Blaikie2012-01-101-3/+0
| | | | llvm-svn: 147855
OpenPOWER on IntegriCloud