summaryrefslogtreecommitdiffstats
path: root/llvm/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* [llvm-mca] Check for inconsistencies when constructing instruction descriptors.Andrea Di Biagio2018-10-044-2/+43
| | | | | | | This should help with catching inconsistent definitions of instructions with zero opcodes, which also declare to consume scheduler/pipeline resources. llvm-svn: 343766
* [llvm-nm] Print an explicit "no symbols" message when an object file has no ↵Jordan Rupprecht2018-10-031-11/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | symbols Summary: GNU nm (and other nm implementations, such as "go tool nm") prints an explicit "no symbols" message when an object file has no symbols. Currently llvm-nm just doesn't print anything. Adding an explicit "no symbols" message will allow llvm-nm to be used in place of nm: some scripts and build processes use `nm <file> | grep "no symbols"` as a test to see if a file has no symbols. It will also be more familiar to anyone used to nm. That said, the format implemented here is slightly different, in that it doesn't print the tool name in the message (which IMHO is not useful to include). Demo: ``` $ for nm in nm bin/llvm-nm ; do echo "nm implementation: $nm"; $nm /tmp/foo{1,2}.o; echo; done nm implementation: nm /tmp/foo1.o: nm: /tmp/foo1.o: no symbols /tmp/foo2.o: 0000000000000000 T foo2 nm implementation: bin/llvm-nm /tmp/foo1.o: no symbols /tmp/foo2.o: 0000000000000000 T foo2 ``` Reviewers: MaskRay Reviewed By: MaskRay Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D52810 llvm-svn: 343742
* [WebAssembly] Refactor WasmSignature and use it for MCSymbolWasmDerek Schuff2018-10-031-3/+7
| | | | | | | | | | | | MCContext does not destroy MCSymbols on shutdown. So, rather than putting SmallVectors (which may heap-allocate) inside MCSymbolWasm, use unowned pointer to a WasmSignature instead. The signatures are now owned by the AsmPrinter. Also uses WasmSignature instead of param and result vectors in TargetStreamer, and leaves some TODOs for further simplification. Differential Revision: https://reviews.llvm.org/D52580 llvm-svn: 343733
* Emit template type and value parameter DIEs for template variables.Matthew Voss2018-10-031-12/+10
| | | | | | | | | | | | | | | | | | | Summary: Ensure the TemplateParam attribute of the DIGlobalVariable node is translated into the proper DIEs. Resolves https://bugs.llvm.org/show_bug.cgi?id=22119 Reviewers: dblaikie, probinson, aprantl, JDevlieghere, clayborg, whitequark, deadalnix Reviewed By: dblaikie Subscribers: llvm-commits Tags: #debug-info Differential Revision: https://reviews.llvm.org/D52057 llvm-svn: 343706
* [llvm-mca] Add support for move elimination in class RegisterFile.Andrea Di Biagio2018-10-037-10/+164
| | | | | | | | | | | | | | | | | | | This patch teaches class RegisterFile how to analyze register writes from instructions that are move elimination candidates. In particular, it teaches it how to check if a move can be effectively eliminated by the underlying PRF, and (if necessary) how to perform move elimination. The long term goal is to allow processor models to describe instructions that are valid move elimination candidates. The idea is to let register file definitions in tablegen declare if/when moves can be eliminated. This patch is a non functional change. The logic that performs move elimination is currently disabled. A future patch will add support for move elimination in the processor models, and enable this new code path. llvm-svn: 343691
* [llvm-exegesis] Avoid yaml parser from calling sscanf for obvious ↵Simon Pilgrim2018-10-031-2/+4
| | | | | | | | | | non-matches (PR39102) deserializeMCOperand - ensure that we at least match the first character of the sscanf pattern before calling This reduces llvm-exegesis uops analysis of the instructions supported from btver2 from 5m13s to 2m1s on debug builds. llvm-svn: 343690
* [ThinLTO]Expose cache entry expiration time option in llvm-lto and fix a testJames Henderson2018-10-031-0/+5
| | | | | | | | | | | | | | | | | | | | | | Two cases in a ThinLTO test were passing for the wrong reasons, since rL340374. The tests were supposed to be testing that files were being pruned due to the cache size, but they were in fact being pruned because they were older than the default expiration period of 1 week. This change fixes the tests by explicitly setting the expiration time to the maximum value. This required the option to be exposed in llvm-lto. By assigning all files in the cache a similar time, it is possible to see that the newest files are still being kept, and that we aren't passing for the wrong reason again. In the event that the entry expiration were to expire for them, then the test would start failing, because these files would be removed too. Reviewed by: rnk, inglorion Differential Revision: https://reviews.llvm.org/D51992 llvm-svn: 343687
* [llvm-exegesis][NFC] Revert rL343682 "Fix unused variable warning".Clement Courbet2018-10-031-1/+1
| | | | | | That was not the proper fix: the variable is used in debug mode. llvm-svn: 343685
* [llvm-exegesis] Fix rL343680 in release mode.Clement Courbet2018-10-032-2/+3
| | | | llvm-svn: 343684
* [llvm-exegesis][NFC] Fix unused variable warning.Clement Courbet2018-10-031-1/+0
| | | | llvm-svn: 343682
* [llvm-exegesis] Resolve variant classes in analysis.Clement Courbet2018-10-032-62/+101
| | | | | | | | | | | | Summary: See PR38884. Reviewers: gchatelet Subscribers: tschuett, RKSimon, llvm-commits Differential Revision: https://reviews.llvm.org/D52825 llvm-svn: 343680
* [llvm-mca] Remove unecessary forward decls. NFC.Matt Davis2018-10-024-5/+0
| | | | | | This patch also removes an unecessary include. llvm-svn: 343621
* [llvm-mca] Constify the 'notify' routines. NFC.Matt Davis2018-10-026-16/+18
| | | | | | Also fixed up some whitespace formatting in DispatchStage.cpp. llvm-svn: 343615
* [MCA] Remove SM.hasNext() call in FetchStage::execute.Owen Rodley2018-10-021-1/+1
| | | | | | | | | | | | | | | | Summary: This is redundant, as FetchStage::getNextInstruction already checks this and returns llvm::ErrorSuccess() as appropriate. NFC. Reviewers: andreadb Subscribers: gbedwell, llvm-commits Differential Revision: https://reviews.llvm.org/D52642 llvm-svn: 343555
* [llvm-mca] Rename the 'Subtract' method to 'subtract'Matt Davis2018-10-012-2/+2
| | | | llvm-svn: 343549
* [PDB] Add support for dumping Typedef records.Zachary Turner2018-10-012-1/+9
| | | | | | | | | | These work a little differently because they are actually in the globals stream and are treated as symbol records, even though DIA presents them as types. So this also adds the necessary infrastructure to cache records that live somewhere other than the TPI stream as well. llvm-svn: 343507
* [PDB] Add support for parsing VFTable Shape records.Zachary Turner2018-10-015-7/+33
| | | | | | This allows them to be returned from the native API. llvm-svn: 343506
* [llvm-exegesis][NFC] Move random functions from CodeTemplate to ↵Guillaume Chatelet2018-10-014-109/+104
| | | | | | | | | | | | | | SnippetGenerator. Summary: Just moving methods around. Reviewers: courbet Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D52720 llvm-svn: 343461
* [Support] Listing a directory containing dangling symlinks is not an error.Sam McCall2018-10-011-3/+4
| | | | | | | | | | | | | | Summary: Reporting this as an error required stat()ing every file, as well as seeming semantically questionable. Reviewers: vsk, bkramer Subscribers: mgrang, kristina, llvm-commits, liaoyuke Differential Revision: https://reviews.llvm.org/D52648 llvm-svn: 343460
* [llvm-exegesis][NFC] Make randomizeUnsetVariables a free function.Guillaume Chatelet2018-10-013-17/+19
| | | | | | | | | | | | Summary: This is prelimineary to moving random functions to SnippetGenerator. Reviewers: courbet Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D52718 llvm-svn: 343456
* [llvm-objcopy] Adding support for decompressing zlib compressed dwarf sections.Puyan Lotfi2018-10-014-14/+148
| | | | | | | | | | | | | | | Summary: I had added support for compressing dwarf sections in a prior commit, this one adds support for decompressing. Usage is: llvm-objcopy --decompress-debug-sections input.o output.o Reviewers: jakehehrlich, jhenderson, alexshap Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D51841 llvm-svn: 343451
* [ORC] Add convenience methods for creating DynamicLibraryFallbackGenerators forLang Hames2018-10-011-12/+2
| | | | | | | | libraries on disk, and for the current process. Avoids more boilerplate during JIT construction. llvm-svn: 343430
* [ORC] Add a method to JITTargetMachineBuilder to get the default data layoutLang Hames2018-10-011-6/+1
| | | | | | | | | | for the target machine. This simplifies usage during setup of concurrent JIT stacks where the client needs a DataLayout, but not a TargetMachine (TargetMachines are created on the fly by the compile threads later). llvm-svn: 343429
* Use the container form llvm::sort(C, ...)Fangrui Song2018-09-302-8/+7
| | | | | | | There are a few leftovers in rL343163 which span two lines. This commit changes these llvm::sort(C.begin(), C.end, ...) to llvm::sort(C, ...) llvm-svn: 343426
* [ORC] Extract and tidy up JITTargetMachineBuilder, add unit test.Lang Hames2018-09-301-2/+6
| | | | | | | | | | | (1) Adds comments for the API. (2) Removes the setArch method: This is redundant: the setArchStr method on the triple should be used instead. (3) Turns EmulatedTLS on by default. This matches EngineBuilder's behavior. llvm-svn: 343423
* [PDB] Add native support for dumping array types.Zachary Turner2018-09-304-2/+24
| | | | llvm-svn: 343412
* Fix some tests on Windows.Zachary Turner2018-09-301-3/+3
| | | | | | | I don't actually have a Windows machine at the present moment, so hopefully this fixes it. llvm-svn: 343397
* [ORC] Add partitioning support to CompileOnDemandLayer2.Lang Hames2018-09-291-13/+31
| | | | | | | | | | | | | CompileOnDemandLayer2 now supports user-supplied partition functions (the original CompileOnDemandLayer already supported these). Partition functions are called with the list of requested global values (i.e. global values that currently have queries waiting on them) and have an opportunity to select extra global values to materialize at the same time. Also adds testing infrastructure for the new feature to lli. llvm-svn: 343396
* [PDB] Better native API support for pointers.Zachary Turner2018-09-294-53/+110
| | | | | | | | | | | | We didn't properly detect when a pointer was a member pointer, and when that was the case we were not properly returning class parent info. This caused member pointers to render incorrectly in pretty mode. However, we didn't even have pretty tests for pointers in native mode, so those are also added now to ensure this. llvm-svn: 343393
* [ORC] Add more utilities to aid debugging output.Lang Hames2018-09-281-6/+11
| | | | | | | | | | | | | (1) A const accessor for the LLVMContext held by a ThreadSafeContext. (2) A const accessor for the ThreadSafeModules held by an IRMaterializationUnit. (3) A const MaterializationResponsibility reference to IRTransformLayer2's transform function. This makes IRTransformLayer2 useful for JIT debugging (since it can inspect JIT state through the responsibility argument) as well as program transformations. llvm-svn: 343365
* Revert r343317Luke Cheeseman2018-09-283-56/+40
| | | | | | - asan buildbots are breaking and I need to investigate the issue llvm-svn: 343341
* [LLVM-C] Add more debug information accessors to GlobalObject and InstructionRobert Widmann2018-09-281-0/+32
| | | | | | | | | | | | | | Summary: Adds missing debug information accessors to GlobalObject. This puts the finishing touches on cloning debug info in the echo tests. Reviewers: whitequark, deadalnix Reviewed By: whitequark Subscribers: aprantl, JDevlieghere, llvm-commits, harlanhaskins Differential Revision: https://reviews.llvm.org/D51522 llvm-svn: 343330
* Reapply changes reverted by r343235Luke Cheeseman2018-09-283-40/+56
| | | | | | | | - Add fix so that all code paths that create DWARFContext with an ObjectFile initialise the target architecture in the context - Add an assert that the Arch is known in the Dwarf CallFrameString method llvm-svn: 343317
* [llvm-mca] Remove redundant namespace prefixes. NFCAndrea Di Biagio2018-09-288-37/+36
| | | | | | We are already "using" namespace llvm in all the files modified by this change. llvm-svn: 343312
* [llvm-mca] Teach how to track zero registers in class RegisterFile.Andrea Di Biagio2018-09-283-26/+78
| | | | | | | | | This change is in preparation for a future work on improving support for optimizable register moves. We already know if a write is from a zero-idiom, so we can propagate that bit of information to the PRF. We use an APInt mask to identify registers that are set to zero. llvm-svn: 343307
* Test commit. NFC.Owen Rodley2018-09-281-1/+1
| | | | llvm-svn: 343296
* [ORC] Coalesce all of ORC's symbol renaming / linkage-promotion utilities intoLang Hames2018-09-271-1/+0
| | | | | | | | | | | | one SymbolLinkagePromoter utility. SymbolLinkagePromoter renames anonymous and private symbols, and bumps all linkages to at least global/hidden-visibility. Modules whose symbols have been promoted by this utility can be decomposed into sub-modules without introducing link errors. This is used by the CompileOnDemandLayer to extract single-function modules for lazy compilation. llvm-svn: 343257
* [lli] Fix ArgV setup bug when running in -jit-kind=orc-lazy mode.Lang Hames2018-09-271-1/+4
| | | | | | ArgV[ArgC] should be null. llvm-svn: 343255
* Revert r343192 as an ubsan build is currently failingLuke Cheeseman2018-09-273-57/+39
| | | | llvm-svn: 343235
* [llvm-exegesis] Fix PR39096.Clement Courbet2018-09-271-16/+37
| | | | | | | | | | | | Summary: The key is now the resource name, not the resource id. Reviewers: gchatelet Subscribers: tschuett, RKSimon, llvm-commits Differential Revision: https://reviews.llvm.org/D52607 llvm-svn: 343208
* Reapply changes reverted in r343114, lldb patch to follow shortlyLuke Cheeseman2018-09-273-39/+57
| | | | llvm-svn: 343192
* [llvm-exegesis][NFC] moving code around.Guillaume Chatelet2018-09-2713-255/+260
| | | | | | | | | | | | Summary: Renaming InstructionBuilder into InstructionTemplate and moving code generation tools from MCInstrDescView to CodeTemplate. Reviewers: courbet Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D52592 llvm-svn: 343188
* [llvm-exegesis] Remove unused headers and fix naming issuesFangrui Song2018-09-271-14/+12
| | | | | | | | | | | | Reviewers: courbet Reviewed By: courbet Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D52565 llvm-svn: 343177
* llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...)Fangrui Song2018-09-2717-103/+93
| | | | | | | | | | | | Summary: The convenience wrapper in STLExtras is available since rL342102. Reviewers: dblaikie, javed.absar, JDevlieghere, andreadb Subscribers: MatzeB, sanjoy, arsenm, dschuff, mehdi_amini, sdardis, nemanjai, jvesely, nhaehnle, sbc100, jgravelle-google, eraman, aheejin, kbarton, JDevlieghere, javed.absar, gbedwell, jrtc27, mgrang, atanasyan, steven_wu, george.burgess.iv, dexonsmith, kristina, jsji, llvm-commits Differential Revision: https://reviews.llvm.org/D52573 llvm-svn: 343163
* [libLTO] Expose LLVMCreateDisasmCPUFeatures from libLTOSteven Wu2018-09-261-0/+1
| | | | | | | | The export file of libLTO should has all the interfaces declared in llvm-c/lto.h and llvm-c/Disassembler.h but LLVMCreateDisasmCPUFeatures is missing from the list. Export the C API to be consistant. llvm-svn: 343124
* Reapply r343058 with a fix for -DLLVM_ENABLE_THREADS=OFF.Lang Hames2018-09-261-6/+48
| | | | | | | | | Modifies lit to add a 'thread_support' feature that can be used in lit test REQUIRES clauses. The thread_support flag is set if -DLLVM_ENABLE_THREADS=ON and unset if -DLLVM_ENABLE_THREADS=OFF. The lit flag is used to disable the multiple-compile-threads-basic.ll testcase when threading is disabled. llvm-svn: 343122
* Revert r343112 as CallFrameString API change has broken lldb buildsLuke Cheeseman2018-09-263-57/+39
| | | | llvm-svn: 343114
* [AArch64] - Return address signing dwarf supportLuke Cheeseman2018-09-263-39/+57
| | | | | | - Reapply r343089 with a fix for DebugInfo/Sparc/gnu-window-save.ll llvm-svn: 343112
* [llvm-exegesis] Get rid of debug_string.Clement Courbet2018-09-263-9/+7
| | | | | | | | | | | | | | | | Summary: THis is a backwards-compatible change (existing files will work as expected). See PR39082. Reviewers: gchatelet Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D52546 llvm-svn: 343108
* Revert r343089 "[AArch64] - Return address signing dwarf support"Hans Wennborg2018-09-263-57/+39
| | | | | | | | | | | | | | | | | | | This caused the DebugInfo/Sparc/gnu-window-save.ll test to fail. > Functions that have signed return addresses need additional dwarf support: > - After signing the LR, and before authenticating it, the LR register is in a > state the is unusable by a debugger or unwinder > - To account for this a new directive, .cfi_negate_ra_state, is added > - This directive says the signed state of the LR register has now changed, > i.e. unsigned -> signed or signed -> unsigned > - This directive has the same CFA code as the SPARC directive GNU_window_save > (0x2d), adding a macro to account for multiply defined codes > - This patch matches the gcc implementation of this support: > https://patchwork.ozlabs.org/patch/800271/ > > Differential Revision: https://reviews.llvm.org/D50136 llvm-svn: 343103
OpenPOWER on IntegriCloud