summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [PPC64] Long branch thunks.Sean Fertile2018-11-1413-62/+532
| | | | | | | | | | | | | | | | | | On PowerPC64, when a function call offset is too large to encode in a call instruction the address is stored in a table in the data segment. A thunk is used to load the branch target address from the table relative to the TOC-pointer and indirectly branch to the callee. When linking position-dependent code the addresses are stored directly in the table, for position-independent code the table is allocated and filled in at load time by the dynamic linker. For position-independent code the branch targets could have gone in the .got.plt but using the .branch_lt section for both position dependent and position independent binaries keeps it consitent and helps keep this PPC64 specific logic seperated from the target-independent code handling the .got.plt. Differential Revision: https://reviews.llvm.org/D53408 llvm-svn: 346877
* [NFC] Change address __tls_getaddr is defined at so it does not need a thunk.Sean Fertile2018-11-141-2/+2
| | | | | | | Minor update to a ppc64 tls test so that it won't need to use a thunk once the range-extending thunk patch is landed. llvm-svn: 346876
* [InstCombine] Remove a couple of asserts based on incorrect assumptionsMandeep Singh Grang2018-11-142-11/+22
| | | | | | | | | | | | | | | | Summary: These asserts are based on the assumption that the order of true/false operands in a select and those in the compare would always be the same. This fixes PR39595. Reviewers: craig.topper, spatel, dmgreen Reviewed By: craig.topper Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D54359 llvm-svn: 346874
* Fix some compilation failures introduced in recent patches.Zachary Turner2018-11-142-4/+5
| | | | | | | | | | This fixes two compilation failures: 1) Designated initializers are C++20. We can't use them in LLVM. 2) thread_result_t is not a pointer type on all platforms, so returning nullptr is an error. llvm-svn: 346873
* [clangd] Delete unused includes.Kadir Cetinkaya2018-11-141-2/+0
| | | | llvm-svn: 346872
* [InstCombine] fix formatting for matchBSwap(); NFCSanjay Patel2018-11-142-7/+9
| | | | | | | We should have a similar function for matching rotate and/or funnel shift, so tidy up the related existing call. llvm-svn: 346871
* [VPlan, SLP] Use SmallPtrSet for Candidates.Florian Hahn2018-11-142-27/+26
| | | | | | This slightly improves the candidate handling in getBest(). llvm-svn: 346870
* [SimplifyCFG] Regenerate preserve-branchweights.ll test. NFCJohn Brawn2018-11-141-114/+262
| | | | | | | Regenerate this test using update_test_checks.py in preparation for an upcomming commit, to make it not depend on the names of instructions. llvm-svn: 346869
* [TTI] getOperandInfo - a broadcast shuffle means the result is OK_UniformValue Simon Pilgrim2018-11-143-340/+275
| | | | llvm-svn: 346868
* Move DataExtractorTest to unittests/UtilityPavel Labath2018-11-143-1/+1
| | | | | | | | The DataExtractor class itself was moved to Utility some time ago, but it seems this was not reflected in the location of the test code. Fix that. llvm-svn: 346867
* Reverted D52835 to fix review commentsDavid Bolvansky2018-11-144-95/+9
| | | | llvm-svn: 346866
* [Diagnostics] Check integer to floating point number implicit conversionsDavid Bolvansky2018-11-144-9/+95
| | | | | | | | | | | | | | | | | Summary: GCC already catches these situations so we should handle it too. GCC warns in C++ mode only (does anybody know why?). I think it is useful in C mode too. Reviewers: rsmith, erichkeane, aaron.ballman, efriedma, xbolva00 Reviewed By: xbolva00 Subscribers: efriedma, craig.topper, scanon, cfe-commits Differential Revision: https://reviews.llvm.org/D52835 llvm-svn: 346865
* [AST][NFC] Order the bit-field classes of Stmt like in StmtNodes.tdBruno Ricci2018-11-141-63/+80
| | | | | | | | | | | | Reorder the bit-field classes and the members of the anonymous union so that they both match the order in StmtNodes.td. There is already a fair amount of them, and this is not going to improve. Therefore lets try to keep some order here. Strictly NFC. llvm-svn: 346864
* [AArch64] Fix resolution of R_PLT_PAGE RelExprPeter Smith2018-11-142-7/+55
| | | | | | | | | | | | | The R_AARCH64_ADR_PREL_PG_HI21 relocation type is given the R_PAGE_PC RelExpr. This can be transformed to R_PLT_PAGE_PC via toPlt(). Unfortunately the resolution is identical to R_PAGE_PC so instead of getting the address of the PLT entry we get the address of the symbol which may not be correct in the case of static ifuncs. The fix is to handle the cases separately and use getPltVA() + A with R_PLT_PAGE_PC. Differential Revision: https://reviews.llvm.org/D54474 llvm-svn: 346863
* Fix for bugzilla https://bugs.llvm.org/show_bug.cgi?id=39137.Andrey Churbanov2018-11-141-0/+2
| | | | | | | | Do not write to internal structure if it keeps same value. Differential Revision: https://reviews.llvm.org/D54305 llvm-svn: 346862
* Document how to comment an actual parameter.Paul Robinson2018-11-141-0/+15
| | | | | | Differential Revision: https://reviews.llvm.org/D54446 llvm-svn: 346861
* [VPlan] Remove LLVM_DEBUG from VPlanSlp::dumpBundle.Florian Hahn2018-11-141-4/+4
| | | | | | The caller should take care of only calling it with debug enabled. llvm-svn: 346860
* [TTI] Pull out repeated 'ConcreteTTI' static_casts. NFCI.Simon Pilgrim2018-11-141-12/+7
| | | | llvm-svn: 346859
* [VPlan] Update ifdef.Florian Hahn2018-11-141-2/+2
| | | | llvm-svn: 346858
* [VPlan, SLP] Add simple SLP analysis on top of VPlan.Florian Hahn2018-11-147-1/+1523
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds an initial implementation of the look-ahead SLP tree construction described in 'Look-Ahead SLP: Auto-vectorization in the Presence of Commutative Operations, CGO 2018 by Vasileios Porpodas, Rodrigo C. O. Rocha, Luís F. W. Góes'. It returns an SLP tree represented as VPInstructions, with combined instructions represented as a single, wider VPInstruction. This initial version does not support instructions with multiple different users (either inside or outside the SLP tree) or non-instruction operands; it won't generate any shuffles or insertelement instructions. It also just adds the analysis that builds an SLP tree rooted in a set of stores. It does not include any cost modeling or memory legality checks. The plan is to integrate it with VPlan based cost modeling, once available and to only apply it to operations that can be widened. A follow-up patch will add a support for replacing instructions in a VPlan with their SLP counter parts. Reviewers: Ayal, mssimpso, rengolin, mkuper, hfinkel, hsaito, dcaballe, vporpo, RKSimon, ABataev Reviewed By: rengolin Differential Revision: https://reviews.llvm.org/D4949 llvm-svn: 346857
* Adding myself as the code owner for clang-query as discussed in ↵Aaron Ballman2018-11-141-0/+4
| | | | | | https://reviews.llvm.org/D54453. llvm-svn: 346856
* [LLDB] - Recommit r346848 "[LLDB] - Support the single file split DWARF.".George Rimar2018-11-1411-17/+255
| | | | | | | | | | | | | | | | | | | | | | | | | Test cases were updated to not use the local compilation dir which is different between development pc and build bots. Original commit message: [LLDB] - Support the single file split DWARF. DWARF5 spec describes a single file split dwarf case (when .dwo sections are in the .o files). Problem is that LLDB does not work correctly in that case. The issue is that, for example, both .debug_info and .debug_info.dwo has the same type: eSectionTypeDWARFDebugInfo. And when code searches section by type it might find the regular debug section and not the .dwo one. The patch fixes that. With it, LLDB is able to work with output compiled with -gsplit-dwarf=single flag correctly. Differential revision: https://reviews.llvm.org/D52403 llvm-svn: 346855
* [CostModel] Add generic expansion funnel shift cost supportSimon Pilgrim2018-11-144-1287/+2981
| | | | | | | | Add support for the expansion of funnelshift/rotates to getIntrinsicInstrCost. This also required us to move the X86 fshl/fshr costs to the same place as the rotates to avoid expansion and get correct scalarization vs vectorization costs. llvm-svn: 346854
* Revert r346848 "[LLDB] - Support the single file split DWARF."George Rimar2018-11-1411-249/+17
| | | | | | | It broke BB: http://green.lab.llvm.org/green/job/lldb-cmake/12522/testReport/junit/LLDB/Breakpoint/single_file_split_dwarf_test/ llvm-svn: 346853
* [clangd] Replace StringRef in SymbolLocation with a char pointer.Haojian Wu2018-11-1414-47/+96
| | | | | | | | | | | | | | | | | Summary: This would save us 8 bytes per ref, and buy us ~40MB in total for llvm index (from ~300MB to ~260 MB). The char pointer must be null-terminated, and llvm::StringSaver guarantees it. Reviewers: sammccall Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D53427 llvm-svn: 346852
* [llvm-objdump] Improve ELF file type checking statements (D54509)Xing GUO2018-11-141-12/+6
| | | | llvm-svn: 346851
* [X86][AVX512] Remove constant pool shuffle decoding from SelectionDAGSimon Pilgrim2018-11-143-18/+18
| | | | | | | | | | This patch removes the last use of the constant pool shuffle decode helper and consistently uses the 'getTargetShuffleMaskIndices' versions instead. The constant pool versions are now purely used for assembly comments. The avx512vbmi intrinsic upgrades had to be altered as they were being decoded as broadcasts, similar to what I fixed in rL346032. I don't think the change is critical - although its annoying that we lose the {k}{z} instruction test coverage as they are tricky to generate.... Differential Revision: https://reviews.llvm.org/D54083 llvm-svn: 346850
* Fix a crash when parsing incorrect DWARFPavel Labath2018-11-142-3/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: While parsing a childless compile unit DIE we could crash if the DIE was followed by any extra data (such as a superfluous end-of-children marker). This happened because the break-on-depth=0 check was performed only when parsing the null DIE, which was not correct because with a childless root DIE, we could reach the end of the unit without ever encountering the null DIE. If the compile unit contribution ended directly after the CU DIE, everything would be fine as we would terminate parsing due to reaching EOF. However, if the contribution contained extra data (perhaps a superfluous end-of-children marker), we would crash because we would treat that data as the begging of another compile unit. This fixes the crash by moving the depth=0 check to a more generic place, and also adds a regression test. Reviewers: clayborg, jankratochvil, JDevlieghere Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D54417 llvm-svn: 346849
* [LLDB] - Support the single file split DWARF.George Rimar2018-11-1411-17/+249
| | | | | | | | | | | | | | | | | | DWARF5 spec describes a single file split dwarf case (when .dwo sections are in the .o files). Problem is that LLDB does not work correctly in that case. The issue is that, for example, both .debug_info and .debug_info.dwo has the same type: eSectionTypeDWARFDebugInfo. And when code searches section by type it might find the regular debug section and not the .dwo one. The patch fixes that. With it, LLDB is able to work with output compiled with -gsplit-dwarf=single flag correctly. Differential revision: https://reviews.llvm.org/D52296 llvm-svn: 346848
* [AST] Allow limiting the scope of common AST traversals (getParents, RAV).Sam McCall2018-11-147-191/+289
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The goal is to allow analyses such as clang-tidy checks to run on a subset of the AST, e.g. "only on main-file decls" for interactive tools. Today, these become "problematically global" by running RecursiveASTVisitors rooted at the TUDecl, or by navigating up via ASTContext::getParent(). The scope is restricted using a set of top-level-decls that RecursiveASTVisitors should be rooted at. This also applies to the visitor that populates the parent map, and so the top-level-decls are considered to have no parents. This patch makes the traversal scope a mutable property of ASTContext. The more obvious way to do this is to pass the top-level decls to relevant functions directly, but this has some problems: - it's error-prone: accidentally mixing restricted and unrestricted scopes is a performance trap. Interleaving multiple analyses is common (many clang-tidy checks run matchers or RAVs from matcher callbacks) - it doesn't map well to the actual use cases, where we really do want *all* traversals to be restricted. - it involves a lot of plumbing in parts of the code that don't care about traversals. This approach was tried out in D54259 and D54261, I wanted to like it but it feels pretty awful in practice. Caveats: to get scope-limiting behavior of RecursiveASTVisitors, callers have to call the new TraverseAST(Ctx) function instead of TraverseDecl(TU). I think this is an improvement to the API regardless. Reviewers: klimek, ioeric Subscribers: mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D54309 llvm-svn: 346847
* [COFF] Fix a longstanding typo in a variable name. NFC.Martin Storsjo2018-11-141-5/+5
| | | | llvm-svn: 346846
* [WebAssembly] Make sure event-section XFAILs for build optionsHeejin Ahn2018-11-141-2/+2
| | | | | | | | | | rL346840 temporarily marked event-section.ll as XFAIL because it was failing for builds with LLVM_ENABLE_EXPENSIVE_CHECKS turned on, but to make sure it XFAILs even without LLVM_ENABLE_EXPENSIVE_CHECKS on we need this `-verify-machineinstrs` flag, which was missing in the previous commit. llvm-svn: 346845
* Print newline after banner for ModulePassSven van Haastregt2018-11-142-1/+4
| | | | | | | | | | Before this commit, `llc -print-after-all` would print something like: *** IR Dump After Pre-ISel Intrinsic Lowering ***; ModuleID = ... Emit a newline such that ModuleID appears on a line by its own. llvm-svn: 346844
* Recommit r346483: [CallSiteSplitting] Only record conditions up to the ↵Florian Hahn2018-11-144-25/+64
| | | | | | | | | IDom(call site). The underlying problem causing the expensive-check failure was fixed in rL346769. llvm-svn: 346843
* Fix r346747 and r346796Diana Picus2018-11-142-0/+2
| | | | | | | Require x86 for the tests in order to fix non-x86 bots. This seems to be the case for all other tests in that directory. llvm-svn: 346842
* Suppress a "-Wliteral-conversion" compiler warning.Haojian Wu2018-11-141-1/+1
| | | | | error: implicit conversion from 'double' to 'uint64_t' (aka 'unsigned long') changes value from -0 to 0 [-Werror,-Wliteral-conversion] llvm-svn: 346841
* [WebAssembly] Temporarily disable event-section.llHeejin Ahn2018-11-141-0/+1
| | | | | | | | This test is failing in builds with LLVM_ENABLE_EXPENSIVE_CHECKS after rL346825 not because of the patch but due to a pre-existing codegen problem. Marking this as XFAIL temporarily until the bug is fixed. llvm-svn: 346840
* Fix the "make_unique is ambiguous" compiler error.Haojian Wu2018-11-142-4/+4
| | | | llvm-svn: 346839
* [OpenCL] Fix invalid address space generation for clk_event_tAlexey Sotkin2018-11-142-2/+11
| | | | | | | | | | | | | | | | | | Summary: Addrspace(32) was generated when putting 0 in clk_event_t * event_ret parameter for enqueue_kernel function. Patch by Viktoria Maksimova Reviewers: Anastasia, yaxunl, AlexeySotkin Reviewed By: Anastasia, AlexeySotkin Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D53809 llvm-svn: 346838
* [Clang] - Add '-gsplit-dwarf[=split,=single]' version for '-gsplit-dwarf' ↵George Rimar2018-11-1415-26/+130
| | | | | | | | | | | | | | | | | | | | option. The DWARF5 specification says(Appendix F.1): "The sections that do not require relocation, however, can be written to the relocatable object (.o) file but ignored by the linker or they can be written to a separate DWARF object (.dwo) file that need not be accessed by the linker." The first part describes a single file split DWARF feature and there is no way to trigger this behavior atm. Fortunately, no many changes are required to keep *.dwo sections in a .o, the patch does that. Differential revision: https://reviews.llvm.org/D52296 llvm-svn: 346837
* [clangd] Improve code completion for ObjC methodsSam McCall2018-11-143-11/+164
| | | | | | | | | | | | | | | | | | | | | Summary: Previously code completion did not work well for Objective-C methods which contained multiple arguments as clangd did not expect to see multiple typed-text chunks when handling code completion. Note that even with this change, we do not consider selector fragments from previous arguments to be part of the signature (although we could in the future). Reviewers: sammccall Reviewed By: sammccall Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, jfb, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D53934 llvm-svn: 346836
* [clang-tidy] Avoid C arrays checkRoman Lebedev2018-11-1413-0/+297
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: [[ https://bugs.llvm.org/show_bug.cgi?id=39224 | PR39224 ]] As discussed, we can't always do the transform automatically due to that array-to-pointer decay of C array. In order to detect whether we can do said transform, we'd need to be able to see all usages of said array, which is, i would say, rather impossible if e.g. it is in the header. Thus right now no fixit exists. Exceptions: `extern "C"` code. References: * [[ https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es27-use-stdarray-or-stack_array-for-arrays-on-the-stack | CPPCG ES.27: Use std::array or stack_array for arrays on the stack ]] * [[ https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#slcon1-prefer-using-stl-array-or-vector-instead-of-a-c-array | CPPCG SL.con.1: Prefer using STL array or vector instead of a C array ]] * HICPP `4.1.1 Ensure that a function argument does not undergo an array-to-pointer conversion` * MISRA `5-2-12 An identifier with array type passed as a function argument shall not decay to a pointer` Reviewers: aaron.ballman, JonasToth, alexfh, hokein, xazax.hun Reviewed By: JonasToth Subscribers: Eugene.Zelenko, mgorny, rnkovacs, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D53771 llvm-svn: 346835
* [X86] Add -x86-experimental-vector-widening command lines to pmulh.llCraig Topper2018-11-141-43/+83
| | | | | | I've only added sse2 and sse4.1 variants as I'm only interested in the two v4i16 tests and I don't expect that to different with AVX other than a v prefix. llvm-svn: 346834
* Correctly instantiate `iterator_adaptor_base` when defining `pointer_iterator`David Blaikie2018-11-142-2/+33
| | | | | | | | | | | | | | | | The definition of `pointer_iterator` omits what should be a `iterator_traits::<>::iterator_category` parameter from `iterator_adaptor_base`. As a result, iterators based on `pointer_iterator` always have defaulted value types and the wrong iterator category. The definition of `pointee_iterator` just a few lines above does this correctly. This resolves [[ https://bugs.llvm.org/show_bug.cgi?id=39617 | bug 39617 ]]. Patch by Dylan MacKenzie! Reviewers: dblaikie Differential Revision: https://reviews.llvm.org/D54377 llvm-svn: 346833
* [HIP] Fix device only compilationYaxun Liu2018-11-142-10/+20
| | | | | | | | Fix a bug causing host code being compiled when --cude-device-only is set. Differential Revision: https://reviews.llvm.org/D54496 llvm-svn: 346828
* [CMake] Include clang-apply-replacements in Fuchsia toolchainPetr Hosek2018-11-141-0/+1
| | | | | | | | This is needed for run-clang-tidy.py. Differential Revision: https://reviews.llvm.org/D54505 llvm-svn: 346827
* [libcxx] [test] Strip trailing whitespace. NFC.Stephan T. Lavavej2018-11-14164-539/+538
| | | | llvm-svn: 346826
* [WebAssembly] Add support for the event sectionHeejin Ahn2018-11-1434-116/+708
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This adds support for the 'event section' specified in the exception handling proposal. (This was named 'exception section' first, but later renamed to 'event section' to take possibilities of other kinds of events into consideration. But currently we only store exception info in this section.) The event section is added between the global section and the export section. This is for ease of validation per request of the V8 team. This patch: - Creates the event symbol type, which is a weak symbol - Makes 'throw' instruction take the event symbol '__cpp_exception' - Adds relocation support for events - Adds WasmObjectWriter / WasmObjectFile (Reader) support - Adds obj2yaml / yaml2obj support - Adds '.eventtype' printing support Reviewers: dschuff, sbc100, aardappel Subscribers: jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D54096 llvm-svn: 346825
* [PowerPC] Enhance the selection(ISD::VSELECT) of vector typeZi Xuan Wu2018-11-145-20/+133
| | | | | | | | | | To make ISD::VSELECT available(legal) so long as there are altivec instruction, otherwise it's default behavior is expanding, which is legalized at type-legalization phase. Use xxsel to match vselect if vsx is open, or use vsel. Differential Revision: https://reviews.llvm.org/D49531 llvm-svn: 346824
* Revert r346810 "Preserve loop metadata when splitting exit blocks"Reid Kleckner2018-11-142-80/+0
| | | | | | | It broke the Windows self-host: http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/1457 llvm-svn: 346823
OpenPOWER on IntegriCloud