collapse
80%
WDescription%
Build stability: 1 out of the last 5 builds failed.80
Build History
x
 Identified problems
 Identified problems
 Identified problems
 
 
 
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 Identified problems
 
 

Changes

#18501 (Jul 23, 2019 2:30:43 PM)

  1. [Remarks] Add unit tests for YAML serialization

    Add tests for both the string table and non string table case. — thegameg / ViewSVN
  2. clang-format: Fix namespace end comments for namespaces with attributes and macros.

    Fixes PR39247.

    While here, also make C++20 `namespace A::inline B::inline C` nested
    inline namespaced definitions work.

    Before:
        #define DEPRECATE_WOOF [[deprecated("meow")]]

        namespace DEPRECATE_WOOF woof {
        void f() {}
        } // namespace DEPRECATE_WOOFwoof

        namespace [[deprecated("meow")]] woof {
          void f() {}
        } // namespace [[deprecated("meow")]]woof

        namespace woof::inline bark {
          void f() {}
        } // namespace woof::inlinebark

    Now:
        #define DEPRECATE_WOOF [[deprecated("meow")]]

        namespace DEPRECATE_WOOF woof {
        void f() {}
        } // namespace woof

        namespace [[deprecated("meow")]] woof {
        void f() {}
        } // namespace woof

        namespace woof::inline bark {
        void f() {}
        } // namespace woof::inline bark

    (In addition to the fixed namespace end comments, also note the correct
    indent of the namespace contents.)

    Differential Revision: https://reviews.llvm.org/D65125 — nico / ViewSVN
  3. [IndVars] Fix a subtle bug in optimizeLoopExits

    The original code failed to account for the fact that one exit can have a pointer exit count without all of them having pointer exit counts.  This could cause two separate bugs:
    1) We might exit the loop early, and leave optimizations undone.  This is what triggered the assertion failure in the reported test case.
    2) We might optimize one exit, then exit without indicating a change.  This could result in an analysis invalidaton bug if no other transform is done by the rest of indvars.

    Note that the pointer exit counts are a really fragile concept.  They show up only when we have a pointer IV w/o a datalayout to provide their size.  It's really questionable to me whether the complexity implied is worth it. — reames / ViewSVN
  4. Improve clang-format-diff help output

    The description in clang-format-diff.py is more useful than the one
    in `clang-format-diff -h`, so use the same description in both places.

    Differential Revision: https://reviews.llvm.org/D64998 — nico / ViewSVN
  5. [IR][Verifier] Allow IntToPtrInst to be !dereferenceable

    Summary:
    Allow IntToPtrInst to carry !dereferenceable metadata tag.
    This is valid since !dereferenceable can be only be applied to
    pointer type values.

    Change-Id: If8a6e3c616f073d51eaff52ab74535c29ed497b4

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64954 — rtayl / ViewSVN
  6. [RISCV][NFC] Correct RUN in rvi-pseudos-invalid.s

    This test should test both riscv32 and riscv64. — lenary / ViewSVN
  7. [clang][NFCI] Fix random typos — Jan Korous / ViewSVN
  8. [compiler-rt][builtins] Provide __clear_cache for SPARC

    While working on https://reviews.llvm.org/D40900, two tests were failing since __clear_cache
    aborted.  While libgcc's __clear_cache is just empty, this only happens because
    gcc (in gcc/config/sparc/sparc.c (sparc32_initialize_trampoline, sparc64_initialize_trampoline))
    emits flush insns directly.

    The following patch mimics that.

    Tested on sparcv9-sun-solaris2.11.

    Differential Revision: https://reviews.llvm.org/D64496 — ro / ViewSVN
  9. [CMake] Add -z defs on Solaris

    Like other ELF targets, shared objects should be linked with -z defs on Solaris.

    Tested on x86_64-pc-solaris2.11 and sparcv9-sun-solaris2.11.

    Differential Revision: https://reviews.llvm.org/D64484 — ro / ViewSVN
  10. [clang, test] Fix Clang :: Headers/max_align.c on 64-bit SPARC

    Clang :: Headers/max_align.c currently FAILs on 64-bit SPARC:

      error: 'error' diagnostics seen but not expected:
        File /vol/llvm/src/clang/dist/test/Headers/max_align.c Line 12: static_assert failed due to requirement '8 == _Alignof(max_align_t)' ""
      1 error generated.

    This happens because SuitableAlign isn't defined for SPARCv9 unlike SPARCv8
    (which uses the default of 64 bits).  gcc's sparc/sparc.h has

      #define BIGGEST_ALIGNMENT (TARGET_ARCH64 ? 128 : 64)

    This patch sets SuitableAlign to match and updates the corresponding testcase.

    Tested on sparcv9-sun-solaris2.11.

    Differential Revision: https://reviews.llvm.org/D64487 — ro / ViewSVN
  11. [GlobalISel][AArch64] Teach GISel to handle shifts in load addressing modes

    When we select the XRO variants of loads, we can pull in very specific shifts
    (of the size of an element). E.g.

    ```
    ldr x1, [x2, x3, lsl #3]
    ```

    This teaches GISel to handle these when they're coming from shifts
    specifically.

    This adds a new addressing mode function, `selectAddrModeShiftedExtendXReg`
    which recognizes this pattern.

    This also packs this up with `selectAddrModeRegisterOffset` into
    `selectAddrModeXRO`. This is intended to be equivalent to `selectAddrModeXRO`
    in AArch64ISelDAGtoDAG.

    Also update load-addressing-modes to show that all of the cases here work.

    Differential Revision: https://reviews.llvm.org/D65119 — paquette / ViewSVN
  12. [ASTImporter] Fix inequivalence of ClassTemplateInstantiations

    Summary:
    We falsely state inequivalence if the template parameter is a
    qualified/nonquialified template in the first/second instantiation.
    Also, different kinds of TemplateName should be equal if the template
    decl (if available) is equal (even if the name kind is different).

    Reviewers: a_sidorin, a.sidorin

    Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64241 — martong / ViewSVN

#18500 (Jul 23, 2019 10:21:18 AM)

  1. [TargetLowering] SimplifyMultipleUseDemandedBits - add VECTOR_SHUFFLE support.

    If all the demanded elts are from one operand and are inline, then we can use the operand directly.

    The changes are mainly from SSE41 targets which has blendvpd but not cmpgtq, allowing the v2i64 comparison to be simplified as we only need the signbit from alternate v4i32 elements. — rksimon / ViewSVN
  2. Revert "[Object/ELF.h] - Improve testing of the fields in ELFFile<ELFT>::sections()."

    This reverts commit r366796 because it was causing ubsan buildbot
    failures. — vlad.tsyrklevich / ViewSVN
  3. [llvm-ar] Fix support for archives with members larger than 4GB

    llvm-ar outputs a strange error message when handling archives with
    members larger than 4GB due to not checking file size when passing the
    value as an unsigned 32 bit integer. This overflow issue caused
    malformed archives to be created.:

    https://bugs.llvm.org/show_bug.cgi?id=38058

    This change allows for members above 4GB and will error in a case that
    is over the formats size limit, a 10 digit decimal integer.

    Differential Revision: https://reviews.llvm.org/D65093 — gbreynoo / ViewSVN
  4. [clangd] Log version, cwd, args, and transport on startup. NFC

    Reviewers: hokein

    Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D65146 — sammccall / ViewSVN
  5. [ARM][LowOverheadLoops] Fix branch target codegen
       
    While lowering test.set.loop.iterations, it wasn't checked how the
    brcond was using the result and so the wls could branch to the loop
    preheader instead of not entering it. The same was true for
    loop.decrement.reg.
       
    So brcond and br_cc and now lowered manually when using the hwloop
    intrinsics. During this we now check whether the result has been
    negated and whether we're using SETEQ or SETNE and 0 or 1. We can
    then figure out which basic block the WLS and LE should be targeting.

    Differential Revision: https://reviews.llvm.org/D64616 — sam_parker / ViewSVN
  6. Fix MSVC warning about extending a uint32_t shift result to uint64_t. NFCI. — rksimon / ViewSVN
  7. [SLPVectorizer] Revert local change that got accidently got committed in rL366799

    This wasn't part of D63281 — rksimon / ViewSVN
  8. Revert [RISCV] Re-enable rv32i-aliases-invalid.s test

    This reverts r366797 (git commit 53f9fec8e8b58f5a904bbfb4a1d648cde65aa860) — lenary / ViewSVN
  9. [NFC][ASAN] Add brackets around not command

    Under certain execution conditions, the `not` command binds to the command the
    output is piped to rather than the command piping the output. In this case, that
    flips the return code of the FileCheck invocation, causing a failure when
    FileCheck succeeds. — lei / ViewSVN
  10. [NFC][InstCombine] Fixup commutative/negative tests with icmp preds in @llvm.umul.with.overflow tests — lebedevri / ViewSVN
  11. [InstSimplify][NFC] Tests for skipping 'div-by-0' checks before inverted @llvm.umul.with.overflow

    It would be already handled by the non-inverted case if we were hoisting
    the `not` in InstCombine, but we don't (granted, we don't sink it
    in this case either), so this is a separate case. — lebedevri / ViewSVN
  12. [NFC][PhaseOredering][SimplifyCFG] Add more runlines to umul.with.overflow tests

    This way it will be more obvious that the problem is both
    in cost threshold and in hardcoded benefit check,
    plus will show how the instsimplify cleans this all in the end. — lebedevri / ViewSVN
  13. [TargetLowering] Add SimplifyMultipleUseDemandedBits

    This patch introduces the DAG version of SimplifyMultipleUseDemandedBits, which attempts to peek through ops (mainly and/or/xor so far) that don't contribute to the demandedbits/elts of a node - which means we can do this even in cases where we have multiple uses of an op, which normally requires us to demanded all bits/elts. The intention is to remove a similar instruction - SelectionDAG::GetDemandedBits - once SimplifyMultipleUseDemandedBits has matured.

    The InstCombine version of SimplifyMultipleUseDemandedBits can constant fold which I haven't added here yet, and so far I've only wired this up to some basic binops (and/or/xor/add/sub/mul) to demonstrate its use.

    We do see a couple of regressions that need to be addressed:

        AMDGPU unsigned dot product codegen retains an AND mask (for ZERO_EXTEND) that it previously removed (but otherwise the dotproduct codegen is a lot better).

        X86/AVX2 has poor handling of vector ANY_EXTEND/ANY_EXTEND_VECTOR_INREG - it prematurely gets converted to ZERO_EXTEND_VECTOR_INREG.

    The code owners have confirmed its ok for these cases to fixed up in future patches.

    Differential Revision: https://reviews.llvm.org/D63281 — rksimon / ViewSVN
  14. [RISCV] Re-enable rv32i-aliases-invalid.s test

    We were getting test failures on some builders, which pointed to @LINE
    being an undefined variable. I think that these failures should have
    been fixed by https://reviews.llvm.org/rL366434, so I'm re-enabling the
    test. — lenary / ViewSVN
  15. [Object/ELF.h] - Improve testing of the fields in ELFFile<ELFT>::sections().

    This eliminates a one error untested and
    also introduces a error for one more possible case
    which lead to crash previously.

    Differential revision: https://reviews.llvm.org/D64987 — grimar / ViewSVN

#18499 (Jul 23, 2019 7:26:41 AM)

  1. [yaml2obj] - Add a support for defining null sections in YAMLs.

    ELF spec shows (Figure 4-10: Section Header Table Entry:Index 0,
    http://www.sco.com/developers/gabi/latest/ch4.sheader.html)
    that section header at index 0 (null section) can have sh_size and
    sh_link fields set to non-zero values.

    It says (https://docs.oracle.com/cd/E19683-01/817-3677/6mj8mbtc9/index.html):

    "If the number of sections is greater than or equal to SHN_LORESERVE (0xff00),
    this member has the value zero and the actual number of section header table
    entries is contained in the sh_size field of the section header at index 0.
    Otherwise, the sh_size member of the initial entry contains 0."

    and:

    "If the section name string table section index is greater than or equal to SHN_LORESERVE
    (0xff00), this member has the value SHN_XINDEX (0xffff) and the actual index of the section
    name string table section is contained in the sh_link field of the section header at index 0.
    Otherwise, the sh_link member of the initial entry contains 0."

    At this moment it is not possible to create custom section headers at index 0 using yaml2obj.

    This patch implements this.

    Differential revision: https://reviews.llvm.org/D64913 — grimar / ViewSVN
  2. [SLPVectorizer] Remove null-pointer test. NFCI.

    cast<CallInst> shouldn't return null and we dereference the pointer in a lot of other places, causing both MSVC + cppcheck to warn about dereferenced null pointers — rksimon / ViewSVN
  3. PlistDiagnostics Fix for compile warning (NFC). — balazske / ViewSVN
  4. [ARM] Rename NEONModImm to VMOVModImm. NFC

    Rename NEONModImm to VMOVModImm as it is used in both NEON and MVE. — dmgreen / ViewSVN

#18498 (Jul 23, 2019 5:19:18 AM)

  1. [Attributor][NFC] Re-run clang-format on the Attributor.cpp — uenoku / ViewSVN
  2. [Attributor] Deduce "dereferenceable" attribute

    Summary:
    Deduce dereferenceable attribute in Attributor.

    These will be added in a later patch.
    * dereferenceable(_or_null)_globally (D61652)
    * Deduction based on load instruction (similar to D64258)

    Reviewers: jdoerfert, sstefan1

    Reviewed By: jdoerfert

    Subscribers: hiraditya, jfb, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64876 — uenoku / ViewSVN
  3. [llvm-objcopy] Allow strip symtab in executables and DSOs

    Re-commit of the patch after addressing -Wl,--emit-relocs case.
    Differential revision: https://reviews.llvm.org/D61672 — evgeny777 / ViewSVN
  4. Fix gold-plugin Windows build

    r365588 missed one instance of integer file descriptor use in
    gold-plugin.cpp. — kongyi / ViewSVN
  5. [yaml2elf] - Treat the SHN_UNDEF section as kind of regular section.

    We have a logic that adds a few sections implicitly.
    Though the SHT_NULL section with section number 0
    is an exception.

    In D64913 I want to teach yaml2obj to redefine the null section.
    And in this patch I add it to the sections list,
    to make it kind of a regular section.

    Differential revision: https://reviews.llvm.org/D65087 — grimar / ViewSVN
  6. [CrossTU] Added CTU argument to diagnostic consumer create fn.

    Summary:
    The PListDiagnosticConsumer needs a new CTU parameter that is passed
    through the create functions.

    Reviewers: NoQ, Szelethus, xazax.hun, martong

    Reviewed By: Szelethus

    Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64635 — balazske / ViewSVN
  7. [AMDGPU][NFC] Simplify test file for amdgcn intrinsics

    Summary: Remove unchecked attribute in the call site and use FileCheck String Substitution for `convergent` check.

    Reviewers: nhaehnle

    Reviewed By: nhaehnle

    Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64901 — uenoku / ViewSVN
  8. [DAGCombiner] Make ShrinkLoadReplaceStoreWithStore return an SDValue instead of an SDNode*. NFCI

    The function was calling getNode() on an SDValue to return and the
    caller turned the result back into a SDValue. So just return the
    original SDValue to avoid this. — ctopper / ViewSVN
  9. [DAGCombiner] Use SDNode::isOperandOf to simplify some code. NFCI — ctopper / ViewSVN
  10. [LLVM-C] Improve Bindings to The Internalize Pass

    Summary: Adds a binding to the internalize pass that allows the caller to pass a function pointer that acts as the visibility-preservation predicate.  Previously, one could only pass an unsigned value (not LLVMBool?) that directed the pass to consider "main" or not.

    Reviewers: whitequark, deadalnix, harlanhaskins

    Reviewed By: whitequark, harlanhaskins

    Subscribers: kren1, hiraditya, llvm-commits, harlanhaskins

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D62456 — codafi / ViewSVN
  11. Implement most of P1612R1: Relocate endian.  Moves the std::endian functionality from 'type-traits' to 'bit'. No other change. The reason that this is 'partial' is that P1621 also recommends a feature-test macro, but I don't have the value for that one yet. In a month or so, I'll add that — marshall / ViewSVN

#18496 (Jul 22, 2019 10:29:50 PM)

  1. [PowerPC] Replace float load/store pair with integer load/store pair when it's only used in load/store

    Replace float load/store pair with integer load/store pair when it's only used in load/store,
    because float load/store instructions cost more cycles then integer load/store.

    A typical scenario is when there is a call with more than 13 float arguments passing, we need pass them by stack.
    So we need a load/store pair to do such memory operation if the variable is global variable.

    Differential Revision: https://reviews.llvm.org/D64195 — wuzish / ViewSVN
  2. Inline function call into assert to fix unused variable warning. — rtrieu / ViewSVN
  3. Move variable out from debug only section.

    MFI is no longer just needed for an assert.  Move it out of the debug only
    section to allow non-assert builds to be able to find it. — rtrieu / ViewSVN

#18491 (Jul 22, 2019 6:32:48 PM)

  1. [llvm-lipo] Implement -info

    Prints architecture type of all input files.

    Patch by Anusha Basana <anusha.basana@gmail.com>

    Differential Revision: https://reviews.llvm.org/D64668 — smeenai / ViewSVN
  2. Fixing build error from commit 95cbc3d

    [Attributor] Liveness analysis.

    Liveness analysis abstract attribute used to indicate which BasicBlocks are dead and can therefore be ignored.
    Right now we are only looking at noreturn calls.

    Reviewers: jdoerfert, uenoku

    Subscribers: hiraditya, llvm-commits

    Differential Revision: https://reviews.llvm.org/D64162 — sstefan / ViewSVN
  3. [Statepoints] Fix a bug in statepoint lowering for functions w/no-realign-stack

    We were silently using the ABI alignment for all of the stores generated for deopt and gc values.  We'd gotten the alignment of the stack slot itself properly reduced (via MachineFrameInfo's clamping), but having the MMO on the store incorrect was enough for us to generate an aligned store to a unaligned location.

    The simplest fix would have been to just pass the alignment to the helper function, but once we do that, the helper function doesn't really help.  So, inline it and directly call the MMO version of DAG.getStore with a properly constructed MMO.

    Note that there's a separate performance possibility here.  Even if we *can* realign stacks, we probably don't *want to* if all of the stores are in slowpaths.  But that's a later patch, if at all.  :) — reames / ViewSVN
  4. Fix pointer width in test from r366754. — pcc / ViewSVN
  5. gn build: Wrap two comments to 80 columns — nico / ViewSVN
  6. [DWARF] Add more error handling to debug line parser.

    This patch exnteds the error handling in the debug line parser to get
    rid of the existing MD5 assertion. I want to reuse the debug line parser
    from LLVM in LLDB where we cannot crash on invalid input.

    Differential revision: https://reviews.llvm.org/D64544 — Jonas Devlieghere / ViewSVN
  7. [NFC][clang] Refactor getCompilationPhases()+Types.def step 1.

    Moves list of phases into Types.def table: Currently Types.def contains a
    table of strings that are used to assemble a list of compilation phases to be
    setup in the clang driver's jobs pipeline. This change makes it so that the table
    itself contains the list of phases. A subsequent patch will remove the strings.

    Differential Revision: https://reviews.llvm.org/D64098 — zer0 / ViewSVN
  8. [Statepoints] Add a test which shows a miscompile with no-realign-stacks — reames / ViewSVN
  9. Revert "Fixing build error from commit 9285295."

    This reverts commit 95cbc3da8871f43c1ce2b2926afaedcd826202b1. — sstefan / ViewSVN
  10. llvm-objcopy/test: add REQUIRES: shell for use of umask

    (follow-up to r365162) — dblaikie / ViewSVN
  11. Analysis: Don't look through aliases when simplifying GEPs.

    It is not safe in general to replace an alias in a GEP with its aliasee
    if the alias can be replaced with another definition (i.e. via strong/weak
    resolution (linkonce_odr) or via symbol interposition (default visibility
    in ELF)) while the aliasee cannot. An example of how this can go wrong is
    in the included test case.

    I was concerned that this might be a load-bearing misoptimization (it's
    possible for us to use aliases to share vtables between base and derived
    classes, and on Windows, vtable symbols will always be aliases in RTTI
    mode, so this change could theoretically inhibit trivial devirtualization
    in some cases), so I built Chromium for Linux and Windows with and without
    this change. The file sizes of the resulting binaries were identical, so it
    doesn't look like this is going to be a problem.

    Differential Revision: https://reviews.llvm.org/D65118 — pcc / ViewSVN
  12. Fixing build error from commit 9285295.

    [Attributor] Liveness analysis.

    Liveness analysis abstract attribute used to indicate which BasicBlocks are dead and can therefore be ignored.
    Right now we are only looking at noreturn calls.

    Reviewers: jdoerfert, uenoku

    Subscribers: hiraditya, llvm-commits

    Differential revision: https://reviews.llvm.org/D64162 — sstefan / ViewSVN
  13. [NFC][PatternMatch] Refactor code into a proper "matcher for any integral constant"

    Having it as a proper matcher is better for reusability elsewhere
    (in a follow-up patch.) — lebedevri / ViewSVN
  14. [InstSimplify][NFC] Tests for skipping 'div-by-0' checks before @llvm.umul.with.overflow

    These may remain after @llvm.umul.with.overflow was canonicalized
    from the code that was originally doing the check via division. — lebedevri / ViewSVN
  15. [SimplifyCFG][NFC] Test that we fail to flatten CFG in JPEG "sign" value extend pattern

    This comes up in JPEG decoding, see e.g.
    Figure F.12 – Extending the sign bit of a decoded value in V
    of ITU T.81 (JPEG specification). — lebedevri / ViewSVN
  16. [SimplifyCFG][NFC] Test that we fail to flatten CFG after forming @llvm.umul.with.overflow

    Even if we formed @llvm.umul.with.overflow, we are still stuck
    with that guard against div-by-zero, which is no longer needed,
    because we didn't flatten the CFG. — lebedevri / ViewSVN
  17. [InstCombine][NFC] Tests for canonicalization of unsigned multiply overflow check — lebedevri / ViewSVN
  18. [NFC][PhaseOrdering] Add tests showcasing the problems of unsigned multiply overflow check

    While we can form the @llvm.mul.with.overflow easily,
    we are still left with that check that was guarding against div-by-0.
    And in the second case we won't even flatten the CFG. — lebedevri / ViewSVN
  19. [IndVarSimplify][NFC] Autogenerate check lines in loop_evaluate_1.ll

    Being affected by upcoming patch. — lebedevri / ViewSVN
  20. [Driver] Set the default win32-macho debug format to DWARF

    rdar://53267670

    Differential Revision: https://reviews.llvm.org/D65116 — Vedant Kumar / ViewSVN

#18490 (Jul 22, 2019 5:36:16 PM)

  1. AMDGPU: Don't use SDNodeXForm for DS offset output

    The xform has no real valuewhen it's using out of a complex pattern
    output. The complex pattern was already creating TargetConstants with
    i16, so this was just unnecessary machinery.

    This allows global isel to import the simple cases once the complex
    pattern is implemented. — arsenm / ViewSVN
  2. [TSan] Enable fiber tests on iOS simulator

    These tests *do not* work on device, but they *do* work in the
    simulator.

    rdar://53403778 — yln / ViewSVN
  3. Temporarily Revert "[Attributor] Liveness analysis." as it's breaking the build.

    This reverts commit 9285295f75a231dc446fa7cbc10a0a391b3434a5. — echristo / ViewSVN
  4. [Attributor] Liveness analysis.

    Liveness analysis abstract attribute used to indicate which BasicBlocks are dead and can therefore be ignored.
    Right now we are only looking at noreturn calls.

    Reviewers: jdoerfert, uenoku

    Subscribers: hiraditya, llvm-commits

    Differential revision: https://reviews.llvm.org/D64162 — sstefan / ViewSVN
  5. [NFC][libc++] Add missing EXPLICIT to pair and tuple synopsis

    The constructors for std::pair and std::tuple have been made conditionally
    explicit, however the synopsis in the headers do not reflect that. — Louis Dionne / ViewSVN
  6. [runtimes] Don't depend on libpthread on Android

    r362048 added support for ELF dependent libraries, but broke Android
    build since Android does not have libpthread. Remove the dependency on
    the Android build.

    Differential Revision: https://reviews.llvm.org/D65098 — kongyi / ViewSVN
  7. [X86] When using AND+PACKUS in lowerV16I8Shuffle, generate the build vector directly in v16i8 with the correct 0x00 or 0xFF elements rather than using another VT and bitcasting it.

    The build_vector will become a constant pool load. By using the
    desired type initially, it ensures we don't generate a bitcast
    of the constant pool load which will need to be folded with
    the load.

    While experimenting with another patch, I noticed that when the
    load type and the constant pool type don't match, then
    SimplifyDemandedBits can't handle it. While we should probably
    fix that, this was a simple way to fix the issue I saw. — ctopper / ViewSVN
  8. [NFC][PowerPC]Change ADDIStocHA to ADDIStocHA8 to follow 64-bit naming convention

    Summary:

    Since we are planning to add ADDIStocHA for 32bit in later patch, we decided
    to change 64bit one first to follow naming convention with 8 behind opcode.

    Patch by: Xiangling_L

    Differential Revision: https://reviews.llvm.org/D64814 — jasonliu / ViewSVN
  9. [libc++] Set __file_ to 0 in basic_filebuf::close() even if fclose fails

    This issue was detected by ASan in one of our tests. This test manually
    invokes basic_filebuf::cloe(). fclose(__h.release() returned a non-zero
    exit status, so __file_ wasn't set to 0. Later when basic_filebuf
    destructor ran, we would enter the if (__file_) block again leading to
    heap-use-after-free error.

    The POSIX specification for fclose says that independently of the return
    value, fclose closes the underlying file descriptor and any further
    access (including another call to fclose()) to the stream results in
    undefined behavior. This is exactly what happened in our test case.

    To avoid this issue, we have to always set __file_ to 0 independently of
    the fclose return value.

    Differential Revision: https://reviews.llvm.org/D64979 — phosek / ViewSVN
  10. [Attributor] NoAlias on return values.

    Porting function return value attribute noalias to attributor.
    This will be followed with a patch for callsite and function argumets.

    Reviewers: jdoerfert

    Subscribers: lebedev.ri, hiraditya, llvm-commits

    Differential Revision: https://reviews.llvm.org/D63067 — sstefan / ViewSVN
  11. Stubs out TLOF for AIX and add support for common vars in assembly output.

    Stubs out a TargetLoweringObjectFileXCOFF class, implementing only
    SelectSectionForGlobal for common symbols. Also adds an override of
    EmitGlobalVariable in PPCAIXAsmPrinter which adds a number of defensive errors
    and adds support for emitting common globals. — sfertile / ViewSVN
  12. [SafeStack] Insert the deref after the offset

    While debugging code that uses SafeStack, we've noticed that LLVM
    produces an invalid DWARF. Concretely, in the following example:

      int main(int argc, char* argv[]) {
        std::string value = "";
        printf("%s\n", value.c_str());
        return 0;
      }

    DWARF would describe the value variable as being located at:

      DW_OP_breg14 R14+0, DW_OP_deref, DW_OP_constu 0x20, DW_OP_minus

    The assembly to get this variable is:

      leaq    -32(%r14), %rbx

    The order of operations in the DWARF symbols is incorrect in this case.
    Specifically, the deref is incorrect; this appears to be incorrectly
    re-inserted in repalceOneDbgValueForAlloca.

    With this change which inserts the deref after the offset instead of
    before it, LLVM produces correct DWARF:

      DW_OP_breg14 R14-32

    Differential Revision: https://reviews.llvm.org/D64971 — phosek / ViewSVN
  13. WholeProgramDevirt: Teach the pass to respect the global's alignment.

    The bytes inserted before an overaligned global need to be padded according
    to the alignment set on the original global in order for the initializer
    to meet the global's alignment requirements. The previous implementation
    that padded to the pointer width happened to be correct for vtables on most
    platforms but may do the wrong thing if the vtable has a larger alignment.

    This issue is visible with a prototype implementation of HWASAN for globals,
    which will overalign all globals including vtables to 16 bytes.

    There is also no padding requirement for the bytes inserted after the global
    because they are never read from nor are they significant for alignment
    purposes, so stop inserting padding there.

    Differential Revision: https://reviews.llvm.org/D65031 — pcc / ViewSVN
  14. [PowerPC] Fix comment on MO_PLT Target Operand Flag. [NFC]

    Patch by Xiangling Liao. — sfertile / ViewSVN
  15. [Object][XCOFF] Remove extra includes from XCOFF related files. [NFC]

    Differential Revision: https://reviews.llvm.org/D60885 — sfertile / ViewSVN
  16. LowerTypeTests: Teach the pass to respect global alignments.

    We were previously ignoring alignment entirely when combining globals
    together in this pass. There are two main things that we need to do here:
    add additional padding before each global to meet the alignment requirements,
    and set the combined global's alignment to the maximum of all of the original
    globals' alignments.

    Since we now need to calculate layout as we go anyway, use the calculated
    layout to produce GlobalLayout instead of using StructLayout.

    Differential Revision: https://reviews.llvm.org/D65033 — pcc / ViewSVN
  17. Changes to emit CodeView debug info nested type records properly using MCStreamer directives — nilanjana_basu / ViewSVN
  18. Adds support for formatting NS_CLOSED_ENUM and CF_CLOSED_ENUM alongside NS_ENUM and CF_ENUM.

    Summary:
    Addresses the formatting of NS_CLOSED_ENUM and CF_CLOSED_ENUM, introduced in Swift 5.

    Before:

    ```
    typedef NS_CLOSED_ENUM(NSInteger, Foo){FooValueOne = 1, FooValueTwo,
                                           FooValueThree};
    ```

    After:

    ```
    typedef NS_CLOSED_ENUM(NSInteger, Foo) {
      FooValueOne = 1,
      FooValueTwo,
      FooValueThree
    };
    ```

    Contributed by heijink.

    Reviewers: benhamilton, krasimir

    Reviewed By: benhamilton

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D65012 — benhamilton / ViewSVN
  19. [AMDGPU] Test update. NFC. — rampitec / ViewSVN
  20. [SLPVectorizer] Fix some MSVC/cppcheck uninitialized variable warnings. NFCI. — rksimon / ViewSVN
  21. Revert "Reland [ELF] Loose a condition for relocation with a symbol"

    This reverts commit r366686 as it appears to be causing buildbot
    failures on sanitizer-x86_64-linux-android and sanitizer-x86_64-linux. — vlad.tsyrklevich / ViewSVN
  22. [OPENMP][MSVC]Enable /openmp[:experimental] to compile OpenMP.

    Mapped /openmp[:experimental] to -fopenmp option and /openmp- option to
    -fno-openmp — abataev / ViewSVN
  23. [libc++] Do not infer support for C++17 in GCC < 7

    libc++'s lit configuration infers the C++ language dialect when it is
    not provided by checking which -std= flags that a compiler supports.
    GCC 5 and GCC 6 have a -std=c++17 flag, however, they do not have full
    C++17 support. The lit configuration has hardcoded logic that removes
    -std=c++1z as an option to test for GCC < 7, but not -std=c++17.

    This leads to a bunch of failures when running libc++ tests with GCC 5
    or GCC 6. This patch adds -std=c++17 to the list of flags that are
    discarded for GCC < 7 by lit's language dialect inference.

    Thanks to Bryce Adelstein Lelbach for the patch.

    Differential Revision: https://reviews.llvm.org/D62874 — Louis Dionne / ViewSVN
  24. [X86] Remove const from some intrinsics that shouldn't have them — probinson / ViewSVN
  25. [clangd] Add dlog()s for SelectionTree, enabling -debug-only=SelectionTree.cpp

    Summary:
    SelectionTree is a RecursiveASTVisitor which processes getSourceRange() for
    every node. This is a lot of surface area with the AST, as getSourceRange()
    is specialized for *many* node types.
    And the resulting SelectionTree depends on the source ranges of many
    visited nodes, and the order of traversal.

    Put together, this means we really need a traversal log to debug when we
    get an unexpected SelectionTree. I've built this ad-hoc a few times, now
    it's time to check it in.

    Example output:
    ```
    D[14:07:44.184] Computing selection for </usr/local/google/home/sammccall/test.cc:1:7, col:8>
    D[14:07:44.184]  push: VarDecl const auto x = 42
    D[14:07:44.184]   claimRange: </usr/local/google/home/sammccall/test.cc:1:12, col:13>
    D[14:07:44.184]   push: NestedNameSpecifierLoc (empty NestedNameSpecifierLoc)
    D[14:07:44.184]   pop: NestedNameSpecifierLoc (empty NestedNameSpecifierLoc)
    D[14:07:44.184]   push: QualifiedTypeLoc const auto
    D[14:07:44.184]   pop: QualifiedTypeLoc const auto
    D[14:07:44.184]    claimRange: </usr/local/google/home/sammccall/test.cc:1:7, col:11>
    D[14:07:44.184]    hit selection: </usr/local/google/home/sammccall/test.cc:1:7, col:8>
    D[14:07:44.184]   skip: IntegerLiteral 42
    D[14:07:44.184]    skipped range = </usr/local/google/home/sammccall/test.cc:1:16>
    D[14:07:44.184]  pop: VarDecl const auto x = 42
    D[14:07:44.184]   claimRange: </usr/local/google/home/sammccall/test.cc:1:1, col:18>
    D[14:07:44.184]  skip: VarDecl int y = 43
    D[14:07:44.184]   skipped range = </usr/local/google/home/sammccall/test.cc:2:1, col:9>
    D[14:07:44.184] Built selection tree
    TranslationUnitDecl
      VarDecl const auto x = 42
         .QualifiedTypeLoc const auto

    ```

    Reviewers: hokein

    Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D65073 — sammccall / ViewSVN
  26. Update c++2a status page with post-Cologne information — marshall / ViewSVN

#18488 (Jul 22, 2019 12:18:45 PM)

  1. TableGen: Support physical register inputs > 255

    This was truncating register value that didn't fit in unsigned char.
    Switch AMDGPU sendmsg intrinsics to using a tablegen pattern. — arsenm / ViewSVN
  2. [NFC] Relaxed regression tests for PR42665

    Following up on the buildbot failures, this commits relaxes some tests:
    instead of checking for specific IR output, it now ensures that the
    underlying issue (the crash), and only that, doesn't happen. — mantognini / ViewSVN
  3. [ARM][LowOverheadLoops] Revert remaining pseudos

    ARMLowOverheadLoops would assert a failure if it did not find all the
    pseudo instructions that comprise the hardware loop. Instead of doing
    this, iterate through all the instructions of the function and revert
    any remaining pseudo instructions that haven't been converted.

    Differential Revision: https://reviews.llvm.org/D65080 — sam_parker / ViewSVN
  4. [OPENMP]Add support for analysis of firstprivate variables.

    Summary:
    Firstprivate variables are the variables, for which the private copies
    must be created in the OpenMP regions and must be initialized with the
    original values. Thus, we must report if the uninitialized variable is
    used as firstprivate.

    Reviewers: NoQ

    Subscribers: guansong, jdoerfert, caomhin, kkwli0, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64765 — abataev / ViewSVN
  5. AMDGPU/GlobalISel: Fix broken tests — arsenm / ViewSVN
  6. Update documentation for all CERT checks that correspond to a recommendation.

    CERT removed their C++ secure coding recommendations from public view and so the links within that documentation are stale. This updates various pieces of documentation to make this more clear, and to help add substance where our docs deferred to CERT's wiki. — aaronballman / ViewSVN
  7. Reland [ELF] Loose a condition for relocation with a symbol

    This patch was not the reason of the buildbot failure.

    Deleted code was introduced as a work around for a bug in the gold linker
    (http://sourceware.org/PR16794). Test case that was given as a reason for
    this part of code, the one on previous link, now works for the gold.
    This condition is too strict and when a code is compiled with debug info
    it forces generation of numerous relocations with symbol for architectures
    that do not have relocation addend.

    Reviewers: arsenm, espindola

    Reviewed By: MaskRay

    Differential Revision: https://reviews.llvm.org/D64327 — nikolaprica / ViewSVN
  8. AMDGPU/GlobalISel: Remove unnecessary code

    The minnum/maxnum case are dead, and the cvt is handled by the
    default. — arsenm / ViewSVN
  9. [ARM] Fix for MVE VPT block pass

    We need to ensure that the number of T's is correct when adding multiple
    instructions into the same VPT block.

    Differential revision: https://reviews.llvm.org/D65049 — dmgreen / ViewSVN
  10. Updated the signature for some stack related intrinsics (CLANG)

    Modified the intrinsics
    int_addressofreturnaddress,
    int_frameaddress & int_sponentry.
    This commit depends on the changes in rL366679

    Reviewed By: arsenm

    Differential Revision: https://reviews.llvm.org/D64563 — cdevadas / ViewSVN
  11. Revert the change to the [[nodiscard]] feature test macro value.

    This value only gets bumped once both P1301 and P1771 are implemented. — aaronballman / ViewSVN
  12. [X86] EltsFromConsecutiveLoads - support common source loads (REAPPLIED)

    This patch enables us to find the source loads for each element, splitting them into a Load and ByteOffset, and attempts to recognise consecutive loads that are in fact from the same source load.

    A helper function, findEltLoadSrc, recurses to find a LoadSDNode and determines the element's byte offset within it. When attempting to match consecutive loads, byte offsetted loads then attempt to matched against a previous load that has already been confirmed to be a consecutive match.

    Next step towards PR16739 - after this we just need to account for shuffling/repeated elements to create a vector load + shuffle.

    Fixed out of bounds load assert identified in rL366501

    Differential Revision: https://reviews.llvm.org/D64551 — rksimon / ViewSVN
  13. AMDGPU/GlobalISel: Fix tests without asserts

    The legality check is only done under NDEBUG, so the failure cases are
    different in a release build. — arsenm / ViewSVN
  14. Added address-space mangling for stack related intrinsics

    Modified the following 3 intrinsics:
    int_addressofreturnaddress,
    int_frameaddress & int_sponentry.

    Reviewed By: arsenm

    Differential Revision: https://reviews.llvm.org/D64561 — cdevadas / ViewSVN
  15. [X86][SSE] Add EltsFromConsecutiveLoads test case identified in rL366501

    Test case that led to rL366441 being reverted at rL366501 — rksimon / ViewSVN
  16. [yaml2obj] - Change how we handle implicit sections.

    Instead of having the special list of implicit sections,
    that are mixed with the sections read from YAML on late
    stages, I just create the placeholders and add them to
    the main sections list early.

    That allows to significantly simplify the code.

    Differential revision: https://reviews.llvm.org/D64999 — grimar / ViewSVN
  17. [clangd] Set buffer name for main file. NFCI — sammccall / ViewSVN
  18. [clangd] Log input code of failed highlighting tests. NFC — ibiryukov / ViewSVN
  19. [AST] Treat semantic form of InitListExpr as implicit code in traversals

    Summary:
    In particular, do not traverse the semantic form if shouldVisitImplicitCode()
    returns false.

    This simplifies the common case of traversals, avoiding the need to
    worry about some expressions being traversed twice.

    No tests break after the change, the change would allow to simplify at
    least one of the usages, i.e. r366070 which had to handle this in
    clangd.

    Reviewers: gribozavr

    Reviewed By: gribozavr

    Subscribers: kadircet, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64762 — ibiryukov / ViewSVN

#18486 (Jul 22, 2019 6:18:38 AM)

  1. Add location of SVN staging dir to git-llvm error output

    Summary:
    In pre-monorepo times the svn staging directory was `.git/svn`. The below error message wasn't mentioning the new name yet.

    Example before:
    ```
    Can't push git rev 104cfa289d9 because svn status is not empty:
    !     llvm/trunk/include/llvm
    ```

    Example after:
    ```
    Can't push git rev 104cfa289d9 because status in svn staging dir (.git/llvm-upstream-svn) is not empty:
    !     llvm/trunk/include/llvm
    ```

    Reviewers: mehdi_amini, jlebar, teemperor

    Reviewed By: mehdi_amini

    Subscribers: llvm-commits, #llvm

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D65038 — stefan.graenitz / ViewSVN
  2. [OpenCL] Improve destructor support in C++ for OpenCL

    This re-applies r366422 with a fix for Bug PR42665 and a new regression
    test. — mantognini / ViewSVN
  3. [IPRA][ARM] Make use of the "returned" parameter attribute

    ARM has code to recognise uses of the "returned" function parameter
    attribute which guarantee that the value passed to the function in r0
    will be returned in r0 unmodified. IPRA replaces the regmask on call
    instructions, so needs to be told about this to avoid reverting the
    optimisation.

    Differential revision: https://reviews.llvm.org/D64986 — ostannard / ViewSVN
  4. [llvm-readobj] - Stop using precompiled objects in file-headers.test

    This converts all sub-tests except one to YAML instead of precompiled inputs.

    Differential revision: https://reviews.llvm.org/D64800 — grimar / ViewSVN
  5. [AMDGPU] Save some work when an atomic op has no uses

    Summary:
    In the atomic optimizer, save doing a bunch of work and generating a
    bunch of dead IR in the fairly common case where the result of an
    atomic op (i.e. the value that was in memory before the atomic op was
    performed) is not used. NFC.

    Reviewers: arsenm, dstuttard, tpr

    Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, t-tye, hiraditya, jfb, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64981 — foad / ViewSVN
  6. [PowerPC][NFC] Precommit a test case where ppc-mi-peepholes miscompiles extswsli

    Added a test case to show codegen differences. — lkail / ViewSVN

#18484 (Jul 22, 2019 12:34:06 AM)

  1. [Loop Peeling] Fix the handling of branch weights of peeled off branches.

    Current algorithm to update branch weights of latch block and its copies is
    based on the assumption that number of peeling iterations is approximately equal
    to trip count.

    However it is not correct. According to profitability check in one case we can decide to peel
    in case it helps to reduce the number of phi nodes. In this case the number of peeled iteration
    can be less then estimated trip count.

    This patch introduces another way to set the branch weights to peeled of branches.
    Let F is a weight of the edge from latch to header.
    Let E is a weight of the edge from latch to exit.
    F/(F+E) is a probability to go to loop and E/(F+E) is a probability to go to exit.
    Then, Estimated TripCount = F / E.
    For I-th (counting from 0) peeled off iteration we set the the weights for
    the peeled latch as (TC - I, 1). It gives us reasonable distribution,
    The probability to go to exit 1/(TC-I) increases. At the same time
    the estimated trip count of remaining loop reduces by I.

    As a result after peeling off N iteration the weights will be
    (F - N * E, E) and trip count of loop becomes
    F / E - N or TC - N.

    The idea is taken from the review of the patch D63918 proposed by Philip.

    Reviewers: reames, mkuper, iajbar, fhahn
    Reviewed By: reames
    Subscribers: hiraditya, zzheng, llvm-commits
    Differential Revision: https://reviews.llvm.org/D64235 — skatkov / ViewSVN
  2. [utils] Clean up UpdateTestChecks/common.py — maskray / ViewSVN
  3. [analyzer] Fix -Wunused-function in NDEBUG builds with #ifdef LLVM_DUMP_METHOD — maskray / ViewSVN
  4. [InstCombine] Add foldAndOfICmps test cases inspired by PR42691.

    icmp ne %x, INT_MIN can be treated similarly to icmp sgt %x, INT_MIN.
    icmp ne %x, INT_MAX can be treated similarly to icmp slt %x, INT_MAX.
    icmp ne %x, UINT_MAX can be treated similarly to icmp ult %x, UINT_MAX.

    We already treat icmp ne %x, 0 similarly to icmp ugt %x, 0 — ctopper / ViewSVN

#18483 (Jul 21, 2019 7:27:32 PM)

  1. [PowerPC][NFC] Precomit test case for upcoming patch

    Just committing a test case for an upcoming patch so that the review can show
    only the codegen differences. — nemanjai / ViewSVN

#18482 (Jul 21, 2019 6:42:42 PM)

  1. [X86] SimplifyDemandedVectorEltsForTargetNode - Move SUBV_BROADCAST narrowing handling. NFCI.

    Move the narrowing of SUBV_BROADCAST to where we handle all the other opcodes. — rksimon / ViewSVN
  2. [PowerPC][NFC] Regenerate test using script

    This test case ended up as a hybrid of generated checks and manually inserted
    checks. Regenerate using script to make it consistent. — nemanjai / ViewSVN
  3. [InstCombine] Update comment I missed in r366649. NFC — ctopper / ViewSVN
  4. [SmallBitVector] Fix bug in find_next_unset for small types with indices >=32

    We were creating a bitmask from a shift of unsigned instead of uintptr_t, meaning we couldn't create masks for indices above 31.

    Noticed due to a MSVC analyzer warning. — rksimon / ViewSVN

#18481 (Jul 21, 2019 1:20:33 PM)

  1. [GISel]: Attach missing range metadata while translating G_LOADs

    https://reviews.llvm.org/D65048

    Attach range information to G_LOAD when only defining one register.

    reviewed by: arsenm — aditya_nandakumar / ViewSVN
  2. [ARM] Move MVE VPT block tests into the Thumb2 directory. NFC — dmgreen / ViewSVN

#18479 (Jul 21, 2019 3:45:10 AM)

  1. [InstCombine] Remove insertRangeTest code that handles the equality case.

    For equality, the function called getTrue/getFalse with the VT
    of the comparison input. But getTrue/getFalse need the boolean VT.
    So if this code ever executed, it would assert.

    I believe these cases are removed by InstSimplify so we don't get here.

    So this patch just fixes up an assert to exclude the equality
    possibility and removes the broken code. — ctopper / ViewSVN

#18478 (Jul 20, 2019 11:23:36 PM)

  1. [InstCombine] Don't use AddOne/SubOne to see if two APInts are 1 apart. Use APInt operations instead. NFCI

    AddOne/SubOne create new Constant objects. That seems heavy for
    comparing ConstantInts which wrap APInts. Just do the math on
    on the APInts and compare them. — ctopper / ViewSVN

#18477 (Jul 20, 2019 10:09:35 PM)

  1. gn build: Merge r366622 — nico / ViewSVN
  2. [Clang] Replace cc1 options '-mdisable-fp-elim' and '-momit-leaf-frame-pointer'
    with '-mframe-pointer'

    After D56351 and D64294, frame pointer handling is migrated to tri-state
    (all, non-leaf, none) in clang driver and on the function attribute.
    This patch makes the frame pointer handling cc1 option tri-state.

    Reviewers: chandlerc, rnk, t.p.northover, MaskRay

    Reviewed By: MaskRay

    Differential Revision: https://reviews.llvm.org/D56353 — yuanfang / ViewSVN

#18475 (Jul 20, 2019 5:13:40 PM)

  1. [NFC][InstCombine] Autogenerate a few tests — lebedevri / ViewSVN
  2. [NFC][InstCombine] Add srem-by-signbit tests - still can fold to bittest

    https://rise4fun.com/Alive/IIeS — lebedevri / ViewSVN
  3. [NFC][Codegen][X86][AArch64] Add "(x s% C) == 0" tests

    Much like with `urem`, the same optimization (albeit with slightly
    different algorithm) applies for the signed case, too.

    I'm simply copying the test coverage from `urem` case for now,
    i believe it should be (close to?) sufficient. — lebedevri / ViewSVN
  4. Fix asan infinite loop on undefined symbol

    Fix llvm#39641

    Recommit of r366413

    Differential Revision: https://reviews.llvm.org/D63877

    llvm-svn: 366632 — serge_sans_paille / ViewSVN

#18473 (Jul 20, 2019 11:51:29 AM)

  1. [Codegen][SelectionDAG] X u% C == 0 fold: non-splat vector improvements

    Summary:
    Four things here:
    1. Generalize the fold to handle non-splat divisors. Reasonably trivial.
    2. Unban power-of-two divisors. I don't see any reason why they should
       be illegal.
       * There is no ban in Hacker's Delight
       * I think the ban came from the same bug that caused the miscompile
          in the base patch - in `floor((2^W - 1) / D)` we were dividing by
          `D0` instead of `D`, and we **were** ensuring that `D0` is not `1`,
          which made sense.
    3. Unban `1` divisors. I no longer believe Hacker's Delight actually says
       that the fold is invalid for `D = 0`. Further considerations:
       * We know that
         * `(X u% 1) == 0`  can be constant-folded to `1`,
         * `(X u% 1) != 0`  can be constant-folded to `0`,
       *  Also, we know that
         * `X u<= -1` can be constant-folded to `1`,
         * `X u>  -1` can be constant-folded to `0`,
       * https://godbolt.org/z/7jnZJX https://rise4fun.com/Alive/oF6p
       * We know will end up with the following:
           `(setule/setugt (rotr (mul N, P), K), Q)`
       * Therefore, for given new DAG nodes and comparison predicates
         (`ule`/`ugt`), we will still produce the correct answer if:
         `Q` is a all-ones constant; and both `P` and `K` are *anything*
         other than `undef`.
       * The fold will indeed produce `Q = all-ones`.
    4. Try to re-splat the `P` and `K` vectors - we don't care about
       their values for the lanes where divisor was `1`.

    Reviewers: RKSimon, hermord, craig.topper, spatel, xbolva00

    Reviewed By: RKSimon

    Subscribers: hiraditya, javed.absar, dexonsmith, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63963 — lebedevri / ViewSVN
  2. [X86][SSE] Use PSADBW to improve vXi8 sum reduction (PR42674)

    As detailed on PR42674, we can reduce a vXi8 down until we have the final <8 x i8>, and then use PSADBW with zero, to sum those values. We then extract the bottom i8, discarding any overflow from the upper bits of the i16 result. — rksimon / ViewSVN
  3. Fix cppcheck reduce scope variable warnings. NFCI

    Move a couple of variables inside the block where they are actually needed. — rksimon / ViewSVN
  4. Revert "Fix asan infinite loop on undefined symbol"

    This reverts commit cbd28cd05bb11e9d76d71c6cc2d38d89dbb1fe1a.

    Buildbot fail: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/22434/steps/64-bit%20check-asan-dynamic/ — serge_sans_paille / ViewSVN
  5. [Local] Zap blockaddress without users in ConstantFoldTerminator.

    If the blockaddress is not destoryed, the destination block will still
    be marked as having its address taken, limiting further transformations.

    I think there are other places where the dead blockaddress constants are kept
    around, I'll look into that as follow up.

    Reviewers: craig.topper, brzycki, davide

    Reviewed By: brzycki, davide

    Differential Revision: https://reviews.llvm.org/D64936 — fhahn / ViewSVN
  6. Fix asan infinite loop on undefined symbol

    Fix llvm#39641

    Recommit of r366413

    Differential Revision: https://reviews.llvm.org/D63877 — serge_sans_paille / ViewSVN
  7. [c++20] P1161R3: a[b,c] is deprecated. — rsmith / ViewSVN
  8. Mark P1301R4 in C++2a as being SVN instead. — aaronballman / ViewSVN
  9. We support P1301R4 in C++2a as of r366626. — aaronballman / ViewSVN
  10. [cxx_status] Update status page for WG21 Cologne meeting motions.

    Note that many of the paper links will be dead until the post-meeting
    mailing is released. — rsmith / ViewSVN
  11. Implement P1301R4, which allows specifying an optional message on the [[nodiscard]] attribute.

    This also bumps the attribute feature test value and introduces the notion of a C++2a extension warning. — aaronballman / ViewSVN

#18468 (Jul 19, 2019 9:40:46 PM)

  1. [GlobalISel][AArch64] Contract trivial same-size cross-bank copies into G_STOREs

    Sometimes, you can end up with cross-bank copies between same-sized GPRs and
    FPRs, which feed into G_STOREs. When these copies feed only into stores, they
    aren't necessary; we can just store using the original register bank.

    This provides some minor code size savings for some floating point SPEC
    benchmarks. (Around 0.2% for 453.povray and 450.soplex)

    This issue doesn't seem to show up due to regbankselect or anything similar. So,
    this patch introduces an early select function, `contractCrossBankCopyIntoStore`
    which performs the contraction when possible. The selector then continues
    normally and selects the correct store opcode, eliminating needless copies
    along the way.

    Differential Revision: https://reviews.llvm.org/D65024 — paquette / ViewSVN
  2. [WebAssembly] Compute and export TLS block alignment

    Summary:
    Add immutable WASM global `__tls_align` which stores the alignment
    requirements of the TLS segment.

    Add `__builtin_wasm_tls_align()` intrinsic to get this alignment in Clang.

    The expected usage has now changed to:

        __wasm_init_tls(memalign(__builtin_wasm_tls_align(),
                                 __builtin_wasm_tls_size()));

    Reviewers: tlively, aheejin, sbc100, sunfish, alexcrichton

    Reviewed By: tlively

    Subscribers: dschuff, jgravelle-google, hiraditya, cfe-commits, llvm-commits

    Tags: #clang, #llvm

    Differential Revision: https://reviews.llvm.org/D65028 — quantum / ViewSVN
  3. [LTO] Always mark regular LTO units with EnableSplitLTOUnit=1

    Summary:
    Regular LTO modules do not need LTO Unit splitting, only ThinLTO does
    (they must be consistently split into regular and Thin units for
    optimizations such as whole program devirtualization and lower type
    tests). In order to avoid spurious errors from LTO when combining with
    split ThinLTO modules, always set this flag for regular LTO modules.

    Reviewers: pcc

    Subscribers: mehdi_amini, Prazek, inglorion, steven_wu, dexonsmith, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D65009 — tejohnson / ViewSVN
  4. Re-commit: r366610 and r366612: Expand pseudo-components before embedding in llvm-config

    There were two main problems:
    * The 'nativecodegen' pseudo-component was unconditionally adding
      ${native_tgt}CodeGen even though it conditionally added ${native_tgt}Info and
      ${native_tgt}Desc. This has been fixed by making ${native_tgt}CodeGen
      conditional too
    * The 'all' pseudo-component was causing library names like LLVMLLVMDemangle as
      the expansion was to a library name and not a component. There doesn't seem to
      be a list of available components anywhere so this has been fixed by moving the
      expansion of 'all' back where it was before. This manifested in different ways
      on different builders but it was the same root cause — dsanders / ViewSVN
  5. AMDGPU/GlobalISel: Legalize GEP for other 32-bit address spaces — arsenm / ViewSVN
  6. [NFC] Remove unused variable

    Change-Id: I5aee24dcdf6eebfbf788e52be22463387f23d927 — dendibakh / ViewSVN

#18467 (Jul 19, 2019 4:46:07 PM)

  1. [AMDGPU] Autogenerate register sequences in tuples

    Differential Revision: https://reviews.llvm.org/D65007 — rampitec / ViewSVN
  2. Revert "Fix asan infinite loop on undefined symbol"

    This reverts commit 8e46275488ca453a24964cb26be0736172ad1db8.

    This was failing on sanitizer-x86_64-linux and our internal CI. — ormris / ViewSVN
  3. Disallow most calling convention attributes on PS4

    PS4 now only allows "cdecl", and its equivalent on PS4, "sysv_abi".

    Differential Revision: https://reviews.llvm.org/D64780 — ssrivastava / ViewSVN
  4. [AMDGPU] Fixed occupancy calculation for gfx10

    Differential Revision: https://reviews.llvm.org/D65010 — rampitec / ViewSVN
  5. Revert r366610 and r366612: Expand pseudo-components before embedding in llvm-config

    Some targets are missing LLVMDemangle, one is adding the LLVM prefix twice, and two
    are hitting the very error this patch fixes for my target. Reverting while I work
    through the reports. — dsanders / ViewSVN
  6. [InstCombine] Fix copy/paste mistake in the test cases I added for PR42691. NFC — ctopper / ViewSVN
  7. AMDGPU: Avoid custom predicates for stores with glue — arsenm / ViewSVN
  8. Fix a latent bug discovered by r366610: nativecodegen includes X86CodeGen when X86 is not compiled

    I believe this to have been a latent bug as the same expansion checks for the
    existence of ${native_tgt}Info and ${native_tgt}Desc and only adds them if
    they were compiled but unconditionally adds ${native_tgt}CodeGen.

    This should fix llvm-clang-x86_64-win-fast which builds ARM only on an X86 host and similar builders. — dsanders / ViewSVN
  9. [InstCombine] Add test cases for PR42691. NFC — ctopper / ViewSVN
  10. Expand pseudo-components before embedding in llvm-config

    Summary:
    If you use pseudo-targets like AllTargetsCodeGens in LLVM_DYLIB_COMPONENTS
    then a test will fail because `./bin/llvm-config --shared-mode` can't
    handle these targets. We can fix this by expanding them before embedding
    the string into llvm-config

    Reviewers: bogner

    Reviewed By: bogner

    Subscribers: mgorny, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D65011 — dsanders / ViewSVN
  11. AMDGPU: Redefine setcc condition PatLeafs

    Avoid using custom code predicates. — arsenm / ViewSVN
  12. AMDGPU: Don't rely on m0 being -1 for GWS offsets

    This only works if the high bits of m0 are also 0, so m0 would have to
    be set to 0xffff. — arsenm / ViewSVN
  13. AMDGPU: Force s_waitcnt after GWS instructions

    This is apparently required to be the immediately following
    instruction, so force it into a bundle with a waitcnt. — arsenm / ViewSVN
  14. [libc++] Mark libcpp_deallocate.sh.cpp as UNSUPPORTED instead of XFAIL on AppleClang 9

    Some minor versions of AppleClang 9 appear not to fail the test. It's
    such a mess that the only sane thing to do is to mark the test as
    UNSUPPORTED. — Louis Dionne / ViewSVN
  15. LiveIntervals: Fix handleMove asserting on BUNDLE

    The top-level BUNDLE instruction should behave as an ordinary
    instruction. It is supposed to have all relevant registers as implicit
    operands. Moving it should work as any other instruction. I believe
    the assert intended to avoid moving instructions inside bundles. — arsenm / ViewSVN
  16. Revert "[libc++] Integrate the PSTL into libc++"

    This reverts r366593, which caused unforeseen breakage on the build bots.
    I'm reverting until the problems have been figured out and fixed. — Louis Dionne / ViewSVN
  17. [AMDGPU] Add test case on crashing of `si-lower-sgpr-spills` pass

    Reviewers: arsenm

    Subscribers: qcolombet, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64273 — hliao / ViewSVN
  18. [libc++] Allow passing additional CMake arguments in macOS trunk CI script — Louis Dionne / ViewSVN
  19. Revert "Use the MachineBasicBlock symbol for a callbr target"

    This reverts commit r366523/ccbffefccaff42b0d094c9ef0f49fc3e8c8456ea.

    Two regressions were immediately reported:
    - https://github.com/ClangBuiltLinux/linux/issues/614
    - https://github.com/ClangBuiltLinux/linux/issues/615

    Reported-by: nathanchance — nickdesaulniers / ViewSVN
  20. [RISCV] Disable tests failing on buildbots.

    r366399 enabled a couple tests that are failing on a few buildbots. — morehouse / ViewSVN
  21. [AMDGPU] Allow register tuples to set asm names

    This change reverts most of the previous register name generation.
    The real problem is that RegisterTuple does not generate asm names.
    Added optional operand to RegisterTuple. This way we can simplify
    register name access and dramatically reduce the size of static
    tables for the backend.

    Differential Revision: https://reviews.llvm.org/D64967 — rampitec / ViewSVN
  22. AMDGPU/GlobalISel: Fix MMO flags for kernel argument loads

    The DAG lowering sets dereferencable and invariant, not nontemporal. — arsenm / ViewSVN
  23. GlobalISel: Add GINodeEquiv for fcopysign

    I don't need this at the moment, but it should be here. — arsenm / ViewSVN
  24. [llvm-lipo] Remove trailing whitespace. NFC — smeenai / ViewSVN
  25. [libc++] Use _EnableIf instead of std::enable_if in deduction guides for map and set — Louis Dionne / ViewSVN
  26. [libc++] Integrate the PSTL into libc++

    Summary:
    This commit allows specifying LIBCXX_ENABLE_PARALLEL_ALGORITHMS when
    configuring libc++ in CMake. When that option is enabled, libc++ will
    assume that the PSTL can be found somewhere on the CMake module path,
    and it will provide the C++17 parallel algorithms based on the PSTL
    (that is assumed to be available).

    The commit also adds support for running the PSTL tests as part of
    the libc++ test suite.

    Reviewers: rodgert, EricWF

    Subscribers: mgorny, christof, jkorous, dexonsmith, libcxx-commits, mclow.lists, EricWF

    Tags: #libc

    Differential Revision: https://reviews.llvm.org/D60480 — Louis Dionne / ViewSVN
  27. [Format/ObjC] Avoid breaking between unary operators and operands

    Summary:
    Test Plan:
      New tests added. Ran tests with:
      % ninja FormatTests && ./tools/clang/unittests/Format/FormatTests
      Confirmed tests failed before change and passed after change.

    Reviewers: krasimir, djasper, sammccall, klimek

    Reviewed By: sammccall

    Subscribers: klimek, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64775 — benhamilton / ViewSVN
  28. AMDGPU: Add some function return test cases — arsenm / ViewSVN
  29. [AMDGPU] Regenerate test file for upcoming patch. NFCI. — rksimon / ViewSVN
  30. Fix asan infinite loop on undefined symbol

    Fix llvm#39641

    Recommit of r366413

    Differential Revision: https://reviews.llvm.org/D63877 — serge_sans_paille / ViewSVN
  31. AMDGPU: Attempt to fix bot error

    Manually remove file name from check line, since it somehow ends
    up being different on an msvc bot. — arsenm / ViewSVN

#18465 (Jul 19, 2019 10:50:46 AM)

  1. AMDGPU/GlobalISel: Selection for fminnum/fmaxnum

    v2f16 case doesn't work yet because the VOP3P complex patterns haven't
    been ported yet. — arsenm / ViewSVN
  2. AMDGPU/GlobalISel: Support arguments with multiple registers

    Handles structs used directly in argument lists. — arsenm / ViewSVN
  3. AMDGPU/GlobalISel: Rewrite lowerFormalArguments

    This should now handle everything except structs passed as multiple
    registers.

    I think most of the packing logic should be handled by
    handleAssignments, but I'm unclear on what the contract is for
    multiple registers. This is copying how x86 handles this.

    This does change the behavior of the test_sgpr_alignment0 amdgpu_vs
    test. I don't think shader arguments should try to follow the
    alignment, and registers need to be repacked. I also don't think it
    matters, since I think the pointers are packed to the beginning of the
    argument list anyway. — arsenm / ViewSVN
  4. [libc++] Add missing %link_flags to .sh.cpp test

    Without the link flags, the test always fails on Linux. For some reason,
    however, it works on Darwin -- which is why it wasn't caught at first. — Louis Dionne / ViewSVN
  5. AMDGPU: Decompose all values to 32-bit pieces for calling conventions

    This is the more natural lowering, and presents more opportunities to
    reduce 64-bit ops to 32-bit.

    This should also help avoid issues graphics shaders have had with
    64-bit values, and simplify argument lowering in globalisel. — arsenm / ViewSVN
  6. [clangd] Provide a way to publish highlightings in non-racy manner

    Summary:
    By exposing a callback that can guard code publishing results of
    'onMainAST' callback in the same manner we guard diagnostics.

    Reviewers: sammccall

    Reviewed By: sammccall

    Subscribers: javed.absar, MaskRay, jkorous, arphaman, kadircet, hokein, jvikstrom, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64985 — ibiryukov / ViewSVN
  7. gn build: Set +x on symlink_or_copy.py — nico / ViewSVN
  8. [clangd] Disable background-index on lit-tests by default

    Summary:
    Since background-index can perform disk writes, we don't want to turn
    it on tests that won't clear it.

    Reviewers: sammccall

    Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64990 — kadircet / ViewSVN
  9. DAG: Handle dbg_value for arguments split into multiple subregs

    This was handled previously for arguments split due to not fitting in
    an MVT. This was dropping the register for argument registers split
    due to TLI::getRegisterTypeForCallingConv. — arsenm / ViewSVN
  10. [NFC] include cstdint/string prior to using uint8_t/string

    Summary: include proper header prior to use of uint8_t typedef
    and std::string.

    Subscribers: llvm-commits

    Reviewers: cherry

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64937 — thanm / ViewSVN
  11. [AMDGPU][MC] Corrected parsing of branch offsets

    See bug 40820: https://bugs.llvm.org/show_bug.cgi?id=40820

    Reviewers: artem.tamazov, arsenm

    Differential Revision: https://reviews.llvm.org/D64629 — dpreobra / ViewSVN
  12. [MachineCSE][MachinePRE] Avoid hoisting code from code regions into hot BBs.

    Summary:
    Current PRE hoists common computations into
    CMBB = DT->findNearestCommonDominator(MBB, MBB1).
    However, if CMBB is in a hot loop body, we might get performance
    degradation.

    Differential Revision: https://reviews.llvm.org/D64394 — lkail / ViewSVN
  13. [X86] for split stack, not save/restore nested arg if unused

    Summary:
    For split-stack, if the nested argument (i.e. R10) is not used, no need to save/restore it in the prologue.

    Reviewers: thanm

    Reviewed By: thanm

    Subscribers: mstorsjo, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64673 — thanm / ViewSVN
  14. [Clangd] Fixed ExtractVariable test — sureyeaah / ViewSVN
  15. [libc++] Fix link error with _LIBCPP_HIDE_FROM_ABI_PER_TU and std::string

    Summary:
    This is effectively a revert of r344616, which was a partial fix for
    PR38964 (compilation of <string> with GCC in C++03 mode). However, that
    configuration is explicitly not supported anymore and that partial fix
    breaks compilation with Clang when per-TU insulation is provided.

    PR42676
    rdar://52899715

    Reviewers: mclow.lists, EricWF

    Subscribers: christof, jkorous, dexonsmith, libcxx-commits

    Tags: #libc

    Differential Revision: https://reviews.llvm.org/D64941 — Louis Dionne / ViewSVN
  16. [Clangd] Fixed SelectionTree bug for macros

    Summary:
    Fixed SelectionTree bug for macros
    - Fixed SelectionTree claimRange for macros and template instantiations
    - Fixed SelectionTree unit tests
    - Changed a breaking test in TweakTests

    Reviewers: sammccall, kadircet

    Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64329 — sureyeaah / ViewSVN
  17. [NFC][InstCombine] Tests for 'rem' formation from sub-of-mul-by-'div' (PR42673)

    https://rise4fun.com/Alive/8Rp
    https://bugs.llvm.org/show_bug.cgi?id=42673 — lebedevri / ViewSVN
  18. [NFC][InstCombine] Redundant masking before left-shift: tests with assume

    If the legality check is `(shiftNbits-maskNbits) s>= 0`,
    then we can simplify it to `shiftNbits u>= maskNbits`,
    which is easier to check for.

    However, currently switching the `dropRedundantMaskingOfLeftShiftInput()`
    to `SimplifyICmpInst()` does not catch these cases and regresses
    currently-handled cases, so i'll leave it as is for now.

    https://rise4fun.com/Alive/25P — lebedevri / ViewSVN
  19. Fix MSVC "result of 32-bit shift implicitly converted to 64 bits" warning. NFCI. — rksimon / ViewSVN
  20. Don't update NoTrappingFPMath and FPDenormalMode in resetTargetOptions

    We'd like to remove this whole function, because these are properties of
    functions, not the target as a whole. These two are easy to remove
    because they are only used for emitting ARM build attributes, which
    expects them to represent the defaults for the whole module, not just
    the last function generated.

    This is needed to get correct build attributes when using IPRA on ARM,
    because IPRA causes resetTargetOptions to get called before
    ARMAsmPrinter::emitAttributes.

    Differential revision: https://reviews.llvm.org/D64929 — ostannard / ViewSVN
  21. Revert "Revert r366458, r366467 and r366468"

    This reverts commit 9c377105da0be7c2c9a3c70035ce674c71b846af.

    [clangd][BackgroundIndexLoader] Directly store DependentTU while loading shard

    Summary:
    We were deferring the population of DependentTU field in LoadedShard
    until BackgroundIndexLoader was consumed. This actually triggers a use after
    free since the shards FileToTU was pointing at could've been moved while
    consuming the Loader.

    Reviewers: sammccall

    Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64980 — kadircet / ViewSVN
  22. [llvm-readelf] - A fix for: "--hash-symbols asserts for 64-bit ELFs"

    Fixes https://bugs.llvm.org/show_bug.cgi?id=42622.
    (--hash-symbols switch is currently broken for 64-bit ELF files, due to r352630.)

    Differential revision: https://reviews.llvm.org/D64788 — grimar / ViewSVN
  23. [IPRA] Don't rely on non-exact function definitions

    If a function definition is not exact, then the linker could select a
    differently-compiled version of it, which could use different registers.

    https://reviews.llvm.org/D64909 — ostannard / ViewSVN

#18463 (Jul 19, 2019 4:18:03 AM)

  1. [llvm-readelf] - A fix for: "--hash-symbols asserts for 64-bit ELFs"

    Fixes https://bugs.llvm.org/show_bug.cgi?id=42622.
    (--hash-symbols switch is currently broken for 64-bit ELF files, due to r352630.)

    Differential revision: https://reviews.llvm.org/D64788 — grimar / ViewSVN
  2. [IPRA] Don't rely on non-exact function definitions

    If a function definition is not exact, then the linker could select a
    differently-compiled version of it, which could use different registers.

    https://reviews.llvm.org/D64909 — ostannard / ViewSVN
  3. [ARM] Add <saturate> operand to SQRSHRL and UQRSHLL

    Summary:
    According to the new Armv8-M specification
    https://static.docs.arm.com/ddi0553/bh/DDI0553B_h_armv8m_arm.pdf the
    instructions SQRSHRL and UQRSHLL now have an additional immediate
    operand <saturate>. The new assembly syntax is:

    SQRSHRL<c> RdaLo, RdaHi, #<saturate>, Rm
    UQRSHLL<c> RdaLo, RdaHi, #<saturate>, Rm

    where <saturate> can be either 64 (the existing behavior) or 48, in
    that case the result is saturated to 48 bits.

    The new operand is encoded as follows:
      #64 Encoded as sat = 0
      #48 Encoded as sat = 1
    sat is bit 7 of the instruction bit pattern.

    This patch adds a new assembler operand class MveSaturateOperand which
    implements parsing and encoding. Decoding is implemented in
    DecodeMVEOverlappingLongShift.

    Reviewers: ostannard, simon_tatham, t.p.northover, samparker, dmgreen, SjoerdMeijer

    Reviewed By: simon_tatham

    Subscribers: javed.absar, kristof.beyls, hiraditya, pbarrio, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64810 — miyuki / ViewSVN
  4. Revert r366458, r366467 and r366468

    r366458 is causing test failures. r366467 and r366468 had to be reverted as
    they were casuing conflict while reverting r366458.

    r366468 [clangd] Remove dead code from BackgroundIndex
    r366467 [clangd] BackgroundIndex stores shards to the closest project
    r366458 [clangd] Refactor background-index shard loading — Azharuddin Mohammed / ViewSVN
  5. [OpenCL] Define CLK_NULL_EVENT without cast

    Defining CLK_NULL_EVENT with a `(void*)` cast has the (unintended?)
    side-effect that the address space will be fixed (as generic in OpenCL
    2.0 mode).  The consequence is that any target specific address space
    for the clk_event_t type will not be applied.

    It is not clear why the void pointer cast was needed in the first
    place, and it seems we can do without it.

    Differential Revision: https://reviews.llvm.org/D63876 — svenvh / ViewSVN
  6. [clangd] Handle windows line endings in QueryDriver

    Summary:
    The previous patch did not fix the end mark. D64789
    fixes second case of https://github.com/clangd/clangd/issues/93

    Patch by @lh123 !

    Reviewers: sammccall, kadircet

    Reviewed By: kadircet

    Subscribers: MaskRay, ilya-biryukov, jkorous, arphaman, cfe-commits

    Tags: #clang-tools-extra, #clang

    Differential Revision: https://reviews.llvm.org/D64970 — kadircet / ViewSVN
  7. [sanitizers] Use covering ObjectFormatType switches

    Summary:
    This patch removes the `default` case from some switches on
    `llvm::Triple::ObjectFormatType`, and cases for the missing enumerators
    (`UnknownObjectFormat`, `Wasm`, and `XCOFF`) are then added.

    For `UnknownObjectFormat`, the effect of the action for the `default`
    case is maintained; otherwise, where `llvm_unreachable` is called,
    `report_fatal_error` is used instead.

    Where the `default` case returns a default value, `report_fatal_error`
    is used for XCOFF as a placeholder. For `Wasm`, the effect of the action
    for the `default` case in maintained.

    The code is structured to avoid strongly implying that the `Wasm` case
    is present for any reason other than to make the switch cover all
    `ObjectFormatType` enumerator values.

    Reviewers: sfertile, jasonliu, daltenty

    Reviewed By: sfertile

    Subscribers: hiraditya, aheejin, sunfish, llvm-commits, cfe-commits

    Tags: #clang, #llvm

    Differential Revision: https://reviews.llvm.org/D64222 — hubert.reinterpretcast / ViewSVN
  8. [AMDGPU] Simplify the exclusive scan used for optimized atomics

    Summary:
    Change the scan algorithm to use only power-of-two shifts (1, 2, 4, 8,
    16, 32) instead of starting off shifting by 1, 2 and 3 and then doing
    a 3-way ADD, because:

    1. It simplifies the compiler a little.
    2. It minimizes vgpr pressure because each instruction is now of the
       form vn = vn + vn << c.
    3. It is more friendly to the DPP combiner, which currently can't
       combine into an ADD3 instruction.

    Because of #2 and #3 the end result is improved from this:

      v_add_u32_dpp v4, v3, v3  row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:0
      v_mov_b32_dpp v5, v3  row_shr:2 row_mask:0xf bank_mask:0xf
      v_mov_b32_dpp v1, v3  row_shr:3 row_mask:0xf bank_mask:0xf
      v_add3_u32 v1, v4, v5, v1
      s_nop 1
      v_add_u32_dpp v1, v1, v1  row_shr:4 row_mask:0xf bank_mask:0xe
      s_nop 1
      v_add_u32_dpp v1, v1, v1  row_shr:8 row_mask:0xf bank_mask:0xc
      s_nop 1
      v_add_u32_dpp v1, v1, v1  row_bcast:15 row_mask:0xa bank_mask:0xf
      s_nop 1
      v_add_u32_dpp v1, v1, v1  row_bcast:31 row_mask:0xc bank_mask:0xf

    To this:

      v_add_u32_dpp v1, v1, v1  row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:0
      s_nop 1
      v_add_u32_dpp v1, v1, v1  row_shr:2 row_mask:0xf bank_mask:0xf bound_ctrl:0
      s_nop 1
      v_add_u32_dpp v1, v1, v1  row_shr:4 row_mask:0xf bank_mask:0xe
      s_nop 1
      v_add_u32_dpp v1, v1, v1  row_shr:8 row_mask:0xf bank_mask:0xc
      s_nop 1
      v_add_u32_dpp v1, v1, v1  row_bcast:15 row_mask:0xa bank_mask:0xf
      s_nop 1
      v_add_u32_dpp v1, v1, v1  row_bcast:31 row_mask:0xc bank_mask:0xf

    I.e. two fewer computational instructions, one extra nop where we could
    schedule something else.

    Reviewers: arsenm, sheredom, critson, rampitec, vpykhtin

    Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64411 — foad / ViewSVN
  9. [Loop Peeling] Enable peeling of multiple exits by default.

    Enable loop peeling with multiple exits where all non-latch exits
    ends up with deopt by default.

    Reviewers: reames, fhahn
    Reviewed By: reames
    Subscribers: xbolva00, hiraditya, zzheng, llvm-commits
    Differential Revision: https://reviews.llvm.org/D64619 — skatkov / ViewSVN
  10. [clangd] cleanup: unify the implemenation of checking a location is inside main file.

    Summary: We have variant implementations in the codebase, this patch unifies them.

    Reviewers: ilya-biryukov, kadircet

    Subscribers: MaskRay, jkorous, arphaman, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64915 — hokein / ViewSVN
  11. [InstCombine] Dropping redundant masking before left-shift [5/5] (PR42563)

    Summary:
    If we have some pattern that leaves only some low bits set, and then performs
    left-shift of those bits, if none of the bits that are left after the final
    shift are modified by the mask, we can omit the mask.

    There are many variants to this pattern:
    f. `((x << MaskShAmt) a>> MaskShAmt) << ShiftShAmt`
    All these patterns can be simplified to just:
    `x << ShiftShAmt`
    iff:
    f. `(ShiftShAmt-MaskShAmt) s>= 0` (i.e. `ShiftShAmt u>= MaskShAmt`)

    Normally, the inner pattern is sign-extend,
    but for our purposes it's no different to other patterns:

    alive proofs:
    f: https://rise4fun.com/Alive/7U3

    For now let's start with patterns where both shift amounts are variable,
    with trivial constant "offset" between them, since i believe this is
    both simplest to handle and i think this is most common.
    But again, there are likely other variants where we could use
    ValueTracking/ConstantRange to handle more cases.

    https://bugs.llvm.org/show_bug.cgi?id=42563

    Differential Revision: https://reviews.llvm.org/D64524 — lebedevri / ViewSVN
  12. [InstCombine] Dropping redundant masking before left-shift [4/5] (PR42563)

    Summary:
    If we have some pattern that leaves only some low bits set, and then performs
    left-shift of those bits, if none of the bits that are left after the final
    shift are modified by the mask, we can omit the mask.

    There are many variants to this pattern:
    e. `((x << MaskShAmt) l>> MaskShAmt) << ShiftShAmt`
    All these patterns can be simplified to just:
    `x << ShiftShAmt`
    iff:
    e. `(ShiftShAmt-MaskShAmt) s>= 0` (i.e. `ShiftShAmt u>= MaskShAmt`)

    alive proofs:
    e: https://rise4fun.com/Alive/0FT

    For now let's start with patterns where both shift amounts are variable,
    with trivial constant "offset" between them, since i believe this is
    both simplest to handle and i think this is most common.
    But again, there are likely other variants where we could use
    ValueTracking/ConstantRange to handle more cases.

    https://bugs.llvm.org/show_bug.cgi?id=42563

    Differential Revision: https://reviews.llvm.org/D64521 — lebedevri / ViewSVN
  13. [InstCombine] Dropping redundant masking before left-shift [3/5] (PR42563)

    Summary:
    If we have some pattern that leaves only some low bits set, and then performs
    left-shift of those bits, if none of the bits that are left after the final
    shift are modified by the mask, we can omit the mask.

    There are many variants to this pattern:
    d. `(x & ((-1 << MaskShAmt) >> MaskShAmt)) << ShiftShAmt`
    All these patterns can be simplified to just:
    `x << ShiftShAmt`
    iff:
    d. `(ShiftShAmt-MaskShAmt) s>= 0` (i.e. `ShiftShAmt u>= MaskShAmt`)

    alive proofs:
    d: https://rise4fun.com/Alive/I5Y

    For now let's start with patterns where both shift amounts are variable,
    with trivial constant "offset" between them, since i believe this is
    both simplest to handle and i think this is most common.
    But again, there are likely other variants where we could use
    ValueTracking/ConstantRange to handle more cases.

    https://bugs.llvm.org/show_bug.cgi?id=42563

    Differential Revision: https://reviews.llvm.org/D64519 — lebedevri / ViewSVN
  14. [InstCombine] Dropping redundant masking before left-shift [2/5] (PR42563)

    Summary:
    If we have some pattern that leaves only some low bits set, and then performs
    left-shift of those bits, if none of the bits that are left after the final
    shift are modified by the mask, we can omit the mask.

    There are many variants to this pattern:
    c. `(x & (-1 >> MaskShAmt)) << ShiftShAmt`
    All these patterns can be simplified to just:
    `x << ShiftShAmt`
    iff:
    c. `(ShiftShAmt-MaskShAmt) s>= 0` (i.e. `ShiftShAmt u>= MaskShAmt`)

    alive proofs:
    c: https://rise4fun.com/Alive/RgJh

    For now let's start with patterns where both shift amounts are variable,
    with trivial constant "offset" between them, since i believe this is
    both simplest to handle and i think this is most common.
    But again, there are likely other variants where we could use
    ValueTracking/ConstantRange to handle more cases.

    https://bugs.llvm.org/show_bug.cgi?id=42563

    Differential Revision: https://reviews.llvm.org/D64517 — lebedevri / ViewSVN
  15. [InstCombine] Dropping redundant masking before left-shift [1/5] (PR42563)

    Summary:
    If we have some pattern that leaves only some low bits set, and then performs
    left-shift of those bits, if none of the bits that are left after the final
    shift are modified by the mask, we can omit the mask.

    There are many variants to this pattern:
    b. `(x & (~(-1 << maskNbits))) << shiftNbits`
    All these patterns can be simplified to just:
    `x << ShiftShAmt`
    iff:
    b. `(MaskShAmt+ShiftShAmt) u>= bitwidth(x)`

    alive proof:
    b: https://rise4fun.com/Alive/y8M

    For now let's start with patterns where both shift amounts are variable,
    with trivial constant "offset" between them, since i believe this is
    both simplest to handle and i think this is most common.
    But again, there are likely other variants where we could use
    ValueTracking/ConstantRange to handle more cases.

    https://bugs.llvm.org/show_bug.cgi?id=42563

    Differential Revision: https://reviews.llvm.org/D64514 — lebedevri / ViewSVN
  16. [InstCombine] Dropping redundant masking before left-shift [0/5] (PR42563)

    Summary:
    If we have some pattern that leaves only some low bits set, and then performs
    left-shift of those bits, if none of the bits that are left after the final
    shift are modified by the mask, we can omit the mask.

    There are many variants to this pattern:
    a. `(x & ((1 << MaskShAmt) - 1)) << ShiftShAmt`
    All these patterns can be simplified to just:
    `x << ShiftShAmt`
    iff:
    a. `(MaskShAmt+ShiftShAmt) u>= bitwidth(x)`

    alive proof:
    a: https://rise4fun.com/Alive/wi9

    Indeed, not all of these patterns are canonical.
    But since this fold will only produce a single instruction
    i'm really interested in handling even uncanonical patterns,
    since i have this general kind of pattern in hotpaths,
    and it is not totally outlandish for bit-twiddling code.

    For now let's start with patterns where both shift amounts are variable,
    with trivial constant "offset" between them, since i believe this is
    both simplest to handle and i think this is most common.
    But again, there are likely other variants where we could use
    ValueTracking/ConstantRange to handle more cases.

    https://bugs.llvm.org/show_bug.cgi?id=42563

    Reviewers: spatel, nikic, huihuiz, xbolva00

    Reviewed By: xbolva00

    Subscribers: efriedma, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64512 — lebedevri / ViewSVN
  17. [NFC] Fix an indentation issue in llvm/Support/TargetRegistry.h — hubert.reinterpretcast / ViewSVN
  18. [DebugInfo] Some fields do not need relocations even relax is enabled.

    In debug frame information, some fields, e.g., Length in CIE/FDE and
    Offset in FDE are attributes to describe the structure of CIE/FDE. They
    are not related to the relaxed code. However, these attributes are
    symbol differences. So, in current design, these attributes will be
    filled as zero and LLVM generates relocations for them.

    We only need to generate relocations for symbols in executable sections.
    So, if the symbols are not located in executable sections, we still
    evaluate their values under relaxation.

    Differential Revision: https://reviews.llvm.org/D61584 — hsiangkai / ViewSVN
  19. unbreak links — lattner / ViewSVN
  20. replace the old kaleidoscope tutorial files with orphaned pages that forward to the new copy. — lattner / ViewSVN
  21. Point to the dusted off version of the kaleidoscope tutorial. — lattner / ViewSVN
  22. [test] [llvm-objcopy] Fix broken test case

    Summary: The test case added in D62718 did not work unless the user was root because write bits were not set for the output file. This change uses only permissions with user write (0200) to ensure tests pass regardless of the users permissions.

    Reviewers: jhenderson, rupprecht, MaskRay, espindola, alexshap

    Reviewed By: MaskRay

    Subscribers: emaste, arichardson, jakehehrlich, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64302 — abrachet / ViewSVN
  23. [NFC][PowerPC] Modify the test case add_cmp.ll — zhangkang / ViewSVN
  24. [libFuzzer] Set Android specific ALL_FUZZER_SUPPORTED_ARCH

    Build libFuzzer for all Android supported architectures. — kongyi / ViewSVN
  25. [DebugInfo] Generate fixups as emitting DWARF .debug_frame/.eh_frame.

    It is necessary to generate fixups in .debug_frame or .eh_frame as
    relaxation is enabled due to the address delta may be changed after
    relaxation.

    There is an opcode with 6-bits data in debug frame encoding. So, we
    also need 6-bits fixup types.

    Differential Revision: https://reviews.llvm.org/D58335 — hsiangkai / ViewSVN
  26. Use the MachineBasicBlock symbol for a callbr target

    Summary:
    Inline asm doesn't use labels when compiled as an object file. Therefore, we
    shouldn't create one for the (potential) callbr destination. Instead, use the
    symbol for the MachineBasicBlock.

    Reviewers: nickdesaulniers, craig.topper

    Reviewed By: nickdesaulniers

    Subscribers: xbolva00, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64888 — void / ViewSVN
  27. Fix formatting of inline argument comments. NFC.

    Also, remove the final arg from ItaniumCXXABI in the PNaCl case since
    its not needed.

    Differential Revision: https://reviews.llvm.org/D64955 — sbc / ViewSVN
  28. [GlobalISel] Translate calls to memcpy et al to G_INTRINSIC_W_SIDE_EFFECTs and legalize later.

    I plan on adding memcpy optimizations in the GlobalISel pipeline, but we can't
    do that unless we delay lowering to actual function calls. This patch changes
    the translator to generate G_INTRINSIC_W_SIDE_EFFECTS for these functions, and
    then have each target specify that using the new custom legalizer for intrinsics
    hook that they want it expanded it a libcall.

    Differential Revision: https://reviews.llvm.org/D64895 — aemerson / ViewSVN
  29. [cmake] Fix typo where a varible was checked for Apple instead of Darwin

    Subscribers: mgorny, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64965 — lanza / ViewSVN
  30. [cmake] Convert the NATIVE llvm build process to be project agnostic

    lldb recently added a tablegen tool. In order to properly cross compile
    lldb standalone there needs to be a mechanism to generate the native
    lldb build, analgous to what's done for the NATIVE llvm build. Thus,
    we can simply modify this setup to allow for any project to be used. — lanza / ViewSVN
  31. Reapply [llvm-lipo] Implement -create (with hardcoded alignments)

    This reapplies r366142 with a fix for the failing Windows test.

    Original commit message:

    Creates universal binary output file from input files. Currently uses
    hard coded value for alignment.  Want to get the create functionality
    approved before implementing the alignment function.

    Patch by Anusha Basana <anusha.basana@gmail.com>

    Differential Revision: https://reviews.llvm.org/D64102 — smeenai / ViewSVN
  32. Update the SimpleJIT class in the clang-interpreter example to use ORCv2.

    This will remove the ORCv1 deprecation warnings. — Lang Hames / ViewSVN
  33. [clang-scan-deps] Dependency directives source minimizer: handle #pragma once

    We should re-emit `#pragma once` to ensure the preprocessor will
    still honor it when running on minimized sources.

    Differential Revision: https://reviews.llvm.org/D64945 — arphaman / ViewSVN
  34. [AMDGPU] Drop Reg32 and use regular AsmName

    This allows to reduce generated AMDGPUGenAsmWriter.inc by ~100Kb.

    Differential Revision: https://reviews.llvm.org/D64952 — rampitec / ViewSVN
  35. [GlobalISel][AArch64] Add support for base register + offset register loads

    Add support for folding G_GEPs into loads of the form

    ```
    ldr reg, [base, off]
    ```

    when possible. This can save an add before the load. Currently, this is only
    supported for loads of 64 bits into 64 bit registers.

    Add a new addressing mode function, `selectAddrModeRegisterOffset` which
    performs this folding when it is profitable.

    Also add a test for addressing modes for G_LOAD.

    Differential Revision: https://reviews.llvm.org/D64944 — paquette / ViewSVN
  36. CodeGen: Allow !associated metadata to point to aliases.

    This is a small extension of !associated, mostly useful for the implementation
    convenience of instrumentation passes that RAUW globals with aliases, such
    as LowerTypeTests.

    Differential Revision: https://reviews.llvm.org/D64951 — pcc / ViewSVN
  37. Revert [X86] EltsFromConsecutiveLoads - support common source loads

    This reverts r366441 (git commit 48104ef7c9c653bbb732b66d7254957389fea337)

    This causes clang to fail to compile some file in Skia. Reduction soon. — rnk / ViewSVN
  38. [WebAssembly] Fix __builtin_wasm_tls_base intrinsic

    Summary:
    Properly generate the outchain for the `__builtin_wasm_tls_base` intrinsic.

    Also marked the intrinsic pure, per @sunfish's suggestion.

    Reviewers: tlively, aheejin, sbc100, sunfish

    Reviewed By: tlively

    Subscribers: dschuff, jgravelle-google, hiraditya, cfe-commits, llvm-commits, sunfish

    Tags: #clang, #llvm

    Differential Revision: https://reviews.llvm.org/D64949 — quantum / ViewSVN
  39. [cmake] Only run llvm-codesign if targetting apple on an apple host

    Summary:
    Other platforms don't have the capability to perform llvm_codesign
    step. If LLVM_CODESIGNING_IDENTITY is set then this chunk of code would
    attempt to codesign if the target was Apple. But when cross compiling
    to Darwin from Linux, for example, this step would fail. So test if the
    host is Apple as well.

    Subscribers: mgorny, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64942 — lanza / ViewSVN
  40. Fix typo in r366494. Spotted by Yuanfang Chen. — pcc / ViewSVN
  41. Remove the static initialize introduced in r365099

    Summary:
    Some polish for r365099 which adds a static initializer to
    MachOObjectFile. Remove it by moving it to file scope.

    Reviewers: smeenai, alexshap, compnerd, mtrent, anushabasana

    Reviewed By: smeenai

    Subscribers: hiraditya, jkorous, dexonsmith, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64873 — steven_wu / ViewSVN
  42. IR: Teach Constant::needsRelocation() that relative pointers don't need to be relocated.

    This causes sections with relative pointers to be marked as read only,
    which means that they won't end up sharing pages with writable data.

    Differential Revision: https://reviews.llvm.org/D64948 — pcc / ViewSVN
  43. [ASan] Support `{f}puts(NULL)` on Darwin, part 2

    Add braces around macro `{ MACRO(); }` to guard against macros that
    expand to multiple statements. — yln / ViewSVN
  44. gn build: Merge r366458. — pcc / ViewSVN
  45. FileSystem: Check for DTTOIF alone, not _DIRENT_HAVE_D_TYPE

    While 'd_type' is a non-standard extension to `struct dirent`, only
    glibc signals its presence with a macro '_DIRENT_HAVE_D_TYPE'.
    However, any platform with 'd_type' also includes a way to convert to
    mode_t values using the macro 'DTTOIF', so we can check for that alone
    and still be confident that the 'd_type' member exists.

    (If this turns out to be wrong, I'll go back and set up an actual
    CMake check.)

    I couldn't think of how to write a test for this, because I couldn't
    think of how to test that a 'stat' call doesn't happen without
    controlling the filesystem or intercepting 'stat', and there's no good
    cross-platform way to do that that I know of.

    Follow-up (almost a year later) to r342089.

    rdar://problem/50592673
    https://reviews.llvm.org/D64940 — jrose / ViewSVN
  46. [ORC] Suppress an ORCv1 deprecation warning. — Lang Hames / ViewSVN
  47. [libc++] Add C++17 deduction guides for std::function

    Summary: http://llvm.org/PR39606

    Reviewers: Quuxplusone

    Subscribers: christof, dexonsmith, libcxx-commits

    Differential Revision: https://reviews.llvm.org/D54410 — Louis Dionne / ViewSVN
  48. [OPENMP]Fix sharing of threadprivate variables with TLS support.

    If the threadprivate variable is used in the copyin clause on inner
    parallel directive with TLS support, we capture this variable in all
    outer OpenMP scopes. It leads to the fact that in all scopes we're
    working with the original variable, not the threadprivate copies. — abataev / ViewSVN
  49. [compiler-rt] Complete revert of r366413

    Incomplete revert. Mea culpa. This test is failing on sanitizer-x86_64-linux
    and our internal CI. — ormris / ViewSVN
  50. Fix C++ modules build

    llvm-svn: 366344 missed an include that broke the LLVM_ENABLE_MODULES
    build. — Raphael Isemann / ViewSVN
  51. [RISCV] Hard float ABI support

    The RISC-V hard float calling convention requires the frontend to:

    * Detect cases where, once "flattened", a struct can be passed using
    int+fp or fp+fp registers under the hard float ABI and coerce to the
    appropriate type(s)
    * Track usage of GPRs and FPRs in order to gate the above, and to
    determine when signext/zeroext attributes must be added to integer
    scalars

    This patch attempts to do this in compliance with the documented ABI,
    and uses ABIArgInfo::CoerceAndExpand in order to do this. @rjmccall, as
    author of that code I've tagged you as reviewer for initial feedback on
    my usage.

    Note that a previous version of the ABI indicated that when passing an
    int+fp struct using a GPR+FPR, the int would need to be sign or
    zero-extended appropriately. GCC never did this and the ABI was changed,
    which makes life easier as ABIArgInfo::CoerceAndExpand can't currently
    handle sign/zero-extension attributes.

    Re-landed after backing out 366450 due to missed hunks.

    Differential Revision: https://reviews.llvm.org/D60456 — asb / ViewSVN
  52. [COFF] Change a variable type to be const in the HeapAllocSite map. — akhuang / ViewSVN
  53. [FPEnv] Teach the IRBuilder about constrained FPTrunc and FPExt

    The IRBuilder doesn't know that FPTrunc and FPExt have constrained
    equivalents. Add the support by building on the strict FP mode now
    present in the IRBuilder.

    Reviewed by: John McCall
    Approved by: John McCall
    Differential Revision: https://reviews.llvm.org/D64934 — kpn / ViewSVN
  54. [WebAssembly] Implement __builtin_wasm_tls_base intrinsic

    Summary:
    Add `__builtin_wasm_tls_base` so that LeakSanitizer can find the thread-local
    block and scan through it for memory leaks.

    Reviewers: tlively, aheejin, sbc100

    Subscribers: dschuff, jgravelle-google, hiraditya, sunfish, cfe-commits, llvm-commits

    Tags: #clang, #llvm

    Differential Revision: https://reviews.llvm.org/D64900 — quantum / ViewSVN
  55. [OPENMP]Provide correct data sharing attributes for loop control
    variables.

    Loop control variables are private in loop-based constructs and we shall
    take this into account when generate the code for inner constructs.
    Currently, those variables are reported as shared in many cases. Moved
    the analysis of the data-sharing attributes of the loop control variable
    to an early semantic stage to correctly handle their attributes. — abataev / ViewSVN
  56. [LibTooling] Relax Transformer to allow rewriting macro expansions

    Summary:
    Currently, Transformer rejects any changes to source locations inside macro
    expansions. This change relaxes that constraint to allow rewrites when the
    entirety of the expansion is replaced, since that can be mapped to replacing the
    entirety of the expansion range in the file source.  This change makes
    Transformer consistent with the handling of edit ranges in `clang::edit::Commit`
    (which is used, for example, for applying `FixItHint`s from diagnostics).

    Reviewers: ilya-biryukov

    Subscribers: gribozavr, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64518 — ymandel / ViewSVN
  57. Revert "Fix asan infinite loop on undefined symbol"

    This reverts commit 63719119c78ca965b5d80e5c20fcfe81ba28f896.

    The tests in this commit were failing on a Linux sanitizer bot
    and our internal CI.

    http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/22401/steps/test%20standalone%20compiler-rt%20with%20symbolizer/logs/stdio — ormris / ViewSVN
  58. [LAA] Re-check bit-width of pointers after stripping.

    Summary:
    - As the pointer stripping now tracks through `addrspacecast`, prepare
      to handle the bit-width difference from the result pointer.

    Reviewers: jdoerfert

    Subscribers: jvesely, nhaehnle, hiraditya, arphaman, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64928 — hliao / ViewSVN
  59. [LibTooling] Add function to translate and validate source range for editing

    Summary:
    Adds the function `getRangeForEdit` to validate that a given source range is
    editable and, if needed, translate it into a range in the source file (for
    example, if it's sourced in macro expansions).

    Reviewers: ilya-biryukov

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64924 — ymandel / ViewSVN
  60. [clangd] Remove dead code from BackgroundIndex — kadircet / ViewSVN
  61. [clangd] BackgroundIndex stores shards to the closest project

    Summary:
    Changes persistance logic to store shards at the directory of closest
    CDB. Previously we were storing all shards to directory of the CDB that
    triggered indexing, it had its downsides.

    For example, if you had two TUs coming from a different CDB but depending on the
    same header foo.h, we will store the foo.h only for the first CDB, and it would
    be missing for the second and we would never persist it since it was actually
    present in the memory and persisted before.

    This patch still stores only a single copy of a shard, but makes the directory a
    function of the file name. So that the shard place will be unique even with
    multiple CDBs accessing the file. This directory is determined as the first
    directory containing a CDB in the file's parent directories, if no such
    directory exists we make use of the home directory.

    Reviewers: sammccall

    Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64745 — kadircet / ViewSVN
  62. [NFC][llvm-readobj] Refactor dynamic string table indexing into a function.

    Restore printDynamicString removed in rL363868. It provides better
    error handling whenever indexing dynamic string table is needed.

    Reviewers: jhenderson, MaskRay, grimar

    Reviewed by: jhenderson, MaskRay, grimar

    Differential Revision: https://reviews.llvm.org/D64674 — yuanfang / ViewSVN
  63. MC: AArch64: Add support for prel_g* relocation specifiers.

    Differential Revision: https://reviews.llvm.org/D64683 — pcc / ViewSVN
  64. AArch64: Unify relocation restrictions between MOVK/MOVN/MOVZ.

    There doesn't seem to be a practical reason for these instructions to have
    different restrictions on the types of relocations that they may be used
    with, notwithstanding the language in the ELF AArch64 spec that implies that
    specific relocations are meant to be used with specific instructions.

    For example, we currently forbid the first instruction in the following
    sequence, despite it currently being used by clang to generate a global
    reference under -mcmodel=large:

    movz x0, #:abs_g0_nc:foo
    movk x0, #:abs_g1_nc:foo
    movk x0, #:abs_g2_nc:foo
    movk x0, #:abs_g3:foo

    Therefore, allow MOVK/MOVN/MOVZ to accept the union of the set of relocations
    that they currently accept individually.

    Differential Revision: https://reviews.llvm.org/D64466 — pcc / ViewSVN
  65. [clangd] Refactor background-index shard loading

    Reviewers: sammccall

    Subscribers: mgorny, ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64712 — kadircet / ViewSVN
  66. [ASTUnit] Attempt to unbreak Windows buildbots after r366448 — ibiryukov / ViewSVN
  67. Minor styling fix. NFC. — hliao / ViewSVN
  68. [clangd] Get rid of dots and dotsdots within GlobalCompilationDatabase

    Reviewers: sammccall

    Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64860 — kadircet / ViewSVN
  69. Revert "[RISCV] Hard float ABI support" r366450

    The commit was missing a few hunks. Will fix and recommit. — asb / ViewSVN
  70. Revert r366449: [CrossTU] Add a function to retrieve original source location.

    Reason: the commit breaks layering by adding a dependency on ASTUnit
    (which is inside clangFrontend) from the ASTImporter (which is inside
    clangAST). — ibiryukov / ViewSVN
  71. [Clangd] NFC: Fixed tweaks CMakeLists order to alphabetical — sureyeaah / ViewSVN
  72. [Clangd] Changed ExtractVariable to only work on non empty selections

    Summary:
    - For now, we don't trigger in any case if it's an empty selection
    - Fixed unittests

    Reviewers: kadircet, sammccall

    Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64912 — sureyeaah / ViewSVN
  73. [RISCV] Hard float ABI support

    The RISC-V hard float calling convention requires the frontend to:

    * Detect cases where, once "flattened", a struct can be passed using
    int+fp or fp+fp registers under the hard float ABI and coerce to the
    appropriate type(s) * Track usage of GPRs and FPRs in order to gate the
    above, and to
    determine when signext/zeroext attributes must be added to integer
    scalars

    This patch attempts to do this in compliance with the documented ABI,
    and uses ABIArgInfo::CoerceAndExpand in order to do this. @rjmccall, as
    author of that code I've tagged you as reviewer for initial feedback on
    my usage.

    Note that a previous version of the ABI indicated that when passing an
    int+fp struct using a GPR+FPR, the int would need to be sign or
    zero-extended appropriately. GCC never did this and the ABI was changed,
    which makes life easier as ABIArgInfo::CoerceAndExpand can't currently
    handle sign/zero-extension attributes.

    Differential Revision: https://reviews.llvm.org/D60456 — asb / ViewSVN
  74. [CrossTU] Add a function to retrieve original source location.

    Summary:
    A new function will be added to get the original SourceLocation
    for a SourceLocation that was imported as result of getCrossTUDefinition.
    The returned SourceLocation is in the context of the (original)
    SourceManager for the original source file. Additionally the
    ASTUnit object for that source file is returned. This is needed
    to get a SourceManager to operate on with the returned source location.

    The new function works if multiple different source files are loaded
    with the same CrossTU context.

    This patch can be treated as part of a bigger change that is needed to
    improve macro expansion handliong at plist generation.

    Reviewers: martong, shafik, a_sidorin, xazax.hun

    Reviewed By: martong

    Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64554 — balazske / ViewSVN
  75. [ASTUnit] Fix a regression in cached completions

    Summary:
    After r345152 cached completions started adding namespaces after
    nested name specifiers, e.g. in `some_name::^`

    The CCC_Symbol indicates the completed item cannot be a namespace (it is
    described as being "a type, a function or a variable" in the comments).

    Therefore, 'nested specifier' completions should only be added from cache
    when the context is CCC_SymbolOrNewName (which roughly seems to indicate
    that a nested name specifier is allowed).

    Fixes https://bugs.llvm.org/show_bug.cgi?id=42646

    Reviewers: kadircet, sammccall

    Reviewed By: kadircet, sammccall

    Subscribers: arphaman, nik, sammccall, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64918 — ibiryukov / ViewSVN
  76. [CMake] Don't set Python_ADDITIONAL_VERSIONS

    Until recently, Python_ADDITIONAL_VERSIONS was used to limit LLVM's
    Python support to 2.7. Now that both LLVM and LLDB both support Python
    3, there's no longer a need to put an arbitrary limit on this.

    However, instead of removing the variable, r365692 expanded the list,
    which has the (presumably unintentional) side-effect of expression
    preference for Python 3.

    Instead, as Michal proposed in the original code review, we should just
    not set the list at all, and let CMake pick whatever Python interpreter
    you have in your path.

    This patch removes the Python_ADDITIONAL_VERSIONS variable in llvm,
    clang and lld. I've also updated the docs with the default behavior and
    how to force a different Python version to be used.

    Differential revision: https://reviews.llvm.org/D64894 — Jonas Devlieghere / ViewSVN
  77. [clangd] Suppress unwritten scopes when expanding auto.

    Summary: otherwise the replacement will break the code.

    Reviewers: sammccall

    Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64627 — hokein / ViewSVN
  78. Revert "[DebugInfo] Generate fixups as emitting DWARF .debug_frame/.eh_frame."

    This reverts commit 17e3cbf5fe656483d9016d0ba9e1d0cd8629379e. — hsiangkai / ViewSVN
  79. [clangd] Disable DumpRecordLayout by default per https://bugs.llvm.org/show_bug.cgi?id=42670 — sammccall / ViewSVN
  80. [DebugInfo] Generate fixups as emitting DWARF .debug_frame/.eh_frame.

    It is necessary to generate fixups in .debug_frame or .eh_frame as
    relaxation is enabled due to the address delta may be changed after
    relaxation.

    There is an opcode with 6-bits data in debug frame encoding. So, we
    also need 6-bits fixup types.

    Differential Revision: https://reviews.llvm.org/D58335 — hsiangkai / ViewSVN
  81. [X86] EltsFromConsecutiveLoads - support common source loads

    This patch enables us to find the source loads for each element, splitting them into a Load and ByteOffset, and attempts to recognise consecutive loads that are in fact from the same source load.

    A helper function, findEltLoadSrc, recurses to find a LoadSDNode and determines the element's byte offset within it. When attempting to match consecutive loads, byte offsetted loads then attempt to matched against a previous load that has already been confirmed to be a consecutive match.

    Next step towards PR16739 - after this we just need to account for shuffling/repeated elements to create a vector load + shuffle.

    Differential Revision: https://reviews.llvm.org/D64551 — rksimon / ViewSVN
  82. [analyzer] Add CTU user docs

    Reviewers: dkrupp, a_sidorin, Szelethus, NoQ

    Subscribers: whisperity, xazax.hun, baloghadamsoftware, szepet, rnkovacs, a.sidorin, mikhail.ramalho, donat.nagy, gamesh411, Charusso, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64801 — martong / ViewSVN
  83. [OPENMP][NVPTX]Mark barrier functions calls as convergent.

    Added convergent attribute to the barrier functions calls for correct
    optimizations. — abataev / ViewSVN
  84. Restrict asan + dlopen testcase to x86 — serge_sans_paille / ViewSVN
  85. [DAGCombine] Pull getSubVectorSrc helper out of narrowInsertExtractVectorBinOp. NFCI.

    NFC step towards reusing this in other EXTRACT_SUBVECTOR combines. — rksimon / ViewSVN
  86. [FileCheck] Fix numeric variable redefinition

    Summary:
    Commit r365249 changed usage of FileCheckNumericVariable to have one
    instance of that class per variable as opposed to one instance per
    definition of a given variable as was done before. However, it retained
    the safety check in setValue that it should only be called with the
    variable unset, even after r365625.

    However this causes assert failure when a non-pseudo variable is being
    redefined. And while redefinition of @LINE at each CHECK line work in
    the general case, it caused problem when a substitution failed (fixed in
    r365624) and still causes problem when a CHECK line does not match since
    @LINE's value is cleared after substitutions in match() happened but
    printSubstitutions also attempts a substitution.

    This commit solves the root of the problem by changing setValue to set a
    new value regardless of whether a value was set or not, thus fixing all
    the aforementioned issues.

    Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk

    Subscribers: hiraditya, llvm-commits, probinson, dblaikie, grimar, arichardson, tra, rnk, kristina, hfinkel, rogfer01, JonChesterfield

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64882 — thopre / ViewSVN
  87. Relax regexp to detect failed interception by asan

    This should fix failed detection on aarch64/ppc64/thumbv8... — serge_sans_paille / ViewSVN
  88. [x86] try harder to form LEA from ADD to avoid flag conflicts (PR40483)

    LEA doesn't affect flags, so use it more liberally to replace an ADD when
    we know that the ADD operands affect flags.

    In the motivating example from PR40483:
    https://bugs.llvm.org/show_bug.cgi?id=40483
    ...this lets us avoid duplicating a math op just to avoid flag conflict.

    As mentioned in the TODO comments, this heuristic can be extended to
    fire more often if that leads to more improvements.

    Differential Revision: https://reviews.llvm.org/D64707 — spatel / ViewSVN
  89. [llvm-readelf] - Remove the precompiled binary from gnu-hash-symbols.test

    I am working on https://bugs.llvm.org/show_bug.cgi?id=42622
    and this patch reworks the gnu-hash-symbols.test so that it
    will be easier to expand it with x86_64 case.

    Differential revision: https://reviews.llvm.org/D64750 — grimar / ViewSVN
  90. Revert r366422: [OpenCL] Improve destructor support in C++ for OpenCL

    Reason: this commit causes crashes in the clang compiler when building
    LLVM Support with libc++, see https://bugs.llvm.org/show_bug.cgi?id=42665
    for details. — ibiryukov / ViewSVN
  91. Bump the trunk version to 10.0.0svn

    and clear the release notes. — hans / ViewSVN
  92. [ARM][DAGCOMBINE][FIX] PerformVMOVRRDCombine

    Summary:
    PerformVMOVRRDCombine ommits adding a offset
    of 4 to the PointerInfo, when converting a
    f64 = load[M]
    to
    {i32, i32} = {load[M], load[M + 4]}

    Which would allow the machine scheduller
    to break dependencies with the second load.

    - pr42638

    Reviewers: eli.friedman, dmgreen, ostannard

    Reviewed By: ostannard

    Subscribers: ostannard, javed.absar, kristof.beyls, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64870 — dnsampaio / ViewSVN
  93. [OpenCL] Improve destructor support in C++ for OpenCL

    Summary:
    This patch does mainly three things:
    1. It fixes a false positive error detection in Sema that is similar to
        D62156. The error happens when explicitly calling an overloaded
        destructor for different address spaces.
    2. It selects the correct destructor when multiple overloads for
        address spaces are available.
    3. It inserts the expected address space cast when invoking a
        destructor, if needed, and therefore fixes a crash due to the unmet
        assertion in llvm::CastInst::Create.

    The following is a reproducer of the three issues:

        struct MyType {
          ~MyType() {}
          ~MyType() __constant {}
        };

        __constant MyType myGlobal{};

        kernel void foo() {
          myGlobal.~MyType(); // 1 and 2.
          // 1. error: cannot initialize object parameter of type
          //    '__generic MyType' with an expression of type '__constant MyType'
          // 2. error: no matching member function for call to '~MyType'
        }

        kernel void bar() {
          // 3. The implicit call to the destructor crashes due to:
          //    Assertion `castIsValid(op, S, Ty) && "Invalid cast!"' failed.
          //    in llvm::CastInst::Create.
          MyType myLocal;
        }

    The added test depends on D62413 and covers a few more things than the
    above reproducer.

    Subscribers: yaxunl, Anastasia, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64569 — mantognini / ViewSVN
  94. [OpenCL] Update comments/diagnostics to refer to C++ for OpenCL

    Clang doesn't implement OpenCL C++, change the comments to
    reflect that.

    Differential Revision: https://reviews.llvm.org/D64867 — stulova / ViewSVN
  95. [clangd] Added highlightings for template parameters and specializations.

    Summary: Template parameters and specializations were not being highlighted before. This adds highlightings to those types of tokens by adding two Visit* methods.

    Reviewers: hokein, sammccall, ilya-biryukov

    Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64855 — jvikstrom / ViewSVN
  96. [SCEV] add no wrap flag for SCEVAddExpr.
    Differential Revision: https://reviews.llvm.org/D64868 — shchenz / ViewSVN
  97. [OpenCL][PR42033] Fix addr space deduction with template parameters

    If dependent types appear in pointers or references we allow addr
    space deduction because the addr space in template argument will
    belong to the pointee and not the pointer or reference itself.

    We also don't diagnose addr space on a function return type after
    template instantiation. If any addr space for the return type was
    provided on a template parameter this will be diagnosed during the
    parsing of template definition.

    Differential Revision: https://reviews.llvm.org/D62584 — stulova / ViewSVN
  98. Fix asan infinite loop on undefined symbol

    Fix llvm#39641

    Differential Revision: https://reviews.llvm.org/D63877 — serge_sans_paille / ViewSVN
  99. [RISCV] Reset NoPHIS MachineFunctionProperty in emitSelectPseudo

    We insered PHIS were there were none before, so the property must be
    reset. This error was found on an EXPENSIVE_CHECKS build. — asb / ViewSVN
  100. [LoopInfo] Use early return in branch weight update functions. NFC. — skatkov / ViewSVN
  101. [RISCV][DebugInfo] Fix dwarf-riscv-relocs.ll test on Windows

    Windows sees DW_AT_decl_file (".\dwarf-riscv-relocs.c") while Linux sees
    DW_AT_decl_file ("./dwarf-riscv-relocs.c").

    This fixes a failure introduced in rL366402. — asb / ViewSVN
  102. [CodeComplete] Fix ASTUnit cached completion of macros from preamble, broken in r342528

    Summary:
    The problem is the default LoadExternal with no completer, which happens when
    loading global results.

    Reviewers: ilya-biryukov, nik

    Subscribers: arphaman, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64864 — sammccall / ViewSVN
  103. clang-tidy release notes: Split and order changes by type

    Patch by Eugene Zelenko! — hans / ViewSVN
  104. [NFC][PowerPC] Add the test to test the pass block-placement — zhangkang / ViewSVN
  105. [PowerPC][Clang] Remove use of malloc in mm_malloc

    Remove dependency of malloc in implementation of mm_malloc function in PowerPC
    intrinsics and alignment assumption on glibc.

    Reviewed By: Hal Finkel

    Differential Revision: https://reviews.llvm.org/D64850 — chaofan / ViewSVN
  106. [X86] Disable combineConcatVectors for vXi1 vectors.

    I'm not convinced the code this calls is properly vetted for
    vXi1 vectors. Experimental vector widening legalization testing
    for D55251 is now hitting an assertion failure inside
    EltsFromConsecutiveLoads. This is occurring from a v2i1 load
    having a store size different than its VT size. Hopefully
    this commit will keep such issues from happening. — ctopper / ViewSVN
  107. Fix typo in programmer's manual cantFile -> cantFail — lanza / ViewSVN
  108. [DWARF][RISCV] Add support for RISC-V relocations needed for debug info

    When code relaxation is enabled many RISC-V fixups are not resolved but
    instead relocations are emitted. This happens even for DWARF debug
    sections. Therefore, to properly support the parsing of DWARF debug info
    we need to be able to resolve RISC-V relocations. This patch adds:

    * Support for RISC-V relocations in RelocationResolver
    * DWARF support for two relocations per object file offset
    * DWARF changes to support relocations in more DIE fields

    The two relocations per offset change is needed because some RISC-V
    relocations (used for label differences) come in pairs.

    Relocations can also be emitted for DWARF fields where relocations were
    not yet evaluated. Adding relocation support for some of these fields is
    essencial. On the other hand, LLVM currently emits RISC-V relocations
    for fixups that could be safely evaluated, since they can never be
    affected by code relaxations. This patch also adds relocation support
    for the fields affected by those extraneous relocations (the DWARF unit
    entry Length, and the DWARF debug line entry TotalLength and
    PrologueLength), for testing purposes.

    Differential Revision: https://reviews.llvm.org/D62062
    Patch by Luís Marques. — asb / ViewSVN
  109. [clangd] Fix Fix -Wunused-lambda-capture after r366339 — maskray / ViewSVN
  110. [RISCV] Re-land r366331 d RISCV to LLVM_ALL_TARGETS

    *San flagged issues should be now be addressed. — asb / ViewSVN
  111. [RISCV] Avoid signed integer overflow UB in RISCVMatInt::generateInstSeq

    Found by UBSan. — asb / ViewSVN
  112. [RISCV] Don't acccess an invalidated iterator in RISCVInstrInfo::removeBranch

    Issue found by ASan. — asb / ViewSVN

#18453 (Jul 13, 2019 11:11:13 AM)

  1. [Attributor][Fix] Never override given argument numbers — jdoerfert / ViewSVN

#18452 (Jul 13, 2019 10:10:13 AM)

  1. [ARM] Add sign and zero extend patterns for MVE

    The vmovlb instructions can be uses to sign or zero extend vector registers
    between types. This adds some patterns for them and relevant testing. The
    VBICIMM generation is also put behind a hasNEON check (as is already done for
    VORRIMM).

    Code originally by David Sherwood.

    Differential Revision: https://reviews.llvm.org/D64069 — dmgreen / ViewSVN
  2. Template-related improvements to Visual Studio visualizers — mps / ViewSVN
  3. [ARM] MVE VNEG instruction patterns

    This selects integer VNEG instructions, which can be especially useful with shifts.

    Differential Revision: https://reviews.llvm.org/D64204 — dmgreen / ViewSVN
  4. [ARM] MVE integer abs

    Similar to floating point abs, we also have instructions for integers.

    Differential Revision: https://reviews.llvm.org/D64027 — dmgreen / ViewSVN
  5. [ARM] MVE integer min and max

    This simply makes the MVE integer min and max instructions legal and adds the
    relevant patterns for them.

    Differential Revision: https://reviews.llvm.org/D64026 — dmgreen / ViewSVN
  6. [ARM] MVE VRINT support

    This adds support for the floor/ceil/trunc/... series of instructions,
    converting to various forms of VRINT. They use the same suffixes as their
    floating point counterparts. There is not VTINTR, so nearbyint is expanded.

    Also added a copysign test, to show it is expanded.

    Differential Revision: https://reviews.llvm.org/D63985 — dmgreen / ViewSVN
  7. [ARM] MVE minnm and maxnm instructions

    This adds the patterns for minnm and maxnm from the fminnum and fmaxnum nodes,
    similar to scalar types.

    Original patch by Simon Tatham

    Differential Revision: https://reviews.llvm.org/D63870 — dmgreen / ViewSVN
  8. FileCheck [7/12]: Arbitrary long numeric expressions

    Summary:
    This patch is part of a patch series to add support for FileCheck
    numeric expressions. This specific patch extend numeric expression to
    support an arbitrary number of operands, either variable or literals.

    Copyright:
        - Linaro (changes up to diff 183612 of revision D55940)
        - GraphCore (changes in later versions of revision D55940 and
                     in new revision created off D55940)

    Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk

    Subscribers: hiraditya, llvm-commits, probinson, dblaikie, grimar, arichardson, tra, rnk, kristina, hfinkel, rogfer01, JonChesterfield

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D60387 — thopre / ViewSVN
  9. Revert "[InstCombine] add tests for umin/umax via usub.sat; NFC"

    This reverts commit rL365999 / 0f6148df23edcd3081f5e761de19edd4f823f16d.
    The tests already exist in this file, and the hoped-for transform
    (mentioned in D62871) is invalid because of undef as discussed in
    D63060. — spatel / ViewSVN

#18451 (Jul 13, 2019 8:11:50 AM)

  1. FileCheck [7/12]: Arbitrary long numeric expressions

    Summary:
    This patch is part of a patch series to add support for FileCheck
    numeric expressions. This specific patch extend numeric expression to
    support an arbitrary number of operands, either variable or literals.

    Copyright:
        - Linaro (changes up to diff 183612 of revision D55940)
        - GraphCore (changes in later versions of revision D55940 and
                     in new revision created off D55940)

    Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk

    Subscribers: hiraditya, llvm-commits, probinson, dblaikie, grimar, arichardson, tra, rnk, kristina, hfinkel, rogfer01, JonChesterfield

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D60387 — thopre / ViewSVN
  2. Revert "[InstCombine] add tests for umin/umax via usub.sat; NFC"

    This reverts commit rL365999 / 0f6148df23edcd3081f5e761de19edd4f823f16d.
    The tests already exist in this file, and the hoped-for transform
    (mentioned in D62871) is invalid because of undef as discussed in
    D63060. — spatel / ViewSVN

#18450 (Jul 13, 2019 7:15:38 AM)

  1. FileCheck [7/12]: Arbitrary long numeric expressions

    Summary:
    This patch is part of a patch series to add support for FileCheck
    numeric expressions. This specific patch extend numeric expression to
    support an arbitrary number of operands, either variable or literals.

    Copyright:
        - Linaro (changes up to diff 183612 of revision D55940)
        - GraphCore (changes in later versions of revision D55940 and
                     in new revision created off D55940)

    Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk

    Subscribers: hiraditya, llvm-commits, probinson, dblaikie, grimar, arichardson, tra, rnk, kristina, hfinkel, rogfer01, JonChesterfield

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D60387 — thopre / ViewSVN
  2. Revert "[InstCombine] add tests for umin/umax via usub.sat; NFC"

    This reverts commit rL365999 / 0f6148df23edcd3081f5e761de19edd4f823f16d.
    The tests already exist in this file, and the hoped-for transform
    (mentioned in D62871) is invalid because of undef as discussed in
    D63060. — spatel / ViewSVN
  3. [InstCombine] add tests for umin/umax via usub.sat; NFC — spatel / ViewSVN
  4. [x86] simplify cmov with same true/false operands — spatel / ViewSVN

#18449 (Jul 13, 2019 3:49:59 AM)

  1. [Object] isNotObjectErrorInvalidFileType: simplify — maskray / ViewSVN
  2. [Object] isNotObjectErrorInvalidFileType: fix use-after-move — maskray / ViewSVN
  3. Fix -Wdocumentation warning. NFCI. — rksimon / ViewSVN
  4. [CMake][Fuchsia] Define asan+noexcept multilib

    Using noexcept multilib with -fno-exceptions can lead to significant
    space savings when statically linking libc++abi because we don't need
    all the unwinding and demangling code.

    When compiling with ASan, we already get a lot of overhead from the
    instrumentation itself, when statically linking libc++abi, that overhead
    is even larger.

    Having the noexcept variant for ASan can help significantly, we've seen
    more than 50% size reduction in our system image, which offsets the cost
    of having to build another multilib.

    Differential Revision: https://reviews.llvm.org/D64140 — phosek / ViewSVN
  5. Simplify with llvm::is_contained. NFC — maskray / ViewSVN
  6. This reverts commit 632a36bfcfc8273c1861f04ff6758d863c47c784.

    Some targets such as Python 2.7.16 still use VERSION in
    their builds. Without VERSION defined, the source code
    has syntax errors.

    Reverting as it will probably break many other things.

    Noticed by Sterling Augustine — sylvestre / ViewSVN
  7. Initialize the non-trivial C union bits I added to RecordDeclBitfields
    in r365985

    These bits weren't being initialized in the RecordDecl's constructor,
    which probably caused test/Modules/stress1.cpp to fail on a couple of
    bots. — ahatanak / ViewSVN
  8. [clangd] Mark type hierarchy as a supported feature in the docs

    Reviewers: sammccall

    Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64614 — nridge / ViewSVN
  9. [clangd] Implement typeHierarchy/resolve for subtypes

    Summary:
    This allows the client to resolve subtypes one level at a time.

    For supertypes, this is not necessary, because we eagerly compute
    supertypes and return all levels.

    Reviewers: sammccall

    Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64308 — nridge / ViewSVN
  10. [Sema] Diagnose default-initialization, destruction, and copying of
    non-trivial C union types

    This patch diagnoses uses of non-trivial C unions and structs/unions
    containing non-trivial C unions in the following contexts, which require
    default-initialization, destruction, or copying of the union objects,
    instead of disallowing fields of non-trivial types in C unions, which is
    what we currently do:

    - function parameters.
    - function returns.
    - assignments.
    - compound literals.
    - block captures except capturing of `__block` variables by non-escaping
      blocks.
    - local and global variable definitions.
    - lvalue-to-rvalue conversions of volatile types.

    See the discussion in https://reviews.llvm.org/D62988 for more background.

    rdar://problem/50679094

    Differential Revision: https://reviews.llvm.org/D63753 — ahatanak / ViewSVN

#18444 (Jul 12, 2019 6:54:24 PM)

  1. [Attributor][NFC] Run clang-format on the attributor files (.h/.cpp)

    The Attributor files are kept formatted with clang-format, we should try
    to keep this state. — jdoerfert / ViewSVN
  2. [Attributor] Only return attributes with a valid state

    Attributor::getAAFor will now only return AbstractAttributes with a
    valid AbstractState. This simplifies call sites as they only need to
    check if the returned pointer is non-null. It also reduces the potential
    for accidental misuse. — jdoerfert / ViewSVN
  3. [TSan] Tiny cleanup of UnmangleLongJmpSp for Linux/x86_64

    NFC. — yln / ViewSVN
  4. clang/test/Driver/fsanitize.c: Fix -fsanitize=vptr using default target

    The default implementation of getSupportedSanitizers isn't able to turn
    on the vptr sanitizer, and thus, any platform that runs this test will
    fail with the error:

        clang: error: unsupported option '-fsanitize=vptr' for target '<target>'

    Patch by James Nagurne! — maskray / ViewSVN
  5. Extend function attributes bitset size from 64 to 96.

    Summary: We are going to add a function attribute number 64.

    Reviewers: pcc, jdoerfert, lebedev.ri

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64663 — eugenis / ViewSVN
  6. [Attributor][FIX] Lookup of (call site) argument attributes — jdoerfert / ViewSVN
  7. [DirectoryWatcher][test][NFC] Add information to test failure reports — Jan Korous / ViewSVN
  8. Re-land [JSONCompilationDatabase] Strip distcc/ccache/gomacc wrappers from parsed commands.

    Use //net/dir like other test cases for windows compatibility — sammccall / ViewSVN
  9. PDB HashTable: Move TraitsT from class parameter to the methods that need it

    The traits object is only used by a few methods. Deserializing a hash
    table and walking it is possible without the traits object, so it
    shouldn't be required to build a dummy object for that use case.

    The TraitsT object used to be a function template parameter before
    r327647, this restores it to that state.

    This makes it clear that the traits object isn't needed at all in 1 of
    the current 3 uses of HashTable (and I am going to add another use that
    doesn't need it), and that the default PdbHashTraits isn't used outside
    of tests.

    While here, also re-enable 3 checks in the test that were commented out
    (which requires making HashTableInternals templated and giving FooBar
    an operator==).

    No intended behavior change.

    Differential Revision: https://reviews.llvm.org/D64640 — nico / ViewSVN
  10. Fix non-conformance it `std::tuple`.

    Previously we implemented all one trillion tuple-like constructors using
    a single generic overload. This worked fairly well, except that it
    differed in behavior from the standard version because it didn't
    consider both T&& and T const&. This was observable for certain
    types.

    This patch addresses that issue by splitting the generic constructor
    in two. We now provide both T&& and T const& versions of the
    tuple-like constructors (sort of). — ericwf / ViewSVN

#18443 (Jul 12, 2019 5:57:02 PM)

  1. [AMDGPU] use v32f32 for 3 mfma intrinsics

    These should really use v32f32, but were defined as v32i32
    due to the lack of the v32f32 type.

    Differential Revision: https://reviews.llvm.org/D64667 — rampitec / ViewSVN
  2. isBytewiseValue checks ConstantVector element by element

    Summary: Vector of the same value with few undefs will sill be considered "Bytewise"

    Reviewers: eugenis, pcc, jfb

    Reviewed By: jfb

    Subscribers: dexonsmith, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64031 — Vitaly Buka / ViewSVN
  3. [MemorySSA] Use SetVector to avoid nondeterminism.

    Summary:
    Use a SetVector for DeadBlockSet.
    Resolves PR42574.

    Reviewers: george.burgess.iv, uabelho, dblaikie

    Subscribers: jlebar, Prazek, mgrang, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64601 — asbirlea / ViewSVN
  4. NFC: utils/perf-training: Python 3 compatibility for lit.cfg

    The output of subprocess.check_output is now bytes. We need to decode it. — arphaman / ViewSVN
  5. [DirectoryWatcher][NFC] Silence warnings in release build — Jan Korous / ViewSVN
  6. [clang-doc] Fix failing tests on Windows

    Tests on Windows were failing due to path separator differences.
    '/' was being used as separator in the expected output, paths in expected
    output are now changed to their native form before comparing them to the
    actual output.

    Committed on behalf of Diego Astiazarán (diegoaat97@gmail.com).

    Differential Revision: https://reviews.llvm.org/D64669 — juliehockett / ViewSVN
  7. [DirectoryWatcher][linux] Fix use of uninitialized value — Jan Korous / ViewSVN
  8. [WebAssembly] refactored utilities to not depend on MachineInstr

    Summary:
    Most of these functions can work for MachineInstr and MCInst
    equally now.

    Reviewers: dschuff

    Subscribers: MatzeB, sbc100, jgravelle-google, aheejin, sunfish, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64643 — aardappel / ViewSVN
  9. [macCatalyst] Use macCatalyst pretty name in .build_version darwin
    assembly command

    'macCatalyst' is more readable than 'maccatalyst'. I renamed the objdump output,
    but the assembly should match it as well. — arphaman / ViewSVN
  10. Remove __VERSION__

    Summary:
    It has been introduced in 2011 for gcc compat:
    https://github.com/llvm-mirror/clang/commit/ad1a4c6e89594e704775ddb6b036ac982fd68cad
    it is probably time to remove it


    Reviewers: rnk, dexonsmith

    Reviewed By: rnk

    Subscribers: dschuff, aheejin, fedor.sergeev, arphaman, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64062 — sylvestre / ViewSVN

#18442 (Jul 12, 2019 3:59:54 PM)

  1. [test][AArch64] Relax the opcode tests for FP min/max instructions. — dyung / ViewSVN
  2. Add option to disable variant narrowing conversion changes.

    The paper P0608R3 - "A sane variant converting constructor" disallows
    narrowing conversions in variant. It was meant to address this
    surprising problem:

      std::variant<std::string, bool> v = "abc";
      assert(v.index() == 1); // constructs a bool.

    However, it also disables every potentially narrowing conversion. For
    example:

      variant<unsigned> v = 0; // ill-formed
      variant<string, double> v2 = 42; // ill-formed (int -> double narrows)

    These latter changes break code. A lot of code. Within Google it broke
    on the order of a hundred thousand target with thousands of root causes
    responsible for the breakages.

    Of the breakages related to the narrowing restrictions, none of them
    exposed outstanding bugs. However, the breakages caused by boolean
    conversions (~13 root causes), all but one of them were bugs.

    For this reasons, I am adding a flag to disable the narrowing conversion
    changes but not the boolean conversions one.

    One purpose of this flag is to allow users to opt-out of breaking changes
    in variant until the offending code can be cleaned up. For non-trivial
    variant usages the amount of cleanup may be significant.

    This flag is also required to support automated tooling, such as
    clang-tidy, that can automatically fix code broken by this change.
    In order for clang-tidy to know the correct alternative to construct,
    it must know what alternative was being constructed previously, which
    means running it over the old version of std::variant.

    Because this change breaks so much code, I will be implementing the
    aforementioned clang-tidy check in the very near future.

    Additionally I'm plan present this new information to the committee so they can
    re-consider if this is a breaking change we want to make.

    I think libc++ should very seriously consider pulling this change
    before the 9.0 release branch is cut. But that's a separate discussion
    that I will start on the lists.

    For now this is the minimal first step. — ericwf / ViewSVN
  3. [InstCombine] Disable fold from D64285 for non-integer types — xbolva00 / ViewSVN
  4. Factor out resolveFrameOffsetReference (NFC).

    Split AArch64FrameLowering::resolveFrameIndexReference in two parts
    * Finding frame offset for the index.
    * Finding base register and offset to that register.

    The second part will be used to implement a virtual frame pointer in
    armv8.5 MTE stack instrumentation lowering.

    Reviewers: pcc, vitalybuka, hctim, ostannard

    Subscribers: javed.absar, kristof.beyls, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64171 — eugenis / ViewSVN
  5. [builtins] Fix assembly in arm sync-ops.h

    This assembly is part of a macro that was reformatted in D60351.
    The missing space between push and { results in:

        Error: bad instruction `push{r4, r5,r6,lr}' — nikic / ViewSVN
  6. Revert driver: Don't warn about assembler flags being unused when not assembling

    This reverts r365703 (git commit 101c1afdfd1c88f05da94c6fd317b489bb704f40)
    and r365714.

    This broke some autoconf-style assembler flags checks in the Linux
    build:
    https://github.com/ClangBuiltLinux/linux/issues/598 — rnk / ViewSVN
  7. [clangd] Fix off-by-one in CodeComplete and assertion in Dex — sammccall / ViewSVN
  8. Reland [clang] DirectoryWatcher

    This reverts commit f561227d133224d2d6a5a016abe4be051fa75501.

    - DirectoryWatcher
    - Fix the build for platforms that don't have DW implementated.
    - Fix the threading dependencies (thanks to compnerd). — Jan Korous / ViewSVN

#18441 (Jul 12, 2019 2:58:12 PM)

  1. AMDGPU: Drop remnants of byval support for shaders

    Before 2018, mesa used to use byval interchangably with inreg, which
    didn't really make sense. Fix tests still using it to avoid breaking
    in a future commit. — arsenm / ViewSVN
  2. Fix missing use of defined() in include guard

    Subscribers: arsenm, jvesely, nhaehnle, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64657 — daltenty / ViewSVN
  3. [SystemZ] Fix addcarry of addcarry of const carry (PR42606)

    This fixes https://bugs.llvm.org/show_bug.cgi?id=42606 by extending
    D64213. Instead of only checking if the carry comes from a matching
    operation, we now check the full chain of carries. Otherwise we might
    custom lower the outermost addcarry, but then generically legalize
    an inner addcarry.

    Differential Revision: https://reviews.llvm.org/D64658 — nikic / ViewSVN
  4. Revert "Reland [clang] DirectoryWatcher"

    This reverts commit fdcb7f47e783933e0af8a5fae91132269a208268. — Jan Korous / ViewSVN
  5. Reland [clang] DirectoryWatcher

    This reverts commit abce8c457dd3de6b156756e547cc0eefb7653c79.

    + Fix the build for platforms that don't have DW implementated. — Jan Korous / ViewSVN
  6. [X86] Use MachineInstr::findRegisterDefOperand to simplify some code in optimizeCompareInstr. NFCI — ctopper / ViewSVN
  7. [DebugInfo] Add column info for inline sites

    The column field is missing for all inline sites, currently it's always
    zero. This changes populates DW_AT_call_column field for inline sites.
    Test case modified to cover this change.

    Patch by: Wenlei He

    Differential revision: https://reviews.llvm.org/D64033 — Jonas Devlieghere / ViewSVN
  8. The variable "Latch" is only used in an assert, which makes builds that use "-DNDEBUG" fail with unused variable messages.

    Summary: Move the logic into the assert itself.

    Subscribers: hiraditya, sanjoy, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64654 — saugustine / ViewSVN
  9. [SystemZ] Fix build bot failure after r365932

    Insert LLVM_FALLTHROUGH to avoid compiler warning. — uweigand / ViewSVN
  10. [x86] add test for bogus cmov (PR40483); NFC — spatel / ViewSVN
  11. [AMDGPU] Extend MIMG opcode to 8 bits

    This is NFC, but required for future commit.

    Differential Revision: https://reviews.llvm.org/D64649 — rampitec / ViewSVN
  12. Addition to rL365925, removing remaining virtuals — sstefan / ViewSVN
  13. [clang-doc] Add html links to references

    <a> tags are added for the parents and members of records and return type and
    params of functions. The link redirects to the reference's info file.

    The directory path where each info file will be saved is now generated in the
    serialization phase and stored as an attribute in each Info.

    Bitcode writer and reader were modified to handle the new attributes.

    Committed on behalf of Diego Astiazarán (diegoaat97@gmail.com).

    Differential Revision: https://reviews.llvm.org/D63663 — juliehockett / ViewSVN
  14. Slightly simplify MappedBlockStream::createIndexedStream() calls

    All callers had a PDBFile object at hand, so call
    Pdb.createIndexedStream() instead, which pre-populates all the arguments
    (and returns nullptr for kInvalidStreamIndex).

    Also change safelyCreateIndexedStream() to only take the string index,
    and update callers. Make the method public and call it in two places
    that manually did the bounds checking before.

    No intended behavior change.

    Differential Revision: https://reviews.llvm.org/D64633 — nico / ViewSVN
  15. [WebAssembly] Make pthread imply bulk-memory, mutable-globals

    Summary:
    This paves the way for using passive segments in pthread builds, which
    will make separate memory files unnecessary. Mutable globals are also
    necessary for the upcoming implementation of TLS.

    Reviewers: aheejin, dschuff

    Subscribers: sbc100, jgravelle-google, sunfish, jfb, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64586 — tlively / ViewSVN
  16. Add explicit newline at end of `llvm-pdbutil dump`

    All dump modes I checked didn't print a trailing newline, so add one. — nico / ViewSVN
  17. [SystemZ] Add support for new cpu architecture - arch13

    This patch series adds support for the next-generation arch13
    CPU architecture to the SystemZ backend.

    This includes:
    - Basic support for the new processor and its features.
    - Support for low-level builtins mapped to new LLVM intrinsics.
    - New high-level intrinsics in vecintrin.h.
    - Indicate support by defining  __VEC__ == 10303.

    Note: No currently available Z system supports the arch13
    architecture.  Once new systems become available, the
    official system name will be added as supported -march name. — uweigand / ViewSVN
  18. [SystemZ] Add support for new cpu architecture - arch13

    This patch series adds support for the next-generation arch13
    CPU architecture to the SystemZ backend.

    This includes:
    - Basic support for the new processor and its features.
    - Assembler/disassembler support for new instructions.
    - CodeGen for new instructions, including new LLVM intrinsics.
    - Scheduler description for the new processor.
    - Detection of arch13 as host processor.

    Note: No currently available Z system supports the arch13
    architecture.  Once new systems become available, the
    official system name will be added as supported -march name. — uweigand / ViewSVN
  19. Remove unused methods in Sancov. — leonardchan / ViewSVN
  20. [X86] Add NEG to isUseDefConvertible.

    We can use the C flag from NEG to detect that the input was zero.

    Really we could probably use the Z flag too. But C matches what
    we'd do for usubo 0, X.

    Haven't found a test case for this due to the usubo formation
    in CGP. But I verified if I comment out the CGP code this
    transformation catches some of the same cases. — ctopper / ViewSVN
  21. [X86][AVX] Add PR34359 shuffle test case. — rksimon / ViewSVN
  22. [Attributor] Removing unnecessary `virtual` keywords.

    Some function in the Attributor framework are unnecessarily
    marked virtual. This patch removes virtual keyword

    Reviewers: jdoerfert

    Subscribers: hiraditya, llvm-commits

    Differential Revision: https://reviews.llvm.org/D64637 — sstefan / ViewSVN
  23. [Attributor] Deduce "nofree" function attribute

    Summary: Deduce "nofree" function attribute. A more concise description of "nofree" is on D49165.

    Reviewers: jdoerfert

    Reviewed By: jdoerfert

    Subscribers: homerdin, hfinkel, lebedev.ri, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D62687 — uenoku / ViewSVN
  24. [libc++] Add XFAILs for CTAD tests on older compilers — Louis Dionne / ViewSVN
  25. Revert [clang-shlib] Fix clang-shlib for PRIVATE dependencies

    This reverts r365825 (git commit 3173c60f96c3ccfc17d403a192ae58e720153c23)

    This is breaking BUILD_SHARED_LIBS=ON builds. Reverting while I rethink it. — smeenai / ViewSVN
  26. CodeGet: Init 32bit pointers with 0xFFFFFFFF

    Summary:
    Patch makes D63967 effective for 32bit platforms and improves pattern
    initialization there. It cuts size of 32bit binary compiled with
    -ftrivial-auto-var-init=pattern by 2% (3% with -Os).

    Binary size change on CTMark, (with -fuse-ld=lld -Wl,--icf=all, similar results with default linker options)
    ```
                       master           patch      diff
    Os pattern   7.915580e+05    7.698424e+05 -0.028387
    O3 pattern   9.953688e+05    9.752952e+05 -0.019325
    ```

    Zero vs Pattern on master
    ```
                   zero       pattern      diff
    Os     7.689712e+05  7.915580e+05  0.031380
    O3     9.744796e+05  9.953688e+05  0.021133
    ```

    Zero vs Pattern with the patch
    ```
                   zero       pattern      diff
    Os     7.689712e+05  7.698424e+05  0.000789
    O3     9.744796e+05  9.752952e+05  0.000742
    ```

    Reviewers: pcc, eugenis, glider, jfb

    Reviewed By: jfb

    Subscribers: hubert.reinterpretcast, dexonsmith, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64597 — Vitaly Buka / ViewSVN
  27. [IndVars] Use exit count reasoning to discharge obviously untaken exits

    Continue in the spirit of D63618, and use exit count reasoning to prove away loop exits which can not be taken since the backedge taken count of the loop as a whole is provably less than the minimal BE count required to take this particular loop exit.

    As demonstrated in the newly added tests, this triggers in a number of cases where IndVars was previously unable to discharge obviously redundant exit tests. And some not so obvious ones.

    Differential Revision: https://reviews.llvm.org/D63733 — reames / ViewSVN
  28. Dump actual line numbers when dumping the AST to JSON.

    The "line" attribute is now the physical line within the source file for the location. A "presumedLine" attribute is printed when the presumed line number does not match the given source line number. We continue to not print repeated line information in subsequent source locations, but we track presumed and actual lines separately. — aaronballman / ViewSVN
  29. Fix some minor coding-style issues in git-llvm. — jyknight / ViewSVN
  30. Allow the 'git-llvm' tool to push to svn from the split repositories
    for 'test-suite', 'lnt', 'zorg', and 'www'.

    This is done by looking at the pathname of the git remote named
    'origin', which is not 100% reliable, but should work in most cases. — jyknight / ViewSVN
  31. [FunctionAttrs] Add a test for "nofree" function attribute

    This patch adds a test for nofree function attribute. — uenoku / ViewSVN
  32. [Support] Move the static initializer install_out_memory_new_handler to InitLLVM

    An application linking against LLVMSupport should not get the gratuitous
    set::std_new_handler call.

    Reviewed By: jfb

    Differential Revision: https://reviews.llvm.org/D64505 — maskray / ViewSVN
  33. Add missing <atomic> include to appease MSVC builds. — rksimon / ViewSVN
  34. Minor cleanup.

    Simplify things a bit by removing unnecessary full type qualification.
    This also happens to avoid a build break with now-unsupported
    Visual Studio 2015.

    Differential Review: https://reviews.llvm.org/D64588 — tra / ViewSVN
  35. Test commit — uenoku / ViewSVN
  36. Support for dumping current PrettyStackTrace on SIGINFO (Ctrl-T)

    Support SIGINFO (and SIGUSR1 for POSIX purposes) to tell what
    long-running jobs are doing, as inspired by BSD tools (including on
    macOS), by dumping the current PrettyStackTrace.

    This adds a new kind of signal handler for non-fatal "info" signals,
    similar to the "interrupt" handler that already exists for SIGINT
    (Ctrl-C). It then uses that handler to update a "generation count"
    managed by the PrettyStackTrace infrastructure, which is then checked
    whenever a PrettyStackTraceEntry is pushed or popped on each
    thread. If the generation has changed---i.e. if the user has pressed
    Ctrl-T---the stack trace is dumped, though unfortunately it can't
    include the deepest entry because that one is currently being
    constructed/destructed.

    https://reviews.llvm.org/D63750 — jrose / ViewSVN
  37. [AMDGPU] Fix DPP combiner check for exec modification

    Summary:
    r363675 changed the exec modification helper function, now called
    execMayBeModifiedBeforeUse, so that if no UseMI is specified it checks
    all instructions in the basic block, even beyond the last use. That
    meant that the DPP combiner no longer worked in any basic block that
    ended with a control flow instruction, and in particular it didn't work
    on code sequences generated by the atomic optimizer.

    Fix it by reinstating the old behaviour but in a new helper function
    execMayBeModifiedBeforeAnyUse, and limiting the number of instructions
    scanned.

    Reviewers: arsenm, vpykhtin

    Subscribers: kzhuravl, nemanjai, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, kbarton, MaskRay, jfb, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64393 — foad / ViewSVN
  38. [clang-format][tests] Explicitly specify style in some tests

    Summary: This fixes broken tests when doing an out-of-source build that picks up a random .clang-format on the file system due to the default "file" style.

    Reviewers: djasper, klimek, MyDeveloperDay, krasimir

    Reviewed By: MyDeveloperDay

    Subscribers: lebedev.ri, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D61001 — r.stahl / ViewSVN

#18439 (Jul 12, 2019 8:52:43 AM)

  1. cmake: Add INSTALL_WITH_TOOLCHAIN option to add_*_library macros

    Summary:
    This will simplify the macros by allowing us to remove the hard-coded
    list of libraries that should be installed when
    LLVM_INSTALL_TOOLCHAIN_ONLY is enabled.

    Reviewers: beanz, smeenai

    Reviewed By: beanz

    Subscribers: aheejin, mehdi_amini, mgorny, steven_wu, dexonsmith, cfe-commits, llvm-commits

    Tags: #clang, #llvm

    Differential Revision: https://reviews.llvm.org/D64580 — tstellar / ViewSVN
  2. Delete dead stores — maskray / ViewSVN
  3. Dump floating-point values as strings when dumping to JSON.

    This fixes a bug where we would have an invalid JSON attribute (e.g., "value": inf). It also increases the precision of the values because they're not represented as approximate doubles with the host architecture's floating-point model. — aaronballman / ViewSVN
  4. Revert "[clangd] Implement typeHierarchy/resolve for subtypes"

    Causing test failure on Windows bot

    This reverts commit 5b9484e559d44bd923fc290e335891b1dd2e17c4. — russell_gallop / ViewSVN
  5. [Driver] Delete dead code — maskray / ViewSVN
  6. [gn] Tag unneeded variable.

    When only building targets without assembly parsers (e.g. `llvm_targets_to_build
    = ["NVPTX"]`), `all_targets` is empty and causes GN to warn about an
    assigned-but-unused variable.

    Differential Revision: https://reviews.llvm.org/D31727 — bryant / ViewSVN
  7. [DAGCombine] narrowExtractedVectorBinOp - wrap subvector extraction in helper. NFCI.

    First step towards supporting 'free' subvector extractions other than concat_vectors. — rksimon / ViewSVN
  8. [LIT] Emit timeout error message only if timeout was reached

    Summary:
    This improves readability of LIT output: previously
    error messages gets emitted that say that there was no error:

    error: command reached timeout: False

    Patch by Alexey Sachkov.

    Reviewers: ddunbar, mgorny, modocache

    Reviewed By: mgorny

    Subscribers: delcypher, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64240 — bader / ViewSVN
  9. [clangd] Fixed toHalfOpenFileRange

    Summary:
    - Fixed toHalfOpenFileRange to work for macros as well as template
    instantiations
    - Added unit tests

    Breaking test case for older version of toHalfOpenFileRange:
    \# define FOO(X) X++
    int a = 1;
    int b = FOO(a);
    toHalfOpenFileRange for the sourceRange of VarDecl for b returned the
    wrong Range.

    Reviewers: sammccall, kadircet

    Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64562 — sureyeaah / ViewSVN
  10. [InstCombine] Fold select (icmp sgt x, -1), lshr (X, Y), ashr (X, Y) to ashr (X, Y))

    Summary:
    (select (icmp sgt x, -1), lshr (X, Y), ashr (X, Y)) -> ashr (X, Y))
    (select (icmp slt x, 1), ashr (X, Y), lshr (X, Y)) -> ashr (X, Y))

    Fixes PR41173

    Alive proof by @lebedev.ri (thanks)
    Name: PR41173
      %cmp = icmp slt i32 %x, 1
      %shr = lshr i32 %x, %y
      %shr1 = ashr i32 %x, %y
      %retval.0 = select i1 %cmp, i32 %shr1, i32 %shr
      =>
      %retval.0 = ashr i32 %x, %y

    Optimization: PR41173
    Done: 1
    Optimization is correct!

    Reviewers: lebedev.ri, spatel

    Reviewed By: lebedev.ri

    Subscribers: nikic, craig.topper, llvm-commits, lebedev.ri

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64285 — xbolva00 / ViewSVN
  11. Fix test case of llvm-nm using implicit a.out — abrachet / ViewSVN
  12. [test/Object, obj2yaml] - Move test cases from test/Object and cleanup.

    test/Object is not correct place to have tests that check obj2yaml
    functionality, because we have test/tools/obj2yaml folder for that.

    In this patch I merged a few test cases with their YAMLs from Inputs
    folder, converted one of binary inputs and moved them to
    tools/obj2yaml folder.

    There are still another tests that might need the same, so it is initial step.

    Differential revision: https://reviews.llvm.org/D64555 — grimar / ViewSVN
  13. [tools] [llvm-nm] Default to reading from stdin not a.out

    Summary: This moves away from defaulting to a.out and uses stdin only if stdin has a file redirected to it. This has been discussed on the llvm-dev mailing list [[ https://lists.llvm.org/pipermail/llvm-dev/2019-July/133642.html | here ]].

    Reviewers: jhenderson, rupprecht, MaskRay, chrisjackson

    Reviewed By: jhenderson, MaskRay

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64290 — abrachet / ViewSVN
  14. [clangd] Prioritize indexing of files that share a basename with the open file.

    Summary:
    In practice, opening Foo.h will still often result in Foo.cpp making the
    second index build instead of the first, as the rebuild policy doesn't
    know to wait.

    Reviewers: kadircet

    Subscribers: ilya-biryukov, javed.absar, MaskRay, jkorous, arphaman, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64575 — sammccall / ViewSVN
  15. [JSONCompilationDatabase] Strip distcc/ccache/gomacc wrappers from parsed commands.

    Summary:
    It's common to use compiler wrappers by setting CC="gomacc clang++".
    This results in both args appearing in compile_commands.json, and clang's driver
    can't handle this.

    This patch attempts to recognize this pattern (by looking for well-known
    wrappers) and dropping argv0 in this case.

    It conservatively ignores other cases for now:
    - wrappers with unknown names
    - wrappers that accept -flags
    - wrappers where the compiler to use is implied (usually cc or gcc)

    This is done at the JSONCompilationDatabase level rather than somewhere more
    fundamental, as (hopefully) this isn't a general conceptual problem, but a messy
    aspect of the nature of the ecosystem around compile_commands.json.
    i.e. compilation databases more tightly tied to the build system should not have
    this problem.

    Reviewers: phosek, klimek

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64297 — sammccall / ViewSVN

#18438 (Jul 12, 2019 4:00:55 AM)

  1. Revert "[DwarfDebug] Dump call site debug info"

    A build failure was found on the SystemZ platform.

    This reverts commit 9e7e73578e54cd22b3c7af4b54274d743b6607cc. — djtodoro / ViewSVN
  2. [clangd] Move the expandAuto tweak from global namespace into annoymous namespace. — hokein / ViewSVN
  3. [Object/ELF] - Improve error reporting for notes.

    This patch improves the error messages reported for
    note sections and phdrs and also makes a cleanup for
    existent test case.

    Differential revision: https://reviews.llvm.org/D64470 — grimar / ViewSVN
  4. [NFC][PowerPC] Added test for MachinePRE. — lkail / ViewSVN
  5. [clangd] Don't run the prepare for tweaks that are disabled.

    Summary: Previously, we ran the prepare, even for the tweaks that are disabled.

    Reviewers: sammccall

    Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64565 — hokein / ViewSVN
  6. [RISCV] Allow parsing dot '.' in assembly

    Summary:
    Useful for jumps, such as `j .`.

    I am not sure who should review this. Do not hesitate to change the reviewers if needed.

    Reviewers: asb, jrtc27, lenary

    Reviewed By: lenary

    Subscribers: MaskRay, lenary, hiraditya, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63669

    Patch by John LLVM (JohnLLVM) — lenary / ViewSVN
  7. Enable compiler-rt on SPARC

    This patch enables compiler-rt on SPARC targets. Most of the changes are straightforward:

    - Add 32 and 64-bit sparc to compiler-rt

    - lib/builtins/fp_lib.h needed to check if the int128_t and uint128_t types exist (which they don't on sparc)

    There's one issue of note: many asan tests fail to compile on Solaris/SPARC:

    fatal error: error in backend: Function "_ZN7testing8internal16BoolFromGTestEnvEPKcb": over-aligned dynamic alloca not supported.

    Therefore, while asan is still built, both asan and ubsan-with-asan testing is disabled. The
    goal is to check if asan keeps compiling on Solaris/SPARC. This serves asan in gcc,
    which doesn't have the problem above and works just fine.

    With this patch, sparcv9-sun-solaris2.11 test results are pretty good:

    Failing Tests (9):
        Builtins-sparc-sunos :: divtc3_test.c
        Builtins-sparcv9-sunos :: compiler_rt_logbl_test.c
        Builtins-sparcv9-sunos :: divtc3_test.c
    [...]
        UBSan-Standalone-sparc :: TestCases/TypeCheck/misaligned.cpp
        UBSan-Standalone-sparcv9 :: TestCases/TypeCheck/misaligned.cpp

    The builtin failures are due to Bugs 42493 and 42496. The tree contained a few additonal
    patches either currently in review or about to be submitted.

    Tested on sparcv9-sun-solaris2.11.

    Differential Revision: https://reviews.llvm.org/D40943 — ro / ViewSVN
  8. [Sanitizers] Fix SanitizerCommon-Unit :: ./Sanitizer-*-Test/MemoryMappingLayout.DumpListOfModules on Solaris

    The MemoryMappingLayout.DumpListOfModules currently FAILs on Solaris:

      [ RUN      ] MemoryMappingLayout.DumpListOfModules
      /vol/llvm/src/compiler-rt/local/lib/sanitizer_common/tests/sanitizer_procmaps_test.cc:52: Failure
      Value of: found
        Actual: false
      Expected: true
      [  FAILED  ] MemoryMappingLayout.DumpListOfModules (22 ms)

    The problem is that the test expects the executable name from modules[i].full_name(),
    however the pr_mapname field of struct prmap is just the entry in /proc/<pid>/object,
    which is "a.out" instead of "Sanitizer-i386-Test".  Fortunately, the real name can
    be determined by looking in proc/<pid>/path where "a.out" is a symlink to the
    real path.

    Tested on x86_64-pc-solaris2.11.

    Differential Revision: https://reviews.llvm.org/D64559 — ro / ViewSVN
  9. Test commit. NFC.

    Formatting fix. — bryant / ViewSVN
  10. [Driver] Delete --no-add-needed for RHEL7 or newer

    This is really not needed. gcc driver doesn't add this option.
    BTW, since binutils 2.22, --no-copy-dt-needed-entries (new name of
    --no-add-needed) is the default. — maskray / ViewSVN
  11. [YAMLIO] Wrap explicit specialization in llvm::yaml to appease build bots — maskray / ViewSVN
  12. [test] Delete trailing spaces from YAML tests after D65566/r365869 — maskray / ViewSVN
  13. [test] Delete trailing spaces from YAML tests — maskray / ViewSVN
  14. test/Driver/fsanitize.c: delete -target x86_64-linux-gnu from tests that should always be available

    Follow-up of D64317/r365587. — maskray / ViewSVN

#18437 (Jul 11, 2019 11:07:53 PM)

  1. [AMDGPU] Fixed comment. NFC. — rampitec / ViewSVN
  2. [mips] Fix JmpLink to texternalsym and tglobaladdr on mcroMIPS R6

    There is not match for the `MipsJmpLink texternalsym` and `MipsJmpLink
    tglobaladdr` patterns for microMIPS R6. As a result LLVM incorrectly
    selects the `JALRC16` compact 2-byte instruction which takes a target
    instruction address from a register only and assign `R_MIPS_32` relocation
    for this instruction. This relocation completely overwrites `JALRC16`
    and nearby instructions.

    This patch adds missed matching patterns, selects `BALC` instruction and
    assign a correct `R_MICROMIPS_PC26_S1` relocation.

    Differential Revision: https://reviews.llvm.org/D64552 — atanasyan / ViewSVN
  3. [YAMLIO] Remove trailing spaces when outputting maps

    llvm::yaml::Output::paddedKey unconditionally outputs spaces, which
    are superfluous if the value to be dumped is a sequence or map.
    Change `bool NeedsNewLine` to `StringRef Padding` so that it can be
    overridden to `\n` if the value is a sequence or map.

    An empty map/sequence is special. It is printed as `{}` or `[]` without
    a newline, while a non-empty map/sequence follows a newline. To handle
    this distinction, add another variable `PaddingBeforeContainer` and does
    the special handling in endMapping/endSequence.

    Reviewed By: grimar, jhenderson

    Differential Revision: https://reviews.llvm.org/D64566 — maskray / ViewSVN
  4. [clangd] Implement typeHierarchy/resolve for subtypes

    Summary:
    This allows the client to resolve subtypes one level at a time.

    For supertypes, this is not necessary, because we eagerly compute
    supertypes and return all levels.

    Reviewers: sammccall

    Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64308 — nridge / ViewSVN
  5. [X86][PowerPC] Support -mlong-double-128

    This patch makes the driver option -mlong-double-128 available for X86
    and PowerPC. The CC1 option -mlong-double-128 is available on all targets
    for users to test on unsupported targets.

    On PowerPC, -mlong-double-128 uses the IBM extended double format
    because we don't support -mabi=ieeelongdouble yet (D64283).

    Reviewed By: rnk

    Differential Revision: https://reviews.llvm.org/D64277 — maskray / ViewSVN

#18436 (Jul 11, 2019 9:10:39 PM)

  1. docs/GithubMove.rst: Add link to GitHub migration status page — tstellar / ViewSVN
  2. Return Undef from isBytewiseValue for empty arrays or structs

    Reviewers: pcc, eugenis

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64052 — Vitaly Buka / ViewSVN
  3. NFC: Unforget a colon in a few CHECK: directives.

    Differential Revision: https://reviews.llvm.org/D64526 — dergachev / ViewSVN
  4. [PowerPC] Default to -fomit-frame-pointer when optimization is enabled

    NetBSD, Linux, CloudABI and Hurd already omit frame pointer for PowerPC.
    Make it do so for other platforms. — maskray / ViewSVN
  5. [analyzer] exploded-graph-rewriter: Improve source location dumps.

    - Correctly display macro expansion and spelling locations.
    - Use the same procedure to display location context call site locations.
    - Display statement IDs for program points. — dergachev / ViewSVN
  6. [Driver] Refactor interaction between -f(no-)?omit-frame-pointer and -m(no-)?omit-leaf-frame-pointer

    Use a tri-state enum to represent shouldUseFramePointer() and
    shouldUseLeafFramePointer().

    This simplifies the logic and fixes PR9825:
      -fno-omit-frame-pointer doesn't imply -mno-omit-leaf-frame-pointer.

    and PR24003:
      /Oy- /O2 should not omit leaf frame pointer: this matches MSVC x86-32.
      (/Oy- is a no-op on MSVC x86-64.)

    and:
      when CC1 option -mdisable-fp-elim if absent, -momit-leaf-frame-pointer
      can also be omitted.

    The new behavior matches GCC:
      -fomit-frame-pointer wins over -mno-omit-leaf-frame-pointer
      -fno-omit-frame-pointer loses out to -momit-leaf-frame-pointer

    The behavior makes lots of sense. We have 4 states:

    - 00) leaf retained, non-leaf retained
    - 01) leaf retained, non-leaf omitted  (this is invalid)
    - 10) leaf omitted, non-leaf retained  (what -momit-leaf-frame-pointer was designed for)
    - 11) leaf omitted, non-leaf omitted

    "omit" options taking precedence over "no-omit" options is the only way
    to make 3 valid states representable with -f(no-)?omit-frame-pointer and
    -m(no-)?omit-leaf-pointer.

    Reviewed By: ychen

    Differential Revision: https://reviews.llvm.org/D64294 — maskray / ViewSVN
  7. [MachinePipeliner] Fix order for nodes with Anti dependence in same cycle

    Summary:
    Problem exposed in PowerPC functional testing.

    We did not consider Anti dependence for nodes in same cycle,
    so we may end up generating bad machine code.
    eg: the reduced test won't verify.

    *** Bad machine code: Using an undefined physical register ***
    - function:    lame_encode_buffer_interleaved
    - basic block: %bb.4  (0x4bde4e12928)
    - instruction: %29:gprc = ADDZE %27:gprc, implicit-def dead $carry, implicit $carry
    - operand 3:   implicit $carry

    Reviewers: bcahoon, kparzysz, hfinkel

    Subscribers: MaskRay, wuzish, nemanjai, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64192 — jsji / ViewSVN
  8. Handle IntToPtr in isBytewiseValue

    Summary:
    This helps with more efficient use of memset for pattern initialization

    From @pcc prototype for -ftrivial-auto-var-init=pattern optimizations

    Binary size change on CTMark, (with -fuse-ld=lld -Wl,--icf=all, similar results with default linker options)
    ```
                       master           patch      diff
    Os           8.238864e+05    8.238864e+05       0.0
    O3           1.054797e+06    1.054797e+06       0.0
    Os zero      8.292384e+05    8.292384e+05       0.0
    O3 zero      1.062626e+06    1.062626e+06       0.0
    Os pattern   8.579712e+05    8.338048e+05 -0.030299
    O3 pattern   1.090502e+06    1.067574e+06 -0.020481
    ```

    Zero vs Pattern on master
    ```
                   zero       pattern      diff
    Os     8.292384e+05  8.579712e+05  0.036578
    O3     1.062626e+06  1.090502e+06  0.025124
    ```

    Zero vs Pattern with the patch
    ```
                   zero       pattern      diff
    Os     8.292384e+05  8.338048e+05  0.003333
    O3     1.062626e+06  1.067574e+06  0.003193
    ```

    Reviewers: pcc, eugenis

    Subscribers: hiraditya, cfe-commits, llvm-commits

    Tags: #clang, #llvm

    Differential Revision: https://reviews.llvm.org/D63967 — Vitaly Buka / ViewSVN
  9. Codegen, NFC: 32bit test in auto-var-init.cpp — Vitaly Buka / ViewSVN
  10. Mark destroying delete test as UNSUPPORTED with clang 7 — ericwf / ViewSVN
  11. Tolerate import errors in "not.py" implementation — ericwf / ViewSVN
  12. Reorganize the 'bit' header to make most of the facilities available for internal use pre-C++20. NFC for external users — marshall / ViewSVN
  13. NFC: lit: python3 compatibility for functions
    usePlatformSdkOnDarwin/findPlatformSdkVersionOnMacOS

    These functions should decode subprocess output — arphaman / ViewSVN
  14. [InstCombine] Reorder pow() transformations (NFC)

    Move the transformation from `powf(x, itofp(y))` to `powi(x, y)` to the
    group of transformations related to the exponent. — evandro / ViewSVN
  15. Re-Revert Devirtualize destructor of final class.

    This reverts r365509 (git commit d088720edad9c29ee0d622b5d69092e18a9ac0bd)

    This is a second revert[1] due to failures in internal test cases (shared offline) found during more thorough testing.

    [1] Original patch commited as r364100, reverted as r364359, recommitted as r365509 — rupprecht / ViewSVN
  16. [clangd] Add a missing early return in getTypeHierarchy()

    Reviewers: sammccall

    Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64307 — nridge / ViewSVN
  17. Add another buildbot username to the workaround list — ericwf / ViewSVN
  18. Attempt to override broken buildbot config for libc++abi.

    The buildbots were changed to pass -DLIBCXX_CXX_ABI=libcxxabi, but
    they don't provide an include path for the library, so cxxabi.h is
    never found while building libc++.

    This is a temporary change until the buildbots are updated or until
    D63883 lands in a form that unbreaks the bots — ericwf / ViewSVN

#18435 (Jul 11, 2019 6:03:29 PM)

  1. [AMDGPU] Skip calculating callee saved registers for entry function.

    Reviewers: arsenm

    Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64596 — hliao / ViewSVN
  2. [CMake][Fuchsia] Use RelWithDebInfo to build runtimes

    We want to preserve debug info in our runtimes to aid symbolization and
    debugging; for shared libraries this will be stripped away during
    install-stripped step and distributed via .build-id, for static archives
    it's part of the archive and it's a responsibility of the consumer to
    strip it away in the final binary if not needed.

    Differential Revision: https://reviews.llvm.org/D64605 — phosek / ViewSVN
  3. [clangd] Fix MSVC build failure.

    http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/26898 — probinson / ViewSVN
  4. AMDGPU: s_waitcnt field should be treated as unsigned

    Also make it an ImmLeaf, so it should work with global isel as well,
    which was part of the point of moving it in the first place. — arsenm / ViewSVN
  5. Use clang driver for libfuzzer tests on Windows

    Summary:
    There's no real reason to use clang-cl on Windows, the clang driver
    works just as well. This fixes a test which uses the -O0 flag, which was
    recently removed from clang-cl to match MSVC, which lacks this flag.

    While I'm here, remove the explicit -std=c++11 flag. Previously, this
    flag was necessary when the default C++ standard was C++98. Now that the
    default is C++14, this is no longer necessary. It's problematic on
    Windows, because the Visual C++ standard library relies on C++14
    features, and attempting to compile it with C++11 results in errors.
    Rather than adding logic to conditionally set the standard to C++11 only
    on non-Win, this flag can be removed.

    See http://lab.llvm.org:8011/builders/clang-x64-windows-msvc and
    https://reviews.llvm.org/D64506.

    Reviewers: morehouse, thakis

    Subscribers: #sanitizers, llvm-commits

    Tags: #sanitizers, #llvm

    Differential Revision: https://reviews.llvm.org/D64587 — rnk / ViewSVN
  6. Fix memory leak in set and map.

    When assigning an initializer list into set/map, libc++ would
    leak memory if the initializer list contained equivalent keys
    because we failed to check if the insertion was successful. — ericwf / ViewSVN
  7. [sancov] Ignore PC samples with value 0

    The sancov runtime for the (Fuchsia) Zircon kernel delivers results
    in the standard format, but as the full array of possible samples
    with 0 in uncovered slots. That runtime delivers "live" data and
    has no final "export" pass to compactify out the uncovered slots,
    and it seems silly to require another offline tool just for that.

    Patch By: mcgrathr
    Differential Revision: https://reviews.llvm.org/D63695 — phosek / ViewSVN
  8. [NewPM] Port Sancov

    This patch contains a port of SanitizerCoverage to the new pass manager. This one's a bit hefty.

    Changes:

    - Split SanitizerCoverageModule into 2 SanitizerCoverage for passing over
      functions and ModuleSanitizerCoverage for passing over modules.
    - ModuleSanitizerCoverage exists for adding 2 module level calls to initialization
      functions but only if there's a function that was instrumented by sancov.
    - Added legacy and new PM wrapper classes that own instances of the 2 new classes.
    - Update llvm tests and add clang tests.

    Differential Revision: https://reviews.llvm.org/D62888 — leonardchan / ViewSVN
  9. [AMDGPU] Fixed asan error with agpr spilling

    Instruction was used after it was erased. — rampitec / ViewSVN
  10. Fix build errors LLVM tests are disabled.

    Original patch from alanbaker@google.com

    Fixes the error:
    CMake Error in <...>/llvm/cmake/modules/CMakeLists.txt:

    export called with target "LLVMTestingSupport" which requires target
    "gtest" that is not in the export set.

    This occurs when LLVM is embedded in a larger project, but is configured not to
    include tests. If testing is disabled gtest isn't available and LLVM fails to
    configure.

    Differential revision: https://reviews.llvm.org/D63097 — dnovillo / ViewSVN
  11. CodeGen: Suppress c++ warnings in test — Vitaly Buka / ViewSVN
  12. [AMDGPU] gfx908 agpr spilling

    Differential Revision: https://reviews.llvm.org/D64594 — rampitec / ViewSVN
  13. Fix a Python3 compatibility error

      File "clang/test/lit.cfg.py", line 186, in <module>
        config.available_features.add('macos-sdk-' + macOSSDKVersion)
    TypeError: must be str, not bytes — Azharuddin Mohammed / ViewSVN
  14. Rename libclang_shared to libclang-cpp

    Summary: Fix bug 42475

    Reviewers: beanz, tstellar

    Reviewed By: beanz

    Subscribers: kimgr, mgorny, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64278 — sylvestre / ViewSVN
  15. [Attributor] Deduce "nosync" function attribute.

    Introduce and deduce "nosync" function attribute to indicate that a function
    does not synchronize with another thread in a way that other thread might free memory.

    Reviewers: jdoerfert, jfb, nhaehnle, arsenm

    Subscribers: wdng, hfinkel, nhaenhle, mehdi_amini, steven_wu,
    dexonsmith, arsenm, uenoku, hiraditya, jfb, llvm-commits

    Differential Revision: https://reviews.llvm.org/D62766 — sstefan / ViewSVN
  16. [AMDGPU] gfx908 hazard recognizer

    Differential Revision: https://reviews.llvm.org/D64593 — rampitec / ViewSVN
  17. [InstCombine][NFCI] Add more test coverage to onehot_merge.ll

    Prep work for upcoming patch D64275. — huihuiz / ViewSVN
  18. [analyzer] exploded-graph-rewriter: Fix filenames in program point.

    Fix a typo in JSON field name. — dergachev / ViewSVN
  19. [AMDGPU] gfx908 scheduling

    Differential Revision: https://reviews.llvm.org/D64590 — rampitec / ViewSVN
  20. [clang-shlib] Fix clang-shlib for PRIVATE dependencies

    Any static library with a PRIVATE dependency ends up with a
    $<LINK_ONLY:...> generator expression in its INTERFACE_LINK_LIBRARIES,
    which won't be evaluated by the $<TARGET_PROPERTY:...>, so we end up
    with an unevaluated generator expression in the generated build file and
    Ninja chokes on the dollar sign. Just use the static library directly
    for its dependencies instead of trying to propagate dependencies
    manually.

    Differential Revision: https://reviews.llvm.org/D64579 — smeenai / ViewSVN
  21. [AMDGPU] gfx908 mfma support

    Differential Revision: https://reviews.llvm.org/D64584 — rampitec / ViewSVN
  22. CodeGen, NFC: Test for auto-init for 32bit pointers — Vitaly Buka / ViewSVN
  23. [OPENMP]Improve handling of analysis of unsupported VLAs in reductions.

    Fixed the processing of the unsupported VLAs in the reduction clauses.
    Used targetDiag if the diagnostics can be delayed and emit it
    immediately if the target does not support VLAs and we're parsing target
    directive with the reduction clauses. — abataev / ViewSVN
  24. Open native file handles to avoid converting from FDs, NFC

    Follow up to r365588. — rnk / ViewSVN
  25. [UpdateTestChecks] Emit warning when invalid test paths

    Summary:
    Recently I ran into the following issue:

    ./update_test_checks.py /path/not-existing-file.ll

    The script was silent and I was suprised why the real test file hadn't been updated.

    Solution:
    Emit warning if we detect this problem.



    Reviewers: lebedev.ri, spatel, jdoerfert, nikic

    Reviewed By: lebedev.ri, spatel, jdoerfert, nikic

    Subscribers: jdoerfert, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64572 — xbolva00 / ViewSVN
  26. [scudo][standalone] NFC corrections

    Summary:
    A few corrections:
    - rename `TransferBatch::MaxCached` to `getMaxCached` to conform with
      the style guide;
    - move `getBlockBegin` from `Chunk::` to `Allocator::`: I believe it
      was a fallacy to have this be a `Chunk` method, as chunks'
      relationship to backend blocks are up to the frontend allocator. It
      makes more sense now, particularly with regard to the offset. Update
      the associated chunk test as the method isn't available there
      anymore;
    - add a forgotten `\n` to a log string;
    - for `releaseToOs`, instead of starting at `1`, start at `0` and
      `continue` on `BatchClassId`: in the end it's identical but doesn't
      assume a particular class id for batches;
    - change a `CHECK` to a `reportOutOfMemory`: it's a clearer message

    Reviewers: hctim, morehouse, eugenis, vitalybuka

    Reviewed By: hctim

    Subscribers: delcypher, #sanitizers, llvm-commits

    Tags: #llvm, #sanitizers

    Differential Revision: https://reviews.llvm.org/D64570 — cryptoad / ViewSVN
  27. [NFC] Revisited tests for D64285 — xbolva00 / ViewSVN
  28. Revert "[CGDebugInfo] Simplify EmitFunctionDecl parameters, NFC"

    This reverts commit 1af41074445229fea66b99710a850e5f42ecfa95. — Vedant Kumar / ViewSVN

#18433 (Jul 11, 2019 1:07:52 PM)

  1. [X86] Pre commit test cases for D64574. Along with a test case for PR42571. NFC — ctopper / ViewSVN
  2. [WebAssembly] Assembler: support negative float constants.

    Reviewers: dschuff

    Subscribers: sbc100, jgravelle-google, aheejin, sunfish, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64367 — aardappel / ViewSVN
  3. Explicitly define __STDC_FORMAT_MACROS for PRIu64

    Summary:
    Builds are failing on RHEL machines because of PRIu64.

    lvm/projects/compiler-rt/lib/gwp_asan/guarded_pool_allocator.cpp:420:50: error: expected ')'

    `snprintf(ThreadBuffer, kThreadBufferLen, "%" PRIu64, ThreadID);`
    inttypes.h in RHEL uses PRIu64 macros only when __STDC_FORMAT_MACROS is defined.

    Author: DTharun

    Reviewers: hctim

    Reviewed By: hctim

    Differential Revision: https://reviews.llvm.org/D64388 — hctim / ViewSVN
  4. [HIP] Add GPU arch gfx1010, gfx1011, and gfx1012

    Differential Revision: https://reviews.llvm.org/D64364 — yaxunl / ViewSVN
  5. [CodeGen] NVPTX: Switch from atomic.load.add.f32 to atomicrmw fadd — d0k / ViewSVN
  6. [Docs] Add standardized header links to analyzer doc

    Summary:
    Header links should have some standard form so clang tidy
    docs can easily reference them. The form is as follows.

    Start with the analyzer full name including packages.
    Replace all periods with dashes and lowercase everything.

    Ex: core.CallAndMessage -> core-callandmessage

    Reviewers: JonasToth, aaron.ballman, NoQ, Szelethus

    Reviewed By: aaron.ballman, Szelethus

    Subscribers: nickdesaulniers, lebedev.ri, baloghadamsoftware, mgrang, a.sidorin, Szelethus, jfb, donat.nagy, dkrupp, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64543 — nathan-huckleberry / ViewSVN
  7. [NVPTX] Use atomicrmw fadd instead of intrinsics

    AutoUpgrade the old intrinsics to atomicrmw fadd. — d0k / ViewSVN
  8. gn build: Merge r365792 — nico / ViewSVN
  9. [clangd] Avoid template in Task constructor, hopefully fix MSVC build — sammccall / ViewSVN
  10. [clangd] Consume llvm::Error in test after r365792 — sammccall / ViewSVN
  11. [clangd] Implementation of auto type expansion.

    Add a tweak for clangd to replace an auto keyword to the deduced type.

    This way a user can declare something with auto and then have the
    IDE/clangd replace auto with whatever type clangd thinks it is. In case
    of long/complext types this makes is reduces writing effort for the
    user.

    The functionality is similar to the hover over the auto keyword.

    Example (from the header):

    ```
    /// Before:
    ///    auto x = Something();
    ///    ^^^^
    /// After:
    ///    MyClass x = Something();
    ///    ^^^^^^^
    ```

    Patch by kuhnel! (Christian Kühnel)
    Differential Revision: https://reviews.llvm.org/D62855 — sammccall / ViewSVN
  12. [X86] Merge negated ISD::SUB nodes into X86ISD::SUB equivalent (PR40483)

    Follow up to D58597, where it was noted that the commuted ISD::SUB variant
    was having problems with lack of combines.

    See also D63958 where we untangled setcc/sub pairs.

    Differential Revision: https://reviews.llvm.org/D58875 — spatel / ViewSVN
  13. [scudo][standalone] Merge Spin & Blocking mutex into a Hybrid one

    Summary:
    We ran into a problem on Fuchsia where yielding threads would never
    be deboosted, ultimately resulting in several threads spinning on the
    same TSD, and no possibility for another thread to be scheduled,
    dead-locking the process.

    While this was fixed in Zircon, this lead to discussions about if
    spinning without a break condition was a good decision, and settled on
    a new hybrid model that would spin for a while then block.

    Currently we are using a number of iterations for spinning that is
    mostly arbitrary (based on sanitizer_common values), but this can
    be tuned in the future.

    Since we are touching `common.h`, we also use this change as a vehicle
    for an Android optimization (the page size is fixed in Bionic, so use
    a fixed value too).

    Reviewers: morehouse, hctim, eugenis, dvyukov, vitalybuka

    Reviewed By: hctim

    Subscribers: srhines, delcypher, jfb, #sanitizers, llvm-commits

    Tags: #llvm, #sanitizers

    Differential Revision: https://reviews.llvm.org/D64358 — cryptoad / ViewSVN
  14. Fix a few 'no newline at end of file' warnings that Xcode emits

    (Xcode even has a snazzy "Fix" button, but clicking that inserts two
    newlines. So close!) — nico / ViewSVN
  15. [libc++] Implement deduction guides for <unordered_set>

    Thanks to Arthur O'Dwyer for the patch.
    Differential Revision: https://reviews.llvm.org/D58617 — Louis Dionne / ViewSVN
  16. gn build: Merge r365773 — nico / ViewSVN
  17. [OPENMP]Initial fix PR42392: Improve -Wuninitialized warnings for OpenMP programs.

    Summary:
    Some OpenMP clauses rely on the values of the variables. If the variable
    is not initialized and used in OpenMP clauses that depend on the
    variables values, it should be reported that the uninitialized variable
    is used in the OpenMP clause expression.
    This patch adds initial processing for uninitialized variables in OpenMP
    constructs. Currently, it checks for use of the uninitialized variables
    in the structured blocks.

    Reviewers: NoQ, Szelethus, dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet

    Subscribers: rnkovacs, guansong, jfb, jdoerfert, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64356 — abataev / ViewSVN
  18. [DAGCombine] narrowInsertExtractVectorBinOp - add CONCAT_VECTORS support

    We already split extract_subvector(binop(insert_subvector(v,x),insert_subvector(w,y))) -> binop(x,y).

    This patch adds support for extract_subvector(binop(concat_vectors(),concat_vectors())) cases as well.

    In particular this means we don't have to wait for X86 lowering to convert concat_vectors to insert_subvector chains, which helps avoid some cases where demandedelts/combine calls occur too late to split large vector ops.

    The fast-isel-store.ll load folding regression is annoying but I don't think is that critical.

    Differential Revision: https://reviews.llvm.org/D63653 — rksimon / ViewSVN
  19. RegUsageInfoCollector: Skip calling conventions I missed before — arsenm / ViewSVN
  20. AMDGPU/GlobalISel: Move kernel argument handling to separate function — arsenm / ViewSVN
  21. Fix missing C++ mode comment — arsenm / ViewSVN
  22. GlobalISel: Use Register — arsenm / ViewSVN

#18431 (Jul 11, 2019 8:12:53 AM)

  1. Revert r365775 - "[Object/ELF] - Improve error reporting for notes."

    It broke BB: http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/15419 — grimar / ViewSVN
  2. [clangd] Remove an extra ";", NFC — hokein / ViewSVN
  3. Added mapping for pointers captured in Lambdas in OpenMP target regions,
    by David Truby.

    Summary:
    This adds a zero length array section mapping for each pointer captured by a lambda that is used in a target region, as per section 2.19.7.1 of the OpenMP 5 specification.

    Reviewers: ABataev

    Reviewed By: ABataev

    Subscribers: guansong, jdoerfert, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64558 — abataev / ViewSVN
  4. [clangd][QueryDriver] Use language from underlying database if possible

    Reviewers: sammccall

    Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64489 — kadircet / ViewSVN
  5. [Object/ELF] - Improve error reporting for notes.

    This patch improves the error messages reported for
    note sections and phdrs and also makes a cleanup for
    existent test case.

    Differential revision: https://reviews.llvm.org/D64470 — grimar / ViewSVN
  6. [InstCombine] don't move FP negation out of a constant expression

    -(X * ConstExpr) becomes X * (-ConstExpr), so don't reverse that
    and infinite loop. — spatel / ViewSVN
  7. [clangd] Add priorities to background index queue, extract to separate class

    Reviewers: kadircet

    Subscribers: mgorny, ilya-biryukov, MaskRay, jkorous, arphaman, jfb, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64560 — sammccall / ViewSVN
  8. [yaml2obj/elf-override-shsize.yaml] - An attemp to fix ppc64 bot.

    Failture:
    http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/35670/steps/ninja%20check%201/logs/FAIL%3A%20LLVM%3A%3Aelf-override-shsize.yaml

    Solution:
    Change `od` tool invocation to print single bytes. — grimar / ViewSVN
  9. OpaquePtr: switch to GlobalValue::getValueType in a few places. NFC. — Tim Northover / ViewSVN
  10. OpaquePtr: use byval accessor instead of inspecting pointer type. NFC.

    The accessor can deal with both "byval(ty)" and "ty* byval" forms
    seamlessly. — Tim Northover / ViewSVN
  11. OpaquePtr: use load instruction directly for type. NFC. — Tim Northover / ViewSVN
  12. InstructionSimplify: Simplify InstructionSimplify. NFC.

    The interface predates CallBase, so both it and implementation were
    significantly more complicated than they needed to be. There was even
    some redundancy that could be eliminated.

    Should also help with OpaquePointers by not trying to derive a
    function's type from it's PointerType. — Tim Northover / ViewSVN
  13. [yaml2obj] - Allow overriding the sh_size field.

    There is no way to set broken sh_size field currently
    for sections. It can be usefull for writing the
    test cases.

    Differential revision: https://reviews.llvm.org/D64401 — grimar / ViewSVN
  14. [NFC] Updated tests for D64285 — xbolva00 / ViewSVN
  15. [clangd] Remove the extra ";", NFC — hokein / ViewSVN
  16. [clangd] Fix an assertion crash in "ExtractVariable" tweak

    Summary:
    GetTypePtr requires that the type should not be null, otherwise we hit
    an assertion, we should use getTypePtrOrNull instead.

    Reviewers: sammccall, SureYeaah

    Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64556 — hokein / ViewSVN
  17. [llvm-readobj/llvm-readelf] - Report a warning instead of a error when dumping a broken dynamic section.

    It does not make sence to stop dumping the object if the broken
    dynamic section was found. In this patch I changed the behavior from
    "report an error" to "report a warning". This matches GNU.

    Differential revision: https://reviews.llvm.org/D64472 — grimar / ViewSVN
  18. [InstCombine] Reorder recently added/improved pow transformations

    Changed cases are now faster with exp2. — xbolva00 / ViewSVN
  19. Revert [BitcodeReader] Validate OpNum, before accessing Record array.

    This reverts r365750 (git commit 8b222ecf2769ee133691f208f6166ce118c4a164)

    llvm-dis runs out of memory while opening invalid-fcmp-opnum.bc on
    llvm-hexagon-elf, probably because the bitcode file contains other
    suspicious values.

    http://lab.llvm.org:8011/builders/llvm-hexagon-elf/builds/21949 — fhahn / ViewSVN
  20. [clangd] Fix windows buildbots — kadircet / ViewSVN
  21. [X86] Regenerate intrinsics tests. NFCI. — rksimon / ViewSVN
  22. [AMDGPU] Regenerate idot tests. NFCI.

    Reduces diff in D63281. — rksimon / ViewSVN
  23. [llvm-objcopy] Don't change permissions of non-regular output files

    There is currently an EPERM error when a regular user executes `llvm-objcopy a.o /dev/null`.
    Worse, root can even change the mode bits of /dev/null.

    Fix it by checking if the output file is special.

    A new overload of llvm::sys::fs::setPermissions with FD as the parameter
    is added. Users should provide `perm & ~umask` as the parameter if they
    intend to respect umask.

    The existing overload of llvm::sys::fs::setPermissions may be deleted if
    we can find an implementation of fchmod() on Windows. fchmod() is
    usually better than chmod() because it saves syscalls and can avoid race
    condition.

    Reviewed By: jakehehrlich, jhenderson

    Differential Revision: https://reviews.llvm.org/D64236 — maskray / ViewSVN
  24. [X86] -fno-plt: use GOT __tls_get_addr only if GOTPCRELX is enabled

    Summary:
    As of binutils 2.32, ld has a bogus TLS relaxation error when the GD/LD
    code sequence using R_X86_64_GOTPCREL (instead of R_X86_64_GOTPCRELX) is
    attempted to be relaxed to IE/LE (binutils PR24784). gold and lld are good.

    In gcc/config/i386/i386.md, there is a configure-time check of as/ld
    support and the GOT relaxation will not be used if as/ld doesn't support
    it:

        if (flag_plt || !HAVE_AS_IX86_TLS_GET_ADDR_GOT)
          return "call\t%P2";
        return "call\t{*%p2@GOT(%1)|[DWORD PTR %p2@GOT[%1]]}";

    In clang, -DENABLE_X86_RELAX_RELOCATIONS=OFF is the default. The ld.bfd
    bogus error can be reproduced with:

        thread_local int a;
        int main() { return a; }

    clang -fno-plt -fpic a.cc -fuse-ld=bfd

    GOTPCRELX gained relative good support in 2016, which is considered
    relatively new.  It is even difficult to conditionally default to
    -DENABLE_X86_RELAX_RELOCATIONS=ON due to cross compilation reasons. So
    work around the ld.bfd bug by only using GOT when GOTPCRELX is enabled.

    Reviewers: dalias, hjl.tools, nikic, rnk

    Reviewed By: nikic

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64304 — maskray / ViewSVN
  25. [clangd] Add a missing "return nullptr;" to the SelectionTree::commonAncestor.

    This would fix some mysterious crashes on codeAction in clangd. — hokein / ViewSVN
  26. [BitcodeReader] Validate OpNum, before accessing Record array.

    Currently invalid bitcode files can cause a crash, when OpNum exceeds
    the number of elements in Record, like in the attached bitcode file.

    The test case was generated by clusterfuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=15698

    Reviewers: t.p.northover, thegameg, jfb

    Reviewed By: jfb

    Differential Revision: https://reviews.llvm.org/D64507 — fhahn / ViewSVN
  27. [ARM][LowOverheadLoops] Correct offset checking
       
    This patch addresses a couple of problems:
    1) The maximum supported offset of LE is -4094.
    2) The offset of WLS also needs to be checked, this uses a
       maximum positive offset of 4094.
       
    The use of BasicBlockUtils has been changed because the block offsets
    weren't being initialised, but the isBBInRange checks both positive
    and negative offsets.
       
    ARMISelLowering has been tweaked because the test case presented
    another pattern that we weren't supporting. — sam_parker / ViewSVN
  28. [clangd] Reland rL365634

    This was reverted in rL365678, the failure was due to YAML parsing of
    compile_commands.json.

    Converting backslashes to forward slashes to fix the issue in unittest. — kadircet / ViewSVN
  29. [ARM] Remove nonexistent unsigned forms of MVE VQDMLAH.

    The VQDMLAH.U8, VQDMLAH.U16 and VQDMLAH.U32 instructions don't
    actually exist: the Armv8.1-M architecture spec only lists signed
    forms of that instruction. The unsigned ones were added in error: they
    existed in an early draft of the spec, but they were removed before
    the public version, and we missed that particular spec change.

    Also affects the variant forms VQDMLASH, VQRDMLAH and VQRDMLASH.

    Reviewers: miyuki

    Subscribers: javed.absar, kristof.beyls, hiraditya, dmgreen, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64502 — statham / ViewSVN
  30. [NFC][PowerPC] Added test to track current behaviour of TailDup — lkail / ViewSVN
  31. [clangd] Added highlightings for namespace specifiers.

    Summary: Added highlightings for namespace specifiers.

    Reviewers: hokein, sammccall, ilya-biryukov

    Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64492 — jvikstrom / ViewSVN

#18430 (Jul 11, 2019 3:37:38 AM)

  1. [MIPS GlobalISel] Skip copies in addUseDef and addDefUses

    Skip copies between virtual registers during search for UseDefs
    and DefUses.
    Since each operand has one def search for UseDefs is straightforward.
    But since operand can have many uses, we have to check all uses of
    each copy we traverse during search for DefUses.

    Differential Revision: https://reviews.llvm.org/D64486 — petar.avramovic / ViewSVN
  2. [MIPS GlobalISel] RegBankSelect for chains of ambiguous instructions

    When one of the uses/defs of ambiguous instruction is also ambiguous
    visit it recursively and search its uses/defs for instruction with
    only one mapping available.
    When all instruction in a chain are ambiguous arbitrary mapping can
    be selected. For s64 operands in ambiguous chain fprb is selected since
    it results in less instructions then having to narrow scalar s64 to s32.
    For s32 both gprb and fprb result in same number of instructions and
    gprb is selected like a general purpose option.

    At the moment we always avoid cross register bank copies.
    TODO: Implement a model for costs calculations of different mappings
    on same instruction and cross bank copies. Allow cross bank copies
    when appropriate according to cost model.

    Differential Revision: https://reviews.llvm.org/D64485 — petar.avramovic / ViewSVN
  3. Revert Recommit "[CommandLine] Remove OptionCategory and SubCommand caches from the Option class."

    This reverts r365675 (git commit 43d75f977853c3ec891a440c362b2df183a211b5)

    The patch causes a crash in SupportTests (CommandLineTest.AliasesWithArguments). — hokein / ViewSVN
  4. Remove some redundant code from r290372 and improve a comment. — foad / ViewSVN

#18429 (Jul 11, 2019 3:23:53 AM)

  1. [ARM][ParallelDSP] Change the search for smlads
       
    Two functional changes have been made here:
    - Now search up from any add instruction to find the chains of
      operations that we may turn into a smlad. This allows the
      generation of a smlad which doesn't accumulate into a phi.
    - The search function has been corrected to stop it falsely searching
      up through an invalid path.
       
    The bulk of the changes have been making the Reduction struct a class
    and making it more C++y with getters and setters.

    Differential Revision: https://reviews.llvm.org/D61780 — sam_parker / ViewSVN
  2. [ASan] Use __sanitizer_fill_shadow for FastPoisonShadow on Fuchsia

    This is the optimized implementation for Fuchsia provided by the libc.

    Differential Revision: https://reviews.llvm.org/D64166 — phosek / ViewSVN
  3. [test] Silence gcc 7.4 warning [NFC]

    Without this gcc 7.4.0 complains with
    ../unittests/Analysis/ValueTrackingTest.cpp:937:66: error: ISO C++11 requires at least one argument for the "..." in a variadic macro [-Werror]
                              ::testing::ValuesIn(IsBytewiseValueTests));
                                                                       ^ — uabelho / ViewSVN
  4. [clang-doc] Silence compiler warning with gcc 7.4 [NFC]

    Without the fix gcc 7.4.0 complains with

    /data/repo/master/clang-tools-extra/clang-doc/HTMLGenerator.cpp: In member function 'llvm::SmallString<16> clang::doc::{anonymous}::HTMLTag::ToString() const':
    /data/repo/master/clang-tools-extra/clang-doc/HTMLGenerator.cpp:165:1: error: control reaches end of non-void function [-Werror=return-type]
    }
    ^
    /data/repo/master/clang-tools-extra/clang-doc/HTMLGenerator.cpp: In member function 'bool clang::doc::{anonymous}::HTMLTag::HasInlineChildren() const':
    /data/repo/master/clang-tools-extra/clang-doc/HTMLGenerator.cpp:142:1: error: control reaches end of non-void function [-Werror=return-type]
    }
    ^
    /data/repo/master/clang-tools-extra/clang-doc/HTMLGenerator.cpp: In member function 'bool clang::doc::{anonymous}::HTMLTag::IsSelfClosing() const':
    /data/repo/master/clang-tools-extra/clang-doc/HTMLGenerator.cpp:126:1: error: control reaches end of non-void function [-Werror=return-type]
    }
    ^
    cc1plus: all warnings being treated as errors — uabelho / ViewSVN
  5. Add NetBSD LSan support

    Summary:
    Combine few relatively small changes into one:

    - implement internal_ptrace() and internal_clone() for NetBSD
    - add support for stoptheworld based on the ptrace(2) API
    - define COMPILER_RT_HAS_LSAN for NetBSD
    - enable tests for NetBSD/amd64

    Inspired by the original implementation by Christos Zoulas in netbsd/src for GCC.

    The implementation is in theory CPU independent through well defined macros
    across all NetBSD ports, however only the x86_64 version was tested.

    Reviewers: mgorny, dvyukov, vitalybuka, joerg, jfb

    Reviewed By: vitalybuka

    Subscribers: dexonsmith, jfb, srhines, kubamracek, llvm-commits, christos

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64057 — kamil / ViewSVN
  6. [WebAssembly] Print error message for llvm.clear_cache intrinsic

    Summary:
    Wasm does not currently support `llvm.clear_cache` intrinsic, and this
    prints a proper error message instead of segfault.

    Reviewers: dschuff, sbc100, sunfish

    Subscribers: jgravelle-google, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64322 — aheejin / ViewSVN
  7. [InstCombine][NFCI] Add test coverage to onehot_merge.ll

    Prep work for upcoming patch D64275. — huihuiz / ViewSVN
  8. Increase the number of parser diagnostics.

    The reserved range for parser diagnostics is getting close to being filled,
    so increase the space for them. — rtrieu / ViewSVN

#18427 (Jul 10, 2019 9:59:10 PM)

  1. [SCEV] teach SCEV symbolical execution about overflow intrinsics folding.
    Differential Revision: https://reviews.llvm.org/D64422 — shchenz / ViewSVN
  2. Change another test I missed in r365724 — nico / ViewSVN
  3. clang-cl: Remove -O0 option

    cl.exe doesn't understand it; there's /Od instead. See also the review
    thread for r229575.

    Update lots of compiler-rt tests to use -Od instead of -O0.
    Ran `rg -l 'clang_cl.*O0' compiler-rt/test/ | xargs sed -i -c 's/-O0/-Od/'`

    Differential Revision: https://reviews.llvm.org/D64506 — nico / ViewSVN
  4. Replace three "strip & accumulate" implementations with a single one

    This patch replaces the three almost identical "strip & accumulate"
    implementations for constant pointer offsets with a single one,
    combining the respective functionalities. The old interfaces are kept
    for now.

    Differential Revision: https://reviews.llvm.org/D64468 — jdoerfert / ViewSVN
  5. [NFC] Adjust "invalid.ll.bc" tests to check for AttrKind #255 not #63

    We are about to add enum attributes with AttrKind numbers >= 63. This
    means we cannot use AttrKind #63 to test for an invalid attribute number
    in the RAW format anymore. This patch changes the number of an invalid
    attribute to #255. There is no change to the character of the tests.

    Differential Revision: https://reviews.llvm.org/D64531 — jdoerfert / ViewSVN
  6. Various minor tweaks to CLCompatOptions.td

    - Add back indentation I accidentally removed in r364901
    - Wrap two lines to 80 cols
    - Slightly tighten up help text for several flags
    - Consistently use "Do not" instead of "Don't"
    - Make every option description start with a verb
    - Use "Set" instead of "Specify"
    - Mark default values of options more consistently
    - Remove text about "/Zi" not producing PDBs since it's confusing
      for people not intimately familiar with the implementation of
      the normal PDB pipeline. /Zi lets the linker produce PDBs, which
      is what most users want.
    - Consistently use "file" over "filename" in meta var names,
      consistently use "file name" over "filename" in text
    - Make all output setting options have consistent language — nico / ViewSVN
  7. [X86] Don't convert 8 or 16 bit ADDs to LEAs on Atom in FixupLEAPass.

    We use the functions that convert to three address to do the
    conversion, but changing an 8 or 16 bit will cause it to create
    a virtual register. This can't be done after register allocation
    where this pass runs.

    I've switched the pass completely to a white list of instructions
    that can be converted to LEA instead of a blacklist that was
    incorrect. This will avoid surprises if we enhance the three
    address conversion function to include additional instructions
    in the future.

    Fixes PR42565. — ctopper / ViewSVN
  8. [AMDGPU] gfx908 atomic fadd and atomic pk_fadd

    Differential Revision: https://reviews.llvm.org/D64435 — rampitec / ViewSVN
  9. [CGDebugInfo] Fix -femit-debug-entry-values crash on os_log_helpers

    An os_log_helper FunctionDecl may not have a body. Ignore these for the
    purposes of debug entry value emission.

    Fixes an assertion failure seen in a stage2 build of clang:

    Assertion failed: (FD->hasBody() && "Functions must have body here"),
    function analyzeParametersModification — Vedant Kumar / ViewSVN
  10. [AMDGPU] gfx908 dot instruction support

    Differential Revision: https://reviews.llvm.org/D64431 — rampitec / ViewSVN
  11. Attempt to fix bots after r365703 — nico / ViewSVN
  12. rL365634 adds a unique_ptr<CompilationDatabase> in GobalCompilationDatabase.h:108 but CompilationDatabase is only forward declared. This makes the header not compile standalone, because unique_ptrs expect to have the full-definition of the...

    Summary:
    ...template argument.

    Remove the forward declaration and include the appropriate header instead.
    Remove CompileCommand too, which is also in the header. — saugustine / ViewSVN
  13. Revert [llvm-objcopy] Allow strip symtab from executables and DSOs

    This reverts r365193 (git commit 194f16b3548bcb23a7f0fd638778ed72edd18d37)

    This patch doesn't work with binaries built w/ `--emit-relocs`, e.g.

    ```
    $ echo 'int main() { return 0; }' | clang -Wl,--emit-relocs -x c - -o foo && llvm-objcopy --strip-unneeded foo
    llvm-objcopy: error: 'foo': not stripping symbol '__gmon_start__' because it is named in a relocation
    ``` — rupprecht / ViewSVN

#18426 (Jul 10, 2019 5:35:30 PM)

  1. [SDAG] commute setcc operands to match a subtract

    If we have:

    R = sub X, Y
    P = cmp Y, X

    ...then flipping the operands in the compare instruction can allow using a subtract that sets compare flags.

    Motivated by diffs in D58875 - not sure if this changes anything there,
    but this seems like a good thing independent of that.

    There's a more involved version of this transform already in IR (in instcombine
    although that seems misplaced to me) - see "swapMayExposeCSEOpportunities()".

    Differential Revision: https://reviews.llvm.org/D63958 — spatel / ViewSVN
  2. Add IsBytewiseValue unit test

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63966 — Vitaly Buka / ViewSVN
  3. NFC: Pass DataLayout into isBytewiseValue

    Summary:
    We will need to handle IntToPtr which I will submit in a separate patch as it's
    not going to be NFC.

    Reviewers: eugenis, pcc

    Reviewed By: eugenis

    Subscribers: hiraditya, cfe-commits, llvm-commits

    Tags: #clang, #llvm

    Differential Revision: https://reviews.llvm.org/D63940 — Vitaly Buka / ViewSVN
  4. NFC: Convert large lambda into method

    Reviewers: pcc, eugenis

    Reviewed By: eugenis

    Subscribers: cfe-commits, lldb-commits

    Tags: #clang, #lldb

    Differential Revision: https://reviews.llvm.org/D63854 — Vitaly Buka / ViewSVN
  5. [TSan] Fix linker error on Linux/AArch64 — yln / ViewSVN
  6. GodeGen, NFC: Add test to track emitStoresForConstant behavior

    Reviewers: eugenis, pcc

    Reviewed By: eugenis

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64385 — Vitaly Buka / ViewSVN
  7. [X86] Add patterns with and_flag_nocf for BLSI and TBM instructions.

    Fixes similar issues to r352306. — ctopper / ViewSVN
  8. [X86] Add a few more TBM and BLSI test cases that show the same issue that r352306 fixed for BLSR. — ctopper / ViewSVN
  9. driver: Don't warn about assembler flags being unused when not assembling

    clang currently warns when passing flags for the assembler (e.g.
    -Wa,-mbig-obj) to an invocation that doesn't run the assembler (e.g.
    -E).

    At first sight, that makes sense -- the flag really is unused. But many
    other flags don't have an effect if no assembler runs (e.g.
    -fno-integrated-as, -ffunction-sections, and many others), and those
    currently don't warn. So this seems more like a side effect of how
    CollectArgsForIntegratedAssembler() is implemented than like an
    intentional feature.

    Since it's a bit inconvenient when debugging builds and adding -E,
    always call CollectArgsForIntegratedAssembler() to make sure assembler
    args always get claimed. Currently, this affects only these flags:
    -mincremental-linker-compatible, -mimplicit-it= (on ARM), -Wa, -Xassembler

    It does have the side effect that assembler options now need to be valid
    even if -E is passed. Previously, `-Wa,-mbig-obj` would error for
    non-coff output only if the assembler ran, now it always errors. This
    too makes assembler flags more consistent with all the other flags and
    seems like a progression.

    Fixes PR42066.

    Differential Revision: https://reviews.llvm.org/D64527 — nico / ViewSVN

#18425 (Jul 10, 2019 5:10:06 PM)

  1. [X86] Add BLSR and BLSMSK to isUseDefConvertible.

    Unfortunately subo formation in CGP prevents obvious ways of
    testing this.

    But we already have BLSI in here and the flag behavior is
    well understood.

    Might become more useful if we improve PR42571. — ctopper / ViewSVN
  2. [NFC]Fix IR/MC depency issue for function descriptor SDAG implementation

    Summary: llvm/IR/GlobalValue.h can't be included in MC, that creates a circular dependency between MC and IR libraries. This circular dependency is causing an issue for build system that enforce layering.

    Author: Xiangling_L

    Reviewers: sfertile, jasonliu, hubert.reinterpretcast, gribozavr

    Reviewed By: gribozavr

    Subscribers: wuzish, nemanjai, hiraditya, kbarton, MaskRay, jsji, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64445 — daltenty / ViewSVN
  3. [clang-scan-deps] Dependency directives source minimizer:
    single quotes are not digit separators after a valid character literal prefix

    The single quote character can act as a c++ digit separator.
    However, the minimizer shouldn't treat it as such when it's actually following
    a valid character literal prefix, like L, U, u, or u8.

    Differential Revision: https://reviews.llvm.org/D64525 — arphaman / ViewSVN
  4. [Concepts] Concept definitions (D40381)

    First in a series of patches to land C++2a Concepts support.
    This patch adds AST and parsing support for concept-declarations. — saar.raz / ViewSVN
  5. [X86] Remove unused variable. NFC — ctopper / ViewSVN
  6. My first test commit. — saar.raz / ViewSVN
  7. [NFC][InstCombine] Comb through just-added "omit mask before left-shift" tests once more — lebedevri / ViewSVN
  8. [TSan] Fix compiler error on Linux/AArch64 — yln / ViewSVN
  9. Add support for building with Python 3

    LLDB supports Python 3 now.

    Differential Revision: https://reviews.llvm.org/D64443

    Patch from Christian Biesinger <cbiesinger@google.com>! — nico / ViewSVN
  10. [OPENMP]Remove not used check line from the test, NFC. — abataev / ViewSVN
  11. [AArch64][GlobalISel] Optimize compare and branch cases with G_INTTOPTR and unknown values.

    Since we have distinct types for pointers and scalars, G_INTTOPTRs can sometimes
    obstruct attempts to find constant source values. These usually come about when
    try to do some kind of null pointer check. Teaching getConstantVRegValWithLookThrough
    about this operation allows the CBZ/CBNZ optimization to catch more cases.

    This change also improves the case where we can't find a constant source at all.
    Previously we would emit a cmp, cset and tbnz for that. Now we try to just emit
    a cmp and conditional branch, saving an instruction.

    The cumulative code size improvement of this change plus D64354 is 5.5% geomean
    on arm64 CTMark -O0.

    Differential Revision: https://reviews.llvm.org/D64377 — aemerson / ViewSVN
  12. gn build: Merge r365687 — nico / ViewSVN
  13. [clang-doc] Add a structured HTML generator

    Implements an HTML generator.
    Nodes are used to represent each part of the HTML file. There are TagNodes that
    represent every HTML tag (p, h1, div, ...) and they have children nodes, which
    can be TagNodes or TextNodes (these nodes only have text).
    Proper indentation is rendered within the files generated by tool.
    No styling (CSS) is included.

    Committed on behalf of Diego Astiazarán (diegoaat97@gmail.com)

    Differential Revision: https://reviews.llvm.org/D63857 — juliehockett / ViewSVN
  14. Revert "[ELF] Loose a condition for relocation with a symbol"

    This reverts commit 8507eca1647118e73435b0ce1de8a1952a021d01.

    Reveting due to some suspicious failurse in santizer-x86_64-linux. — nikolaprica / ViewSVN
  15. [GlobalISel][AArch64] Use getOpcodeDef instead of findMIFromReg

    Some minor cleanup.

    This function in Utils does the same thing as `findMIFromReg`. It also looks
    through copies, which `findMIFromReg` didn't.

    Delete `findMIFromReg` and use `getOpcodeDef` instead. This only happens in
    `tryOptVectorDup` right now.

    Update opt-shuffle-splat to show that we can look through the copies now, too.

    Differential Revision: https://reviews.llvm.org/D64520 — paquette / ViewSVN
  16. [GlobalISel][AArch64][NFC] Use getDefIgnoringCopies from Utils where we can

    There are a few places where we walk over copies throughout
    AArch64InstructionSelector.cpp. In Utils, there's a function that does exactly
    this which we can use instead.

    Note that the utility function works with the case where we run into a COPY
    from a physical register. We've run into bugs with this a couple times, so using
    it should defend us from similar future bugs.

    Also update opt-fold-compare.mir to show that we still handle physical registers
    properly.

    Differential Revision: https://reviews.llvm.org/D64513 — paquette / ViewSVN
  17. Update libc++ include path detection to use VFS on Linux

    The DetectLibcxxIncludePath function had been using
    llvm::sys::fs::directory_iterator, and this updates it to use
    llvm::vfs::directory_iterator.

    Differential Revision: https://reviews.llvm.org/D64381 — juliehockett / ViewSVN
  18. [TSan] Attempt to fix linker error on Linux/AArch64 — yln / ViewSVN
  19. Revert "[System Model] [TTI] Update cache and prefetch TTI interfaces"

    This broke some PPC prefetching tests.

    This reverts commit 9fdfb045ae8bb643ab0d0455dcf9ecaea3b1eb3c. — greened / ViewSVN
  20. Move three folds for FADD, FSUB and FMUL in the DAG combiner away from Unsafe to more aligned checks that reflect context

    Summary: Unsafe does not map well alone for each of these three cases as it is missing NoNan context when accessed directly with clang.  I have migrated the fold guards to reflect the expectations of handing nan and zero contexts directly (NoNan, NSZ) and some tests with it.  Unsafe does include NSZ, however there is already precedent for using the target option directly to reflect that context.

    Reviewers: spatel, wristow, hfinkel, craig.topper, arsenm

    Reviewed By: arsenm

    Subscribers: michele.scandale, wdng, javed.absar

    Differential Revision: https://reviews.llvm.org/D64450 — mcberg2017 / ViewSVN
  21. Revert "[clangd] Filter out non-governed files from broadcast"

    This reverts commit d5214dfa7b5650745eaeb102857c9e90adb16137.

    It's causing failures, both in our local CI and the PS4 Windows bot.

    http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/26872/steps/test/logs/stdio — ormris / ViewSVN
  22. [System Model] [TTI] Update cache and prefetch TTI interfaces

    Rework the TTI cache and software prefetching APIs to prepare for the
    introduction of a general system model.  Changes include:

    - Marking existing interfaces const and/or override as appropriate
    - Adding comments
    - Adding BasicTTIImpl interfaces that delegate to a subtarget
      implementation
    - Adding a default "no information" subtarget implementation

    Only a handful of targets use these interfaces currently: AArch64,
    Hexagon, PPC and SystemZ.  AArch64 already has a custom subtarget
    implementation, so its custom TTI implementation is migrated to use
    the new facilities in BasicTTIImpl to invoke its custom subtarget
    implementation.  The custom TTI implementations continue to exist for
    the other targets with this change.  They are not moved over to
    subtarget-based implementations.

    The end goal is to have the default subtarget implementation defer to
    the system model defined by the target.  With this change, the default
    subtarget implementation essentially returns "no information" for
    these interfaces.  None of the existing users of TTI will hit that
    implementation because they define their own custom TTI
    implementations and won't use the BasicTTIImpl implementations.

    Once system models are in place for the targets that use these
    interfaces, their custom TTI implementations can be removed.

    Differential Revision: https://reviews.llvm.org/D63614 — greened / ViewSVN
  23. Recommit "[CommandLine] Remove OptionCategory and SubCommand caches from the Option class."

    Previously reverted in 364141 due to buildbot breakage, and fixed here
    by making GeneralCategory global a ManagedStatic.

    Summary:
    This change processes `OptionCategory`s and `SubCommand`s as they
    are seen instead of caching them in the Option class and processing
    them later.  Doing so simplifies the work needed to be done by the Global
    parser and significantly reduces the size of the Option class to a mere 64
    bytes.

    Removing  the `OptionCategory` cache saved 24 bytes, and removing
    the `SubCommand` cache saved an additional 48 bytes, for a total of a
    72 byte reduction.

    Reviewed By: serge-sans-paille

    Tags: #llvm, #clang

    Differential Revision: https://reviews.llvm.org/D62105 — dhinton / ViewSVN
  24. [X86] EltsFromConsecutiveLoads - clean up element size calcs. NFCI.

    Determine the element/load size calculations earlier and assert that they are whole bytes in size. — rksimon / ViewSVN
  25. [LoopRotate + MemorySSA] Keep an <instruction-cloned instruction> map.

    Summary:
    The map kept in loop rotate is used for instruction remapping, in order
    to simplify the clones of instructions. Thus, if an instruction can be
    simplified, its simplified value is placed in the map, even when the
    clone is added to the IR. MemorySSA in contrast needs to know about that
    clone, so it can add an access for it.
    To resolve this: keep a different map for MemorySSA.

    Reviewers: george.burgess.iv

    Subscribers: jlebar, Prazek, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63680 — asbirlea / ViewSVN

#18423 (Jul 10, 2019 11:09:13 AM)

  1. [Remarks] Add cl::Hidden to -remarks-yaml-string-table

    It was showing up in a lot of unrelated tools. — thegameg / ViewSVN
  2. docs/GithubMove.rst: Remove obsolete information

    Summary:
    Remove references to the multirepo and update the document to
    reflect the current state of the github repository.

    Reviewers: mehdi_amini, jyknight

    Subscribers: jdoerfert, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D58420 — tstellar / ViewSVN
  3. [FileCheck] Use bool operator to test Expected

    Use bool() consistently to get boolean value of Error, Optional and
    Expected types in EXPECT calls. While static_cast is used in all cases
    but one, bool provides more clarity and makes more sense as a new
    default. — thopre / ViewSVN
  4. [AMDGPU] Increased the number of implicit argument bytes for both OpenCL and HIP (CLANG).

    To enable a new implicit kernel argument,
    increased the number of argument bytes from 48 to 56.

    Reviewed By: yaxunl

    Differential Revision: https://reviews.llvm.org/D63756 — cdevadas / ViewSVN
  5. [NFC][InstCombine] Redundant masking before left-shift (PR42563)

    alive proofs:
    a,b:     https://rise4fun.com/Alive/4zsf
    c,d,e,f: https://rise4fun.com/Alive/RC49

    Indeed, not all of these patterns are canonical.
    But since this fold will only produce a single instruction
    i'm really interested in handling even uncanonical patterns.

    Other than these 6 patterns, i can't think of any other
    reasonable variants right now, although i'm sure they exist.

    For now let's start with patterns where both shift amounts are variable,
    with trivial constant "offset" between them, since i believe this is
    both simplest to handle and i think this is most common.
    But again, there are likely other variants where we could use
    ValueTracking/ConstantRange to handle more cases.

    https://bugs.llvm.org/show_bug.cgi?id=42563 — lebedevri / ViewSVN
  6. [AMDGPU] Allow abs/neg source modifiers on v_cndmask_b32

    Summary:
    D59191 added support for these modifiers in the assembler and
    disassembler. This patch just teaches instruction selection that it can
    use them.

    Reviewers: arsenm, tstellar

    Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64497 — foad / ViewSVN
  7. [analyzer]Add user docs rst

    Summary:
    Add user documentation page. This is an empty page atm, later patches will add
    the specific user documentatoins.

    Reviewers: dkrupp

    Subscribers: whisperity, xazax.hun, baloghadamsoftware, szepet, rnkovacs, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, gamesh411, Charusso, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64494 — martong / ViewSVN
  8. Remove two unused member variables.

    They were added over 10 years ago in r66575 and have never been used as
    far as I can tell.

    (r67087 added similar fields to Compilation, and those are used.) — nico / ViewSVN
  9. [InstCombine] pow(C,x) -> exp2(log2(C)*x)

    Summary:
    Transform
    pow(C,x)

    To
    exp2(log2(C)*x)

    if C > 0, C != inf, C != NaN (and C is not power of 2, since we have some fold for such case already).

    log(C) is folded by the compiler and exp2 is much faster to compute than pow.

    Reviewers: spatel, efriedma, evandro

    Reviewed By: evandro

    Subscribers: lebedev.ri, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64099 — xbolva00 / ViewSVN
  10. [InferFunctionAttrs] add/adjust tests for dereferenceable; NFC

    Based on review comments for D64258. — spatel / ViewSVN
  11. [clangd] Filter out non-governed files from broadcast

    Summary:
    This also turns off implicit discovery of additional compilation
    databases.

    Reviewers: sammccall

    Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64247 — kadircet / ViewSVN
  12. gn build: Merge r365585 — nico / ViewSVN
  13. [clangd] Trim spaces around parsed include in include extractor — kadircet / ViewSVN
  14. [clangd] Add a flag to clangdServer rename function to control whether we want format the replacements.

    Summary:
    This would allow clangd embedders to use the ClangdServer::rename for other
    purposes (highlighting all the occurrences of the symbol in prepare
    stage).

    Reviewers: sammccall, ilya-biryukov

    Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64481 — hokein / ViewSVN
  15. [docs][llvm-symbolizer] Fix grammar — jhenderson / ViewSVN
  16. Loop pragma parsing. NFC.

    I would like to add some pragma handling here, but couldn't resist a little NFC
    and tidy up first.

    Differential Revision: https://reviews.llvm.org/D64471 — sjoerdmeijer / ViewSVN
  17. [X86] EltsFromConsecutiveLoads - cleanup Zero/Undef/Load element collection. NFCI. — rksimon / ViewSVN
  18. [MIPS GlobalISel] Select float and double phi

    Select float and double phi for MIPS32.

    Differential Revision: https://reviews.llvm.org/D64420 — petar.avramovic / ViewSVN
  19. [MIPS GlobalISel] Select float and double load and store

    Select float and double load and store for MIPS32.

    Differential Revision: https://reviews.llvm.org/D64419 — petar.avramovic / ViewSVN
  20. [FileCheck] Simplify numeric variable interface

    Summary:
    This patch simplifies 2 aspects in the FileCheckNumericVariable code.

    First, setValue() method is turned into a void function since being
    called only on undefined variable is an invariant and is now asserted
    rather than returned. This remove the assert from the callers.

    Second, clearValue() method is also turned into a void function since
    the only caller does not check its return value since it may be trying
    to clear the value of variable that is already cleared without this
    being noteworthy.

    Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk

    Subscribers: JonChesterfield, rogfer01, hfinkel, kristina, rnk, tra, arichardson, grimar, dblaikie, probinson, llvm-commits, hiraditya

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64231

    llvm-svn: 365249 — thopre / ViewSVN
  21. [FileCheck] Fix @LINE value after match failure

    Summary:
    The value of the FileCheckNumericVariable class instance representing
    the @LINE numeric variable is set and cleared respectively before and
    after substitutions are made, if any. However, when a substitution
    fails, the value is not cleared. This causes the next substitution of
    @LINE later on to give the wrong value since setValue is a nop if the
    value is already set. This is what caused failures after commit r365249.

    Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk

    Subscribers: hiraditya, llvm-commits, probinson, dblaikie, grimar, arichardson, tra, rnk, kristina, hfinkel, rogfer01, JonChesterfield

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64449 — thopre / ViewSVN
  22. [NFC][ARM] Convert lambdas to static helpers

    Break up and convert some of the lambdas in ARMLowOverheadLoops into
    static functions. — sam_parker / ViewSVN
  23. [X86] EltsFromConsecutiveLoads - LDBase is non-null. NFCI.

    Don't bother checking for LDBase != null - it should be (and we assert that it is). — rksimon / ViewSVN
  24. [DAGCombine] visitINSERT_SUBVECTOR - use uint64_t subvector index. NFCI.

    Keep the uint64_t type from getZExtValue() to stop truncation/extension overflow warnings in MSVC in subvector index math. — rksimon / ViewSVN
  25. [X86] EltsFromConsecutiveLoads - store Loads on a per-element basis. NFCI.

    Cache the LoadSDNode nodes so we can easily map to/from the element index instead of packing them together - this will be useful for future patches for PR16739 etc. — rksimon / ViewSVN
  26. [ELF] Loose a condition for relocation with a symbol

    Deleted code was introduced as a work around for a bug in the gold linker
    (http://sourceware.org/PR16794). Test case that was given as a reason for
    this part of code, the one on previous link, now works for the gold.
    This condition is too strict and when a code is compiled with debug info
    it forces generation of numerous relocations with symbol for architectures
    that do not have relocation addend.

    Reviewers: arsenm, espindola

    Reviewed By: MaskRay

    Differential Revision: https://reviews.llvm.org/D64327 — nikolaprica / ViewSVN
  27. [X86][SSE] EltsFromConsecutiveLoads - add basic dereferenceable support

    This patch checks to see if the vector element loads are based off a dereferenceable pointer that covers the entire vector width, in which case we don't need to have element loads at both extremes of the vector width - just the start (base pointer) of it.

    Another step towards partial vector loads......

    Differential Revision: https://reviews.llvm.org/D64205 — rksimon / ViewSVN
  28. Fix const/non-const lambda return type warning. NFCI. — rksimon / ViewSVN
  29. Fix "result of 32-bit shift implicitly converted to 64 bits" warning. NFCI. — rksimon / ViewSVN
  30. [SimpleLoopUnswitch] Don't consider unswitching `switch` insructions with one unique successor

    Only instructions with two or more unique successors should be considered for unswitching.

    Patch Author: Daniil Suchkov.

    Reviewers: reames, asbirlea, skatkov
    Reviewed By: skatkov
    Subscribers: hiraditya, llvm-commits
    Differential Revision: https://reviews.llvm.org/D64404 — skatkov / ViewSVN
  31. [AArch64] Fix vector vuqadd intrinsics operands

    Summary:
    Change the vuqadd vector instrinsics to have the second argument as unsigned values, not signed,
    accordingly to https://developer.arm.com/architectures/instruction-sets/simd-isas/neon/intrinsics

    Reviewers: LukeCheeseman, ostannard

    Reviewed By: ostannard

    Subscribers: javed.absar, kristof.beyls, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64211 — dnsampaio / ViewSVN
  32. [NFC][AArch64] Fix vector vsqadd intrinsics operands

    Summary:
    Change the vsqadd vector instrinsics to have the second argument as signed values, not unsigned,
    accordingly to https://developer.arm.com/architectures/instruction-sets/simd-isas/neon/intrinsics

    Reviewers: LukeCheeseman, ostannard

    Reviewed By: ostannard

    Subscribers: javed.absar, kristof.beyls, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64210 — dnsampaio / ViewSVN
  33. [clangd] Stop recording tokens before running clang-tidy

    modernize-trailing-return-type runs the preprocessor, breaking the token
    collection logic.

    This lead to a crash before, see the new test for a repro. — ibiryukov / ViewSVN
  34. [clangd] Consume error to avoid assertion failures

    When we fail to calculate #include insertion for a completion item.
    Note that this change does not add a test, although that would be good. — ibiryukov / ViewSVN

#18421 (Jul 10, 2019 3:57:59 AM)

  1. [ARM] Enable VPUSH/VPOP aliases when either MVE or VFP is present

    Summary:
    Use the same predicates as VSTMDB/VLDMIA since VPUSH/VPOP alias to
    these.

    Patch by Momchil Velikov.

    Reviewers: ostannard, simon_tatham, SjoerdMeijer, samparker, t.p.northover, dmgreen

    Reviewed By: dmgreen

    Subscribers: javed.absar, kristof.beyls, hiraditya, dmgreen, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64413 — miyuki / ViewSVN
  2. [docs][llvm-dwarfdump] Normalise some wording — jhenderson / ViewSVN
  3. [clangd] Added highlighting for class and enum types.

    Summary: Added highlighting for non-builtin types using VisitTypeLoc. Ignoring namespace qualifiers as for now.

    Reviewers: hokein, sammccall, ilya-biryukov

    Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64257 — jvikstrom / ViewSVN
  4. [test/Object/nm-trivial-object.test] - Remove 4 precompiled binaries.

    This converts 5 precompiled binaries to YAMLs,
    removes 4 from inputs and performs a cleanup.

    Differential revision: https://reviews.llvm.org/D64246 — grimar / ViewSVN
  5. [SimpleLoopUnswitch] Add a test case exposing a bug

    This test exposes a bug in SimpleLoopUnswitch that leads to a crash on
    assert(SuccessorsCount > 1 && "Cannot unswitch a condition without multiple distinct successors!");
    when SimpleLoopUnswitch considers unswitching of a loop by a switch with one successor.

    Fix will be submitted soon.

    Patch Author: Daniil Suchkov.

    Reviewers: reames, asbirlea, skatkov
    Reviewed By: skatkov
    Subscribers: zzheng, llvm-commits
    Differential Revision: https://reviews.llvm.org/D64403 — skatkov / ViewSVN
  6. [Syntax] Add assertion to catch invalid tokens early. NFC

    To help with identifiying root cause of a crash we are seeing. — ibiryukov / ViewSVN
  7. [NFC][AArch64] Fix vector vqtb[lx][1-4]_s8 operand

    Summary:
    Change the vqtb[lx][1-4]_s8 instrinsics to have the last argument as vector of unsigned valuse, not
    signed, accordingly to https://developer.arm.com/architectures/instruction-sets/simd-isas/neon/intrinsics

    Reviewers: LukeCheeseman, DavidSpickett

    Reviewed By: DavidSpickett

    Subscribers: DavidSpickett, javed.absar, kristof.beyls, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64243 — dnsampaio / ViewSVN
  8. Silence gcc warning by adding parentheses to condition [NFC]

    Without this gcc 7.4.0 complains with

      ../include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h:457:54: error: suggest parentheses around '&&' within '||' [-Werror=parentheses]
                        isArtifactCast(TmpDef->getOpcode()) &&
                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
                            "Expecting copy or artifact cast here");
                            ~ — uabelho / ViewSVN

#18420 (Jul 9, 2019 11:45:16 PM)

  1. Fix modular build issues caused by BitCodes.h

    Consolidate llvm::BWH_* statics into an enum to fix
    module build issues. This fixes the LLVM_Bitcode module,
    getting rid of -Wmodules-ambiguous-internal-linkage.

    Differential Revision: https://reviews.llvm.org/D64469 — Kristina Brooks / ViewSVN
  2. [ubsan][test] Restore float-divide-by-zero test

    Removed by rCTE365307 to fix buildbots. It can be restored now because D64317/rC365587 brought back -fsanitize=float-divide-by-zero — maskray / ViewSVN
  3. [analyzer] CastValueChecker: Remove a dump()

    Summary: Fix a nit. — charusso / ViewSVN

#18419 (Jul 9, 2019 6:52:20 PM)

  1. [X86] Limit getTargetConstantFromNode to only work on NormalLoads not extending loads.

    This seems to fix a failure reported by Jordan Rupprecht, but we
    don't have a reduced test case yet. — ctopper / ViewSVN
  2. [Support] Move llvm::MemoryBuffer to sys::fs::file_t

    Summary:
    On Windows, Posix integer file descriptors are a compatibility layer
    over native file handles provided by the C runtime. There is a hard
    limit on the maximum number of file descriptors that a process can open,
    and the limit is 8192. LLD typically doesn't run into this limit because
    it opens input files, maps them into memory, and then immediately closes
    the file descriptor. This prevents it from running out of FDs.

    For various reasons, I'd like to open handles to every input file and
    keep them open during linking. That requires migrating MemoryBuffer over
    to taking open native file handles instead of integer FDs.

    Reviewers: aganea, Bigcheese

    Reviewed By: aganea

    Subscribers: smeenai, silvas, mehdi_amini, hiraditya, steven_wu, dexonsmith, dang, llvm-commits, zturner

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63453 — rnk / ViewSVN
  3. [Driver] Add float-divide-by-zero back to supported sanitizers after D63793/rC365272

    D63793 removed float-divide-by-zero from the "undefined" set but it
    failed to add it to getSupportedSanitizers(), thus the sanitizer is
    rejected by the driver:

        clang-9: error: unsupported option '-fsanitize=float-divide-by-zero' for target 'x86_64-unknown-linux-gnu'

    Also, add SanitizerMask::FloatDivideByZero to a few other masks to make -fsanitize-trap, -fsanitize-recover, -fsanitize-minimal-runtime and -fsanitize-coverage work.

    Reviewed By: rsmith, vitalybuka

    Differential Revision: https://reviews.llvm.org/D64317 — maskray / ViewSVN
  4. AMDGPU/GlobalISel: Add support for wide loads >= 256-bits

    Summary:
    This adds support for the most commonly used wide load types:
    <8xi32>, <16xi32>, <4xi64>, and <8xi64>

    Reviewers: arsenm

    Reviewed By: arsenm

    Subscribers: hiraditya, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, rovka, kristof.beyls, dstuttard, tpr, t-tye, volkan, Petar.Avramovic, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57399 — tstellar / ViewSVN
  5. [analyzer] CastValueChecker: Model casts

    Summary:
    It models the LLVM casts:
    - `cast<>`
    - `dyn_cast<>`
    - `cast_or_null<>`
    - `dyn_cast_or_null<>`

    It has a very basic support without checking the `classof()` function.

    (It reapplies the reverted 'llvm-svn: 365582' patch with proper test file.)

    Reviewed By: NoQ

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64374 — charusso / ViewSVN
  6. Revert "[analyzer] CastValueChecker: Model casts"

    This reverts commit 27cf6664437efd640bb6db5594bafcce68fa2854. — charusso / ViewSVN
  7. GlobalISel: Implement lower for G_FCOPYSIGN

    In SelectionDAG AMDGPU treated these as legal, but this was mostly
    because the bitcasts required for FP types were painful. Theoretically
    the bitpattern should eventually match to bfi, so don't bother trying
    to get the patterns to import. — arsenm / ViewSVN
  8. [analyzer] CastValueChecker: Model casts

    Summary:
    It models the LLVM casts:
    - `cast<>`
    - `dyn_cast<>`
    - `cast_or_null<>`
    - `dyn_cast_or_null<>`

    It has a very basic support without checking the `classof()` function.

    Reviewed By: NoQ

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64374 — charusso / ViewSVN
  9. Revert [clang] DirectoryWatcher

    This reverts r365574 (git commit 31babea94a3ed38a140540f2252cf043dacec1f7) — rnk / ViewSVN
  10. [Bitcode] Explicitly include Bitstream/BitCodes.h and BitstreamWriter.h

    This fixes a modules issue. — thegameg / ViewSVN
  11. [MS] Treat ignored explicit calling conventions as an explicit __cdecl

    The CCCR_Ignore action is only used for Microsoft calling conventions,
    mainly because MSVC does not warn when a calling convention would be
    ignored by the current target. This behavior is actually somewhat
    important, since windows.h uses WINAPI (which expands to __stdcall)
    widely. This distinction didn't matter much before the introduction of
    __vectorcall to x64 and the ability to make that the default calling
    convention with /Gv. Now, we can't just ignore __stdcall for x64, we
    have to treat it as an explicit __cdecl annotation.

    Fixes PR42531 — rnk / ViewSVN
  12. [docs][Remarks] Add documentation for remarks in LLVM

    This adds documentation that describes remarks in LLVM.

    It aims at explaining what remarks are, how to enable them, and what
    users can do with the different modes.

    It lists all the available flags in LLVM (excluding clang), and
    describes the expected YAML structure as well as the tools that support
    the YAML format today.

    Differential Revision: https://reviews.llvm.org/D64355 — thegameg / ViewSVN
  13. [X86] Don't form extloads in combineExtInVec unless the load extension is legal.

    This should prevent doing this on pre-sse4.1 targets or for 256
    bit vectors without avx2.

    I don't know of a failure from this. Op legalization will probably
    take care of, but seemed better to be safe. — ctopper / ViewSVN
  14. [clangd] fix assert in test after r365531.

    Unverified because CMake/ninja seems to be broken... — sammccall / ViewSVN
  15. AMDGPU/GlobalISel: Fix legality for G_BUILD_VECTOR — arsenm / ViewSVN
  16. [clang] DirectoryWatcher

    Asynchronously monitors specified directory for changes and passes notifications to provided callback.

    Dependency for index-while-building.

    Differential Revision: https://reviews.llvm.org/D58418 — Jan Korous / ViewSVN
  17. [AMDGPU] gfx908 v_pk_fmac_f16 support

    Differential Revision: https://reviews.llvm.org/D64433 — rampitec / ViewSVN
  18. gn build: Merge r365536. — pcc / ViewSVN
  19. gn build: Merge r365532. — pcc / ViewSVN
  20. gn build: Merge r365541. — pcc / ViewSVN
  21. gn build: Merge r365531. — pcc / ViewSVN
  22. Add lldb type unit support to the release notes

    Reviewers: JDevlieghere, teemperor

    Subscribers: llvm-commits, lldb-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64366 — labath / ViewSVN
  23. GlobalISel: Combine unmerge of merge with intermediate cast

    This eliminates some illegal intermediate vectors when operations are
    scalarized. — arsenm / ViewSVN
  24. [Profile] Support raw/indexed profiles larger than 4GB

    rdar://45955976 — Vedant Kumar / ViewSVN
  25. [llvm-objdump] Keep warning for --disassemble-functions in correct order.

    relative to normal output when dumping archive files.

    prepare for PR35351.

    Reviewers: jhenderson, grimar, MaskRay, rupprecht

    Reviewed by: MaskRay, jhenderson

    Differential Revision: https://reviews.llvm.org/D64165 — yuanfang / ViewSVN
  26. [AMDGPU] gfx908 mAI instructions, MC part

    Differential Revision: https://reviews.llvm.org/D64446 — rampitec / ViewSVN
  27. build: use multiple `install` rather than building up a list

    Rather than building up a list to iterate over later, just create multiple
    install commands based on the configuration. This makes it easier to see what
    is getting installed and allows for the install handling to be centralised. NFC — Saleem Abdulrasool / ViewSVN
  28. Reland "[TSan] Improve handling of stack pointer mangling in {set,long}jmp, pt.8"

    Fix compilation errors related to `SANITIZER_GO` `#ifdef`s.

    Refine longjmp key management.  For Linux, re-implement key retrieval in
    C (instead of assembly).  Removal of `InitializeGuardPtr` and a final
    round of cleanups will be done in the next commit.

    Reviewed By: dvyukov

    Differential Revision: https://reviews.llvm.org/D64092

    llvm-svn: 365513 — yln / ViewSVN
  29. XFAIL clang/test/Headers/max_align.c on i686 — andusy / ViewSVN
  30. Use the Itanium C++ ABI for the pipe_builtin.cl test

    Certain OpenCL constructs cannot yet be mangled in the MS C++ ABI.
    Add a FIXME for it if anyone cares to implement it. — rnk / ViewSVN
  31. De-templatize non-dependent VS macro logic, NFC

    These macro definitions don't depend on the template parameter, so they
    don't need to be part of the template. Move them to a .cpp file. — rnk / ViewSVN
  32. [CXX] Exercise all paths through these tests.

    Differential Revision: https://reviews.llvm.org/D63894 — probinson / ViewSVN
  33. [TSan] Refine longjmp key management on Darwin

    NFC. — yln / ViewSVN

#18418 (Jul 9, 2019 3:04:13 PM)

  1. [SLP] Optimize getSpillCost(); NFCI

    For a given set of live values, the spill cost will always be the
    same for each call. Compute the cost once and multiply it by the
    number of calls.

    (I'm not sure this spill cost modeling makes sense if there are
    multiple calls, as the spill cost will likely be shared across
    calls in that case. But that's how it currently works.) — nikic / ViewSVN
  2. hwasan: Improve precision of checks using short granule tags.

    A short granule is a granule of size between 1 and `TG-1` bytes. The size
    of a short granule is stored at the location in shadow memory where the
    granule's tag is normally stored, while the granule's actual tag is stored
    in the last byte of the granule. This means that in order to verify that a
    pointer tag matches a memory tag, HWASAN must check for two possibilities:

    * the pointer tag is equal to the memory tag in shadow memory, or
    * the shadow memory tag is actually a short granule size, the value being loaded
      is in bounds of the granule and the pointer tag is equal to the last byte of
      the granule.

    Pointer tags between 1 to `TG-1` are possible and are as likely as any other
    tag. This means that these tags in memory have two interpretations: the full
    tag interpretation (where the pointer tag is between 1 and `TG-1` and the
    last byte of the granule is ordinary data) and the short tag interpretation
    (where the pointer tag is stored in the granule).

    When HWASAN detects an error near a memory tag between 1 and `TG-1`, it
    will show both the memory tag and the last byte of the granule. Currently,
    it is up to the user to disambiguate the two possibilities.

    Because this functionality obsoletes the right aligned heap feature of
    the HWASAN memory allocator (and because we can no longer easily test
    it), the feature is removed.

    Also update the documentation to cover both short granule tags and
    outlined checks.

    Differential Revision: https://reviews.llvm.org/D63908 — pcc / ViewSVN
  3. [PoisonChecking] Flesh out complete todo list for full coverage

    Note: I don't actually plan to implement all of the cases at the moment, I'm just documenting them for completeness.  There's a couple of cases left which are practically useful for me in debugging loop transforms, and I'll probably stop there for the moment. — reames / ViewSVN
  4. [X86][AMDGPU][DAGCombiner] Move call to allowsMemoryAccess into isLoadBitCastBeneficial/isStoreBitCastBeneficial to allow X86 to bypass it

    Basically the problem is that X86 doesn't set the Fast flag from
    allowsMemoryAccess on certain CPUs due to slow unaligned memory
    subtarget features. This prevents bitcasts from being folded into
    loads and stores. But all vector loads and stores of the same width
    are the same cost on X86.

    This patch merges the allowsMemoryAccess call into isLoadBitCastBeneficial to allow X86 to skip it.

    Differential Revision: https://reviews.llvm.org/D64295 — ctopper / ViewSVN
  5. Fix build error for VC STL, use llvm::make_unique — rnk / ViewSVN
  6. [AMDGPU] gfx908 register file changes

    Differential Revision: https://reviews.llvm.org/D64438 — rampitec / ViewSVN
  7. [OpenMP] Simplify getFloatTypeSemantics

    When the float point representations are the same on the host and on the target device,
    (`&Target->getLongDoubleFormat() == &AuxTarget->getLongDoubleFormat()`),
    we can just use `AuxTarget->getLongDoubleFormat()`.

    Reviewed By: ABataev

    Differential Revision: https://reviews.llvm.org/D64423 — maskray / ViewSVN
  8. [libFuzzer] Include FuzzedDataProvider.h in the test without "utils" subdir.

    Summary:
    This way the test would better match the intended usage of the header,
    plus it makes some additional testing (e.g. in CI) a bit easier to set up.

    Reviewers: morehouse

    Reviewed By: morehouse

    Subscribers: mgorny, delcypher, #sanitizers, llvm-commits

    Tags: #llvm, #sanitizers

    Differential Revision: https://reviews.llvm.org/D64440 — dor1s / ViewSVN
  9. [PoisonCheker] Support for out of bounds operands on shifts + insert/extractelement

    These are sources of poison which don't come from flags, but are clearly documented in the LangRef.  Left off support for scalable vectors for the moment, but should be easy to add if anyone is interested. — reames / ViewSVN
  10. Boilerplate for producing XCOFF object files from the PowerPC backend.

    Stubs out a number of the classes needed to produce a new object file format
    (XCOFF) for the powerpc-aix target. For testing input is an empty module which
    produces an object file with just a file header.

    Differential Revision: https://reviews.llvm.org/D61694 — sfertile / ViewSVN
  11. [X86] LowerToHorizontalOp - use count_if to count non-UNDEF ops. NFCI. — rksimon / ViewSVN
  12. [PoisonChecking] Add validation rules for "exact" on sdiv/udiv

    As directly stated in the LangRef, no ambiguity here... — reames / ViewSVN
  13. [ThinLTO] only emit used or referenced CFI records to index

    Summary: We emit CFI_FUNCTION_DEFS and CFI_FUNCTION_DECLS to
    distributed ThinLTO indices to implement indirect function call
    checking.  This change causes us to only emit entries for functions
    that are either defined or used by the module we're writing the index
    for (instead of all functions in the combined index), which can make
    the indices substantially smaller.

    Fixes PR42378.

    Reviewers: pcc, vitalybuka, eugenis

    Subscribers: mehdi_amini, hiraditya, dexonsmith, arphaman, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63887 — inglorion / ViewSVN
  14. Add a transform pass to make the executable semantics of poison explicit in the IR

    Implements a transform pass which instruments IR such that poison semantics are made explicit. That is, it provides a (possibly partial) executable semantics for every instruction w.r.t. poison as specified in the LLVM LangRef. There are obvious parallels to the sanitizer tools, but this pass is focused purely on the semantics of LLVM IR, not any particular source language.

    The target audience for this tool is developers working on or targetting LLVM from a frontend. The idea is to be able to take arbitrary IR (with the assumption of known inputs), and evaluate it concretely after having made poison semantics explicit to detect cases where either a) the original code executes UB, or b) a transform pass introduces UB which didn't exist in the original program.

    At the moment, this is mostly the framework and still needs to be fleshed out. By reusing existing code we have decent coverage, but there's a lot of cases not yet handled. What's here is good enough to handle interesting cases though; for instance, one of the recent LFTR bugs involved UB being triggered by integer induction variables with nsw/nuw flags would be reported by the current code.

    (See comment in PoisonChecking.cpp for full explanation and context)

    Differential Revision: https://reviews.llvm.org/D64215 — reames / ViewSVN
  15. Try to appease the Windows build bots.

    Several of the conditonal operators commited in llvm-svn: 365524 fail to compile
    on the windows buildbots. Converting to an if and early return to try to fix. — sfertile / ViewSVN
  16. Revert "[TSan] Improve handling of stack pointer mangling in {set,long}jmp, pt.8"

    This reverts commit 521f77e6351fd921f5a81027c7c72addca378989. — yln / ViewSVN
  17. [BPF] Fix a typo in the file name

    Fixed the file name from BPFAbstrctMemberAccess.cpp to
    BPFAbstractMemberAccess.cpp.

    Signed-off-by: Yonghong Song <yhs@fb.com> — yhs / ViewSVN
  18. [clangd] Rewrite of logic to rebuild the background index serving structures.

    Summary:
    Previously it was rebuilding every 5s by default, which was much too frequent
    in the long run - the goal was to provide an early build. There were also some
    bugs. There were also some bugs, and a dedicated thread was used in production
    but not tested.

    - rebuilds are triggered by #TUs built, rather than time. This should scale
       more sensibly to fast vs slow machines.
    - there are two separate indexed-TU thresholds to trigger index build: 5 TUs
       for the first build, 100 for subsequent rebuilds.
    - rebuild is always done on the regular indexing threads, and is affected by
       blockUntilIdle. This means unit/lit tests run the production configuration.
    - fixed a bug where we'd rebuild after attempting to load shards, even if there
       were no shards.
    - the BackgroundIndexTests don't really test the subtleties of the rebuild
       policy (for determinism, we call blockUntilIdle, so rebuild-on-idle is enough
       to pass the tests). Instead, we expose the rebuilder as a separate class and
       have fine-grained tests for it.

    Reviewers: kadircet

    Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, jfb, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64291 — sammccall / ViewSVN

#18417 (Jul 9, 2019 2:00:03 PM)

  1. gn build: Merge r365503. — pcc / ViewSVN
  2. [unittest] Add the missing bogus machine register info initialization. — hliao / ViewSVN
  3. [AMDGPU] gfx908 clang target

    Differential Revision: https://reviews.llvm.org/D64430 — rampitec / ViewSVN
  4. [AMDGPU] gfx908 target

    Differential Revision: https://reviews.llvm.org/D64429 — rampitec / ViewSVN
  5. [Object][XCOFF] Add support for 64-bit file header and section header dumping.

    Adds a readobj dumper for 32-bit and 64-bit section header tables, and extend
    support for the file-header dumping to include 64-bit object files. Also
    refactors the binary file parsing to be done in a helper function in an attempt
    to cleanup error handeling.

    Differential Revision: https://reviews.llvm.org/D63843 — sfertile / ViewSVN
  6. [InstCombine] add tests for trunc(load); NFC

    I'm not sure if transforming any of these is valid as
    a target-independent fold, but we might as well have
    a few tests here to confirm or deny our position. — spatel / ViewSVN
  7. [clangd] Show documentation in hover, and fetch docs from index if needed.

    Summary:
    I assume showing docs is going to be part of structured hover rendering, but
    it's unclear whether that's going to make clangd 9 so this is low-hanging fruit.

    (Also fixes a bug uncovered in FormattedString's plain text output: need blank
    lines when text follows codeblocks)

    Reviewers: kadircet

    Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64296 — sammccall / ViewSVN
  8. AMDGPU: Fix test failing since r365512 — arsenm / ViewSVN
  9. Revert "[HardwareLoops] NFC - move hardware loop checking code to isHardwareLoopProfitable()"

    This reverts commit d95557306585404893d610784edb3e32f1bfce18. — jsji / ViewSVN
  10. Add lit.local.cfg to llvm-objdump tests

    Add configuration file to llvm-objdump tests to treat files with .yaml
    extension as tests. — steven_wu / ViewSVN
  11. [ObjC] Add a warning for implicit conversions of a constant non-boolean value to BOOL

    rdar://51954400

    Differential revision: https://reviews.llvm.org/D63912 — epilk / ViewSVN
  12. Remove a comment that has been obsolete since r327679 — nico / ViewSVN
  13. [unittest] Add bogus register info.

    Reviewers: dstenb

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64421 — hliao / ViewSVN
  14. Rename llvm/test/tools/llvm-pdbdump to llvm/test/tools/llvm-pdbutil

    llvm-pdbdump was renamed to llvm-pdbutil long ago. This updates the test
    to be where you'd expect them to be. — nico / ViewSVN
  15. Make pdbdump-objfilename test work again

    - The test had extension .yaml, which lit doesn't execute in this
      directory. Rename to .test to make it run, and move the yaml bits
      into a dedicated file, like with all other tests in this dir.

    - llvm-pdbdump got renamed to llvm-pdbutil long ago, update test.

    - -dbi-module-info got renamed in r305032, update test for this too. — nico / ViewSVN
  16. [TSan] Improve handling of stack pointer mangling in {set,long}jmp, pt.8

    Refine longjmp key management.  For Linux, re-implement key retrieval in
    C (instead of assembly).  Removal of `InitializeGuardPtr` and a final
    round of cleanups will be done in the next commit.

    Reviewed By: dvyukov

    Differential Revision: https://reviews.llvm.org/D64092 — yln / ViewSVN
  17. [AMDGPU] Created a sub-register class for the return address operand in the return instruction.

    Function return instruction lowering, currently uses the fixed register pair s[30:31] for holding
    the return address. It can be any SGPR pair other than the CSRs. Created an SGPR pair sub-register class
    exclusive of the CSRs, and used this regclass while lowering the return instruction.

    Reviewed By: arsenm

    Differential Revision: https://reviews.llvm.org/D63924 — cdevadas / ViewSVN
  18. [RISCV] Fix ICE in isDesirableToCommuteWithShift

    Summary:
    There was an error being thrown from isDesirableToCommuteWithShift in
    some tests. This was tracked down to the method being called before
    legalisation, with an extended value type, not a machine value type.

    In the case I diagnosed, the error was only hit with an instruction sequence
    involving `i24`s in the add and shift. `i24` is not a Machine ValueType, it is
    instead an Extended ValueType which was causing the issue.

    I have added a test to cover this case, and fixed the error in the callback.

    Reviewers: asb, luismarques

    Reviewed By: asb

    Subscribers: hiraditya, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64425 — lenary / ViewSVN
  19. [AArch64][GlobalISel] Optimize conditional branches followed by unconditional branches

    If we have an icmp->brcond->br sequence where the brcond just branches to the
    next block jumping over the br, while the br takes the false edge, then we can
    modify the conditional branch to jump to the br's target while inverting the
    condition of the incoming icmp. This means we can eliminate the br as an
    unconditional branch to the fallthrough block.

    Differential Revision: https://reviews.llvm.org/D64354 — aemerson / ViewSVN
  20. Revert Revert Devirtualize destructor of final class.

    Revert r364359 and recommit r364100.

    r364100 was reverted as r364359 due to an internal test failure, but it was a
    false alarm. — yamauchi / ViewSVN
  21. [mips] Show error in case of using FP64 mode on pre MIPS32R2 CPU — atanasyan / ViewSVN
  22. [mips] Explicitly select `mips32r2` CPU for test cases require 64-bit FPU. NFC

    Support for 64-bit coprocessors on a 32-bit architecture
    was added in `MIPS32 R2`. — atanasyan / ViewSVN
  23. [NFC] Fixed tests — xbolva00 / ViewSVN
  24. [DAGCombine] LoadedSlice - keep getOffsetFromBase() uint64_t offset. NFCI.

    Keep the uint64_t type from getOffsetFromBase() to stop truncation/extension overflow warnings in MSVC in alignment math. — rksimon / ViewSVN
  25. [BPF] Support for compile once and run everywhere

    Introduction
    ============

    This patch added intial support for bpf program compile once
    and run everywhere (CO-RE).

    The main motivation is for bpf program which depends on
    kernel headers which may vary between different kernel versions.
    The initial discussion can be found at https://lwn.net/Articles/773198/.

    Currently, bpf program accesses kernel internal data structure
    through bpf_probe_read() helper. The idea is to capture the
    kernel data structure to be accessed through bpf_probe_read()
    and relocate them on different kernel versions.

    On each host, right before bpf program load, the bpfloader
    will look at the types of the native linux through vmlinux BTF,
    calculates proper access offset and patch the instruction.

    To accommodate this, three intrinsic functions
       preserve_{array,union,struct}_access_index
    are introduced which in clang will preserve the base pointer,
    struct/union/array access_index and struct/union debuginfo type
    information. Later, bpf IR pass can reconstruct the whole gep
    access chains without looking at gep itself.

    This patch did the following:
      . An IR pass is added to convert preserve_*_access_index to
        global variable who name encodes the getelementptr
        access pattern. The global variable has metadata
        attached to describe the corresponding struct/union
        debuginfo type.
      . An SimplifyPatchable MachineInstruction pass is added
        to remove unnecessary loads.
      . The BTF output pass is enhanced to generate relocation
        records located in .BTF.ext section.

    Typical CO-RE also needs support of global variables which can
    be assigned to different values to different hosts. For example,
    kernel version can be used to guard different versions of codes.
    This patch added the support for patchable externals as well.

    Example
    =======

    The following is an example.

      struct pt_regs {
        long arg1;
        long arg2;
      };
      struct sk_buff {
        int i;
        struct net_device *dev;
      };

      #define _(x) (__builtin_preserve_access_index(x))
      static int (*bpf_probe_read)(void *dst, int size, const void *unsafe_ptr) =
              (void *) 4;
      extern __attribute__((section(".BPF.patchable_externs"))) unsigned __kernel_version;
      int bpf_prog(struct pt_regs *ctx) {
        struct net_device *dev = 0;

        // ctx->arg* does not need bpf_probe_read
        if (__kernel_version >= 41608)
          bpf_probe_read(&dev, sizeof(dev), _(&((struct sk_buff *)ctx->arg1)->dev));
        else
          bpf_probe_read(&dev, sizeof(dev), _(&((struct sk_buff *)ctx->arg2)->dev));
        return dev != 0;
      }

    In the above, we want to translate the third argument of
    bpf_probe_read() as relocations.

      -bash-4.4$ clang -target bpf -O2 -g -S trace.c

    The compiler will generate two new subsections in .BTF.ext,
    OffsetReloc and ExternReloc.
    OffsetReloc is to record the structure member offset operations,
    and ExternalReloc is to record the external globals where
    only u8, u16, u32 and u64 are supported.

       BPFOffsetReloc Size
       struct SecLOffsetReloc for ELF section #1
       A number of struct BPFOffsetReloc for ELF section #1
       struct SecOffsetReloc for ELF section #2
       A number of struct BPFOffsetReloc for ELF section #2
       ...
       BPFExternReloc Size
       struct SecExternReloc for ELF section #1
       A number of struct BPFExternReloc for ELF section #1
       struct SecExternReloc for ELF section #2
       A number of struct BPFExternReloc for ELF section #2

      struct BPFOffsetReloc {
        uint32_t InsnOffset;    ///< Byte offset in this section
        uint32_t TypeID;        ///< TypeID for the relocation
        uint32_t OffsetNameOff; ///< The string to traverse types
      };

      struct BPFExternReloc {
        uint32_t InsnOffset;    ///< Byte offset in this section
        uint32_t ExternNameOff; ///< The string for external variable
      };

    Note that only externs with attribute section ".BPF.patchable_externs"
    are considered for Extern Reloc which will be patched by bpf loader
    right before the load.

    For the above test case, two offset records and one extern record
    will be generated:
      OffsetReloc records:
            .long   .Ltmp12                 # Insn Offset
            .long   7                       # TypeId
            .long   242                     # Type Decode String
            .long   .Ltmp18                 # Insn Offset
            .long   7                       # TypeId
            .long   242                     # Type Decode String

      ExternReloc record:
            .long   .Ltmp5                  # Insn Offset
            .long   165                     # External Variable

      In string table:
            .ascii  "0:1"                   # string offset=242
            .ascii  "__kernel_version"      # string offset=165

    The default member offset can be calculated as
        the 2nd member offset (0 representing the 1st member) of struct "sk_buff".

    The asm code:
        .Ltmp5:
        .Ltmp6:
                r2 = 0
                r3 = 41608
        .Ltmp7:
        .Ltmp8:
                .loc    1 18 9 is_stmt 0        # t.c:18:9
        .Ltmp9:
                if r3 > r2 goto LBB0_2
        .Ltmp10:
        .Ltmp11:
                .loc    1 0 9                   # t.c:0:9
        .Ltmp12:
                r2 = 8
        .Ltmp13:
                .loc    1 19 66 is_stmt 1       # t.c:19:66
        .Ltmp14:
        .Ltmp15:
                r3 = *(u64 *)(r1 + 0)
                goto LBB0_3
        .Ltmp16:
        .Ltmp17:
        LBB0_2:
                .loc    1 0 66 is_stmt 0        # t.c:0:66
        .Ltmp18:
                r2 = 8
                .loc    1 21 66 is_stmt 1       # t.c:21:66
        .Ltmp19:
                r3 = *(u64 *)(r1 + 8)
        .Ltmp20:
        .Ltmp21:
        LBB0_3:
                .loc    1 0 66 is_stmt 0        # t.c:0:66
                r3 += r2
                r1 = r10
        .Ltmp22:
        .Ltmp23:
        .Ltmp24:
                r1 += -8
                r2 = 8
                call 4

    For instruction .Ltmp12 and .Ltmp18, "r2 = 8", the number
    8 is the structure offset based on the current BTF.
    Loader needs to adjust it if it changes on the host.

    For instruction .Ltmp5, "r2 = 0", the external variable
    got a default value 0, loader needs to supply an appropriate
    value for the particular host.

    Compiling to generate object code and disassemble:
       0000000000000000 bpf_prog:
               0:       b7 02 00 00 00 00 00 00         r2 = 0
               1:       7b 2a f8 ff 00 00 00 00         *(u64 *)(r10 - 8) = r2
               2:       b7 02 00 00 00 00 00 00         r2 = 0
               3:       b7 03 00 00 88 a2 00 00         r3 = 41608
               4:       2d 23 03 00 00 00 00 00         if r3 > r2 goto +3 <LBB0_2>
               5:       b7 02 00 00 08 00 00 00         r2 = 8
               6:       79 13 00 00 00 00 00 00         r3 = *(u64 *)(r1 + 0)
               7:       05 00 02 00 00 00 00 00         goto +2 <LBB0_3>

        0000000000000040 LBB0_2:
               8:       b7 02 00 00 08 00 00 00         r2 = 8
               9:       79 13 08 00 00 00 00 00         r3 = *(u64 *)(r1 + 8)

        0000000000000050 LBB0_3:
              10:       0f 23 00 00 00 00 00 00         r3 += r2
              11:       bf a1 00 00 00 00 00 00         r1 = r10
              12:       07 01 00 00 f8 ff ff ff         r1 += -8
              13:       b7 02 00 00 08 00 00 00         r2 = 8
              14:       85 00 00 00 04 00 00 00         call 4

    Instructions #2, #5 and #8 need relocation resoutions from the loader.

    Signed-off-by: Yonghong Song <yhs@fb.com>

    Differential Revision: https://reviews.llvm.org/D61524 — yhs / ViewSVN
  26. [ADT] Remove MSVC-only "no two-phase name lookup" typename path.

    Now that we've dropped VS2015 support (D64326) we can use the regular codepath as VS2017+ correctly handles it — rksimon / ViewSVN
  27. [NFC] Added tests for D64285 — xbolva00 / ViewSVN
  28. [OpenCL][Sema] Improve address space support for blocks

    Summary:
    This patch ensures that the following code is compiled identically with
    -cl-std=CL2.0 and -fblocks -cl-std=c++.

        kernel void test(void) {
          void (^const block_A)(void) = ^{
            return;
          };
        }

    A new test is not added because cl20-device-side-enqueue.cl will cover
    this once blocks are further improved for C++ for OpenCL.

    The changes to Sema::PerformImplicitConversion are based on
    the parts of Sema::CheckAssignmentConstraints on block pointer
    conversions.

    Reviewers: rjmccall, Anastasia

    Subscribers: yaxunl, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64083 — mantognini / ViewSVN
  29. [OpenCL][Sema] Fix builtin rewriting

    This patch ensures built-in functions are rewritten using the proper
    parent declaration.

    Existing tests are modified to run in C++ mode to ensure the
    functionality works also with C++ for OpenCL while not increasing the
    testing runtime. — mantognini / ViewSVN
  30. Ignore trailing NullStmts in StmtExprs for GCC compatibility.

    Ignore trailing NullStmts in compound expressions when determining the result type and value. This is to match the GCC behavior which ignores semicolons at the end of compound expressions.

    Patch by Dominic Ferreira. — aaronballman / ViewSVN
  31. [HardwareLoops] NFC - move hardware loop checking code to isHardwareLoopProfitable()

    Differential Revision: https://reviews.llvm.org/D64197 — shchenz / ViewSVN

#18416 (Jul 9, 2019 9:07:37 AM)

  1. [ARM] Add test for MVE and no floats. NFC

    Adds a simple test that MVE with no floating point will be promoted correctly
    to software float calls. — dmgreen / ViewSVN
  2. [InferFunctionAttrs] add more tests for derefenceable; NFC — spatel / ViewSVN
  3. [MIPS GlobalISel] Register bank select for G_PHI. Select i64 phi

    Select gprb or fprb when def/use register operand of G_PHI is
    used/defined by either:
    copy to/from physical register or
    instruction with only one mapping available for that use/def operand.

    Integer s64 phi is handled with narrowScalar when mapping is applied,
    produced artifacts are combined away. Manually set gprb to all register
    operands of instructions created during narrowScalar.

    Differential Revision: https://reviews.llvm.org/D64351 — petar.avramovic / ViewSVN
  4. AMDGPU/GlobalISel: Prepare some tests for store selection

    Mostsly these would fail due to trying to use SI with a flat
    operation. Implementing global loads with MUBUF is more work than
    flat, so these won't be handled in the initial load selection.

    Others fail because store of s64 won't initially work, as the current
    set of patterns expect everything to be turned into v2i32. — arsenm / ViewSVN
  5. [MIPS GlobalISel] Regbanks for G_SELECT. Select i64, f32 and f64 select

    Select gprb or fprb when def/use register operand of G_SELECT is
    used/defined by either:
    copy to/from physical register or
    instruction with only one mapping available for that use/def operand.

    Integer s64 select is handled with narrowScalar when mapping is applied,
    produced artifacts are combined away. Manually set gprb to all register
    operands of instructions created during narrowScalar.

    For selection of floating point s32 or s64 select it is enough to set
    fprb of appropriate size and selectImpl will do the rest.

    Differential Revision: https://reviews.llvm.org/D64350 — petar.avramovic / ViewSVN
  6. AMDGPU/GlobalISel: Fix test — arsenm / ViewSVN
  7. [libclang] Fix hang in release / assertion in debug when evaluating value-dependent types.

    Expression evaluator doesn't work in value-dependent types, so ensure that the
    precondition it asserts holds.

    This fixes https://bugs.llvm.org/show_bug.cgi?id=42532

    Differential Revision: https://reviews.llvm.org/D64409 — emilio / ViewSVN
  8. [docs][llvm-dwarfdump] Fix wording — jhenderson / ViewSVN
  9. AMDGPU/GlobalISel: Legalize more concat_vectors — arsenm / ViewSVN
  10. AMDGPU/GlobalISel: Improve regbankselect for icmp s16

    Account for 64-bit scalar eq/ne when available. — arsenm / ViewSVN
  11. AMDGPU/GlobalISel: Make s16 G_ICMP legal — arsenm / ViewSVN
  12. [OPENMP]Fix the float point semantics handling on the device.

    The device should use the same float point representation as the host.
    Previous patch fixed the handling of the sizes of the float point types,
    but did not fixed the fp semantics. This patch makes target device to
    use the host fp semantics. this is required for the correct data
    transfer between host and device and correct codegen. — abataev / ViewSVN
  13. AMDGPU/GlobalISel: Select G_SUB — arsenm / ViewSVN
  14. AMDGPU/GlobalISel: Select G_UNMERGE_VALUES — arsenm / ViewSVN
  15. AMDGPU/GlobalISel: Select G_MERGE_VALUES — arsenm / ViewSVN
  16. gn build: Merge r365453 — nico / ViewSVN
  17. [ItaniumMangle] Refactor long double/__float128 mangling and fix the mangled code

    In gcc PowerPC, long double has 3 mangling schemes:

    -mlong-double-64: `e`
    -mlong-double-128 -mabi=ibmlongdouble: `g`
    -mlong-double-128 -mabi=ieeelongdouble: `u9__ieee128` (gcc <= 8.1: `U10__float128`)

    The current useFloat128ManglingForLongDouble() bisection is not suitable
    when we support -mlong-double-128 in clang (D64277). Replace
    useFloat128ManglingForLongDouble() with getLongDoubleMangling() and
    getFloat128Mangling() to allow 3 mangling schemes.

    I also deleted the `getTriple().isOSBinFormatELF()` check (the Darwin
    support has gone: https://reviews.llvm.org/D50988).

    For x86, change the mangled code of __float128 from `U10__float128` to `g`. `U10__float128` was wrongly copied from PowerPC.
    The test will be added to `test/CodeGen/x86-long-double.cpp` in D64277.

    Reviewed By: erichkeane

    Differential Revision: https://reviews.llvm.org/D64276 — maskray / ViewSVN
  18. [Syntax] Move roles into a separate enum

    To align with reviewer's suggestions. — ibiryukov / ViewSVN
  19. [CodeGen] AccelTable - remove non-constexpr (MSVC) Atom defs

    Now that we've dropped VS2015 support (D64326) we can enable the constexpr variables on MSVC builds as VS2017+ correctly handles them — rksimon / ViewSVN
  20. [mips] Implement sge/sgeu pseudo instructions

    The `sge/sgeu Dst, Src1, Src2/Imm` pseudo instructions set register
    `Dst` to 1 if register `Src1` is greater than or equal `Src2/Imm` and
    to 0 otherwise.

    Differential Revision: https://reviews.llvm.org/D64314 — atanasyan / ViewSVN
  21. [mips] Implement sgt/sgtu pseudo instructions with immediate operand

    The `sgt/sgtu Dst, Src1, Src2/Imm` pseudo instructions set register
    `Dst` to 1 if register `Src1` is greater than `Src2/Imm` and to 0 otherwise.

    Differential Revision: https://reviews.llvm.org/D64313 — atanasyan / ViewSVN
  22. [docs][llvm-objdump] Make some wording improvements/simplifications. — jhenderson / ViewSVN
  23. [NFC] [X86] Fix scan-build complaining

    Summary:
    Remove unused variable. This fixes bug:
    https://bugs.llvm.org/show_bug.cgi?id=42526

    Signed-off-by: pengfei <pengfei.wang@intel.com>

    Reviewers: RKSimon, xiangzhangllvm, craig.topper

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64389 — pengfei / ViewSVN
  24. OpaquePtr: pass type to CreateLoad. NFC.

    This is the one place in LLVM itself that used the deprecated API for
    CreateLoad, so I just added the type in. — Tim Northover / ViewSVN
  25. [ADT] Enable ArrayRef/StringRef is_assignable tests on MSVC

    Now that we've dropped VS2015 support (D64326) we can enable these static_asserts on MSVC builds as VS2017+ correctly handles them — rksimon / ViewSVN
  26. [NFC][AsmPrinter] Fix the formatting for the rL365467

    In addition, fix the build failure for the 'unused'
    variable. The variable was used inside the 'LLVM_DEBUG()'. — djtodoro / ViewSVN
  27. OpaquePtr: add Type parameter to Loads analysis API.

    This makes the functions in Loads.h require a type to be specified
    independently of the pointer Value so that when pointers have no structure
    other than address-space, it can still do its job.

    Most callers had an obvious memory operation handy to provide this type, but a
    SROA and ArgumentPromotion were doing more complicated analysis. They get
    updated to merge the properties of the various instructions they were
    considering. — Tim Northover / ViewSVN
  28. [DwarfDebug] Dump call site debug info

    Dump the DWARF information about call sites and call site parameters into
    debug info sections.

    The patch also provides an interface for the interpretation of instructions
    that could load values of a call site parameters in order to generate DWARF
    about the call site parameters.

    ([13/13] Introduce the debug entry values.)

    Co-authored-by: Ananth Sowda <asowda@cisco.com>
    Co-authored-by: Nikola Prica <nikola.prica@rt-rk.com>
    Co-authored-by: Ivan Baev <ibaev@cisco.com>

    Differential Revision: https://reviews.llvm.org/D60716 — djtodoro / ViewSVN
  29. Reland r365355: [Syntax] Introduce syntax trees

    With a fix to a PS4 buildbot crash. — ibiryukov / ViewSVN
  30. Revert rL365355 : [Syntax] Introduce syntax trees

    Summary:
    A tooling-focused alternative to the AST. This commit focuses on the
    memory-management strategy and the structure of the AST.

    More to follow later:
      - Operations to mutate the syntax trees and corresponding textual
        replacements.
      - Mapping between clang AST nodes and syntax tree nodes.
      - More node types corresponding to the language constructs.

    Reviewers: sammccall

    Reviewed By: sammccall

    Subscribers: llvm-commits, mgorny, cfe-commits

    Tags: #clang, #llvm

    Differential Revision: https://reviews.llvm.org/D61637
    ........
    Fixes buildbots which were crashing on SyntaxTests.exe — rksimon / ViewSVN
  31. [ASTImporter] Added visibility context check for EnumDecl.

    Summary:
    ASTImporter makes now difference between enums with same name in different translation
    units if these are not visible outside.
    ("Scoped enums" are not handled yet.)

    Reviewers: martong, a.sidorin, shafik, a_sidorin

    Reviewed By: a_sidorin

    Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D62484 — balazske / ViewSVN
  32. Enhance abseil-faster-strsplit-delimiter to handle other non-printable characters.

    Summary:
    Currently it fails on cases like '\001'.

    Note: Since `StringLiteral::outputString` dumps most nonprintable
    characters in octal value, the exact string literal format isn't preserved,
    e.g. `"\x01"` becomes `'\001'`.

    Reviewers: gribozavr

    Reviewed By: gribozavr

    Subscribers: lebedev.ri, Eugene.Zelenko, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64151

    Patch by Xiaoyi Zhang. — gribozavr / ViewSVN
  33. [RISCV] Fix RISCVTTIImpl::getIntImmCost for immediates where getMinSignedBits() > 64

    APInt::getSExtValue will assert if getMinSignedBits() > 64. This can happen,
    for instance, if examining an i128. Avoid this assertion by checking
    Imm.getMinSignedBits() <= 64 before doing
    getTLI()->isLegalAddImmediate(Imm.getSExtValue()). We could directly check
    getMinSignedBits() <= 12 but it seems better to reuse the isLegalAddImmediate
    helper for this.

    Differential Revision: https://reviews.llvm.org/D64390 — asb / ViewSVN
  34. [docs][llvm-nm] Improve some wording

    In particular, the --debug-syms switch really doesn't have anything to
    do with debuggers, so I've updated the document accordingly. — jhenderson / ViewSVN
  35. Fixed assertion — sureyeaah / ViewSVN
  36. [SelectionDAG] Simplify some calls to getSetCCResultType. NFC

    DAGTypeLegalizer and SelectionDAGLegalize has helper
    functions wrapping the call to TLI.getSetCCResultType(...).
    Use those helpers in more places. — bjope / ViewSVN
  37. [LegalizeTypes] Fix saturation bug for smul.fix.sat

    Summary:
    Make sure we use SETGE instead of SETGT when checking
    if the sign bit is zero at SMULFIXSAT expansion.

    The faulty expansion occured when doing "expand" of
    SMULFIXSAT and the scale was exactly matching the
    size of the smaller type. For example doing
      i64 Z = SMULFIXSAT X, Y, 32
    and expanding X/Y/Z into using two i32 values.

    The problem was that we sometimes did not saturate
    to min when overflowing.

    Here is an example using Q3.4 numbers:

    Consider that we are multiplying X and Y.
      X = 0x80 (-8.0 as Q3.4)
      Y = 0x20 (2.0 as Q3.4)
    To avoid loss of precision we do a widening
    multiplication, getting a 16 bit result
      Z = 0xF000 (-16.0 as Q7.8)

    To detect negative overflow we should check if
    the five most significant bits in Z are less than -1.
    Assume that we name the 4 most significant bits
    as HH and the next 4 bits as HL. Then we can do the
    check by examining if
    (HH < -1) or (HH == -1 && "sign bit in HL is zero").

    The fault was that we have been doing the check as
    (HH < -1) or (HH == -1 && HL > 0)
    instead of
    (HH < -1) or (HH == -1 && HL >= 0).

    In our example HH is -1 and HL is 0, so the old
    code did not trigger saturation and simply truncated
    the result to 0x00 (0.0). With the bugfix we instead
    detect that we should saturate to min, and the result
    will be set to 0x80 (-8.0).

    Reviewers: leonardchan, bevinh

    Reviewed By: leonardchan

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64331 — bjope / ViewSVN
  38. Retire VS2015 Support

    As proposed here: https://lists.llvm.org/pipermail/llvm-dev/2019-June/133147.html

    This patch raises the minimum supported version to build LLVM/Clang to Visual Studio 2017.

    Differential Revision: https://reviews.llvm.org/D64326 — rksimon / ViewSVN
  39. dummy variable extraction on a function scope

    Summary:
    - Added extraction to a dummy variable
    - using auto for the dummy variable type for now
    - Works on a function scope
    - Adding braces to create a compound statement not supported yet
    - added unit tests

    Reviewers: sammccall, kadircet

    Subscribers: mgorny, jkorous, arphaman, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D63773 — sureyeaah / ViewSVN
  40. Retire VS2015 Support

    As proposed here: https://lists.llvm.org/pipermail/llvm-dev/2019-June/133147.html

    This patch raises the minimum supported version to build LLVM/Clang to Visual Studio 2017.

    Differential Revision: https://reviews.llvm.org/D64326 — rksimon / ViewSVN
  41. [docs][llvm-dwarfdump] Make some option descriptions clearer and more precise

    Some of the wording in the doc (taken largely from the help text), was a
    little imprecise in some cases, so this patch makes it a little more
    precise.

    Reviewed by: JDevlieghere, probinson

    Differential Revision: https://reviews.llvm.org/D64332 — jhenderson / ViewSVN
  42. [llvm-profdata] Don't make the output overwrite the input file.

    Some file systems may not allow this behavior, the test fails on our internal
    system ("Permission denied"). — hokein / ViewSVN
  43. Fixing @llvm.memcpy not honoring volatile.
    This is explicitly not addressing target-specific code, or calls to memcpy.

    Summary: https://bugs.llvm.org/show_bug.cgi?id=42254

    Reviewers: courbet

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63215 — gchatelet / ViewSVN
  44. Revert r364515 and r364524

    Jordan reports on llvm-commits a performance regression with r364515,
    backing the patch out while it's investigated. — jmorse / ViewSVN
  45. [NFC][PowerPC] Added a test to show current codegen of MachinePRE — lkail / ViewSVN
  46. Remove trailing whitespaces in the Language Extensions doc — sylvestre / ViewSVN
  47. Add AlignConsecutiveMacros to the clang release notes — sylvestre / ViewSVN
  48. Reland "[LiveDebugValues] Emit the debug entry values"

    Emit replacements for clobbered parameters location if the parameter
    has unmodified value throughout the funciton. This is basic scenario
    where we can use the debug entry values.

    ([12/13] Introduce the debug entry values.)

    Co-authored-by: Ananth Sowda <asowda@cisco.com>
    Co-authored-by: Nikola Prica <nikola.prica@rt-rk.com>
    Co-authored-by: Ivan Baev <ibaev@cisco.com>

    Differential Revision: https://reviews.llvm.org/D58042 — djtodoro / ViewSVN

#18415 (Jul 9, 2019 1:50:12 AM)

  1. [Loop Peeling] Add support for peeling of loops with multiple exits

    This patch modifies the loop peeling transformation so that
    it does not expect that there is only one loop exit from latch.

    It modifies only transformation. Update of branch weights remains
    only for exit from latch.

    The motivation is that in follow-up patch I plan to enable loop peeling for
    loops with multiple exits but only if other exits then from latch one goes to
    block with call to deopt.

    For now this patch is NFC.

    Reviewers: reames, mkuper, iajbar, fhahn
    Reviewed By: reames, fhahn
    Subscribers: zzheng, llvm-commits
    Differential Revision: https://reviews.llvm.org/D63921 — skatkov / ViewSVN
  2. Prepare for making SwitchInstProfUpdateWrapper strict

    This patch removes the test part that relates to the non-strict
    behavior of SwitchInstProfUpdateWrapper and changes
    the assertion to llvm_unreachable() to allow the check in
    release builds.
    This patch prepares SwitchInstProfUpdateWrapper to become
    strict with one line change. That is need to revert it easily
    if any failure will arise. — yrouban / ViewSVN
  3. [BPF] Preserve debuginfo array/union/struct type/access index

    For background of BPF CO-RE project, please refer to
      http://vger.kernel.org/bpfconf2019.html
    In summary, BPF CO-RE intends to compile bpf programs
    adjustable on struct/union layout change so the same
    program can run on multiple kernels with adjustment
    before loading based on native kernel structures.

    In order to do this, we need keep track of GEP(getelementptr)
    instruction base and result debuginfo types, so we
    can adjust on the host based on kernel BTF info.
    Capturing such information as an IR optimization is hard
    as various optimization may have tweaked GEP and also
    union is replaced by structure it is impossible to track
    fieldindex for union member accesses.

    Three intrinsic functions, preserve_{array,union,struct}_access_index,
    are introducted.
      addr = preserve_array_access_index(base, index, dimension)
      addr = preserve_union_access_index(base, di_index)
      addr = preserve_struct_access_index(base, gep_index, di_index)
    here,
      base: the base pointer for the array/union/struct access.
      index: the last access index for array, the same for IR/DebugInfo layout.
      dimension: the array dimension.
      gep_index: the access index based on IR layout.
      di_index: the access index based on user/debuginfo types.

    If using these intrinsics blindly, i.e., transforming all GEPs
    to these intrinsics and later on reducing them to GEPs, we have
    seen up to 7% more instructions generated. To avoid such an overhead,
    a clang builtin is proposed:
      base = __builtin_preserve_access_index(base)
    such that user wraps to-be-relocated GEPs in this builtin
    and preserve_*_access_index intrinsics only apply to
    those GEPs. Such a buyin will prevent performance degradation
    if people do not use CO-RE, even for programs which use
    bpf_probe_read().

    For example, for the following example,
      $ cat test.c
      struct sk_buff {
         int i;
         int b1:1;
         int b2:2;
         union {
           struct {
             int o1;
             int o2;
           } o;
           struct {
             char flags;
             char dev_id;
           } dev;
           int netid;
         } u[10];
      };

      static int (*bpf_probe_read)(void *dst, int size, const void *unsafe_ptr)
          = (void *) 4;

      #define _(x) (__builtin_preserve_access_index(x))

      int bpf_prog(struct sk_buff *ctx) {
        char dev_id;
        bpf_probe_read(&dev_id, sizeof(char), _(&ctx->u[5].dev.dev_id));
        return dev_id;
      }
      $ clang -target bpf -O2 -g -emit-llvm -S -mllvm -print-before-all \
        test.c >& log

    The generated IR looks like below:
      ...
      define dso_local i32 @bpf_prog(%struct.sk_buff*) #0 !dbg !15 {
        %2 = alloca %struct.sk_buff*, align 8
        %3 = alloca i8, align 1
        store %struct.sk_buff* %0, %struct.sk_buff** %2, align 8, !tbaa !45
        call void @llvm.dbg.declare(metadata %struct.sk_buff** %2, metadata !43, metadata !DIExpression()), !dbg !49
        call void @llvm.lifetime.start.p0i8(i64 1, i8* %3) #4, !dbg !50
        call void @llvm.dbg.declare(metadata i8* %3, metadata !44, metadata !DIExpression()), !dbg !51
        %4 = load i32 (i8*, i32, i8*)*, i32 (i8*, i32, i8*)** @bpf_probe_read, align 8, !dbg !52, !tbaa !45
        %5 = load %struct.sk_buff*, %struct.sk_buff** %2, align 8, !dbg !53, !tbaa !45
        %6 = call [10 x %union.anon]* @llvm.preserve.struct.access.index.p0a10s_union.anons.p0s_struct.sk_buffs(
             %struct.sk_buff* %5, i32 2, i32 3), !dbg !53, !llvm.preserve.access.index !19
        %7 = call %union.anon* @llvm.preserve.array.access.index.p0s_union.anons.p0a10s_union.anons(
             [10 x %union.anon]* %6, i32 1, i32 5), !dbg !53
        %8 = call %union.anon* @llvm.preserve.union.access.index.p0s_union.anons.p0s_union.anons(
             %union.anon* %7, i32 1), !dbg !53, !llvm.preserve.access.index !26
        %9 = bitcast %union.anon* %8 to %struct.anon.0*, !dbg !53
        %10 = call i8* @llvm.preserve.struct.access.index.p0i8.p0s_struct.anon.0s(
             %struct.anon.0* %9, i32 1, i32 1), !dbg !53, !llvm.preserve.access.index !34
        %11 = call i32 %4(i8* %3, i32 1, i8* %10), !dbg !52
        %12 = load i8, i8* %3, align 1, !dbg !54, !tbaa !55
        %13 = sext i8 %12 to i32, !dbg !54
        call void @llvm.lifetime.end.p0i8(i64 1, i8* %3) #4, !dbg !56
        ret i32 %13, !dbg !57
      }

      !19 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "sk_buff", file: !3, line: 1, size: 704, elements: !20)
      !26 = distinct !DICompositeType(tag: DW_TAG_union_type, scope: !19, file: !3, line: 5, size: 64, elements: !27)
      !34 = distinct !DICompositeType(tag: DW_TAG_structure_type, scope: !26, file: !3, line: 10, size: 16, elements: !35)

    Note that @llvm.preserve.{struct,union}.access.index calls have metadata llvm.preserve.access.index
    attached to instructions to provide struct/union debuginfo type information.

    For &ctx->u[5].dev.dev_id,
      . The "%6 = ..." represents struct member "u" with index 2 for IR layout and index 3 for DI layout.
      . The "%7 = ..." represents array subscript "5".
      . The "%8 = ..." represents union member "dev" with index 1 for DI layout.
      . The "%10 = ..." represents struct member "dev_id" with index 1 for both IR and DI layout.

    Basically, traversing the use-def chain recursively for the 3rd argument of bpf_probe_read() and
    examining all preserve_*_access_index calls, the debuginfo struct/union/array access index
    can be achieved.

    The intrinsics also contain enough information to regenerate codes for IR layout.
    For array and structure intrinsics, the proper GEP can be constructed.
    For union intrinsics, replacing all uses of "addr" with "base" should be enough.

    Signed-off-by: Yonghong Song <yhs@fb.com>

    Differential Revision: https://reviews.llvm.org/D61809 — yhs / ViewSVN
  4. [LoopInfo] Update getExitEdges to accept vector of pairs for non const BasicBlock

    D63921 requires getExitEdges fills a vector of Edge pairs where
    BasicBlocks are not constant.

    The rest Loop API mostly returns non-const BasicBlocks, so to be more consistent with
    other Loop API getExitEdges is modified to return non-const BasicBlocks as well.

    This is an alternative solution to D64060.

    Reviewers: reames, fhahn
    Reviewed By: reames, fhahn
    Subscribers: hiraditya, llvm-commits
    Differential Revision: https://reviews.llvm.org/D64309 — skatkov / ViewSVN
  5. Revert "[BPF] Preserve debuginfo array/union/struct type/access index"

    This reverts commit r365435.

    Forgot adding the Differential Revision link. Will add to the
    commit message and resubmit. — yhs / ViewSVN
  6. [BPF] Preserve debuginfo array/union/struct type/access index

    For background of BPF CO-RE project, please refer to
      http://vger.kernel.org/bpfconf2019.html
    In summary, BPF CO-RE intends to compile bpf programs
    adjustable on struct/union layout change so the same
    program can run on multiple kernels with adjustment
    before loading based on native kernel structures.

    In order to do this, we need keep track of GEP(getelementptr)
    instruction base and result debuginfo types, so we
    can adjust on the host based on kernel BTF info.
    Capturing such information as an IR optimization is hard
    as various optimization may have tweaked GEP and also
    union is replaced by structure it is impossible to track
    fieldindex for union member accesses.

    Three intrinsic functions, preserve_{array,union,struct}_access_index,
    are introducted.
      addr = preserve_array_access_index(base, index, dimension)
      addr = preserve_union_access_index(base, di_index)
      addr = preserve_struct_access_index(base, gep_index, di_index)
    here,
      base: the base pointer for the array/union/struct access.
      index: the last access index for array, the same for IR/DebugInfo layout.
      dimension: the array dimension.
      gep_index: the access index based on IR layout.
      di_index: the access index based on user/debuginfo types.

    If using these intrinsics blindly, i.e., transforming all GEPs
    to these intrinsics and later on reducing them to GEPs, we have
    seen up to 7% more instructions generated. To avoid such an overhead,
    a clang builtin is proposed:
      base = __builtin_preserve_access_index(base)
    such that user wraps to-be-relocated GEPs in this builtin
    and preserve_*_access_index intrinsics only apply to
    those GEPs. Such a buyin will prevent performance degradation
    if people do not use CO-RE, even for programs which use
    bpf_probe_read().

    For example, for the following example,
      $ cat test.c
      struct sk_buff {
         int i;
         int b1:1;
         int b2:2;
         union {
           struct {
             int o1;
             int o2;
           } o;
           struct {
             char flags;
             char dev_id;
           } dev;
           int netid;
         } u[10];
      };

      static int (*bpf_probe_read)(void *dst, int size, const void *unsafe_ptr)
          = (void *) 4;

      #define _(x) (__builtin_preserve_access_index(x))

      int bpf_prog(struct sk_buff *ctx) {
        char dev_id;
        bpf_probe_read(&dev_id, sizeof(char), _(&ctx->u[5].dev.dev_id));
        return dev_id;
      }
      $ clang -target bpf -O2 -g -emit-llvm -S -mllvm -print-before-all \
        test.c >& log

    The generated IR looks like below:
      ...
      define dso_local i32 @bpf_prog(%struct.sk_buff*) #0 !dbg !15 {
        %2 = alloca %struct.sk_buff*, align 8
        %3 = alloca i8, align 1
        store %struct.sk_buff* %0, %struct.sk_buff** %2, align 8, !tbaa !45
        call void @llvm.dbg.declare(metadata %struct.sk_buff** %2, metadata !43, metadata !DIExpression()), !dbg !49
        call void @llvm.lifetime.start.p0i8(i64 1, i8* %3) #4, !dbg !50
        call void @llvm.dbg.declare(metadata i8* %3, metadata !44, metadata !DIExpression()), !dbg !51
        %4 = load i32 (i8*, i32, i8*)*, i32 (i8*, i32, i8*)** @bpf_probe_read, align 8, !dbg !52, !tbaa !45
        %5 = load %struct.sk_buff*, %struct.sk_buff** %2, align 8, !dbg !53, !tbaa !45
        %6 = call [10 x %union.anon]* @llvm.preserve.struct.access.index.p0a10s_union.anons.p0s_struct.sk_buffs(
             %struct.sk_buff* %5, i32 2, i32 3), !dbg !53, !llvm.preserve.access.index !19
        %7 = call %union.anon* @llvm.preserve.array.access.index.p0s_union.anons.p0a10s_union.anons(
             [10 x %union.anon]* %6, i32 1, i32 5), !dbg !53
        %8 = call %union.anon* @llvm.preserve.union.access.index.p0s_union.anons.p0s_union.anons(
             %union.anon* %7, i32 1), !dbg !53, !llvm.preserve.access.index !26
        %9 = bitcast %union.anon* %8 to %struct.anon.0*, !dbg !53
        %10 = call i8* @llvm.preserve.struct.access.index.p0i8.p0s_struct.anon.0s(
             %struct.anon.0* %9, i32 1, i32 1), !dbg !53, !llvm.preserve.access.index !34
        %11 = call i32 %4(i8* %3, i32 1, i8* %10), !dbg !52
        %12 = load i8, i8* %3, align 1, !dbg !54, !tbaa !55
        %13 = sext i8 %12 to i32, !dbg !54
        call void @llvm.lifetime.end.p0i8(i64 1, i8* %3) #4, !dbg !56
        ret i32 %13, !dbg !57
      }

      !19 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "sk_buff", file: !3, line: 1, size: 704, elements: !20)
      !26 = distinct !DICompositeType(tag: DW_TAG_union_type, scope: !19, file: !3, line: 5, size: 64, elements: !27)
      !34 = distinct !DICompositeType(tag: DW_TAG_structure_type, scope: !26, file: !3, line: 10, size: 16, elements: !35)

    Note that @llvm.preserve.{struct,union}.access.index calls have metadata llvm.preserve.access.index
    attached to instructions to provide struct/union debuginfo type information.

    For &ctx->u[5].dev.dev_id,
      . The "%6 = ..." represents struct member "u" with index 2 for IR layout and index 3 for DI layout.
      . The "%7 = ..." represents array subscript "5".
      . The "%8 = ..." represents union member "dev" with index 1 for DI layout.
      . The "%10 = ..." represents struct member "dev_id" with index 1 for both IR and DI layout.

    Basically, traversing the use-def chain recursively for the 3rd argument of bpf_probe_read() and
    examining all preserve_*_access_index calls, the debuginfo struct/union/array access index
    can be achieved.

    The intrinsics also contain enough information to regenerate codes for IR layout.
    For array and structure intrinsics, the proper GEP can be constructed.
    For union intrinsics, replacing all uses of "addr" with "base" should be enough.

    Signed-off-by: Yonghong Song <yhs@fb.com> — yhs / ViewSVN
  7. [NFC][PowerPC] Fixed unused variable 'NewInstr'. — lkail / ViewSVN
  8. [AMDGPU] Added td definitions for HW regs

    Infrastructure work for future commit. NFC.

    Differential Revision: https://reviews.llvm.org/D64370 — rampitec / ViewSVN
  9. [AMDGPU] Always use s_memtime for readcyclecounter

    Differential Revision: https://reviews.llvm.org/D64369 — rampitec / ViewSVN
  10. [PowerPC][Peephole] Combine extsw and sldi after instruction selection

    Summary:
    `extsw` and `sldi` are supposed to be combined if they are in the same
    BB in instruction selection phase. This patch handles the case where
    extsw and sldi are not in the same BB.

    Differential Revision: https://reviews.llvm.org/D63806 — lkail / ViewSVN
  11. [PowerPC][NFC] remove redundant function isVFReg(). — shchenz / ViewSVN
  12. [MachinePipeliner] Fix Phi refers to Phi in same stage in 1st epilogue

    Summary:
    This is exposed by functional testing on PowerPC.
    In some pipelined loops, Phi refer to phi did not get value defined by
    the Phi, hence getting wrong value later.

    As the comment mentioned, we should "use the value defined by the Phi,
    unless we're generating the firstepilog and the Phi refers to a Phi
    in a different stage.", so Phi refering to same stage Phi should use
    the value defined by the Phi here.

    Reviewers: bcahoon, hfinkel

    Reviewed By: hfinkel

    Subscribers: MaskRay, wuzish, nemanjai, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64035 — jsji / ViewSVN
  13. [PowerPC][MachinePipeliner][NFC] Add a testcase for Phi bug. — jsji / ViewSVN
  14. [WebAssembly] Make sret parameter work with AddMissingPrototypes

    Summary:
    Even with functions with `no-prototype` attribute, there can be an
    argument `sret` (structure return) attribute, which is an optimization
    when a function return type is a struct. Fixes PR42420.

    Reviewers: sbc100

    Subscribers: dschuff, jgravelle-google, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64318 — aheejin / ViewSVN
  15. [LoopPred] Stylistic improvement to recently added NE/EQ normalization [NFC] — reames / ViewSVN
  16. [sanitizers][windows] FIX: Rtl-Heap Interception and tests

       - Adds interceptors for Rtl[Allocate|Free|Size|ReAllocate]Heap
       - Adds unit tests for the new interceptors and expands HeapAlloc
         tests to demonstrate new functionality.
       Reviewed as D62927
       - adds fixes for ~win and x64 tests

    llvm-svn: 365381 — mcgov / ViewSVN
  17. [BPF] add new intrinsics preserve_{array,union,struct}_access_index

    For background of BPF CO-RE project, please refer to
      http://vger.kernel.org/bpfconf2019.html
    In summary, BPF CO-RE intends to compile bpf programs
    adjustable on struct/union layout change so the same
    program can run on multiple kernels with adjustment
    before loading based on native kernel structures.

    In order to do this, we need keep track of GEP(getelementptr)
    instruction base and result debuginfo types, so we
    can adjust on the host based on kernel BTF info.
    Capturing such information as an IR optimization is hard
    as various optimization may have tweaked GEP and also
    union is replaced by structure it is impossible to track
    fieldindex for union member accesses.

    Three intrinsic functions, preserve_{array,union,struct}_access_index,
    are introducted.
      addr = preserve_array_access_index(base, index, dimension)
      addr = preserve_union_access_index(base, di_index)
      addr = preserve_struct_access_index(base, gep_index, di_index)
    here,
      base: the base pointer for the array/union/struct access.
      index: the last access index for array, the same for IR/DebugInfo layout.
      dimension: the array dimension.
      gep_index: the access index based on IR layout.
      di_index: the access index based on user/debuginfo types.

    For example, for the following example,
      $ cat test.c
      struct sk_buff {
         int i;
         int b1:1;
         int b2:2;
         union {
           struct {
             int o1;
             int o2;
           } o;
           struct {
             char flags;
             char dev_id;
           } dev;
           int netid;
         } u[10];
      };

      static int (*bpf_probe_read)(void *dst, int size, const void *unsafe_ptr)
          = (void *) 4;

      #define _(x) (__builtin_preserve_access_index(x))

      int bpf_prog(struct sk_buff *ctx) {
        char dev_id;
        bpf_probe_read(&dev_id, sizeof(char), _(&ctx->u[5].dev.dev_id));
        return dev_id;
      }
      $ clang -target bpf -O2 -g -emit-llvm -S -mllvm -print-before-all \
        test.c >& log

    The generated IR looks like below:

      ...
      define dso_local i32 @bpf_prog(%struct.sk_buff*) #0 !dbg !15 {
        %2 = alloca %struct.sk_buff*, align 8
        %3 = alloca i8, align 1
        store %struct.sk_buff* %0, %struct.sk_buff** %2, align 8, !tbaa !45
        call void @llvm.dbg.declare(metadata %struct.sk_buff** %2, metadata !43, metadata !DIExpression()), !dbg !49
        call void @llvm.lifetime.start.p0i8(i64 1, i8* %3) #4, !dbg !50
        call void @llvm.dbg.declare(metadata i8* %3, metadata !44, metadata !DIExpression()), !dbg !51
        %4 = load i32 (i8*, i32, i8*)*, i32 (i8*, i32, i8*)** @bpf_probe_read, align 8, !dbg !52, !tbaa !45
        %5 = load %struct.sk_buff*, %struct.sk_buff** %2, align 8, !dbg !53, !tbaa !45
        %6 = call [10 x %union.anon]* @llvm.preserve.struct.access.index.p0a10s_union.anons.p0s_struct.sk_buffs(
             %struct.sk_buff* %5, i32 2, i32 3), !dbg !53, !llvm.preserve.access.index !19
        %7 = call %union.anon* @llvm.preserve.array.access.index.p0s_union.anons.p0a10s_union.anons(
             [10 x %union.anon]* %6, i32 1, i32 5), !dbg !53
        %8 = call %union.anon* @llvm.preserve.union.access.index.p0s_union.anons.p0s_union.anons(
             %union.anon* %7, i32 1), !dbg !53, !llvm.preserve.access.index !26
        %9 = bitcast %union.anon* %8 to %struct.anon.0*, !dbg !53
        %10 = call i8* @llvm.preserve.struct.access.index.p0i8.p0s_struct.anon.0s(
             %struct.anon.0* %9, i32 1, i32 1), !dbg !53, !llvm.preserve.access.index !34
        %11 = call i32 %4(i8* %3, i32 1, i8* %10), !dbg !52
        %12 = load i8, i8* %3, align 1, !dbg !54, !tbaa !55
        %13 = sext i8 %12 to i32, !dbg !54
        call void @llvm.lifetime.end.p0i8(i64 1, i8* %3) #4, !dbg !56
        ret i32 %13, !dbg !57
      }

      !19 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "sk_buff", file: !3, line: 1, size: 704, elements: !20)
      !26 = distinct !DICompositeType(tag: DW_TAG_union_type, scope: !19, file: !3, line: 5, size: 64, elements: !27)
      !34 = distinct !DICompositeType(tag: DW_TAG_structure_type, scope: !26, file: !3, line: 10, size: 16, elements: !35)

    Note that @llvm.preserve.{struct,union}.access.index calls have metadata llvm.preserve.access.index
    attached to instructions to provide struct/union debuginfo type information.

    For &ctx->u[5].dev.dev_id,
      . The "%6 = ..." represents struct member "u" with index 2 for IR layout and index 3 for DI layout.
      . The "%7 = ..." represents array subscript "5".
      . The "%8 = ..." represents union member "dev" with index 1 for DI layout.
      . The "%10 = ..." represents struct member "dev_id" with index 1 for both IR and DI layout.

    Basically, traversing the use-def chain recursively for the 3rd argument of bpf_probe_read() and
    examining all preserve_*_access_index calls, the debuginfo struct/union/array access index
    can be achieved.

    The intrinsics also contain enough information to regenerate codes for IR layout.
    For array and structure intrinsics, the proper GEP can be constructed.
    For union intrinsics, replacing all uses of "addr" with "base" should be enough.

    The test case ThinLTO/X86/lazyload_metadata.ll is adjusted to reflect the
    new addition of the metadata.

    Signed-off-by: Yonghong Song <yhs@fb.com>

    Differential Revision: https://reviews.llvm.org/D61810 — yhs / ViewSVN
  18. [sanitizers][windows] Rtl-Heap Interception and tests
       - Adds interceptors for Rtl[Allocate|Free|Size|ReAllocate]Heap
       - Adds unit tests for the new interceptors and expands HeapAlloc
         tests to demonstrate new functionality.
       Reviewed as D62927 — mcgov / ViewSVN
  19. [LoopPred] Extend LFTR normalization to the inverse EQ case

    A while back, I added support for NE latches formed by LFTR.  I didn't think that quite through, as LFTR will also produce the inverse EQ form for some loops and I hadn't handled that.  This change just adds handling for that case as well. — reames / ViewSVN
  20. [WebAssembly] Fix a typo in a test file name

    Reviewers: sbc100

    Subscribers: dschuff, jgravelle-google, sunfish, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64324 — aheejin / ViewSVN
  21. Changing CodeView debug info type record representation in assembly files to make it more human-readable & editable & fixing bug introduced in r364987 — nilanjana_basu / ViewSVN
  22. [TSan] Fix linker error for Linux/AArch64 — yln / ViewSVN
  23. Use `ln -n` to prevent forming a symlink cycle, instead of rm'ing the source

    This is a better fix for the problem fixed in r334972.

    Also remove the rm'ing of the symlink destination that was there to
    clean up the bots -- it's over a year later, bots should be happy now.

    Differential Revision: https://reviews.llvm.org/D64301 — nico / ViewSVN

#18414 (Jul 8, 2019 8:03:19 PM)

  1. Let unaliased Args track which Alias they were created from, and use that in Arg::getAsString() for diagnostics

    With this, `clang-cl /source-charset:utf-16 test.cc` now prints `invalid
    value 'utf-16' in '/source-charset:utf-16'` instead of `invalid value
    'utf-16' in '-finput-charset=utf-16'` before, and several other clang-cl
    flags produce much less confusing output as well.

    Fixes PR29106.

    Since an arg and its alias can have different arg types (joined vs not)
    and different values (because of AliasArgs<>), I chose to give the Alias
    its own Arg object. For convenience, I just store the alias directly in
    the unaliased arg – there aren't many arg objects at runtime, so that
    seems ok.

    Finally, I changed Arg::getAsString() to use the alias's representation
    if it's present – that function was already documented as being the
    suitable function for diagnostics, and most callers already used it for
    diagnostics.

    Implementation-wise, Arg::accept() previously used to parse things as
    the unaliased option. The core of that switch is now extracted into a
    new function acceptInternal() which parses as the _aliased_ option, and
    the previously-intermingled unaliasing is now done as an explicit step
    afterwards.

    (This also changes one place in lld that didn't use getAsString() for
    diagnostics, so that that one place now also prints the flag as the user
    wrote it, not as it looks after it went through unaliasing.)

    Differential Revision: https://reviews.llvm.org/D64253 — nico / ViewSVN
  2. [X86][PPC] Support -mlong-double-64

    -mlong-double-64 is supported on some ports of gcc (i386, x86_64, and ppc{32,64}).
    On many other targets, there will be an error:

        error: unrecognized command line option '-mlong-double-64'

    This patch makes the driver option -mlong-double-64 available for x86
    and ppc. The CC1 option -mlong-double-64 is available on all targets for
    users to test on unsupported targets.

    LongDoubleSize is added as a VALUE_LANGOPT so that the option can be
    shared with -mlong-double-128 when we support it in clang.

    Also, make powerpc*-linux-musl default to use 64-bit long double. It is
    currently the only supported ABI on musl and is also how people
    configure powerpc*-linux-musl-gcc.

    Reviewed By: rnk

    Differential Revision: https://reviews.llvm.org/D64067 — maskray / ViewSVN
  3. clang-cl: Port cl.exe's C4659 to clang-cl

    Differential Revision: https://reviews.llvm.org/D64349 — nico / ViewSVN
  4. [analyzer] exploded-graph-rewriter: Implement a topology-only mode.

    In this mode the rewriter will only rewrite program points
    and omit program states. Useful for understanding
    the rough topology of the graph.

    Differential Revision: https://reviews.llvm.org/D64264 — dergachev / ViewSVN
  5. [analyzer] exploded-graph-rewriter: Implement a single-path mode.

    Instead of rewriting the whole graph, rewrite the leftmost path in the
    graph. Useful for trimmed graphs that are still too large to display due
    to multiple equivalent reports mixed into them.

    Differential Revision: https://reviews.llvm.org/D64263 — dergachev / ViewSVN
  6. [ObjC] Add a -Wtautological-compare warning for BOOL

    On macOS, BOOL is a typedef for signed char, but it should never hold a value
    that isn't 1 or 0. Any code that expects a different value in their BOOL should
    be fixed.

    rdar://51954400

    Differential revision: https://reviews.llvm.org/D63856 — epilk / ViewSVN

#18413 (Jul 8, 2019 6:49:37 PM)

  1. [Attributor] Deduce the "returned" argument attribute

    Deduce the "returned" argument attribute by collecting all potentially
    returned values.

    Not only the unique return value, if any, can be used by subsequent
    attributes but also the set of all potentially returned values as well
    as the mapping from returned values to return instructions that they
    originate from (see AAReturnedValues::checkForallReturnedValues).

    Change in statistics (-stats) for LLVM-TS + Spec2006, totaling ~19% more "returned" arguments.

      ADDED: attributor                   NumAttributesManifested                  n/a ->        637
      ADDED: attributor                   NumAttributesValidFixpoint               n/a ->      25545
      ADDED: attributor                   NumFnArgumentReturned                    n/a ->        637
      ADDED: attributor                   NumFnKnownReturns                        n/a ->      25545
      ADDED: attributor                   NumFnUniqueReturned                      n/a ->      14118
    CHANGED: deadargelim                  NumRetValsEliminated                     470 ->        449 (    -4.468%)
    REMOVED: functionattrs                NumReturned                              535 ->        n/a
    CHANGED: indvars                      NumElimIdentity                          138 ->        164 (   +18.841%)

    Reviewers: homerdin, hfinkel, fedor.sergeev, sanjoy, spatel, nlopes, nicholas, reames, efriedma, chandlerc

    Subscribers: hiraditya, bollu, cfe-commits, llvm-commits

    Tags: #clang, #llvm

    Differential Revision: https://reviews.llvm.org/D59919 — jdoerfert / ViewSVN
  2. [cxx2a] P0624R2 fix: only lambdas with no lambda-capture are default-constructible and assignable.

    This is a fix for rG864949 which only disabled default construction and
    assignment for lambdas with capture-defaults, where the C++2a draft
    disables them for lambdas with any lambda-capture at all.

    Patch by Logan Smith!

    Differential Revision: https://reviews.llvm.org/D64058 — dblaikie / ViewSVN
  3. [Frontend] Explicitly include Bitstream/BitCodes.h and BitstreamWriter.h

    This fixes a modules issue:

    error: declaration of 'bitc' must be imported from module
    'Clang_Serialization.ASTBitCodes' before it is required
    Stream.EmitRecord(llvm::bitc::BLOCKINFO_CODE_SETBID, Record); — thegameg / ViewSVN

#18411 (Jul 8, 2019 5:31:41 PM)

  1. [AArch64][GlobalISel] Use TST for comparisons when possible

    Porting over the part of `emitComparison` in AArch64ISelLowering where we use
    TST to represent a compare.

    - Rename `tryOptCMN` to `tryFoldIntegerCompare`, since it now also emits TSTs
      when possible.

    - Add a utility function for emitting a TST with register operands.

    - Rename opt-fold-cmn.mir to opt-fold-compare.mir, since it now also tests the
      TST fold as well.

    Differential Revision: https://reviews.llvm.org/D64371 — paquette / ViewSVN
  2. Fix line endings. NFC — probinson / ViewSVN
  3. [llvm-profdata] Fix buildbot failure on llvm-clang-x86_64-expensive-checks-win

    This fixes buildbot failure in LLVM on llvm-clang-x86_64-expensive-checks-win
    from r365386. — xur / ViewSVN
  4. [Sanitizers] Remove clang_rt.sancov_{begin,end} on Solaris

    There's no point to manually create the __start___sancov_guards and __stop___sancov_guards
    sections and labels on Solaris any longer.  They were originally introduced in
    https://reviews.llvm.org/D40899 and https://reviews.llvm.org/D40903.

    - The Solaris 11.4 ld supports creating them out of the box.
    - We already unconditionally use Solaris 11.4 features like the ld -z gnu-version-script-compat option and fully working .preinit_array support in compiler-rt.
    - The current files don't assemble on SPARC because the assembler syntax may be different between /bin/as and GNU as.

    Tested on amd64-pc-solaris2.11.

    Differential Revision: https://reviews.llvm.org/D63601 — ro / ViewSVN
  5. AMDGPU: Split extload/zextload local load patterns

    This will help removing the custom load predicates, allowing the
    global isel emitter to handle them. — arsenm / ViewSVN
  6. [Sanitizers] Don't use clang_rt.sancov_{begin,end} on Solaris

    As explained in https://reviews.llvm.org/D63601, there's no point using clang_rt.sancov_{begin,end}
    on Solaris any longer.

    This companion patch to the above removes their use from the driver.

    Tested on amd64-pc-solaris2.11

    Differential Revision: https://reviews.llvm.org/D63602 — ro / ViewSVN
  7. Add parentheses to silence warnings. — void / ViewSVN
  8. Add parentheses to silence warning. — void / ViewSVN
  9. Revert [Sema] Resolve placeholder types before type deduction to silence spurious `-Warc-repeated-use-of-weak` warnings

    This reverts r365382 (git commit 8b1becf2e31d9170ee356a19c7b6ea991d3a520f)

    Appears to regress this semi-reduced fragment of valid code from windows
    SDK headers:

      #define InterlockedIncrement64 _InterlockedIncrement64
      extern "C" __int64 InterlockedIncrement64(__int64 volatile *Addend);
      #pragma intrinsic(_InterlockedIncrement64)
      unsigned __int64 InterlockedIncrement(unsigned __int64 volatile *Addend) {
        return (unsigned __int64)(InterlockedIncrement64)((volatile __int64 *)Addend);
      }

    Found on a buildbot here, but no mail was sent due to it already being
    red:
    http://lab.llvm.org:8011/builders/sanitizer-windows/builds/48067 — rnk / ViewSVN

#18409 (Jul 8, 2019 4:16:20 PM)

  1. Standardize on MSVC behavior for triples with no environment

    Summary:
    This makes it so that IR files using triples without an environment work
    out of the box, without normalizing them.

    Typically, the MSVC behavior is more desirable. For example, it tends to
    enable things like constant merging, use of associative comdats, etc.

    Addresses PR42491

    Reviewers: compnerd

    Subscribers: hiraditya, dexonsmith, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64109 — rnk / ViewSVN
  2. llvm-profdata] Handle the cases of overlapping input file and output file

    Currently llvm-profdata does not expect the same file name for the input profile
    and the output profile.
    >llvm-profdata merge A.profraw B.profraw -o B.profraw
    The above command runs successfully but the resulted B.profraw is not correct.
    This patch fixes the issue by moving the initialization of writer after loading
    the profile.

    For the show command, the following will report a confusing error of
    "Empty raw profile file":
    >llvm-profdata show B.profraw -o B.profraw
    It's harder to fix as we need to output something before loading the input profile.
    I don't think that a fix for this is worth the effort. I just make the error explicit for
    the show command.

    Differential Revision: https://reviews.llvm.org/D64360 — xur / ViewSVN
  3. Revert "[sanitizers][windows] Rtl-Heap Interception and tests"

    Causes build failure on clang-ppc64be-linux-lnt:

    compiler-rt/lib/asan/asan_malloc_win.cc:23:2: error: #error "Missing arch or unsupported platform for Windows."
    #error "Missing arch or unsupported platform for Windows."
      ^~~~~
    compiler-rt/lib/asan/asan_malloc_win.cc:25:10: fatal error: heapapi.h: No such file or directory
    #include <heapapi.h>
              ^~~~~~~~~~~
    compilation terminated.
    [39/1151] Building CXX object projects/compiler-rt/lib/asan/CMakeFiles/RTAsan.powerpc64.dir/asan_debugging.cc.o
    [40/1151] Building CXX object projects/compiler-rt/lib/asan/CMakeFiles/RTAsan.powerpc64.dir/asan_malloc_win.cc.o
    FAILED: projects/compiler-rt/lib/asan/CMakeFiles/RTAsan.powerpc64.dir/asan_malloc_win.cc.o
    /usr/bin/c++  -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iprojects/compiler-rt/lib/asan -Icompiler-rt/lib/asan -Iinclude -I/home/buildbots/ppc64be-clang-lnt-test/clang-ppc64be-lnt/llvm/include -Icompiler-rt/lib/asan/.. -fPIC -fvisibility-inlines-hidden -Werror=date-time -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -std=c++11 -Wno-unused-parameter -O2    -UNDEBUG  -m64 -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fvisibility=hidden -fno-lto -O3 -g -Wno-variadic-macros -Wno-non-virtual-dtor -fno-rtti -MD -MT projects/compiler-rt/lib/asan/CMakeFiles/RTAsan.powerpc64.dir/asan_malloc_win.cc.o -MF projects/compiler-rt/lib/asan/CMakeFiles/RTAsan.powerpc64.dir/asan_malloc_win.cc.o.d -o projects/compiler-rt/lib/asan/CMakeFiles/RTAsan.powerpc64.dir/asan_malloc_win.cc.o -c compiler-rt/lib/asan/asan_malloc_win.cc
    compiler-rt/lib/asan/asan_malloc_win.cc:23:2: error: #error "Missing arch or unsupported platform for Windows."
    #error "Missing arch or unsupported platform for Windows."
      ^~~~~
    compiler-rt/lib/asan/asan_malloc_win.cc:25:10: fatal error: heapapi.h: No such file or directory
    #include <heapapi.h>
              ^~~~~~~~~~~ — jfb / ViewSVN

#18408 (Jul 8, 2019 2:41:28 PM)

  1. Revert "Reapply [llvm-ar][test] Increase llvm-ar test coverage"

    llvm-ar.extract.test has been failing on greendragon and gone unfixed. — jfb / ViewSVN
  2. [Sema] Resolve placeholder types before type deduction to silence
    spurious `-Warc-repeated-use-of-weak` warnings

    The spurious -Warc-repeated-use-of-weak warnings are issued when an
    initializer expression uses a weak ObjC pointer.

    My first attempt to silence the warnings (r350917) caused clang to
    reject code that is legal in C++17. The patch is based on the feedback I
    received from Richard when the patch was reverted.

    http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20190422/268945.html
    http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20190422/268943.html

    Differential Revision: https://reviews.llvm.org/D62645 — ahatanak / ViewSVN
  3. [sanitizers][windows] Rtl-Heap Interception and tests
       - Adds interceptors for Rtl[Allocate|Free|Size|ReAllocate]Heap
       - Adds unit tests for the new interceptors and expands HeapAlloc
         tests to demonstrate new functionality.
       Reviewed as D62927 — mcgov / ViewSVN
  4. A test commit following 'Obtaining Commit Access' (https://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access) — jcai19 / ViewSVN
  5. [InstCombine] fold insertelement into splat of same scalar

    Forming the canonical splat shuffle improves analysis and
    may allow follow-on transforms (although some possibilities
    are missing as shown in the test diffs).

    The backend generically turns these patterns into build_vector,
    so there should be no codegen regressions. All targets are
    expected to be able to lower splats efficiently. — spatel / ViewSVN
  6. AMDGPU: Fix unused variable in release build — arsenm / ViewSVN
  7. Add missing declarations of explicit member specializations.

    This should fix the build under -Wundefined-func-template and certain
    versions of GCC. — rsmith / ViewSVN
  8. Teach the symbolizer lib symbolize objects directly.

    Currently, the symbolizer lib can only symbolize a file on disk.
    This patch teaches the symbolizer lib to symbolize objects.
    llvm-objdump needs this to support archive disassembly with source info.

    https://bugs.llvm.org/show_bug.cgi?id=41871

    Reviewed by: jhenderson, grimar, MaskRay

    Differential Revision: https://reviews.llvm.org/D63521 — yuanfang / ViewSVN
  9. Revert "[TSan] Attempt to fix iOS on-device test"

    This reverts commit a2ca358291a3a621bfae66eeb01f51eeb69d2dd4. — yln / ViewSVN
  10. [OPENMP]Improve error message for device unsupported types.

    Provide more data to the user in the error message about unsupported
    type for device compilation. — abataev / ViewSVN
  11. AMDGPU: Fix stray typing — arsenm / ViewSVN
  12. AMDGPU: Make s34 the FP register

    Make the FP register callee saved.

    This is tricky because now the FP needs to be spilled in the prolog
    relative to the incoming SP register, rather than the frame register
    used throughout the rest of the function. I don't like how this
    bypassess the standard mechanism for CSR spills just to get the
    correct insert point. I may look for a better solution, since all CSR
    VGPRs may also need to have all lanes activated. Another option might
    be to make getFrameIndexReference change the base register if the
    frame index is a CSR, and then try to figure out the right insertion
    point in emitProlog.

    If there is a free VGPR lane available for SGPR spilling, try to use
    it for the FP. If that would require intrtoducing a new VGPR spill,
    try to use a free call clobbered SGPR. Only fallback to introducing a
    new VGPR spill as a last resort.

    This also doesn't attempt to handle SGPR spilling with scalar stores. — arsenm / ViewSVN
  13. RegUsageInfoCollector: Don't iterate all regs for every reg class

    This is extremly slow on AMDGPU, which has a lot of physical register
    and a lot of register classes.

    determineCalleeSaves, via MachineRegisterInfo::isPhysRegUsed already
    added all of the super registers to the saved set. — arsenm / ViewSVN
  14. AMDGPU: Move DEBUG_TYPE definition below includes — arsenm / ViewSVN
  15. Revert "[TSan] Attempt to fix linker error for Linux on AArch64"

    This reverts commit be4148062b155f3be52e0f6ebcb228f2dc137dcf. — yln / ViewSVN
  16. Keep the order of the basic blocks in the cloned loop as the original
    loop
    Summary:
    Do the cloning in two steps, first allocate all the new loops, then
    clone the basic blocks in the same order as the original loop.
    Reviewer: Meinersbur, fhahn, kbarton, hfinkel
    Reviewed By: hfinkel
    Subscribers: hfinkel, hiraditya, llvm-commits
    Tag: https://reviews.llvm.org/D64224
    Differential Revision: — whitneyt / ViewSVN
  17. Fix issues building libraries as more than one type with Xcode

    Summary:
    CMake+Xcode doesn't seem to handle targets that only have object
    sources. This patch works around that limitation by adding a dummy
    soruce file to any library target that is generated by llvm_add_library
    when object libraries are generated.

    Object libraries are generated whenever llvm_add_library is passed more
    than one library type, which is now the default case for clang static
    libraries (which generate STATIC and OBJECT libraries).

    Reviewers: zturner, compnerd, joanlluch

    Reviewed By: joanlluch

    Subscribers: joanlluch, xbolva00, mgorny, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64300 — cbieneman / ViewSVN
  18. [clangd] Don't insert absolute paths, give up instead.

    Summary: Also implement resolution of paths relative to mainfile without HeaderSearchInfo.

    Reviewers: kadircet

    Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64293 — sammccall / ViewSVN
  19. [SCEV] Fix for PR42397. SCEVExpander wrongly adds nsw to shl instruction.

    Change-Id: I76c9f628c092ae3e6e78ebdaf55cec726e25d692 — dendibakh / ViewSVN
  20. [InstCombine] add tests for insert of same splatted scalar; NFC — spatel / ViewSVN
  21. Update gn files — Vitaly Buka / ViewSVN
  22. Revert "[BPF] add new intrinsics preserve_{array,union,struct}_access_index"

    This reverts commit r365352.

    Test ThinLTO/X86/lazyload_metadata.ll failed. Revert the commit
    and at the same time to fix the issue. — yhs / ViewSVN
  23. Revert "[libc++] Take 2: Do not cleverly link against libc++abi just because it happens to be there"

    r365326 still breaks bots:
    http://lab.llvm.org:8011/builders/netbsd-amd64/builds/20712/steps/ninja%20build%20local/logs/stdio
    http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-autoconf/builds/39477/steps/test%20tsan%20in%20debug%20compiler-rt%20build/logs/stdio

    And probably others

    This reverts commit 945b9ec0693390ef35fe8c6b774495312246b8b6. — Vitaly Buka / ViewSVN
  24. Replace temporary variable matches in test since r363952 causes an
    extra temporary variable to be created. — akhuang / ViewSVN
  25. [clangd] Use -completion-style=bundled by default if signature help is available

    Summary:
    I didn't manage to find something nicer than optional<bool>, but at least I
    found a sneakier comment.

    Reviewers: kadircet

    Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64216 — sammccall / ViewSVN
  26. [Syntax] Introduce syntax trees

    Summary:
    A tooling-focused alternative to the AST. This commit focuses on the
    memory-management strategy and the structure of the AST.

    More to follow later:
      - Operations to mutate the syntax trees and corresponding textual
        replacements.
      - Mapping between clang AST nodes and syntax tree nodes.
      - More node types corresponding to the language constructs.

    Reviewers: sammccall

    Reviewed By: sammccall

    Subscribers: llvm-commits, mgorny, cfe-commits

    Tags: #clang, #llvm

    Differential Revision: https://reviews.llvm.org/D61637 — ibiryukov / ViewSVN
  27. Update gn files — Vitaly Buka / ViewSVN
  28. [AMDGPU][MC][DOC] Updated AMD GPU assembler syntax description.

    Corrected a typo. — dpreobra / ViewSVN
  29. [BPF] add new intrinsics preserve_{array,union,struct}_access_index

    For background of BPF CO-RE project, please refer to
      http://vger.kernel.org/bpfconf2019.html
    In summary, BPF CO-RE intends to compile bpf programs
    adjustable on struct/union layout change so the same
    program can run on multiple kernels with adjustment
    before loading based on native kernel structures.

    In order to do this, we need keep track of GEP(getelementptr)
    instruction base and result debuginfo types, so we
    can adjust on the host based on kernel BTF info.
    Capturing such information as an IR optimization is hard
    as various optimization may have tweaked GEP and also
    union is replaced by structure it is impossible to track
    fieldindex for union member accesses.

    Three intrinsic functions, preserve_{array,union,struct}_access_index,
    are introducted.
      addr = preserve_array_access_index(base, index, dimension)
      addr = preserve_union_access_index(base, di_index)
      addr = preserve_struct_access_index(base, gep_index, di_index)
    here,
      base: the base pointer for the array/union/struct access.
      index: the last access index for array, the same for IR/DebugInfo layout.
      dimension: the array dimension.
      gep_index: the access index based on IR layout.
      di_index: the access index based on user/debuginfo types.

    For example, for the following example,
      $ cat test.c
      struct sk_buff {
         int i;
         int b1:1;
         int b2:2;
         union {
           struct {
             int o1;
             int o2;
           } o;
           struct {
             char flags;
             char dev_id;
           } dev;
           int netid;
         } u[10];
      };

      static int (*bpf_probe_read)(void *dst, int size, const void *unsafe_ptr)
          = (void *) 4;

      #define _(x) (__builtin_preserve_access_index(x))

      int bpf_prog(struct sk_buff *ctx) {
        char dev_id;
        bpf_probe_read(&dev_id, sizeof(char), _(&ctx->u[5].dev.dev_id));
        return dev_id;
      }
      $ clang -target bpf -O2 -g -emit-llvm -S -mllvm -print-before-all \
        test.c >& log

    The generated IR looks like below:

      ...
      define dso_local i32 @bpf_prog(%struct.sk_buff*) #0 !dbg !15 {
        %2 = alloca %struct.sk_buff*, align 8
        %3 = alloca i8, align 1
        store %struct.sk_buff* %0, %struct.sk_buff** %2, align 8, !tbaa !45
        call void @llvm.dbg.declare(metadata %struct.sk_buff** %2, metadata !43, metadata !DIExpression()), !dbg !49
        call void @llvm.lifetime.start.p0i8(i64 1, i8* %3) #4, !dbg !50
        call void @llvm.dbg.declare(metadata i8* %3, metadata !44, metadata !DIExpression()), !dbg !51
        %4 = load i32 (i8*, i32, i8*)*, i32 (i8*, i32, i8*)** @bpf_probe_read, align 8, !dbg !52, !tbaa !45
        %5 = load %struct.sk_buff*, %struct.sk_buff** %2, align 8, !dbg !53, !tbaa !45
        %6 = call [10 x %union.anon]* @llvm.preserve.struct.access.index.p0a10s_union.anons.p0s_struct.sk_buffs(
             %struct.sk_buff* %5, i32 2, i32 3), !dbg !53, !llvm.preserve.access.index !19
        %7 = call %union.anon* @llvm.preserve.array.access.index.p0s_union.anons.p0a10s_union.anons(
             [10 x %union.anon]* %6, i32 1, i32 5), !dbg !53
        %8 = call %union.anon* @llvm.preserve.union.access.index.p0s_union.anons.p0s_union.anons(
             %union.anon* %7, i32 1), !dbg !53, !llvm.preserve.access.index !26
        %9 = bitcast %union.anon* %8 to %struct.anon.0*, !dbg !53
        %10 = call i8* @llvm.preserve.struct.access.index.p0i8.p0s_struct.anon.0s(
             %struct.anon.0* %9, i32 1, i32 1), !dbg !53, !llvm.preserve.access.index !34
        %11 = call i32 %4(i8* %3, i32 1, i8* %10), !dbg !52
        %12 = load i8, i8* %3, align 1, !dbg !54, !tbaa !55
        %13 = sext i8 %12 to i32, !dbg !54
        call void @llvm.lifetime.end.p0i8(i64 1, i8* %3) #4, !dbg !56
        ret i32 %13, !dbg !57
      }

      !19 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "sk_buff", file: !3, line: 1, size: 704, elements: !20)
      !26 = distinct !DICompositeType(tag: DW_TAG_union_type, scope: !19, file: !3, line: 5, size: 64, elements: !27)
      !34 = distinct !DICompositeType(tag: DW_TAG_structure_type, scope: !26, file: !3, line: 10, size: 16, elements: !35)

    Note that @llvm.preserve.{struct,union}.access.index calls have metadata llvm.preserve.access.index
    attached to instructions to provide struct/union debuginfo type information.

    For &ctx->u[5].dev.dev_id,
      . The "%6 = ..." represents struct member "u" with index 2 for IR layout and index 3 for DI layout.
      . The "%7 = ..." represents array subscript "5".
      . The "%8 = ..." represents union member "dev" with index 1 for DI layout.
      . The "%10 = ..." represents struct member "dev_id" with index 1 for both IR and DI layout.

    Basically, traversing the use-def chain recursively for the 3rd argument of bpf_probe_read() and
    examining all preserve_*_access_index calls, the debuginfo struct/union/array access index
    can be achieved.

    The intrinsics also contain enough information to regenerate codes for IR layout.
    For array and structure intrinsics, the proper GEP can be constructed.
    For union intrinsics, replacing all uses of "addr" with "base" should be enough.

    Signed-off-by: Yonghong Song <yhs@fb.com>

    Differential Revision: https://reviews.llvm.org/D61810 — yhs / ViewSVN
  30. [WebAssembly] tablegen: distinguish float/int immediate operands.

    Summary:
    Before, they were one category of operands which could cause
    crashes in non-sensical combinations, e.g. "f32.const symbol".
    Now these are forced to be an error.

    Reviewers: dschuff

    Subscribers: sbc100, jgravelle-google, aheejin, sunfish, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64039 — aardappel / ViewSVN
  31. AMDGPU: Remove mubuf specific PatFrags

    These are identical to the *_global PatFrag, and will only create more
    work to get the GlobalISel importer to handle them. — arsenm / ViewSVN
  32. AMDGPU: Move waitcnt intrinsic to instruction definition pattern — arsenm / ViewSVN
  33. [llvm\test\Object] - An initial step to cleanup the test cases.

    This patch removes trivial-object-test.elf-i386,
    trivial-object-test.elf-x86-64 and trivial-object-test2.elf-x86-64
    precompiled objects from test/Object/Inputs folder.

    I adjusted the existent test cases to use YAML instead.

    Differential revision: https://reviews.llvm.org/D64206 — grimar / ViewSVN
  34. [AMDGPU][MC][DOC] Updated AMD GPU assembler syntax description.

    Summary of changes:
    - added description of GFX10;
    - added description of operands sccz, vccz, lds_direct, etc;
    - minor bugfixing and improvements. — dpreobra / ViewSVN
  35. Add, and infer, a nofree function attribute

    Removing dead code leftover from refactor.

    Reviewers: jdoerfert

    Differential Revision: https://reviews.llvm.org/D49165 — homerdin / ViewSVN
  36. GlobalISel: Convert some build functions to using SrcOp/DstOp — arsenm / ViewSVN
  37. [InstCombine] canonicalize insert+splat to/from element 0 of vector

    We recognize a splat from element 0 in (VectorUtils) llvm::getSplatValue()
    and also in ShuffleVectorInst::isZeroEltSplatMask(), so this converts
    to that form for better matching.

    The backend generically turns these patterns into build_vector,
    so there should be no codegen difference. — spatel / ViewSVN
  38. Add nofree attribute to CodeGenOpenCL/convergent.cl test

    The revision at https://reviews.llvm.org/rL365336 added inference of the nofree
    attribute.  This revision updates the test to reflect this.

    Differential Revision: https://reviews.llvm.org/D49165 — homerdin / ViewSVN
  39. [Bitcode][NFC] Remove unused variable from BitcodeAnalyzer — thegameg / ViewSVN
  40. Teach the IRBuilder about fadd and friends.

    The IRBuilder has calls to create floating point instructions like fadd.
    It does not have calls to create constrained versions of them. This patch
    adds support for constrained creation of fadd, fsub, fmul, fdiv, and frem.

    Reviewed by: John McCall, Sanjay Patel
    Approved by: John McCall
    Differential Revision: https://reviews.llvm.org/D53157 — kpn / ViewSVN
  41. Add, and infer, a nofree function attribute

    This patch adds a function attribute, nofree, to indicate that a function does
    not, directly or indirectly, call a memory-deallocation function (e.g., free,
    C++'s operator delete).

    Reviewers: jdoerfert

    Differential Revision: https://reviews.llvm.org/D49165 — homerdin / ViewSVN
  42. [docs][llvm-readobj][llvm-readelf] Improve wording — jhenderson / ViewSVN
  43. [OPENMP]Add -Wunintialized to the erroneous tests for future fix PR42392,
    NFC. — abataev / ViewSVN
  44. [InstCombine] fix typo in test; NFC

    I added this test in rL365325, but didn't mean to create an undef insert. — spatel / ViewSVN
  45. [clangd] A code tweak to expand a macro

    Reviewers: sammccall

    Reviewed By: sammccall

    Subscribers: mgorny, MaskRay, jkorous, arphaman, kadircet, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D61681 — ibiryukov / ViewSVN
  46. [PowerPC][NFC]Update testcases using script. — jsji / ViewSVN
  47. [RISCV][NFC] Make use of Triple::isRISCV

    Use new helper introduced in rL365327. — asb / ViewSVN
  48. [X86] ISD::INSERT_SUBVECTOR - use uint64_t index. NFCI.

    Keep the uint64_t type from getConstantOperandVal to stop truncation/extension overflow warnings in MSVC in subvector index math. — rksimon / ViewSVN
  49. [Triple] Add isRISCV function

    This matches isARM, isThumb, isAArch64 and similar helpers. Future commits
    which clean-up code that currently checks for Triple::riscv32 ||
    Triple::riscv64.

    Differential Revision: https://reviews.llvm.org/D54215
    Patch by Simon Cook.
    Test case added by Alex Bradbury. — asb / ViewSVN
  50. [libc++] Take 2: Do not cleverly link against libc++abi just because it happens to be there

    Summary:
    Otherwise, when libcxxabi is not an enabled project in the monorepo, we
    get a link error because we try to link against non-existent cxxabi_shared.

    More generally, we shouldn't change the behavior of the build based on
    implicit things like whether a file happens to be at a specific path or
    not.

    This is a re-application of r365222 that had been reverted in r365233
    because it broke the build bots. However, the build bots now specify
    explicitly what ABI library they want to use (libc++abi), so this
    commit should now be OK to merge.

    Differential Revision: https://reviews.llvm.org/D63883 — Louis Dionne / ViewSVN
  51. [InstCombine] add tests for splat shuffles; NFC — spatel / ViewSVN
  52. [Float2Int] Add support for unary FNeg to Float2Int

    Differential Revision: https://reviews.llvm.org/D63941 — mcinally / ViewSVN
  53. [MIPS GlobalISel] Register bank select for G_LOAD. Select i64 load

    Select gprb or fprb when loaded value is used by either:
    copy to physical register or
    instruction with only one mapping available for that use operand.

    Load of integer s64 is handled with narrowScalar when mapping is applied,
    produced artifacts are combined away. Manually set gprb to all register
    operands of instructions created during narrowScalar.

    Differential Revision: https://reviews.llvm.org/D64269 — petar.avramovic / ViewSVN
  54. [MIPS GlobalISel] Register bank select for G_STORE. Select i64 store

    Select gprb or fprb when stored value is defined by either:
    copy from physical register or
    instruction with only one mapping available for that def operand.

    Store of integer s64 is handled with narrowScalar when mapping is applied,
    produced artifacts are combined away. Manually set gprb to all register
    operands of instructions created during narrowScalar.

    Differential Revision: https://reviews.llvm.org/D64268 — petar.avramovic / ViewSVN
  55. [AMDGPU][MC] Corrected parsing of FLAT offset modifier

    Summary of changes:

    - simplified handling of FLAT offset: offset_s13 and offset_u12 have been replaced with flat_offset;
    - provided information about error position for pre-gfx9 targets;
    - improved errors handling.

    Reviewers: artem.tamazov, arsenm, rampitec

    Differential Revision: https://reviews.llvm.org/D64244 — dpreobra / ViewSVN

#18406 (Jul 8, 2019 8:14:47 AM)

  1. GlobalISel: widenScalar for G_BUILD_VECTOR — arsenm / ViewSVN
  2. GlobalISel: Check address space when looking up iPTR size

    Fixes AMDGPU patterns for 32-bit address spaces always failing. Tests
    will be included in future patches when additional issues are solved. — arsenm / ViewSVN
  3. Reapply [llvm-ar][test] Increase llvm-ar test coverage

    This change adds tests to cover existing llvm-ar functionality.

    Differential Revision: https://reviews.llvm.org/D63935 — gbreynoo / ViewSVN
  4. Revert [llvm-ar][test] Increase llvm-ar test coverage

    Reverted due to test failures

    Differential Revision: https://reviews.llvm.org/D63935 — gbreynoo / ViewSVN
  5. [llvm-ar][test] Increase llvm-ar test coverage

    This change adds tests to cover existing llvm-ar functionality.

    Differential Revision: https://reviews.llvm.org/D63935 — gbreynoo / ViewSVN
  6. [ASTImporter] Fix import of lambda in function param

    Summary:
    The current import implementation fails to import the definition of a
    lambda class if the lambda class is defined in a function param.
    E.g., the lambda class below will be imported without any methods:
    ```
      template <typename F>
      void f(F L = [](){}) {}
    ```

    Reviewers: a_sidorin, a.sidorin, shafik

    Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64073 — martong / ViewSVN
  7. [analyzer] Add analyzer option to limit the number of imported TUs

    Summary:
    During CTU analysis of complex projects, the loaded AST-contents of
    imported TUs can grow bigger than available system memory. This option
    introduces a threshold on the number of TUs to be imported for a single
    TU in order to prevent such cases.

    Differential Revision: https://reviews.llvm.org/D59798 — gamesh411 / ViewSVN
  8. [lit] Parse command-line options from LIT_OPTS

    Similar to `FILECHECK_OPTS` for FileCheck, `LIT_OPTS` makes it easy to
    adjust lit behavior when running the test suite via ninja.  For
    example:

    ```
    $ LIT_OPTS='--time-tests -vv --filter=threadprivate' \
      ninja check-clang-openmp
    ```

    Reviewed By: probinson

    Differential Revision: https://reviews.llvm.org/D64135 — jdenny / ViewSVN
  9. [docs][llvm-objcopy] Add description of binary input/output to doc

    We briefly referred to being able to specify --target=binary without
    explaining what binary input/output meant. This change adds a section on
    this.

    Reviewed by: MaskRay, abrachet

    Differential Revision: https://reviews.llvm.org/D64245 — jhenderson / ViewSVN
  10. [clangd] Use xxhash instead of SHA1 for background index file digests.

    Summary:
    Currently SHA1 is about 10% of our CPU, this patch reduces it to ~1%.

    xxhash is a well-defined (stable) non-cryptographic hash optimized for
    fast checksums (like crc32).
    Collisions shouldn't be a problem, despite the reduced length:
    - for actual file content (used to invalidate bg index shards), there
       are only two versions that can collide (new shard and old shard).
    - for file paths in bg index shard filenames, we would need 2^32 files
       with the same filename to expect a collision. Imperfect hashing may
       reduce this a bit but it's well beyond what's plausible.

    This will invalidate shards on disk (as usual; I bumped the version),
    but this time the filenames are changing so the old files will stick
    around :-( So this is more expensive than the usual bump, but would be
    good to land before the v9 branch when everyone will start using bg index.

    Reviewers: kadircet

    Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64306 — sammccall / ViewSVN

#18405 (Jul 8, 2019 7:11:41 AM)

  1. [TargetLowering] SimplifyDemandedBits - just call computeKnownBits for BUILD_VECTOR cases.

    Don't do this locally, computeKnownBits does this better (and can handle non-constant cases as well).

    A next step would be to actually simplify non-constant elements - building on what we already do in SimplifyDemandedVectorElts. — rksimon / ViewSVN
  2. [ubsan][test] Fix cast-overflow.cpp and delete float-divide-by-zero test after D63793/rC365272 — maskray / ViewSVN

#18404 (Jul 8, 2019 4:03:43 AM)

  1. [ARM] Relax constraints on operands of VQxDMLxDH instructions

    Summary:
    According to a recently updated Armv8-M spec
    (https://static.docs.arm.com/ddi0553/bh/DDI0553B_h_armv8m_arm.pdf) the
    32-bit width versions of the following instructions:
    * VQDMLADH
    * VQDMLADHX
    * VQRDMLADH
    * VQRDMLADHX
    * VQDMLSDH
    * VQDMLSDHX
    * VQRDMLSDH
    * VQRDMLSDHX
    are no longer unpredictable when their output register is the same as
    one of the input registers.

    This patch updates the assembler parser and the corresponding tests
    and also removes @earlyclobber from the instruction constraints.

    Reviewers: simon_tatham, ostannard, dmgreen, SjoerdMeijer, samparker

    Reviewed By: simon_tatham

    Subscribers: javed.absar, kristof.beyls, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64250 — miyuki / ViewSVN
  2. [RISCV] Specify registers used for exception handling

    Implements the handling of __builtin_eh_return_regno().

    Differential Revision: https://reviews.llvm.org/D63417
    Patch by Edward Jones. — asb / ViewSVN
  3. [ubsan][test] Fix several UBSan-* :: TestCases/ImplicitConversion tests on Solaris

    A couple of UBSan-*  :: TestCases/ImplicitConversion testcases FAIL on Solaris/x86
    (and Solaris/SPARC with https://reviews.llvm.org/D40900):

      FAIL: UBSan-AddressSanitizer-i386 :: TestCases/ImplicitConversion/signed-integer-truncation-or-sign-change-blacklist.c (49187 of 49849)
      ******************** TEST 'UBSan-AddressSanitizer-i386 :: TestCases/ImplicitConversion/signed-integer-truncation-or-sign-change-blacklist.c' FAILED ********************
      [...]
      Command Output (stderr):
      --
      /vol/llvm/src/compiler-rt/local/test/ubsan/TestCases/ImplicitConversion/signed-integer-truncation-or-sign-change-blacklist.c:53:11: error: CHECK: expected string not found in input
      // CHECK: {{.*}}signed-integer-truncation-or-sign-change-blacklist.c:[[@LINE-1]]:10: runtime error: implicit conversion from type '{{.*}}' (aka 'unsigned int') of value 4294967295 (32-bit, unsigned) to type '{{.*}}' (aka 'signed char') changed the value to -1 (8-bit, signed)
                ^
      <stdin>:1:1: note: scanning from here
      /vol/llvm/src/compiler-rt/local/test/ubsan/TestCases/ImplicitConversion/signed-integer-truncation-or-sign-change-blacklist.c:52:10: runtime error: implicit conversion from type 'uint32_t' (aka 'unsigned int') of value 4294967295 (32-bit, unsigned) to type 'int8_t' (aka 'char') changed the value to -1 (8-bit, signed)
      ^
      <stdin>:1:1: note: with "@LINE-1" equal to "52"
      /vol/llvm/src/compiler-rt/local/test/ubsan/TestCases/ImplicitConversion/signed-integer-truncation-or-sign-change-blacklist.c:52:10: runtime error: implicit conversion from type 'uint32_t' (aka 'unsigned int') of value 4294967295 (32-bit, unsigned) to type 'int8_t' (aka 'char') changed the value to -1 (8-bit, signed)
      ^
      <stdin>:1:69: note: possible intended match here
      /vol/llvm/src/compiler-rt/local/test/ubsan/TestCases/ImplicitConversion/signed-integer-truncation-or-sign-change-blacklist.c:52:10: runtime error: implicit conversion from type 'uint32_t' (aka 'unsigned int') of value 4294967295 (32-bit, unsigned) to type 'int8_t' (aka 'char') changed the value to -1 (8-bit, signed)
                                                                          ^

    This is always a difference for int8_t where signed char is expected, but only
    char seen.

    I could trace this to <sys/int_types.h> which has

      /*
       * Basic / Extended integer types
       *
       * The following defines the basic fixed-size integer types.
       *
       * Implementations are free to typedef them to Standard C integer types or
       * extensions that they support. If an implementation does not support one
       * of the particular integer data types below, then it should not define the
       * typedefs and macros corresponding to that data type.  Note that int8_t
       * is not defined in -Xs mode on ISAs for which the ABI specifies "char"
       * as an unsigned entity because there is no way to define an eight bit
       * signed integral.
       */
      #if defined(_CHAR_IS_SIGNED)
      typedef char int8_t;
      #else
      #if defined(__STDC__)
      typedef signed char int8_t;
      #endif
      #endif

    _CHAR_IS_SIGNED is always defined on both sparc and x86.  Since it seems ok
    to have either form, I've changed the affected tests to use
    '{{(signed )?}}char' instead of 'signed char'.

    Tested on x86_64-pc-solaris2.11, sparcv9-sun-solaris2.11, and x86_64-pc-linux-gnu.

    Differential Revision: https://reviews.llvm.org/D63984 — ro / ViewSVN
  4. [ubsan][test] Don't disable ubsan testing on 64-bit Solaris/x86

    Unlike asan, which isn't supported yet on 64-bit Solaris/x86, there's no reason to disable
    ubsan.  This patch does that, but keeps the 64-bit ubsan-with-asan tests disabled.

    Tested on x86_64-pc-solaris2.11.

    Differential Revision: https://reviews.llvm.org/D63982 — ro / ViewSVN
  5. [RISCV] Specify registers used in DWARF exception handling

    Defines RISCV registers for getExceptionPointerRegister() and
    getExceptionSelectorRegister().

    Differential Revision: https://reviews.llvm.org/D63411
    Patch by Edward Jones.
    Modified by Alex Bradbury to add CHECK lines to exception-pointer-register.ll. — asb / ViewSVN
  6. [AArch64] Fix scalar vuqadd intrinsics operands

    Summary:
    Change the vuqadd scalar instrinsics to have the second argument as unsigned values, not signed,
    accordingly to https://developer.arm.com/architectures/instruction-sets/simd-isas/neon/intrinsics

    So now the compiler correctly warns that a undefined negative float conversion is being done.

    Reviewers: LukeCheeseman, john.brawn

    Reviewed By: john.brawn

    Subscribers: john.brawn, javed.absar, kristof.beyls, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64242 — dnsampaio / ViewSVN
  7. [ARM] Fix null pointer dereference in CodeGen/ARM/Windows/stack-protector-msvc.ll.test after D64292/r365283

    CLI.CS may not be set. — maskray / ViewSVN
  8. [AArch64] Fix vsqadd scalar intrinsics operands

    Summary:
    Change the vsqadd scalar instrinsics to have the second argument as signed values, not unsigned,
    accordingly to https://developer.arm.com/architectures/instruction-sets/simd-isas/neon/intrinsics

    The existing unsigned argument can cause faulty code as negative float to unsigned conversion is
    undefined, which llvm/clang optimizes away.

    Reviewers: LukeCheeseman, john.brawn

    Reviewed By: john.brawn

    Subscribers: john.brawn, javed.absar, kristof.beyls, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64239 — dnsampaio / ViewSVN
  9. [UpdateTestChecks] Skip over .Lfunc_begin for RISC-V

    This mirrors the change made for X86 in rL336987. Without this patch,
    update_llc_test_checks will completely skip functions with personality
    functions. — asb / ViewSVN
  10. [AMDGPU] Use a named predicate instead of a magic number.

    Reviewers: arsenm

    Reviewed By: arsenm

    Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64201 — foad / ViewSVN
  11. [X86] Allow execution domain fixing to turn SHUFPD into SHUFPS.

    This can help with code size on SSE targets where SHUFPD requires
    a 0x66 prefix and SHUFPS doesn't. — ctopper / ViewSVN
  12. [X86] Make movsd commutable to shufpd with a 0x02 immediate on pre-SSE4.1 targets.

    This can help avoid a copy or enable load folding.

    On SSE4.1 targets we can commute it to blendi instead.

    I had to make shufpd with a 0x02 immediate commutable as well
    since we expect commuting to be reversible. — ctopper / ViewSVN
  13. [RISCV] Support z and i operand modifiers

    Differential Revision: https://reviews.llvm.org/D57792
    Patch by James Clarke. — asb / ViewSVN
  14. Make forward_list::remove/remove_if/unique all return void before C++20; undoes that bit of D58332. Thanks to Mikhail Maltsev for pointing this out — marshall / ViewSVN
  15. [clangd] Avoid slow ostreams in URI conversion.

    This speeds up some hot paths significantly (e.g.  dex::generateProximityURIs
    by a third or so) — sammccall / ViewSVN
  16. [clangd] Encapsulate fields in dex token. NFC — sammccall / ViewSVN
  17. [X86] Add MOVSDrr->MOVLPDrm entry to load folding table. Add custom handling to turn UNPCKLPDrr->MOVHPDrm when load is under aligned.

    If the load is aligned we can turn UNPCKLPDrr into UNPCKLPDrm. — ctopper / ViewSVN
  18. [llvm-bcanalyzer] Refactor and move to libLLVMBitReader

    This allows us to use the analyzer from unit tests.

    * Refactor the interface to use proper error handling for most functions
      after JF's work.
    * Move everything into a BitstreamAnalyzer class.
    * Move that to Bitcode/BitcodeAnalyzer.h.

    Differential Revision: https://reviews.llvm.org/D64116 — thegameg / ViewSVN
  19. [NFC][PowerPC] Add the test add_cmp.ll — zhangkang / ViewSVN
  20. Revert "[IRBuilder] Fold consistently for or/and whether constant is LHS or RHS"

    This reverts commit r365260 which broke the following tests:

        Clang :: CodeGenCXX/cfi-mfcall.cpp
        Clang :: CodeGenObjC/ubsan-nullability.m
        LLVM :: Transforms/LoopVectorize/AArch64/pr36032.ll — phosek / ViewSVN
  21. [ARM] Add support for MSVC stack cookie checking

    Heavily based on the same for AArch64, from SVN r346469.

    Differential Revision: https://reviews.llvm.org/D64292 — mstorsjo / ViewSVN
  22. Make ~mutex and ~condition_variable trivial on Windows.

    The implementations of __libcpp_mutex_destroy and __libcpp_condvar_destroy
    are already NOPs, so this optimization is safe to perform.

    See r365273 and PR27658 for more information. — ericwf / ViewSVN
  23. gn build: Merge r355546

    Found by inspection; the sync script doesn't sync .ipp files. — nico / ViewSVN
  24. gn build: Merge r365273 — nico / ViewSVN
  25. gn build: Sort sync script output — nico / ViewSVN
  26. gn build: Sort cxx_sources in libcxx build file

    Since these are in a custom list, `gn format` doesn't automatically sort
    them.

    Now their order matches the CMake build.

    No additions or deletions, this just sorts the files that are there. — nico / ViewSVN
  27. gn build: Merge r365258 and follow-ups r365263, r365264 — nico / ViewSVN

#18388 (Jul 7, 2019 12:36:14 AM)

  1. [X86] Make sure load isn't volatile before shrinking it in MOVDDUP isel patterns. — ctopper / ViewSVN

#18384 (Jul 6, 2019 10:49:50 PM)

  1. [CodeGen] Add larger vector types for i32 and f32

    Some out of tree backend require larger vector type. Since maintaining the changes out of tree is difficult due to the many manual changes needed when adding a new type we are adding it even if no backend currently use it.

    Differential Revision: https://reviews.llvm.org/D64141

    Patch by Thomas Raoux! — majnemer / ViewSVN
  2. Fix PR27658 - Make ~mutex trivial when possible.

    Currently std::mutex has a constexpr constructor, but a non-trivial
    destruction.

    The constexpr constructor is required to ensure the construction of a
    mutex with static storage duration happens at compile time, during
    constant initialization, and not during dynamic initialization.
    This means that static mutex's are always initialized and can be used
    safely during dynamic initialization without the "static initialization
    order fiasco".

    A trivial destructor is important for similar reasons. If a mutex is
    used during dynamic initialization it might also be used during program
    termination. If a static mutex has a non-trivial destructor it will be
    invoked during termination. This can introduce the "static
    deinitialization order fiasco".

    Additionally, function-local statics emit a guard variable around
    non-trivially destructible types. This results in horrible codegen and
    adds a runtime cost to every call to that function. non-local static's
    also result in slightly worse codegen but it's not as big of a problem.

    Example codegen can be found here: https://goo.gl/3CSzbM

    Note: This optimization is not safe with every pthread implementation.
    Some implementations allocate on the first call to pthread_mutex_lock
    and free the allocation in pthread_mutex_destroy.

    Also, changing the triviality of the destructor is not an ABI break.
    At least to the best of my knowledge :-) — ericwf / ViewSVN
  3. Treat the range of representable values of floating-point types as [-inf, +inf] not as [-max, +max].

    Summary:
    Prior to r329065, we used [-max, max] as the range of representable
    values because LLVM's `fptrunc` did not guarantee defined behavior when
    truncating from a larger floating-point type to a smaller one. Now that
    has been fixed, we can make clang follow normal IEEE 754 semantics in this
    regard and take the larger range [-inf, +inf] as the range of representable
    values.

    In practice, this affects two parts of the frontend:
    * the constant evaluator no longer treats floating-point evaluations
       that result in +-inf as being undefined (because they no longer leave
       the range of representable values of the type)
    * UBSan no longer treats conversions to floating-point type that are
       outside the [-max, +max] range as being undefined

    In passing, also remove the float-divide-by-zero sanitizer from
    -fsanitize=undefined, on the basis that while it's undefined per C++
    rules (and we disallow it in constant expressions for that reason), it
    is defined by Clang / LLVM / IEEE 754.

    Reviewers: rnk, BillyONeal

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D63793 — rsmith / ViewSVN

#18381 (Jul 6, 2019 9:29:28 PM)

  1. [X86] SimplifyDemandedVectorEltsForTargetNode - fix shadow variable warning. NFCI.

    Fixes cppcheck warning. — rksimon / ViewSVN
  2. [X86] LowerBuildVectorv16i8 - pull out repeated getOperand() call. NFCI. — rksimon / ViewSVN
  3. [DAGCombine] convertBuildVecZextToZext - remove duplicate getOpcode() call. NFCI. — rksimon / ViewSVN
  4. [X86] Add PS<->PD domain changing support for MOVH/MOVL load instructions and MOVH store instructions.

    These instructions don't have an integer domain equivalent, but
    we can at least change between the two floating point domains.

    This allows a smaller encoding on SSE targets if we can turn
    PD into PS. — ctopper / ViewSVN
  5. [X86] Remove patterns from MOVLPSmr and MOVHPSmr instructions.

    These patterns are the same as the MOVLPDmr and MOVHPDmr patterns,
    but with a bitcast at the end. We can just select the PD instruction
    and let execution domain fixing switch to PS. — ctopper / ViewSVN
  6. [X86] Add patterns to select MOVLPDrm from MOVSD+load and MOVHPD from UNPCKL+load.

    These narrow the load so we can only do it if the load isn't
    volatile.

    There also tests in vector-shuffle-128-v4.ll that this should
    support, but we don't seem to fold bitcast+load on pre-sse4.2
    targets due to the slow unaligned mem 16 flag. — ctopper / ViewSVN
  7. [X86] Copy some test cases from vector-shuffle-sse1.ll to vector-shuffle-128-v4.ll and v8 where sse1 did better load folding. NFC — ctopper / ViewSVN
  8. [Rewrite] Try to fix buildbot link fail left by r365263

    http://lab.llvm.org:8011/builders/clang-ppc64le-linux-multistage/builds/10272 — jdenny / ViewSVN
  9. [Rewrite] Try to fix buildbot link fail caused by r365258

    http://lab.llvm.org:8011/builders/clang-ppc64le-linux-multistage/builds/10270 — jdenny / ViewSVN
  10. [LFTR] Regenerate test checks; NFC — nikic / ViewSVN
  11. Make list::remove/remove_if/unique all return void before C++20; undoes that bit of D58332. Thanks to Mikhail Maltsev for pointing this out — marshall / ViewSVN
  12. [IRBuilder] Fold consistently for or/and whether constant is LHS or RHS

    Without this, we have the unfortunate property that tests are dependent on the order of operads passed the CreateOr and CreateAnd functions.  In actual usage, we'd promptly optimize them away, but it made tests slightly more verbose than they should have been. — reames / ViewSVN
  13. [IRBuilder] Introduce helpers for and/or of multiple values at once

    We had versions of this code scattered around, so consolidate into one location.

    Not strictly NFC since the order of intermediate results may change in some places, but since these operations are associatives, should not change results. — reames / ViewSVN
  14. [Rewrite] Extend to further accept CharSourceRange

    Some Rewrite functions are already overloaded to accept
    CharSourceRange, and this extends others in the same manner.  I'm
    calling these in code that's not ready to upstream, but I figure they
    might be useful to others in the meantime.

    Reviewed By: jdoerfert

    Differential Revision: https://reviews.llvm.org/D61467 — jdenny / ViewSVN
  15. [TSan] Attempt to fix iOS on-device test — yln / ViewSVN
  16. [RegisterCoalescer] Fix an overzealous assert

    Although removeCopyByCommutingDef deals with full copies, it is still
    possible to copy undef lanes and thus, we wouldn't have any a value
    number for these lanes.

    This fixes PR40215. — qcolombet / ViewSVN
  17. RegUsageInfoCollector: Skip AMDGPU entry point functions

    I'm not sure if it's worth it or not to add a hook to disable the pass
    for an arbitrary function.

    This pass is taking up to 5% of compile time in tiny programs by
    iterating through all of the physical registers in every register
    class. This pass should be rewritten in terms of regunits. For now,
    skip doing anything for entry point functions. The vast majority of
    functions in the real world aren't callable, so just not running this
    will give the majority of the benefit. — arsenm / ViewSVN
  18. XFAIL a few failing TSan-fiber tests for iOS — yln / ViewSVN
  19. Remove `XFAIL: ios` from test that passes in CI — yln / ViewSVN
  20. Revert "[FileCheck] Simplify numeric variable interface"

    This reverts commit 096600a4b073dd94a366cc8e57bff93c34ff6966. — hliao / ViewSVN
  21. [FileCheck] Simplify numeric variable interface

    Summary:
    This patch simplifies 2 aspects in the FileCheckNumericVariable code.

    First, setValue() method is turned into a void function since being
    called only on undefined variable is an invariant and is now asserted
    rather than returned. This remove the assert from the callers.

    Second, clearValue() method is also turned into a void function since
    the only caller does not check its return value since it may be trying
    to clear the value of variable that is already cleared without this
    being noteworthy.

    Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk

    Subscribers: JonChesterfield, rogfer01, hfinkel, kristina, rnk, tra, arichardson, grimar, dblaikie, probinson, llvm-commits, hiraditya

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64231 — thopre / ViewSVN
  22. Improve MSVC visualization of annot_template_id tokens

    Now shows the actual annotated template. E.g.,
    {annot_template_id (A<int, double>)}

    Also a few miscellaneous fixes to visualizers of other types — mps / ViewSVN
  23. AMDGPU: Fix assert in clang test — arsenm / ViewSVN
  24. Revert "[TSan] Improve handling of stack pointer mangling in {set,long}jmp, pt.4"

    This reverts commit 6bb13da7c16f2a677cc285bb6ffeb79dfb0cfe64. — yln / ViewSVN
  25. [SystemZ] Fix addcarry of usubo (PR42512)

    Only custom lower uaddo+addcarry or usubo+subcarry chains and leave
    mixtures like usubo+addcarry or uaddo+subcarry to the generic
    legalizer. Otherwise we run into issues because SystemZ uses
    different CC values for carries and borrows.

    Fixes https://bugs.llvm.org/show_bug.cgi?id=42512.

    Differential Revision: https://reviews.llvm.org/D64213 — nikic / ViewSVN
  26. AMDGPU: Make AMDGPUPerfHintAnalysis an SCC pass

    Add a string attribute instead of directly setting
    MachineFunctionInfo. This avoids trying to get the analysis in the
    MachineFunctionInfo in a way that doesn't work with the new pass
    manager.

    This will also avoid re-visiting the call graph for every single
    function. — arsenm / ViewSVN
  27. [CodeGen] Enhance `MachineInstrSpan` to allow the end of MBB to be used.

    Summary:
    - Explicitly specify the parent MBB to allow the end iterator to be
      used.

    Reviewers: aprantl, MatzeB, craig.topper, qcolombet

    Subscribers: arsenm, jvesely, nhaehnle, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64261 — hliao / ViewSVN
  28. Bitstream reader: Fix undefined behavior seen after rL364464

    Summary:
    After rL364464 the following tests started to fail when
    running the clang-doc tests with an ubsan instrumented
    build of clang-doc:
        Clang Tools :: clang-doc/single-file-public.cpp
        Extra Tools Unit Tests :: clang-doc/./ClangDocTests/BitcodeTest.emitEnumInfoBitcode
        Extra Tools Unit Tests :: clang-doc/./ClangDocTests/BitcodeTest.emitMethodInfoBitcode
        Extra Tools Unit Tests :: clang-doc/./ClangDocTests/BitcodeTest.emitRecordInfoBitcode
        Extra Tools Unit Tests :: clang-doc/./ClangDocTests/SerializeTest.emitInfoWithCommentBitcode

    We need to check that the read value is in range for being
    casted to the llvm::bitc::FixedAbbrevIDs enum, before the
    cast in ClangDocBitcodeReader::skipUntilRecordOrBlock.

    SerializedDiagnosticReader::skipUntilRecordOrBlock was updated
    in the same way.

    Reviewers: jfb

    Reviewed By: jfb

    Subscribers: Bigcheese, vsapsai, bruno, ilya-biryukov, dexonsmith, kadircet, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64262 — bjope / ViewSVN
  29. This patch makes swap functions constexpr. Both swap overloads, swap_ranges and iter_swap are updated (with tests). — zoecarver / ViewSVN
  30. [PowerPC] Fold another unused variable into assertion. NFC. — d0k / ViewSVN
  31. [PowerPC] Fold variable into assert. NFC.

    Avoids a warning in Release builds. — d0k / ViewSVN
  32. [PowerPC] Remove unused variable. NFC. — d0k / ViewSVN
  33. [X86] Correct the size check in foldMemoryOperandCustom.

    The Size either needs to be 0 meaning we aren't folding
    a stack reload. Or the stack slot needs to be at least
    16 bytes. I've also added a paranoia check ensure the
    RCSize is at leat 16 bytes as well. This avoids any
    FR32/FR64 surprises, but I think we already filtered
    those earlier.

    All of our test case have Size as either 0 or 16 and
    RCSize == 16. So the Size <= 16 check worked for those
    cases. — ctopper / ViewSVN
  34. Revert "[libc++] Do not cleverly link against libc++abi just because it happens to be there"

    This reverts r365222, which broke the libc++ build bots. — Louis Dionne / ViewSVN
  35. [PowerPC] Move TOC save to prologue when profitable

    The indirect call sequence on PPC requires that the TOC base register be saved
    prior to the indirect call and restored after the call since the indirect call
    may branch to a global entry point in another DSO which will update the TOC
    base. Over the last couple of years, we have improved this to:

    - be able to hoist TOC saves from loops (with changes to MachineLICM)
    - avoid multiple saves when one dominates the other[s]

    However, it is still possible to have multiple TOC saves dynamically in the
    execution path if there is no dominance relationship between them.

    This patch moves the TOC save to the prologue when one of the TOC saves is in a
    block that post-dominates entry (i.e. it cannot be avoided) or if it is in a
    block that is hotter than entry.

    Differential revision: https://reviews.llvm.org/D63803 — nemanjai / ViewSVN
  36. Add lldb-mi deprecation to the release notes

    Differential revision: https://reviews.llvm.org/D64254 — Jonas Devlieghere / ViewSVN
  37. [TSan] Improve handling of stack pointer mangling in {set,long}jmp, pt.5

    Remove unnecessary computation of mangled SP for ARM64 architecture.

    Reviewed By: dvyukov

    Differential Revision: https://reviews.llvm.org/D64022 — yln / ViewSVN
  38. [TSan] Improve handling of stack pointer mangling in {set,long}jmp, pt.4

    For x86_64, since we don't clobber %rsi (2nd argument) anymore, we don't
    have to save/restore it.

    Reviewed By: dvyukov

    Differential Revision: https://reviews.llvm.org/D63946 — yln / ViewSVN
  39. Add LLDB section to the release notes — Jonas Devlieghere / ViewSVN
  40. [InferFunctionAttrs] add tests for 'dereferenceable' argument attribute; NFC — spatel / ViewSVN
  41. [X86] Update SSE1 MOVLPSrm and MOVHPSrm isel patterns to ensure loads are non-volatile before folding.

    These patterns use 128-bit loads, but the instructions only load
    64-bits. We shouldn't narrow the load if its volatile.

    Fixes another variant of PR42079 — ctopper / ViewSVN
  42. [X86] Remove unnecessary isel pattern for MOVLPSmr.

    This was identical to a pattern for MOVPQI2QImr with a bitcast
    as an input. But we should be able to turn MOVPQI2QImr into
    MOVLPSmr in the execution domain fixup pass so we shouldn't
    need this. — ctopper / ViewSVN
  43. [NFC] A test commit to check the access permission. Removed a blank line. — cdevadas / ViewSVN
  44. [libc++] Do not cleverly link against libc++abi just because it happens to be there

    Summary:
    Otherwise, when libcxxabi is not an enabled project in the monorepo, we
    get a link error because we try to link against non-existent cxxabi_shared.

    More generally, we shouldn't change the behavior of the build based on
    implicit things like whether a file happens to be at a specific path or
    not.

    Reviewers: EricWF

    Subscribers: mgorny, christof, jkorous, dexonsmith, libcxx-commits

    Tags: #libc

    Differential Revision: https://reviews.llvm.org/D63883 — Louis Dionne / ViewSVN
  45. [docs][llvm-readobj] Add a note to options that do nothing in GNU output

    --section-data, --section-relocations and --section-symbols have no
    effect for GNU style ouput. This patch changes the docs to point this
    out, as it has caught me out on a couple of occasions.

    See also https://bugs.llvm.org/show_bug.cgi?id=42522. — jhenderson / ViewSVN
  46. [FileCheck] Share variable instance among uses

    Summary:
    This patch changes expression support to use one instance of
    FileCheckNumericVariable per numeric variable rather than one per
    variable and per definition. The current system was only necessary for
    the last patch of the numeric expression support patch series in order
    to handle a line using a variable defined earlier on the same line from
    the input text. However this can be dealt more efficiently.

    Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk

    Subscribers: JonChesterfield, rogfer01, hfinkel, kristina, rnk, tra, arichardson, grimar, dblaikie, probinson, llvm-commits, hiraditya

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64229 — thopre / ViewSVN
  47. [FileCheck] Don't diagnose undef vars at parse time

    Summary:
    Diagnosing use of undefined variables takes place in
    parseNumericVariableUse() and printSubstitutions() for numeric variables
    but only takes place in printSubstitutions() for string variables. The
    reason for the split location of diagnostics is that parsing is not
    aware of the clearing of variables due to --enable-var-scope and thus
    use of variables cleared in this way can only be catched by
    printSubstitutions().

    Beyond the code level inconsistency, there is also a user facing
    inconsistency since diagnostics look different between the two
    functions. While the diagnostic in printSubstitutions is more verbose,
    doing the diagnostic there allows to diagnose all undefined variables
    rather than just the first one and error out.

    This patch create dummy variable definition when encountering a use of
    undefined variable so that parsing can proceed and be diagnosed by
    printSubstitutions() later. Tests that were testing whether parsing
    fails in such case are thus modified accordingly.

    Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk

    Subscribers: JonChesterfield, rogfer01, hfinkel, kristina, rnk, tra, arichardson, grimar, dblaikie, probinson, llvm-commits, hiraditya

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64228 — thopre / ViewSVN
  48. [AMDGPU] Added a new metadata for multi grid sync implicit argument

    Patch by Christudasan Devadasan.

    Differential Revision: https://reviews.llvm.org/D63886 — yaxunl / ViewSVN
  49. ScheduleDAG: Fix incorrectly killing registers in bundles

    When looking for uses/defs to add kill flags, the iterator was double
    incremented, skipping the first instruction in the bundle. The use
    register in the first bundle instruction was then incorrectly killed.
    The "First" instruction should be the BUNDLE itself as the proper
    reverse iterator endpoint. — arsenm / ViewSVN
  50. [ThinLTO] Attempt to recommit r365188 after alignment fix — evgeny777 / ViewSVN
  51. [ARM] MVE patterns for VMVN, VORR and VBIC

    This add simple Q register forms of bitwise not instructions.

    Differential Revision: https://reviews.llvm.org/D63983 — dmgreen / ViewSVN
  52. gn build: Merge r365203 — nico / ViewSVN
  53. Add a comment explaining why a function exists — nico / ViewSVN
  54. [AMDGPU] DPP combiner: recognize identities for more opcodes

    Summary:
    This allows the DPP combiner to kick in more often. For example the
    exclusive scan generated by the atomic optimizer for a divergent atomic
    add used to look like this:

            v_mov_b32_e32 v3, v1
            v_mov_b32_e32 v5, v1
            v_mov_b32_e32 v6, v1
            v_mov_b32_dpp v3, v2  wave_shr:1 row_mask:0xf bank_mask:0xf
            s_nop 1
            v_add_u32_dpp v4, v3, v3  row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:0
            v_mov_b32_dpp v5, v3  row_shr:2 row_mask:0xf bank_mask:0xf
            v_mov_b32_dpp v6, v3  row_shr:3 row_mask:0xf bank_mask:0xf
            v_add3_u32 v3, v4, v5, v6
            v_mov_b32_e32 v4, v1
            s_nop 1
            v_mov_b32_dpp v4, v3  row_shr:4 row_mask:0xf bank_mask:0xe
            v_add_u32_e32 v3, v3, v4
            v_mov_b32_e32 v4, v1
            s_nop 1
            v_mov_b32_dpp v4, v3  row_shr:8 row_mask:0xf bank_mask:0xc
            v_add_u32_e32 v3, v3, v4
            v_mov_b32_e32 v4, v1
            s_nop 1
            v_mov_b32_dpp v4, v3  row_bcast:15 row_mask:0xa bank_mask:0xf
            v_add_u32_e32 v3, v3, v4
            s_nop 1
            v_mov_b32_dpp v1, v3  row_bcast:31 row_mask:0xc bank_mask:0xf
            v_add_u32_e32 v1, v3, v1
            v_add_u32_e32 v1, v2, v1
            v_readlane_b32 s0, v1, 63

    But now most of the dpp movs are combined into adds:

            v_mov_b32_e32 v3, v1
            v_mov_b32_e32 v5, v1
            s_nop 0
            v_mov_b32_dpp v3, v2  wave_shr:1 row_mask:0xf bank_mask:0xf
            s_nop 1
            v_add_u32_dpp v4, v3, v3  row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:0
            v_mov_b32_dpp v5, v3  row_shr:2 row_mask:0xf bank_mask:0xf
            v_mov_b32_dpp v1, v3  row_shr:3 row_mask:0xf bank_mask:0xf
            v_add3_u32 v1, v4, v5, v1
            s_nop 1
            v_add_u32_dpp v1, v1, v1  row_shr:4 row_mask:0xf bank_mask:0xe
            s_nop 1
            v_add_u32_dpp v1, v1, v1  row_shr:8 row_mask:0xf bank_mask:0xc
            s_nop 1
            v_add_u32_dpp v1, v1, v1  row_bcast:15 row_mask:0xa bank_mask:0xf
            s_nop 1
            v_add_u32_dpp v1, v1, v1  row_bcast:31 row_mask:0xc bank_mask:0xf
            v_add_u32_e32 v1, v2, v1
            v_readlane_b32 s0, v1, 63

    Reviewers: arsenm, vpykhtin

    Subscribers: kzhuravl, nemanjai, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, kbarton, MaskRay, jfb, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64207 — foad / ViewSVN
  55. NFC: Add an explicit return for safety and consistency

    This case implicitly falls-through, which is fine now as it's at the end of the
    function, but it seems like an accident waiting to happen. — hamzasood / ViewSVN
  56. Removed the test case added in D63538 due to windows buildbot failures — szelethus / ViewSVN
  57. [analyzer] Add a debug analyzer config to place an event for each tracked condition

    Differential Revision: https://reviews.llvm.org/D63642 — szelethus / ViewSVN
  58. [analyzer] Track terminator conditions on which a tracked expression depends

    This patch is a major part of my GSoC project, aimed to improve the bug
    reports of the analyzer.

    TL;DR: Help the analyzer understand that some conditions are important,
    and should be explained better. If an CFGBlock is a control dependency
    of a block where an expression value is tracked, explain the condition
    expression better by tracking it.

    if (A) // let's explain why we believe A to be true
      10 / x; // division by zero

    This is an experimental feature, and can be enabled by the
    off-by-default analyzer configuration "track-conditions".

    In detail:

    This idea was inspired by the program slicing algorithm. Essentially,
    two things are used to produce a program slice (a subset of the program
    relevant to a (statement, variable) pair): data and control
    dependencies. The bug path (the linear path in the ExplodedGraph that leads
    from the beginning of the analysis to the error node) enables to
    analyzer to argue about data dependencies with relative ease.

    Control dependencies are a different slice of the cake entirely.

    Just because we reached a branch during symbolic execution, it
    doesn't mean that that particular branch has any effect on whether the
    bug would've occured. This means that we can't simply rely on the bug
    path to gather control dependencies.

    In previous patches, LLVM's IDFCalculator, which works on a control flow
    graph rather than the ExplodedGraph was generalized to solve this issue.
    We use this information to heuristically guess that the value of a tracked
    expression depends greatly on it's control dependencies, and start
    tracking them as well.

    After plenty of evaluations this was seen as great idea, but still
    lacking refinements (we should have different descriptions about a
    conditions value), hence it's off-by-default.

    Differential Revision: https://reviews.llvm.org/D62883 — szelethus / ViewSVN
  59. Reverted r365188 due to alignment problems on i686-android — evgeny777 / ViewSVN
  60. [clangd] Added highlighting for variable references (declrefs)

    Summary: Added highlighting for variable references using VisitDeclRefExpr.

    Reviewers: hokein, sammccall

    Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64199 — jvikstrom / ViewSVN
  61. [clangd] Deduplicate clang-tidy diagnostic messages.

    Summary:
    Clang-tidy checks may emit duplicated messages (clang-tidy tool
    deduplicate them in its custom diagnostic consumer), and we may show
    multiple duplicated diagnostics in the UI, which is really bad.

    This patch makes clangd do the deduplication, and revert the change
    rL363889.

    Reviewers: sammccall

    Subscribers: ilya-biryukov, MaskRay, jkorous, mgrang, arphaman, kadircet, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64127 — hokein / ViewSVN
  62. Scalable Vector IR Type with further LTO fixes

    Reintroduces the scalable vector IR type from D32530, after it was reverted
    a couple of times due to increasing chromium LTO build times. This latest
    incarnation removes the walk over aggregate types from the verifier entirely,
    in favor of rejecting scalable vectors in the isValidElementType methods in
    ArrayType and StructType. This removes the 70% degradation observed with
    the second repro tarball from PR42210.

    Reviewers: thakis, hans, rengolin, sdesmalen

    Reviewed By: sdesmalen

    Differential Revision: https://reviews.llvm.org/D64079 — huntergr / ViewSVN
  63. This reverts r365061 and r365062 (test update)

    Revision r365061 changed a skip of debug instructions for a skip
    of meta instructions. This is not safe, as IMPLICIT_DEF is classed
    as a meta instruction. — rlougher / ViewSVN
  64. [RISCV] Support @llvm.readcyclecounter() Intrinsic

    On RISC-V, the `cycle` CSR holds a 64-bit count of the number of clock
    cycles executed by the core, from an arbitrary point in the past. This
    matches the intended semantics of `@llvm.readcyclecounter()`, which we
    currently leave to the default lowering (to the constant 0).

    With this patch, we will now correctly lower this intrinsic to the
    intended semantics, using the user-space instruction `rdcycle`. On
    64-bit targets, we can directly lower to this instruction.

    On 32-bit targets, we need to do more, as `rdcycle` only returns the low
    32-bits of the `cycle` CSR. In this case, we perform a custom lowering,
    based on the PowerPC lowering, using `rdcycleh` to obtain the high
    32-bits of the `cycle` CSR. This custom lowering inserts a new basic
    block which detects overflow in the high 32-bits of the `cycle` CSR
    during reading (because multiple instructions are required to read). The
    emitted assembly matches the suggested assembly in the RISC-V
    specification.

    Differential Revision: https://reviews.llvm.org/D64125 — lenary / ViewSVN
  65. lld, llvm-dlltool, llvm-lib: Use getAsString() instead of getSpelling() for printing unknown args

    Since OPT_UNKNOWN args never have any values and consist only of
    spelling (and are never aliased), this doesn't make any difference in
    practice, but it's more consistent with Arg's guidance to use
    getAsString() for diagnostics, and it matches what clang does.

    Also tweak two tests to use an unknown option that contains '=' for
    additional coverage while here. (The new tests pass fine with the old
    code too though.) — nico / ViewSVN
  66. Revert r365198 as this accidentally commited something that
    should not have been added. — rlougher / ViewSVN
  67. This reverts r365061 and r365062 (test update)

    Revision r365061 changed a skip of debug instructions for a skip
    of meta instructions. This is not safe, as IMPLICIT_DEF is classed
    as a meta instruction. — rlougher / ViewSVN
  68. [analyzer][IDF] Add a control dependency calculator + a new debug checker

    I intend to improve the analyzer's bug reports by tracking condition
    expressions.

    01 bool b = messyComputation();
    02 int i = 0;
    03 if (b) // control dependency of the bug site, let's explain why we assume val
    04        // to be true
    05   10 / i; // warn: division by zero

    I'll detail this heuristic in the followup patch, strictly related to this one
    however:

    * Create the new ControlDependencyCalculator class that uses llvm::IDFCalculator
      to (lazily) calculate control dependencies for Clang's CFG.
    * A new debug checker debug.DumpControlDependencies is added for lit tests
    * Add unittests

    Differential Revision: https://reviews.llvm.org/D62619 — szelethus / ViewSVN
  69. [RISCV][NFC] Replace hard-coded CSR duplication with symbolic references

    Reviewers: asb, lenary

    Reviewed By: asb, lenary

    Subscribers: MaskRay, hiraditya, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64139

    Patch by James Clarke (jrtc27) — lenary / ViewSVN
  70. Fix MSVC/cppcheck Use::Next isn't initialized warning. NFCI. — rksimon / ViewSVN
  71. [llvm-objcopy] Allow strip symtab from executables and DSOs

    Differential revision: https://reviews.llvm.org/D61672 — evgeny777 / ViewSVN
  72. [FileCheck] Fix comment in parseNumericVariableUse

    Summary:
    Comment explaining the interaction between parsing of numeric variable
    definition and uses in parseNumericVariableUse is stale since it
    suggests both use and definition parsing is done in the same function.
    This was the case in a previous version of the patch committed as
    71d3f227a790d6cf39d8c6267940e0dc0c237e11 but is no longer the case. This
    patch updates the comment accordingly.

    Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk

    Subscribers: JonChesterfield, rogfer01, hfinkel, kristina, rnk, tra, arichardson, grimar, dblaikie, probinson, llvm-commits, hiraditya

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64227 — thopre / ViewSVN
  73. [FileCheck] Factor some parsing checks out

    Summary:
    Both callers of parseNumericVariableDefinition() perform the same extra
    check that no character is found after the variable name. This patch
    factors out this check into parseNumericVariableDefinition().

    Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk

    Subscribers: JonChesterfield, rogfer01, hfinkel, kristina, rnk, tra, arichardson, grimar, dblaikie, probinson, llvm-commits, hiraditya

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64226 — thopre / ViewSVN
  74. [FileCheck] Add missing final dot in comment — thopre / ViewSVN
  75. [NFC] Test commit access — gamesh411 / ViewSVN
  76. [ThinLTO] Attempt to recommit r365040 after caching fix

    It's possible that some function can load and store the same
    variable using the same constant expression:

    store %Derived* @foo, %Derived** bitcast (%Base** @bar to %Derived**)
    %42 = load %Derived*, %Derived** bitcast (%Base** @bar to %Derived**)

    The bitcast expression was mistakenly cached while processing loads,
    and never examined later when processing store. This caused @bar to
    be mistakenly treated as read-only variable. See load-store-caching.ll. — evgeny777 / ViewSVN
  77. [docs][llvm-objcopy] Improve some wording. — jhenderson / ViewSVN
  78. Make joined instances of JoinedOrSeparate flags point to the unaliased args, like all other arg types do

    This fixes an 8-year-old regression. r105763 made it so that aliases
    always refer to the unaliased option – but it missed the "joined" branch
    of JoinedOrSeparate flags. (r162231 then made the Args classes
    non-virtual, and r169344 moved them from clang to llvm.)

    Back then, there was no JoinedOrSeparate flag that was an alias, so it
    wasn't observable. Now /U in CLCompatOptions is a JoinedOrSeparate alias
    in clang, and warn_slash_u_filename incorrectly used the aliased arg id
    (using the unaliased one isn't really a regression since that warning
    checks if the undefined macro contains slash or backslash and only then
    emits the warning – and no valid use will pass "-Ufoo/bar" or similar).

    Also, lld has many JoinedOrSeparate aliases, and due to this bug it had
    to explicitly call `getUnaliasedOption()` in a bunch of places, even
    though that shouldn't be necessary by design. After this fix in Option,
    these calls really don't have an effect any more, so remove them.

    No intended behavior change.

    (I accidentally fixed this bug while working on PR29106 but then
    wondered why the warn_slash_u_filename broke. When I figured it out, I
    thought it would make sense to land this in a separate commit.)

    Differential Revision: https://reviews.llvm.org/D64156 — nico / ViewSVN
  79. gn build: Merge r365179 — nico / ViewSVN
  80. [Object/ELF.h] - Improve error reporting.

    The errors coming from ELF.h are usually not very
    useful because they are uninformative. This patch is a
    first step to improve the situation.

    I tested this patch with a run of check-llvm and found
    that few messages are untested. In this patch, I did not
    add more tests but marked all such cases with a "TODO" comment.

    For all tested messages I extended the error text to
    provide more details (see test cases changed).

    Differential revision: https://reviews.llvm.org/D64014 — grimar / ViewSVN
  81. lld-link: Make /debugtype: option work better

    - The code tried to pass false to split()'s KeepEmpty parameter, but
      instead passed it to MaxSplit. As a result, it would never split on
      commas. This has been broken since the flag was added in r278056.

    - The code used getSpelling() for getting the argument's values, but
      getSpelling() always returns the `/debugtype:` prefix without any
      values. So if any /debugtype: flag was passed, it always resulted in
      an "unknown option:" warning. (The warning code then used the correct
      getValue() for printing the invalid option, so the warning looked
      kind of like it made sense.) This regressed in r342894.

    Slightly improve the test coverage of this feature (but since I don't
    know what this flag actually does, there's still no test for the correct
    semantics), and add a comment to getSpelling() explaining what it does. — nico / ViewSVN
  82. Fix a buildbot failure due to the AST's lifetime ending before the test — szelethus / ViewSVN
  83. [X86][SSE] LowerINSERT_VECTOR_ELT - early out for out of range indices

    Fixes OSS-Fuzz #15662 — rksimon / ViewSVN
  84. [analyzer][Dominators][NFC] Add unit tests

    Differential Revision: https://reviews.llvm.org/D62611 — szelethus / ViewSVN
  85. [ARM] MVE VMOV immediate handling

    This adds some handling for VMOVimm, using the same method that NEON uses. We
    create VMOVIMM/VMVNIMM/VMOVFPIMM nodes based on the immediate, and select them
    using the now renamed ARMvmovImm/etc. There is also an extra 64bit immediate
    mode that I have not yet added here.

    Code by David Sherwood

    Differential Revision: https://reviews.llvm.org/D63884 — dmgreen / ViewSVN
  86. [CFG] Add a new function to get the proper condition of a CFGBlock

    getTerminatorCondition() returned a condition that may be outside of the
    block, while the new function returns the proper one:

    if (A && B && C) {}

    Return C instead of A && B && C.

    Differential Revision: https://reviews.llvm.org/D63538 — szelethus / ViewSVN
  87. [ARM] MVE fp to int conversions

    This adds the patterns needed for fptosi and sitofp.

    Differential Revision: https://reviews.llvm.org/D63729 — dmgreen / ViewSVN
  88. [RISCV] Delete a ctor that is commented out. NFC — maskray / ViewSVN
  89. Silence gcc warning "control reaches end of non-void function" [NFCI]

    Without this fix gcc (7.4) complains with

    /data/repo/master/clang/lib/CodeGen/CGObjCMac.cpp: In member function 'std::__cxx11::string {anonymous}::CGObjCCommonMac::GetSectionName(llvm::StringRef, llvm::StringRef)':
    /data/repo/master/clang/lib/CodeGen/CGObjCMac.cpp:4944:1: error: control reaches end of non-void function [-Werror=return-type]
      }
      ^

    All values in the ObjectFormatType enum are currently handled in the switch
    but gcc complains anyway. — uabelho / ViewSVN
  90. [llvm-objcopy][NFC] Refactor output target parsing v2

    Summary:
    Use an enum instead of string to hold the output file format in Config.InputFormat and Config.OutputFormat. It's essential to support other output file formats other than ELF.

    This patch originally has been submitted as D63239. However, there was an use-of-uninitialized-value bug and reverted in r364379 (git commit 4ee933c).

    This patch includes the fix for the bug by setting Config.InputFormat/Config.OutputFormat in parseStripOptions.

    Reviewers: espindola, alexshap, rupprecht, jhenderson

    Reviewed By: jhenderson

    Subscribers: emaste, arichardson, jakehehrlich, MaskRay, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64170 — seiya / ViewSVN
  91. [llvm-objcopy][test] Fix respect-umask.test after D62718/r365162 — maskray / ViewSVN
  92. Fix patch not passing test cases — abrachet / ViewSVN
  93. Temporarily stop failing test case — abrachet / ViewSVN
  94. gn build: Merge r365130. — pcc / ViewSVN
  95. gn build: Merge r365103. — pcc / ViewSVN
  96. gn build: Merge r365007. — pcc / ViewSVN
  97. gn build: Merge r365091. — pcc / ViewSVN
  98. [X86] Add custom isel to select ADD/SUB/OR/XOR/AND to their non-immediate forms under optsize when the immediate has additional users.

    Summary:
    We attempt to prevent folding immediates with multiple users under optsize. But we only do this from store nodes and X86ISD::ADD/SUB/XOR/OR/AND patterns. We don't do it for ISD::ADD/SUB/XOR/OR/AND even though we count them as users when deciding whether to fold into other nodes. This leads to situations where we block folding to a compare for example, but still fold into an AND or OR as seen in PR27202.

    Unfortunately touching the isel patterns in tablegen for the ISD::ADD/SUB/XOR/OR/AND opcodes will cause the patterns to be unusable for fast isel. And we don't have a way to make a fast isel only pattern.

    To workaround this, this patch adds custom isel in front of the isel table that will select the non-immediate forms if the immediate has additional users. This may create some issues for ANDN and NOT matching. And there's room for improvement with unsigned 32 immediates on 64-bit AND.

    This patch needs more thorough test cases, but I wanted to get feedback on the direction. Please send me any other test cases you've seen in the wild.

    I think we probably have the same issue with the immediate matching when we fold RMW from X86ISD::ADD/SUB/XOR/OR/AND. And our TEST immedaite shrinking logic. Our cost modeling for immediates that can fit in a sign extended 8-bit immediate on a 16/32/64 bit operation is completely wrong.

    I also wonder if we should update the ConstantHoisting cost model and block folding for "opaque" constants. But of course constants can still be created by DAG combine and lowering optimizations.

    Fixes PR27202

    Reviewers: spatel, RKSimon, andreadb

    Reviewed By: RKSimon

    Subscribers: jsji, hiraditya, jdoerfert, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D59909 — ctopper / ViewSVN
  99. [llvm-objcopy] Change handling of output file permissions

    Summary: Address bug [[ https://bugs.llvm.org/show_bug.cgi?id=42082 | 42082 ]] where files were always outputted with 0775 permissions. Now, the output file is given either 0666 or 0777 if the object is executable.

    Reviewers: espindola, alexshap, rupprecht, jhenderson, jakehehrlich, MaskRay

    Reviewed By: rupprecht, jhenderson, jakehehrlich, MaskRay

    Subscribers: emaste, arichardson, jakehehrlich, MaskRay, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D62718 — abrachet / ViewSVN
  100. [mips] Refactor expandSeq and expandSeqI methods. NFC — atanasyan / ViewSVN
  101. [NFC] Make some ObjectFormatType switches covering

    Summary:
    This patch removes the `default` case from some switches on
    `llvm::Triple::ObjectFormatType`, and cases for the missing enumerators
    are then added.

    For `UnknownObjectFormat`, the action (`llvm_unreachable`) for the
    `default` case is kept.

    For the other unhandled cases, `report_fatal_error` is used instead.

    Reviewers: sfertile, jasonliu, daltenty

    Reviewed By: sfertile

    Subscribers: wuzish, aheejin, jsji, cfe-commits, llvm-commits

    Tags: #clang, #llvm

    Differential Revision: https://reviews.llvm.org/D63767 — hubert.reinterpretcast / ViewSVN
  102. [docs] [tools] Fix see also links

    Summary: Changes "see also" links to use :manpage: instead of plain text or the form `name|name` which was being treated literally, not as a link.

    Reviewers: jhenderson, rupprecht

    Reviewed By: jhenderson

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63970 — abrachet / ViewSVN
  103. docs: add documentation for `LIBCXX_INCLUDE_TESTS`

    Add some missing documentation for the `LIBCXX_INCLUDE_TESTS` option.

    Patch by Jean Heyd Meneide! — Saleem Abdulrasool / ViewSVN
  104. [modules] Add PP callbacks for entering and leaving a submodule. — vvassilev / ViewSVN
  105. [clangd] Mark a couple of unimportant flags as hidden. NFC — sammccall / ViewSVN
  106. [DAGCombiner] Don't combine (addcarry (uaddo X, Y), 0, Carry) -> (addcarry X, Y, Carry) if the Carry comes from the uaddo.

    Summary:
    The uaddo won't be removed and the addcarry will still be
    dependent on the uaddo. So we'll just increase the use count
    of X and Y and potentially require a COPY.

    Reviewers: spatel, RKSimon, deadalnix

    Reviewed By: RKSimon

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64190 — ctopper / ViewSVN
  107. [AMDGPU] Custom lower INSERT_SUBVECTOR v3, v4, v5, v8

    Summary:
    Since the changes to introduce vec3 and vec5, INSERT_VECTOR for these
    sizes has been marked "expand", which made LegalizeDAG lower it to loads
    and stores via a stack slot. The code got optimized a bit later, but the
    now-unused stack slot was never deleted.

    This commit avoids that problem by custom lowering INSERT_SUBVECTOR into
    an EXTRACT_VECTOR_ELT and INSERT_VECTOR_ELT for each element in the
    subvector to insert.

    V2: Addressed review comments re test.

    Differential Revision: https://reviews.llvm.org/D63160

    Change-Id: I9e3c13e36f68cfa3431bb9814851cc1f673274e1 — tpr / ViewSVN
  108. [InstCombine] allow undef elements when forming splat from chain of insertelements

    We allow forming a splat (broadcast) shuffle, but we were conservatively limiting
    that to cases where all elements of the vector are specified. It should be safe
    from a codegen perspective to allow undefined lanes of the vector because the
    expansion of a splat shuffle would become the chain of inserts again.

    Forming splat shuffles can reduce IR and help enable further IR transforms.
    Motivating bugs:
    https://bugs.llvm.org/show_bug.cgi?id=42174
    https://bugs.llvm.org/show_bug.cgi?id=16739

    Differential Revision: https://reviews.llvm.org/D63848 — spatel / ViewSVN

#18313 (Jul 4, 2019 3:35:07 AM)

  1. [Remarks] Silence gcc warning by catching unhandled values in switches

    Without this fix gcc (7.4) complains with
    ../lib/Remarks/RemarkParser.cpp: In function 'std::unique_ptr<llvm::remarks::ParserImpl> formatToParserImpl(llvm::remarks::ParserFormat, llvm::StringRef)':
    ../lib/Remarks/RemarkParser.cpp:29:1: error: control reaches end of non-void function [-Werror=return-type]
      }
      ^
    ../lib/Remarks/RemarkParser.cpp: In function 'std::unique_ptr<llvm::remarks::ParserImpl> formatToParserImpl(llvm::remarks::ParserFormat, llvm::StringRef, const llvm::remarks::ParsedStringTable&)':
    ../lib/Remarks/RemarkParser.cpp:38:1: error: control reaches end of non-void function [-Werror=return-type]
      }
      ^

    The Format enum currently only contains the value YAML which is indeed
    already handled in the switches, but gcc complains anyway.

    Adding a default case with an llvm_unreachable silences gcc. — uabelho / ViewSVN

#18311 (Jul 4, 2019 2:54:53 AM)

  1. [ARM] Favour PL/MI over GE/LT when possible

    The arm condition codes for GE is N==V (and for LT is N!=V). If the source of
    flags cannot set V (overflow), such as a cmp against #0, then we can use the
    simpler PL and MI conditions that only check N. As these PL/MI conditions are
    simpler than GE/LT, other passes like the peephole optimiser can have a better
    time optimising away the redundant CMPs.

    The exception is the VSEL instruction, which cannot take the PL code, so there
    the transform favours GE.

    Differential Revision: https://reviews.llvm.org/D64160 — dmgreen / ViewSVN
  2. [ARM] Added testing for D64160. NFC

    Adds some extra vsel testing and regenerates long shift and saturation bitop
    tests. — dmgreen / ViewSVN
  3. [docs][llvm-dwarfdump] Remove unnecessary reference to --show-children

    The --show-children option description describes what it does, and
    references the =<offset> parameter of section dump switches. I don't
    think it needs to be explained again in the documentation of the
    section dump switches too.

    Reviewed by: JDevlieghere

    Differential Revision: https://reviews.llvm.org/D64132 — jhenderson / ViewSVN
  4. [TableGen] Allow DAG isel patterns to override default operands.

    When a Tablegen instruction description uses `OperandWithDefaultOps`,
    isel patterns for that instruction don't have to fill in the default
    value for the operand in question. But the flip side is that they
    actually //can't// override the defaults even if they want to.

    This will be very inconvenient for the Arm backend, when we start
    wanting to write isel patterns that generate the many MVE predicated
    vector instructions, in the form with predication actually enabled. So
    this small Tablegen fix makes it possible to write an isel pattern
    either with or without values for a defaulted operand, and have the
    default values filled in only if they are not overridden.

    If all the defaulted operands come at the end of the instruction's
    operand list, there's a natural way to match them up to the arguments
    supplied in the pattern: consume pattern arguments until you run out,
    then fill in any missing instruction operands with their default
    values. But if defaulted and non-defaulted operands are interleaved,
    it's less clear what to do. This does happen in existing targets (the
    first example I came across was KILLGT, in the AMDGPU/R600 backend),
    and of course they expect the previous behaviour (that the default for
    those operands is used and a pattern argument is not consumed), so for
    backwards compatibility I've stuck with that.

    Reviewers: nhaehnle, hfinkel, dmgreen

    Subscribers: mehdi_amini, javed.absar, tpr, kristof.beyls, steven_wu, dexonsmith, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63814 — statham / ViewSVN
  5. [ARM] MVE bitwise instruction patterns

    This adds patterns for the simpler VAND, VORR and VEOR bitwise vector
    instructions. It also adjusts the top16Zero PatLeaf to not match on vector
    instructions, which can otherwise cause problems.

    Code written by David Sherwood.

    Differential Revision: https://reviews.llvm.org/D63867 — dmgreen / ViewSVN
  6. [clangd] Add missing changes for 365111 — jvikstrom / ViewSVN
  7. [clangd] Emit publishSemanticHighlighting in LSP if enabled

    Summary: Emit publishSemanticHighlighting in LSP if enabled

    Reviewers: hokein, kadircet

    Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D63919 — jvikstrom / ViewSVN

#18309 (Jul 4, 2019 1:37:36 AM)

  1. [NFC][PowerPC] Make the PowerPC scheduling strategy feature only control the strategy instead of the scheduler. — qshanz / ViewSVN

#18307 (Jul 4, 2019 1:01:15 AM)

  1. [X86] Use pointer sized indices instead of i32 for EXTRACT_VECTOR_ELT and INSERT_VECTOR_ELT in a couple places.

    Most places already did this. — ctopper / ViewSVN
  2. [AVR] Fix tests after r363757

    r363757 renamed ExpandISelPseudo to FinalizeISel, so the RUN line in
    select-must-add-unconditional-jump.mir needed updating to refer to finalize-isel. — dylanmckay / ViewSVN

#18304 (Jul 3, 2019 11:00:26 PM)

  1. [LoopPeel] Some small comment update. NFC.

    Follow-up change of comment after
    https://reviews.llvm.org/D63917 is landed. — skatkov / ViewSVN
  2. [PowerPC] Support constraint code "ww"

    Summary:
    "ww" and "ws" are both constraint codes for VSX vector registers that
    hold scalar double data. "ww" is preferred for float while "ws" is
    preferred for double.

    Reviewed By: jsji

    Differential Revision: https://reviews.llvm.org/D64119 — maskray / ViewSVN
  3. [docs] [NFC] Removed excess spacing

    Summary: Removed excess new lines from documentations. As far as I can tell, it seems as though restructured text is agnostic to new lines, the use of new lines was inconsistent and had no effect on how the files were being displayed.

    Reviewers: jhenderson, rupprecht, JDevlieghere

    Reviewed By: jhenderson

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63971 — abrachet / ViewSVN

#18299 (Jul 3, 2019 8:04:50 PM)

  1. [PowerPC] Hardware Loop branch instruction's condition may not be icmp.
    This fixes pr42492.
    Differential Revision: https://reviews.llvm.org/D64124 — shchenz / ViewSVN
  2. [analyzer] ReturnValueChecker: Model the guaranteed boolean return value of function calls

    Summary: It models the known LLVM methods paired with their class.

    Reviewers: NoQ, xazax.hun, ravikandhadai, baloghadamsoftware, Szelethus

    Reviewed By: NoQ

    Subscribers: dschuff, aheejin, mgorny, szepet, rnkovacs, a.sidorin,
                 mikhail.ramalho, donat.nagy, dkrupp, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D63915 — charusso / ViewSVN

#18297 (Jul 3, 2019 6:51:46 PM)

  1. [Remarks] Require an explicit format to the parser

    Make the parser require an explicit format.

    This allows new formats to be easily added by following YAML as an
    example. — thegameg / ViewSVN
  2. [Remarks][NFC] Move the string table parsing out of the parser constructor

    Make the parser take an already-parsed string table. — thegameg / ViewSVN
  3. [WebAssembly] Update test failure explanations — dschuff / ViewSVN
  4. [MachO] Add valid architecture function

    Added array of valid architectures and function returning array.
    Modified llvm-lipo to include list of valid architectures in error message for invalid arch.

    Patch by Anusha Basana <anusha.basana@gmail.com>

    Differential Revision: https://reviews.llvm.org/D63735 — smeenai / ViewSVN
  5. [JITLink][ORC] Add EHFrameRegistrar interface, use in EHFrameRegistrationPlugin.

    Replaces direct calls to eh-frame registration with calls to methods on an
    EHFrameRegistrar instance. This allows clients to substitute a registrar that
    registers frames in a remote process via IPC/RPC. — Lang Hames / ViewSVN
  6. Revert [ThinLTO] Optimize writeonly globals out

    This reverts r365040 (git commit 5cacb914758c7f436b47c8362100f10cef14bbc4)

    Speculatively reverting, since this appears to have broken check-lld on
    Linux. Partial analysis in https://crbug.com/981168. — rnk / ViewSVN
  7. [WebAssembly] Enable IndirectBrExpandPass

    Wasm doesn't have a direct way to lower indirectbr, so hook up the
    IndirectBrExpandPass to lower indirectbr into a switch.

    Fixes PR42498

    Reviewers: aheejin

    Differential Revision: https://reviews.llvm.org/D64161 — dschuff / ViewSVN
  8. AMDGPU: Add pass to lower SGPR spills

    This is split out from my patches to split register allocation into a
    separate SGPR and VGPR phase, and has some parts that aren't yet used
    (like maintaining LiveIntervals).

    This simplifies making the frame pointer register callee saved. As it
    is now, the code to determine callee saves needs to predict all the
    possible SGPR spills and how many callee saved VGPRs are needed. By
    handling this before PrologEpilogInserter, it's possible to just check
    the spill objects that already exist.

    Change-Id: I29e6df4034afcf949e06f8ef44206acb94696f04 — arsenm / ViewSVN
  9. [JumpThreading] Fix threading with unusual PHI nodes.

    If the block being cloned contains a PHI node, in general, we need to
    clone that PHI node, even though it's trivial. If the operand of the PHI
    is an instruction in the block being cloned, the correct value for the
    operand doesn't exist until SSAUpdater constructs it.

    We usually don't hit this issue because we try to avoid threading across
    loop headers, but it's possible to hit this in some cases involving
    irreducible CFGs.  I added a flag to allow threading across loop headers
    to make the testcase easier to understand.

    Thanks to Brian Rzycki for reducing the testcase.

    Fixes https://bugs.llvm.org/show_bug.cgi?id=42085.

    Differential Revision: https://reviews.llvm.org/D63913 — efriedma / ViewSVN
  10. GlobalISel: Fix widenScalar for pointer typed G_MERGE_VALUES — arsenm / ViewSVN
  11. cmake: Add CLANG_LINK_CLANG_DYLIB option

    Summary:
    Setting CLANG_LINK_CLANG_DYLIB=ON causes clang tools to link against
    libclang_shared.so instead of the individual component libraries.

    Reviewers: mgorny, beanz, smeenai, phosek, sylvestre.ledru

    Subscribers: arphaman, cfe-commits, llvm-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D63503 — tstellar / ViewSVN
  12. [Bitcode] Move Bitstream to a separate library

    This moves Bitcode/Bitstream*, Bitcode/BitCodes.h to Bitstream/.

    This is needed to avoid a circular dependency when using the bitstream
    code for parsing optimization remarks.

    Since Bitcode uses Core for the IR part:

    libLLVMRemarks -> Bitcode -> Core

    and Core uses libLLVMRemarks to generate remarks (see
    IR/RemarkStreamer.cpp):

    Core -> libLLVMRemarks

    we need to separate the Bitstream and Bitcode part.

    For clang-doc, it seems that it doesn't need the whole bitcode layer, so
    I updated the CMake to only use the bitstream part.

    Differential Revision: https://reviews.llvm.org/D63899 — thegameg / ViewSVN
  13. [WebAssembly][NFC] simplify SjLj inline assembly test

    Summary:
    Per feedback in D64115, simplify the test.

    `hidden` is left in though, because every test in the file has it.

    Reviewers: aheejin, tlively

    Subscribers: dschuff, sbc100, jgravelle-google, sunfish, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64117 — quantum / ViewSVN
  14. [WebAssembly] Add option to emit passive segments

    Summary:
    Adds `--passive-segments` and `--active-segments` flags to control
    what kind of segments are emitted. For now the default is always
    to emit active segments so this is not a breaking change, but in
    the future the default will be changed to passive segments when
    shared memory is requested and active segments otherwise. When
    passive segments are emitted, corresponding memory.init and
    data.drop instructions are emitted in a `__wasm_init_memory`
    function that is automatically called at the beginning of
    `__wasm_call_ctors`.

    Reviewers: sbc100, aheejin, dschuff

    Subscribers: azakai, dschuff, jgravelle-google, sunfish, jfb, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D59343 — tlively / ViewSVN
  15. Revert "[AMDGPU] Kernel arg metadata: added support for "__hip_texture" type."

    This reverts commit r365073.

    This is crashing, and is improperly relying on IR type names. — arsenm / ViewSVN
  16. [analyzer] exploded-graph-rewriter: Implement a black-and-white color scheme.

    For accessibility!

    Differential Revision: https://reviews.llvm.org/D64153 — dergachev / ViewSVN
  17. Revert "[llvm-ar][test] Add to MRI test coverage"

    This reverts commit 250015bacf7f255abcfb646fb8b6b56ce8be7e01.
    r365039 was re-commit of D63197 and failed on Mac. Reid XFAIL'd it, but I'd rather jsut revert and have it fixed properly. — jfb / ViewSVN
  18. Add tests for regex_match ambiguity (aka LWG2273). NFC. Reviewed as https://reviews.llvm.org/D63051 — marshall / ViewSVN
  19. Teach ValueTracking that aarch64.irg result aliases its input.

    Reviewers: javed.absar, olista01

    Subscribers: kristof.beyls, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64103 — eugenis / ViewSVN
  20. Fixed a link in ReleaseNotes.rst (follow-up to r365007) — gribozavr / ViewSVN
  21. [LoopBase] Strengthen isLoopExiting by requiring that BB must be inside the loop.

    Currently isLoopExiting returns true for BBs that are not part of the
    loop. To avoid hiding subtle bugs, this patch adds an assertion to make
    sure the passed BB is inside the loop

    Reviewers: reames, efriedma, hfinkel, arsenm, nhaehnle

    Reviewed By: reames

    Differential Revision: https://reviews.llvm.org/D63952 — fhahn / ViewSVN
  22. Try to XFAIL mri-utf8.test on Mac — rnk / ViewSVN
  23. [LFTR] Use SCEVExpander for the pointer limit case instead of manual IR gen

    As noted in the test change, this is not trivially NFC, but all of the changes in output are cases where the SCEVExpander form is more canonical/optimal than the hand generation. — reames / ViewSVN
  24. Fix tuple's conditionally explicit constructors for very weird user
    types.

    It seems some people like to write types that can explicitly convert
    to anything, but cannot be used to explicitly construct anything.

    This patch makes tuple tolerate such types, as is required
    by the standard. — ericwf / ViewSVN
  25. [AMDGPU] Kernel arg metadata: added support for "__hip_texture" type.

    Summary:
    Hip texture type is equivalent to OpenCL image. So, we need to set the Image type for kernel arguments with __hip_texture type.

    Differential revision: https://reviews.llvm.org/D63850 — kpyzhov / ViewSVN
  26. [LFTR] Remove a stray variable shadow *of the same value* [NFC] — reames / ViewSVN
  27. [LFTR] Style and comment changes to clarify the narrow vs wide bitwidth evaluation behavior [NFC] — reames / ViewSVN
  28. [LFTR] Sink the decision not use truncate scheme for constants into genLoopLimit [NFC]

    We might as well just evaluate the constants using SCEV, and having the cases grouped makes the logic slightly easier to read anyway. — reames / ViewSVN
  29. Fix precedence in assert from r364961

    Precedence was wrong in an assert added in r364961. Add braces around the
    assertion condition to make it right.

    See: https://reviews.llvm.org/D64084 — paquette / ViewSVN
  30. [libc++] Update availability markup for Filesystem on Apple platforms — Louis Dionne / ViewSVN
  31. [LFTR] Remove falsely generalized (dead) code [NFC] — reames / ViewSVN
  32. [LFTR] Hoist extend expressions outside of loops w/o waiting for LICM

    The motivation for this is two fold:
    1) Make the output (and thus tests)  a bit more readable to a human trying to understand the result of the transform
    2) Reduce spurious diffs in a potential future change to restructure all of this logic to use SCEVExpander (which hoists by default) — reames / ViewSVN
  33. [clang-scan-deps] use `-Wno-error` when scanning for dependencies

    Warnings can be promoted to errors.
    But that shouldn't prevent us from getting the dependencies!

    Differential Revision: https://reviews.llvm.org/D64149 — arphaman / ViewSVN

#18296 (Jul 3, 2019 11:37:07 AM)

  1. [macCatalyst] Print out macCatalyst in llvm-objdump for the platform

    'macCatalyst' is more readable than 'maccatalyst'. — arphaman / ViewSVN
  2. [GlobalISel][AArch64] Use getConstantVRegValWithLookThrough for selectArithImmed

    Instead of just stopping to see if we have a G_CONSTANT, instead, look through
    G_TRUNCs, G_SEXTs, and G_ZEXTs.

    This gives an average ~1.3% code size improvement on CINT2000 at -O3.

    Differential Revision: https://reviews.llvm.org/D64108 — paquette / ViewSVN
  3. [X86] Update test; NFC

    This updates pr38743.ll after D62605. — rlougher / ViewSVN
  4. [X86] Avoid SFB - Skip meta instructions

    This patch generalizes the fix in D61680 to ignore all meta instructions,
    not just debug info.

    Patch by Chris Dawson.

    Differential Revision: https://reviews.llvm.org/D62605 — rlougher / ViewSVN
  5. [Bitcode] Update CHECK-DAG usage in tests

    This patch adjusts tests not to depend on deprecated FileCheck
    behavior that permits overlapping matches within a block of
    `CHECK-DAG` directives:

    1. `thinlto-function-summary-originalnames.ll`: The directive with the
    pattern `<COMBINED` is surely intended to match `<COMBINED ` (note the
    trailing space), but it instead matches
    `<COMBINED_GLOBALVAR_INIT_REFS`, for which there is a separate
    directive.  With the deprecated behavior, both directives match the
    latter text and neither match the former text.  I've adjusted the
    former directive so it matches only the former text.

    2. `thinlto-summary-local-5.0.ll`: Two directives have identical
    patterns when they were clearly meant to have different patterns.

    3. `upgrade-pointer-address-space.ll`: There are three identical
    directives but only two occurrences of the matching text.  With the
    deprecated behavior, they always match exactly the same text, so the
    behavior can't have been useful.  I removed one of the directives and
    converted the other two from `CHECK-DAG` to `CHECK`.

    Reviewed By: probinson, aprantl

    Differential Revision: https://reviews.llvm.org/D64036 — jdenny / ViewSVN
  6. [CodeGen] Make branch funnels pass the machine verifier

    We previously marked all the tests with branch funnels as
    `-verify-machineinstrs=0`.

    This is an attempt to fix it.

    1) `ICALL_BRANCH_FUNNEL` has no defs. Mark it as `let OutOperandList =
    (outs)`

    2) After that we hit an assert: ``` Assertion failed: (Op.getValueType()
    != MVT::Other && Op.getValueType() != MVT::Glue && "Chain and glue
    operands should occur at end of operand list!"), function AddOperand,
    file
    /Users/francisvm/llvm/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp,
    line 461.  ```

    The chain operand was added at the beginning of the operand list. Move
    that to the end.

    3) After that we hit another verifier issue in the pseudo expansion
    where the registers used in the cmps and jmps are not added to the
    livein lists. Add the `EFLAGS` to all the new MBBs that we create.

    PR39436

    Differential Review: https://reviews.llvm.org/D54155 — thegameg / ViewSVN
  7. [X86] ComputeNumSignBitsForTargetNode - add target shuffle support. — rksimon / ViewSVN
  8. [NFC][InstCombine] onehot_merge.ll: add last few tests in the state they regress to in D62818 — lebedevri / ViewSVN
  9. [SLP] add tests for bitcasted vector pointer load; NFC

    I'm not sure if this falls within the scope of SLP,
    but we could create vector loads for some of these
    patterns. — spatel / ViewSVN
  10. Use getAllOnesConstants instead of -1 in DAGCombiner. NFC — deadalnix / ViewSVN
  11. [SCEV] Preserve flags on add/muls in getSCEVATScope

    We haven't changed the set of users, just specialized an operand for those users.  Given that, the previous wrap flags must still be correct.

    Sorry for the lack of test case.  Noticed this while working on something else, and haven't figured out to exercise this standalone. — reames / ViewSVN
  12. [scudo][standalone] Link tests against libatomic

    Summary:
    Some clang versions (< 6.0) do not inline the atomic builtin functions
    leaving unresolved references to `__atomic_load_8` and so on (seems to
    be mostly 64-bit atomics on 32-bit platforms).
    I tried without success to use some cmake magic to detect when that
    would be the case, and decided to fall back to unconditionally
    linking libatomic.

    Reviewers: morehouse, eugenis, vitalybuka, hctim, tejohnson

    Reviewed By: tejohnson

    Subscribers: mgorny, delcypher, jfb, #sanitizers, llvm-commits

    Tags: #llvm, #sanitizers

    Differential Revision: https://reviews.llvm.org/D64134 — cryptoad / ViewSVN
  13. [DAGCombine] More diamong carry pattern optimization.

    Summary:
    This diff improve the capability of DAGCOmbine to generate linear carries propagation in presence of a diamond pattern. It is now able to match a large variety of different patterns rather than some hardcoded one.

    Arguably, the codegen in test cases is not better, but this is to be expected. The goal of this transformation is more about canonicalisation than actual optimisation.

    Reviewers: hfinkel, RKSimon, craig.topper

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D57302 — deadalnix / ViewSVN
  14. [X86][AVX] combineX86ShufflesRecursively - peek through extract_subvector

    If we have more then 2 shuffle ops to combine, try to use combineX86ShuffleChainWithExtract to see if some are from the same super vector. — rksimon / ViewSVN
  15. [ThinLTO] Fix gcc warnings from commit

    Remove an unnecessary const from an Optional return type introduced
    in r364960 that gcc 7.4.0 warns about. It is unnecessary and possibly
    incorrect. — tejohnson / ViewSVN
  16. [ARM] Fix for NDEBUG builds

    Fix unused variable warning as well as a nonsense assert.

    Differential Revision: https://reviews.llvm.org/D63816 — sam_parker / ViewSVN
  17. [scudo][standalone] Potential fix for missing sized delete

    Summary:
    In some setups, using `-fsized-deallocation` would end up not finding
    a sized delete operator at link time. For now, avoid using the flag
    and declare the sized delete operator in the cpp test only.

    This is a tentative fix as I do not have the failing setup.

    Reviewers: rnk, morehouse, hctim, eugenis, vitalybuka

    Reviewed By: rnk, hctim

    Subscribers: mgorny, delcypher, #sanitizers, llvm-commits

    Tags: #llvm, #sanitizers

    Differential Revision: https://reviews.llvm.org/D64086 — cryptoad / ViewSVN
  18. [X86][AVX] Combine vpermi(bitcast(x)) -> bitcast(vpermi(x))

    iff the number of elements doesn't change.

    This gets around an issue with combineX86ShuffleChain not being able to hint which domain is preferred for shuffles that can be done with either.

    Fixes regression introduced in rL365041 — rksimon / ViewSVN
  19. [SelectionDAG] Propagate alias metadata to target intrinsic nodes

    When a target intrinsic has been determined to touch memory, we construct a MachineMemOperand during SDAG construction. In this case, we should propagate AAMDNodes metadata to the MachineMemOperand where available.

    Differential revision: https://reviews.llvm.org/D64131 — jamesm / ViewSVN
  20. [docs][llvm-objcopy] Write documentation for llvm-objcopy

    This patch addresses https://bugs.llvm.org/show_bug.cgi?id=42183 by replacing
    the stub markdown doc for llvm-objcopy with a full one describing the current
    options available in llvm-objcopy.

    Reviewed by: jakehehrlich, MaskRay

    Differential Revision: https://reviews.llvm.org/D63820 — jhenderson / ViewSVN
  21. [X86][AVX] combineX86ShuffleChainWithExtract - add number of non-zero extract_subvectors to the combine depth

    This better accounts for the cost/benefit of removing extract_subvectors from the shuffle and will be more useful in future patches.

    The vpermq predicate regression will be fixed shortly. — rksimon / ViewSVN
  22. [ThinLTO] Optimize writeonly globals out

    Differential revision: https://reviews.llvm.org/D63444 — evgeny777 / ViewSVN
  23. [llvm-ar][test] Add to MRI test coverage

    This reapplies 363232 that was reverted due to a buildbot test failure, this build bot has now been fixed.

    Differential Revision: https://reviews.llvm.org/D63197 — gbreynoo / ViewSVN
  24. Revert "[analyzer][CFG] Return the correct terminator condition"

    This reverts commit 7a57118a6fcfa3770f984453543bbdfd0b233e84.

    Causes a bunch of crashes, I need to time to evaluate this. — szelethus / ViewSVN
  25. [analyzer][CFG] Return the correct terminator condition

    For the following terminator statement:

    if (A && B && C && D)
    The built CFG is the following:

    [B5 (ENTRY)]
      Succs (1): B4

    [B1]
      1: 10
      2: j
      3: [B1.2] (ImplicitCastExpr, LValueToRValue, int)
      4: [B1.1] / [B1.3]
      5: int x = 10 / j;
      Preds (1): B2
      Succs (1): B0

    [B2]
      1: C
      2: [B2.1] (ImplicitCastExpr, LValueToRValue, _Bool)
      T: if [B4.4] && [B3.2] && [B2.2]
      Preds (1): B3
      Succs (2): B1 B0

    [B3]
      1: B
      2: [B3.1] (ImplicitCastExpr, LValueToRValue, _Bool)
      T: [B4.4] && [B3.2] && ...
      Preds (1): B4
      Succs (2): B2 B0

    [B4]
      1: 0
      2: int j = 0;
      3: A
      4: [B4.3] (ImplicitCastExpr, LValueToRValue, _Bool)
      T: [B4.4] && ...
      Preds (1): B5
      Succs (2): B3 B0

    [B0 (EXIT)]
      Preds (4): B1 B2 B3 B4

    However, even though the path of execution in B2 only depends on C's value,
    CFGBlock::getCondition() would return the entire condition (A && B && C). For
    B3, it would return A && B. I changed this the actual condition.

    Differential Revision: https://reviews.llvm.org/D63538 — szelethus / ViewSVN
  26. [mips] Mark general scheduling model as complete — atanasyan / ViewSVN
  27. [mips] Add missing atomic instructions to general scheduling definitions — atanasyan / ViewSVN
  28. [mips] Add missing microMIPS instructions to general scheduling definitions — atanasyan / ViewSVN
  29. Fix -Wcast-qual const warning. NFCI. — rksimon / ViewSVN
  30. Make a buildbot using a buggy gcc happy

    When specializing a template in a namespace, it has to be in a namespace
    block, else gcc will get confused. Hopefully this fixes the issue.

    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480 — szelethus / ViewSVN
  31. Specialize an anchor() function in the correct namespace — szelethus / ViewSVN
  32. [analyzer][Dominator] Add post dominators to CFG + a new debug checker

    Transform clang::DominatorTree to be able to also calculate post dominators.

    * Tidy up the documentation
    * Make it clang::DominatorTree template class (similarly to how
      llvm::DominatorTreeBase works), rename it to clang::CFGDominatorTreeImpl
    * Clang's dominator tree is now called clang::CFGDomTree
    * Clang's brand new post dominator tree is called clang::CFGPostDomTree
    * Add a lot of asserts to the dump() function
    * Create a new checker to test the functionality

    Differential Revision: https://reviews.llvm.org/D62551 — szelethus / ViewSVN
  33. [X86][SSE] lowerUINT_TO_FP_v2i32 - explicitly cast half word to double

    Fixes MSVC analyzer extension->double warning. — rksimon / ViewSVN
  34. [Dominators] PR42041: Skip nullpointer successors

    https://bugs.llvm.org/show_bug.cgi?id=42041

    In Clang's CFG, we use nullpointers to represent unreachable nodes, for
    example, in the included testfile, block B0 is unreachable from block
    B1, resulting in a nullpointer dereference somewhere in
    llvm::DominatorTreeBase<clang::CFGBlock, false>::recalculate.

    This patch fixes this issue by specializing
    llvm::DomTreeBuilder::SemiNCAInfo::ChildrenGetter::Get for
    clang::CFG to not contain nullpointer successors.

    Differential Revision: https://reviews.llvm.org/D62507 — szelethus / ViewSVN
  35. [X86][SSE] LowerINSERT_VECTOR_ELT - ensure insertion index correctness. NFCI.

    Assert that the insertion index is in range and use uint64_t for the index to fix MSVC/cppcheck truncation warning. — rksimon / ViewSVN
  36. [X86][SSE] LowerScalarImmediateShift - ensure shift amount correctness. NFCI.

    Assert that the shift amount is in range and create vXi8 shift masks in a way that doesn't cause MSVC/cppcheck shift result is truncated then extended warnings. — rksimon / ViewSVN
  37. [mips] Add SIGRIE,GINVI,GINVT to general scheduling definitions — atanasyan / ViewSVN
  38. [mips] Add missing mips16 instructions to general scheduling definitions — atanasyan / ViewSVN
  39. [mips] Add missing MSA and ASE instructions to general scheduling definitions — atanasyan / ViewSVN
  40. [mips] Replace some itineraries by instructions in the general scheduling definitions — atanasyan / ViewSVN
  41. Fix MSVC "signed/unsigned mismatch" warning. NFCI.

    Fixes PR42426. — rksimon / ViewSVN
  42. Fix uninitialized variable warnings. NFCI.

    Both MSVC and cppcheck don't like the fact that the variables are initialized via references. — rksimon / ViewSVN
  43. [clang-tidy] Fix the YAML created for checks like modernize-pass-by-value

    Currently this check generates the replacement with the newline in the end.
    The proper way to export it to YAML is to have two \n\n instead of one.
    Without this fix clients should reinterpret the replacement as
    "#include <utility> " instead of "#include <utility>\n"

    Differential Revision: https://reviews.llvm.org/D63482 — yvvan / ViewSVN
  44. [X86] LowerFunnelShift - use modulo constant shift amount.

    This avoids the use of getZExtValue and uses the modulo shift amount which is whats expected for funnel shifts anyhow. — rksimon / ViewSVN
  45. [ARM] Thumb2: favor R4-R7 over R12/LR in allocation order when opt for minsize

    For Thumb2, we prefer low regs (costPerUse = 0) to allow narrow
    encoding. However, current allocation order is like:
      R0-R3, R12, LR, R4-R11

    As a result, a lot of instructs that use R12/LR will be wide instrs.

    This patch changes the allocation order to:
      R0-R7, R12, LR, R8-R11
    for thumb2 and -Osize.

    In most cases, there is no extra push/pop instrs as they will be folded
    into existing ones. There might be slight performance impact due to more
    stack usage, so we only enable it when opt for min size.

    https://reviews.llvm.org/D30324 — ostannard / ViewSVN
  46. Remove some autoconf references from docs and comments

    The autoconf build system support has been removed a while ago, remove
    some outdated references.

    Differential Revision: https://reviews.llvm.org/D63608 — svenvh / ViewSVN
  47. Fix MSVC "not all control paths return a value" warnings. NFCI. — rksimon / ViewSVN
  48. [InstCombine] Y - ~X --> X + Y + 1 fold (PR42457)

    Summary:
    I *think* we'd want this new variant, because we obviously
    have better handling for `add` as compared to `sub`/`not`.

    https://rise4fun.com/Alive/WMn

    Fixes [[ https://bugs.llvm.org/show_bug.cgi?id=42457 | PR42457 ]]

    Reviewers: spatel, nikic, huihuiz, efriedma

    Reviewed By: spatel

    Subscribers: RKSimon, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63992 — lebedevri / ViewSVN
  49. [Codegen][X86][AArch64][ARM][PowerPC] Inc-of-add vs sub-of-not (PR42457)

    Summary:
    This is the backend part of [[ https://bugs.llvm.org/show_bug.cgi?id=42457 | PR42457 ]].
    In middle-end, we'd want to prefer the form with two adds - D63992,
    but as this diff shows, not every target will prefer that pattern.

    Out of 4 targets for which i added tests all seem to be ok with inc-of-add for scalars,
    but only X86 prefer that same pattern for vectors.

    Here i'm adding a new TLI hook, always defaulting to the inc-of-add,
    but adding AArch64,ARM,PowerPC overrides to prefer inc-of-add only for scalars.

    Reviewers: spatel, RKSimon, efriedma, t.p.northover, hfinkel

    Reviewed By: efriedma

    Subscribers: nemanjai, javed.absar, kristof.beyls, kbarton, jsji, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64090 — lebedevri / ViewSVN
  50. [SCEV][LSR] Prevent using undefined value in binops

    On some occasions ReuseOrCreateCast may convert previously
    expanded value to undefined. That value may be passed by
    SCEVExpander as an argument to InsertBinop making IV chain
    undefined.

    Differential revision: https://reviews.llvm.org/D63928 — evgeny777 / ViewSVN
  51. MSan: handle callbr instructions

    Summary:
    Handling callbr is very similar to handling an inline assembly call:
    MSan must checks the instruction's inputs.
    callbr doesn't (yet) have outputs, so there's nothing to unpoison,
    and conservative assembly handling doesn't apply either.

    Fixes PR42479.

    Reviewers: eugenis

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64072 — glider / ViewSVN
  52. [clang-tidy] new check: bugprone-posix-return

    Summary:
    Checks if any calls to posix functions (except posix_openpt) expect negative return values.
    These functions return either 0 on success or an errno on failure, which is positive only.

    Reviewers: JonasToth, gribozavr, alexfh, hokein

    Reviewed By: gribozavr

    Subscribers: Eugene.Zelenko, lebedev.ri, llozano, george.burgess.iv, xazax.hun, srhines, mgorny, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D63623

    Patch by Jian Cai. — gribozavr / ViewSVN
  53. Change std::{lower,upper}_bound to llvm::{lower,upper}_bound or llvm::partition_point. NFC — maskray / ViewSVN
  54. [clang][HeaderSearch] Shorten paths for includes in mainfile's directory

    Summary:
    Currently HeaderSearch only looks at SearchDir's passed into it, but in
    addition to those paths headers can be relative to including file's directory.

    This patch makes sure that is taken into account.

    Reviewers: gribozavr

    Subscribers: jkorous, arphaman, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D63295 — kadircet / ViewSVN

#18295 (Jul 3, 2019 3:15:55 AM)

  1. [LoopPeel] Re-factor llvm::peelLoop method. NFC.

    Extract code dealing with branch weights in separate functions.

    Reviewers: reames, mkuper, iajbar, fhahn
    Reviewed By: reames, fhahn
    Subscribers: llvm-commits
    Differential Revision: https://reviews.llvm.org/D63917 — skatkov / ViewSVN
  2. Revert [InlineCost] cleanup calculations of Cost and Threshold

    This reverts r364422 (git commit 1a3dc761860d620ac8ed7e32a4285952142f780b)

    The inlining cost calculation is incorrect, leading to stack overflow due to large stack frames from heavy inlining. — rupprecht / ViewSVN
  3. [ThinLTO] Reenable test with workaround for known failure

    Reenable the testing disabled in r364978 with the same workaround used
    for this failure in the cfi-devirt.ll test. The known issue is PR39436,
    and the workaround is to add -verify-machineinstrs=0. — tejohnson / ViewSVN
  4. [AMDGPU] Enable serializing of argument info.

    Summary:
    - Support serialization of all arguments in machine function info. This
      enables fabricating MIR tests depending on argument info.

    Reviewers: arsenm, rampitec

    Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64096 — hliao / ViewSVN
  5. [AArch64][GlobalISel] Overhaul legalization & isel or shifts to select immediate forms.

    There are two main issues preventing us from generating immediate form shifts:
    1) We have partial SelectionDAG imported support for G_ASHR and G_LSHR shift
    immediate forms, but they currently don't work because the amount type is
    expected to be an s64 constant, but we only legalize them to have homogenous
    types.

    To deal with this, first we introduce a custom legalizer to *only* custom legalize
    s32 shifts which have a constant operand into a s64.

    There is also an additional artifact combiner to fold zexts(g_constant) to a
    larger G_CONSTANT if it's legal, a counterpart to the anyext version committed
    in an earlier patch.

    2) For G_SHL the importer can't cope with the pattern. For this I introduced an
    early selection phase in the arm64 selector to select these forms manually
    before the tablegen selector pessimizes it to a register-register variant.

    Differential Revision: https://reviews.llvm.org/D63910 — aemerson / ViewSVN
  6. [PowerPC] exclude ICmpZero in LSR if icmp can be replaced in later hardware loop.
     
    Differential Revision: https://reviews.llvm.org/D63477 — shchenz / ViewSVN
  7. [analyzer] exploded-graph-rewriter: Implement bug nodes and sink nodes.

    Add a label to nodes that have a bug report attached or on which
    the analysis was generally interrupted.

    Fix printing has_report and implement printing is_sink in the graph dumper.

    Differential Revision: https://reviews.llvm.org/D64110 — dergachev / ViewSVN
  8. [analyzer] exploded-graph-rewriter: NFC: Add more comments. — dergachev / ViewSVN
  9. [analyzer] exploded-graph-rewriter: Collapse very long statement pretty-prints.

    When printing various statements that include braces (compound
    statements, lambda expressions, statement-expressions, etc.),
    replace the code between braces with '...'.

    Differential Revision: https://reviews.llvm.org/D64104 — dergachev / ViewSVN
  10. [analyzer] exploded-graph-rewriter: Implement checker messages.

    They are displayed as raw lines and diffed via difflib on a per-checker basis.

    Differential Revision: https://reviews.llvm.org/D64100 — dergachev / ViewSVN
  11. [triple] Use 'macabi' environment name for the Mac Catalyst triples

    The 'macabi' environment name is preferred instead of 'maccatalyst'. — arphaman / ViewSVN
  12. Revert Changing CodeView debug info type record representation in assembly files to make it more human-readable & editable

    This reverts r364982 (git commit 2082bf28ebea76cc187b508f801122866420d9ff) — nilanjana_basu / ViewSVN
  13. [VFS] Add reverse iterator to OverlayFileSystem

    Add a reverse iterator to the overlay file system. This makes it
    possible to take overlays from one OverlayFileSystem, and add them to
    another.

    Differential revision: https://reviews.llvm.org/D64113 — Jonas Devlieghere / ViewSVN
  14. [WebAssembly] Prevent inline assembly from being mangled by SjLj

    Summary:
    Before, inline assembly gets mangled by the SjLj transformation.

    For example, in a function with setjmp/longjmp, this LLVM IR code

        call void asm sideeffect "", ""()

    would be transformed into

        call void @__invoke_void(void ()* asm sideeffect "", "")

    This is invalid, and results in the error:

        Cannot take the address of an inline asm!

    In this diff, we skip the transformation for inline assembly.

    Reviewers: aheejin, tlively

    Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64115 — quantum / ViewSVN
  15. CodeGen: Set hasSideEffects = 0 on BUNDLE

    The BUNDLE itself should not have side effects, and this is a property
    of instructions inside the bundle. The hasProperty check already
    searches for any member instructions, which was pointless since it was
    overridden by this bit.

    Allows me to distinguish bundles that have side effects vs. do not in
    a future patch. Also fixes an unnecessary scheduling barrier in the
    bundle AMDGPU uses to get PC relative addresses. — arsenm / ViewSVN
  16. AMDGPU: Look through bundles for existing waitcnts

    These aren't produced now, but will be in a future patch. — arsenm / ViewSVN
  17. Changing CodeView debug info type record representation in assembly files to make it more human-readable & editable — nilanjana_basu / ViewSVN
  18. Add support for the 'macCatalyst' MachO platform

    Mac Catalyst is a new MachO platform in macOS Catalina.
    It always uses the build_version MachO load command.

    Differential Revision: https://reviews.llvm.org/D64107 — arphaman / ViewSVN
  19. [ThinLTO] Work around existing failure exposed by new test

    When adding summary entries for index-based WPD (r364960), an added
    test also included some additional testing of the existing hybrid
    Thin/Regular LTO WPD (test/ThinLTO/X86/devirt.ll). That part of the
    test is producing a failure on the llvm-clang-x86_64-expensive-checks-win
    bot:

    *** Bad machine code: Explicit definition marked as use ***
    - function:    __typeid__ZTS1A_0_branch_funnel
    - basic block: %bb.0  (0x81d4c58)
    - instruction: ICALL_BRANCH_FUNNEL %0:gr64, @0, 16, @_ZN1B1fEi, 48, @_ZN1C1fEi
    - operand 0:   %0:gr64
    LLVM ERROR: Found 1 machine code errors.

    This is functionality unrelated to the summary entries added with my
    patch, so I am disabling this part of the new test until it is
    addressed. I'll continue to investigate the failure. — tejohnson / ViewSVN
  20. [X86] Add a DAG combine for turning *_extend_vector_inreg+load into an appropriate extload if the load isn't volatile.

    Remove the corresponding isel patterns that did the same thing without checking for volatile.

    This fixes another variation of PR42079 — ctopper / ViewSVN
  21. Attempt #2 to fix gcc builds. This time check
    against CXX compiler ID instead of CRT test ID. — hctim / ViewSVN

#18294 (Jul 2, 2019 4:43:45 PM)

  1. [ThinLTO] Dump input on failure in devirt test

    To help track down bug exposed by llvm-clang-x86_64-expensive-checks-win
    bot. — tejohnson / ViewSVN
  2. Only use -mno-omit-leaf-frame-pointer with clang builds.
    Fix build breakage caused by D64085 — hctim / ViewSVN
  3. [triple] add 'macCatalyst' environment type

    Mac Catalyst is a new deployment platform in macOS Catalina.

    Differential Revision: https://reviews.llvm.org/D64097 — arphaman / ViewSVN
  4. [ARM] Fix unwind info for Thumb1 functions that save high registers.

    There were two issues here: one, some of the relevant instructions were
    missing the expected "FrameSetup" flag, and two,
    ARMAsmPrinter::EmitUnwindingInstruction wasn't expecting "mov"
    instructions in the prologue.

    I'm sticking the additional state into ARMFunctionInfo so it's obvious
    it only applies to the current function.

    I considered a few alternative approaches where we would compute the
    correct unwind information as part of the prologue/epilogue lowering,
    but it seems like a lot of work to introduce pseudo-instructions, and
    the current code seems to be reliable enough.

    Fixes https://bugs.llvm.org/show_bug.cgi?id=42408.

    Differential Revision: https://reviews.llvm.org/D63964 — efriedma / ViewSVN
  5. [NFC] Strenghten isInteger condition for rL364940 — xbolva00 / ViewSVN
  6. [ThinLTO] Address post-review suggestions for index-based WPD summary

    Removes a couple of unnecessary and/or redundant checks introduced by
    r364960. — tejohnson / ViewSVN
  7. [GWP-ASan] [Scudo] Add GWP-ASan backtrace for alloc/free to Scudo.

    Summary:
    Adds allocation and deallocation stack trace support to Scudo. The
    default provided backtrace library for GWP-ASan is supplied by the libc
    unwinder, and is suitable for production variants of Scudo. If Scudo in future
    has its own unwinder, it may choose to use its own over the generic unwinder
    instead.

    Reviewers: cryptoad

    Reviewed By: cryptoad

    Subscribers: kubamracek, mgorny, #sanitizers, llvm-commits, morehouse, vlad.tsyrklevich, eugenis

    Tags: #sanitizers, #llvm

    Differential Revision: https://reviews.llvm.org/D64085 — hctim / ViewSVN
  8. [gold] Fix test after BitStream reader error changes

    The recent change to the BitStream reader error handling in r364464
    changed the error message format (from "LLVM ERROR:" to just "error"),
    leading to a failure in this test which is only executed for very recent
    versions of gold. Fix this by removing that part of the error message
    check, leaving only the interesting part of the message to be checked. — tejohnson / ViewSVN
  9. [SLP] Recommit: Look-ahead operand reordering heuristic.

    Summary: This patch introduces a new heuristic for guiding operand reordering. The new "look-ahead" heuristic can look beyond the immediate predecessors. This helps break ties when the immediate predecessors have identical opcodes (see lit test for an example).

    Reviewers: RKSimon, ABataev, dtemirbulatov, Ayal, hfinkel, rnk

    Reviewed By: RKSimon, dtemirbulatov

    Subscribers: hiraditya, phosek, rnk, rcorcs, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D60897 — vporpo / ViewSVN
  10. [clang-doc] Serialize child namespaces and records

    Serialization of child namespaces and records is now handled.
    Namespaces can have child records and child namespaces.
    Records can only have child records.

    Committed on behalf of Diego Astiazarán (diegoaat97@gmail.com).

    Differential Revision: https://reviews.llvm.org/D63911 — juliehockett / ViewSVN
  11. [AArch64][GlobalISel] Teach tryOptSelect to handle G_ICMP

    This teaches `tryOptSelect` to handle folding G_ICMP, and removes the
    requirement that the G_SELECT we're dealing with is floating point.

    Some refactoring to make this work nicely as well:

    - Factor out the scalar case from the selection code for G_ICMP into
      `emitIntegerCompare`.
    - Make `tryOptCMN` return a MachineInstr* instead of a bool.
    - Make `tryOptCMN` not modify the instruction being selected.
    - Factor out the CMN emission into `emitCMN` for readability.

    By doing this this way, we can get all of the compare selection optimizations
    in select emission.

    Differential Revision: https://reviews.llvm.org/D64084 — paquette / ViewSVN
  12. [ThinLTO] Add summary entries for index-based WPD

    Summary:
    If LTOUnit splitting is disabled, the module summary analysis computes
    the summary information necessary to perform single implementation
    devirtualization during the thin link with the index and no IR. The
    information collected from the regular LTO IR in the current hybrid WPD
    algorithm is summarized, including:
    1) For vtable definitions, record the function pointers and their offset
    within the vtable initializer (subsumes the information collected from
    IR by tryFindVirtualCallTargets).
    2) A record for each type metadata summarizing the vtable definitions
    decorated with that metadata (subsumes the TypeIdentiferMap collected
    from IR).

    Also added are the necessary bitcode records, and the corresponding
    assembly support.

    The follow-on index-based WPD patch is D55153.

    Depends on D53890.

    Reviewers: pcc

    Subscribers: mehdi_amini, Prazek, inglorion, eraman, steven_wu, dexonsmith, arphaman, llvm-commits

    Differential Revision: https://reviews.llvm.org/D54815 — tejohnson / ViewSVN
  13. AMDGPU: Custom lower vector_shuffle for v4i16/v4f16

    Ordinarily it is lowered as a build_vector of each extract_vector_elt,
    which in turn get lowered to bitcasts and bit shifts. Very little
    understand the lowered extract pattern, resulting in much worse
    code. We treat concat_vectors of v2i16 as legal, so prefer that. — arsenm / ViewSVN
  14. [RA] Fix spelling of Greedy register allocator internal option

    The internal option added with r323870 has a typo. It isn't being used
    by any tests, but I decided to fix the spelling and leave it in for use
    in debugging the changes added in that patch. — tejohnson / ViewSVN

#18293 (Jul 2, 2019 12:32:25 PM)

  1. [X86] Copy test cases from vector-zext.ll to vector-zext-widen.ll. Same for vector-sext.ll. NFC — ctopper / ViewSVN
  2. [lli] Fix a typo in a header. — Lang Hames / ViewSVN
  3. [llvm-objdump] Warn if no user specified sections (-j) are not found.

    Match GNU objdump.

    https://bugs.llvm.org/show_bug.cgi?id=41898

    Reviewers: jhenderson, grimar, MaskRay, rupprecht

    Reviewed by: jhenderson, grimar, MaskRay

    Differential Revision: https://reviews.llvm.org/D63779 — yuanfang / ViewSVN
  4. [C++2a] Add __builtin_bit_cast, used to implement std::bit_cast

    This commit adds a new builtin, __builtin_bit_cast(T, v), which performs a
    bit_cast from a value v to a type T. This expression can be evaluated at
    compile time under specific circumstances.

    The compile time evaluation currently doesn't support bit-fields, but I'm
    planning on fixing this in a follow up (some of the logic for figuring this out
    is in CodeGen). I'm also planning follow-ups for supporting some more esoteric
    types that the constexpr evaluator supports, as well as extending
    __builtin_memcpy constexpr evaluation to use the same infrastructure.

    rdar://44987528

    Differential revision: https://reviews.llvm.org/D62825 — epilk / ViewSVN
  5. [X86] getTargetConstantBitsFromNode - remove unnecessary getZExtValue() (PR42486)

    Don't use APInt::getZExtValue() if you can avoid it - eventually someone will call it with i128 or something that doesn't fit into 64-bits.

    In this case it was completely superfluous as we'd moved the rest of the code to always use APInt.

    Fixes the <1 x i128> addition bug in PR42486 — rksimon / ViewSVN
  6. [AMDGPU] LCSSA pass added in preISel. Fixing typo in previous commit — alex-t / ViewSVN
  7. [AMDGPU] LCSSA pass added in preISel. Uniform values defined in the divergent loop and used outside

    Differential Revision: https://reviews.llvm.org/D63953

    Reviewers: rampitec, nhaehnle, arsenm — alex-t / ViewSVN
  8. [clang-doc] Fix segfault in comment sorting

    Differential Revision: https://reviews.llvm.org/D63962 — juliehockett / ViewSVN
  9. [X86] Add patterns to select (scalar_to_vector (loadf32)) as (V)MOVSSrm instead of COPY_TO_REGCLASS + (V)MOVSSrm_alt.

    Similar for (V)MOVSD. Ultimately, I'd like to see about folding
    scalar_to_vector+load to vzload. Which would select as (V)MOVSSrm
    so this is closer to that. — ctopper / ViewSVN
  10. [TSan] Improve handling of stack pointer mangling in {set,long}jmp, pt.7

    Factor out `ExtractLongJmpSp` helper function and move platform-specific
    code to tsan_platform_{linux,mac}.cc.

    Reviewed By: dvyukov

    Differential Revision: https://reviews.llvm.org/D64050 — yln / ViewSVN
  11. [NFC][Codegen][X86][AArch64][ARM][PowerPC] Recommit: Add test coverage for "add-of-inc" vs "sub-of-not"

    I initially committed it with --check-prefix instead of --check-prefixes
    (again, shame on me, and utils/update_*.py not complaining!)
    and did not have a moment to understand the failure,
    so i reverted it initially in rL64939. — lebedevri / ViewSVN
  12. Fix GN build — Vitaly Buka / ViewSVN
  13. [GWP-ASan] Add generic unwinders and structure backtrace output.

    Summary:
    Adds two flavours of generic unwinder and all the supporting cruft. If the
    supporting allocator is okay with bringing in sanitizer_common, they can use
    the fast frame-pointer based unwinder from sanitizer_common. Otherwise, we also
    provide the backtrace() libc-based unwinder as well. Of course, the allocator
    can always specify its own unwinder and unwinder-symbolizer.

    The slightly changed output format is exemplified in the first comment on this
    patch. It now better incorporates backtrace information, and displays
    allocation details on the second line.

    Reviewers: eugenis, vlad.tsyrklevich

    Reviewed By: eugenis, vlad.tsyrklevich

    Subscribers: srhines, kubamracek, mgorny, cryptoad, #sanitizers, llvm-commits, morehouse

    Tags: #sanitizers, #llvm

    Differential Revision: https://reviews.llvm.org/D63841 — hctim / ViewSVN
  14. [SimplifyLibCalls] powf(x, sitofp(n)) -> powi(x, n)

    Summary:
    Partially solves https://bugs.llvm.org/show_bug.cgi?id=42190



    Reviewers: spatel, nikic, efriedma

    Reviewed By: efriedma

    Subscribers: efriedma, nikic, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63038 — xbolva00 / ViewSVN
  15. Revert "[NFC][Codegen][X86][AArch64][ARM][PowerPC] Add test coverage for "add-of-inc" vs "sub-of-not""

    Some test failures i don't have a moment to investigate.

    This reverts commit r364930. — lebedevri / ViewSVN
  16. clang-format: Add new style option AlignConsecutiveMacros

    This option behaves similarly to AlignConsecutiveDeclarations and
    AlignConsecutiveAssignments, aligning the assignment of C/C++
    preprocessor macros on consecutive lines.

    I've worked in many projects (embedded, mostly) where header files full
    of large, well-aligned "#define" blocks are a common pattern. We
    normally avoid using clang-format on these files, since it ruins any
    existing alignment in said blocks. This style option will align "simple"
    PP macros (no parameters) and PP macros with parameter lists on
    consecutive lines.

    Related Bugzilla entry (thanks mcuddie):
    https://llvm.org/bugs/show_bug.cgi?id=20637

    Patch by Nick Renieris (VelocityRa)!

    Differential Revision: https://reviews.llvm.org/D28462 — sammccall / ViewSVN
  17. Provide basic Full LTO extension points

    Differential Revision: https://reviews.llvm.org/D61738 — serge_sans_paille / ViewSVN
  18. getMainExecutable: handle realpath() failure, falling back to getprogpath().

    Summary:
    Previously, we'd pass a nullptr to std::string and crash().

    This case happens when the binary is deleted while being used (e.g. rebuilding clangd).

    Reviewers: kadircet

    Subscribers: ilya-biryukov, kristina, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64068 — sammccall / ViewSVN
  19. AMDGPU: Fix broken test — arsenm / ViewSVN
  20. AMDGPU/GlobalISel: Try generated matcher with intrinsics — arsenm / ViewSVN
  21. AMDGPU/GlobalISel: Select mul — arsenm / ViewSVN
  22. GlobalISel: Define GINodeEquiv for G_UMULH/G_SMULH — arsenm / ViewSVN
  23. [NFC][Codegen][X86][AArch64][ARM][PowerPC] Add test coverage for "add-of-inc" vs "sub-of-not"

    As it is pointed out in https://reviews.llvm.org/D63992,
    before we get to pick canonical variant in middle-end
    we should ensure best codegen in backend. — lebedevri / ViewSVN
  24. Use --defsym instead of sed in a test. NFC — probinson / ViewSVN
  25. AMDGPU/GlobalISel: Fix G_GEP with mixed SGPR/VGPR operands

    The register bank for the destination of the sample argument copy was
    wrong. We shouldn't be constraining each source to the result register
    bank. Allow constraining the original register to the right size. — arsenm / ViewSVN
  26. AMDGPU/GlobalISel: Select G_FENCE

    Manually select to workaround tablegen emitter emitting checks for
    G_CONSTANT. — arsenm / ViewSVN
  27. GlobalISel: Add G_FENCE

    The pattern importer is for some reason emitting checks for G_CONSTANT
    for the immediate operands. — arsenm / ViewSVN
  28. [X86][AVX] combineX86ShuffleChain - pull out CombineShuffleWithExtract lambda. NFCI.

    Pull out CombineShuffleWithExtract lambda to new combineX86ShuffleChainWithExtract wrapper and refactored it to handle more than 2 shuffle inputs - this will allow combineX86ShufflesRecursively to call this in a future patch. — rksimon / ViewSVN
  29. Removed extra ; after function definition — szelethus / ViewSVN
  30. [clang-tidy] Extend TransformerClangTidyCheck to support adding includes.

    Summary:
    This revision implements support for the `AddedIncludes` field in
    RewriteRule cases; that is, it supports specifying the addition of include
    directives in files modified by the clang tidy check.

    Reviewers: ilya-biryukov, gribozavr

    Subscribers: xazax.hun, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D63893 — ymandel / ViewSVN
  31. [NFC][TargetLowering] Some preparatory cleanups around 'prepareUREMEqFold()' from D63963 — lebedevri / ViewSVN
  32. [APIntTest] multiplicativeInverse(): clarify test

    Clarify that multiplicative inverse exists for all odd numbers,
    and does not exist for all even numbers (including 0). — lebedevri / ViewSVN
  33. Fix line endings (NFC) — probinson / ViewSVN
  34. [docs][llvm-readelf] Delete old llvm-readelf.md

    This was accidentally missed when committing r364800. — jhenderson / ViewSVN
  35. [LibTooling] Extend `RewriteRule` with support for adding includes.

    Summary:
    This revision allows users to specify the insertion of an included directive (at
    the top of the file being rewritten) as part of a rewrite rule.  These
    directives are bundled with `RewriteRule` cases, so that different cases can
    potentially result in different include actions.

    Reviewers: ilya-biryukov, gribozavr

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D63892 — ymandel / ViewSVN
  36. [Object/invalid.test] - Convert Object/corrupt.test to YAML and merge the result into invalid.test

    Object/corrupt.test has the same purpose as Object/invalid.test:
    it tests the behavior on invalid inputs.

    In this patch I converted it to YAML, merged into invalid.test,
    added comments and removed a few precompiled binaries.

    Differential revision: https://reviews.llvm.org/D63927 — grimar / ViewSVN
  37. [InstCombine] Shift amount reassociation: fixup constantexpr handling (PR42484)

    I was actually wondering if there was some nicer way than m_Value()+cast,
    but apparently what i was really "subconsciously" thinking about
    was correctness issue.

    hasNoUnsignedWrap()/hasNoUnsignedWrap() exist for Instruction,
    not for BinaryOperator, so let's just use m_Instruction(),
    thus both avoiding a cast, and a crash.

    Fixes https://bugs.llvm.org/show_bug.cgi?id=42484,
          https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=15587 — lebedevri / ViewSVN
  38. Attempt to fix buildbot failures with MSVC — szelethus / ViewSVN
  39. [llvm] [Support] Clean PrintStackTrace() ptr arithmetic up

    Use '%tu' modifier for pointer arithmetic since we are using C++11
    already.  Prefer static_cast<> over C-style cast.  Remove unnecessary
    conversion of result, and add const qualifier to converted pointers,
    to silence the following warning:

      In file included from /home/mgorny/llvm-project/llvm/lib/Support/Signals.cpp:220:0:
      /home/mgorny/llvm-project/llvm/lib/Support/Unix/Signals.inc: In function ‘void llvm::sys::PrintStackTrace(llvm::raw_ostream&)’:
      /home/mgorny/llvm-project/llvm/lib/Support/Unix/Signals.inc:546:53: warning: cast from type ‘const void*’ to type ‘char*’ casts away qualifiers [-Wcast-qual]
                                             (char*)dlinfo.dli_saddr));
                                                           ^~~~~~~~~

    Differential Revision: https://reviews.llvm.org/D63888 — mgorny / ViewSVN
  40. [IDF] Generalize IDFCalculator to be used with Clang's CFG

    I'm currently working on a GSoC project that aims to improve the the bug reports
    of the analyzer. The main heuristic I plan to use is to explain values that are
    a control dependency of the bug location better.

    01 bool b = messyComputation();
    02 int i = 0;
    03 if (b) // control dependency of the bug site, let's explain why we assume val
    04        // to be true
    05   10 / i; // warn: division by zero

    Because of this, I'd like to generalize IDFCalculator so that I could use it for
    Clang's CFG: D62883.

    In detail:

    * Rename IDFCalculator to IDFCalculatorBase, make it take a general CFG node
      type as a template argument rather then strictly BasicBlock (but preserve
      ForwardIDFCalculator and ReverseIDFCalculator)
    * Move IDFCalculatorBase from llvm/include/llvm/Analysis to
      llvm/include/llvm/Support (but leave the BasicBlock variants in
      llvm/include/llvm/Analysis)
    * clang-format the file since this patch messes up git blame anyways
    * Change typedef to using
    * Add the new type ChildrenGetterTy, and store an instance of it in
      IDFCalculatorBase. This is important because I'll have to specialize it for
      Clang's CFG to filter out nullpointer successors, similarly to D62507.

    Differential Revision: https://reviews.llvm.org/D63389 — szelethus / ViewSVN
  41. [ARM] MVE: allow soft-float ABI to pass vector types.

    Passing a vector type over the soft-float ABI involves it being split
    into four GPRs, so the first thing that has to happen at the start of
    the function is to recombine those into a vector register. The ABI
    types all vectors as v2f64, so we need to support BUILD_VECTOR for
    that type, which I do in this patch by allowing it to be expanded in
    terms of INSERT_VECTOR_ELT, and writing an ISel pattern for that in
    turn. Similarly, I provide a rule for EXTRACT_VECTOR_ELT so that a
    returned vector can be marshalled back into GPRs.

    While I'm here, I've also added ISD::UNDEF to the list of operations
    we turn back on in `setAllExpand`, because I noticed that otherwise it
    gets expanded into a BUILD_VECTOR with explicit zero inputs, leading
    to pointless machine instructions to zero out a vector register that's
    about to have every lane overwritten of in any case.

    Reviewers: dmgreen, ostannard

    Subscribers: javed.absar, kristof.beyls, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63937 — statham / ViewSVN
  42. [ARM] Stop using scalar FP instructions in integer-only MVE mode.

    If you compile with `-mattr=+mve` (enabling integer MVE instructions
    but not floating-point ones), then the scalar FP //registers// exist
    and it's legal to move things in and out of them, load and store them,
    but it's not legal to do arithmetic on them.

    In D60708, the calls to `addRegisterClass` in ARMISelLowering that
    enable use of the scalar FP registers became conditionalised on
    `Subtarget->hasFPRegs()` instead of `Subtarget->hasVFP2Base()`, so
    that loads, stores and moves of those registers would work. But I
    didn't realise that that would also enable all the operations on those
    types by default.

    Now, if the target doesn't have basic VFP, we follow up those
    `addRegisterClass` calls by turning back off all the nontrivial
    operations you can perform on f32 and f64. That causes several
    knock-on failures, which are fixed by allowing the `VMOVDcc` and
    `VMOVScc` instructions to be selected even if all you have is
    `HasFPRegs`, and adjusting several checks for 'is this a double in a
    single-precision-only world?' to the more general 'is this any FP type
    we can't do arithmetic on?'. Between those, the whole of the
    `float-ops.ll` and `fp16-instructions.ll` tests can now run in
    MVE-without-FP mode and generate correct-looking code.

    One odd side effect is that I had to relax the check lines in that
    test so that they permit test functions like `add_f` to be generated
    as tailcalls to software FP library functions, instead of ordinary
    calls. Doing that is entirely legal, but the mystery is why this is
    the first RUN line that's needed the relaxation: on the usual kind of
    non-FP target, no tailcalls ever seem to be generated. Going by the
    llc messages, I think `SoftenFloatResult` must be perturbing the code
    generation in some way, but that's as much as I can guess.

    Reviewers: dmgreen, ostannard

    Subscribers: javed.absar, kristof.beyls, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63938 — statham / ViewSVN
  43. gn build: Merge r364866 — nico / ViewSVN
  44. [yaml2obj] - An attempt to fix a ppc64be build bot after r364898

    I guess the problem is because of endianess of
    the bytes tested by "od" tool. I changed the Content
    sequence as it does not actually matter. — grimar / ViewSVN
  45. [X86] resolveTargetShuffleInputsAndMask - add repeated input handling.

    We were relying on combineX86ShufflesRecursively to handle this - this patch gets it done earlier which should make it easier for other code to use resolveTargetShuffleInputsAndMask. — rksimon / ViewSVN
  46. [test/Object] - Fix build bot.

    Fixed mistype in the test case.

    BB: http://lab.llvm.org:8011/builders/lld-x86_64-ubuntu-fast/builds/2720/steps/test-check-all/logs/stdio — grimar / ViewSVN
  47. [clang][ArgumentAdjusters] Do not add fsyntax-only if already exists

    Reviewers: hokein

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64063 — kadircet / ViewSVN
  48. [Object/invalid.test] - Convert 3 more sub-tests to YAML

    This allows to remove 3 more precompiled binaries from the inputs.

    Differential revision: https://reviews.llvm.org/D63880 — grimar / ViewSVN
  49. [mips] Mark P5600 scheduling model as complete — atanasyan / ViewSVN
  50. clang-cl: Make /d1reportAllClassLayout actually work and improve test

    See review thread for r301567. — nico / ViewSVN
  51. [mips] Add missing schedinfo for FPU load/store/conv instructions — atanasyan / ViewSVN
  52. [mips] Map SNOP, NOP to the P5600Nop scheduler resource — atanasyan / ViewSVN
  53. [yaml2obj] - Allow overriding sh_offset field from the YAML.

    Some of our test cases are using objects which
    has sections with a broken sh_offset field.

    There was no way to set it from YAML until this patch.

    Differential revision: https://reviews.llvm.org/D63879 — grimar / ViewSVN
  54. [NFC][InstCombine] Revisit tests for "redundant shift input masking" (PR42456) — lebedevri / ViewSVN
  55. [DWARF] Simplify dumping of a .debug_addr section.

    This patch removes the part which tried to interpret addresses
    in that section as offsets and simplifies the remaining code.

    Differential Revision: https://reviews.llvm.org/D64020 — ikudrin / ViewSVN
  56. [clang][Driver][ARM] NFC: Remove unused function parameter

    Removes a vector reference that was added by D62998, since the
    preexisting function parameter is sufficient.

    Differential Revision: https://reviews.llvm.org/D64044 — alelab01 / ViewSVN
  57. [NFC][InstCombine] Add tests for "redundant shift input masking" (PR42456)

    https://bugs.llvm.org/show_bug.cgi?id=42456
    https://rise4fun.com/Alive/Vf1p — lebedevri / ViewSVN
  58. [clangd] Collect the refs when the main file is header.

    Summary:
    Previously, we only collect refs of the symbols which are declared in
    the preamble and referenced in the main file, it works well when the
    main file is .cpp file.

    However, when the main file is .h file (when opening a .h file in the
    editor), we don't collect refs of the symbol declared in this file, so we miss
    these refs in our dynamic index.

    A typical scenario:

    1. Open Foo.h (which contains class Foo)
    2. Open Foo.cpp, call find references for Foo

    And we only get refs from Foo.cpp.

    Reviewers: ilya-biryukov

    Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D63818 — hokein / ViewSVN
  59. [Sanitizers] Remove obsolete OpenFile from sanitizer_solaris.cc

    I noticed that the instance of OpenFile in sanitizer_solaris.cc is no
    longer needed.

    Removed as follows, tested on x86_64-pc-solaris2.11.

    Differential Revision: https://reviews.llvm.org/D63764 — ro / ViewSVN
  60. [ASTImporter] Make headers self-contained — d0k / ViewSVN
  61. [ASTImporter] Structural eq: handle DependentScopeDeclRefExpr

    Summary:
    Structural equivalence did not handle dependent template args properly
    when the arg contained a DependentScopeDeclRefExpr.

    Reviewers: a_sidorin, a.sidorin

    Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D62329 — martong / ViewSVN

#18292 (Jul 2, 2019 2:21:05 AM)

  1. [TailDuplicator] Fix copy instruction emitting into the wrong block.

    The code for duplicating instructions could sometimes try to emit copies
    intended to deal with unconstrainable register classes to the tail block of the
    original instruction, rather than before the newly cloned instruction in the
    predecessor block.

    This was exposed by GlobalISel on arm64.

    Differential Revision: https://reviews.llvm.org/D64049 — aemerson / ViewSVN
  2. [X86] Add PreprocessISelDAG support for turning ISD::FP_TO_SINT/UINT into X86ISD::CVTTP2SI/CVTTP2UI and to reduce the number of isel patterns. — ctopper / ViewSVN
  3. [PowerPC] Implement the areMemAccessesTriviallyDisjoint hook
    After implemented this hook, we will model the memory dependency in the scheduling dependency graph more precise,
    and will have more opportunity to reorder the load/stores, as they didn't have the dependency at some condition

    Differential Revision: https://reviews.llvm.org/D63804 — qshanz / ViewSVN
  4. Update status of papers for upcoming WG21 meeting. NFC — marshall / ViewSVN
  5. Use new '__libcpp_is_constant_evaluated' call to remove an '#ifdef' from the bit code. NFC — marshall / ViewSVN
  6. [DAGCombiner] Exploiting more about the transformation of TransformFPLoadStorePair function

    For a given floating point load / store pair, if the load value isn't used by any other operations,
    then consider transforming the pair to integer load / store operations if the target deems the transformation profitable.

    And we can exploiting much more when there are other operation nodes with chain operand between the load/store pair
    so long as we keep the chain ordering original. We only replace the register used to load/store from float to integer.

    I only add testcase in ARM because the TLI.isDesirableToTransformToIntegerOp hook is only enabled in ARM target.

    Differential Revision: https://reviews.llvm.org/D60601 — wuzish / ViewSVN
  7. [analyzer] exploded-graph-rewriter: Implement a dark color scheme.

    Addresses a popular request. Activated via --dark.

    Differential Revision: https://reviews.llvm.org/D64056 — dergachev / ViewSVN
  8. [analyzer] exploded-graph-rewriter: Improve program point dumps.

    - Take advantage of the stmt_point_kind.
    - Dump block IDs for BlockEntrance nodes.
    - Don't dump huge compound statements on PurgeDeadSymbols nodes.
    - Rename Edge to BlockEdge for consistency.
    - Tweak colors.

    Differential Revision: https://reviews.llvm.org/D64051 — dergachev / ViewSVN
  9. [analyzer] exploded-graph-rewriter: Add support for objects under construction.

    This trait is Environment-like, so there was a chance to re-use a lot of code.

    Differential Revision: https://reviews.llvm.org/D64047 — dergachev / ViewSVN
  10. Mark the newly added '__libcpp_is_constant_evaluated' as 'inline', since it can be included multiple times by multiple headers, and we don't want 'duplicate definition' errors. — marshall / ViewSVN
  11. Revert Remove scudo standalone tests from check-all

    This reverts r364877 (git commit dfae3705b75e6b5e1e163c78ab2df705a3388d89)

    This didn't solve my problem so I've reverted it. — rnk / ViewSVN
  12. Remove scudo standalone tests from check-all

    They appear to fail to link in various 32-bit configurations for unknown
    reasons. This change was already reverted, and it seems preferable to me
    to make forward progress and remove this once the problems are fully
    understood. — rnk / ViewSVN

#18289 (Jul 1, 2019 6:24:12 PM)

  1. Revert Recommit [PowerPC] Update P9 vector costs for insert/extract element

    This reverts r364557 (git commit 9f7f5858fe46b8e706e87a83e2fd0a2678be619e)

    This crashes as reported on the commit thread. Repro instructions TBD. — rupprecht / ViewSVN
  2. [analyzer] Support kfree in MallocChecker

    Summary:
    kmalloc is freed with kfree in the linux kernel. kmalloc support was
    added in r204832, but kfree was not. Adding kfree fixes incorrectly
    detected memory leaks.

    Reviewers: NoQ, nickdesaulniers, dcoughlin, Szelethus

    Reviewed By: NoQ, Szelethus

    Subscribers: xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, Charusso, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64030 — nathan-huckleberry / ViewSVN
  3. [TSan] Improve handling of stack pointer mangling in {set,long}jmp, pt.3

    Remove unnecessary computation of mangled SP for x86_64 architecture.

    Reviewed By: dvyukov

    Differential Revision: https://reviews.llvm.org/D63944 — yln / ViewSVN
  4. Add a private call '__libcpp_is_constant_evaluated' which 'works' for old language versions and w/o any compiler support. 'Working', in this case, means that it returns false in those cases. — marshall / ViewSVN
  5. [cmake] With utils disabled, don't build tblgen in cross mode

    Summary:
    In cross mode, we build a separate NATIVE tblgen that runs on the
    host and is used during the build. Separately, we have a flag that
    disables building all executables in utils/. Of course generally,
    this doesn't turn off tblgen, since we need that during the build.
    In cross mode, however, that tblegen is useless since we never
    actually use it. Furthermore, it can be actively problematic if the
    cross toolchain doesn't like building executables for whatever reason.
    And even if building executables works fine, we can at least save
    compile time by omitting it from the target build. There's two changes
    needed to make this happen:
    - Stop creating a dependency from the native tool to the target tool.
      No such dependency is required for a correct build, so I'm not entirely
      sure why it was there in the first place.
    - If utils were disabled on the CMake command line and we're in cross mode,
      respect that by excluding it from the install target (using EXCLUDE_FROM_ALL).

    Reviewers: smeenai
    Differential Revision: https://reviews.llvm.org/D64032 — kfischer / ViewSVN
  6. [analyzer] exploded-graph-rewriter: NFC: Add a forgotten test file.

    This fell off of r364865. — dergachev / ViewSVN
  7. [analyzer] Fix invalidation when returning into a ctor initializer.

    Due to RVO the target region of a function that returns an object by
    value isn't necessarily a temporary object region; it may be an
    arbitrary memory region. In particular, it may be a field of a bigger
    object.

    Make sure we don't invalidate the bigger object when said function is
    evaluated conservatively.

    Differential Revision: https://reviews.llvm.org/D63968 — dergachev / ViewSVN
  8. [analyzer] NonnullGlobalConstants: Don't be confused by a _Nonnull attribute.

    The NonnullGlobalConstants checker models the rule "it doesn't make sense
    to make a constant global pointer and initialize it to null"; it makes sure
    that whatever it's initialized with is known to be non-null.

    Ironically, annotating the type of the pointer as _Nonnull breaks the checker.

    Fix handling of the _Nonnull annotation so that it was instead one more reason
    to believe that the value is non-null.

    Differential Revision: https://reviews.llvm.org/D63956 — dergachev / ViewSVN
  9. [analyzer] CStringChecker: Modernize to use CallDescriptions.

    This patch uses the new CDF_MaybeBuiltin flag to handle C library functions.
    It's mostly an NFC/refactoring pass, but it does fix a bug in handling memset()
    when it expands to __builtin___memset_chk() because the latter has
    one more argument and memset() handling code was trying to match
    the exact number of arguments. Now the code is deduplicated and there's
    less room for mistakes.

    Differential Revision: https://reviews.llvm.org/D62557 — dergachev / ViewSVN
  10. [analyzer] NFC: CallDescription: Implement describing C library functions.

    When matching C standard library functions in the checker, it's easy to forget
    that they are often implemented as macros that are expanded to builtins.

    Such builtins would have a different name, so matching the callee identifier
    would fail, or may sometimes have more arguments than expected, so matching
    the exact number of arguments would fail, but this is fine as long as we have
    all the arguments that we need in their respective places.

    This patch adds a set of flags to the CallDescription class so that to handle
    various special matching rules, and adds the first flag into this set,
    which enables a more fuzzy matching for functions that
    may be implemented as compiler builtins.

    Differential Revision: https://reviews.llvm.org/D62556 — dergachev / ViewSVN
  11. [analyzer] NFC: Add a convenient CallDescriptionMap class.

    It encapsulates the procedure of figuring out whether a call event
    corresponds to a function that's modeled by a checker.

    Checker developers no longer need to worry about performance of
    lookups into their own custom maps.

    Add unittests - which finally test CallDescription itself as well.

    Differential Revision: https://reviews.llvm.org/D62441 — dergachev / ViewSVN
  12. [analyzer] exploded-graph-rewriter: Add support for dynamic types.

    Slightly cleanup emission of horizontal lines and unhardcode the title
    for generic maps.

    Differential Revision: https://reviews.llvm.org/D64041 — dergachev / ViewSVN
  13. [analyzer] exploded-graph-rewriter: Implement program point tags.

    Keep them on a separate line for more visibility.

    Differential Revision: https://reviews.llvm.org/D63965 — dergachev / ViewSVN
  14. Update status for bit operations — marshall / ViewSVN
  15. Bit Operations: P0556, P0553 and P1355. Reviewed as: https://reviews.llvm.org/D51262 — marshall / ViewSVN
  16. [PGO] Update ICP pass for recent byval type changes

    Fixes verifier errors encountered in PR42413.

    Reviewers: xur, t.p.northover, inglorion, gbiv, george.burgess.iv

    Differential Revision: https://reviews.llvm.org/D63842 — rnk / ViewSVN
  17. AMDGPU: Correct properties for adjcallstack* pseudos

    These should be SALU writes, and these are lowered to instructions
    that def SCC. — arsenm / ViewSVN
  18. Fix broken C++ mode comment — arsenm / ViewSVN
  19. [InstCombine][NFCI] Update test cases in onehot_merge.ll

    Use both one bit and signbit shifting to check for one bit merge.

    Reviewers: lebedev.ri, spatel, efriedma, craig.topper

    Reviewed By: lebedev.ri

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63903 — huihuiz / ViewSVN
  20. [InstCombine] reduce more checks for power-of-2-or-zero using ctpop

    Extends the transform from:
    rL364341
    ...to include another (more common?) pattern that tests whether a
    value is a power-of-2 (including or excluding zero). — spatel / ViewSVN
  21. Fix breakage introduced by D60974

    D60974 added tests which incorrectly assume that llvm-readelf is available. This is a bad assumption, it should instead declare the dependency explicitly in the tests. — jfb / ViewSVN
  22. [X86] Use v4i32 vzloads instead of v2i64 for vpmovzx/vpmovsx patterns where only 32-bits are loaded.

    v2i64 vzload defines a 64-bit memory access. It doesn't look like
    we have any coverage for this either way.

    Also remove some vzload usages where the instruction loads only
    16-bits. — ctopper / ViewSVN
  23. [mips] Add missing schedinfo for MIPSeh_return[32|64] instructions — atanasyan / ViewSVN
  24. [mips] Add virtualization ASE to P5600 scheduling definitions — atanasyan / ViewSVN
  25. [mips] Add missing schedinfo for LONG_BRANCH_* instructions — atanasyan / ViewSVN
  26. [X86] Remove several bad load folding isel patterns for VPMOVZX/VPMOVSX.

    These patterns all matched a v2i64 vzload which only loads 64-bits
    to instructions that load a full 128-bits. — ctopper / ViewSVN
  27. Revert [SLP] Look-ahead operand reordering heuristic.

    This reverts r364478 (git commit 574cb0eb3a7ac95e62d223a60bef891171dfe321)

    The patch is causing compilation timeouts. — rupprecht / ViewSVN
  28. [NFC][InstCombine] More commutative tests for "shift direction in bittest" (PR42466)

    'and' is commutative, if we don't want to touch shift-of-const,
    we still need to check the other hand of 'and'. — lebedevri / ViewSVN
  29. Testing commit access through minor formatting change — nilanjana_basu / ViewSVN
  30. Ensure bitset's string constructor doesn't poison the overload set. — ericwf / ViewSVN
  31. GlobalISel: Try to widen merges with other merges

    If the requested source type an be used as a merge source type, create
    a merge of merges. This avoids creating large, illegal extensions and
    bit-ops directly to the result type. — arsenm / ViewSVN
  32. Implement P0646R1: Erase-Like Algorithms Should Return size_type. Reviewed as https://reviews.llvm.org/D58332, and then updated because I rewrote a couple of those routines to eliminate some UB. Thanks to Zoe for tghe patch. — marshall / ViewSVN
  33. AMDGPU: Revert accidental change to test — arsenm / ViewSVN
  34. [X86] Correct v4f32->v2i64 cvt(t)ps2(u)qq memory isel patterns

    These instructions only read 64-bits of memory so we shouldn't
    allow a full vector width load to be pattern matched in case it
    is marked volatile.

    Instead allow vzload or scalar_to_vector+load.

    Also add a DAG combine to turn full vector loads into vzload when
    used by one of these instructions if the load isn't volatile.

    This fixes another case for PR42079 — ctopper / ViewSVN
  35. Fixed two issues in clang-tidy -help.

    HeaderFilter -> HeaderFilterRegex — alexfh / ViewSVN
  36. AMDGPU/GlobalISel: Handle more input argument intrinsics — arsenm / ViewSVN
  37. AMDGPU/GlobalISel: Lower kernarg segment ptr intrinsics — arsenm / ViewSVN
  38. AMDGPU/GlobalISel: Legalize workgroup ID intrinsics — arsenm / ViewSVN
  39. AMDGPU/GlobalISel: Legalize workitem ID intrinsics

    Tests don't cover the masked input path since non-kernel arguments
    aren't lowered yet.

    Test is copied directly from the existing test, with 2 additions. — arsenm / ViewSVN
  40. AMDGPU/GlobalISel: Custom lower control flow intrinsics

    Replace the brcond for the 2 cases that act as branches. For now
    follow how the current system works, although I think we can
    eventually get rid of the pseudos. — arsenm / ViewSVN
  41. AMDGPU/GlobalISel: Handle 16-bit SALU min/max

    This needs to be extended to s32, and expanded into cmp+select.  This
    is relying on the fact that widenScalar happens to leave the
    instruction in place, but this isn't a guaranteed property of
    LegalizerHelper. — arsenm / ViewSVN
  42. AMDGPU/GlobalISel: Lower SALU min/max to cmp+select

    Use a change observer to apply a register bank to the newly created
    intermediate result register. — arsenm / ViewSVN
  43. [X86] Avoid SFB - Fix inconsistent codegen with/without debug info(2)

    The function findPotentialBlockers may consider debug info instructions as
    potential blockers and may stop searching for a store-load pair prematurely.

    This patch corrects this and tests the cases where the store is separated
    from the load by more than InspectionLimit debug instructions.

    Patch by Chris Dawson.

    Differential Revision: https://reviews.llvm.org/D62408 — rlougher / ViewSVN
  44. AMDGPU/GlobalISel: Add tests for add legalization — arsenm / ViewSVN
  45. AMDGPU/GlobalISel: Legalize s16 add/sub/mul

    If this is scalar, promote to s32. Use a new observer class to assign
    the register bank of newly created registers. — arsenm / ViewSVN
  46. AMDGPU/GlobalISel: Fix allowing non-boolean conditions for G_SELECT

    The condition register bank must be scc or vcc so that a copy will be
    inserted, which will be lowered to a compare.

    Currently greedy unnecessarily forces using a VCC select. — arsenm / ViewSVN
  47. [NFC][InstCombine] Add tests for "shift direction in bittest" (PR42466)

    https://rise4fun.com/Alive/8O1
    https://bugs.llvm.org/show_bug.cgi?id=42466 — lebedevri / ViewSVN
  48. [TSan] Fix initialized and declared ‘extern’ warning

    Avoid the following warning which fails a bot (via -Werror).

    ```
    /tmp/gotsan.JfrpVPu7pG/gotsan.cc:10456:25: error: ‘_tsan_pointer_chk_guard’ initialized and declared ‘extern’ [-Werror]
    extern "C" __tsan::uptr _tsan_pointer_chk_guard = 0;
                            ^~~~~~~~~~~~~~~~~~~~~~~
    ``` — yln / ViewSVN

#18288 (Jul 1, 2019 1:04:12 PM)

  1. GlobalISel: Verify G_MERGE_VALUES operand sizes — arsenm / ViewSVN
  2. [GlobalISel]: Allow backends to custom legalize Intrinsics

    https://reviews.llvm.org/D31359

    Add a hook "legalizeInstrinsic" to allow backends to override this
    and custom lower/legalize intrinsics. — aditya_nandakumar / ViewSVN
  3. [OPENMP]Fix handling of lambda captures in target regions.

    Previously, lambda captures were processed in the function called during
    capturing the variables. It leads to the recursive functions calls and
    may result in the compiler crash. — abataev / ViewSVN
  4. AMDGPU/GlobalISel: RegBankSelect for sendmsg/sendmsghalt — arsenm / ViewSVN
  5. [TSan] Improve handling of stack pointer mangling in {set,long}jmp, pt.2

    Switch `LongJmp` over to lookup JmpBuf via plain old (unmangled) SP.
    This makes the computation of mangled SPs in the TSan assembly files
    unnecessary, which will be cleaned up in follow-up revisions.

    Reviewed By: dvyukov

    Differential Revision: https://reviews.llvm.org/D63942 — yln / ViewSVN
  6. AMDGPU/GlobalISel: Legalize s16 fcmp — arsenm / ViewSVN
  7. GlobalISel: Implement lower for min/max — arsenm / ViewSVN
  8. AMDGPU/GFX10: implement ds_ordered_count changes

    Summary:
    ds_ordered_count can now simultaneously operate on up to 4 dwords
    in a single instruction, which are taken from (and returned to)
    lanes 0..3 of a single VGPR.

    Change-Id: I19b6e7b0732b617c10a779a7f9c0303eec7dd276

    Reviewers: mareko, arsenm, rampitec

    Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63716 — nha / ViewSVN
  9. AMDGPU: Support GDS atomics

    Summary:
    Original patch by Marek Olšák

    Change-Id: Ia97d5d685a63a377d86e82942436d1fe6e429bab

    Reviewers: mareko, arsenm, rampitec

    Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, jfb, Petar.Avramovic, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63452 — nha / ViewSVN
  10. AMDGPU/GlobalISel: RegBankSelect for DS ordered add/swap — arsenm / ViewSVN
  11. AArch64/GlobalISel: Fix trying to select invalid MIR

    Physical registers are not allowed to be a phi operand. — arsenm / ViewSVN
  12. Summary: [Clangd] Added hidden command line option -tweaks to specify which tweaks to enable

    - Only for development purposes
    - Disabled tweaks in fixits-duplications test
    Reviewers: sammccall, kadircet

    Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D63989 — sureyeaah / ViewSVN

#18287 (Jul 1, 2019 11:05:04 AM)

  1. AMDGPU/GlobalISel: RegBankSelect for amdgcn.writelane — arsenm / ViewSVN
  2. AMDGPU/GlobalISel: Fail instead of assert when selecting loads — arsenm / ViewSVN
  3. AMDGPU/GlobalISel: Complete implementation of G_GEP

    Also works around tablegen defect in selecting add with unused carry,
    but if we have to manually select GEP, might as well handle add
    manually. — arsenm / ViewSVN
  4. AMDGPU/GlobalISel: Select G_PHI — arsenm / ViewSVN
  5. AMDGPU/GlobalISel: Try to select VOP3 form of add

    There are several things broken, but at least emit the right thing for
    gfx9.

    The import of the pattern with the unused carry out seems to not
    work. Needs a special class for clamp, because OperandWithDefaultOps
    doesn't really work. — arsenm / ViewSVN
  6. [X86] Add widenSubVector to size in bits helper. NFCI.

    We can already widenSubVector to a specific type (of the same scalar type) - this variant just specifies the target vector size.

    This will be useful when CombineShuffleWithExtract relaxes the need to have the same scalar type for all shuffle operand subvector sources. — rksimon / ViewSVN
  7. Implement LWG2221: 'Formatted output for nullptr_t' Reviewed as: https://reviews.llvm.org/D63053 — marshall / ViewSVN
  8. AMDGPU/GlobalISel: RegBankSelect for readlane/readfirstlane — arsenm / ViewSVN
  9. [docs][llvm-readelf] Expand llvm-readelf documentation

    Previously, the llvm-readelf documentation was essentially just a list
    of differences to llvm-readobj. Since llvm-readelf is the more likely
    goto tool for many people migrating to the LLVM toolchain, it seems like
    it would be helpful to document all the switches in the llvm-readelf
    document too. This change expands the options listed accordingly.
    Additionally, they are unlikely to care what the differences are to
    llvm-readobj, since they won't be familiar with the latter as there is
    no GNU equivalent, so this change moves the "differences" section to
    llvm-readobj's documentation.

    Reviewed by: peter.smith

    Differential Revision: https://reviews.llvm.org/D63826 — jhenderson / ViewSVN
  10. __threading_support: Remove (void) in favor of ().

    Summary:
    This fixes a clang-tidy warning when building something that uses
    this file.

    Reviewers: mclow.lists, EricWF

    Subscribers: cfe-commits

    Differential Revision: https://reviews.llvm.org/D43226 — brucem / ViewSVN
  11. Fix -Wdouble-promotion warnings.

    Reviewers: mclow.lists

    Subscribers: christof, ldionne, cfe-commits, libcxx-commits

    Differential Revision: https://reviews.llvm.org/D62782 — brucem / ViewSVN
  12. AMDGPU/GlobalISel: Implement select for 32-bit G_ADD

    Reviewers: arsenm

    Reviewed By: arsenm

    Subscribers: hiraditya, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, rovka, kristof.beyls, dstuttard, tpr, t-tye, Petar.Avramovic, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D58804 — tstellar / ViewSVN
  13. [ARM] Fix MVE_VQxDMLxDH instruction class

    Summary:
    According to the ARMARM, the VQDMLADH, VQRDMLADH, VQDMLSDH and
    VQRDMLSDH instructions handle their results as follows: "The base
    variant writes the results into the lower element of each pair of
    elements in the destination register, whereas the exchange variant
    writes to the upper element in each pair". I.e., the initial content
    of the output register affects the result, as usual, we model this
    with an additional input.

    Also, for 32-bit variants Qd is not allowed to be the same register as
    Qm and Qn, we use @earlyclobber to indicate this.

    This patch also changes vpred_r to vpred_n because the instructions
    don't have an explicit 'inactive' operand.

    Reviewers: dmgreen, ostannard, simon_tatham

    Reviewed By: simon_tatham

    Subscribers: javed.absar, kristof.beyls, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64007 — miyuki / ViewSVN
  14. AMDGPU/GlobalISel: Select G_BRCOND for vcc — arsenm / ViewSVN
  15. [ARM] MVE: support QQPRRegClass and QQQQPRRegClass

    Summary:
    QQPRRegClass and QQQQPRRegClass are used by the
    interleaving/deinterleaving loads/stores to represent sequences of
    consecutive SIMD registers.

    Reviewers: ostannard, simon_tatham, dmgreen

    Reviewed By: simon_tatham

    Subscribers: javed.absar, kristof.beyls, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64009 — miyuki / ViewSVN
  16. Update email address in CODE_OWNERS — kparzysz / ViewSVN
  17. [InstCombine] (Y + ~X) + 1 --> Y - X  fold (PR42459)

    Summary:
    To be noted, this pattern is not unhandled by instcombine per-se,
    it is somehow does end up being folded when one runs opt -O3,
    but not if it's just -instcombine. Regardless, that fold is
    indirect, depends on some other folds, and is thus blind
    when there are extra uses.

    This does address the regression being exposed in D63992.

    https://godbolt.org/z/7DGltU
    https://rise4fun.com/Alive/EPO0

    Fixes [[ https://bugs.llvm.org/show_bug.cgi?id=42459 | PR42459 ]]

    Reviewers: spatel, nikic, huihuiz

    Reviewed By: spatel

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63993 — lebedevri / ViewSVN
  18. [InstCombine] Shift amount reassociation in bittest (PR42399)

    Summary:
    Given pattern:
    `icmp eq/ne (and ((x shift Q), (y oppositeshift K))), 0`
    we should move shifts to the same hand of 'and', i.e. rewrite as
    `icmp eq/ne (and (x shift (Q+K)), y), 0`  iff `(Q+K) u< bitwidth(x)`

    It might be tempting to not restrict this to situations where we know
    we'd fold two shifts together, but i'm not sure what rules should there be
    to avoid endless combine loops.

    We pick the same shift that was originally used to shift the variable we picked to shift:
    https://rise4fun.com/Alive/6x1v

    Should fix [[ https://bugs.llvm.org/show_bug.cgi?id=42399 | PR42399]].

    Reviewers: spatel, nikic, RKSimon

    Reviewed By: spatel

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63829 — lebedevri / ViewSVN
  19. [Hexagon] Custom-lower UADDO(x, 1) and USUBO(x, 1) — kparzysz / ViewSVN
  20. AMDGPU/GlobalISel: Select G_FRAME_INDEX — arsenm / ViewSVN
  21. AMDGPU/GFX10: fix scratch resource descriptor

    Summary:
    The stride should depend on the wave size, not the hardware generation.

    Also, the 32_FLOAT format is 0x16, not 16; though that shouldn't be
    relevant.

    Change-Id: I088f93bf6708974d085d1c50967f119061da6dc6

    Reviewers: arsenm, rampitec, mareko

    Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63808 — nha / ViewSVN
  22. AMDGPU/GlobalISel: Make s16 select legal

    This is easy to handle and avoids legalization artifacts which are
    likely to obscure combines. — arsenm / ViewSVN
  23. AMDGPU/GlobalISel: Select G_BRCOND for scc conditions — arsenm / ViewSVN
  24. [ASTImporter] Mark erroneous nodes in shared st

    Summary:
    Now we store the errors for the Decls in the "to" context too. For
    that, however, we have to put these errors in a shared state (among all
    the ASTImporter objects which handle the same "to" context but different
    "from" contexts).

    After a series of imports from different "from" TUs we have a "to" context
    which may have erroneous nodes in it. (Remember, the AST is immutable so
    there is no way to delete a node once we had created it and we realized
    the error later.) All these erroneous nodes are marked in
    ASTImporterSharedState::ImportErrors.  Clients of the ASTImporter may
    use this as an input. E.g. the static analyzer engine may not try to
    analyze a function if that is marked as erroneous (it can be queried via
    ASTImporterSharedState::getImportDeclErrorIfAny()).

    Reviewers: a_sidorin, a.sidorin, shafik

    Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D62376 — martong / ViewSVN
  25. AMDGPU/GlobalISel: Tolerate copies with no type set

    isVCC has the same bug, but isn't used in a context where it can cause
    a problem. — arsenm / ViewSVN
  26. AMDGPU: Fix tests using the default alloca address space — arsenm / ViewSVN
  27. AMDGPU/GlobalISel: Select src modifiers — arsenm / ViewSVN
  28. Fixup r364512

    Fix stack-use-after-scope errors from r364512. One instance was already
    fixed in r364611 - this patch simplifies that fix and addresses one more
    instance of similar code.

    Discussed in: https://reviews.llvm.org/D63905 — rovka / ViewSVN
  29. [RISCV] Avoid save-restore target feature warning

    Summary:
    LLVM issues a warning if passed unknown target features. Neither I nor
    @asb noticed this until after https://reviews.llvm.org/D63498 landed.

    This patch stops passing the (unknown) "save-restore" target feature to
    the LLVM backend, but continues to emit a warning if a driver asks for
    `-msave-restore`. The default of assuming `-mno-save-restore` (and
    emitting no warnings) remains.

    Reviewers: asb

    Reviewed By: asb

    Subscribers: rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, cfe-commits, asb

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64008 — lenary / ViewSVN
  30. [UpdateTestChecks][PowerPC] Avoid empty string when scrubbing loop comments

    Summary:
    SCRUB_LOOP_COMMENT_RE was introduced in https://reviews.llvm.org/D31285
    This works for some loops.

    However, we may generate lines with loop comments only.
    And since we don't scrub leading white spaces, this will leave an empty
    line there, and FileCheck will complain it.

    eg: llvm/test/CodeGen/PowerPC/PR35812-neg-cmpxchg.ll:27:15:
    error: found empty check string with prefix 'CHECK:'
    ; CHECK-NEXT:

    This prevented us from using the `update_llc_test_checks.py` for quite some cases.

    We should still keep the comment token there, so that we can safely
    scrub the loop comment without breaking FileCheck.

    Reviewers: timshen, hfinkel, lebedev.ri, RKSimon

    Subscribers: nemanjai, jfb, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63957 — jsji / ViewSVN
  31. [ASTImporter] Silence unused variable warning in Release builds. NFC. — d0k / ViewSVN
  32. [NFC][InstCombine] Better commutative tests for "shift amount reassociation in bittest" pattern.

    As discussed in https://reviews.llvm.org/D63829
    *if* *both* shifts are one-use, we'd most likely want to produce `lshr`,
    and not rely on ordering.

    Also, there should likely be a *separate* fold to do this reordering. — lebedevri / ViewSVN
  33. [ASTImporter] Mark erroneous nodes in from ctx

    Summary:
    During import of a specific Decl D, it may happen that some AST nodes
    had already been created before we recognize an error. In this case we
    signal back the error to the caller, but the "to" context remains
    polluted with those nodes which had been created. Ideally, those nodes
    should not had been created, but that time we did not know about the
    error, the error happened later.  Since the AST is immutable (most of
    the cases we can't remove existing nodes) we choose to mark these nodes
    as erroneous.
    Here are the steps of the algorithm:
    1) We keep track of the nodes which we visit during the import of D: See
    ImportPathTy.
    2) If a Decl is already imported and it is already on the import path
    (we have a cycle) then we copy/store the relevant part of the import
    path. We store these cycles for each Decl.
    3) When we recognize an error during the import of D then we set up this
    error to all Decls in the stored cycles for D and we clear the stored
    cycles.

    Reviewers: a_sidorin, a.sidorin, shafik

    Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D62375 — martong / ViewSVN
  34. [Hexagon] Rework VLCR algorithm

    Add code to catch pattern for commutative instructions for VLCR.

    Patch by Suyog Sarda. — kparzysz / ViewSVN
  35. AMDGPU: Convert some places to Register — arsenm / ViewSVN
  36. AMDGPU/GlobalISel: Fix RegBankSelect for G_FCANONICALIZE — arsenm / ViewSVN
  37. AMDGPU/GlobalISel: Fix RegBankSelect for G_BUILD_VECTOR — arsenm / ViewSVN
  38. AMDGPU/GlobalISel: Fail on store to 32-bit address space — arsenm / ViewSVN
  39. AMDGPU/GlobalISel: Improve icmp selection coverage.

    Select s64 eq/ne scalar icmp. — arsenm / ViewSVN
  40. [NFC][InstCombine] Improve test coverage for  ((~x) + y) + 1 -> y - x fold fold (PR42459)

    So we indeed to have this fold, but only if +1 is not the last operation.. — lebedevri / ViewSVN
  41. AMDGPU/GlobalISel: RegBankSelect for WWM/WQM — arsenm / ViewSVN
  42. AMDGPU/GlobalISel: Use vcc reg bank for amdgcn.wqm.vote — arsenm / ViewSVN
  43. AMDGPU/GlobalISel: Fix scc->vcc copy handling

    This was checking the size of the register with the value of the size,
    which happens to be exec. Also fix assuming VCC is 64-bit to fix
    wave32.

    Also remove some untested handling for physical registers which is
    skipped. This doesn't insert the V_CNDMASK_B32 if SCC is the physical
    copy source. I'm not sure if this should be trying to handle this
    special case instead of dealing with this in copyPhysReg. — arsenm / ViewSVN
  44. AMDGPU/GlobalISel: Use and instead of BFE with inline immediate

    Zext from s1 is the only case where this should do anything with the
    current legal extensions. — arsenm / ViewSVN
  45. GlobalISel: Add GINodeEquiv for min/max — arsenm / ViewSVN
  46. GlobalISel: Add DAG compat for G_FCANONICALIZE — arsenm / ViewSVN
  47. [mips] Add missing schedinfo for MSA and ASE instructions — atanasyan / ViewSVN
  48. [mips] Add missing schedinfo for atomic instructions — atanasyan / ViewSVN
  49. [mips] Add missing schedinfo for ADJCALLSTACKDOWN, ADJCALLSTACKUP — atanasyan / ViewSVN
  50. [ASTImporter] Propagate error from ImportDeclContext

    Summary:
    During analysis of one project we failed to import one
    CXXDestructorDecl. But since we did not propagate the error in
    importDeclContext we had a CXXRecordDecl without a destructor. Then the
    analyzer engine had a CallEvent where the nonexistent dtor was requested
    (crash).

    Solution is to propagate the errors we have during importing a
    DeclContext.

    Reviewers: a_sidorin, a.sidorin, shafik

    Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D63603 — martong / ViewSVN
  51. [AMDGPU] Call isLoopExiting for blocks in the loop.

    isLoopExiting should only be called for blocks in the loop. A follow
    up patch makes this requirement an assertion.

    I've updated the usage here, to only match for actual exit blocks. Previously,
    it would also match blocks not in the loop.

    Reviewers: arsenm, nhaehnle

    Reviewed By: nhaehnle

    Differential Revision: https://reviews.llvm.org/D63980 — fhahn / ViewSVN
  52. [NFC][InstCombine] Tests for  ((~x) + y) + 1 -> y - x fold fold (PR42459)

    To be noted, this pattern is not unhandled by instcombine per-se,
    it is somehow does end up being folded when one runs opt -O3,
    but not if it's just -instcombine. Regardless, that fold is
    indirect, depends on some other folds, and is thus blind
    when there are extra uses.

    https://bugs.llvm.org/show_bug.cgi?id=42459
    https://rise4fun.com/Alive/EPO0 — lebedevri / ViewSVN
  53. [clangd] No longer getting template instantiations from header files in Main AST.

    Previous implementation to filter decls not in the main file did not
    work in the case where a template was instantiated from a header in the
    main file. It would than include that function/class in topLevelDecls.

    Differential Revision: https://reviews.llvm.org/D63817 — jvikstrom / ViewSVN
  54. [RISCV] Add break; to the last switch case

    As suggested by jrtc27 in the post-commit review of D60528. — maskray / ViewSVN
  55. [X86] CombineShuffleWithExtract - updated description comments. NFCI.

    CombineShuffleWithExtract no longer requires that both shuffle ops are extract_subvectors, from the same type or from the same size. — rksimon / ViewSVN

#18286 (Jul 1, 2019 5:34:19 AM)

  1. [SelectionDAG] Do minnum->minimum at legalization time instead of building time

    The SDAGBuilder behavior stems from the days when we didn't have fast
    math flags available in SDAG. We do now and doing the transformation in
    the legalizer has the advantage that it also works for vector types. — d0k / ViewSVN
  2. [benchmark] Disable CMake get_git_version

    Disabled CMake get_git_version as it is meaningless for this in-tree
    build, and hardcoded a null version.

    Not using get_git_version avoids a refresh of the git index that is
    executed by get_git_version. Refreshing the index can take a
    considerable amount of time if the index needs to be refreshed
    (particularly with the mono repo). This situation can arise when
    building shared source on a host in VMs.

    Differential Revision: https://reviews.llvm.org/D63925 — anng / ViewSVN
  3. [clangd] Fix unused var from r364735 — sammccall / ViewSVN
  4. [clangd] Make PreambleStatusCache handle filenames more carefully

    Summary:
    - when we hit the cache, the reported filename should be that of the
       cache query, not that of the cache store. This matches behaviors of
       common FSes, and avoids triggering difficult edge cases in
       FileManager when files are being moved around concurrently.
    - filename comparisons (both cache queries and == mainfile checks)
       should fold away . and .. in paths. These can appear when relative
       paths occur in compile_commands.json. (gn does this).

    Reviewers: kadircet

    Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D63931 — sammccall / ViewSVN
  5. [NFC][InstCombine] Tests for x - ~(y)  ->  x + y + 1 fold (PR42457)

    https://bugs.llvm.org/show_bug.cgi?id=42457
    https://rise4fun.com/Alive/iFhE — lebedevri / ViewSVN
  6. [InstCombine] Omit 'urem' where possible

    This was added in D63390 / rL364286 to backend,
    but it makes sense to also handle it in middle-end.
    https://rise4fun.com/Alive/Zsln — lebedevri / ViewSVN
  7. [NFC][InstCombine] Copy test for omit urem when possible from TargetLowering

    Was added in D63390 / rL364286 to backend, but it makes sense to also handle it here.
    https://rise4fun.com/Alive/Zsln — lebedevri / ViewSVN
  8. [DebugInfo] Avoid adding too much indirection to pointer-valued variables

    This patch addresses PR41675, where a stack-pointer variable is dereferenced
    too many times by its location expression, presenting a value on the stack as
    the pointer to the stack.

    The difference between a stack *pointer* DBG_VALUE and one that refers to a
    value on the stack, is currently the indirect flag. However the DWARF backend
    will also try to guess whether something is a memory location or not, based
    on whether there is any computation in the location expression. By simply
    prepending the stack offset to existing expressions, we can accidentally
    convert a register location into a memory location, which introduces a
    suprise (and unintended) dereference.

    The solution is to add DW_OP_stack_value whenever we add a DIExpression
    computation to a stack *pointer*. It's an implicit location computed on the
    expression stack, thus needs to be flagged as a stack_value.

    For the edge case where the offset is zero and the location could be a register
    location, DIExpression::prepend will still generate opcodes, and thus
    DW_OP_stack_value must still be added.

    Differential Revision: https://reviews.llvm.org/D63429 — jmorse / ViewSVN
  9. [clangd] Show better message when we rename macros.

    Summary:
    Previously, when we rename a macro, we get an error message of "there is
    no symbol found".

    This patch improves the message of this case (as we don't support macros).

    Reviewers: sammccall

    Subscribers: ilya-biryukov, MaskRay, jkorous, mgrang, arphaman, kadircet, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D63922 — hokein / ViewSVN
  10. [SimpleLoopUnswitch] Implement handling of prof branch_weights metadata for SwitchInst

    Differential Revision: https://reviews.llvm.org/D60606 — yrouban / ViewSVN
  11. [ARM] WLS/LE Code Generation
       
    Backend changes to enable WLS/LE low-overhead loops for armv8.1-m:
    1) Use TTI to communicate to the HardwareLoop pass that we should try
       to generate intrinsics that guard the loop entry, as well as setting
       the loop trip count.
    2) Lower the BRCOND that uses said intrinsic to an Arm specific node:
       ARMWLS.
    3) ISelDAGToDAG the node to a new pseudo instruction:
       t2WhileLoopStart.
    4) Add support in ArmLowOverheadLoops to handle the new pseudo
       instruction.

    Differential Revision: https://reviews.llvm.org/D63816 — sam_parker / ViewSVN
  12. [libcxx] [test] Add void cast to result of compare_exchange_weak to suppress [[nodiscard]]. — bion / ViewSVN
  13. [clangd] Make FixIt message be consistent with the clang-tidy diagnostic message.

    Summary:
    We strip the "[clang-tidy-check]" suffix from the clang-tidy diagnostics, we
    should be consistent with the message in FixIt (strip the suffix as well).

    Reviewers: sammccall

    Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D63926 — hokein / ViewSVN
  14. [X86] Add more load folding tests for vcvt(t)ps2(u)qq showing missed foldings. NFC — ctopper / ViewSVN
  15. [X86] Improve the type checking fast-isel handling of vector bitcasts.

    We had a bunch of vector size legality checks for the source type
    based on feature flags, but we didn't check the destination type at
    all beyond ensuring that it was a "simple" type. But this allowed
    the destination to be i128 which isn't legal.

    This commit changes the code to use TLI's isTypeLegal logic in
    place of the all the subtarget checks. Then additionally checks
    that the source and dest are vectors.

    Fixes 42452 — ctopper / ViewSVN
  16. [X86] Add a DAG combine to replace vector loads feeding a v4i32->v2f64 CVTSI2FP/CVTUI2FP node with a vzload.

    But only when the load isn't volatile.

    This improves load folding during isel where we only have vzload
    and scalar_to_vector+load patterns. We can't have full vector load
    isel patterns for the same volatile load issue.

    Also add some missing masked cvtsi2fp/cvtui2fp with vzload patterns. — ctopper / ViewSVN
  17. [X86] Add some additional load folding tests to vec_int_to_fp.ll/vec_int_to_fp-widen.ll and disable the peephole pass.

    Also copy some missing test cases from vec_int_to_fp.ll to vec_int_to_fp-widen.ll — ctopper / ViewSVN
  18. [X86] Add MOVHPDrm/MOVLPDrm patterns that use VZEXT_LOAD.

    We already had patterns that used scalar_to_vector+load. But we can
    also have a vzload.

    Found while investigating combining scalar_to_vector+load to vzload. — ctopper / ViewSVN
  19. Various tweaks to MSVC natvis visualizers

    Make more consistent use of na format.
    Improve visualization of deduction guides.
    Add visualizer for explicit specifier (including conditionally explicit)
    Fix some typos — mps / ViewSVN

#18284 (Jun 30, 2019 6:38:53 PM)

  1. Clean up MSVC visualization of LLVM pointer types

    Create separate natvis ptr and int views for PointerIntPair.
    These are convenient in watch Windows and will be used by
    Clang visualizers to be checked in shortly

    Also, removed deref views as the MSVC na format has
    done the same thing natively since MSVC2013. — mps / ViewSVN

#18281 (Jun 30, 2019 8:51:52 AM)

  1. [InstCombine] canonicalize fcmp+select to minnum/maxnum intrinsics

    This is the opposite direction of D62158 (we have to choose 1 form or the other).
    Now that we have FMF on the select, this becomes more palatable. And the benefits
    of having a single IR instruction for this operation (less chances of missing folds
    based on extra uses, etc) overcome my previous comments about the potential advantage
    of larger pattern matching/analysis.

    Differential Revision: https://reviews.llvm.org/D62414 — spatel / ViewSVN
  2. Cleanup: llvm::bsearch -> llvm::partition_point after r364719 — maskray / ViewSVN
  3. [ADT] Implement llvm::bsearch() with std::partition_point()

    Summary:
    Delete the begin-end form because the standard std::partition_point
    can be easily used as a replacement.

    The ranges-style llvm::bsearch will be renamed to llvm::partition_point
    in the next clean-up patch.

    The name "bsearch" doesn't meet people's expectation because in C:

    > If two or more members compare equal, which member is returned is unspecified.

    Reviewed By: sammccall

    Differential Revision: https://reviews.llvm.org/D63718 — maskray / ViewSVN

#18280 (Jun 30, 2019 1:43:52 AM)

  1. [X86] Custom lower AVX masked loads to masked load and vselect instead of selecting a maskmov+vblend during isel.

    AVX masked loads only support 0 as the value for masked off elements.
    So we need an extra blend to support other values. Previously we
    expanded the masked load to two instructions with isel patterns.
    With this patch we now insert the vselect during lowering and it
    will be separately selected as a blend. — ctopper / ViewSVN
  2. [SelectionDAG] Use the memory VT instead of result VT for FoldingSet profiling in getMaskedLoad/getMaskedStore.

    This matches what is done by the Profile function. Otherwise CSE
    won't work properly. — ctopper / ViewSVN

#18276 (Jun 29, 2019 9:28:35 AM)

  1. [LFTR] Rephrase getLoopTest into "based-on" check; NFCI

    What we want to know here is whether we're already using this value
    for the loop condition, so make the query about that. We can extend
    this to a more general "based-on" relationship, rather than a direct
    icmp use later. — nikic / ViewSVN
  2. [InstCombine] canonicalize fmin/fmax to LLVM intrinsics minnum/maxnum

    This transform came up in D62414, but we should deal with it first.
    We have LLVM intrinsics that correspond exactly to libm calls (unlike
    most libm calls, these libm calls never set errno).
    This holds without any fast-math-flags, so we should always canonicalize
    to those intrinsics directly for better optimization.
    Currently, we convert to fcmp+select only when we have FMF (nnan) because
    fcmp+select does not preserve the semantics of the call in the general case.

    Differential Revision: https://reviews.llvm.org/D63214 — spatel / ViewSVN
  3. [LFTR] Remove unnecessary latch check; NFCI

    The whole indvars pass works on loops in simplified form, so there
    is always a unique latch. Convert the condition into an assertion
    in needsLFTR (though we also assert this in later LFTR functions).

    Additionally update the comment on getLoopTest() now that we are
    dealing with multiple exits. — nikic / ViewSVN
  4. [InstCombine] Shift amount reassociation (PR42391)

    Summary:
    Given pattern:
    `(x shiftopcode Q) shiftopcode K`
    we should rewrite it as
    `x shiftopcode (Q+K)`  iff `(Q+K) u< bitwidth(x)`
    This is valid for any shift, but they must be identical.

    * https://rise4fun.com/Alive/9E2
    * exact on both lshr => exact https://rise4fun.com/Alive/plHk
    * exact on both ashr => exact https://rise4fun.com/Alive/QDAA
    * nuw on both shl => nuw https://rise4fun.com/Alive/5Uk
    * nsw on both shl => nsw https://rise4fun.com/Alive/0plg

    Should fix [[ https://bugs.llvm.org/show_bug.cgi?id=42391 | PR42391]].

    Reviewers: spatel, nikic, RKSimon

    Reviewed By: nikic

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63812 — lebedevri / ViewSVN
  5. [IR][Patternmatch] Add m_SpecificInt_ULT() predicate

    Summary:
    Match an integer or vector with every element unsigned less than the
    Threshold. For vectors, this includes constants with undefined elements.

    FIXME: is it worth generalizing this to simply take ICmpInst::Predicate?

    Reviewers: craig.topper, spatel, nikic

    Reviewed By: spatel

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63811 — lebedevri / ViewSVN
  6. [APInt] Fix getBitsNeeded for INT_MIN values

    Summary: This patch fixes behaviour of APInt::getBitsNeeded for INT_MIN 10 bits values.

    Reviewers: regehr, RKSimon

    Reviewed By: RKSimon

    Subscribers: grandinj, dexonsmith, kristina, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63691 — quolyk / ViewSVN

#18275 (Jun 29, 2019 4:19:26 AM)

  1. [LFTR] Fix post-inc pointer IV with truncated exit count (PR41998)

    Fixes https://bugs.llvm.org/show_bug.cgi?id=41998. Usually when we
    have a truncated exit count we'll truncate the IV when comparing
    against the limit, in which case exit count overflow in post-inc
    form doesn't matter. However, for pointer IVs we don't do that, so
    we have to be careful about incrementing the IV in the wide type.

    I'm fixing this by removing the IVCount variable (which was
    ExitCount or ExitCount+1) and replacing it with a UsePostInc flag,
    and then moving the actual limit adjustment to the individual cases
    (which are: pointer IV where we add to the wide type, integer IV
    where we add to the narrow type, and constant integer IV where we
    add to the wide type).

    Differential Revision: https://reviews.llvm.org/D63686 — nikic / ViewSVN

#18273 (Jun 28, 2019 9:09:40 PM)

  1. Partial revert of "[llvm-ar] Document response file support in --help"

    This is partial revert of 70a8027c60fe1f95e8a8a1ff6575ebf8778d3544.

    The test apparently failed on win32 bots due to the way slashes in
    pathnames are handled. — sbc / ViewSVN
  2. [Driver] Fix style issues of --print-supported-cpus after D63105

    Reviewed By: ziangwan

    Differential Revision: https://reviews.llvm.org/D63822 — maskray / ViewSVN

#18272 (Jun 28, 2019 7:24:24 PM)

  1. AMDGPU/GlobalISel: Add some more tests for icmp select — arsenm / ViewSVN
  2. AMDGPU/GlobalISel: RegBankSelect for update.dpp — arsenm / ViewSVN
  3. [TSan] Attempt to fix linker error for Linux on AArch64

    Introduced in 5be69ebe121d5b6ea284c3dc6d1cd5098c94f353. — yln / ViewSVN
  4. AMDGPU/GlobalISel: RegBankSelect for atomic.inc/atomic.dec — arsenm / ViewSVN
  5. AMDGPU/GlobalISel: RegBankSelect for some DS intrinsics — arsenm / ViewSVN
  6. AMDGPU/GlobalISel: RegBankSelect for some easy intrinsics — arsenm / ViewSVN
  7. AMDGPU/GlobalISel: RegBankSelect for icmp/fcmp intrinsics — arsenm / ViewSVN
  8. AMDGPU/GlobalISel: RegBankSelect for amdgcn.div.fmas — arsenm / ViewSVN
  9. AMDGPU/GlobalISel: RegBankSelect for some simple leaf intrinsics — arsenm / ViewSVN
  10. [IndVars] Remove a bit of manual constant folding [NFC]

    SCEV is more than capable of folding (add x, trunc(0)) to x. — reames / ViewSVN
  11. Revert "[clang][NewPM] Fix broken profile test"

    This reverts commit ab2c0ed01edfec9a9402d03bdf8633b34b73f3a7.

    See https://reviews.llvm.org/D63155 — leonardchan / ViewSVN
  12. AMDGPU: Add baseline test for packed shufflevector — arsenm / ViewSVN
  13. [clang][test][NFC] Explicitly specify clang ABI in AST Dumper test

    Clang <= 4 used the pre-C++11 rule about which structures can be passed in registers. — Jan Korous / ViewSVN
  14. [WebAssembly] Assembler: support .int16/32/64 directives.

    Reviewers: sbc100

    Subscribers: dschuff, jgravelle-google, aheejin, sunfish, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63959 — aardappel / ViewSVN
  15. [WebAssembly] Allow @object in .type directives.

    Reviewers: sbc100

    Subscribers: dschuff, jgravelle-google, aheejin, sunfish, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63955 — aardappel / ViewSVN
  16. [x86] remove stale comment about cmov; NFC

    The cmov node used to sometimes return a glue result (and that's what
    'flag' meant in this context), but that was removed with D38664. — spatel / ViewSVN
  17. [NFC][NewGVN] Explicitly check fpmath metadata in fpmath.ll

    Suggested in D63933. — mcinally / ViewSVN
  18. [Lanai] auto-generate complete test checks; NFC

    This file will fail with a common codegen transform that
    I'm looking at, and I can't tell if that's an improvement
    or regression based on the sparse checking. — spatel / ViewSVN
  19. [OPENMP]Improve analysis of implicit captures.

    If the variable is used in the OpenMP region implicitly, we need to
    check the data-sharing attributes for such variables and generate
    implicit clauses for them. Patch improves analysis of such variables for
    better handling of data-sharing rules. — abataev / ViewSVN
  20. [WebAssembly] Assembler: Allow offsets and p2align in symbol load.

    Reviewers: sbc100

    Subscribers: dschuff, jgravelle-google, aheejin, sunfish, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63951 — aardappel / ViewSVN
  21. [WebAssembly] Assembler: Improve section parsing.

    Reviewers: sbc100

    Subscribers: dschuff, jgravelle-google, aheejin, sunfish, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63947 — aardappel / ViewSVN
  22. [NewGVN] Add unary FNeg support to NewGVN pass

    Differential Revision: https://reviews.llvm.org/D63933 — mcinally / ViewSVN
  23. Revert enabling frame pointer elimination on OpenBSD for now. — brad / ViewSVN
  24. [GVNSink] Add unary FNeg support to GVNSink pass

    Differential Revision: https://reviews.llvm.org/D63900 — mcinally / ViewSVN
  25. [demangle] Support for C++2a char8_t — epilk / ViewSVN
  26. [TSan] Fix build build breakage on Android

    Introduced in 5be69ebe121d5b6ea284c3dc6d1cd5098c94f353. — yln / ViewSVN
  27. Default to Secure PLT on PPC for musl libc.

    This matches the default settings of clang. — brad / ViewSVN
  28. [clang-doc] Handle anonymous namespaces

    Improves output for anonymous decls, and updates the '--public' flag to exclude everything under an anonymous namespace.

    Differential Revision: https://reviews.llvm.org/D52847 — juliehockett / ViewSVN
  29. [llvm-ar] Document response file support in --help

    Also a test for this.

    Differential Revision: https://reviews.llvm.org/D63836 — sbc / ViewSVN
  30. Re-apply r364600 with fixes.

    Fix: MachO/X86_64_RELOC_GOT is a 32-bit reloc, so only compare 32 bits. — Lang Hames / ViewSVN
  31. [unittests][Support] Fix LLVM-Unit :: Support/./SupportTests/FileSystemTest.permissions on Solaris

    LLVM-Unit :: Support/./SupportTests/FileSystemTest.permissions currently
    FAILs on Solaris:

      FAIL: LLVM-Unit :: Support/./SupportTests/FileSystemTest.permissions (2940 of 51555)
      ******************** TEST 'LLVM-Unit :: Support/./SupportTests/FileSystemTest.permissions' FAILED ********************
      Note: Google Test filter = FileSystemTest.permissions
      [==========] Running 1 test from 1 test case.
      [----------] Global test environment set-up.
      [----------] 1 test from FileSystemTest
      [ RUN      ] FileSystemTest.permissions
      /opt/llvm-buildbot/obj/llvm/llvm.src/unittests/Support/Path.cpp:1705: Failure
      Value of: CheckPermissions(fs::sticky_bit)
        Actual: false
      Expected: true
      /opt/llvm-buildbot/obj/llvm/llvm.src/unittests/Support/Path.cpp:1712: Failure
      Value of: CheckPermissions(fs::set_uid_on_exe | fs::set_gid_on_exe | fs::sticky_bit)
        Actual: false
      Expected: true
      /opt/llvm-buildbot/obj/llvm/llvm.src/unittests/Support/Path.cpp:1719: Failure
      Value of: CheckPermissions(fs::all_read | fs::set_uid_on_exe | fs::set_gid_on_exe | fs::sticky_bit)
        Actual: false
      Expected: true
      /opt/llvm-buildbot/obj/llvm/llvm.src/unittests/Support/Path.cpp:1722: Failure
      Value of: CheckPermissions(fs::all_perms)
        Actual: false
      Expected: true
      [  FAILED  ] FileSystemTest.permissions (0 ms)
      [----------] 1 test from FileSystemTest (0 ms total)
     
      [----------] Global test environment tear-down
      [==========] 1 test from 1 test case ran. (1 ms total)
      [  PASSED  ] 0 tests.
      [  FAILED  ] 1 test, listed below:
      [  FAILED  ] FileSystemTest.permissions
     
       1 FAILED TEST

    Checking with truss reveals that this is the same issue as on AIX and
    documented in chmod(2):

      If the process is not a privileged process and the file is not a direc-
      tory, mode bit 01000 (S_ISVTX, the sticky bit) is cleared.

    The following patch fixes this in the same way.  Tested on amd64-pc-solaris2.11.

    Differential Revision: https://reviews.llvm.org/D63598 — ro / ViewSVN
  32. [clang-doc] De-duplicate comments and locations

    De-duplicate comments and declaration locations in reduce function.
    When two files include the same header file, this file's content is mapped
    twice causing comments and locations to be duplicated after the reduce stage.

    Committed on behalf of Diego Astiazarán (diegoaat97@gmail.com).

    Differential Revision: https://reviews.llvm.org/D62970 — juliehockett / ViewSVN

#18271 (Jun 28, 2019 1:55:13 PM)

  1. [UpdateChecks] Add support for armv7-apple-darwin

    armv7-apple-darwin was not supported well, the script can't generate
    checks.

    https://reviews.llvm.org/D60601/new/#inline-568671

    Differential Revision: https://reviews.llvm.org/D63939 — jsji / ViewSVN
  2. [X86] CombineShuffleWithExtract - recurse through EXTRACT_SUBVECTOR chain — rksimon / ViewSVN
  3. hwasan: Remove the old frame descriptor mechanism.

    Differential Revision: https://reviews.llvm.org/D63470 — pcc / ViewSVN
  4. [ODRHash] Fix null pointer dereference for ObjC selectors with empty slots.

    `Selector::getIdentifierInfoForSlot` returns NULL if a slot has no
    corresponding identifier. Add a boolean to the hash and a NULL check.

    rdar://problem/51615164

    Reviewers: rtrieu

    Reviewed By: rtrieu

    Subscribers: dexonsmith, cfe-commits, jkorous

    Differential Revision: https://reviews.llvm.org/D63789 — vsapsai / ViewSVN
  5. Update CODE_OWNERS.txt for clang-doc

    Differential Revision: https://reviews.llvm.org/D63734 — juliehockett / ViewSVN
  6. [TSan] Improve handling of stack pointer mangling in {set,long}jmp, pt.1

    TSan needs to infer which calls to setjmp/longjmp are corresponding
    pairs. My understanding is, that we can't simply use the jmp_buf
    address, since this buffer is just a plain data structure storing the
    environment (registers) with no additional semantics, i.e., it can be
    copied around and is still expected to work. So we use the stack pointer
    (SP) instead.

    The setjmp interceptor stores some metadata, which is then consumed in
    the corresponding call to longjmp. We use the SP as an "index" (stable
    identifier) into the metadata table. So far so good.

    However, when mangling is used, the setjmp interceptor observes the
    UNmangled SP, but the longjmp interceptor only knows the mangled value
    for SP. To still correlate corresponding pairs of calls, TSan currently
    derives the mangled representation in setjmp and uses it as the stable
    identifer, so that longjmp can do it's lookup.

    Currently, this works since "mangling" simply means XOR with a secret
    value. However, in the future we want to use operations that do not
    allow us to easily go from unmangled -> mangled (pointer
    authentication). Going from mangled -> unmangled should still be
    possible (for pointer authentication it means zeroing a few bits).

    This patch is part 1 of changing set/longjmp interceptors to use the
    unmangled SP for metadata lookup. Instead of deriving the mangled SP in
    setjmp, we will derive the unmangled SP in longjmp. Since this change
    involves difficult-to-test code, it will be done in (at least) 2 parts:
    This patch only replicates the existing behavior and checks that the
    newly computed value for SP matches with what we have been doing so far.
    This should help me to fix issues on architectures I cannot test
    directly. I tested this patch on x86-64 (Linux/Darwin) and arm64
    (Darwin).

    This patch will also address an orthogonal issue: there is a lot of code
    duplication in the assembly files, because the
    `void __tsan_setjmp(uptr sp, uptr mangled_sp)` already demands the
    mangled SP. This means that the code for computing the mangled SP is
    duplicated at every call site (in assembly).

    Reviewed By: dvyukov

    Differential Revision: https://reviews.llvm.org/D60981 — yln / ViewSVN
  7. [NFC][Codegen] Revisit test coverage for X % C == 0 fold once more (add tests with '1' divisor) — lebedevri / ViewSVN
  8. [WebAssembly] Added visibility and ident directives to WasmAsmParser.

    Summary:
    These are output by clang -S, so can now be roundtripped thru clang.

    (partially) fixes: https://bugs.llvm.org/show_bug.cgi?id=34544

    Reviewers: dschuff

    Subscribers: sbc100, jgravelle-google, aheejin, sunfish, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63901 — aardappel / ViewSVN
  9. [NFC][InstCombine] Shift amount reassociation: revisit flag preservation tests — lebedevri / ViewSVN

#18270 (Jun 28, 2019 12:03:11 PM)

  1. [AMDGPU][MC] Fix 2 for sanitizer failure in 364645 — dpreobra / ViewSVN
  2. [OPENMP]Fix top DSA for static members.

    Fixed handling of the data-sharing attributes for static members when
    requesting top most attribute. Previously, it might return the incorrect
    attributes for static members if they were overriden in the outer
    constructs. — abataev / ViewSVN
  3. [ARM] Add support for the MVE long shift instructions

    MVE adds the lsll, lsrl and asrl instructions, which perform a shift on a 64 bit value separated into two 32 bit registers.

    The Expand64BitShift function is modified to accept ISD::SHL, ISD::SRL and ISD::SRA and convert it into the appropriate opcode in ARMISD. An SHL is converted into an lsll, an SRL is converted into an lsrl for the immediate form and a negation and lsll for the register form, and SRA is converted into an asrl.

    test/CodeGen/ARM/shift_parts.ll is added to test the logic of emitting these instructions.

    Differential Revision: https://reviews.llvm.org/D63430 — samtebbs / ViewSVN
  4. [llvm-cov[ Fix lcov coverage report contains functions from other compilation units.

    Summary: Patch by Chuan Qiu (@eagleonhill).

    Reviewers: Dor1s

    Reviewed By: Dor1s

    Subscribers: lebedev.ri, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63571 — dor1s / ViewSVN
  5. [NFC][InstCombine] Shift amount reassociation: add flag preservation test

    As discussed in https://reviews.llvm.org/D63812#inline-569870
    * exact on both lshr => exact https://rise4fun.com/Alive/plHk
    * exact on both ashr => exact https://rise4fun.com/Alive/QDAA
    * nuw on both shl => nuw https://rise4fun.com/Alive/5Uk
    * nsw on both shl => nsw https://rise4fun.com/Alive/0plg

    So basically if the same flag is set on both original shifts -> set it on new shift.
    Don't think we can do anything with non-matching flags on shl. — lebedevri / ViewSVN
  6. [AMDGPU][MC] Fix for sanitizer failure in 364645 — dpreobra / ViewSVN
  7. [OPENMP]Fix DSA for loop iteration variables in simd loops.

    According to the OpenMP 5.0 standard, the loop iteration variable in the associated
    for-loop of a simd construct with just one associated for-loop may be
    listed in a private, lastprivate, or linear clause with a linear-step
    that is the increment of the associated for-loop. Also, the loop
    teration variables in the associated for-loops of a simd construct with
    multiple associated for-loops may be listed in a private or lastprivate
    clause. — abataev / ViewSVN
  8. [NFC][Float2Int] Pre-commit unary FNeg test to basic.ll — mcinally / ViewSVN
  9. [Hexagon] driver uses out-of-date option name and binary name

    Patch by A. Skrobov (t.yomitch).

    Differential Revision: https://reviews.llvm.org/D62127 — kparzysz / ViewSVN
  10. [OPENMP]Fix checks for DSA in simd constructs.

    The errors for incorrectly specified data-sharing attributes for simd
    constructs must be emitted only for the explicitly provided clauses, not
    the predetermined ones. — abataev / ViewSVN
  11. [NFC][NewGVN] Pre-commit unary FNeg test to fpmath.ll — mcinally / ViewSVN
  12. [AMDGPU][MC] Enabled constant expressions as operands of sendmsg

    See bug 40820: https://bugs.llvm.org/show_bug.cgi?id=40820

    Reviewers: artem.tamazov, arsenm

    Differential Revision: https://reviews.llvm.org/D62735 — dpreobra / ViewSVN
  13. [X86] CombineShuffleWithExtract - only require 1 source to be EXTRACT_SUBVECTOR

    We were requiring that both shuffle operands were EXTRACT_SUBVECTORs, but we can relax this to only require one of them to be.

    Also, we shouldn't bother attempting this if both operands are from the lowest subvector (or not EXTRACT_SUBVECTOR at all). — rksimon / ViewSVN
  14. [ARM] Add MVE mul patterns

    This simply adds integer and floating point VMUL patterns for MVE, same as we
    have add and sub.

    Differential Revision: https://reviews.llvm.org/D63866 — dmgreen / ViewSVN

#18269 (Jun 28, 2019 6:15:35 AM)

  1. [NFC][Codegen] Revisit test coverage for X % C == 0 fold — lebedevri / ViewSVN
  2. [ARM] Mark math routines as non-legal for MVE

    This adds handling and tests for a number of floating point math routines,
    which have no MVE instructions.

    Differential Revision: https://reviews.llvm.org/D63725 — dmgreen / ViewSVN
  3. [ARM] MVE patterns for VABS and VNEG

    This simply adds the required patterns for fp neg and abs.

    Differential Revision: https://reviews.llvm.org/D63861 — dmgreen / ViewSVN
  4. [DebugInfo] Fix setStartAddress after r364637 — maskray / ViewSVN
  5. [DebugInfo] Simplify GSYM::AddressRange and GSYM::AddressRanges

    Delete unnecessary getters of AddressRange.
    Simplify AddressRange::size(): Start <= End check should be checked in an upper layer.
    Delete isContiguousWith() that doesn't make sense.
    Simplify AddressRanges::insert. Delete commented code. Fix it when more than 1 ranges are to be deleted.
    Delete trailing newline. — maskray / ViewSVN
  6. [ARM] Widening loads and narrowing stores

    MVE has instructions to widen as it loads, and narrow as it stores. This adds
    the required patterns and legalisation to make them work including specifying
    that they are legal, patterns to select them and test changes.

    Patch by David Sherwood.

    Differential Revision: https://reviews.llvm.org/D63839 — dmgreen / ViewSVN
  7. [ARM] Fix integer UB in MVE load/store immediate handling. — statham / ViewSVN
  8. [DebugInfo] GSYM cleanups after D63104/r364427 — maskray / ViewSVN
  9. [ARM] MVE loads and stores

    This fills in the gaps for basic MVE loads and stores, allowing unaligned
    access and adding far too many tests. These will become important as
    narrowing/expanding and pre/post inc are added. Big endian might still not be
    handled very well, because we have not yet added bitcasts (and I'm not sure how
    we want it to work yet). I've included the alignment code anyway which maps
    with our current patterns. We plan to return to that later.

    Code written by Simon Tatham, with additional tests from Me and Mikhail Maltsev.

    Differential Revision: https://reviews.llvm.org/D63838 — dmgreen / ViewSVN
  10. [AVR] Don't look for the TargetFrameLowering in the FrameLowering implementation

    c.f. r364349 — dylanmckay / ViewSVN
  11. [ARM] Mark div and rem as expand for MVE

    We don't have vector operations for these, so they need to be expanded for both
    integer and float.

    Differential Revision: https://reviews.llvm.org/D63595 — dmgreen / ViewSVN
  12. [CTU] Add missing statistics

    Reviewers: xazax.hun

    Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D63878 — martong / ViewSVN
  13. [ARM] Select MVE fp add and sub

    The same as integer arithmetic, we can add simple floating point MVE addition and
    subtraction patterns.

    Initial code by David Sherwood

    Differential Revision: https://reviews.llvm.org/D63257 — dmgreen / ViewSVN
  14. [HardwareLoops] Loop counter guard intrinsic

    Introduce llvm.test.set.loop.iterations which sets the loop counter
    and also produces an i1 after testing that the count is not zero.

    Differential Revision: https://reviews.llvm.org/D63809 — sam_parker / ViewSVN
  15. [ARM] Select MVE add and sub

    This adds the first few patterns for MVE code generation, adding simple integer
    add and sub patterns.

    Initial code by David Sherwood

    Differential Revision: https://reviews.llvm.org/D63255 — dmgreen / ViewSVN
  16. [ARM] MVE vector shuffles

    This patch adds necessary shuffle vector and buildvector support for ARM MVE.
    It essentially adds support for VDUP, VREVs and some VMOVs, which are often
    required by other code (like upcoming patches).

    This mostly uses the same code from Neon that already generated
    NEONvdup/NEONvduplane/NEONvrev's. These have been renamed to ARMvdup/etc and
    moved to ARMInstrInfo as they are common to both architectures. Most of the
    selection code seems to be applicable to both, but NEON does have some more
    instructions making some parts specific.

    Most code originally by David Sherwood.

    Differential Revision: https://reviews.llvm.org/D63567 — dmgreen / ViewSVN
  17. [X86] Connect the output chain properly when combining vzext_movl+load into vzext_load. — ctopper / ViewSVN
  18. Silence gcc warning in testcase [NFC]

    Without the fix gcc (7.4.0) complains with

    ../unittests/ADT/APIntTest.cpp: In member function 'virtual void {anonymous}::APIntTest_MultiplicativeInverseExaustive_Test::TestBody()':
    ../unittests/ADT/APIntTest.cpp:2510:36: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
         for (unsigned Value = 0; Value < (1 << BitWidth); ++Value) {
                                  ~~~~~~^~~~~~~~~~~~~~~~~ — uabelho / ViewSVN
  19. [X86] Remove some duplicate patterns that already exist as part of their instruction definition. NFC — ctopper / ViewSVN

#18268 (Jun 27, 2019 10:40:21 PM)

  1. [Support] Fix add fs::getUmask() patch — abrachet / ViewSVN
  2. [Support] Add fs::getUmask() function and change fs::setPermissions

    Summary: This patch changes fs::setPermissions to optionally set permissions while respecting the umask. It also adds the function fs::getUmask() which returns the current umask.

    Reviewers: jhenderson, rupprecht, aprantl, lhames

    Reviewed By: jhenderson, rupprecht

    Subscribers: sanaanajjar231288, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63583 — abrachet / ViewSVN

#18267 (Jun 27, 2019 9:38:09 PM)

  1. [NFC][PowerPC] Move XS*QP series instruction apart from XS*QPO series in position of td file — wuzish / ViewSVN
  2. [AMDGPU] Packed thread ids in function call ABI

    Differential Revision: https://reviews.llvm.org/D63851 — rampitec / ViewSVN
  3. GlobalISel: Use Register — arsenm / ViewSVN
  4. [PowerPC][NFC] Use `|=` to update `Simplified` flag — lkail / ViewSVN
  5. AMDGPU/GlobalISel: Convert to using Register — arsenm / ViewSVN
  6. GlobalISel: Convert rest of MachineIRBuilder to using Register — arsenm / ViewSVN
  7. [GlobalISel][IRTranslator] Fix some PHI bugs related to jump tables when optimizations are used.

    The new switch lowering code that tries to generate jump tables and range checks
    were tested at -O0 on arm64, but on -O3 the generic switch lowering code goes to
    town on trying to generate optimized lowerings, e.g. multiple jump tables, range
    checks etc. This exposed bugs in the way PHI nodes are handled because the CFG
    looks even stranger after all of this is done. — aemerson / ViewSVN
  8. [InlineCost] make InlineCost assignable

    Summary:
    Current InlineCost is not assignable because of const members Cost and Threshold.
    I dont see practical benefits from having them const (access to these members is
    private and internal interactions are rather simple). On other hand that makes
    it hard to use as a member in some other data structure where assignability is necessary.

    I'm going to use InlineCost in a downstream inliner that maintains a complex queue
    of candidate call-sites and thus keeping and recalculating InlineCost is necessary.

    This patch just removes 'const' from both members, making InlineCost assignable.

    Reviewers: eraman, greened, chandlerc, yrouban, apilipenko
    Reviewed By: apilipenko
    Tags: #llvm
    Differential Revision: https://reviews.llvm.org/D63823 — fedor.sergeev / ViewSVN
  9. Fix ASAN error caused by commit r364512.

    This patch intends to fix ASAN stack-use-after-scope error.
    This is at least a short-term fix to unbreak LLVM's mainline.

    Differential Revision: https://reviews.llvm.org/D63905 — rdhindsa / ViewSVN
  10. [LangRef] Clarify codegen expectations for intrinsics with fp/integer-only overloads.

    This change is a result of discussions on list: "GlobalISel: Ambiguous intrinsic semantics problem"

    Differential Revision: https://reviews.llvm.org/D59657 — aemerson / ViewSVN
  11. hwasan: Fix an off-by-one error in PrintTagsAroundAddr.

    Previously we were printing 16 rows of tags, not 17.

    Differential Revision: https://reviews.llvm.org/D63906 — pcc / ViewSVN
  12. hwasan: Use llvm.read_register intrinsic to read the PC on aarch64 instead of taking the function's address.

    This shaves an instruction (and a GOT entry in PIC code) off prologues of
    functions with stack variables.

    Differential Revision: https://reviews.llvm.org/D63472 — pcc / ViewSVN
  13. hwasan: Teach the runtime to identify the local variable being accessed in UAR reports.

    Each function's PC is recorded in the ring buffer. From there we can access
    the function's local variables and reconstruct the tag of each one with the
    help of the information printed by llvm-symbolizer's new FRAME command. We
    can then find the variable that was likely being accessed by matching the
    pointer's tag against the reconstructed tag.

    Differential Revision: https://reviews.llvm.org/D63469 — pcc / ViewSVN
  14. Revert "[JITLink][MachO/x86-64] Add a testcase for X86_64_RELOC_GOT."

    Reverts commit r364600 while I investigate bot failures. — Lang Hames / ViewSVN
  15. [analyzer] Fix clang-tidy crash on GCCAsmStmt

    Summary:
    Added entry in switch statement to recognize GCCAsmStmt
    as a possible block terminator.

    Handling to build CFG using GCCAsmStmt was already implemented.

    Reviewers: nickdesaulniers, george.karpenkov, NoQ

    Reviewed By: nickdesaulniers, NoQ

    Subscribers: xbolva00, tmroeder, xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, Charusso, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D63533 — nathan-huckleberry / ViewSVN
  16. [CodeGen] [SelectionDAG] More efficient code for X % C == 0 (UREM case) (try 3)

    Summary:
    I'm submitting a new revision since i don't understand how to reclaim/reopen/take over the existing one, D50222.
    There is no such action in "Add Action" menu...

    This implements an optimization described in Hacker's Delight 10-17: when `C` is constant,
    the result of `X % C == 0` can be computed more cheaply without actually calculating the remainder.
    The motivation is discussed here: https://bugs.llvm.org/show_bug.cgi?id=35479.

    This is a recommit, the original commit rL364563 was reverted in rL364568
    because test-suite detected miscompile - the new comparison constant 'Q'
    was being computed incorrectly (we divided by `D0` instead of `D`).

    Original patch D50222 by @hermord (Dmytro Shynkevych)

    Notes:
    - In principle, it's possible to also handle the `X % C1 == C2` case, as discussed on bugzilla.
      This seems to require an extra branch on overflow, so I refrained from implementing this for now.
    - An explicit check for when the `REM` can be reduced to just its LHS is included:
      the `X % C` == 0 optimization breaks `test1` in `test/CodeGen/X86/jump_sign.ll` otherwise.
      I hadn't managed to find a better way to not generate worse output in this case.
    - The `test/CodeGen/X86/jump_sign.ll` regresses, and is being fixed by a followup patch D63390.

    Reviewers: RKSimon, craig.topper, spatel, hermord, xbolva00

    Reviewed By: RKSimon, xbolva00

    Subscribers: dexonsmith, kristina, xbolva00, javed.absar, llvm-commits, hermord

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63391 — lebedevri / ViewSVN
  17. [NFC][APInt] Add (exhaustive) test for multiplicativeInverse()

    Else there is no direct test coverage at all.
    The function should either return '0' or precise answer. — lebedevri / ViewSVN
  18. [JITLink][MachO/x86-64] Add a testcase for X86_64_RELOC_GOT.

    This is the data-section counterpart to X86_64_RELOC_GOTPCREL. — Lang Hames / ViewSVN
  19. [NFC][GVNSink] Pre-commit unary FNeg test to fpmath.ll — mcinally / ViewSVN
  20. [WebAssembly] Enable an atomic.notify MC test

    Summary:
    Assembly of atomic.notify has been fixed in r364576, so we can enable
    it.

    Reviewers: aardappel

    Subscribers: dschuff, sbc100, jgravelle-google, sunfish, jfb, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63898 — aheejin / ViewSVN
  21. Pattern match struct types in test case.

    This simplifies the test cases in a patch I'm planning to send later. — ahatanak / ViewSVN
  22. [libFuzzer] Migrate to the new exception syscalls on Fuchsia

    This is part of the transition to the new Fuchsia exception syscalls
    signature.

    Differential Revision: https://reviews.llvm.org/D63897 — phosek / ViewSVN
  23. [sanitizer_common] Switch from zx_clock_get_new to zx_clock_get

    This is part of the soft-transition to the new system call name.
    These two system calls are the same so this change is no-op.

    Differential Revision: https://reviews.llvm.org/D63895 — phosek / ViewSVN
  24. [GVN] Add support for unary FNeg to GVN pass

    Differential Revision: https://reviews.llvm.org/D63896 — mcinally / ViewSVN
  25. [compiler-rt] Rename lit.*.cfg.* -> lit.*.cfg.py.*

    These lit configuration files are really Python source code. Using the
    .py file extension helps editors and tools use the correct language
    mode. LLVM and Clang already use this convention for lit configuration,
    this change simply applies it to all of compiler-rt.

    Reviewers: vitalybuka, dberris

    Differential Revision: https://reviews.llvm.org/D63658 — rnk / ViewSVN
  26. Convert line endings to LF. — aganea / ViewSVN
  27. Make nrvo-string test more robust.

    This is a follow-up to r364466, but better implemented. Original
    commit message still applies:

        The breakpoint locations were in places where clang doesn't actually
        emit a source location for and depend on the debugger's ability to
        move the breakpoint forward onto a line that is already in the
        function epilogue. In my testing older versions of LLDB fail to do
        that, so I'm modifying the test to force a break-able location by
        calling a noinline function.

        <rdar://problem/52079841> — Adrian Prantl / ViewSVN
  28. [x86] remove whitespace; NFC — spatel / ViewSVN
  29. [NFC][GVN] Pre-commit unary FNeg tests to fpmath.ll — mcinally / ViewSVN
  30. [x86] prevent crashing from select narrowing with AVX512 — spatel / ViewSVN
  31. [GN] Update build file — Vitaly Buka / ViewSVN
  32. [GN] Set exit code to 1 if changes are needed — Vitaly Buka / ViewSVN
  33. [PowerPC][NFC] Remove unused (and unsupported) fusion feature bits.

    FeatureFusion bits was first introduced in
    https://reviews.llvm.org/rL253724. for add/load integer fusion for P8.
    The only use of `hasFusion` was https://reviews.llvm.org/rL255319.

    However, this was removed later in https://reviews.llvm.org/rL280440.

    So, there is NO any reference to fusion in code now.

    Leaving it there is misleading and confusing, so remove it for now.
    We can alwasy add back if we ever support fusion in the future. — jsji / ViewSVN
  34. Use "willreturn" in isGuaranteedToTransferExecutionToSuccessor

    The `willreturn` function attribute guarantees that a function call will
    come back to the call site if the call is also known not to throw.
    Therefore, this attribute can be used in
    `isGuaranteedToTransferExecutionToSuccessor`.

    Patch by Hideto Ueno (@uenoku)

    Reviewers: jdoerfert, sstefan1

    Reviewed By: jdoerfert

    Subscribers: hiraditya, jfb, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63372 — jdoerfert / ViewSVN
  35. Update -analyze -scalar-evolution output for multiple exit loops w/computable exit values

    The previous output was next to useless if *any* exit was not computable.  If we have more than one exit, show the exit count for each so that it's easier to see what's going from with SCEV analysis when debugging. — reames / ViewSVN
  36. [NFC][CodeGen] Add negative test for X u% C == 0 fold (D63391)

    The fold (D63391) uses multiplicativeInverse(),
    but it is not guaranteed to always succeed,
    and '100' appears to be one of the problematic values. — lebedevri / ViewSVN
  37. Correct the file path. NFC. — hliao / ViewSVN
  38. [WebAssembly] AsmParser: better atomic inst detection

    Summary:
    Previously missed atomic.notify.

    Fixes https://bugs.llvm.org/show_bug.cgi?id=40728

    Reviewers: aheejin

    Subscribers: sbc100, jgravelle-google, sunfish, jfb, llvm-commits, dschuff

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63747 — aardappel / ViewSVN
  39. [OPENMP]Generate correctly implicit flags for mapped data.

    Implicit flag must not be emitted for explicitly specified firstprivate
    variables, but for implicitly captured sizes of the VLAs. — abataev / ViewSVN
  40. Add a missing '__uncvref_t' to the SFINAE constraints for optional's assignment operator. Fixes PR38638. Thanks to Jonathan Wakely for the report — marshall / ViewSVN
  41. [llvm-objdump] Update the doc for --disassemble-functions.

    Update the doc after llvm-svn: 364121 is landed.
    With two more trivial fixes that are not related to
    --disassemble-functions but still about llvm-objdump.

    Reviewers: jhenderson, grimar, MaskRay, rupprecht, peter.smith

    Reviewed by: jhenderson, MaskRay

    Differential Revision: https://reviews.llvm.org/D63787 — yuanfang / ViewSVN
  42. Revert "[LiveDebugValues] Emit the debug entry values"

    Appears that the 'test/DebugInfo/MIR/X86/dbginfo-entryvals.mir'
    does not pass on Windows.

    This reverts commit rL364553. — djtodoro / ViewSVN
  43. [WebAssembly] Fix p2align in assembler.

    Summary:
    - Match the syntax output by InstPrinter.
    - Fix it always emitting 0 for align. Had to work around fact that
      opcode is not available for GetDefaultP2Align while parsing.
    - Updated tests that were erroneously happy with a p2align=0

    Fixes https://bugs.llvm.org/show_bug.cgi?id=40752

    Reviewers: aheejin, sbc100

    Subscribers: jgravelle-google, sunfish, jfb, llvm-commits, dschuff

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63633 — aardappel / ViewSVN
  44. [X86] combineX86ShufflesRecursively - merge shuffles with more than 2 inputs

    We already had the infrastructure for this, but were waiting for the fix for a number of regressions which were handled by the recent shuffle(extract_subvector(),extract_subvector()) -> extract_subvector(shuffle()) shuffle combines — rksimon / ViewSVN
  45. Revert "[CodeGen] [SelectionDAG] More efficient code for X % C == 0 (UREM case) (try 2)"

    *Appears* to break test-suite on
    http://lab.llvm.org:8011/builders/clang-cmake-x86_64-sde-avx512-linux/builds/23790

    FAIL: burg.execution_time
    FAIL: spiff.execution_time
    FAIL: employ.execution_time
    FAIL: llu.execution_time
    FAIL: gramschmidt.execution_time
    FAIL: fdtd-apml.execution_time

    This reverts commit r364563. — lebedevri / ViewSVN
  46. AMDGPU: Make fixing i1 copies robust against re-ordering

    Summary:
    The new test case led to incorrect code.

    Change-Id: Ief48b227e97aa662dd3535c9bafb27d4a184efca

    Reviewers: arsenm, david-salinas

    Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63871 — nha / ViewSVN
  47. [ARM] Move low overhead loop codegen tests into a separate file. NFC — dmgreen / ViewSVN
  48. Use getConstantOperandAPInt instead of getConstantOperandVal for comparisons.

    getConstantOperandAPInt avoids any large integer issues - these are unlikely but the fuzzers do like to mess around..... — rksimon / ViewSVN
  49. [CodeGen] [SelectionDAG] More efficient code for X % C == 0 (UREM case) (try 2)

    Summary:
    I'm submitting a new revision since i don't understand how to reclaim/reopen/take over the existing one, D50222.
    There is no such action in "Add Action" menu...
    Original patch D50222 by @hermord (Dmytro Shynkevych)

    This implements an optimization described in Hacker's Delight 10-17: when `C` is constant,
    the result of `X % C == 0` can be computed more cheaply without actually calculating the remainder.
    The motivation is discussed here: https://bugs.llvm.org/show_bug.cgi?id=35479.

    Original patch author: @hermord (Dmytro Shynkevych)!

    Notes:
    - In principle, it's possible to also handle the `X % C1 == C2` case, as discussed on bugzilla.
      This seems to require an extra branch on overflow, so I refrained from implementing this for now.
    - An explicit check for when the `REM` can be reduced to just its LHS is included:
      the `X % C` == 0 optimization breaks `test1` in `test/CodeGen/X86/jump_sign.ll` otherwise.
      I hadn't managed to find a better way to not generate worse output in this case.
    - The `test/CodeGen/X86/jump_sign.ll` regresses, and is being fixed by a followup patch D63390.

    Reviewers: RKSimon, craig.topper, spatel, hermord, xbolva00

    Reviewed By: RKSimon, xbolva00

    Subscribers: xbolva00, javed.absar, llvm-commits, hermord

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63391 — lebedevri / ViewSVN
  50. [X86] getTargetVShiftByConstNode - reduce variable scope. NFCI.

    Fixes cppcheck warning. — rksimon / ViewSVN
  51. [ARM] Fix formatting issue in ARMISelLowering.cpp

    Fix a formatting error in ARMISelLowering.cpp::Expand64BitShift. My test
    commit after receiving write access. — samtebbs / ViewSVN
  52. [llvm-nm] Fix for BZ41711 - Class character for a symbol with undefined
              binding does not match class assigned by GNU nm

    Bugzilla: https://bugs.llvm.org/show_bug.cgi?id=41711

    Differential Revision: https://reviews.llvm.org/D63340 — chrisj / ViewSVN
  53. Recommit [PowerPC] Update P9 vector costs for insert/extract element

    Recommit patch D60160 after regression fix patch D63463. — froese / ViewSVN
  54. [debug-info] Make a couple of tests more robust. — probinson / ViewSVN
  55. [Attr] Add "willreturn" function attribute

    This patch introduces a new function attribute, willreturn, to indicate
    that a call of this function will either exhibit undefined behavior or
    comes back and continues execution at a point in the existing call stack
    that includes the current invocation.

    This attribute guarantees that the function does not have any endless
    loops, endless recursion, or terminating functions like abort or exit.

    Patch by Hideto Ueno (@uenoku)

    Reviewers: jdoerfert

    Subscribers: mehdi_amini, hiraditya, steven_wu, dexonsmith, lebedev.ri, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D62801 — jdoerfert / ViewSVN
  56. Followup to revision 364545: Turns out that clang issues different errors for C++11 vs c++2a, so I tweaked the 'expected-error' bits that I added to match either of them. — marshall / ViewSVN
  57. [LiveDebugValues] Emit the debug entry values

    Emit replacements for clobbered parameters location if the parameter
    has unmodified value throughout the funciton. This is basic scenario
    where we can use the debug entry values.

    ([12/13] Introduce the debug entry values.)

    Co-authored-by: Ananth Sowda <asowda@cisco.com>
    Co-authored-by: Nikola Prica <nikola.prica@rt-rk.com>
    Co-authored-by: Ivan Baev <ibaev@cisco.com>

    Differential Revision: https://reviews.llvm.org/D58042 — djtodoro / ViewSVN
  58. [docs][llvm-nm][llvm-objdump] Improve "See Also" section

    The "See Also" section for llvm-nm didn't actually contain any links,
    and the tools referred to didn't make much sense (referring to non-LLVM
    tools, when we have equivalents, or tools that aren't really to do with
    symbol dumping). llvm-objdump's didn't refer to llvm-readelf.

    Reviewed by: grimar

    Differential Revision: https://reviews.llvm.org/D63875 — jhenderson / ViewSVN
  59. [clangd] Emit semantic highlighting tokens when the main AST is built.

    Differential Revision: https://reviews.llvm.org/D63821 — jvikstrom / ViewSVN
  60. Bitcode: derive all types used from records instead of Values.

    There is existing bitcode that we need to support where the structured nature
    of pointer types is used to derive the result type of some operation. For
    example a GEP's operation and result will be based on its input Type.

    When pointers become opaque, the BitcodeReader will still have access to this
    information because it's explicitly told how to construct the more complex
    types used, but this information will not be attached to any Value that gets
    looked up. This changes BitcodeReader so that in all places which use type
    information in this manner, it's derived from a side-table rather than from the
    Value in question. — Tim Northover / ViewSVN
  61. [LiveRangeEdit] Fix build failure caused by the rL364536 — djtodoro / ViewSVN
  62. [TargetLowering] SimplifyDemandedVectorElts - add shift/rotate support. — rksimon / ViewSVN
  63. [scudo][standalone] Introduce the C & C++ wrappers [fixed]

    Summary:
    This is a redo of D63612.

    Two problems came up on some bots:
    - `__builtin_umull_overflow` was not declared. This is likely due to an
      older clang or gcc, so add a guard with `__has_builtin` and fallback
      to a division in the event the builtin doesn't exist;
    - contradicting definition for `malloc`, etc. This is AFAIU due to the
      fact that we ended up transitively including `stdlib.h` in the `.inc`
      due to it being the flags parser header: so move the include to the
      cc instead.

    This should fix the issues, but since those didn't come up in my local
    tests it's mostly guesswork.

    Rest is the same!

    Reviewers: morehouse, hctim, eugenis, vitalybuka, dyung, hans

    Reviewed By: morehouse, dyung, hans

    Subscribers: srhines, mgorny, delcypher, jfb, #sanitizers, llvm-commits

    Tags: #llvm, #sanitizers

    Differential Revision: https://reviews.llvm.org/D63831 — cryptoad / ViewSVN
  64. [InstCombine] remove 'tmp' names and regenerate checks; NFC — spatel / ViewSVN
  65. Provide hashers for string_view only if they are using the default char_traits. Seen on SO: test/std/strings/string.view/string.view.hash/char_type.hash.fail.cpp — marshall / ViewSVN
  66. [PowerPC][HTM] Fix disassembling buffer overflow for tabortdc and others

    This was reported in https://bugs.llvm.org/show_bug.cgi?id=41751
    llvm-mc aborted when disassembling tabortdc.

    This patch try to clean up TM related DAGs.

    * Fixes the problem by remove explicit output of cr0, and put it as implicit def.
    * Update int_ppc_tbegin pattern to accommodate the implicit def of cr0.
    * Update the TCHECK operand and int_ppc_tcheck accordingly.
    * Add some builtin test and disassembly tests.
    * Remove unused CRRC0/crrc0

    Differential Revision: https://reviews.llvm.org/D61935 — jsji / ViewSVN
  67. Revert r363658 "[SVE][IR] Scalable Vector IR Type with pr42210 fix"

    We saw a 70% ThinLTO link time increase in Chromium for Android, see
    crbug.com/978817. Sounds like more of PR42210.

    > Recommit of D32530 with a few small changes:
    >   - Stopped recursively walking through aggregates in
    >     the verifier, so that we don't impose too much
    >     overhead on large modules under LTO (see PR42210).
    >   - Changed tests to match; the errors are slightly
    >     different since they only report the array or
    >     struct that actually contains a scalable vector,
    >     rather than all aggregates which contain one in
    >     a nested member.
    >   - Corrected an older comment
    >
    > Reviewers: thakis, rengolin, sdesmalen
    >
    > Reviewed By: sdesmalen
    >
    > Differential Revision: https://reviews.llvm.org/D63321 — hans / ViewSVN
  68. [DWARF] Handle the DW_OP_entry_value operand

    Add the IR and the AsmPrinter parts for handling of the DW_OP_entry_values
    DWARF operation.

    ([11/13] Introduce the debug entry values.)

    Co-authored-by: Ananth Sowda <asowda@cisco.com>
    Co-authored-by: Nikola Prica <nikola.prica@rt-rk.com>
    Co-authored-by: Ivan Baev <ibaev@cisco.com>

    Differential Revision: https://reviews.llvm.org/D60866 — djtodoro / ViewSVN
  69. [TargetLowering] SimplifyDemandedBits - use DemandedElts to better identify partial splat shift amounts — rksimon / ViewSVN
  70. [mips] Mark pseudo select instructions by the `hasNoSchedulingInfo` tag — atanasyan / ViewSVN
  71. [mips] Add new items to the list of features unsupported by P5600 — atanasyan / ViewSVN
  72. [docs][tools] Add missing "program" tags to rst files

    Sphinx allows for definitions of command-line options using
    `.. option <name>` and references to those options via `:option:<name>`.
    However, it looks like there is no scoping of these options by default,
    meaning that links can end up pointing to incorrect documents. See for
    example the llvm-mca document, which contains references to -o that,
    prior to this patch, pointed to a different document. What's worse is
    that these links appear to be non-deterministic in which one is picked
    (on my machine, some references end up pointing to opt, whereas on the
    live docs, they point to llvm-dwarfdump, for example).

    The fix is to add the .. program <name> tag. This essentially namespaces
    the options (definitions and references) to the named program, ensuring
    that the links are kept correct.

    Reviwed by: andreadb

    Differential Revision: https://reviews.llvm.org/D63873 — jhenderson / ViewSVN
  73. [clangd] Fix a case where we fail to detect a header-declared symbol in rename.

    Summary:
    Failing case:

    ```
    #include "foo.h"
    void fo^o() {}
    ```

    getRenameDecl() returns the decl of the symbol under the cursor (which is
    in the current main file), instead, we use the canonical decl to determine
    whether a symbol is declared in #included header.

    Reviewers: sammccall

    Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D63872 — hokein / ViewSVN
  74. [Backend] Keep call site info valid through the backend

    Handle call instruction replacements and deletions in order to preserve
    valid state of the call site info of the MachineFunction.

    NOTE: If the call site info is enabled for a new target, the assertion from
    the MachineFunction::DeleteMachineInstr() should help to locate places
    where the updateCallSiteInfo() should be called in order to preserve valid
    state of the call site info.

    ([10/13] Introduce the debug entry values.)

    Co-authored-by: Ananth Sowda <asowda@cisco.com>
    Co-authored-by: Nikola Prica <nikola.prica@rt-rk.com>
    Co-authored-by: Ivan Baev <ibaev@cisco.com>

    Differential Revision: https://reviews.llvm.org/D61062 — djtodoro / ViewSVN
  75. [clang-tidy] Fix NDEBUG build [NFC] — uabelho / ViewSVN
  76. [ARM] Fix bogus assertions in copyPhysReg v8.1-M cases.

    The code to generate register move instructions in and out of VPR and
    FPSCR_NZCV had assertions checking that the other register involved
    was a GPR _pair_, instead of a single GPR as it should have been.

    Reviewers: miyuki, ostannard

    Subscribers: javed.absar, kristof.beyls, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63865 — statham / ViewSVN
  77. [ARM] Fix handling of zero offsets in LOB instructions.

    The BF and WLS/WLSTP instructions have various branch-offset fields
    occupying different positions and lengths in the instruction encoding,
    and all of them were decoded at disassembly time by the function
    DecodeBFLabelOffset() which returned SoftFail if the offset was zero.

    In fact, it's perfectly fine and not even a SoftFail for most of those
    offset fields to be zero. The only one that can't be zero is the 4-bit
    field labelled `boff` in the architecture spec, occupying bits {26-23}
    of the BF instruction family. If that one is zero, the encoding
    overlaps other instructions (WLS, DLS, LETP, VCTP), so it ought to be
    a full Fail.

    Fixed by adding an extra template parameter to DecodeBFLabelOffset
    which controls whether a zero offset is accepted or rejected. Adjusted
    existing tests (only in error messages for bad disassemblies); added
    extra tests to demonstrate zero offsets being accepted in all the
    right places, and a few demonstrating rejection of zero `boff`.

    Reviewers: DavidSpickett, ostannard

    Subscribers: javed.absar, kristof.beyls, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63864 — statham / ViewSVN
  78. [ARM] Make coprocessor number restrictions consistent.

    Different versions of the Arm architecture disallow the use of generic
    coprocessor instructions like MCR and CDP on different sets of
    coprocessors. This commit centralises the check of the coprocessor
    number so that it's consistent between assembly and disassembly, and
    also updates it for the new restrictions in Arm v8.1-M.

    New tests added that check all the coprocessor numbers; old tests
    updated, where they used a number that's now become illegal in the
    context in question.

    Reviewers: DavidSpickett, ostannard

    Subscribers: javed.absar, kristof.beyls, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63863 — statham / ViewSVN
  79. [ARM] Tighten restrictions on use of SP in v8.1-M CSEL.

    In the `CSEL Rd,Rm,Rn` instruction family (also including CSINC, CSINV
    and CSNEG), the architecture lists it as CONSTRAINED UNPREDICTABLE
    (i.e. SoftFail) to use SP in the Rd or Rm slot, but outright illegal
    to use it in the Rn slot, not least because some encodings of that
    form are used by MVE instructions such as UQRSHLL.

    MC was treating all three slots the same, as SoftFail. So the only
    reason UQRSHLL was disassembled correctly at all was because the MVE
    decode table is separate from the Thumb2 one and takes priority; if
    you turned off MVE, then encodings such as `[0x5f,0xea,0x0d,0x83]`
    would disassemble as spurious CSELs.

    Fixed by inventing another version of the `GPRwithZR` register class,
    which disallows SP completely instead of just SoftFailing it.

    Reviewers: DavidSpickett, ostannard

    Subscribers: javed.absar, kristof.beyls, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63862 — statham / ViewSVN
  80. [X86] getFauxShuffle - add DemandedElts as a filter

    This is currently benign but will be used in the future based on the elements referenced by the parent shuffle(s). — rksimon / ViewSVN
  81. [clangd] No need to setTraversalScope in SemanticHighlighting.

    Summary:
    We have already set it when the AST is being built, and setting TraversalScope
    is not free (it will clear the cache, which is expensive to build).

    Reviewers: jvikstrom

    Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D63874 — hokein / ViewSVN
  82. [mips] Add GPR_64 predicate to some mov[zn] instructions — atanasyan / ViewSVN
  83. [mips] Fix indentation and split long lines. NFC — atanasyan / ViewSVN
  84. [mips] Reformat MSA instruction definitions. NFC — atanasyan / ViewSVN
  85. Add triple to a test I just added. — jmorse / ViewSVN
  86. IR: compare type attributes deeply when looking into functions.

    FunctionComparator attempts to produce a stable comparison of two Function
    instances by looking at all available properties. Since ByVal attributes now
    contain a Type pointer, they are not trivially ordered and FunctionComparator
    should use its own Type comparison logic to sort them. — Tim Northover / ViewSVN
  87. [Object/invalid.test] - Convert most of the sub tests to YAML.

    Object/invalid.test is a test case that is used to check the behavior of tools
    when broken inputs are used.

    The most often tool tested there is llvm-readobj. I think we might want to move
    such tests to test\tools\llvm-readobj. For now this patch converts
    many sub-tests to use YAML and removes 12 binaries from the inputs.

    Differential revision: https://reviews.llvm.org/D63762 — grimar / ViewSVN
  88. [Attributor] Deducing existing nounwind attribute.

    Adding nounwind deduction in new attributor framework.

    Reviewers: jdoerfert, uenoku

    Subscribers: hiraditya, llvm-commits

    Differential Revision: https://reviews.llvm.org/D63379 — sstefan / ViewSVN
  89. [X86][SSE] Regenerate v48 shuffle test on a variety of targets — rksimon / ViewSVN
  90. [clangd] Address limitations in SelectionTree:

    Summary:
    - nodes can have special-cased hit ranges including "holes" (FunctionTypeLoc in void foo())
    - token conflicts between siblings (int a,b;) are resolved in favor of left sibling
    - parent/child overlap is handled statefully rather than explicitly by comparing parent/child
       ranges (this lets us share a mechanism with sibling conflicts)

    Reviewers: kadircet

    Subscribers: ilya-biryukov, MaskRay, jkorous, mgrang, arphaman, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D63760 — sammccall / ViewSVN
  91. [X86][AVX] SimplifyDemandedVectorElts - combine PERMPD(x) -> EXTRACTF128(X)

    If we only use the bottom lane, see if we can simplify this to extract_subvector - which is always at least as quick as PERMPD/PERMQ. — rksimon / ViewSVN
  92. [yaml2obj] - Allow overriding e_shentsize, e_shoff, e_shnum and e_shstrndx fields in the YAML.

    This allows setting different values for e_shentsize, e_shoff, e_shnum
    and e_shstrndx fields and is useful for producing broken inputs for various
    test cases.

    Differential revision: https://reviews.llvm.org/D63771 — grimar / ViewSVN
  93. [ISEL][X86] Tracking of registers that forward call arguments

    While lowering calls, collect info about registers that forward arguments
    into following function frame. We store such info into the MachineFunction
    of the call. This is used very late when dumping DWARF info about
    call site parameters.

    ([9/13] Introduce the debug entry values.)

    Co-authored-by: Ananth Sowda <asowda@cisco.com>
    Co-authored-by: Nikola Prica <nikola.prica@rt-rk.com>
    Co-authored-by: Ivan Baev <ibaev@cisco.com>

    Differential Revision: https://reviews.llvm.org/D60715 — djtodoro / ViewSVN
  94. [DebugInfo] Avoid register coalesing unsoundly changing DBG_VALUE locations

    Once MIR code leaves SSA form and the liveness of a vreg is considered,
    DBG_VALUE insts are able to refer to non-live vregs, because their
    debug-uses do not contribute to liveness. This non-liveness becomes
    problematic for optimizations like register coalescing, as they can't
    ``see'' the debug uses in the liveness analyses.

    As a result registers get coalesced regardless of debug uses, and that can
    lead to invalid variable locations containing unexpected values. In the
    added test case, the first vreg operand of ADD32rr is merged with various
    copies of the vreg (great for performance), but a DBG_VALUE of the
    unmodified operand is blindly updated to the modified operand. This changes
    what value the variable will appear to have in a debugger.

    Fix this by changing any DBG_VALUE whose operand will be resurrected by
    register coalescing to be a $noreg DBG_VALUE, i.e. give the variable no
    location. This is an overapproximation as some coalesced locations are
    safe (others are not) -- an extra domination analysis would be required to
    work out which, and it would be better if we just don't generate non-live
    DBG_VALUEs.

    This fixes PR40010.

    Differential Revision: https://reviews.llvm.org/D56151 — jmorse / ViewSVN
  95. [GlobalISel] Remove [un]packRegs from IRTranslator

    Remove the last use of packRegs from IRTranslator and delete
    pack/unpackRegs. This introduces a fallback to DAGISel for intrinsics
    with aggregate arguments, since we don't have a testcase for them so
    it's hard to tell how we'd want to handle them.

    Discussed in https://reviews.llvm.org/D63551 — rovka / ViewSVN
  96. [AArch64 GlobalISel] Cleanup CallLowering. NFCI

    Now that lowerCall and lowerFormalArgs have been refactored, we can
    simplify splitToValueTypes.

    Differential Revision: https://reviews.llvm.org/D63552 — rovka / ViewSVN
  97. [GlobalISel] Accept multiple vregs for lowerCall's args

    Change the interface of CallLowering::lowerCall to accept several
    virtual registers for each argument, instead of just one.  This is a
    follow-up to D46018.

    CallLowering::lowerReturn was similarly refactored in D49660 and
    lowerFormalArguments in D63549.

    With this change, we no longer pack the virtual registers generated for
    aggregates into one big lump before delegating to the target. Therefore,
    the target can decide itself whether it wants to handle them as separate
    pieces or use one big register.

    ARM and AArch64 have been updated to use the passed in virtual registers
    directly, which means we no longer need to generate so many
    merge/extract instructions.

    NFCI for AMDGPU, Mips and X86.

    Differential Revision: https://reviews.llvm.org/D63551 — rovka / ViewSVN
  98. [GlobalISel] Accept multiple vregs for lowerCall's result

    Change the interface of CallLowering::lowerCall to accept several
    virtual registers for the call result, instead of just one.  This is a
    follow-up to D46018.

    CallLowering::lowerReturn was similarly refactored in D49660 and
    lowerFormalArguments in D63549.

    With this change, we no longer pack the virtual registers generated for
    aggregates into one big lump before delegating to the target. Therefore,
    the target can decide itself whether it wants to handle them as separate
    pieces or use one big register.

    ARM and AArch64 have been updated to use the passed in virtual registers
    directly, which means we no longer need to generate so many
    merge/extract instructions.

    NFCI for AMDGPU, Mips and X86.

    Differential Revision: https://reviews.llvm.org/D63550 — rovka / ViewSVN
  99. [GlobalISel] Accept multiple vregs in lowerFormalArgs

    Change the interface of CallLowering::lowerFormalArguments to accept
    several virtual registers for each formal argument, instead of just one.
    This is a follow-up to D46018.

    CallLowering::lowerReturn was similarly refactored in D49660. lowerCall
    will be refactored in the same way in follow-up patches.

    With this change, we forward the virtual registers generated for
    aggregates to CallLowering. Therefore, the target can decide itself
    whether it wants to handle them as separate pieces or use one big
    register. We also copy the pack/unpackRegs helpers to CallLowering to
    facilitate this.

    ARM and AArch64 have been updated to use the passed in virtual registers
    directly, which means we no longer need to generate so many
    merge/extract instructions.

    AArch64 seems to have had a bug when lowering e.g. [1 x i8*], which was
    put into a s64 instead of a p0. Added a test-case which illustrates the
    problem more clearly (it crashes without this patch) and fixed the
    existing test-case to expect p0.

    AMDGPU has been updated to unpack into the virtual registers for
    kernels. I think the other code paths fall back for aggregates, so this
    should be NFC.

    Mips doesn't support aggregates yet, so it's also NFC.

    x86 seems to have code for dealing with aggregates, but I couldn't find
    the tests for it, so I just added a fallback to DAGISel if we get more
    than one virtual register for an argument.

    Differential Revision: https://reviews.llvm.org/D63549 — rovka / ViewSVN
  100. [GlobalISel] Allow multiple VRegs in ArgInfo. NFC

    Allow CallLowering::ArgInfo to contain more than one virtual register.
    This is useful when passes split aggregates into several virtual
    registers, but need to also provide information about the original type
    to the call lowering. Used in follow-up patches.

    Differential Revision: https://reviews.llvm.org/D63548 — rovka / ViewSVN
  101. [AMDGPU] Fix +DumpCode to print an entry label for the first function

    Summary:
    The +DumpCode attribute is a horrible hack in AMDGPU to embed the
    disassembly of the generated code into the elf file. It is used by LLPC
    to implement an extension that allows the application to read back the
    disassembly of the code.

    It tries to print an entry label at the start of every function, but
    that didn't work for the first function in the module because
    DumpCodeInstEmitter wasn't initialised until EmitFunctionBodyStart
    which is too late.

    Change-Id: I790d73ddf4f51fd02ab32529380c7cb7c607c4ee

    Reviewers: arsenm, tpr, kzhuravl

    Reviewed By: arsenm

    Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63712 — foad / ViewSVN
  102. Silence gcc warning after r364458

    Without the fix gcc 7.4.0 complains with

    ../lib/Target/X86/X86ISelLowering.cpp: In function 'bool getFauxShuffleMask(llvm::SDValue, llvm::SmallVectorImpl<int>&, llvm::SmallVectorImpl<llvm::SDValue>&, llvm::SelectionDAG&)':
    ../lib/Target/X86/X86ISelLowering.cpp:6690:36: error: enumeral and non-enumeral type in conditional expression [-Werror=extra]
                 int Idx = (ZeroMask[j] ? SM_SentinelZero : (i + j + Ofs));
                            ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    cc1plus: all warnings being treated as errors — uabelho / ViewSVN
  103. [MachineFunction] Base support for call site info tracking

    Add an attribute into the MachineFunction that tracks call site info.

    ([8/13] Introduce the debug entry values.)

    Co-authored-by: Ananth Sowda <asowda@cisco.com>
    Co-authored-by: Nikola Prica <nikola.prica@rt-rk.com>
    Co-authored-by: Ivan Baev <ibaev@cisco.com>

    Differential Revision: https://reviews.llvm.org/D61061 — djtodoro / ViewSVN
  104. Fix -Wunused-variable warnings after r364464

    /work/llvm.monorepo/llvm/lib/Bitcode/Reader/BitcodeReader.cpp: In function
    ‘llvm::Expected<std::basic_string<char> > readIdentificationBlock(llvm::BitstreamCursor&)’:
    /work/llvm.monorepo/llvm/lib/Bitcode/Reader/BitcodeReader.cpp:205:22:
    warning: unused variable ‘BitCode’ [-Wunused-variable]
         switch (unsigned BitCode = MaybeBitCode.get()) {
                          ^
    /work/llvm.monorepo/llvm/lib/Bitcode/Reader/BitcodeReader.cpp: In member function
    ‘llvm::Error {anonymous}::ModuleSummaryIndexBitcodeReader::parseModule()’:
    /work/llvm.monorepo/llvm/lib/Bitcode/Reader/BitcodeReader.cpp:5367:26:
    warning: unused variable ‘BitCode’ [-Wunused-variable]
             switch (unsigned BitCode = MaybeBitCode.get()) {
                              ^ — hans / ViewSVN
  105. Fix GCC 4 build after r364464

    It was failing with:

    In file included from /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/lib/Bitcode/Reader/BitstreamReader.cpp:9:0:
    /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/include/llvm/Bitcode/BitstreamReader.h:
    In member function 'llvm::Expected<long unsigned int> llvm::SimpleBitstreamCursor::ReadVBR64(unsigned int)':
    /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/include/llvm/Bitcode/BitstreamReader.h:262:14:
    error: could not convert 'MaybeRead' from 'llvm::Expected<unsigned int>' to 'llvm::Expected<long unsigned int>'
           return MaybeRead;
                  ^
    /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/include/llvm/Bitcode/BitstreamReader.h:279:16:
    error: could not convert 'MaybeRead' from 'llvm::Expected<unsigned int>' to 'llvm::Expected<long unsigned int>'
             return MaybeRead;
                    ^ — hans / ViewSVN
  106. [clang] Add DISuprogram and DIE for a func decl

    Attach a unique DISubprogram to a function declaration that will be
    used for call site debug info.

    ([7/13] Introduce the debug entry values.)

    Co-authored-by: Ananth Sowda <asowda@cisco.com>
    Co-authored-by: Nikola Prica <nikola.prica@rt-rk.com>
    Co-authored-by: Ivan Baev <ibaev@cisco.com>

    Differential Revision: https://reviews.llvm.org/D60714 — djtodoro / ViewSVN

#18266 (Jun 27, 2019 5:21:13 PM)

  1. gn build: Follow-up to r364491 "[GN] Update build files"

    - Merge r364427 (GSYM lib) more: It was missing the new unit test
      (as pointed out by llvm/utils/gn/build/sync_source_lists_from_cmake.py),
      and it had some superfluous deps not present in the cmake build.

    - Merge r364474 (clang DependencyScanning lib) more: The deps didn't
      quite match cmake. — nico / ViewSVN
  2. [IR] Add DISuprogram and DIE for a func decl

    A unique DISubprogram may be attached to a function declaration used for
    call site debug info.

    ([6/13] Introduce the debug entry values.)

    Co-authored-by: Ananth Sowda <asowda@cisco.com>
    Co-authored-by: Nikola Prica <nikola.prica@rt-rk.com>
    Co-authored-by: Ivan Baev <ibaev@cisco.com>

    Differential Revision: https://reviews.llvm.org/D60713 — djtodoro / ViewSVN
  3. [X86] Remove (vzext_movl (scalar_to_vector (load))) matching code from selectScalarSSELoad.

    I think this will be turning into vzext_load during DAG combine. — ctopper / ViewSVN
  4. [X86] Teach selectScalarSSELoad to not narrow volatile loads. — ctopper / ViewSVN
  5. [InstCombine][NFCI] Fix test comments.

    For fold
    (X & (signbit l>> Y)) ==/!= 0 -> (X << Y) >=/< 0
    (X & (signbit << Y)) ==/!= 0 -> (X l>> Y) >=/< 0

    Test cases of X being constant are positive tests not negative.

    Prep work for D62818. — huihuiz / ViewSVN
  6. [NFC][PowerPC] Improve the for loop in Early Return

    Summary:

    In `PPCEarlyReturn.cpp`
    ```
    183       for (MachineFunction::iterator I = MF.begin(); I != MF.end();) {
    184         MachineBasicBlock &B = *I++;
    185         if (processBlock(B))
    186           Changed = true;
    187       }
    ```
    Above code can be improved to:
    ```
    184       for (MachineFunction::iterator I = MF.begin(), E = MF.end(); I != E;) {
    185         MachineBasicBlock &B = *I++;
    186         Changed |= processBlock(B);
    187       }
    ```

    Reviewed By: hfinkel

    Differential Revision: https://reviews.llvm.org/D63800 — zhangkang / ViewSVN
  7. [NFC] Return early for types with size zero — Vitaly Buka / ViewSVN

#18265 (Jun 27, 2019 9:43:28 AM)

  1. [GN] Fix check-llvm — Vitaly Buka / ViewSVN
  2. [NFC] Remove unneeded local variables — Vitaly Buka / ViewSVN
  3. [GN] Update build files — Vitaly Buka / ViewSVN

#18264 (Jun 26, 2019 8:37:22 PM)

  1. [ARM] Don't reserve R12 on Thumb1 as an emergency spill slot.

    The current implementation of ThumbRegisterInfo::saveScavengerRegister
    is bad for two reasons: one, it's buggy, and two, it blocks using R12
    for other optimizations.  So this patch gets rid of it, and adds the
    necessary support for using an ordinary emergency spill slot on Thumb1.

    (Specifically, I think saveScavengerRegister was broken by r305625, and
    nobody noticed for two years because the codepath is almost never used.
    The new code will also probably not be used much, but it now has better
    tests, and if we fail to emit a necessary emergency spill slot we get a
    reasonable error message instead of a miscompile.)

    A rough outline of the changes in the patch:

    1. Gets rid of ThumbRegisterInfo::saveScavengerRegister.
    2. Modifies ARMFrameLowering::determineCalleeSaves to allocate an
    emergency spill slot for Thumb1.
    3. Implements useFPForScavengingIndex, so the emergency spill slot isn't
    placed at a negative offset from FP on Thumb1.
    4. Modifies the heuristics for allocating an emergency spill slot to
    support Thumb1.  This includes fixing ExtraCSSpill so we don't try to
    use "lr" as a substitute for allocating an emergency spill slot.
    5. Allocates a base pointer in more cases, so the emergency spill slot
    is always accessible.
    6. Modifies ARMFrameLowering::ResolveFrameIndexReference to compute the
    right offset in the new cases where we're forcing a base pointer.
    7. Ensures we never generate a load or store with an offset outside of
    its frame object.  This makes the heuristics more straightforward.
    8. Changes Thumb1 prologue and epilogue emission so it never uses
    register scavenging.

    Some of the changes to the emergency spill slot heuristics in
    determineCalleeSaves affect ARM/Thumb2; hopefully, they should allow
    the compiler to avoid allocating an emergency spill slot in cases
    where it isn't necessary. The rest of the changes should only affect
    Thumb1.

    Differential Revision: https://reviews.llvm.org/D63677 — efriedma / ViewSVN
  2. [ObjC] Improve error message for a malformed objc-type-name

    If the type didn't exist, we used to emit a really bad error:

    t.m:3:12: error: expected ')'
    -(nullable NoSuchType)foo3;
               ^

    rdar://50925632 — epilk / ViewSVN
  3. Fix Bitcode/invalid.test

    On the armv8 bot the failure is slightly different in the number it prints. Don't check the numbers. This was caused by r364464. — jfb / ViewSVN
  4. [GWP-ASan] D63736 broke ARMv7/v8 sanitizer bots.

    Remove ARM32/ARM64 support for GWP-ASan due to a strange SEGV when
    running scudo's preinit.c test. Disabling to make the bots go green
    while investigating. — hctim / ViewSVN
  5. [cmake] Allow config.guess to be run with MSYS on Windows

    Summary:
    With r363420, config.guess can no longer be run with MSYS on Windows and this
    patch should be able to fix this particular case.

    Reviewers: compnerd

    Reviewed By: compnerd

    Subscribers: mgorny, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63834 — pzheng / ViewSVN
  6. [SCCP] Fix non-deterministic uselists of return values (DenseMap -> MapVector) — ghoflehner / ViewSVN
  7. Fix formatting after r364479

    The reflowing obscurs the functional changes, so here is a separate
    commit. — aaronpuchert / ViewSVN
  8. [Clang] Remove unused -split-dwarf and obsolete -enable-split-dwarf

    Summary:
    The changes in D59673 made the choice redundant, since we can achieve
    single-file split DWARF just by not setting an output file name.
    Like llc we can also derive whether to enable Split DWARF from whether
    -split-dwarf-file is set, so we don't need the flag at all anymore.

    The test CodeGen/split-debug-filename.c distinguished between having set
    or not set -enable-split-dwarf with -split-dwarf-file, but we can
    probably just always emit the metadata into the IR.

    The flag -split-dwarf wasn't used at all anymore.

    Reviewers: dblaikie, echristo

    Reviewed By: dblaikie

    Differential Revision: https://reviews.llvm.org/D63167 — aaronpuchert / ViewSVN
  9. [SLP] Look-ahead operand reordering heuristic.

    Summary: This patch introduces a new heuristic for guiding operand reordering. The new "look-ahead" heuristic can look beyond the immediate predecessors. This helps break ties when the immediate predecessors have identical opcodes (see lit test for an example).

    Reviewers: RKSimon, ABataev, dtemirbulatov, Ayal, hfinkel, rnk

    Reviewed By: RKSimon, dtemirbulatov

    Subscribers: rnk, rcorcs, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D60897 — vporpo / ViewSVN
  10. [InstCombine] change 'tmp' variable names; NFC

    I don't think there was anything going wrong here,
    but the auto-generating CHECK line script is known
    to have problems with 'TMP' because it uses that
    to match nameless values.

    This is a retry of rL364452. — spatel / ViewSVN
  11. Revert r363191 "[MS] Pretend constexpr variable template specializations are inline"

    The next Visual Studio update will fix this issue, and it doesn't make
    sense to implement this non-conforming behavior going forward. — rnk / ViewSVN
  12. [clang-scan-deps] Introduce the DependencyScanning library with the
    thread worker code and better error handling

    This commit extracts out the code that will powers the fast scanning
    worker into a new file in a new DependencyScanning library. The error
    and output handling is improved so that the clients can gather
    errors/results from the worker directly.

    Differential Revision: https://reviews.llvm.org/D63681 — arphaman / ViewSVN
  13. AMDGPU: Assert SPAdj is 0 — arsenm / ViewSVN
  14. PEI: Add default handling of spills to registers — arsenm / ViewSVN
  15. [UpdateTestChecks][NFC] Remove entries with same prefix

    Matching is 'lossy', triples with same prefix can be dropped.

    Differential Revision: https://reviews.llvm.org/D63732 — jsji / ViewSVN
  16. [AMDGPU] Fix Livereg computation during epilogue insertion

    The LivePhysRegs calculated in order to find a scratch register in the
    epilogue code wrongly uses 'LiveIns'. Instead, it should use the
    'Liveout' sets.  For the liveness, also considering the operands of
    the terminator (return) instruction which is the insertion point for
    the scratch-exec-copy instruction.

    Patch by Christudasan Devadasan — arsenm / ViewSVN
  17. [X86] Rework the logic in LowerBuildVectorv16i8 to make better use of any_extend and break false dependencies. Other improvements

    This patch rewrites the loop iteration to only visit every other element starting with element 0. And we work on the "even" element and "next" element at the same time. The "First" logic has been moved to the bottom of the loop and doesn't run on every element. I believe it could create dangling nodes previously since we didn't check if we were going to use SCALAR_TO_VECTOR for the first insertion. I got rid of the "First" variable and just do a null check on V which should be equivalent. We also no longer use undef as the starting V for vectors with no zeroes to avoid false dependencies. This matches v8i16.

    I've changed all the extends and OR operations to use MVT::i32 since that's what they'll be promoted to anyway. I've tried to use zero_extend only when necessary and use any_extend otherwise. This resulted in some improvements in tests where we are now able to promote aligned (i32 (extload i8)) to a 32-bit load.

    Differential Revision: https://reviews.llvm.org/D63702 — ctopper / ViewSVN
  18. [WebAssembly] Implement Address Sanitizer for Emscripten

    Summary:
    This diff enables address sanitizer on Emscripten.

    On Emscripten, real memory starts at the value passed to --global-base.

    All memory before this is used as shadow memory, and thus the shadow mapping
    function is simply dividing by 8.

    Reviewers: tlively, aheejin, sbc100

    Reviewed By: sbc100

    Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, cfe-commits, llvm-commits

    Tags: #clang, #llvm

    Differential Revision: https://reviews.llvm.org/D63742 — quantum / ViewSVN
  19. Make nrvo-string test more robust.

    The breakpoint locations were in places where clang doesn't actually
    emit a source location for and depend on the debugger's ability to
    move the breakpoint forward onto a line that is already in the
    function epilogue. In my testing older versions of LLDB fail to do
    that, so I'm modifying the test to force a break-able location by
    calling a noinline function.

    <rdar://problem/52079841> — Adrian Prantl / ViewSVN
  20. BitStream reader: propagate errors

    The bitstream reader handles errors poorly. This has two effects:

    * Bugs in file handling (especially modules) manifest as an "unexpected end of
       file" crash
    * Users of clang as a library end up aborting because the code unconditionally
       calls `report_fatal_error`

    The bitstream reader should be more resilient and return Expected / Error as
    soon as an error is encountered, not way late like it does now. This patch
    starts doing so and adopting the error handling where I think it makes sense.
    There's plenty more to do: this patch propagates errors to be minimally useful,
    and follow-ups will propagate them further and improve diagnostics.

    https://bugs.llvm.org/show_bug.cgi?id=42311
    <rdar://problem/33159405>

    Differential Revision: https://reviews.llvm.org/D63518 — jfb / ViewSVN
  21. [X86] Remove isTypePromotionOfi1ZeroUpBits and its helpers.

    This was trying to optimize concat_vectors with zero of setcc or
    kand instructions. But I think it produced the same code we
    produce for a concat_vectors with 0 even it it doesn't come from
    one of those operations. — ctopper / ViewSVN
  22. Print NULL as "(null)" in diagnostic message

    Summary:
    Passing a null pointer to the printf family for a %s format specifier leads to undefined behaviour. The tests currently expect (null). Explicitly test for a null pointer and provide the expected string.

    Authored By: andusy

    Reviewers: hubert.reinterpretcast, xingxue, jasonliu, daltenty, cebowleratibm

    Reviewed By: hubert.reinterpretcast

    Subscribers: arphaman, jsji, cfe-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63786 — xingxue / ViewSVN
  23. Fix some undefined behavior (excessive shift of signed value) in r364253 detected by ubsan — dblaikie / ViewSVN
  24. llvm-objcopy: silence warning introduced in r364296

    Change-Id: I306e866d497e55945fb3b471eb0727b63ad9e4b9 — nha / ViewSVN

#18263 (Jun 26, 2019 5:35:26 PM)

  1. Fix Wdocumentation warnings. NFCI. — rksimon / ViewSVN
  2. [X86][SSE] getFauxShuffleMask - handle OR(x,y) where x and y have no overlapping bits

    Create a per-byte shuffle mask based on the computeKnownBits from each operand - if for each byte we have a known zero (or both) then it can be safely blended.

    Fixes PR41545 — rksimon / ViewSVN
  3. Revert [InstCombine] change 'tmp' variable names; NFC

    This reverts r364452 (git commit 6083ae0b4a250c69f6d5b13b3742ee1fe5b878d5) — spatel / ViewSVN
  4. [X86][AVX] Add reduced test case for PR41545 — rksimon / ViewSVN
  5. Make AddLastArg() variadic and use it more. No behavior change. — nico / ViewSVN
  6. [InstCombine] change 'tmp' variable names; NFC

    I don't think there was anything going wrong here,
    but the auto-generating CHECK line script is known
    to have problems with 'TMP' because it uses that
    to match nameless values. — spatel / ViewSVN
  7. [AMDGPU] Fix for branch offset hardware workaround

    Summary:
    This fixes a hardware bug that makes a branch offset of 0x3f unsafe.
    This replaces the 32 bit branch with offset 0x3f to a 64 bit
    instruction that includes the same 32 bit branch and the encoding
    for a s_nop 0 to follow. The relaxer than modifies the offsets
    accordingly.

    Change-Id: I10b7aed99d651f8159401b01bb421f105fa6288e

    Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63494 — rtayl / ViewSVN
  8. Allow matching extend-from-memory with strict FP nodes

    This implements a small enhancement to https://reviews.llvm.org/D55506

    Specifically, while we were able to match strict FP nodes for
    floating-point extend operations with a register as source, this
    did not work for operations with memory as source.

    That is because from regular operations, this is represented as
    a combined "extload" node (which is a variant of a load SD node);
    but there is no equivalent using a strict FP operation.

    However, it turns out that even in the absence of an extload
    node, we can still just match the operations explicitly, e.g.
       (strict_fpextend (f32 (load node:$ptr))

    This patch implements that method to match the LDEB/LXEB/LXDB
    SystemZ instructions even when the extend uses a strict-FP node. — uweigand / ViewSVN
  9. [IndVars] Kill a redundant bit of debug output — reames / ViewSVN
  10. Fix builbots after r364427.

    I was using an iterator that was equal to the end of a collection. — gclayton / ViewSVN
  11. [WebAssembly] Omit wrap on i64x2.{shl,shr*} ISel when possible

    Summary:
    Since the WebAssembly SIMD shift instructions take i32 operands, we
    truncate the i64 operand to <2 x i64> shifts during ISel. When the i64
    operand is sign extended from i32, this CL makes it so the sign
    extension is dropped instead of a wrap instruction added.

    Reviewers: dschuff, aheejin

    Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63615 — tlively / ViewSVN
  12. [WebAssembly] Implement tail calls and unify tablegen call classes

    Summary:
    Implements direct and indirect tail calls enabled by the 'tail-call'
    feature in both DAG ISel and FastISel. Updates existing call tests and
    adds new tests including a binary encoding test.

    Reviewers: aheejin

    Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D62877 — tlively / ViewSVN
  13. Fix leaks in LLVMCreateDisasmCPUFeatures

    Differential Revision: https://reviews.llvm.org/D63795 — scott.linder / ViewSVN
  14. [clang-tidy] Generalize TransformerClangTidyCheck to take a rule generator.

    Summary: Tidy check behavior often depends on language and/or clang-tidy options. This revision allows a user of TranformerClangTidyCheck to pass rule _generator_ in place of a rule, where the generator takes both the language and clang-tidy options. Additionally, the generator returns an `Optional` to allow for the case where the check is deemed irrelevant/disable based on those options.

    Reviewers: gribozavr

    Subscribers: xazax.hun, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D63288 — ymandel / ViewSVN
  15. [InstCombine] simplify code for inserts -> splat; NFC — spatel / ViewSVN
  16. Fix build in shared lib mode.

    - The newly added GSYM misses LLVMBuild.txt. Add a barely one to pass
      the build. — hliao / ViewSVN
  17. [xray] Remove usage of procid_t

    Differential Revision: https://reviews.llvm.org/D61946 — aganea / ViewSVN

#18262 (Jun 26, 2019 12:45:19 PM)

  1. [InstCombine] regenerate test checks; NFC — spatel / ViewSVN
  2. [CodeGen] Improve formatting of jump tables (NFC)

    Split jump tables into individual lines and fix spacing. — evandro / ViewSVN
  3. [clang-tidy] Fix ClangTidyTest to initialize context before checks.

    Summary:
    Currently, `clang::tidy::test::runCheckOnCode()` constructs the check
    instances *before* initializing the ClangTidyContext. This ordering causes
    problems when the check's constructor accesses the context, for example, through
    `getLangOpts()`.

    This revision moves the construction to after the context initialization, which
    follows the pattern used in the clang tidy tool itself.

    Reviewers: gribozavr

    Subscribers: xazax.hun, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D63784 — ymandel / ViewSVN
  4. [X86][SSE] X86TargetLowering::isCommutativeBinOp - add PMULDQ

    Allows narrowInsertExtractVectorBinOp to reduce vector size instead of the more restricted SimplifyDemandedVectorEltsForTargetNode — rksimon / ViewSVN
  5. [NFC][InstCombine] Revisit one-use tests in shift-amount-reassociation-in-bittest.ll — lebedevri / ViewSVN
  6. [X86][SSE] X86TargetLowering::isCommutativeBinOp - add PCMPEQ

    Allows narrowInsertExtractVectorBinOp to reduce vector size — rksimon / ViewSVN
  7. [X86][SSE] X86TargetLowering::isBinOp - add PCMPGT

    Allows narrowInsertExtractVectorBinOp to reduce vector size — rksimon / ViewSVN
  8. [NFC][InstCombine] Add shift amount reassociation in bittest tests (PR42399)

    https://bugs.llvm.org/show_bug.cgi?id=42399
    https://rise4fun.com/Alive/kBb
    https://rise4fun.com/Alive/1SB — lebedevri / ViewSVN
  9. [X86] shouldScalarizeBinop - never scalarize target opcodes.

    We have (almost) no target opcodes that have scalar/vector equivalents - for now assume we can't scalarize them (we can add exceptions if we need to). — rksimon / ViewSVN
  10. Make CodeGen depend on ASTMatchers

    - Shared library builds are broken due to the missing dependency. — hliao / ViewSVN
  11. Add GSYM utility files along with unit tests.

    The full GSYM patch started with: https://reviews.llvm.org/D53379

    In that patch we wanted to split up getting GSYM into the LLVM code base so we are not committing too much code at once.

    This is a first in a series of patches where I only add the foundation classes along with complete unit tests. They provide the foundation for encoding and decoding a GSYM file.

    File entries are defined in llvm::gsym::FileEntry. This class splits the file up into a directory and filename represented by uniqued string table offsets. This allows all files that are referred to in a GSYM file to be encoded as 1 based indexes into a global file table in the GSYM file.

    Function information in stored in llvm::gsym::FunctionInfo. This object represents a contiguous address range that has a name and range with an optional line table and inline call stack information.

    Line table entries are defined in llvm::gsym::LineEntry. They store only address, file and line information to keep the line tables simple and allows the information to be efficiently encoded in a subsequent patch.

    Inline information is defined in llvm::gsym::InlineInfo. These structs store the name of the inline function, along with one or more address ranges, and the file and line that called this function. They also contain any child inline information.

    There are also utility classes for address ranges in llvm::gsym::AddressRange, and string table support in llvm::gsym::StringTable which are simple classes.

    The unit tests test all the APIs on these simple classes so they will be ready for the next patches where we will create GSYM files and parse GSYM files.

    Differential Revision: https://reviews.llvm.org/D63104 — gclayton / ViewSVN
  12. AMDGPU: Fix unused variable — arsenm / ViewSVN
  13. AMDGPU: Check MRI for callee saved regs instead of TRI

    This should the same, but MRI does allow dynamically changing the CSR
    set, although currently not used. — arsenm / ViewSVN
  14. [clang/DIVar] Emit the flag for params that have unmodified value

    Emit the debug info flag that indicates that a parameter has unchanged
    value throughout a function.

    ([5/13] Introduce the debug entry values.)

    Co-authored-by: Ananth Sowda <asowda@cisco.com>
    Co-authored-by: Nikola Prica <nikola.prica@rt-rk.com>
    Co-authored-by: Ivan Baev <ibaev@cisco.com>

    Differential Revision: https://reviews.llvm.org/D58035 — djtodoro / ViewSVN
  15. [OpenCL] Improve diagnostic for placement new

    Without an explicit declaration for placement new, clang would reject
    uses of placement new with "'default new' is not supported in OpenCL
    C++".  This may mislead users into thinking that placement new is not
    supported, see e.g. PR42060.

    Clarify that placement new requires an explicit declaration.

    Differential Revision: https://reviews.llvm.org/D63561 — svenvh / ViewSVN
  16. [InlineCost] cleanup calculations of Cost and Threshold

    Summary:
    Doing better separation of Cost and Threshold.
    Cost counts the abstract complexity of live instructions, while Threshold is an upper bound of complexity that inlining is comfortable to pay.
    There are two parts:
         - huge 15K last-call-to-static bonus is no longer subtracted from Cost
           but rather is now added to Threshold.

           That makes much more sense, as the cost of inlining (Cost) is not changed by the fact
           that internal function is called once. It only changes the likelyhood of this inlining
           being profitable (Threshold).

         - bonus for calls proved-to-be-inlinable into callee is no longer subtracted from Cost
           but added to Threshold instead.

    While calculations are somewhat different,  overall InlineResult should stay the same since Cost >= Threshold compares the same.

    Reviewers: eraman, greened, chandlerc, yrouban, apilipenko
    Reviewed By: apilipenko
    Tags: #llvm
    Differential Revision: https://reviews.llvm.org/D60740 — fedor.sergeev / ViewSVN
  17. [clangd] Added functionality for getting semantic highlights for variable and function declarations — jvikstrom / ViewSVN
  18. [X86][Codegen] X86DAGToDAGISel::matchBitExtract(): consistently capture lambdas by value — lebedevri / ViewSVN
  19. [X86] X86DAGToDAGISel::matchBitExtract(): pattern c: truncation awareness

    Summary:
    The one thing of note here is that the 'bitwidth' constant (32/64) was previously pessimistic.
    Given `x & (-1 >> (C - z))`, we were taking `C` to be `bitwidth(x)`, but in reality
    we want `(-1 >> (C - z))` pattern to mean "low z bits must be all-ones".
    And for that, `C` should be `bitwidth(-1 >> (C - z))`, i.e. of the shift operation itself.

    Last pattern D does not seem to exhibit any of these truncation issues.
    Although it has the opposite problem - if we extract low bits (no shift) from i64,
    and then truncate to i32, then we fail to shrink this 64-bit extraction into 32-bit extraction.

    Reviewers: RKSimon, craig.topper, spatel

    Reviewed By: RKSimon

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D62806 — lebedevri / ViewSVN
  20. [X86] X86DAGToDAGISel::matchBitExtract(): pattern b: truncation awareness

    Summary:
    (Not so) boringly identical to pattern a (D62786)
    Not yet sure how do deal with the last pattern c.

    Reviewers: RKSimon, craig.topper, spatel

    Reviewed By: RKSimon

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D62793 — lebedevri / ViewSVN
  21. [X86] X86DAGToDAGISel::matchBitExtract(): pattern a: truncation awareness

    Summary:
    Finally tying up loose ends here.

    The problem is quite simple:
    If we have pattern `(x >> start) &  (1 << nbits) - 1`,
    and then truncate the result, that truncation will be propagated upwards,
    into the `and`. And that isn't currently handled.

    I'm only fixing pattern `a` here,
    the same fix will be needed for patterns `b`/`c` too.

    I *think* this isn't missing any extra legality checks,
    since we only look past truncations. Similary, i don't think
    we can get any other truncation there other than i64->i32.

    Reviewers: craig.topper, RKSimon, spatel

    Reviewed By: craig.topper

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D62786 — lebedevri / ViewSVN
  22. Revert "r364412 [ExpandMemCmp][MergeICmps] Move passes out of CodeGen into opt pipeline."

    Breaks sanitizers:
        libFuzzer :: cxxstring.test
        libFuzzer :: memcmp.test
        libFuzzer :: recommended-dictionary.test
        libFuzzer :: strcmp.test
        libFuzzer :: value-profile-mem.test
        libFuzzer :: value-profile-strcmp.test — courbet / ViewSVN
  23. [HardwareLoops] NFC - move loop with irreducible control flow checking logic to HarewareLoopInfo. — shchenz / ViewSVN
  24. Fix the build after r364401

    It was failing with:

    /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/lib/Target/X86/X86ISelLowering.cpp:18772:66:
    error: call of overloaded 'makeArrayRef(<brace-enclosed initializer list>)' is ambiguous
         scaleShuffleMask<int>(Scale, makeArrayRef<int>({ 0, 2, 1, 3 }), Mask);
                                                                      ^
    /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/lib/Target/X86/X86ISelLowering.cpp:18772:66: note: candidates are:
    In file included from /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/include/llvm/CodeGen/MachineFunction.h:20:0,
                     from /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/include/llvm/CodeGen/CallingConvLower.h:19,
                     from /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/lib/Target/X86/X86ISelLowering.h:17,
                     from /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/lib/Target/X86/X86ISelLowering.cpp:14:
    /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/include/llvm/ADT/ArrayRef.h:480:15:
    note: llvm::ArrayRef<T> llvm::makeArrayRef(const std::vector<_RealType>&) [with T = int]
       ArrayRef<T> makeArrayRef(const std::vector<T> &Vec) {
                   ^
    /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/include/llvm/ADT/ArrayRef.h:485:37:
    note: llvm::ArrayRef<T> llvm::makeArrayRef(const llvm::ArrayRef<T>&) [with T = int]
       template <typename T> ArrayRef<T> makeArrayRef(const ArrayRef<T> &Vec) {
                                         ^ — hans / ViewSVN
  25. [clangd] Disable failing unittest on non-x86 platforms — kadircet / ViewSVN