summaryrefslogtreecommitdiffstats
path: root/llvm/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* opt: Add option to strip or add llvm value namesMatthias Braun2015-06-241-0/+43
| | | | llvm-svn: 240583
* Make computeSymbolSizes never fail.Rafael Espindola2015-06-242-8/+4
| | | | | | | | | | | On ELF that was already the case since getting the size of a symbol never fails. On MachO and COFF we could fail trying to get the section of a symbol. But we don't really need the section, just the section number to know if two symbols are in the same section or not. llvm-svn: 240580
* Don't get confused with sections whose section number is reserved.Rafael Espindola2015-06-241-3/+1
| | | | | | | It is perfectly possible for SHNDX to contain indexes that have the same value as reserved st_shndx values. llvm-svn: 240544
* [llvm-stress] Simple refactoring and better style. NFC.Pawel Bylica2015-06-241-53/+36
| | | | llvm-svn: 240534
* Change how symbol sizes are handled in lib/Object.Rafael Espindola2015-06-245-36/+32
| | | | | | | | | | | | | | COFF and MachO only define symbol sizes for common symbols. Reflect that in the class hierarchy by having a method for common symbols only in the base and a general one in ELF. This avoids the need of using a magic value for the size, which had a few problems * Most callers didn't check for it. * The ones that did could not tell the magic value from a file actually having that value. llvm-svn: 240529
* Add "-mcpu=" option to llvm-rtdyldPetar Jovanovic2015-06-231-1/+7
| | | | | | | | | | | This patch adds the -mcpu= option to llvm-rtdyld. With this option, one can test relocations for different types of CPUs (e.g. Mips64r6). Patch by Vladimir Radosavljevic. Differential Revision: http://reviews.llvm.org/D10503 llvm-svn: 240477
* Revert "[FaultMaps] Move FaultMapParser to Object/"Sanjoy Das2015-06-231-1/+1
| | | | | | | This reverts commit r240364 (git c49542e5bb186). The issue r240364 was trying to fix was fixed independently in r240362. llvm-svn: 240448
* Adding the missing LTO API to lto.exportsSteven Wu2015-06-231-0/+1
| | | | | | | | | | | | | | Summary: lto_codegen_set_should_embed_uselists is introduced in r235943 but not added to lto.exports. Add to export list to expose the API. Reviewers: dexonsmith Subscribers: rafael, llvm-commits Differential Revision: http://reviews.llvm.org/D10658 llvm-svn: 240442
* Don't pass a 32 bit value to "%08" PRIx64.Rafael Espindola2015-06-231-4/+4
| | | | | | Should fix the arm bots. llvm-svn: 240439
* objdump: Don't print a (always 0) size for MachO symbols.Rafael Espindola2015-06-231-10/+10
| | | | | | | | | | | Only common symbol on MachO and COFF have a size. For COFF we already had a custom format. For MachO, there is no native objdump and we were printing it as ELF. Now we only print the sizes for symbols that actually have them. llvm-svn: 240422
* Simplify the Mangler interface now that DataLayout is mandatory.Rafael Espindola2015-06-231-3/+1
| | | | | | | We only need to pass in a DataLayout when mangling a raw string, not when constructing the mangler. llvm-svn: 240405
* Compute correct symbol sizes for MachO and COFF.Rafael Espindola2015-06-231-2/+9
| | | | | | Before this would dump from the symbol start to the end of the section. llvm-svn: 240367
* Extract an utility for computing symbol sizes on MachO and COFF.Rafael Espindola2015-06-231-44/+8
| | | | | | I will add a second user in the next commit. llvm-svn: 240366
* [FaultMaps] Move FaultMapParser to Object/Sanjoy Das2015-06-231-1/+1
| | | | | | | | | | | | | | | | | | Summary: That way llvm-objdump can rely on it without adding an extra dependency on CodeGen. This change duplicates the FaultKind enum and the code that serializes it to a string. I could not figure out a way to get around this without adding a new dependency to Object Reviewers: rafael, ab Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10619 llvm-svn: 240364
* llvm/tools/llvm-objdump/CMakeLists.txt: Update libdeps to fix r240304.NAKAMURA Takumi2015-06-231-0/+1
| | | | llvm-svn: 240362
* [CMake] Treating LLVM_INCLUDE_TOOLS, which is a bool, as a string to change ↵Chris Bieneman2015-06-221-8/+5
| | | | | | | | | | | | | | | | behaviors of the build is a dirty hack. We shouldn't do it. Summary: I don't think anyone is relying on this behavior for bootstrapping (because I don't think it works), but if you do need it, speak now or forever hold your peace. Reviewers: chapuni, samsonov Reviewed By: samsonov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10613 llvm-svn: 240344
* [Object] Search for architecures by name in ↵Frederic Riss2015-06-222-10/+7
| | | | | | | | | | | | | | | | | | | | | | | | MachOUniversalBinary::getObjectForArch() The reason we need to search by name rather than by Triple::ArchType is to handle subarchitecture correclty. There is no different ArchType for the x86_64h architecture (it identifies itself as x86_64), or for the various ARM subarches. The only way to get to the subarch slice in an universal binary is to search by name. This issue led to hard to debug and transient symbolication failures in Asan tests (it mostly works, because the files are very similar). This also affects the Profiling infrastucture as it is the other user of that API. Reviewers: samsonov, bogner Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10604 llvm-svn: 240339
* Support/ELF: Add EM_AMDGPUTom Stellard2015-06-221-1/+2
| | | | | | | | | | | | Summary: This will be used by the R600 backend. Reviewers: chandlerc, rafael Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10389 llvm-svn: 240329
* [FaultMaps] Add a parser for the __llvm__faultmaps section.Sanjoy Das2015-06-221-1/+52
| | | | | | | | | | | | | | | Summary: The parser is exercised by llvm-objdump using -print-fault-maps. As is probably obvious, the code itself was "heavily inspired" by http://reviews.llvm.org/D10434. Reviewers: reames, atrick, JosephTremoulet Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10491 llvm-svn: 240304
* ArrayRef-ify libDriverMainDavid Blaikie2015-06-211-1/+1
| | | | llvm-svn: 240234
* Make getRelocationSection MachO only.Rafael Espindola2015-06-191-1/+1
| | | | | | | | | | | | | | There are 3 types of relocations on MachO * Scattered * Section based * Symbol based On ELF and COFF relocations are symbol based. We were in the strange situation that we abstracted over two of them. This makes section based relocations MachO only. llvm-svn: 240149
* Fix the build.Rafael Espindola2015-06-191-1/+1
| | | | | | Sorry, I have no idea how grep failed to find this. llvm-svn: 240133
* Fix "the the" in comments.Eric Christopher2015-06-192-2/+2
| | | | llvm-svn: 240112
* Improve the --expand-relocs handling of MachO.Rafael Espindola2015-06-181-17/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In a relocation target can take 3 basic forms * A r_value in scattered relocations. * A symbol in external relocations. * A section is non-external relocations. Have the dump reflect that. With this change we go from CHECK-NEXT: Extern: 0 CHECK-NEXT: Type: X86_64_RELOC_SUBTRACTOR (5) CHECK-NEXT: Symbol: 0x2 CHECK-NEXT: Scattered: 0 To just // CHECK-NEXT: Type: X86_64_RELOC_SUBTRACTOR (5) // CHECK-NEXT: Section: __data (2) Since the relocation is with a section, we print the seciton name and don't need to say that it is not scattered or external. Someone motivated can add further special cases for things like ARM64_RELOC_ADDEND and ARM_RELOC_PAIR. llvm-svn: 240073
* Move the personality function from LandingPadInst to FunctionDavid Majnemer2015-06-171-0/+4
| | | | | | | | | | | | | | | | | | | The personality routine currently lives in the LandingPadInst. This isn't desirable because: - All LandingPadInsts in the same function must have the same personality routine. This means that each LandingPadInst beyond the first has an operand which produces no additional information. - There is ongoing work to introduce EH IR constructs other than LandingPadInst. Moving the personality routine off of any one particular Instruction and onto the parent function seems a lot better than have N different places a personality function can sneak onto an exceptional function. Differential Revision: http://reviews.llvm.org/D10429 llvm-svn: 239940
* Use named temporaries for directional labels.Rafael Espindola2015-06-171-0/+3
| | | | | | | | | | Directional labels can show up in symbol tables (and we have a llvm-mc test for that). Given that, we need to make sure they are named. With that out of the way, use setUseNamesOnTempLabels in llvm-mc so that it too benefits from the memory saving. llvm-svn: 239914
* Use std::unique_ptr to manage the DataStreamer in bitcode parsing.Rafael Espindola2015-06-161-2/+3
| | | | | | We were already deleting it, this just makes it explicit. llvm-svn: 239867
* Return a unique_ptr from getLazyBitcodeModule and parseBitcodeFile. NFC.Rafael Espindola2015-06-161-2/+2
| | | | llvm-svn: 239858
* [llvm-readobj] Print MIPS .reginfo section contentSimon Atanasyan2015-06-163-0/+35
| | | | llvm-svn: 239856
* Replace string GNU Triples with llvm::Triple in ↵Daniel Sanders2015-06-161-1/+1
| | | | | | | | | | | | | | | | | | TargetMachine::getTargetTriple(). NFC. Summary: This continues the patch series to eliminate StringRef forms of GNU triples from the internals of LLVM that began in r239036. Reviewers: rengolin Reviewed By: rengolin Subscribers: llvm-commits, rengolin Differential Revision: http://reviews.llvm.org/D10381 llvm-svn: 239815
* Recommit r239721: Replace string GNU Triples with llvm::Triple in ↵Daniel Sanders2015-06-162-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | InitMCObjectFileInfo. NFC. Summary: This affects other tools so the previous C++ API has been retained as a deprecated function for the moment. Clang has been updated with a trivial patch (not covered by the pre-commit review) to avoid breaking -Werror builds. Other in-tree tools will be fixed with similar patches. This continues the patch series to eliminate StringRef forms of GNU triples from the internals of LLVM that began in r239036. The first time this was committed it accidentally fixed an inconsistency in triples in llvm-mc and this caused a failure. This inconsistency was fixed in r239808. Reviewers: rengolin Reviewed By: rengolin Subscribers: llvm-commits, rengolin Differential Revision: http://reviews.llvm.org/D10366 llvm-svn: 239812
* [llvm-mc] The object form of the GNU triple should be the same as the string ↵Daniel Sanders2015-06-161-1/+3
| | | | | | | | | | | | | | | | | | | | | | | form. Summary: GetTarget() may modify TripleName without also updating TheTriple. This can lead to situations where the MCObjectStreamer has a different triple to the rest of LLVM. This inconsistency caused sparc-little-endian.s to pass on Windows because most of LLVM had sparcel-pc-win32 while MCObjectStreamer had "". I believe the same kind of thing was also true of Darwin. Reviewers: rengolin Reviewed By: rengolin Subscribers: llvm-commits, rengolin, rafael Differential Revision: http://reviews.llvm.org/D10450 llvm-svn: 239808
* modules: Move ProfileKinds to an anonymous namespaceDuncan P. N. Exon Smith2015-06-161-0/+2
| | | | | | | | Fix a build failure with `LLVM_ENABLE_MODULES` due to `ProfileData::instr` conflicting with a function `instr()` in `<curses.h>`. llvm-svn: 239793
* MIR Serialization: Connect the machine function analysis pass to the MIR parser.Alex Lorenz2015-06-151-4/+9
| | | | | | | | | | | | | | | | | | | | | This commit connects the machine function analysis pass (which creates machine functions) to the MIR parser, which will initialize the machine functions with the state from the MIR file and reconstruct the machine IR. This commit introduces a new interface called 'MachineFunctionInitializer', which can be used to provide custom initialization for the machine functions. This commit also introduces a new diagnostic class called 'DiagnosticInfoMIRParser' which is used for MIR parsing errors. This commit modifies the default diagnostic handling in LLVMContext - now the the diagnostics are printed directly into llvm::errs() so that the MIR parsing errors can be printed with colours. Reviewers: Justin Bogner Differential Revision: http://reviews.llvm.org/D9928 llvm-svn: 239753
* gold-plugin: save the .o when given -save-temps.Rafael Espindola2015-06-151-3/+8
| | | | | | | The plugin now save the bitcode before and after optimizations and the .o that is passed to the linker. llvm-svn: 239726
* Revert r239721 - Replace string GNU Triples with llvm::Triple in ↵Daniel Sanders2015-06-152-5/+3
| | | | | | | | InitMCObjectFileInfo. NFC. It appears to cause sparc-little-endian.s to assert on Windows and Darwin. llvm-svn: 239724
* Replace string GNU Triples with llvm::Triple in InitMCObjectFileInfo. NFC.Daniel Sanders2015-06-152-3/+5
| | | | | | | | | | | | | | | | | | | | | Summary: This affects other tools so the previous C++ API has been retained as a deprecated function for the moment. Clang has been updated with a trivial patch (not covered by the pre-commit review) to avoid breaking -Werror builds. Other in-tree tools will be fixed with similar trivial patches. This continues the patch series to eliminate StringRef forms of GNU triples from the internals of LLVM that began in r239036. Reviewers: rengolin Reviewed By: rengolin Subscribers: llvm-commits, rengolin Differential Revision: http://reviews.llvm.org/D10366 llvm-svn: 239721
* [Orc] Tidy up initialization based on review feedback for r239561 from dblaikie.Lang Hames2015-06-121-20/+19
| | | | | | NFC. llvm-svn: 239645
* [Orc] Fix a bug in the CompileOnDemand layer where stub decls were not clonedLang Hames2015-06-121-1/+1
| | | | | | | | | | | into partitions. Also, add an option to clone stub definitions (not just decls) into partitions: these definitions could be inlined in some places to avoid the overhead of calling via the stub. Found by inspection - no test case yet, although I plan to add a unit test for this once the CompileOnDemand layer refactoring settles down. llvm-svn: 239640
* Wrap some long lines in LLVMBuild files. NFCDouglas Katzman2015-06-125-8/+71
| | | | | | | As suggested by jroelofs in a prior review (D9752), it makes sense to generally prefer multi-line format. llvm-svn: 239632
* Have the ELF symbol predicates match more directly the spec.Rafael Espindola2015-06-121-2/+2
| | | | | | | | | | | | | | | | The underlaying issues is that this code can't really know if an OS specific or processor specific section number should return true or false. One option would be to assert or return an error, but that looks like over engineering since extensions are not that common. It seems better to have these be direct implementation of the ELF spec so that they are natural for someone familiar with ELF reading the code. Code that does have to handle OS/Architecture specific values can do it at a higher level. llvm-svn: 239618
* [Orc] Remove some unnecesary includes and whitespace that slipped in to r239561.Lang Hames2015-06-111-2/+1
| | | | | | NFC. llvm-svn: 239564
* [Orc] Make partition identification in the CompileOnDemand layer lazy.Lang Hames2015-06-111-16/+20
| | | | | | This also breaks out the logical dylib symbol resolution logic. llvm-svn: 239561
* LibDriver, llvm-lib: introduce.Peter Collingbourne2015-06-094-7/+31
| | | | | | | | | | llvm-lib is intended to be a lib.exe compatible utility that also understands bitcode. The implementation lives in a library so that lld can use it to implement /lib. Differential Revision: http://reviews.llvm.org/D10297 llvm-svn: 239434
* Remove object_error::success and use std::error_code() insteadRui Ueyama2015-06-096-12/+12
| | | | | | | | | | | | make_error_code(object_error) is slow because object::object_category() uses a ManagedStatic variable. But the real problem is that the function is called too frequently. This patch uses std::error_code() instead of object_error::success. In most cases, we return "success", so this patch reduces number of function calls to that function. http://reviews.llvm.org/D10333 llvm-svn: 239409
* [lli] Make the OptLevel (-O=<char>) option accessible to the lazy JIT.Lang Hames2015-06-092-13/+20
| | | | | | No test case - this only affects generated code performance. llvm-svn: 239383
* [llvm-readobj] Use the new symbol API.Davide Italiano2015-06-081-7/+7
| | | | llvm-svn: 239286
* Do not build LLD from tools/Makefile, as LLD no longer has a Makefile build.Peter Collingbourne2015-06-081-2/+1
| | | | llvm-svn: 239283
* llvm-ar: Move archive writer to Object.Peter Collingbourne2015-06-081-326/+6
| | | | | | | | | No functional change intended, other than some minor changes to certain diagnostics. Differential Revision: http://reviews.llvm.org/D10296 llvm-svn: 239278
* [objdump] Moving PrintImmHex out of MachODump and in to llvm-objdump and ↵Colin LeMahieu2015-06-073-4/+6
| | | | | | setting instprinter appropriately. llvm-svn: 239265
OpenPOWER on IntegriCloud