summaryrefslogtreecommitdiffstats
path: root/llvm/tools
Commit message (Collapse)AuthorAgeFilesLines
* VS Integration: install toolsets for x64 too (PR18738)Hans Wennborg2014-02-124-66/+97
| | | | | | | | | This does exactly the same thing as for Win32, except it passes -m64 to the compiler and the files go in a different directory. Differential Revision: http://llvm-reviews.chandlerc.com/D2749 llvm-svn: 201269
* Move more self-contained functionality away from tools/opt/opt.cppEli Bendersky2014-02-124-61/+110
| | | | | | BreakpointPrinter moves to its own module. llvm-svn: 201242
* Improve the declaration when LDPO_PIE is not available.Sylvestre Ledru2014-02-111-7/+6
| | | | | | Thanks to İsmail Dönmez for the better declaration. llvm-svn: 201163
* If LDPO_PIE is not defined (before binutils 2.23 version), Sylvestre Ledru2014-02-111-0/+7
| | | | | | | use the hardcoded declaration 3 See r201110 for the initial change llvm-svn: 201161
* Move the *PassPrinter into their own module.Eli Bendersky2014-02-104-206/+315
| | | | | | | | | | These are self-contained in functionality so it makes sense to separate them, as opt.cpp has grown quite big already. Following Eric's suggestions, if this code is ever deemed useful outside of tools/opt, it will make sense to move it to one of the LLVM libraries like IR. llvm-svn: 201116
* LTO API: add lto_module_create_from_memory_with_path.Manman Ren2014-02-102-0/+12
| | | | | | | | | | | | | This function adds an extra path argument to lto_module_create_from_memory. The path argument will be passed to makeBuffer to make sure the MemoryBuffer has a name and the created module has a module identifier. This is mainly for emitting warning messages from the linker. When we emit warning message on a module, we can use the module identifier. rdar://15985737 llvm-svn: 201114
* Fix an old FIXME. LDPO_PIE is available since 2.23, realeased 2012-10-22.Rafael Espindola2014-02-101-2/+1
| | | | llvm-svn: 201110
* Change the begin and end methods in ObjectFile to match the style guide.Rafael Espindola2014-02-1011-83/+83
| | | | llvm-svn: 201108
* tools: cast the right operandSaleem Abdulrasool2014-02-091-1/+1
| | | | | | Properly apply the fix intended by SVN r201032. llvm-svn: 201036
* tools: explicitly cast to avoid a warningSaleem Abdulrasool2014-02-091-1/+1
| | | | llvm-svn: 201032
* tools: handle out-of-line personality 0 decodingSaleem Abdulrasool2014-02-081-1/+1
| | | | | | | | In some cases it is possible to have a personality 0 unwinding opcodes in the extab (such as when .handlerdata is used in the assembly). Simply decode the 3 opcodes for that case. llvm-svn: 201030
* [PM] Add a new "lazy" call graph analysis pass for the new pass manager.Chandler Carruth2014-02-062-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The primary motivation for this pass is to separate the call graph analysis used by the new pass manager's CGSCC pass management from the existing call graph analysis pass. That analysis pass is (somewhat unfortunately) over-constrained by the existing CallGraphSCCPassManager requirements. Those requirements make it *really* hard to cleanly layer the needed functionality for the new pass manager on top of the existing analysis. However, there are also a bunch of things that the pass manager would specifically benefit from doing differently from the existing call graph analysis, and this new implementation tries to address several of them: - Be lazy about scanning function definitions. The existing pass eagerly scans the entire module to build the initial graph. This new pass is significantly more lazy, and I plan to push this even further to maximize locality during CGSCC walks. - Don't use a single synthetic node to partition functions with an indirect call from functions whose address is taken. This node creates a huge choke-point which would preclude good parallelization across the fanout of the SCC graph when we got to the point of looking at such changes to LLVM. - Use a memory dense and lightweight representation of the call graph rather than value handles and tracking call instructions. This will require explicit update calls instead of some updates working transparently, but should end up being significantly more efficient. The explicit update calls ended up being needed in many cases for the existing call graph so we don't really lose anything. - Doesn't explicitly model SCCs and thus doesn't provide an "identity" for an SCC which is stable across updates. This is essential for the new pass manager to work correctly. - Only form the graph necessary for traversing all of the functions in an SCC friendly order. This is a much simpler graph structure and should be more memory dense. It does limit the ways in which it is appropriate to use this analysis. I wish I had a better name than "call graph". I've commented extensively this aspect. This is still very much a WIP, in fact it is really just the initial bits. But it is about the fourth version of the initial bits that I've implemented with each of the others running into really frustrating problms. This looks like it will actually work and I'd like to split the actual complexity across commits for the sake of my reviewers. =] The rest of the implementation along with lots of wiring will follow somewhat more rapidly now that there is a good path forward. Naturally, this doesn't impact any of the existing optimizer. This code is specific to the new pass manager. A bunch of thanks are deserved for the various folks that have helped with the design of this, especially Nick Lewycky who actually sat with me to go through the fundamentals of the final version here. llvm-svn: 200903
* [PM] Back out one hunk of the patch in r200901 that was *supposed* to goChandler Carruth2014-02-061-4/+0
| | | | | | in my next patch. Sorry for the breakage. llvm-svn: 200902
* [PM] Wire up the analysis managers in the opt driver. This isn't reallyChandler Carruth2014-02-061-2/+12
| | | | | | | | | necessary until we add analyses to the driver, but I have such an analysis ready and wanted to split this out. This is actually exercised by the existing tests of the new pass manager as the analysis managers are cross-checked and validated by the function and module managers. llvm-svn: 200901
* Remove support for not using .loc directives.Rafael Espindola2014-02-052-13/+3
| | | | | | Clang itself was not using this. The only way to access it was via llc. llvm-svn: 200862
* Use the information provided by getFlags to unify some code in llvm-nm.Rafael Espindola2014-02-051-90/+73
| | | | | | | | | | It is not clear how much we should try to expose in getFlags. For example, should there be a SF_Object and a SF_Text? But for information that is already being exposed, we may as well use it in llvm-nm. llvm-svn: 200820
* Small fix for llvm-nm handling of weak symbols on ELF (print 'v').Rafael Espindola2014-02-041-2/+6
| | | | llvm-svn: 200808
* cleanup: scc_iterator consumers should use isAtEndDuncan P. N. Exon Smith2014-02-041-4/+3
| | | | | | | | | | | | | | No functional change. Updated loops from: for (I = scc_begin(), E = scc_end(); I != E; ++I) to: for (I = scc_begin(); !I.isAtEnd(); ++I) for teh win. llvm-svn: 200789
* llvm-cov: Implement the preserve-paths flagJustin Bogner2014-02-041-1/+5
| | | | | | | | | | | | | | | | Until now, when a path in a gcno file included a directory, we would emit our .gcov file in that directory, whereas gcov always emits the file in the current directory. In doing so, this implements gcov's strange name-mangling -p flag, which is needed to avoid clobbering files when two with the same name exist in different directories. The path mangling is a bit ugly and only handles unix-like paths, but it's simple, and it doesn't make any guesses as to how it should behave outside of what gcov documents. If we decide this should be cross platform later, we can consider the compatibility implications then. llvm-svn: 200754
* llvm-cov: Implement the object-directory flagJustin Bogner2014-02-041-2/+13
| | | | llvm-svn: 200741
* llvm-cov: Ignore missing .gcda filesJustin Bogner2014-02-041-7/+12
| | | | | | | | When gcov is run without gcda data, it acts as if the counts are all zero and labels the file as - to indicate that there was no data. We should do the same. llvm-svn: 200740
* Move error handling down to getSymbolNMTypeChar.Rafael Espindola2014-02-041-54/+30
| | | | llvm-svn: 200727
* Simplify getSymbolFlags.Rafael Espindola2014-01-313-7/+3
| | | | | | | None of the object formats require extra parsing to compute these flags, so the method cannot fail. llvm-svn: 200574
* Revert r200560, "LTO itself hasn't depended on MCDisassembler any more."NAKAMURA Takumi2014-01-312-1/+2
| | | | | | Oh sorry, I missed LTO.exports, ... I checked just only *.cpp(s). llvm-svn: 200562
* LTO itself hasn't depended on MCDisassembler any more.NAKAMURA Takumi2014-01-312-3/+1
| | | | llvm-svn: 200560
* llvm/tools: Prune redundant target_link_libraries.NAKAMURA Takumi2014-01-312-4/+0
| | | | llvm-svn: 200559
* This file already has a "using namespace object;", use it.Rafael Espindola2014-01-301-22/+20
| | | | llvm-svn: 200493
* Only ELF has a dynamic symbol table. Remove it from ObjectFile.Rafael Espindola2014-01-301-2/+28
| | | | | | | | | COFF has only one symbol table. MachO has a LC_DYSYMTAB, but that is not a symbol table, just extra info about the one symbol table (LC_SYMTAB). IR (coming soon) also has only one table. llvm-svn: 200488
* Use early returns and factor the object::Binary creation.Rafael Espindola2014-01-301-69/+59
| | | | llvm-svn: 200484
* tools: fix Twine abuseSaleem Abdulrasool2014-01-301-10/+10
| | | | | | | utohexstr provides a temporary string, making it unsafe to use with the Twine interface which will not copy the string. Switch to using std::string. llvm-svn: 200457
* tools: remove unnecessary typenameSaleem Abdulrasool2014-01-301-2/+2
| | | | | | | This is acceptted by clang and gcc, but MSVC seems to balk at it. As it is unneeded, simply drop it. Fixes MSVC buildbots. llvm-svn: 200456
* tools: repair Windows buildSaleem Abdulrasool2014-01-301-2/+2
| | | | | | | | | exp2 is not available on Windows. Fortunately, we are calculating powers of 2 with expontents within the range of [4,12]. Simply use an equivalent bitshift operation to repair compilation with MSVC which does not provide this standard function. llvm-svn: 200454
* tools: add support for decoding ARM attributesSaleem Abdulrasool2014-01-308-0/+834
| | | | | | | | Enhance the ARM specific parsing support in llvm-readobj to support attributes. This allows for simpler tests to validate encoding of the build attributes as specified in the ARM ELF specification. llvm-svn: 200450
* Simplify the handling of iterators in ObjectFile.Rafael Espindola2014-01-3012-165/+55
| | | | | | | | | | | | None of the object file formats reported error on iterator increment. In retrospect, that is not too surprising: no object format stores symbols or sections in a linked list or other structure that requires chasing pointers. As a consequence, all error checking can be done on begin() and end(). This reduces the text segment of bin/llvm-readobj in my machine from 521233 to 518526 bytes. llvm-svn: 200442
* Fix TLS handling in ELF's getAddress and llvm-nm to print 'D' for it.Rafael Espindola2014-01-301-0/+1
| | | | llvm-svn: 200433
* llvm-cov: Accept the long forms of gcov optionsJustin Bogner2014-01-291-0/+6
| | | | | | | | | This is a bit imperfect, as these options don't show up in the help as is and single dash variants are accepted, which differs from gcov. Unfortunately, this seems to be as good as it gets with the cl::opt machinery, so it'll do as an incremental step. llvm-svn: 200419
* llvm-cov: Improve help message textJustin Bogner2014-01-291-22/+21
| | | | | | | | This Properly capitalizes and clarifies the help output from llvm-cov. It also puts the llvm-only / non-gcov-compatible options in their own category. llvm-svn: 200418
* llvm-cov: Expect a source file as a positional parameterJustin Bogner2014-01-291-13/+17
| | | | | | | | | | | Currently, llvm-cov isn't command-line compatible with gcov, which accepts a source file name as its first parameter and infers the gcno and gcda file names from that. This change keeps our -gcda and -gcno options available for convenience in overriding this behaviour, but adds the required parameter and inference behaviour as a compatible default. llvm-svn: 200417
* Normalize the style in llvm-nm.cpp.Rafael Espindola2014-01-291-298/+308
| | | | | | | It had grown fairly inconsistent. I am about to change it quite a bit to also use the object api when handling IR files. llvm-svn: 200374
* Make createObjectFile's signature a bit less error prone.Rafael Espindola2014-01-291-1/+2
| | | | | | | This will be better with c++11, but right now file_magic converts to bool, which makes the api really easy to misuse. llvm-svn: 200357
* Change MCStreamer EmitInstruction interface to take subtarget infoDavid Woodhouse2014-01-281-3/+4
| | | | llvm-svn: 200345
* [CMake] Put lli-child-target into the Folder "Misc".NAKAMURA Takumi2014-01-281-0/+2
| | | | llvm-svn: 200297
* Do not reference llvm-gcc from bugpointTobias Grosser2014-01-271-3/+3
| | | | | Reiterating: llvm-gcc is dead since a long time. llvm-svn: 200220
* Rename IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA.Rui Ueyama2014-01-271-2/+1
| | | | | | | editbin.exe and link.exe both accepts /highentropyva option to set this bit, so doing s/VIRTUAL_ADDRESS/VA/ should make sense. llvm-svn: 200191
* Pass a MCSubtargetInfo down to the TargetStreamer creation.Rafael Espindola2014-01-261-1/+1
| | | | | | | With this the target streamers will be able to know the target features that are in use. llvm-svn: 200135
* COFF: Add a missing enum value for high entropy ASLR.Rui Ueyama2014-01-261-0/+2
| | | | | | | | | That bit is not documented in the PE/COFF spec published by Microsoft, so we don't know the official name of it. I named this bit IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VIRTUAL_ADDRESS because the bit is reported as "high entropy virtual address" by dumpbin.exe, llvm-svn: 200121
* llvm-readobj: add support for PE32+ (Windows 64 bit executable).Rui Ueyama2014-01-261-48/+63
| | | | | | | | | | | | PE32+ supports 64 bit address space, but the file format remains 32 bit. So its file format is pretty similar to PE32 (32 bit executable). The differences compared to PE32 are (1) the lack of "BaseOfData" field and (2) some of its data members are 64 bit. In this patch, I added a new member function to get a PE32+ Header object to COFFObjectFile class and made llvm-readobj to use it. llvm-svn: 200117
* Fix "llvm-objdump -d -r" to show relocations inline for ELF filesMark Seaborn2014-01-251-6/+23
| | | | | | | | | | | | | | | | | | | This fixes a regression introduced by r182908, which broke llvm-objdump's ability to display relocations inline in a disassembly dump for ELF object files. That change removed a SectionRelocMap from Object/ELF.h, which we recreate in llvm-objdump.cpp. I discovered this regression via an out-of-tree test (test/NaCl/X86/pnacl-hides-sandbox-x86-64.ll) which used llvm-objdump. Note that the "Unknown" string in the test output on i386 isn't quite right, but this appears to be a pre-existing bug. Differential Revision: http://llvm-reviews.chandlerc.com/D2559 llvm-svn: 200090
* llvm-objdump: Some style cleanups to follow LLVM coding styleMark Seaborn2014-01-251-56/+69
| | | | | | | | | | | | Rename "ec" to "EC", and rename some iterators. Then fix whitespace using clang-format-diff. (As requested in http://llvm-reviews.chandlerc.com/D2559) Differential Revision: http://llvm-reviews.chandlerc.com/D2594 llvm-svn: 200053
* Fix c++03 build.Rafael Espindola2014-01-241-6/+12
| | | | llvm-svn: 200042
OpenPOWER on IntegriCloud