summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR
Commit message (Collapse)AuthorAgeFilesLines
* Teach lint about address spacesMatt Arsenault2014-03-061-2/+21
| | | | llvm-svn: 203132
* Replace OwningPtr<T> with std::unique_ptr<T>.Ahmed Charles2014-03-064-7/+5
| | | | | | | | | | This compiles with no changes to clang/lld/lldb with MSVC and includes overloads to various functions which are used by those projects and llvm which have OwningPtr's as parameters. This should allow out of tree projects some time to move. There are also no changes to libs/Target, which should help out of tree targets have time to move, if necessary. llvm-svn: 203083
* [Layering] Move GVMaterializer.h into the IR library where itsChandler Carruth2014-03-062-2/+2
| | | | | | | | | | | | | implementation already lived. After this commit, the only IR-library headers in include/llvm/* are ones related to the legacy pass infrastructure that I'm planning to leave there until the new one is farther along. The only other headers at the top level are linking and initialization aids that aren't really libraries but just headers. llvm-svn: 203069
* [Layering] Move InstVisitor.h into the IR library as it is prettyChandler Carruth2014-03-061-1/+1
| | | | | | obviously coupled to the IR. llvm-svn: 203064
* [Layering] Move DebugInfo.h into the IR library where its implementationChandler Carruth2014-03-066-6/+6
| | | | | | already lives. llvm-svn: 203046
* [Layering] Move DIBuilder.h into the IR library where its implementationChandler Carruth2014-03-061-1/+1
| | | | | | already lives. llvm-svn: 203038
* [Layering] Move AutoUpgrade.h into the IR library where itsChandler Carruth2014-03-051-1/+1
| | | | | | implementation already lives. llvm-svn: 202961
* [Layering] Move DebugLoc.h into the IR library. The implementationChandler Carruth2014-03-051-1/+1
| | | | | | | | | | | already lived there and it is where it belongs -- this is the in-memory debug location representation. This is just cleanup -- Modules can actually cope with this, but that doesn't make it right. After chatting with folks that have out-of-tree stuff, going ahead and moving the rest of the headers seems preferable. llvm-svn: 202960
* [C++11] Replace OwningPtr::take() with OwningPtr::release().Ahmed Charles2014-03-051-2/+2
| | | | llvm-svn: 202957
* [C++11] Add 'override' keyword to IR library.Craig Topper2014-03-058-56/+59
| | | | llvm-svn: 202939
* [C API] Implement LLVM{Get,Set}Alignment for AllocaInst.Peter Zotov2014-03-051-2/+8
| | | | | | Patch by Manuel Jacob. llvm-svn: 202936
* C API: Add functions to get or set a GlobalValue's DLLStorageClassReid Kleckner2014-03-051-0/+10
| | | | | | Patch by Manuel Jacob! llvm-svn: 202928
* [Modules] Move the LeakDetector header into the IR library where theChandler Carruth2014-03-048-8/+8
| | | | | | | | | | | source file had already been moved. Also move the unittest into the IR unittest library. This may seem an odd thing to put in the IR library but we only really use this with instructions and it needs the LLVM context to work, so it is intrinsically tied to the IR library. llvm-svn: 202842
* [Modules] Move the PassNameParser to the IR library as it deals in theChandler Carruth2014-03-042-2/+2
| | | | | | | PassInfo structures of the legacy pass manager. Also give it the Legacy prefix as it is not a particularly widely used header. llvm-svn: 202839
* [Modules] Move the ConstantRange class into the IR library. This isChandler Carruth2014-03-045-3/+738
| | | | | | | | | | a bit surprising, as the class is almost entirely abstracted away from any particular IR, however it encodes the comparsion predicates which mutate ranges as ICmp predicate codes. This is reasonable as they're used for both instructions and constants. Thus, it belongs in the IR library with instructions and constants. llvm-svn: 202838
* [Modules] Move CFG.h to the IR library as it defines graph traits overChandler Carruth2014-03-045-5/+5
| | | | | | IR types. llvm-svn: 202827
* [Modules] Move ValueHandle into the IR library where Value itself lives.Chandler Carruth2014-03-044-4/+4
| | | | | | | | | | | Move the test for this class into the IR unittests as well. This uncovers that ValueMap too is in the IR library. Ironically, the unittest for ValueMap is useless in the Support library (honestly, so was the ValueHandle test) and so it already lives in the IR unittests. Mmmm, tasty layering. llvm-svn: 202821
* [Modules] Move CallSite into the IR library where it belogs. It isChandler Carruth2014-03-046-6/+6
| | | | | | | abstracting between a CallInst and an InvokeInst, both of which are IR concepts. llvm-svn: 202816
* [Modules] Move GetElementPtrTypeIterator into the IR library. As itsChandler Carruth2014-03-044-4/+4
| | | | | | | | | name might indicate, it is an iterator over the types in an instruction in the IR.... You see where this is going. Another step of modularizing the support library. llvm-svn: 202815
* [Modules] Move InstIterator out of the Support library, where it had noChandler Carruth2014-03-041-1/+1
| | | | | | | | | | | | | business. This header includes Function and BasicBlock and directly uses the interfaces of both classes. It has to do with the IR, it even has that in the name. =] Put it in the library it belongs to. This is one step toward making LLVM's Support library survive a C++ modules bootstrap. llvm-svn: 202814
* [cleanup] Re-sort all the includes with utils/sort_includes.py.Chandler Carruth2014-03-041-1/+1
| | | | llvm-svn: 202811
* Cleaning up a bunch of pre-Visual C++ 2012 build hacks.Yaron Keren2014-03-041-9/+0
| | | | llvm-svn: 202806
* [cleanup] Add a getOperandNo method to the Use class and implement itChandler Carruth2014-03-041-0/+5
| | | | | | | | | | | out-of-line so that it can refer to the methods on User. As a consequence, this removes the need to define one template method if value_use_iterator in the extremely strange User.h header (!!!). This makse Use.h slightly less peculiar. The only remaining real peculiarity is the definition of Use::set in Value.h llvm-svn: 202805
* [cleanup] Use early exit and simpler temporary variables to clarify theChandler Carruth2014-03-041-19/+18
| | | | | | swap implementation. llvm-svn: 202802
* [cleanup] Run clang-format over the Use code. It was *really*Chandler Carruth2014-03-041-35/+31
| | | | | | | | | | inconsistent both with itself and with LLVM at large with formatting. The *s were on the wrong side, the indent was off, etc etc. This is much cleaner. Also, go clang-format laying out the array of tags in nice columns. llvm-svn: 202799
* [cleanup] Tidy up and modernize comments and the definition order forChandler Carruth2014-03-041-60/+42
| | | | | | | | the Use class. More cleanups to come here. This class just needs some TLC. llvm-svn: 202798
* Pass to emit DWARF path discriminators.Diego Novillo2014-03-032-1/+30
| | | | | | | | | | | | | | | | DWARF discriminators are used to distinguish multiple control flow paths on the same source location. When this happens, instructions across basic block boundaries will share the same debug location. This pass detects this situation and creates a new lexical scope to one of the two instructions. This lexical scope is a child scope of the original and contains a new discriminator value. This discriminator is then picked up from MCObjectStreamer::EmitDwarfLocDirective to be written on the object file. This fixes http://llvm.org/bugs/show_bug.cgi?id=18270. llvm-svn: 202752
* [C++11] Use std::tie to simplify compare operators.Benjamin Kramer2014-03-031-19/+8
| | | | | | No functionality change. llvm-svn: 202751
* Add DWARF discriminator support to DILexicalBlocks.Diego Novillo2014-03-032-2/+4
| | | | | | This adds support for emitting discriminators from DILexicalBlocks. llvm-svn: 202736
* Revert "[C++11] Replace LLVM atomics with std::atomic."Benjamin Kramer2014-03-032-3/+4
| | | | | | | Breaks the MSVC build. DataStream.cpp(44): error C2552: 'llvm::Statistic::Value' : non-aggregates cannot be initialized with initializer list llvm-svn: 202731
* [C++11] Replace LLVM atomics with std::atomic.Benjamin Kramer2014-03-032-4/+3
| | | | | | | | | | | With C++11 we finally have a standardized way to specify atomic operations. Use them to replace the existing custom implemention. Sadly the translation is not entirely trivial as std::atomic allows more fine-grained control over the atomicity. I tried to preserve the old semantics as well as possible. Differential Revision: http://llvm-reviews.chandlerc.com/D2915 llvm-svn: 202730
* [C++11] Replace llvm::tie with std::tie.Benjamin Kramer2014-03-021-2/+2
| | | | | | The old implementation is no longer needed in C++11. llvm-svn: 202644
* [C++11] Replace llvm::next and llvm::prior with std::next and std::prev.Benjamin Kramer2014-03-023-3/+3
| | | | | | Remove the old functions. llvm-svn: 202636
* [C++11] Switch all uses of the llvm_move macro to use std::moveChandler Carruth2014-03-021-2/+2
| | | | | | directly, and remove the macro. llvm-svn: 202612
* Fix >> to be > > for non-c++11.Eric Christopher2014-02-281-1/+1
| | | | llvm-svn: 202545
* 80-col.Eric Christopher2014-02-281-1/+2
| | | | llvm-svn: 202541
* Fix a crasher where when we're attempting to replace a typeEric Christopher2014-02-281-4/+7
| | | | | | | | | | during the finalization for CGDebugInfo in clang we would RAUW a type and it would result in a corrupted MDNode for an imported declaration. Testcase pending as reducing has been difficult. llvm-svn: 202540
* Add 'remark' diagnostic type in LLVMTobias Grosser2014-02-281-0/+3
| | | | | | | | | | | | A 'remark' is information that is not an error or a warning, but rather some additional information provided to the user. In contrast to a 'note' a 'remark' is an independent diagnostic, whereas a 'note' always depends on another diagnostic. A typical use case for remark nodes is information provided to the user, e.g. information provided by the vectorizer about loops that have been vectorized. llvm-svn: 202474
* Add a debug info code generation level to the compile unit metadataEric Christopher2014-02-272-3/+6
| | | | | | | | | | and update everything accordingly. This can be used to conditionalize the amount of output in the backend based on the amount of debug requested/metadata emission scheme by a front end (e.g. clang). Paired with a commit to clang. llvm-svn: 202332
* Remove unnecessary llvm:: qualification.Eric Christopher2014-02-261-3/+3
| | | | llvm-svn: 202316
* Fix typo. Thanks to Roman Divacky for noticing it.Rafael Espindola2014-02-261-8/+8
| | | | llvm-svn: 202277
* Compare DataLayout by Value, not by pointer.Rafael Espindola2014-02-261-0/+10
| | | | | | | | This fixes spurious warnings in llvm-link about the datalayout not matching. Thanks to Zalman Stern for reporting the bug! llvm-svn: 202276
* Use a sorted array to store the information about a few address spaces.Rafael Espindola2014-02-261-32/+36
| | | | | | | | | We don't have any test with more than 6 address spaces, so a DenseMap is probably not the correct answer. An unsorted array would also be OK, but we have to sort it for printing anyway. llvm-svn: 202275
* Move these functions out of line. A DenseMap lookup is not a simple operation.Rafael Espindola2014-02-261-0/+24
| | | | llvm-svn: 202274
* Remove spurious emacs major mode marker, these should only go on .h files.Nick Lewycky2014-02-261-1/+1
| | | | llvm-svn: 202222
* Constify the Optnone checks in IR passes.Paul Robinson2014-02-261-3/+3
| | | | llvm-svn: 202213
* Add DIUnspecifiedParameter, so we can pretty-print it.Adrian Prantl2014-02-251-0/+6
| | | | | | This will be used for testcases in CFE. llvm-svn: 202207
* Use DataLayout from the module when easily available.Rafael Espindola2014-02-254-4/+12
| | | | | | | | | | | | | | | | | Eventually DataLayoutPass should go away, but for now that is the only easy way to get a DataLayout in some APIs. This patch only changes the ones that have easy access to a Module. One interesting issue with sometimes using DataLayoutPass and sometimes fetching it from the Module is that we have to make sure they are equivalent. We can get most of the way there by always constructing the pass with a Module. In fact, the pass could be changed to point to an external DataLayout instead of owning one to make this stricter. Unfortunately, the C api passes a DataLayout, so it has to be up to the caller to make sure the pass and the module are in sync. llvm-svn: 202204
* Fix resetting the DataLayout in a Module.Rafael Espindola2014-02-252-5/+19
| | | | | | | | | | | | | | | No tool does this currently, but as everything else in a module we should be able to change its DataLayout. Most of the fix is in DataLayout to make sure it can be reset properly. The test uses Module::setDataLayout since the fact that we mutate a DataLayout is an implementation detail. The module could hold a OwningPtr<DataLayout> and the DataLayout itself could be immutable. Thanks to Philip Reames for pushing me in the right direction. llvm-svn: 202198
* Store a DataLayout in Module.Rafael Espindola2014-02-254-6/+37
| | | | | | | | | | | | | | Now that DataLayout is not a pass, store one in Module. Since the C API expects to be able to get a char* to the datalayout description, we have to keep a std::string somewhere. This patch keeps it in Module and also uses it to represent modules without a DataLayout. Once DataLayout is mandatory, we should probably move the string to DataLayout itself since it won't be necessary anymore to represent the special case of a module without a DataLayout. llvm-svn: 202190
OpenPOWER on IntegriCloud