summaryrefslogtreecommitdiffstats
path: root/llvm/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* [llvm-readobj][mips] Display MIPS specific info under --arch-specific flagSimon Atanasyan2019-10-031-1/+8
| | | | | | | Old options `--mips-plt-got`, `--mips-abi-flags`, '--mips-reginfo`, and `--mips-options` wiil be deleted in a separate patch. llvm-svn: 373588
* [llvm-readobj][mips] Do not show an error if GOT is missedSimon Atanasyan2019-10-031-1/+1
| | | | | | It is not an error if a file does not contain GOT. llvm-svn: 373587
* [llvm-exegesis][NFC] Rename ExegesisTarget::decrementLoopCounterAndLoop()Clement Courbet2019-10-033-6/+10
| | | | | | | | | | | | | | Summary: To decrementLoopCounterAndJump, and explicitely take the jump target. Reviewers: gchatelet Subscribers: tschuett, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68375 llvm-svn: 373571
* [llvm] [cmake] Add install targets for missing distribution componentsMichal Gorny2019-10-021-0/+7
| | | | | | | | | | Add install targets as necessary to include all files normally installed in LLVM_DISTRIBUTION_COMPONENTS. This includes targets for Sphinx docs, opt-viewer Python modules and TableGens. Differential Revision: https://reviews.llvm.org/D68339 llvm-svn: 373482
* [llvm-readelf] - Report a warning when .hash section contains a chain with a ↵George Rimar2019-10-021-0/+11
| | | | | | | | | | | | cycle. It is possible to craft a .hash section that triggers an infinite loop in llvm-readelf code. This patch fixes the issue and introduces a warning. Differential revision: https://reviews.llvm.org/D68086 llvm-svn: 373476
* [llvm-dwarfdump] Fix dumping of wrong locstats mapDjordje Todorovic2019-10-021-1/+1
| | | | llvm-svn: 373469
* [llvm-objcopy] Add --set-section-alignmentFangrui Song2019-10-026-11/+52
| | | | | | | | | | | | | Fixes PR43181. This option was recently added to GNU objcopy (binutils PR24942). `llvm-objcopy -I binary -O elf64-x86-64 --set-section-alignment .data=8` can set the alignment of .data. Reviewed By: grimar, jhenderson, rupprecht Differential Revision: https://reviews.llvm.org/D67656 llvm-svn: 373461
* [PGO] Fix typos from r359612. NFC.Rong Xu2019-10-011-1/+1
| | | | llvm-svn: 373369
* [llvm-mca] Add a -mattr flagDavid Green2019-10-011-1/+6
| | | | | | | | | This adds a -mattr flag to llvm-mca, for cases where the -mcpu option does not contain all optional features. Differential Revision: https://reviews.llvm.org/D68190 llvm-svn: 373358
* [llvm-exegesis/lib] Fix missing linkage to MCParserMichal Gorny2019-10-011-0/+1
| | | | | | | | | | | Otherwise, shared-lib build fails with: lib64/libLLVMExegesis.a(SnippetFile.cpp.o): In function `llvm::exegesis::readSnippets(llvm::exegesis::LLVMState const&, llvm::StringRef)': SnippetFile.cpp:(.text._ZN4llvm8exegesis12readSnippetsERKNS0_9LLVMStateENS_9StringRefE+0x31f): undefined reference to `llvm::createMCAsmParser(llvm::SourceMgr&, llvm::MCContext&, llvm::MCStreamer&, llvm::MCAsmInfo const&, unsigned int)' SnippetFile.cpp:(.text._ZN4llvm8exegesis12readSnippetsERKNS0_9LLVMStateENS_9StringRefE+0x41c): undefined reference to `llvm::MCAsmParser::setTargetParser(llvm::MCTargetAsmParser&)' collect2: error: ld returned 1 exit status llvm-svn: 373332
* [obj2yaml] - Fix BB after r373315.George Rimar2019-10-011-4/+6
| | | | | | | The success return value for data extractor's cursor should also be checked. llvm-svn: 373319
* [yaml2obj/obj2yaml] - Add support for SHT_HASH sections.George Rimar2019-10-011-0/+47
| | | | | | | | | | | | | | | SHT_HASH specification is: http://www.sco.com/developers/gabi/latest/ch5.dynamic.html#hash In short the format is the following: it has 2 uint32 fields in its header: nbucket and nchain followed by (nbucket + nchain) uint32 values. This patch allows dumping and parsing such sections. Differential revision: https://reviews.llvm.org/D68085 llvm-svn: 373315
* [llvm-readobj/llvm-readelf] Delete --arm-attributes (alias for --arch-specific)Fangrui Song2019-10-011-2/+0
| | | | | | | | | | | | | | | | D68110 added --arch-specific (supported by GNU readelf) and made --arm-attributes an alias for it. The tests were later migrated to use --arch-specific. Note, llvm-readelf --arch-specific currently just uses llvm-readobj style output for ARM attributes. The readelf-style output is not implemented. Reviewed By: compnerd, kongyi, rupprecht Differential Revision: https://reviews.llvm.org/D68196 llvm-svn: 373291
* [bugpoint] Update runPasses to take ArrayRef instead of a pointer (NFC)Florian Hahn2019-09-303-12/+8
| | | | | | | | | | | | | This makes it slightly easier to pass extra arguments to runPasses and simplifies the code slightly. Reviewers: efriedma, bogner, dblaikie, diegotf, hiraditya Reviewed By: dblaikie, hiraditya Differential Revision: https://reviews.llvm.org/D68228 llvm-svn: 373265
* [NewPM] Port MachineModuleInfo to the new pass manager.Yuanfang Chen2019-09-302-17/+18
| | | | | | | | | | | | | Existing clients are converted to use MachineModuleInfoWrapperPass. The new interface is for defining a new pass manager API in CodeGen. Reviewers: fedor.sergeev, philip.pfaffe, chandlerc, arsenm Reviewed By: arsenm, fedor.sergeev Differential Revision: https://reviews.llvm.org/D64183 llvm-svn: 373240
* [SSP] [1/3] Revert "StackProtector: Use PointerMayBeCaptured"Paul Robinson2019-09-301-1/+0
| | | | | | | | | | | "Captured" and "relevant to Stack Protector" are not the same thing. This reverts commit f29366b1f594f48465c5a2754bcffac6d70fd0b1. aka r363169. Differential Revision: https://reviews.llvm.org/D67842 llvm-svn: 373216
* [llvm-exegesis][NFC] Move BenchmarkFailure to own file.Clement Courbet2019-09-3010-46/+66
| | | | | | | | | | | | | | Summary: And rename to exegesis::Failure, as it's used everytwhere. Reviewers: gchatelet Subscribers: tschuett, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68217 llvm-svn: 373209
* [llvm-exegesis][NFC] Refactor snippet file reading out of tool main.Clement Courbet2019-09-304-144/+201
| | | | | | | | | | | | | | Summary: Add unit tests. Reviewers: gchatelet Subscribers: mgorny, tschuett, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68212 llvm-svn: 373202
* [llvm-lipo] Add support for -arch Alexander Shaposhnikov2019-09-272-39/+46
| | | | | | | | | | Add support for -arch. Differential revision: https://reviews.llvm.org/D68116 Test plan: make check-all llvm-svn: 373132
* [llvm-readobj] Rename --arm-attributes to --arch-specificYi Kong2019-09-271-5/+9
| | | | | | | | | This is for compatibility with GNU readobj. --arm-attributes option is left as a hidden alias due to large number of tests using it. Differential Revision: https://reviews.llvm.org/D68110 llvm-svn: 373125
* Fix MSVC "not all control paths return a value" warning. NFCI.Simon Pilgrim2019-09-271-0/+1
| | | | llvm-svn: 373100
* [llvm-exegesis] Add loop mode for repeating the snippet.Clement Courbet2019-09-2713-81/+376
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Before this change the Executable function was made by duplicating the snippet. This change adds a --repetion-mode={loop|duplicate} flag that allows choosing between this behaviour and wrapping the snippet instructions in a loop. The new mode can help measurements when the snippet fits in the DSB by short-cirtcuiting decoding. The loop adds a dec + jmp to the measurements, but since these are not part of the critical path, they execute in parallel with the measured code and do not impact measurements in practice. Overview of the change: - New SnippetRepetitor abstraction that handles repeating the snippet. The assembler delegates repeating the instructions to this class. - ExegesisTarget learns how to decrement loop counter and jump. - Some refactoring of the assembler into FunctionFiller/BasicBlockFiller. Reviewers: gchatelet Subscribers: mgorny, tschuett, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68125 llvm-svn: 373083
* [Alignment][NFC] Remove unneeded llvm:: scoping on Align typesGuillaume Chatelet2019-09-273-4/+4
| | | | llvm-svn: 373081
* [sancov][NFC] Make filename Regexes "const"Thomas Preud'homme2019-09-271-2/+2
| | | | | | | | | | | | | | | | | | Summary: The const-correctness of match() was fixed in rL372764, which allows such static Regex objects to be marked const. Reviewers: thopre Reviewed By: thopre Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68091 llvm-svn: 373058
* [llvm-exegesis] Refactor how forbidden registers are computed.Clement Courbet2019-09-279-72/+102
| | | | | | | | | | | | | | | | | | | | Summary: Right now latency generation can incorrectly select the scratch register as a dependency-carrying register. - Move the logic for preventing register selection from Uops implementation to common SnippetGenerator class. - Aliasing detection now takes a set of forbidden registers just like random register assignment does. Reviewers: gchatelet Subscribers: tschuett, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68084 llvm-svn: 373048
* [llvm-exegesis][NFC] Remove dead code.Clement Courbet2019-09-262-10/+0
| | | | | | | | | | | | | | Summary: `hasAliasingImplicitRegistersThrough()` is no longer used. Reviewers: gchatelet Subscribers: tschuett, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68078 llvm-svn: 372968
* Improve C API support for atomicrmw and cmpxchg.Nick Lewycky2019-09-261-1/+20
| | | | | | | | | | | | | | atomicrmw and cmpxchg have a volatile flag, so allow them to be get and set with LLVM{Get,Set}Volatile. atomicrmw and fence have orderings, so allow them to be get and set with LLVM{Get,Set}Ordering. Add missing LLVMAtomicRMWBinOpFAdd and LLVMAtomicRMWBinOpFSub enum constants. AtomicCmpXchg also has a weak flag, add a getter/setter for that too. Add a getter/setter for the binary-op of an atomicrmw. atomicrmw and cmpxchg have a volatile flag, so allow it to be set/get with LLVMGetVolatile and LLVMSetVolatile. Add missing LLVMAtomicRMWBinOpFAdd and LLVMAtomicRMWBinOpFSub enum constants. AtomicCmpXchg also has a weak flag, add a getter/setter for that too. Add a getter/setter for the binary-op of an atomicrmw. Add LLVMIsA## for CatchSwitchInst, CallBrInst and FenceInst, as well as AtomicCmpXchgInst and AtomicRMWInst. Update llvm-c-test to include atomicrmw and fence, and to copy volatile for the four applicable instructions. Differential Revision: https://reviews.llvm.org/D67132 llvm-svn: 372938
* [llvm-readobj/llvm-readelf] - .stack_sizes: demangle symbol names in ↵George Rimar2019-09-251-30/+28
| | | | | | | | | | | | | | | warnings reported. I started this patch as a refactoring, tried to make a helper for getting symbol names, similar to how we get section names used in warning messages. So this patch cleanups the code and fixes an issue: symbol names in warning messages were not demangled. Differential revision: https://reviews.llvm.org/D68012 llvm-svn: 372867
* [llvm-readobj] - Don't crash when dumping .stack_sizes and unable to find a ↵George Rimar2019-09-251-1/+1
| | | | | | | | | | | | | | | relocation resolver. The crash might happen when we have either a broken or unsupported object and trying to resolve relocations when dumping the .stack_sizes section. For the test case I used a 32-bits ELF header and a 64-bit relocation. In this case a null pointer is returned by the code instead of the relocation resolver function and then we crash. Differential revision: https://reviews.llvm.org/D67962 llvm-svn: 372838
* [NFC] Add { } to silence compiler warning [-Wmissing-braces].Huihui Zhang2019-09-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | /local/mnt/workspace/huihuiz/llvm-comm-git-2/llvm-project/llvm/lib/Object/MachOObjectFile.cpp:2731:7: warning: suggest braces around initialization of subobject [-Wmissing-braces] "i386", "x86_64", "x86_64h", "armv4t", "arm", "armv5e", ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { 1 warning generated. /local/mnt/workspace/huihuiz/llvm-comm-git-2/llvm-project/llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp:355:46: warning: suggest braces around initialization of subobject [-Wmissing-braces] return addMappingFromTable<1>(MI, MRI, { 0 }, Table); ^ {} 1 warning generated. /local/mnt/workspace/huihuiz/llvm-comm-git-2/llvm-project/llvm/tools/llvm-objcopy/ELF/Object.cpp:400:57: warning: suggest braces around initialization of subobject [-Wmissing-braces] static constexpr std::array<uint8_t, 4> ZlibGnuMagic = {'Z', 'L', 'I', 'B'}; ^~~~~~~~~~~~~~~~~~ { } 1 warning generated. llvm-svn: 372811
* [yaml2obj/obj2yaml] - Add support for .stack_sizes sections.George Rimar2019-09-241-0/+61
| | | | | | | | | | | .stack_sizes is a SHT_PROGBITS section that contains pairs of <address (4/8 bytes), stack size (uleb128)>. This patch teach tools to parse and dump it. Differential revision: https://reviews.llvm.org/D67757 llvm-svn: 372762
* [llvm-objcopy] Fix a warningon unused variable. NFC.Michael Liao2019-09-241-1/+1
| | | | llvm-svn: 372745
* [llvm-objcopy] Refactor ELF-specific config out to ELFCopyConfig. NFC.Seiya Nuta2019-09-247-128/+220
| | | | | | | | | | | | | | | | | | | | | Summary: This patch splits the command-line parsing into two phases: First, parse cross-platform options and leave ELF-specific options unparsed. Second, in the ELF implementation, parse ELF-specific options and construct ELFCopyConfig. Reviewers: espindola, alexshap, rupprecht, jhenderson, jakehehrlich, MaskRay Reviewed By: alexshap, jhenderson, jakehehrlich, MaskRay Subscribers: mgorny, emaste, arichardson, jakehehrlich, MaskRay, abrachet, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67139 llvm-svn: 372712
* [llvm-lipo] Add support for archives Alexander Shaposhnikov2019-09-231-140/+204
| | | | | | | | | | | Add support for creating universal binaries which can contain an archive. Differential revision: https://reviews.llvm.org/D67758 Test plan: make check-all llvm-svn: 372666
* [llvm-readobj] - Stop treating ".stack_sizes.*" sections as stack sizes ↵George Rimar2019-09-231-3/+3
| | | | | | | | | | | | | | | | sections. llvm-readobj currently handles .stack_sizes.* (e.g. .stack_sizes.foo) as a normal stack sizes section. Though MC does not produce sections with such names. Also, linkers do not combine .stack_sizes.* into .stack_sizes. A mini discussion about this correctness issue is here: https://reviews.llvm.org/D67757#inline-609274 This patch changes implementation so that only now only '.stack_sizes' name is accepted as a real stack sizes section. Differential revision: https://reviews.llvm.org/D67824 llvm-svn: 372578
* [llvm-readobj] - Implement LLVM-style dumping for .stack_sizes sections.George Rimar2019-09-232-6/+9
| | | | | | | | | D65313 implemented GNU-style dumping (llvm-readelf). This one implements LLVM-style dumping (llvm-readobj). Differential revision: https://reviews.llvm.org/D67834 llvm-svn: 372576
* Recommit [SampleFDO] Expose an interface to return the size of a sectionWei Mi2019-09-211-2/+25
| | | | | | | | | | | | | | | | | | | | | or the size of the profile for profile in ExtBinary format. Fix a test failure on Mac. [SampleFDO] Expose an interface to return the size of a section or the size of the profile for profile in ExtBinary format. Sometimes we want to limit the size of the profile by stripping some functions with low sample count or by stripping some function names with small text size from profile symbol list. That requires the profile reader to have the interfaces returning the size of a section or the size of total profile. The patch add those interfaces. At the same time, add some dump facility to show the size of each section. Differential revision: https://reviews.llvm.org/D67726 llvm-svn: 372478
* [Support] Add a DataExtractor constructor that takes ArrayRef<uint8_t>Fangrui Song2019-09-212-21/+11
| | | | | | | | | | The new constructor can simplify some llvm-readobj call sites. Reviewed By: grimar, dblaikie Differential Revision: https://reviews.llvm.org/D67797 llvm-svn: 372473
* Revert "[SampleFDO] Expose an interface to return the size of a section or ↵Amara Emerson2019-09-211-25/+2
| | | | | | | | | | the size" This reverts commit f118852046a1d255ed8c65c6b5db320e8cea53a0. Broke the macOS build/greendragon bots. llvm-svn: 372464
* [SampleFDO] Expose an interface to return the size of a section or the sizeWei Mi2019-09-201-2/+25
| | | | | | | | | | | | | | of the profile for profile in ExtBinary format. Sometimes we want to limit the size of the profile by stripping some functions with low sample count or by stripping some function names with small text size from profile symbol list. That requires the profile reader to have the interfaces returning the size of a section or the size of total profile. The patch add those interfaces. At the same time, add some dump facility to show the size of each section. llvm-svn: 372439
* Can't pass .dSYM directory to llvm-objdump -dsym= (and error message is wrong)Michael Trent2019-09-201-9/+22
| | | | | | | | | | | | | | | | | | | | | Summary: Allow users to pass the path to a .dSYM directory to llvm-objdump's -dsym flag rather than requiring users to find the DWARF DSYM Mach-O within the bundle structure by hand. rdar://46873333 Reviewers: pete, lhames, friss, aprantl Reviewed By: pete, aprantl Subscribers: MaskRay, aprantl, rupprecht, seiya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67780 llvm-svn: 372421
* [TextAPI] Arch&Platform to TargetCyndy Ishida2019-09-201-23/+4
| | | | | | | | | | | | | | | | | | | | Summary: This is a patch for updating TextAPI/Macho to read in targets as opposed to arch/platform. This is because in previous versions tbd files only supported a single platform but that is no longer the case, so, now its tracked by unique triples. This precedes a seperate patch that will add the TBD-v4 format Reviewers: ributzka, steven_wu, plotfi, compnerd, smeenai Reviewed By: ributzka Subscribers: mgorny, hiraditya, dexonsmith, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67527 llvm-svn: 372396
* [llvm-dwarfdump] Adjust Windows path to be acceptable by JSONDjordje Todorovic2019-09-201-7/+4
| | | | | | | | | | Backslash is a special character according to JSON specification, so we should avoid that when printing a file path with the --statistics option. Differential Revision: https://reviews.llvm.org/D67699 llvm-svn: 372378
* Reapply [llvm-ar] Include a line number when failing to parse an MRI scriptOwen Reynolds2019-09-201-3/+16
| | | | | | | | | | | Reapply r372309 Errors that occur when reading an MRI script now include a corresponding line number. Differential Revision: https://reviews.llvm.org/D67449 llvm-svn: 372374
* [llvm-readobj] flush output before crashYuanfang Chen2019-09-201-1/+3
| | | | | | Otherwise the output could be lost. llvm-svn: 372372
* [llvm-ar] Removes repetition in the error messageFangrui Song2019-09-201-2/+1
| | | | | | | | | As per bug 40244, fixed an error where the error message was repeated. Differential Revision: https://reviews.llvm.org/D67038 Patch by Yu Jian (wyjw) llvm-svn: 372370
* llvm-reduce: Follow-up to 372280, now with more-better msan fixingDavid Blaikie2019-09-191-1/+1
| | | | llvm-svn: 372349
* [SVFS] Vector Function ABI demangling.Francesco Petrogalli2019-09-192-0/+33
| | | | | | | | | | | | | | | | This patch implements the demangling functionality as described in the Vector Function ABI. This patch will be used to implement the SearchVectorFunctionSystem (SVFS) as described in the RFC: http://lists.llvm.org/pipermail/llvm-dev/2019-June/133484.html A fuzzer is added to test the demangling utility. Patch by Sumedh Arani <sumedh.arani@arm.com> Differential revision: https://reviews.llvm.org/D66024 llvm-svn: 372343
* [MCA] Improved cost computation for loop carried dependencies in the ↵Andrea Di Biagio2019-09-192-9/+39
| | | | | | | | | | | | | | | | bottleneck analysis. This patch introduces a cut-off threshold for dependency edge frequences with the goal of simplifying the critical sequence computation. This patch also removes the cost normalization for loop carried dependencies. We didn't really need to artificially amplify the cost of loop-carried dependencies since it is already computed as the integral over time of the delay (in cycle). In the absence of backend stalls there is no need for computing a critical sequence. With this patch we early exit from the critical sequence computation if no bottleneck was reported during the simulation. llvm-svn: 372337
* Revert [llvm-ar] Include a line number when failing to parse an MRI scriptOwen Reynolds2019-09-191-16/+3
| | | | | | | | Revert r372309 due to buildbot failures Differential Revision: https://reviews.llvm.org/D67449 llvm-svn: 372311
OpenPOWER on IntegriCloud