summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/IR/ValueTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* unittests: Remove implicit ilist iterator conversions, NFCDuncan P. N. Exon Smith2015-10-201-9/+9
| | | | llvm-svn: 250843
* IR: Expose the method 'getLocalSlot' in the module slot tracker.Alex Lorenz2015-07-271-0/+60
| | | | | | | | | | | This commit publicly exposes the method 'getLocalSlot' in the 'ModuleSlotTracker' class. This change is useful for MIR serialization, to serialize the unnamed basic block and unnamed alloca references. Reviewers: Duncan P. N. Exon Smith llvm-svn: 243336
* IR: Expose ModuleSlotTracker in Value::print()Duncan P. N. Exon Smith2015-06-271-0/+69
| | | | | | | | | | | | | | | | | | | Allow callers of `Value::print()` and `Metadata::print()` to pass in a `ModuleSlotTracker`. This allows them to pay only once for calculating module-level slots (such as Metadata). This is related to PR23865, where there was a huge cost for `MachineFunction::print()`. Although I don't have a *particular* user in mind for this new code, I have hit big slowdowns before when running `opt -debug`, and I think this will be useful. Going forward, if someone hits a big slowdown with `print()` statements, they can create a `ModuleSlotTracker` and send it through. Similarly, adding support to `Value::dump()` and `Metadata::dump()` should be trivial. I added unit tests to be sure the `print()` functions actually behave the same way with and without the slot tracker. llvm-svn: 240867
* Add unittest for extreme alignments.Rafael Espindola2014-10-231-0/+23
| | | | llvm-svn: 220483
* Modernize the .ll parsing interface.Rafael Espindola2014-08-191-1/+1
| | | | | | | | | | * Use StringRef instead of std::string& * Return a std::unique_ptr<Module> instead of taking an optional module to write to (was not really used). * Use current comment style. * Use current naming convention. llvm-svn: 215989
* [C++11] Use 'nullptr'.Craig Topper2014-06-081-3/+3
| | | | llvm-svn: 210442
* Replace OwningPtr<T> with std::unique_ptr<T>.Ahmed Charles2014-03-061-1/+1
| | | | | | | | | | 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
* Move the LLVM IR asm writer header files into the IR directory, as theyChandler Carruth2014-01-071-1/+1
| | | | | | | | | | | | | | | | | are part of the core IR library in order to support dumping and other basic functionality. Rename the 'Assembly' include directory to 'AsmParser' to match the library name and the only functionality left their -- printing has been in the core IR library for quite some time. Update all of the #includes to match. All of this started because I wanted to have the layering in good shape before I started adding support for printing LLVM IR using the new pass infrastructure, and commandline support for the new pass infrastructure. llvm-svn: 198688
* Fix getOrInsertGlobal dropping the address space.Matt Arsenault2013-09-301-0/+40
| | | | | | | | Currently it will insert an illegal bitcast. Arguably, the address space argument should be added for the creation case. llvm-svn: 191702
* Fix a disconcerting bug in Value::isUsedInBasicBlock, which gave wrong ↵Benjamin Kramer2013-04-121-0/+46
answers for blocks larger than 3 instrs. Also add a unit test. PR15727. llvm-svn: 179370
OpenPOWER on IntegriCloud