summaryrefslogtreecommitdiffstats
path: root/llvm/include
Commit message (Collapse)AuthorAgeFilesLines
...
* Make IPDBSession::getGlobalScope a non-const methodAdrian McCarthy2017-06-223-3/+3
| | | | | | | | | | | | There doesn't seem to be a compelling reason why this method should be const other than it was possible with the DIA implementation. The native session is going to act as a symbol factory and cache. This could be acheived with mutable (and the existing const_cast), but it seems cleaner to accept that this method affects the state of the session. This change eliminates an existing const_cast. llvm-svn: 306041
* Silence warnings about hidden virtual methods.Zachary Turner2017-06-222-0/+2
| | | | | | | Patch by Sergey Andreenko. Differential Revision: https://reviews.llvm.org/D34429 llvm-svn: 306038
* Updated llvm-objdump symbolic disassembly with x86_64 Mach-O MH_KEXT_BUNDLEKevin Enderby2017-06-221-0/+6
| | | | | | | | | file types so it symbolically disassembles operands using the external relocation entries. rdar://31521343 llvm-svn: 306037
* [AMDGPU] Add intrinsics for tbuffer load and storeDavid Stuttard2017-06-221-0/+27
| | | | | | | | | | | | | | | Intrinsic already existed for llvm.SI.tbuffer.store Needed tbuffer.load and also re-implementing the intrinsic as llvm.amdgcn.tbuffer.* Added CodeGen tests for the 2 new variants added. Left the original llvm.SI.tbuffer.store implementation to avoid issues with existing code Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, tony-tye, tpr Differential Revision: https://reviews.llvm.org/D30687 llvm-svn: 306031
* [X86] Add support for "probe-stack" attributewhitequark2017-06-221-0/+6
| | | | | | | | | | | This commit adds prologue code emission for stack probe function calls. Reviewed By: majnemer Differential Revision: https://reviews.llvm.org/D34387 llvm-svn: 306010
* [DAG] Add Target Store Merge pass ordering functionNirav Dave2017-06-221-0/+4
| | | | | | | Allow targets to specify if they should merge stores before or after legalization. llvm-svn: 306006
* Revert "[Support] Add RetryAfterSignal helper function" and subsequent fixPavel Labath2017-06-221-13/+0
| | | | | | | | | | | The fix in r306003 uncovered a pretty fundamental problem that libc++ implementation of std::result_of does not handle the prototype of open(2) correctly (presumably because it contains ...). This makes the whole function unusable in its current form, so I am also reverting the original commit (r305892), which introduced the function, at least until I figure out a way to solve the libc++ issue. llvm-svn: 306005
* [Support] Fix return type deduction in RetryAfterSignalPavel Labath2017-06-221-5/+5
| | | | | | | | | | | | | | | | | | The default value of the ResultT template argument (which was there only to avoid spelling out the long std::result_of template multiple times) was being overriden by function call template argument deduction. This manifested itself as a compiler error when calling the function as FILE *X = RetryAfterSignal(nullptr, fopen, ...) because the function would try to assign the result of fopen to nullptr_t, but a more insidious side effect was that RetryAfterSignal(-1, read, ...) would return "int" instead of "ssize_t", losing precision along the way. I fix this by having the function take the argument in a way that prevents argument deduction from kicking in and add a test that makes sure the return type is correct. llvm-svn: 306003
* [Solaris] replace Solaris.h hack with a set of better hacksKamil Rytarowski2017-06-223-18/+15
| | | | | | | | | | | | | | | | | | | Summary: Got rid of unwieldy -include Solaris.h portability solution, replacing it with interposed header and moving endian defines into Host.h. Fixes PR28370. Reviewers: joerg, alekseyshl, mgorny Reviewed By: joerg Subscribers: llvm-commits, mgorny, ro, krytarowski Patch by Fedor Sergeev. Differential Revision: https://reviews.llvm.org/D3413 llvm-svn: 306002
* [Testing/Support] Remove the const_cast in TakeExpectedPavel Labath2017-06-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Summary: The const_cast in the "const" version of TakeExpected was quite dangerous, as the function does indeed modify the apparently const argument. I assume the reason the const overload was added was to make the function bind to xvalues(temporaries). That can be also achieved with rvalue references, so I use that instead. Using the ASSERT macros on const Expected objects will now become illegal, but I believe that is correct, as it is not actually possible to inspect the error stored in an Expected object without modifying it. Reviewers: zturner, chandlerc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D34405 llvm-svn: 306001
* AVX-512: Lowering Masked Gather intrinsic - fixed a bugElena Demikhovsky2017-06-221-1/+1
| | | | | | | | | | | | Masked gather for vector length 2 is lowered incorrectly for element type i32. The type <2 x i32> was automatically extended to <2 x i64> and we generated VPGATHERQQ instead of VPGATHERQD. The type <2 x float> is extended to <4 x float>, so there is no bug for this type, but the sequence may be more optimal. In this patch I'm fixing <2 x i32>bug and optimizing <2 x float> sequence for GATHERs only. The same fix should be done for Scatters as well. Differential revision: https://reviews.llvm.org/D34343 llvm-svn: 305987
* [llvm-readobj] Dump the COFF image load configReid Kleckner2017-06-221-11/+89
| | | | | | | | This includes the safe SEH tables and the control flow guard function table. LLD will emit the guard table soon, and I need a tool that dumps them for testing. llvm-svn: 305979
* [ProfileData, Support] Fix some Clang-tidy modernize-use-using and Include ↵Eugene Zelenko2017-06-2111-250/+277
| | | | | | What You Use warnings; other minor fixes (NFC). llvm-svn: 305969
* Use a MutableArrayRef. NFC.Rafael Espindola2017-06-211-1/+1
| | | | llvm-svn: 305968
* Mark dump() methods as const. NFCSam Clegg2017-06-217-12/+12
| | | | | | | | | Add const qualifier to any dump() method where adding one was trivial. Differential Revision: https://reviews.llvm.org/D34481 llvm-svn: 305963
* [DWARF] Support for DW_FORM_strx3 and complete support for DW_FORM_strx{1,2,4}Wolfgang Pieb2017-06-211-0/+41
| | | | | | | | | | (consumer). Reviewer: aprantl Differential Revision: https://reviews.llvm.org/D34418 llvm-svn: 305944
* Add a "probe-stack" attributewhitequark2017-06-211-0/+1
| | | | | | | | | | | | | This attribute is used to ensure the guard page is triggered on stack overflow. Stack frames larger than the guard page size will generate a call to __probestack to touch each page so the guard page won't be skipped. Reviewed By: majnemer Differential Revision: https://reviews.llvm.org/D34386 llvm-svn: 305939
* Object: Have the irsymtab builder take a string table builder. NFCI.Peter Collingbourne2017-06-211-2/+4
| | | | | | | | | This will be needed in order to share the irsymtab string table with the bitcode string table. Differential Revision: https://reviews.llvm.org/D33971 llvm-svn: 305937
* [PDB] Add symbols to the PDBReid Kleckner2017-06-211-0/+6
| | | | | | | | | | | | | | | | | | | Summary: The main complexity in adding symbol records is that we need to "relocate" all the type indices. Type indices do not have anything like relocations, an opaque data structure describing where to find existing type indices for fixups. The linker just has to "know" where the type references are in the symbol records. I added an overload of `discoverTypeIndices` that works on symbol records, and it seems to be able to link the standard library. Reviewers: zturner, ruiu Subscribers: llvm-commits, hiraditya Differential Revision: https://reviews.llvm.org/D34432 llvm-svn: 305933
* [DAG] Move BaseIndexOffset into separate Libarary. NFC.Nirav Dave2017-06-211-0/+64
| | | | | | | Move BaseIndexOffset analysis out of DAGCombiner for use in other files. llvm-svn: 305921
* Fix build after r305892Pavel Labath2017-06-211-0/+1
| | | | | | Make sure to #include <cerrno> in Support/Errno.h llvm-svn: 305895
* [Support] Add RetryAfterSignal helper functionPavel Labath2017-06-211-0/+13
| | | | | | | | | | | | | | | | | | | | | Summary: This function retries an operation if it was interrupted by a signal (failed with EINTR). It's inspired by the TEMP_FAILURE_RETRY macro in glibc, but I've turned that into a template function. I've also added a fail-value argument, to enable the function to be used with e.g. fopen(3), which is documented to fail for any reason that open(2) can fail (which includes EINTR). The main user of this function will be lldb, but there were also a couple of uses within llvm that I could simplify using this function. Reviewers: zturner, silvas, joerg Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D33895 llvm-svn: 305892
* Add a cantFail overload for Expected-reference (Expected<T&>) types.Lang Hames2017-06-201-0/+21
| | | | llvm-svn: 305863
* [Statepoint] Add helper functions for GCRelocate and GCResultAnna Thomas2017-06-201-0/+3
| | | | | | | These functions isGCRelocate and isGCResult are similar to isStatepoint(const Value*). llvm-svn: 305847
* [GISel]: NFC. Add comment to G_FMA opcode as requested in rL305824Aditya Nandakumar2017-06-201-0/+1
| | | | llvm-svn: 305837
* [GISel]: Add G_FMA opcode for fused multiply addsAditya Nandakumar2017-06-202-0/+11
| | | | | | | | https://reviews.llvm.org/D34372 Reviewed by dsanders llvm-svn: 305824
* [GSoC] Flag value completion for clangYuka Takahashi2017-06-203-0/+18
| | | | | | | | | | | | This is patch for GSoC project, bash-completion for clang. To use this on bash, please run `source clang/utils/bash-autocomplete.sh`. bash-autocomplete.sh is code for bash-completion. In this patch, Options.td was mainly changed in order to add value class in Options.inc. llvm-svn: 305805
* [globalisel][tablegen] Add support for COPY_TO_REGCLASS.Daniel Sanders2017-06-202-1/+25
| | | | | | | | | | | | | | | | | | | | | | Summary: As part of this * Emitted instructions now have named MachineInstr variables associated with them. This isn't particularly important yet but it's a small step towards multiple-insn emission. * constrainSelectedInstRegOperands() is no longer hardcoded. It's now added as the ConstrainOperandsToDefinitionAction() action. COPY_TO_REGCLASS uses an alternate constraint mechanism ConstrainOperandToRegClassAction() which supports arbitrary constraints such as that defined by COPY_TO_REGCLASS. Reviewers: ab, qcolombet, t.p.northover, rovka, kristof.beyls, aditya_nandakumar Reviewed By: ab Subscribers: javed.absar, igorb, llvm-commits Differential Revision: https://reviews.llvm.org/D33590 llvm-svn: 305791
* Fix Wdocumentation warningSimon Pilgrim2017-06-201-2/+2
| | | | llvm-svn: 305790
* [GlobalISel] combine not symmetric merge/unmerge nodes.Igor Breger2017-06-201-1/+1
| | | | | | | | | | | | | | | | Summary: In some cases legalization ends up with not symmetric merge/unmerge nodes. Transform it to merge/unmerge nodes. Reviewers: t.p.northover, qcolombet, zvi Reviewed By: t.p.northover Subscribers: rovka, kristof.beyls, guyblank, llvm-commits Differential Revision: https://reviews.llvm.org/D33626 llvm-svn: 305783
* [WebAssembly] Add support for weak symbols in the binary formatSam Clegg2017-06-204-6/+70
| | | | | | | | | | | This also introduces the updated format for the "linking" section which can represent extra symbol information. See: https://github.com/WebAssembly/tool-conventions/pull/10 Differential Revision: https://reviews.llvm.org/D34019 llvm-svn: 305769
* [ProfileData] PR33517: Check for failure of symtab creationVedant Kumar2017-06-203-9/+14
| | | | | | | | | | | | With PR33517, it became apparent that symbol table creation can fail when presented with malformed inputs. This patch makes that sort of error detectable, so llvm-cov etc. can fail more gracefully. Specifically, we now check that function names within the symbol table aren't empty. Testing: check-{llvm,clang,profile}, some unit test updates. llvm-svn: 305765
* [ExecutionEngine] Fix some Clang-tidy modernize-use-using and Include What ↵Eugene Zelenko2017-06-1921-204/+269
| | | | | | You Use warnings; other minor fixes (NFC). llvm-svn: 305760
* [Target] Fix some Clang-tidy modernize-use-using and Include What You Use ↵Eugene Zelenko2017-06-194-96/+107
| | | | | | warnings; other minor fixes (NFC). llvm-svn: 305757
* [IR] Fix some Clang-tidy modernize-use-using warnings; other minor fixes (NFC).Eugene Zelenko2017-06-196-42/+68
| | | | llvm-svn: 305755
* Change llvm-nm for Mach-O files to use dyld info in some cases when printing ↵Kevin Enderby2017-06-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | symbols. In order to reduce swift binary sizes, Apple is now stripping swift symbols from the nlist symbol table. llvm-nm currently only looks at the nlist symbol table and misses symbols that are present in dyld info. This makes it hard to know the set of symbols for a binary using just llvm-nm. Unless you know to run llvm-objdump -exports-trie that can output the exported symbols in the dyld info from the export trie, which does so but in a different format. Also moving forward the time may come a when a fully linked Mach-O file that uses dyld will no longer have an nlist symbol table to avoid duplicating the symbol information. This change adds three flags to llvm-nm, -add-dyldinfo, -no-dyldinfo, and -dyldinfo-only. The first, -add-dyldinfo, has the same effect as when the new bit in the Mach-O header, MH_NLIST_OUTOFSYNC_WITH_DYLDINFO, appears in a binary. In that it looks through the dyld info from the export trie and adds symbols to be printed that are not already in its internal SymbolList variable. The -no-dyldinfo option turns this behavior off. The -dyldinfo-only option only looks at the dyld information and recreates the symbol table from the dyld info from the export trie and binding information. As if it the Mach-O file had no nlist symbol table. Also fixed a few bugs with Mach-O N_INDR symbols not correctly printing the indirect name, or in the same format as the old nm-classic program. rdar://32021551 llvm-svn: 305733
* Have writeCOFFWriter return Expected<unique_ptr>.Eric Beckmann2017-06-191-3/+3
| | | | | | | | | | | | Summary: Have writeCOFFWriter return Expected<unique_ptr> instead of requiring being passed an uninitialized unique_ptr. Reviewers: zturner, ruiu Subscribers: hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D34307 llvm-svn: 305730
* Improve profile-guided heuristics to use estimated trip count.Taewook Oh2017-06-191-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Existing heuristic uses the ratio between the function entry frequency and the loop invocation frequency to find cold loops. However, even if the loop executes frequently, if it has a small trip count per each invocation, vectorization is not beneficial. On the other hand, even if the loop invocation frequency is much smaller than the function invocation frequency, if the trip count is high it is still beneficial to vectorize the loop. This patch uses estimated trip count computed from the profile metadata as a primary metric to determine coldness of the loop. If the estimated trip count cannot be computed, it falls back to the original heuristics. Reviewers: Ayal, mssimpso, mkuper, danielcdh, wmi, tejohnson Reviewed By: tejohnson Subscribers: tejohnson, mzolotukhin, llvm-commits Differential Revision: https://reviews.llvm.org/D32451 llvm-svn: 305729
* [Dominators] Clean up typedefs in GenericDomTreeConstruction. NFC.Jakub Kuderski2017-06-191-21/+24
| | | | | | | | | | | | | | Summary: This patch cleans up GenericDomTreeConstruction by replacing typedefs with usings and replaces `typename GraphT::NodeRef` with `NodePtr` to make the file more readable. Reviewers: sanjoy, dberlin, chandlerc Reviewed By: dberlin Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D34254 llvm-svn: 305715
* [PDB] Start emitting source file and line informationReid Kleckner2017-06-193-0/+17
| | | | | | | | | | | | | | | | | | | | | | | Summary: This is a first step towards getting line info to show up in VS and windbg. So far, only llvm-pdbutil can parse the PDBs that we produce. cvdump doesn't like something about our file checksum tables. I'll have to dig into that next. This patch adds a new DebugSubsectionRecordBuilder which takes bytes directly from some other producer, such as a linker, and sticks it into the PDB. Line tables only need to be relocated. No data needs to be rewritten. File checksums and string tables, on the other hand, need to be re-done. Reviewers: zturner, ruiu Subscribers: llvm-commits, hiraditya Differential Revision: https://reviews.llvm.org/D34257 llvm-svn: 305713
* [Dominators] Clean up GenericDomTree.h. NFC.Jakub Kuderski2017-06-191-42/+37
| | | | | | | | | | | | | | | | | | | | | Summary: This patch cleans up GenericDomTree.h by: - removing unnecessary <NodeT> in DomTreeNodeBase - removing unnecessary std::move on bools - changing type of DFSNumIn/DFSNumOut from int to unsigned (since the members were used as unsigned anyway) The changes don't affect behavior -- everything works as before. Reviewers: sanjoy, dberlin, chandlerc Reviewed By: dberlin Subscribers: davide, llvm-commits Differential Revision: https://reviews.llvm.org/D34229 llvm-svn: 305710
* [CodeView] Fix dumping of public symbol record flagsReid Kleckner2017-06-193-1/+12
| | | | | | | I noticed nonsensical type information while dumping PDBs produced by MSVC. llvm-svn: 305708
* [Reassociate] Make one of the helper methods static because it doesn't use ↵Craig Topper2017-06-191-2/+0
| | | | | | any class variables. NFC llvm-svn: 305703
* Recommit rL305677: [CodeGen] Add generic MacroFusion passFlorian Hahn2017-06-191-0/+41
| | | | | | | | | | | | | Use llvm::make_unique to avoid ambiguity with MSVC. This patch adds a generic MacroFusion pass, that is used on X86 and AArch64, which both define target-specific shouldScheduleAdjacent functions. This generic pass should make it easier for other targets to implement macro fusion and I intend to add macro fusion for ARM shortly. Differential Revision: https://reviews.llvm.org/D34144 llvm-svn: 305690
* Revert r305677 [CodeGen] Add generic MacroFusion pass.Florian Hahn2017-06-191-41/+0
| | | | | | This causes Windows buildbot failures do an ambiguous call. llvm-svn: 305681
* [CodeGen] Add generic MacroFusion pass.Florian Hahn2017-06-191-0/+41
| | | | | | | | | | | | | | | | | | Summary: This patch adds a generic MacroFusion pass, that is used on X86 and AArch64, which both define target-specific shouldScheduleAdjacent functions. This generic pass should make it easier for other targets to implement macro fusion and I intend to add macro fusion for ARM shortly. Reviewers: craig.topper, evandro, t.p.northover, atrick, MatzeB Reviewed By: MatzeB Subscribers: atrick, aemerson, mgorny, javed.absar, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D34144 llvm-svn: 305677
* Delete TypeDatabase.Zachary Turner2017-06-185-174/+28
| | | | | | | | Merge the functionality into the random access type collection. This class was only being used in 2 places, so getting rid of it simplifies the code. llvm-svn: 305653
* [APFloat] Move the integerPartWidth constant into APFloatBase. Remove ↵Craig Topper2017-06-181-1/+1
| | | | | | integerPart typedef at file scope and just use the one in APFloatBase everywhere. NFC llvm-svn: 305652
* [CMake] Introduce LLVM_TARGET_TRIPLE_ENV as an option to override ↵NAKAMURA Takumi2017-06-171-0/+3
| | | | | | | | | | | | | | | | | | | LLVM_DEFAULT_TARGET_TRIPLE at runtime. No behavior is changed if LLVM_TARGET_TRIPLE_ENV is blank or undefined. If LLVM_TARGET_TRIPLE_ENV is "TEST_TARGET_TRIPLE" and $TEST_TARGET_TRIPLE is not blank, llvm::sys::getDefaultTargetTriple() returns $TEST_TARGET_TRIPLE. Lit resets config.target_triple and config.environment[LLVM_TARGET_TRIPLE_ENV] to change the default target. Without changing LLVM_DEFAULT_TARGET_TRIPLE nor rebuilding, lit can be run; TEST_TARGET_TRIPLE=i686-pc-win32 bin/llvm-lit -sv path/to/test/ TEST_TARGET_TRIPLE=i686-pc-win32 ninja check-clang-tools Differential Revision: https://reviews.llvm.org/D33662 llvm-svn: 305632
* RegScavenging: Add scavengeRegisterBackwards()Matthias Braun2017-06-171-0/+18
| | | | | | | | | | | | | | | | | | | Re-apply r276044/r279124/r305516. Fixed a problem where we would refuse to place spills as the very first instruciton of a basic block and thus artifically increase pressure (test in test/CodeGen/PowerPC/scavenging.mir:spill_at_begin) This is a variant of scavengeRegister() that works for enterBasicBlockEnd()/backward(). The benefit of the backward mode is that it is not affected by incomplete kill flags. This patch also changes PrologEpilogInserter::doScavengeFrameVirtualRegs() to use the register scavenger in backwards mode. Differential Revision: http://reviews.llvm.org/D21885 llvm-svn: 305625
OpenPOWER on IntegriCloud