summaryrefslogtreecommitdiffstats
path: root/llvm/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert "IR: MDNode => Value"Duncan P. N. Exon Smith2014-11-111-1/+1
| | | | | | | | | | | | | | | | | Instead, we're going to separate metadata from the Value hierarchy. See PR21532. This reverts commit r221375. This reverts commit r221373. This reverts commit r221359. This reverts commit r221167. This reverts commit r221027. This reverts commit r221024. This reverts commit r221023. This reverts commit r220995. This reverts commit r220994. llvm-svn: 221711
* [llvm-mc] Fixing case where if a file ended with non-newline whitespace or a ↵Colin LeMahieu2014-11-111-15/+9
| | | | | | | | comma it would access invalid memory. Cleaned up parse loop. llvm-svn: 221707
* Fix a warning about ‘r_type’ may be used uninitialized.Kevin Enderby2014-11-111-1/+1
| | | | | | Thanks to Aaron Ballman for noticing this! llvm-svn: 221696
* llvm-objdump: Skip empty sections when dumping contentsDavid Majnemer2014-11-111-3/+6
| | | | | | | Empty sections are just noise when using objdump. This is similar to what binutils does. llvm-svn: 221680
* [CMake] llvm-shlib: Prune redundant components, AsmPrinter, MC, and ↵NAKAMURA Takumi2014-11-111-3/+0
| | | | | | SelectionDAG. llvm-svn: 221675
* [CMake] llvm-c-test: Use libLLVM.so if it is available.NAKAMURA Takumi2014-11-101-0/+9
| | | | llvm-svn: 221592
* [CMake] Let llvm-shlib work on Linux with --whole-archive.NAKAMURA Takumi2014-11-101-4/+10
| | | | | | | | | | | | | | | | | | | | | | FIXME: It should work on not only Linux but elf-targeting gnu ld. For example if LLVM_DYLIB_COMPONENTS is "BitWriter Support", CMake emits the command line like; -Wl,--whole-archive lib/libLLVMBitWriter.a lib/libLLVMSupport.a *1 -Wl,--no-whole-archive lib/libLLVMCore.a lib/libLLVMSupport.a *2 -lrt -ldl -ltinfo -lpthread -lm It works since symbols in LLVMCore is resolved with not *2 but *1. Unfortunately, --gc-sections is not powerful in this case to prune unused "visibility(default)" entries. I am still experimenting other way not to rely on --whole-archive. llvm-svn: 221591
* [CMake] Move llvm-shlib in prior to other tools.NAKAMURA Takumi2014-11-101-6/+6
| | | | llvm-svn: 221590
* [CMake] llvm-shlib: Add possibly missing BitReader and MCDisassembler for ↵NAKAMURA Takumi2014-11-081-0/+2
| | | | | | | | | | | | llvm-c. FYI, 3 modules below are redundant in trunk; AsmPrinter MC SelectionDAG llvm-svn: 221579
* Remove unused variable.Rafael Espindola2014-11-071-2/+2
| | | | llvm-svn: 221549
* Transform: add SymbolRewriter passSaleem Abdulrasool2014-11-071-0/+1
| | | | | | | | | | | | | | | | This introduces the symbol rewriter. This is an IR->IR transformation that is implemented as a CodeGenPrepare pass. This allows for the transparent adjustment of the symbols during compilation. It provides a clean, simple, elegant solution for symbol inter-positioning. This technique is often used, such as in the various sanitizers and performance analysis. The control of this is via a custom YAML syntax map file that indicates source to destination mapping, so as to avoid having the compiler to know the exact details of the source to destination transformations. llvm-svn: 221548
* Fix style.Michael J. Spencer2014-11-071-8/+6
| | | | llvm-svn: 221547
* Use StringRefMemoryObject in llvm-mc. NFC.Rafael Espindola2014-11-071-29/+15
| | | | llvm-svn: 221536
* llvm-symbolizer: teach it about PowerPC64 ELF function descriptorsJay Foad2014-11-072-4/+40
| | | | | | | | | | | | | | | | | Summary: Teach llvm-symbolizer about PowerPC64 ELF function descriptors. Symbols in the .opd section point to function descriptors, the first word of which is a pointer to the real function. For the purposes of symbolizing we pretend that the symbol points directly to the function. This is enough to get decent function names in stack traces for unoptimized binaries, which fixes the sanitizer print-stack-trace test on PowerPC64 Linux. Reviewers: kcc, willschm, samsonov Reviewed By: samsonov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6110 llvm-svn: 221514
* Use StringRefMemoryObject. NFC.Rafael Espindola2014-11-071-34/+5
| | | | llvm-svn: 221502
* [ELF][yaml2obj] Handle additional MIPS specific st_other field flagsSimon Atanasyan2014-11-062-2/+2
| | | | | | | | The ELF symbol `st_other` field might contain additional flags besides visibility ones. This patch implements support for some MIPS specific flags. llvm-svn: 221491
* Plumb in the ARM thumb symbolizer in llvm-objdump’s Mach-O disassembler andKevin Enderby2014-11-061-24/+235
| | | | | | | | | | | | add the code and test cases for 32-bit ARM symbolizer. Also fixed the printing of data in code as it was not using the table correctly and needed to fix one of the test cases too. This will break lld’s test/mach-o/arm-interworking-movw.yaml till the tweak for that is made. Which I’ll be committing immediately after this commit. llvm-svn: 221470
* Add accessor to get 'visibility' part of st_other fieldSimon Atanasyan2014-11-051-1/+1
| | | | | | This new `getVisibility()` function will also be used in the LLD code. llvm-svn: 221392
* IR: MDNode => Value: NamedMDNode::getOperator()Duncan P. N. Exon Smith2014-11-051-1/+1
| | | | | | | | | | | | | Change `NamedMDNode::getOperator()` from returning `MDNode *` to returning `Value *`. To reduce boilerplate at some call sites, add a `getOperatorAsMDNode()` for named metadata that's expected to only return `MDNode` -- for now, that's everything, but debug node named metadata (such as llvm.dbg.cu and llvm.dbg.sp) will soon change. This is part of PR21433. Note that there's a follow-up patch to clang for the API change. llvm-svn: 221375
* llvm-readobj: Add support for dumping the DOS header in PE filesDavid Majnemer2014-11-051-0/+25
| | | | llvm-svn: 221333
* llvm-objdump: Pass DiceTableEntry by referenceDavid Majnemer2014-11-041-2/+2
| | | | | | | | | DiceTableEntry is 24 bytes on my machine, it's probably better to pass them by reference. This fixes PR21464. llvm-svn: 221247
* Use findProgramByName.Michael J. Spencer2014-11-042-17/+41
| | | | llvm-svn: 221221
* Add the code and test cases for 32-bit Intel to llvm-objdump’s Mach-O ↵Kevin Enderby2014-11-041-14/+94
| | | | | | symbolizer. llvm-svn: 221211
* MSVC requires redeclarations to repeat noexceptReid Kleckner2014-11-031-1/+1
| | | | llvm-svn: 221177
* llvm-vtabledump: Handle Itanium VTablesDavid Majnemer2014-11-031-47/+166
| | | | | | Add support in the vtable dumper for the Itanium ABI. llvm-svn: 221133
* Use ErrorOr for the ::create factory on instrumented and sample profilers.Diego Novillo2014-11-031-13/+16
| | | | | | | | | | | | | | | | | Summary: As discussed in http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20141027/242445.html, the creation of reader and writer instances is better done using ErrorOr. There are no functional changes, but several callers needed to be adjusted. Reviewers: bogner Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6076 llvm-svn: 221120
* Fix the build of the gold plugin.Rafael Espindola2014-11-011-1/+0
| | | | | | I did the previous patch on OS X and didn't noticed the issue. llvm-svn: 221070
* Remove redundant calls to isMaterializable.Rafael Espindola2014-11-012-12/+7
| | | | | | | | | | This removes calls to isMaterializable in the following cases: * It was redundant with a call to isDeclaration now that isDeclaration returns the correct answer for materializable functions. * It was followed by a call to Materialize. Just call Materialize and check EC. llvm-svn: 221050
* [CMake] llvm-profdata requires Core.NAKAMURA Takumi2014-11-011-1/+5
| | | | llvm-svn: 221046
* Add show and merge tools for sample PGO profiles.Diego Novillo2014-11-011-38/+125
| | | | | | | | | | | | | | | | | | | | | Summary: This patch extends the 'show' and 'merge' commands in llvm-profdata to handle sample PGO formats. Using the 'merge' command it is now possible to convert one sample PGO format to another. The only format that is currently not working is 'gcc'. I still need to implement support for it in lib/ProfileData. The changes in the sample profile support classes are needed for the merge operation. Reviewers: bogner Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6065 llvm-svn: 221032
* [Object] Modify OwningBinary's interface to separate inspection from ownership.Lang Hames2014-10-313-7/+10
| | | | | | | | The getBinary and getBuffer method now return ordinary pointers of appropriate const-ness. Ownership is transferred by calling takeBinary(), which returns a pair of the Binary and a MemoryBuffer. llvm-svn: 221003
* Object, COFF: Cleanup symbol type code, improve binutils compatibilityDavid Majnemer2014-10-313-11/+7
| | | | | | | Do a better job classifying symbols. This increases the consistency between the COFF handling code and the ELF side of things. llvm-svn: 220952
* llvm-cov: Follow LLVM naming conventionsJustin Bogner2014-10-304-22/+21
| | | | | | This renames a few things that are using an unusual naming convention. llvm-svn: 220929
* llvm-cov: Don't manually parse an option for no reasonJustin Bogner2014-10-301-18/+5
| | | | | | | | We're using cl::opt here, but for some reason we're reading out one particular option by hand instead. This makes -help and the like behave rather poorly, so let's not do it this way. llvm-svn: 220928
* llvm-cov: Very basic top level helpJustin Bogner2014-10-301-11/+17
| | | | llvm-svn: 220926
* Enable the slp vectorizer in the gold plugin.Rafael Espindola2014-10-301-0/+1
| | | | llvm-svn: 220887
* Enable the loop vectorizer in the gold plugin.Rafael Espindola2014-10-301-0/+1
| | | | llvm-svn: 220886
* Replace also-emit-llvm with save-temps.Rafael Espindola2014-10-291-23/+15
| | | | | | | | The also-emit-llvm option only supported getting the IR before optimizations. This patch replaces it with a more generic save-temps option that saves the IR both before and after optimizations. llvm-svn: 220885
* Run clang-format on tools/llvm-objdump/MachODump.cpp . No functional change.Kevin Enderby2014-10-291-113/+82
| | | | llvm-svn: 220875
* Fix build with CMake if LLVM_USE_INTEL_JITEVENTS option is enabledMichael Kuperstein2014-10-291-1/+0
| | | | | | | | | | | | * Added LLVM libraries required for IntelJITEvents to LLVMBuild.txt. * Removed 'jit' library from llvm-jitlistener. * Added support for OptionalLibraries to llvm-build cmake files generator. Patch by aleksey.a.bader@intel.com Differential Revision: http://reviews.llvm.org/D5646 llvm-svn: 220848
* Update llvm-objdump’s Mach-O symbolizer code to demangle C++ names.Kevin Enderby2014-10-281-6/+41
| | | | llvm-svn: 220833
* Remove the PreserveSource linker mode.Rafael Espindola2014-10-282-7/+5
| | | | | | | | | | | | | | | | | | | | I noticed that it was untested, and forcing it on caused some tests to fail: LLVM :: Linker/metadata-a.ll LLVM :: Linker/prefixdata.ll LLVM :: Linker/type-unique-odr-a.ll LLVM :: Linker/type-unique-simple-a.ll LLVM :: Linker/type-unique-simple2-a.ll LLVM :: Linker/type-unique-simple2.ll LLVM :: Linker/type-unique-type-array-a.ll LLVM :: Linker/unnamed-addr1-a.ll LLVM :: Linker/visibility1.ll If it is to be resurrected, it has to be fixed and we should probably have a -preserve-source command line option in llvm-mc and run tests with and without it. llvm-svn: 220741
* Make it easier to pass a custom diagnostic handler to the IR linker.Rafael Espindola2014-10-271-3/+4
| | | | llvm-svn: 220732
* Add an option to the LTO code generator to disable vectorization during LTOArnold Schwaighofer2014-10-262-6/+18
| | | | | | | | | | | | | | | | | | | | We used to always vectorize (slp and loop vectorize) in the LTO pass pipeline. r220345 changed it so that we used the PassManager's fields 'LoopVectorize' and 'SLPVectorize' out of the desire to be able to disable vectorization using the cl::opt flags 'vectorize-loops'/'slp-vectorize' which the before mentioned fields default to. Unfortunately, this turns off vectorization because those fields default to false. This commit adds flags to the LTO library to disable lto vectorization which reconciles the desire to optionally disable vectorization during LTO and the desired behavior of defaulting to enabled vectorization. We really want tools to set PassManager flags directly to enable/disable vectorization and not go the route via cl::opt flags *in* PassManagerBuilder.cpp. llvm-svn: 220652
* Remove unused variable.Rafael Espindola2014-10-251-1/+1
| | | | llvm-svn: 220610
* Update the error handling of lib/Linker.Rafael Espindola2014-10-256-44/+36
| | | | | | Instead of passing a std::string&, use the new diagnostic infrastructure. llvm-svn: 220608
* Modernize the error handling of the Materialize function.Rafael Espindola2014-10-242-11/+14
| | | | llvm-svn: 220600
* Don't ever call materializeAllPermanently during LTO.Rafael Espindola2014-10-241-18/+5
| | | | | | | | | | To do this, change the representation of lazy loaded functions. The previous representation cannot differentiate between a function whose body has been removed and one whose body hasn't been read from the .bc file. That means that in order to drop a function, the entire body had to be read. llvm-svn: 220580
* PR21189: Teach llvm-readobj to dump bits of COFF symbol subsections required ↵Timur Iskhodzhanov2014-10-231-0/+82
| | | | | | | | | to debug using VS2012+ Reviewed at http://reviews.llvm.org/D5755 Thanks to Andrey Guskov for his help investigating this! llvm-svn: 220526
* MachODump.cpp: fix MSVC buildHans Wennborg2014-10-231-4/+4
| | | | llvm-svn: 220518
OpenPOWER on IntegriCloud