summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [X86] Update masked load/store test namesSimon Pilgrim2018-11-141-88/+88
| | | | llvm-svn: 346887
* AMDGPU: Additional pattern for i16 median3 matchingAakanksha Patil2018-11-143-4/+60
| | | | | | | | min(max(a, b), max(min(a, b), c)) Differential Revision: https://reviews.llvm.org/D54494 llvm-svn: 346886
* Mark @llvm.trap coldVedant Kumar2018-11-147-5/+24
| | | | | | | | | | | | | | | | A call to @llvm.trap can be expected to be cold (i.e. unlikely to be reached in a normal program execution). Outlining paths which unconditionally trap is an important memory saving. As the hot/cold splitting pass (imho) should not treat all noreturn calls as cold, explicitly mark @llvm.trap cold so that it can be outlined. Split out of https://reviews.llvm.org/D54244. Differential Revision: https://reviews.llvm.org/D54329 llvm-svn: 346885
* [Support] Teach YAMLIO about polymorphic typesScott Linder2018-11-146-28/+503
| | | | | | | | | | | | | | | | | | | | | Add support for "polymorphic" types to YAMLIO. PolymorphicTraits can dynamically switch between other traits (Scalar, Map, or Sequence). When inputting, the PolymorphicTraits type is told which type to become, and when outputting the PolymorphicTraits type is asked which type it currently is. Also add support for TaggedScalarTraits to allow dynamically differentiating between multiple scalar types using YAML tags. Serialize empty maps as "{}" and empty sequences as "[]", so that types are preserved when round-tripping PolymorphicTraits. This change has equivalent semantics, but may break e.g. tests which compare output verbatim. Differential Revision: https://reviews.llvm.org/D48144 llvm-svn: 346884
* [ThinLTO] Update handling of vararg functions to match inlinerTeresa Johnson2018-11-144-15/+50
| | | | | | | | | | | | | | | | | Summary: Previously we marked all vararg functions as non-inlinable in the function summary, which prevented their importing. However, the corresponding inliner restriction was loosened in r321940/r342675 to only apply to functions calling va_start. Adjust the summary flag computation to match. Reviewers: davidxl Subscribers: mehdi_amini, inglorion, eraman, steven_wu, dexonsmith, llvm-commits Differential Revision: https://reviews.llvm.org/D54270 llvm-svn: 346883
* [AST] Fix typo in MicrosoftMangleShoaib Meenai2018-11-141-29/+29
| | | | | | | | Correct the spelling from Artifical to Artificial. Differential Revision: https://reviews.llvm.org/D54536 llvm-svn: 346882
* [InstSimplify] add tests for funnel shift with select; NFCSanjay Patel2018-11-141-0/+65
| | | | llvm-svn: 346881
* [WebAssembly] Add support for dylink section in object formatSam Clegg2018-11-148-4/+103
| | | | | | | | See https://github.com/WebAssembly/tool-conventions/blob/master/DynamicLinking.md. Differential Revision: https://reviews.llvm.org/D54490 llvm-svn: 346880
* [X86] Allow pmulh to be formed from narrow vXi16 vectors under ↵Craig Topper2018-11-142-22/+6
| | | | | | | | | | -x86-experimental-vector-widening-legalization Narrower vectors will be widened to 128 bits without changing the element size. And generic type legalization can already handle widening mulhu/mulhs. Differential Revision: https://reviews.llvm.org/D54513 llvm-svn: 346879
* [libcxx] [test] Fix running tests on macOS with python3Alexander Richardson2018-11-141-7/+8
| | | | | | | | | | | | | | | | Summary: The result of subprocess.check_output() is bytes in python3 which we need to convert to str(). Simplify this by using the executeCommand() helper. Reviewers: ldionne, EricWF Reviewed By: ldionne Subscribers: christof, libcxx-commits Differential Revision: https://reviews.llvm.org/D54522 llvm-svn: 346878
* [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
OpenPOWER on IntegriCloud