collapse
100%
WDescription%
Build stability: No recent builds failed.100
Build History
x
 
 
 
 
 
 
 
 
 x
 
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems

Changes

#4181 (Jul 23, 2019 7:22:45 PM)

  1. [AArch64] Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=off builds after r366857 — maskray / ViewSVN
  2. [SafeStack] Insert the deref before remaining elements

    This is a follow up to D64971. While we need to insert the deref after
    the offset, it needs to come before the remaining elements in the
    original expression since the deref needs to happen before the LLVM
    fragment if present.

    Differential Revision: https://reviews.llvm.org/D65172 — phosek / ViewSVN
  3. [Remarks] String tables should be move-only

    Copying them is expensive. This allows the tables to be moved around at
    lower cost, and allows a remarks::StringTable to be constructed from
    a remarks::ParsedStringTable. — thegameg / ViewSVN
  4. [FileCheck] Use ASSERT for fatal unit tests

    Summary:
    A number of EXPECT statements in FileCheck's unit tests are dependent
    from results of other values being tested. This commit changes those
    earlier test to use ASSERT instead of EXPECT to avoid cascade errors
    when they are all related to the same issue.

    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/D64921 — thopre / ViewSVN
  5. [FileCheck]] Canonicalize caret location testing

    Summary:
    Testing of caret location in diagnostic message is currently made with
    CHECK directive with the following general format:
    CHECK: {{^         \^$}}

    James Henderson suggested the following would be more readable:
    CHECK: {{^}}         ^{{$}}

    and when whole lines can be matched (as is the case for command-line
    testing where error messages do not include path):
    CHECK:         ^
    using the option --match-full-lines.

    This commit implements these 2 changes on all existing caret position
    tests. It also aligns the caret to the character it is trying to match
    in the above line.

    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/D64923 — thopre / ViewSVN
  6. FileCheck [8/12]: Define numeric var from expr

    Summary:
    This patch is part of a patch series to add support for FileCheck
    numeric expressions. This specific patch lift the restriction for a
    numeric expression to either be a variable definition or a numeric
    expression to try to match.

    This commit allows a numeric variable to be set to the result of the
    evaluation of a numeric expression after it has been matched
    successfully. When it happens, the variable is allowed to be used on
    the same line since its value is known at match time.

    It also makes use of this possibility to reuse the parsing code to
    parse a command-line definition by crafting a mirror string of the
    -D option with the equal sign replaced by a colon sign, e.g. for option
    '-D#NUMVAL=10' it creates the string
    '-D#NUMVAL=10 (parsed as [[#NUMVAL:10]])' where the numeric expression
    is parsed to define NUMVAL. This result in a few tests needing updating
    for the location diagnostics on top of the tests for the new feature.

    It also enables empty numeric expression which match any number without
    defining a variable. This is done here rather than in commit #5 of the
    patch series because it requires to dissociate automatic regex insertion
    in RegExStr from variable definition which would make commit #5 even
    bigger than it already is.

    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/D60388 — thopre / ViewSVN
  7. [DWARF] Use 32-bit format specifier for offset

    This should fix PR42730. — Jonas Devlieghere / ViewSVN
  8. [AArch64][GlobalISel] Add support for s128 loads, stores, extracts, truncs.

    We need to be able to load and store s128 for memcpy inlining, where we want to
    generate Q register mem ops. Making these legal also requires that we add some
    support in other instructions. Regbankselect should also know about these since
    they have no GPR register class that can hold them, so need special handling to
    live on the FPR bank.

    Differential Revision: https://reviews.llvm.org/D65166 — aemerson / ViewSVN
  9. Fix "control reaches end of non-void function" warning. NFCI. — rksimon / ViewSVN
  10. [docs] Clarify where the indirect UB due to write-write races comes from

    This is based on https://bugs.llvm.org/show_bug.cgi?id=42435#c3.

    Patch by Ralf Jung. — efriedma / ViewSVN
  11. [GlobalISel][AArch64] Save a copy on G_SELECT by fixing condition to GPR

    The condition can never be fed by FPRs, so it should always be on a GPR.

    Differential Revision: https://reviews.llvm.org/D65157 — paquette / ViewSVN
  12. [ARM] Add opt-bisect support to ARMParallelDSP. — efriedma / ViewSVN
  13. [Remarks] Introduce a new format: yaml-strtab

    This exposes better support to use a string table with a format through
    an actual new remark::Format, called yaml-strtab.

    This can now be used with -fsave-optimization-record=yaml-strtab. — thegameg / ViewSVN
  14. [Remarks][NFC] Move the YAML serializer to its own header — thegameg / ViewSVN
  15. [PowerPC] Remove redundant load immediate instructions

    Currently PowerPC backend emits code like this:

      r3 = li 0
      std r3, 264(r1)
      r3 = li 0
      std r3, 272(r1)

    This patch fixes that and other cases where a register already contains a value that is loaded so we will get:

      r3 = li 0
      std r3, 264(r1)
      std r3, 272(r1)

    Differential Revision: https://reviews.llvm.org/D64220 — yi-hong.lyu / ViewSVN
  16. gn build: Merge r366832 — nico / ViewSVN
  17. ld.lld: Demangle symbols from archives in diagnostics

    This ports r366573 from COFF to ELF.

    There are now to toString(Archive::Symbol), one doing MSVC demangling
    in COFF and one doing Itanium demangling in ELF, so rename these two
    to toCOFFString() and to toELFString() to not get a duplicate symbol.

    Nothing ever passes a raw Archive::Symbol to CHECK(), so these not
    being part of the normal toString() machinery seems ok.

    There are two code paths in the ELF linker that emits this type of
    diagnostic:

    1. The "normal" one in InputFiles.cpp. This is covered by the tweaked test.

    2. An additional one that's only used for libcalls if there's at least
       one bitcode in the link, and if the libcall symbol is lazy, and
       lazily loaded from an archive (i.e. not from a lazy .o file).
       (This code path was added in r339301.) Since all libcall names so far
       are C symbols and never mangled, the change there is not observable
       and hence not covered by tests.

    Differential Revision: https://reviews.llvm.org/D65095 — nico / ViewSVN
  18. [X86] In lowerVectorShuffle, instead of creating a new node to canonicalize the shuffle mask by commuting, just commute the mask and swap V1/V2.

    LegalizeDAG tries to legal the DAG by legalizing nodes before
    their operands.

    If we create a new node, we end up legalizing it after its operands.
    This prevents some of the optimizations that can be done when the
    operand is a build_vector since the build_vector will have been
    legalized to something else.

    Differential Revision: https://reviews.llvm.org/D65132 — ctopper / ViewSVN
  19. [libFuzzer] Fix __sanitizer_print_memory_profile return type in ExtFunctions.def

    Summary:
    Looks like a typo, as that function actually returns void and is used
    as such in libFuzzer code as well.

    Reviewers: kcc, Dor1s

    Reviewed By: Dor1s

    Subscribers: delcypher, #sanitizers, llvm-commits

    Tags: #llvm, #sanitizers

    Differential Revision: https://reviews.llvm.org/D65160 — dor1s / ViewSVN
  20. [Remarks] Add unit tests for YAML serialization

    Add tests for both the string table and non string table case. — thegameg / ViewSVN
  21. 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
  22. [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
  23. 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
  24. [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
  25. [RISCV][NFC] Correct RUN in rvi-pseudos-invalid.s

    This test should test both riscv32 and riscv64. — lenary / ViewSVN
  26. [clang][NFCI] Fix random typos — Jan Korous / ViewSVN

#4180 (Jul 23, 2019 9:34:52 AM)

  1. [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
  2. [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
  3. [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
  4. [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
  5. [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
  6. [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
  7. 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
  8. [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
  9. [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
  10. [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
  11. Fix MSVC warning about extending a uint32_t shift result to uint64_t. NFCI. — rksimon / ViewSVN
  12. [SLPVectorizer] Revert local change that got accidently got committed in rL366799

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

    This reverts r366797 (git commit 53f9fec8e8b58f5a904bbfb4a1d648cde65aa860) — lenary / ViewSVN
  14. [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
  15. [NFC][InstCombine] Fixup commutative/negative tests with icmp preds in @llvm.umul.with.overflow tests — lebedevri / ViewSVN
  16. [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
  17. [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
  18. [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
  19. [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
  20. [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
  21. [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
  22. [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
  23. PlistDiagnostics Fix for compile warning (NFC). — balazske / ViewSVN
  24. [ARM] Rename NEONModImm to VMOVModImm. NFC

    Rename NEONModImm to VMOVModImm as it is used in both NEON and MVE. — dmgreen / ViewSVN
  25. [Attributor][NFC] Re-run clang-format on the Attributor.cpp — uenoku / ViewSVN
  26. [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
  27. [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
  28. Fix gold-plugin Windows build

    r365588 missed one instance of integer file descriptor use in
    gold-plugin.cpp. — kongyi / ViewSVN
  29. [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
  30. [test] Fix the test from the previous commit when run on windows. NFC.

    Apparently the escaped dollar sign didn't work the same way in "echo -e"
    on windows buildbots. — mstorsjo / ViewSVN
  31. [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

#4179 (Jul 23, 2019 12:03:10 AM)

  1. [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
  2. [COFF] Unbreak sorting of mingw comdat .tls sections after SVN r363457

    Code built for mingw with -fdata-sections will store each TLS variable
    in a comdat section, named .tls$$<varname>. Normal TLS variables are
    stored in sections named .tls$ with a trailing dollar, which are
    sorted after a starter marker (in a later linked object file) in a
    section named ".tls" (with no dollar suffix), before an ending marker
    in a section named ".tls$ZZZ".

    The mingw comdat section suffix stripping introduced in SVN r363457
    broke sorting of such tls sections, ending up sorting the stripped
    .tls$$<varname> sections (stripped to ".tls") before the start marker
    in the section named ".tls".

    We could add exceptions to the section name suffix stripping for
    .tls (and .CRT, where suffixes always should be honored), but the
    more conservative option is probably the reverse; to only apply the
    stripping for the normal sections where sorting shouldn't have any
    effect.

    Differential Revision: https://reviews.llvm.org/D65018 — mstorsjo / ViewSVN
  3. [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
  4. [DAGCombiner] Use SDNode::isOperandOf to simplify some code. NFCI — ctopper / ViewSVN
  5. [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
  6. 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
  7. [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
  8. Inline function call into assert to fix unused variable warning. — rtrieu / ViewSVN
  9. 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
  10. [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
  11. 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
  12. [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
  13. Fix pointer width in test from r366754. — pcc / ViewSVN
  14. gn build: Wrap two comments to 80 columns — nico / ViewSVN
  15. [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
  16. [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
  17. [Statepoints] Add a test which shows a miscompile with no-realign-stacks — reames / ViewSVN
  18. Revert "Fixing build error from commit 9285295."

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

    (follow-up to r365162) — dblaikie / ViewSVN
  20. 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
  21. 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
  22. [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
  23. [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
  24. [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
  25. [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
  26. [InstCombine][NFC] Tests for canonicalization of unsigned multiply overflow check — lebedevri / ViewSVN
  27. [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
  28. [IndVarSimplify][NFC] Autogenerate check lines in loop_evaluate_1.ll

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

    rdar://53267670

    Differential Revision: https://reviews.llvm.org/D65116 — Vedant Kumar / ViewSVN
  30. 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

#4178 (Jul 22, 2019 2:11:02 PM)

  1. [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
  2. Temporarily Revert "[Attributor] Liveness analysis." as it's breaking the build.

    This reverts commit 9285295f75a231dc446fa7cbc10a0a391b3434a5. — echristo / ViewSVN
  3. [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
  4. [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
  5. [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
  6. [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
  7. [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
  8. [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
  9. [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
  10. 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
  11. [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
  12. 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
  13. [PowerPC] Fix comment on MO_PLT Target Operand Flag. [NFC]

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

    Differential Revision: https://reviews.llvm.org/D60885 — sfertile / ViewSVN
  15. 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
  16. Changes to emit CodeView debug info nested type records properly using MCStreamer directives — nilanjana_basu / ViewSVN
  17. 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
  18. [AMDGPU] Test update. NFC. — rampitec / ViewSVN
  19. [SLPVectorizer] Fix some MSVC/cppcheck uninitialized variable warnings. NFCI. — rksimon / ViewSVN
  20. 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
  21. [OPENMP][MSVC]Enable /openmp[:experimental] to compile OpenMP.

    Mapped /openmp[:experimental] to -fopenmp option and /openmp- option to
    -fno-openmp — abataev / ViewSVN
  22. [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
  23. [X86] Remove const from some intrinsics that shouldn't have them — probinson / ViewSVN
  24. [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
  25. [Polly] Clang complains about missing virtual destructor

    Summary: Feel free to reassign if needed.

    Reviewers: mhalk, bollu, jdoerfert

    Reviewed By: jdoerfert

    Subscribers: jdoerfert, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64786 — gchatelet / ViewSVN
  26. Update c++2a status page with post-Cologne information — marshall / ViewSVN
  27. 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
  28. [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
  29. [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
  30. [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
  31. AMDGPU/GlobalISel: Fix broken tests — arsenm / ViewSVN
  32. 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
  33. 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
  34. AMDGPU/GlobalISel: Remove unnecessary code

    The minnum/maxnum case are dead, and the cvt is handled by the
    default. — arsenm / ViewSVN
  35. [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
  36. 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
  37. Revert the change to the [[nodiscard]] feature test macro value.

    This value only gets bumped once both P1301 and P1771 are implemented. — aaronballman / ViewSVN
  38. [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
  39. 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
  40. 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
  41. [X86][SSE] Add EltsFromConsecutiveLoads test case identified in rL366501

    Test case that led to rL366441 being reverted at rL366501 — rksimon / ViewSVN
  42. [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
  43. [ARM][test] Improve tests

    Delete trailing 2>&1 that is not piped to another command.
    Add --no-show-raw-insn to objdump -d commands. — maskray / ViewSVN
  44. [clangd] Set buffer name for main file. NFCI — sammccall / ViewSVN
  45. [clangd] Log input code of failed highlighting tests. NFC — ibiryukov / ViewSVN
  46. [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
  47. 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
  48. [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
  49. [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
  50. [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
  51. [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
  52. [PowerPC][NFC] Precommit a test case where ppc-mi-peepholes miscompiles extswsli

    Added a test case to show codegen differences. — lkail / ViewSVN
  53. [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
  54. [utils] Clean up UpdateTestChecks/common.py — maskray / ViewSVN
  55. [analyzer] Fix -Wunused-function in NDEBUG builds with #ifdef LLVM_DUMP_METHOD — maskray / ViewSVN
  56. [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

#4177 (Jul 21, 2019 4:54:07 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
  2. [X86] SimplifyDemandedVectorEltsForTargetNode - Move SUBV_BROADCAST narrowing handling. NFCI.

    Move the narrowing of SUBV_BROADCAST to where we handle all the other opcodes. — rksimon / ViewSVN
  3. [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
  4. [InstCombine] Update comment I missed in r366649. NFC — ctopper / ViewSVN
  5. [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
  6. [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
  7. [ARM] Move MVE VPT block tests into the Thumb2 directory. NFC — dmgreen / ViewSVN

#4176 (Jul 21, 2019 4:45:00 AM)

  1. [NFC][InstCombine] Add a few extra srem-by-power-of-two tests - extra uses — lebedevri / ViewSVN
  2. [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
  3. [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

#4175 (Jul 20, 2019 6:24:28 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
  3. [ELF] Support explicitly overriding relocation model in LTO

    lld currently selects the relocation model automatically depending on
    the link flags specified, but in some cases it'd be useful to allow
    explicitly overriding the relocation model using a flag. — phosek / ViewSVN
  4. [NFC][InstCombine] Autogenerate a few tests — lebedevri / ViewSVN
  5. [NFC][InstCombine] Add srem-by-signbit tests - still can fold to bittest

    https://rise4fun.com/Alive/IIeS — lebedevri / ViewSVN
  6. [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
  7. 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
  8. [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
  9. [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

#4174 (Jul 20, 2019 6:23:54 AM)

  1. Fix cppcheck reduce scope variable warnings. NFCI

    Move a couple of variables inside the block where they are actually needed. — rksimon / ViewSVN
  2. 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
  3. [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
  4. Fix asan infinite loop on undefined symbol

    Fix llvm#39641

    Recommit of r366413

    Differential Revision: https://reviews.llvm.org/D63877 — serge_sans_paille / ViewSVN
  5. [c++20] P1161R3: a[b,c] is deprecated. — rsmith / ViewSVN
  6. Mark P1301R4 in C++2a as being SVN instead. — aaronballman / ViewSVN
  7. We support P1301R4 in C++2a as of r366626. — aaronballman / ViewSVN
  8. [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
  9. 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

#4173 (Jul 19, 2019 8:27:19 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
  7. [AMDGPU] Autogenerate register sequences in tuples

    Differential Revision: https://reviews.llvm.org/D65007 — rampitec / ViewSVN
  8. 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
  9. 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
  10. [AMDGPU] Fixed occupancy calculation for gfx10

    Differential Revision: https://reviews.llvm.org/D65010 — rampitec / ViewSVN
  11. 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
  12. [InstCombine] Fix copy/paste mistake in the test cases I added for PR42691. NFC — ctopper / ViewSVN
  13. AMDGPU: Avoid custom predicates for stores with glue — arsenm / ViewSVN
  14. 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
  15. [InstCombine] Add test cases for PR42691. NFC — ctopper / ViewSVN
  16. 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
  17. AMDGPU: Redefine setcc condition PatLeafs

    Avoid using custom code predicates. — arsenm / ViewSVN
  18. 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
  19. 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
  20. [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
  21. 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
  22. 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
  23. [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
  24. [libc++] Allow passing additional CMake arguments in macOS trunk CI script — Louis Dionne / ViewSVN
  25. 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
  26. [RISCV] Disable tests failing on buildbots.

    r366399 enabled a couple tests that are failing on a few buildbots. — morehouse / ViewSVN
  27. [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
  28. AMDGPU/GlobalISel: Fix MMO flags for kernel argument loads

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

    I don't need this at the moment, but it should be here. — arsenm / ViewSVN
  30. [llvm-lipo] Remove trailing whitespace. NFC — smeenai / ViewSVN
  31. [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
  32. [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
  33. AMDGPU: Add some function return test cases — arsenm / ViewSVN
  34. [AMDGPU] Regenerate test file for upcoming patch. NFCI. — rksimon / ViewSVN

#4172 (Jul 19, 2019 8:17:58 AM)

  1. [libc++] Use _EnableIf instead of std::enable_if in deduction guides for map and set — Louis Dionne / ViewSVN
  2. [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
  3. Fix asan infinite loop on undefined symbol

    Fix llvm#39641

    Recommit of r366413

    Differential Revision: https://reviews.llvm.org/D63877 — serge_sans_paille / ViewSVN
  4. 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
  5. AMDGPU/GlobalISel: Selection for fminnum/fmaxnum

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

    Handles structs used directly in argument lists. — arsenm / ViewSVN
  7. 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
  8. [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
  9. 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
  10. [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
  11. gn build: Set +x on symlink_or_copy.py — nico / ViewSVN
  12. [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
  13. 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
  14. lld-link: Demangle symbols from archives in diagnostics

    Also add test coverage for thin archives (which are the only way I could
    come up with to test at least some of the diagnostic changes).

    Differential Revision: https://reviews.llvm.org/D64927 — nico / ViewSVN
  15. [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
  16. [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
  17. [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
  18. [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
  19. [Clangd] Fixed ExtractVariable test — sureyeaah / ViewSVN
  20. [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
  21. [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
  22. Fix MSVC "result of 32-bit shift implicitly converted to 64 bits" warning. NFCI. — rksimon / ViewSVN

#4171 (Jul 19, 2019 4:17:58 AM)

  1. [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
  2. [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
  3. 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
  4. 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
  5. [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
  6. [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
  7. [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
  8. 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
  9. [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
  10. [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
  11. [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
  12. [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
  13. [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
  14. [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
  15. [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
  16. [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
  17. [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
  18. [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
  19. [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
  20. [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
  21. [ELF][test] Fix aarch64-condb-reloc.s — maskray / ViewSVN
  22. [NFC] Fix an indentation issue in llvm/Support/TargetRegistry.h — hubert.reinterpretcast / ViewSVN
  23. [ELF][AArch64] Improve some aarch64-*.s tests

    * Delete aarch64-tls-static.s: it is covered by aarch64-tlsdesc.c
    * Add --no-show-raw-insn to llvm-objdump -d tests
    * When linking an executable with %t.so, the path %t.so will be recorded in the DT_NEEDED entry if %t.so doesn't have DT_SONAME. The DT_NEEDED has varying lengths on different systems.
      Add -soname to make tests more robust. This issue will become outstanding if we allow overlapping PT_LOAD (D64930). — maskray / ViewSVN
  24. [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
  25. unbreak links — lattner / ViewSVN
  26. replace the old kaleidoscope tutorial files with orphaned pages that forward to the new copy. — lattner / ViewSVN
  27. Point to the dusted off version of the kaleidoscope tutorial. — lattner / ViewSVN
  28. [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
  29. [NFC][PowerPC] Modify the test case add_cmp.ll — zhangkang / ViewSVN
  30. [libFuzzer] Set Android specific ALL_FUZZER_SUPPORTED_ARCH

    Build libFuzzer for all Android supported architectures. — kongyi / ViewSVN
  31. [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
  32. 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
  33. 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
  34. [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
  35. [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
  36. [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
  37. 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
  38. Update the SimpleJIT class in the clang-interpreter example to use ORCv2.

    This will remove the ORCv1 deprecation warnings. — Lang Hames / ViewSVN
  39. Update polly test for SCEV change.

    r366419 adds nsw to more SCEV expressions, which allows polly to
    make more aggressive assumptions about the input expressions. — efriedma / ViewSVN
  40. [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
  41. [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
  42. [WebAssembly] Use passive segments by default when memory is shared

    Summary:
    This change makes it so that passing --shared-memory is all a user
    needs to do to get proper multithreaded code. This default can still
    be explicitly overridden for any reason using --passive-segments and
    --active-segments.

    Reviewers: sbc100, quantum

    Subscribers: dschuff, jgravelle-google, aheejin, sunfish, jfb, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64950 — tlively / ViewSVN
  43. [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
  44. 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
  45. 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
  46. [WebAssembly] fix bug in finding .tdata segment

    Summary: Fix bug in `wasm-ld`'s `Writer::createInitTLSFunction` that only finds `.tdata` if it's the first section.

    Reviewers: tlively, aheejin, sbc100

    Reviewed By: sbc100

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64947 — quantum / ViewSVN
  47. [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
  48. [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
  49. Fix typo in r366494. Spotted by Yuanfang Chen. — pcc / ViewSVN
  50. 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
  51. 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
  52. [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
  53. gn build: Merge r366458. — pcc / ViewSVN
  54. 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
  55. [ORC] Suppress an ORCv1 deprecation warning. — Lang Hames / ViewSVN
  56. [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
  57. [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
  58. [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
  59. Fix C++ modules build

    llvm-svn: 366344 missed an include that broke the LLVM_ENABLE_MODULES
    build. — Raphael Isemann / ViewSVN
  60. [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
  61. [COFF] Change a variable type to be const in the HeapAllocSite map. — akhuang / ViewSVN
  62. [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
  63. [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
  64. [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
  65. [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
  66. 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
  67. [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
  68. [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
  69. [clangd] Remove dead code from BackgroundIndex — kadircet / ViewSVN
  70. [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
  71. ELF: Add support for remaining R_AARCH64_MOVW* relocations.

    Differential Revision: https://reviews.llvm.org/D64685 — pcc / ViewSVN
  72. [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
  73. ELF: Simplify test. NFCI.

    Avoid splitting the test into multiple files and use zero for the value of
    the symbol with addends at relocations so that it's clear what value is
    being used at relocations.

    Differential Revision: https://reviews.llvm.org/D64684 — pcc / ViewSVN
  74. MC: AArch64: Add support for prel_g* relocation specifiers.

    Differential Revision: https://reviews.llvm.org/D64683 — pcc / ViewSVN
  75. 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
  76. ELF: Allow forward references to linked sections.

    It's possible to create IR that uses !associated to refer to a global that
    appears later in the module, which can result in these types of forward
    references being generated. Unfortunately our assembler does not currently
    accept the resulting .s so I needed to use yaml2obj to test this.

    Differential Revision: https://reviews.llvm.org/D64880 — pcc / ViewSVN
  77. [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
  78. [ASTUnit] Attempt to unbreak Windows buildbots after r366448 — ibiryukov / ViewSVN
  79. Minor styling fix. NFC. — hliao / ViewSVN
  80. [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
  81. Revert "[RISCV] Hard float ABI support" r366450

    The commit was missing a few hunks. Will fix and recommit. — asb / ViewSVN
  82. 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
  83. [Clangd] NFC: Fixed tweaks CMakeLists order to alphabetical — sureyeaah / ViewSVN
  84. [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
  85. [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
  86. [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
  87. [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
  88. [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
  89. [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
  90. [ELF][PPC] Delete ppc64-dynamic-relocations.s

    I forgot to delete it in r366424. — maskray / ViewSVN
  91. Revert "[DebugInfo] Generate fixups as emitting DWARF .debug_frame/.eh_frame."

    This reverts commit 17e3cbf5fe656483d9016d0ba9e1d0cd8629379e. — hsiangkai / ViewSVN
  92. [clangd] Disable DumpRecordLayout by default per https://bugs.llvm.org/show_bug.cgi?id=42670 — sammccall / ViewSVN
  93. [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
  94. [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
  95. [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
  96. [OPENMP][NVPTX]Mark barrier functions calls as convergent.

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

    NFC step towards reusing this in other EXTRACT_SUBVECTOR combines. — rksimon / ViewSVN
  99. [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
  100. Relax regexp to detect failed interception by asan

    This should fix failed detection on aarch64/ppc64/thumbv8... — serge_sans_paille / ViewSVN
  101. [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
  102. [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
  103. 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
  104. Bump the trunk version to 10.0.0svn

    and clear the release notes. — hans / ViewSVN
  105. [ELF][PPC] Refactor some ppc64 tests

    Merge ppc64-dynamic-relocations.s into ppc64-plt-stub.s
    Add ppc64-tls-ie.s: covers ppc64-initial-exec-tls.s and ppc64-tls-ie-le.s
    Add ppc64-tls-gd.s: covers ppc64-general-dynamic-tls.s, ppc64-gd-to-ie.s, ppc64-tls-gd-le.s, and ppc64-tls-gd-le-small.s — maskray / ViewSVN
  106. [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
  107. [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
  108. [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
  109. [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
  110. [SCEV] add no wrap flag for SCEVAddExpr.
    Differential Revision: https://reviews.llvm.org/D64868 — shchenz / ViewSVN
  111. [lld] Fix vs-diagnostics-version-script test. NFC.

    Removed unnecessary llvm-mc call. — chrisj / ViewSVN
  112. [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
  113. Fixup r366333 (require x86 in test)

    Seems to be required for the other added tests too. — rovka / ViewSVN
  114. Fix asan infinite loop on undefined symbol

    Fix llvm#39641

    Differential Revision: https://reviews.llvm.org/D63877 — serge_sans_paille / ViewSVN
  115. [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
  116. [LoopInfo] Use early return in branch weight update functions. NFC. — skatkov / ViewSVN
  117. [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
  118. [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
  119. clang-tidy release notes: Split and order changes by type

    Patch by Eugene Zelenko! — hans / ViewSVN
  120. [NFC][PowerPC] Add the test to test the pass block-placement — zhangkang / ViewSVN
  121. [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
  122. [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
  123. Fix typo in programmer's manual cantFile -> cantFail — lanza / ViewSVN
  124. [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
  125. [ELF][test] Merge/rename some basic*.s tests

    basic64be.s is a big-endian powerpc64 test that just duplicates what
    basic-ppc64.s does. Extend basic-ppc64.s to add big-endian tests.
    Delete basic64be.s

    Rename basic32.s to basic-i386.s — maskray / ViewSVN
  126. [clangd] Fix Fix -Wunused-lambda-capture after r366339 — maskray / ViewSVN
  127. [RISCV] Re-land r366331 d RISCV to LLVM_ALL_TARGETS

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

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

    Issue found by ASan. — asb / ViewSVN
  130. [AArch64] Add dependency from AArch64CodeGen to TransformUtils to fix -DBUILD_SHARED_LIBS=on link error after D64173/r366361

    This fixes:

    ld.lld: error: undefined symbol: llvm::findAllocaForValue(llvm::Value*, llvm::DenseMap<llvm::Value*, llvm::Alloc aInst*, llvm::DenseMapInfo<llvm::Value*>, llvm::detail::DenseMapPair<llvm::Value*, llvm::AllocaInst*> >&)
    >>> referenced by AArch64StackTagging.cpp — maskray / ViewSVN
  131. [Tests] Add a test showing how we handle overaligned allocas w/ no-realign-stack

    (At the moment, we ignore the alignment requirement.) — reames / ViewSVN
  132. [analyzer] MallocChecker: Prevent Integer Set Library false positives

    Summary:
    Integer Set Library using retain-count based allocation which is not
    modeled in MallocChecker.

    Reviewed By: NoQ

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64680 — charusso / ViewSVN
  133. Changes to display code view debug info type records in hex format — nilanjana_basu / ViewSVN
  134. hwasan: Use C++ driver for cfi.cc test.

    It turns out that this test was only passing by accident. It was relying on
    the optimizer to remove the only reference to A's vtable by realizing that
    the CFI check will always fail. The vtable contains a reference to RTTI in
    libc++, which will be unresolved because the C driver won't link against it.

    This was found by my prototype implementation of HWASAN for globals, which
    happens to end up preserving the reference.

    Differential Revision: https://reviews.llvm.org/D64890 — pcc / ViewSVN
  135. Make DT a transitive dependency of LI.

    Summary:
    LoopInfoWrapperPass::verify uses DT, which means DT must be alive
    even if it has no direct users.

    Fixes a crash in expensive checks mode.

    Reviewers: pcc, leonardchan

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64896 — eugenis / ViewSVN
  136. [llvm-bcanalyzer] Fixed error 'Expected<T> must be checked before access or destruction'

    After rL365286 I had failing test:
      LLVM :: tools/gold/X86/v1.12/thinlto_emit_linked_objects.ll

    It was failing with the output:
    $ llvm-bcanalyzer --dump llvm/test/tools/gold/X86/v1.12/Output/thinlto_emit_linked_objects.ll.tmp3.o.thinlto.bc
    Expected<T> must be checked before access or destruction.
    Unchecked Expected<T> contained error:
    Unexpected end of file reading 0 of 0 bytesStack dump:

    Change-Id: I07e03262074ea5e0aae7a8d787d5487c87f914a2 — dendibakh / ViewSVN
  137. llvm-pdbdump: Fix several smaller issues with injected source compression handling

    - getCompression() used to return a PDB_SourceCompression even though
      the docs for IDiaInjectedSource are explicit about the return value
      being compiler-dependent. Return an uint32_t instead, and make the
      printing code handle unknown values better by printing "Unknown" and
      the int value instead of not printing any compression.

    - Print compressed contents as hex dump, not as string.

    - Add compression type "DotNet", which is used (at least) by csc.exe,
      the C# compiler. Also add a lengthy comment describing the stream
      contents (derived from looking at the raw hex contents long enough
      to see the GUIDs, which led me to the roslyn and mono implementations
      for handling this).

    - The native injected source dumper was dumping the contents of the
      whole data stream -- but csc.exe writes a stream that's padded with
      zero bytes to the next 512 boundary, and the dia api doesn't display
      those padding bytes. So make NativeInjectedSource::getCode() do the
      same thing.

    Differential Revision: https://reviews.llvm.org/D64879 — nico / ViewSVN
  138. [AMDGPU] Simplify AMDGPUInstPrinter::printRegOperand()

    Differential Revision: https://reviews.llvm.org/D64892 — rampitec / ViewSVN
  139. AMDGPU: Set inaccessiblememonly on sendmsg intrinsics — arsenm / ViewSVN
  140. [X86] Make sure we mark 128/256 MLOAD as Legal with VLX when min-legal-vector-width=256 is in effect.

    This started triggering an assertion after r364718 when we made
    these Custom under AVX2. — ctopper / ViewSVN
  141. gn build: Merge r366361. — pcc / ViewSVN
  142. hwasan: Initialize the pass only once.

    This will let us instrument globals during initialization. This required
    making the new PM pass a module pass, which should still provide access to
    analyses via the ModuleAnalysisManager.

    Differential Revision: https://reviews.llvm.org/D64843 — pcc / ViewSVN
  143. [NFC][ScopBuilder] Move buildSchedule and its callees to ScopBuilder or ScopHelper

    Scope of changes:
    1. Moved buildSchedule functions to ScopBuilder.
    2. Moved combineInSequence function to ScopBuilder.
    3. Moved mapToDimension function to ScopBuilder.
    4. Moved LoopStackTy to ScopBuilder.
    5. Moved getLoopSurroundingScop to ScopHelper.
    6. Moved getNumBlocksInLoop to ScopHelper.
    7. Moved getNumBlocksInRegionNode to ScopHelper.
    8. Moved getRegionNodeLoop to ScopHelper.

    Differential Revision: https://reviews.llvm.org/D64223 — domada / ViewSVN
  144. [AMDGPU] Stop special casing flat_scratch for register name

    Differential Revision: https://reviews.llvm.org/D64885 — rampitec / ViewSVN
  145. Speculative fix for stack-tagging.ll failure.

    Depending on the evaluation order of function call arguments,
    the current code may insert a use before def. — eugenis / ViewSVN
  146. [NFC][ScopBuilder]Move finalizeAccesses and its callees to ScopBuilder

    Scope of changes:
    1) Moved finalizeAccesses to ScopBuilder
    2) Moved updateAccessDimensionality to ScopBuilder
    3) Moved foldSizeConstantsToRight to ScopBuilder
    4) Moved foldSizeConstantsToRight to ScopBuilder
    5) Moved assumeNoOutOfBounds to ScopBuilder
    6) Moved markFortranArrays to ScopBuilder
    7) Added iterator range for AccessFunctions vector.

    Differential Revision: https://reviews.llvm.org/D63794 — domada / ViewSVN
  147. [Attributor][NFC] Remove unnecessary debug output — uenoku / ViewSVN
  148. Adding inline comments to code view type record directives for better readability — nilanjana_basu / ViewSVN
  149. [PEI] Don't re-allocate a pre-allocated stack protector slot

    The LocalStackSlotPass pre-allocates a stack protector and makes sure
    that it comes before the local variables on the stack.

    We need to make sure that later during PEI we don't re-allocate a new
    stack protector slot. If that happens, the new stack protector slot will
    end up being **after** the local variables that it should be protecting.

    Therefore, we would have two slots assigned for two different stack
    protectors, one at the top of the stack, and one at the bottom. Since
    PEI will overwrite the assigned slot for the stack protector, the load
    that is used to compare the value of the stack protector will use the
    slot assigned by PEI, which is wrong.

    For this, we need to check if the object is pre-allocated, and re-use
    that pre-allocated slot.

    Differential Revision: https://reviews.llvm.org/D64757 — thegameg / ViewSVN
  150. [CodeGen] Add stack protector tests where the guard gets re-assigned

    In preparation of a fix, add tests for multiple backends. — thegameg / ViewSVN
  151. [CodeGen][NFC] Simplify checks for stack protector index checking

    Use `hasStackProtectorIndex()` instead of `getStackProtectorIndex() >=
    0`. — thegameg / ViewSVN
  152. Renamed and changed the wording of warn_cconv_ignored

    As discussed in D64780 the wording of this warning message is being
    changed to say 'is not supported' instead of 'ignored', and the
    diag ID itself is being changed to warn_cconv_not_supported. — ssrivastava / ViewSVN
  153. GlobalISel: Handle widenScalar of arbitrary G_MERGE_VALUES sources

    Extract the sources to the GCD of the original size and target size,
    padding with implicit_def as necessary.

    Also fix the case where the requested source type is wider than the
    original result type. This was ignoring the type, and just using the
    destination. Do the operation in the requested type and truncate back. — arsenm / ViewSVN
  154. GlobalISel: Handle more cases for widenScalar of G_MERGE_VALUES

    Use an anyext to the requested type for the leftover operand to
    produce a slightly wider type, and then truncate the final merge.

    I have another implementation almost ready which handles arbitrary
    widens, but I think it produces worse code in this example (which I
    think is 90% due to not folding redundant copies or folding out
    implicit_def users), so I wanted to add this as a baseline first. — arsenm / ViewSVN
  155. Basic MTE stack tagging instrumentation.

    Summary:
    Use MTE intrinsics to tag stack variables in functions with
    sanitize_memtag attribute.

    Reviewers: pcc, vitalybuka, hctim, ostannard

    Subscribers: srhines, mgorny, javed.absar, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64173 — eugenis / ViewSVN
  156. Basic codegen for MTE stack tagging.

    Implement IR intrinsics for stack tagging. Generated code is very
    unoptimized for now.

    Two special intrinsics, llvm.aarch64.irg.sp and llvm.aarch64.tagp are
    used to implement a tagged stack frame pointer in a virtual register.

    Differential Revision: https://reviews.llvm.org/D64172 — eugenis / ViewSVN
  157. [libc++] XFAIL a test that does not behave properly on older Clang

    rdar://53015486 — Louis Dionne / ViewSVN
  158. [lld][WebAssembly] Fix handling of comdat functions in init array.

    When hidden symbols are discarded by comdat rules we still want to
    create a local defined symbol, otherwise `Symbol::isDiscarded()` relies
    on begin able to check `getChunk->discarded`.

    This is a followup on rL362769. The comdat.ll test was previously GC'ing
    the `__wasm_call_ctors` functions so `do_init` was not actually being
    included in the link.  Once that function was included in triggered the
    crash bug that this change addresses.

    Fixes: https://github.com/emscripten-core/emscripten/issues/8981

    Differential Revision: https://reviews.llvm.org/D64872 — sbc / ViewSVN
  159. [OPENMP]Fix PR42632: crash on the analysis of the OpenMP constructs.

    Fixed processing of the CapturedStmt children to fix the crash of the
    OpenMP constructs during analysis. — abataev / ViewSVN
  160. Revert [AArch64] Add support for Transactional Memory Extension (TME)

    This reverts r366322 (git commit 4b8da3a503e434ddbc08ecf66582475765f449bc) — chill / ViewSVN
  161. [clang-tidy] Exclude forward decls from fuchsia-multiple-inheritance

    Addresses b39770.

    Differential Revision: https://reviews.llvm.org/D64813 — juliehockett / ViewSVN
  162. [clang-tidy] Fix crash on end location inside macro

    Summary:
    Lexer::getLocForEndOfToken is defined to return an
    invalid location if the given location is inside a macro.
    Other checks conditionally warn based off location
    validity. Updating this check to do the same.

    Reviewers: JonasToth, aaron.ballman, nickdesaulniers

    Reviewed By: nickdesaulniers

    Subscribers: lebedev.ri, nickdesaulniers, xazax.hun, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64607 — nathan-huckleberry / ViewSVN
  163. [Docs][OpenCL] Documentation of C++ for OpenCL mode

    Added documentation of C++ for OpenCL mode into Clang
    User Manual and Language Extensions document.

    Differential Revision: https://reviews.llvm.org/D64418 — stulova / ViewSVN
  164. [AMDGPU] Tune inlining parameters for AMDGPU target

    Summary:
    Since the target has no significant advantage of vectorization,
    vector instructions bous threshold bonus should be optional.

    amdgpu-inline-arg-alloca-cost parameter default value and the target
    InliningThresholdMultiplier value tuned then respectively.

    Reviewers: arsenm, rampitec

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64642 — dfukalov / ViewSVN
  165. [ORC] Add deprecation warnings to ORCv1 layers and utilities.

    Summary:
    ORCv1 is deprecated. The current aim is to remove it before the LLVM 10.0
    release. This patch adds deprecation attributes to the ORCv1 layers and
    utilities to warn clients of the change.

    Reviewers: dblaikie, sgraenitz, AlexDenisov

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64609 — Lang Hames / ViewSVN
  166. [RISCV] Revert r366331 as it exposed some sanitizer failures

    See <http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/33612>. — asb / ViewSVN
  167. [ASan] Support `{f}puts(NULL)` on Darwin

    On Darwin, the man page states that "both fputs() and puts() print
    `(null)' if str is NULL."

    rdar://48227136

    Reviewed By: Lekensteyn

    Differential Revision: https://reviews.llvm.org/D64773 — yln / ViewSVN
  168. AMDGPU: Use getTargetConstant

    Avoids creating an extra intermediate mov. — arsenm / ViewSVN
  169. Fix MSVC 'implicitly capture' compile error. NFCI. — rksimon / ViewSVN
  170. [clangd] Type hierarchy: don't resolve parents if the client only asked for children

    Summary: Also reorganize the code for computing supertypes to make it more symmetric to subtypes.

    Reviewers: kadircet

    Reviewed By: kadircet

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64613 — nridge / ViewSVN
  171. [clang-tidy] Adjust location of namespace comment diagnostic

    Summary:
    If there is no comment, place it at the closing brace of a namespace
    definition. Previously it was placed at the next character after the
    closing brace.

    The new position produces a better location for highlighting in clangd
    and does not seem to make matters worse for clang-tidy.

    Reviewers: alexfh, hokein

    Reviewed By: alexfh, hokein

    Subscribers: xazax.hun, kadircet, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64861 — ibiryukov / ViewSVN
  172. [OPENMP]Fix crash in LoopCounterRefChecker when MemberExpr is not Var or Field

    checkDecl is only valid for VarDecls or FieldDecls, since getCanonicalDecl
    expects only these. Prevent other Decl kinds (such as CXXMethodDecls and
    EnumConstantDecls) from entering and asserting.

    Differential Revision: https://reviews.llvm.org/D64842 — mikerice / ViewSVN
  173. [Attributor] Deduce "willreturn" function attribute

    Summary:
    Deduce the "willreturn" attribute for functions.

    For now, intrinsics are not willreturn. More annotation will be done in another patch.

    Reviewers: jdoerfert

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63046 — uenoku / ViewSVN
  174. [llvm-ar][test] Add tests failing on Darwin

    These tests that failed on Darwin but passed on other machines due to the default archive format differing
    on a Darwin machine, and what looks to be bugs in the output of this format.
    I can not investigate these issue further so the tests are considered expected failures on Darwin.

    Differential Revision: https://reviews.llvm.org/D64802 — gbreynoo / ViewSVN
  175. [lld] Add Visual Studio compatible diagnostics

    Summary:
    Add a --vs-diagnostics flag that alters the format of diagnostic output
    to enable source hyperlinks in Visual Studio.

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

    Reviewed by: ruiu — chrisj / ViewSVN
  176. [ASTImporter] Fix structural eq of lambdas

    Summary:
    The structural equivalence check reported false eq between lambda classes
    with different parameters in their call signature.
    The solution is to check the methods for equality too in case of lambda
    classes.

    Reviewers: a_sidorin, a.sidorin

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64075 — martong / ViewSVN
  177. [RISCV] Add RISCV to LLVM_ALL_TARGETS so it s built by default

    This follows the RFC <http://lists.llvm.org/pipermail/llvm-dev/2019-July/133724.html>.

    Follow-on commits will add appropriate release notes changes etc.

    Pushing this now and in a minimal form so there is reasonable time before 9.0
    branches to resolve any issues arising from e.g. the backend being exposed on
    different sanitizer setups.

    The current builder for RISC-V is on the staging build-bot
    <http://lab.llvm.org:8014/builders/llvm-riscv-linux>, however with the RISCV
    backend being built by default it won't provide any real additional coverage.
    We will shortly set up a builder that runs the test-suite in qemu-user. — asb / ViewSVN
  178. [RISCV][NFC] Remove outdated TODO from test/CodeGen/RISCV/dwarf-eh.ll — asb / ViewSVN
  179. [AsmPrinter] Make the encoding of call sites in .gcc_except_table configurable and use for RISC-V

    The original behavior was to always emit the offsets to each call site in the
    call site table as uleb128 values, however on some architectures (eg RISCV)
    these uleb128 offsets into the code cannot always be resolved until link time
    (because relaxation will invalidate any calculated offsets), and there are no
    appropriate relocations for uleb128 values. As a consequence it needs to be
    possible to specify an alternative.

    This also switches RISCV to use DW_EH_PE_udata4 for call side encodings in
    .gcc_except_table

    Differential Revision: https://reviews.llvm.org/D63415
    Patch by Edward Jones. — asb / ViewSVN
  180. Mips: Remove immarg from copy and insert intrinsics

    These intrinsics do in fact work with non-constant index arguments.

    These are lowered to either the generic
    ISD::INSERT_VECTOR_ELT/ISD::EXTRACT_VECTOR_ELT, or to
    VEXTRACT_SEXT_ELT. The handling of these all accept variable
    indexes. Turning these into generic instructions which do allow
    variables introduces complications in a future change to immarg
    handling.

    Since these just turn into generic instructions, these are kind of
    pointless and should probably just be autoupgraded to
    extractelement/insertelement. — arsenm / ViewSVN
  181. [RISCV] Set correct encodings for DWARF exception handling

    This patch sets correct encodings for DWARF exception handling for RISC-V
    (other than call site encoding, which must be udata4 rather than uleb128 and
    is handled by D63415).

    This has the same intend as D63409, except this version matches GCC/binutils
    behaviour which uses the same encodings regardless of PIC/non-PIC and
    medlow/medany code model. — asb / ViewSVN
  182. [RISCV][NFC] Add tests that capture current encodings for DWARF EH

    Items which are known to be wrong/different vs GCC are marked as TODO and will
    be address in follow-up patches. — asb / ViewSVN
  183. [ASTImporter] Fix LLDB lookup in transparent ctx and with ext src

    Summary:
    With LLDB we use localUncachedLookup(), however, that fails to find
    Decls when a transparent context is involved and the given DC has
    external lexical storage.  The solution is to use noload_lookup, which
    works well with transparent contexts.  But, we cannot use only the
    noload_lookup since the slow case of localUncachedLookup is still needed
    in some other cases.

    These other cases are handled in ASTImporterLookupTable, but we cannot
    use that with LLDB since that traverses through the AST which initiates
    the load of external decls again via DC::decls().

    We must avoid loading external decls during the import becuase
    ExternalASTSource is implemented with ASTImporter, so external loads
    during import results in uncontrolled and faulty import.

    Reviewers: shafik, teemperor, jingham, clayborg, a_sidorin, a.sidorin

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

    Tags: #clang, #lldb

    Differential Revision: https://reviews.llvm.org/D61333 — martong / ViewSVN
  184. [llvm-ar][test] \r\n -> \n

    Also simplify some empty output tests with 'count 0' — maskray / ViewSVN
  185. [AMDGPU] Optimize atomic AND/OR/XOR

    Summary: Extend the atomic optimizer to handle AND, OR and XOR.

    Reviewers: arsenm, sheredom

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64809 — foad / ViewSVN
  186. [AArch64] Add support for Transactional Memory Extension (TME)

    TME is a future architecture technology, documented in

    https://developer.arm.com/architectures/cpu-architecture/a-profile/exploration-tools
    https://developer.arm.com/docs/ddi0601/a

    More about the future architectures:

    https://community.arm.com/developer/ip-products/processors/b/processors-ip-blog/posts/new-technologies-for-the-arm-a-profile-architecture

    This patch adds support for the TME instructions TSTART, TTEST, TCOMMIT, and
    TCANCEL and the target feature/arch extension "tme".

    It also implements TME builtin functions, defined in ACLE Q2 2019
    (https://developer.arm.com/docs/101028/latest)

    Patch by Javed Absar and Momchil Velikov

    Differential Revision: https://reviews.llvm.org/D64416 — chill / ViewSVN
  187. [clangd] Force the required interpretation of #import on windows tests.

    Summary: NFC but should fix a bunch of tests.

    Reviewers: kadircet

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64857 — sammccall / ViewSVN
  188. [clangd] Handle windows line endings in QueryDriver

    Summary: fixes second case of https://github.com/clangd/clangd/issues/93

    Reviewers: sammccall

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64789 — kadircet / ViewSVN
  189. PowerPC: Fix register spilling for SPE registers

    Summary:
    Missed in the original commit, use the correct callee-saved register
    list for spilling, instead of the standard SVR432 list.  This avoids
    needlessly spilling the SPE non-volatile registers when they're not used.

    As part of this, also add where missing, and sort, the spill opcode
    checks for SPE and SPE4 register classes.

    Reviewers: nemanjai, hfinkel, joerg

    Subscribers: kbarton, jsji, llvm-commits

    Differential Revision: https://reviews.llvm.org/D56703 — jhibbits / ViewSVN
  190. PowerPC/SPE: Fix load/store handling for SPE

    Summary:
    Pointed out in a comment for D49754, register spilling will currently
    spill SPE registers at almost any offset.  However, the instructions
    `evstdd` and `evldd` require a) 8-byte alignment, and b) a limit of 256
    (unsigned) bytes from the base register, as the offset must fix into a
    5-bit offset, which ranges from 0-31 (indexed in double-words).

    The update to the register spill test is taken partially from the test
    case shown in D49754.

    Additionally, pointed out by Kei Thomsen, globals will currently use
    evldd/evstdd, though the offset isn't known at compile time, so may
    exceed the 8-bit (unsigned) offset permitted.  This fixes that as well,
    by forcing it to always use evlddx/evstddx when accessing globals.

    Part of the patch contributed by Kei Thomsen.

    Reviewers: nemanjai, hfinkel, joerg

    Subscribers: kbarton, jsji, llvm-commits

    Differential Revision: https://reviews.llvm.org/D54409 — jhibbits / ViewSVN
  191. [MIPS GlobalISel] ClampScalar and select pointer G_ICMP

    Add narrowScalar to half of original size for G_ICMP.
    ClampScalar G_ICMP's operands 2 and 3 to to s32.
    Select G_ICMP for pointers for MIPS32. Pointer compare is same
    as for integers, it is enough to declare them as legal type.

    Differential Revision: https://reviews.llvm.org/D64856 — petar.avramovic / ViewSVN
  192. [AArch64] Consistent types and naming for AArch64 target features (NFC)

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

    Committed as obvious. — chill / ViewSVN
  193. AMDGPU/GFX10: Apply the VMEM-to-scalar-write hazard also to writes to EXEC

    Summary: Change-Id: I854fbf7d48e937bef9f8f3f5d0c8aeb970652630

    Reviewers: rampitec, mareko

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

    Tags: #llvm

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

    Change-Id: I4405b3a7f84186acea5a78d291bff71056e745fc — nha / ViewSVN
  194. AMDGPU: Improve alias analysis for GDS

    Summary: GDS cannot alias anything else.

    Original patch by: Marek Olšák

    Reviewers: arsenm, mareko

    Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, Petar.Avramovic, llvm-commits

    Tags: #llvm

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

    Change-Id: I07bfbd96f5d5c37a6dfba7997df12f291dd794b0 — nha / ViewSVN
  195. [TableGen] Do not set ReadNone attribute on intrinsics with side effects

    If an intrinsic is defined without outputs, but having side effects,
    it still can be removed completely from the program. This patch makes
    TableGen not set Attribute::ReadNone for intrinsics which
    are declared with IntrHasSideEffects.

    Differential Revision: https://reviews.llvm.org/D64414 — chill / ViewSVN
  196. [clangd] Fix error message in tweaktests to be useful. NFC — sammccall / ViewSVN
  197. [llvm-ar][test] Add coverage for replace and update key letters

    Some more tests to increase llvm-ar test coverage, this time for replace 'r' and update 'u'.

    Differential Revision: https://reviews.llvm.org/D64803 — gbreynoo / ViewSVN
  198. [ARM GlobalISel] Cleanup CallLowering. NFC

    Migrate CallLowering::lowerReturnVal to use the same infrastructure as
    lowerCall/FormalArguments and remove the now obsolete code path from
    splitToValueTypes.

    Forgot to push this earlier. — rovka / ViewSVN
  199. [ELF] Delete redundant pageAlign at PT_GNU_RELRO boundaries after D58892

    Summary:
    After D58892 split the RW PT_LOAD on the PT_GNU_RELRO boundary, the new
    layout is:

    PT_LOAD(PT_GNU_RELRO(.data.rel.ro .bss.rel.ro)) PT_LOAD(.data. .bss)

    The two pageAlign() calls at PT_GNU_RELRO boundaries are redundant due
    to the existence of PT_LOAD.

    Reviewers: grimar, peter.smith, ruiu, espindola

    Reviewed By: ruiu

    Subscribers: sfertile, atanasyan, emaste, arichardson, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64854 — maskray / ViewSVN
  200. [OpenCL][Sema] Minor refactoring and constraint checking

    Summary:
    Simplify code a bit and add assertion to address post-landing comments
    from D64083.

    Subscribers: yaxunl, Anastasia, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64804 — mantognini / ViewSVN
  201. [Driver] Enable __cxa_atexit on Solaris

    Starting with Solaris 11.4 (which is now the required minimal version), Solaris does
    support __cxa_atexit.  This patch reflects that.

    One might consider removing the affected tests altogether instead of inverting them,
    as is done on other targets.

    Besides, this lets two ASan tests PASS:

      AddressSanitizer-i386-sunos :: TestCases/init-order-atexit.cc
      AddressSanitizer-i386-sunos-dynamic :: TestCases/init-order-atexit.cc

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

    Differential Revision: https://reviews.llvm.org/D64491 — ro / ViewSVN
  202. Replace CRLF with LF. — ruiu / ViewSVN
  203. [mips] Remove redundant test case. NFC

    The `inlineasm-constraint-reg64.ll` test checks the same functionality. — atanasyan / ViewSVN
  204. [mips] Name inline asm constraint test cases in a uniform manner. NFC — atanasyan / ViewSVN
  205. [mips] Use mult/mflo pattern on 64-bit targets prior to MIPS64

    The `MUL` instruction is available starting from the MIPS32/MIPS64 targets. — atanasyan / ViewSVN
  206. [mips] Implement .cplocal directive

    This directive forces to use the alternate register for context pointer.
    For example, this code:
      .cplocal $4
      jal foo
    expands to:
      ld    $25, %call16(foo)($4)
      jalr  $25

    Differential Revision: https://reviews.llvm.org/D64743 — atanasyan / ViewSVN
  207. [mips] Support the "o" inline asm constraint

    As well as other LLVM targets we do not handle "offsettable"
    memory addresses in any special way. In other words, the "o" constraint
    is an exact equivalent of the "m" one. But some existing code require
    the "o" constraint support.

    This fixes PR42589.

    Differential Revision: https://reviews.llvm.org/D64792 — atanasyan / ViewSVN
  208. [LoopInfo] Fix getUniqueNonLatchExitBlocks

    It is possible that exit block has two predecessors and one of them is a latch
    block while another is not.

    Current algorithm is based on the assumption that all exits are dedicated
    and therefore we can check only first predecessor of loop exit to find all unique
    exits.

    However if we do not consider latch block and it is first predecessor of some
    exit then this exit will be found.

    Regression test is added.

    As a side effect of algorithm re-writing, the restriction that all exits are dedicated
    is eliminated.

    Reviewers: reames, fhahn, efriedma
    Reviewed By: efriedma
    Subscribers: llvm-commits
    Differential Revision: https://reviews.llvm.org/D64787 — skatkov / ViewSVN
  209. Update email address. — chaofan / ViewSVN
  210. Fix more -Werror issues with obsequi. — aemerson / ViewSVN
  211. gn build: Merge r366265 — nico / ViewSVN
  212. gn build: Merge r366216 — nico / ViewSVN
  213. Obsequi: fix implicit declaration of a function, breaks -Werror builds. — aemerson / ViewSVN
  214. AMDGPU: Add some missing builtins — arsenm / ViewSVN
  215. Fix OpenCLCXX test on 32-bit Windows where thiscall is present — rnk / ViewSVN
  216. [AMDGPU] Autogenerate register asm names

    Differential Revision: https://reviews.llvm.org/D64839 — rampitec / ViewSVN
  217. Fix darwin-ld.c if dsymutil.exe exists on PATH — rnk / ViewSVN
  218. ARM: Fix missing immarg for space intrinsic — arsenm / ViewSVN
  219. GlobalISel: Add overload of handleAssignments with CCState

    AMDGPU needs to allocate special argument registers separately from
    the user function argument list, so needs direct control over the
    CCState.

    The ArgLocs argument is only really necessary because CCState doesn't
    allow access to it. — arsenm / ViewSVN
  220. [TableGen] Generate offsets into a flat array for getOperandType

    Rather than an array of std::initializer_list, generate a table of
    offsets and a flat array of the operands for getOperandType. This is a
    bit more efficient on platforms that don't manage to get the array of
    inintializer_lists initialized at link time (I'm looking at you
    macOS). It's also quite quite a bit faster to compile. — Justin Bogner / ViewSVN
  221. Enable the obsequi application for Darwin. It seems to run with no issues. — aemerson / ViewSVN
  222. Fix a typo in target features

    There was a slight typo in r364352 that ended up causing our backend to
    complain on some x86 Android builds. This CL fixes that.

    Differential Revision: https://reviews.llvm.org/D64781 — George Burgess IV / ViewSVN
  223. [WebAssembly] Compile all TLS on Emscripten as local-exec

    Summary:
    Currently, on Emscripten, dynamic linking is not supported with threads.
    This means that if thread-local storage is used, it must be used in a
    statically-linked executable. Hence, local-exec is the only possible model.

    This diff compiles all TLS variables to use local-exec on Emscripten as a
    temporary measure until dynamic linking is supported with threads.

    The goal for this is to allow C++ types with constructors to be thread-local.

    Currently, when `clang` compiles a `thread_local` variable with a constructor,
    it generates `__tls_guard` variable:

        @__tls_guard = internal thread_local global i8 0, align 1

    As no TLS model is specified, this is treated as general-dynamic, which we do
    not support (and cannot support without implementing dynamic linking support
    with threads in Emscripten). As a result, any C++ constructor in `thread_local`
    variables would not compile.

    By compiling all `thread_local` as local-exec, `__tls_guard` will compile and
    we can support C++ constructors with TLS without implementing dynamic linking
    with threads.

    Depends on D64537

    Reviewers: tlively, aheejin, sbc100

    Reviewed By: aheejin

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64776 — quantum / ViewSVN
  224. [TableGen] Add "getOperandType" to get operand types from opcode/opidx

    The InstrInfoEmitter outputs an enum called "OperandType" which gives
    numerical IDs to each operand type. This patch makes use of this enum
    to define a function called "getOperandType", which allows looking up
    the type of an operand given its opcode and operand index.

    Patch by Nicolas Guillemot. Thanks!

    Differential Revision: https://reviews.llvm.org/D63320 — Justin Bogner / ViewSVN
  225. Add REQUIRES: x86 to safeseh-no.s test for x86 — rnk / ViewSVN
  226. [WebAssembly] Implement thread-local storage (local-exec model)

    Summary:
    Thread local variables are placed inside a `.tdata` segment. Their symbols are
    offsets from the start of the segment. The address of a thread local variable
    is computed as `__tls_base` + the offset from the start of the segment.

    `.tdata` segment is a passive segment and `memory.init` is used once per thread
    to initialize the thread local storage.

    `__tls_base` is a wasm global. Since each thread has its own wasm instance,
    it is effectively thread local. Currently, `__tls_base` must be initialized
    at thread startup, and so cannot be used with dynamic libraries.

    `__tls_base` is to be initialized with a new linker-synthesized function,
    `__wasm_init_tls`, which takes as an argument a block of memory to use as the
    storage for thread locals. It then initializes the block of memory and sets
    `__tls_base`. As `__wasm_init_tls` will handle the memory initialization,
    the memory does not have to be zeroed.

    To help allocating memory for thread-local storage, a new compiler intrinsic
    is introduced: `__builtin_wasm_tls_size()`. This instrinsic function returns
    the size of the thread-local storage for the current function.

    The expected usage is to run something like the following upon thread startup:

        __wasm_init_tls(malloc(__builtin_wasm_tls_size()));

    Reviewers: tlively, aheejin, kripken, sbc100

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

    Tags: #clang, #llvm

    Differential Revision: https://reviews.llvm.org/D64537 — quantum / ViewSVN
  227. AMDGPU: Partially revert r366250

    GCCBuiltin doesn't work for these, because they have a mangled type
    (although they arguably should not). — arsenm / ViewSVN
  228. [ORC][docs] Fix an RST error: the code-block directive needs a newline after it. — Lang Hames / ViewSVN
  229. [ORC][docs] Trim ORCv1 to ORCv2 transition section, add a how-to section. — Lang Hames / ViewSVN
  230. [x86] use more phadd for reductions

    This is part of what is requested by PR42023:
    https://bugs.llvm.org/show_bug.cgi?id=42023

    There's an extension needed for FP add, but exactly how we would specify
    that using flags is not clear to me, so I left that as a TODO.
    We're still missing patterns for partial reductions when the input vector
    is 256-bit or 512-bit, but I think that's a failure of vector narrowing.
    If we can reduce the widths, then this matching should work on those tests.

    Differential Revision: https://reviews.llvm.org/D64760 — spatel / ViewSVN
  231. [clang-format] Don't detect call to ObjC class method as C++11 attribute specifier

    Summary:
    Previously, clang-format detected something like the following as a C++11 attribute specifier.

      @[[NSArray class]]

    instead of an array with an Objective-C method call inside. In general, when the attribute specifier checking runs, if it sees 2 identifiers in a row, it decides that the square brackets represent an Objective-C method call. However, here, `class` is tokenized as a keyword instead of an identifier, so this check fails.

    To fix this, the attribute specifier first checks whether the first square bracket has an "@" before it. If it does, then that square bracket is not the start of a attribute specifier because it is an Objective-C array literal. (The assumption is that @[[.*]] is not valid C/C++.)

    Contributed by rkgibson2.

    Reviewers: benhamilton

    Reviewed By: benhamilton

    Subscribers: aaron.ballman, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64632 — benhamilton / ViewSVN
  232. [NFC][ScopBuilder] Move addUserContext to ScopBuilder

    Scope of changes:
    1) Moved addUserContext to ScopBuilder.
    2) Moved command line option UserContextStr to ScopBuilder.

    Differential Revision: https://reviews.llvm.org/D63740 — domada / ViewSVN
  233. [clang-tidy] initial version of readability-convert-member-functions-to-static

    Summary:
    Finds non-static member functions that can be made ``static``.

    I have run this check (repeatedly) over llvm-project. It made 1708 member functions
    ``static``. Out of those, I had to exclude 22 via ``NOLINT`` because their address
    was taken and stored in a variable of pointer-to-member type (e.g. passed to
    llvm::StringSwitch).
    It also made 243 member functions ``const``. (This is currently very conservative
    to have no false-positives and can hopefully be extended in the future.)

    You can find the results here: https://github.com/mgehre/llvm-project/commits/static_const_eval

    Reviewers: alexfh, aaron.ballman

    Subscribers: mgorny, xazax.hun, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D61749 — mgehre / ViewSVN
  234. DWARF: Skip zero column for inline call sites

    D64033 <https://reviews.llvm.org/D64033> added DW_AT_call_column for
    inline sites. However, that change wasn't aware of "-gno-column-info".
    To avoid adding column info when "-gno-column-info" is used, now
    DW_AT_call_column is only added when we have non-zero column (when
    "-gno-column-info" is used, column will be zero).

    Patch by Wenlei He!

    Differential Revision: https://reviews.llvm.org/D64784 — dblaikie / ViewSVN
  235. [libcxx] Rejigger test for destroying delete feature-test macros

    In r361572, we introduced library support for C++20 destroying delete
    and decided to only define the library feature-test macro when the
    compiler supports the underlying language feature. This patch reworks
    the tests to mirror that. — Louis Dionne / ViewSVN
  236. [NFC][ScopBuilder] Move buildAliasChecks and its implementing methods to ScopBuilder

    Scope of changes:
    1) Moved buildAliasChecks to ScopBuilder.
    2) Moved buildAliasGroup to ScopBuilder.
    3) Moved buildAliasGroups to ScopBuilder.
    4) Moved buildAliasGroupsForAccesses to ScopBuilder.
    5) Moved splitAliasGroupsByDomain to ScopBuilder.
    6) Moved addNonEmptyDomainConstraints to ScopBuilder.
    7) Moved buildMinMaxAccess to ScopBuilder.
    8) Moved calculateMinMaxAccess to ScopBuilder.
    9) Moved getAccessDomain to ScopBuilder.
    10) Moved command line options used only by buildAliasChecks functions to ScopBuilder.
    11) Refactored buildAliasGroup function. Added addAliasGroup function to Scop class for pushing back calculated min/max accesses.
    12) Added function incrementNumberOfAliasingAssumptions which increments number of statistic variable AssumptionsAliasing. AssumptionsAliasing variable is defined by STATISTIC macro inside ScopInfo.cpp and it is also used by function trackAssumption from Scop class.
    13) Added reference to OptimizationRemarkEmitter to ScopBuilder class.
    14) Moved calculateMinMaxAccess function to ScopBuilder class.

    Differential Revision: https://reviews.llvm.org/D63693 — domada / ViewSVN
  237. [NFC][ScopBuilder] Move addRecordedAssumption to ScopBuilder

    Scope of changes:
    1) Moved addRecordedAssumptions to ScopBuilder.
    2) Moved Assumption struct outside Scop class.
    3) Refactored addRecordedAssumptions function. Replaced while loop by
    for range loop.
    4) Added function to clear processed Assumptions.

    Differential Revision: https://reviews.llvm.org/D63572 — domada / ViewSVN
  238. [libc++] Add missing UNSUPPORTED for CTAD tests

    The tests for unordered_set and unordered_multiset were missing UNSUPPORTED
    markup for Apple Clang 9.1, which is still being used on some CI bots. — Louis Dionne / ViewSVN
  239. [TSan] Improve handling of stack pointer mangling in {set,long}jmp, pt.6

    Cleanup ARM64 assembly after removing unnecessary computation of mangled
    stack pointer in previous commit. — yln / ViewSVN
  240. AMDGPU/GlobalISel: Select G_ASHR — arsenm / ViewSVN
  241. AMDGPU/GlobalISel: Select G_LSHR — arsenm / ViewSVN
  242. [PowerPC][HTM] Fix impossible reg-to-reg copy assert with ttest builtin

    Summary:
    This is exposed by our internal testing.
    The reduced testcase will assert with "Impossible reg-to-reg copy"

    We can't use COPY to do 32-bit to 64-bit conversion.

    Reviewers: kbarton, hfinkel, nemanjai

    Reviewed By: hfinkel

    Subscribers: hiraditya, MaskRay, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64499 — jsji / ViewSVN
  243. AMDGPU/GlobalISel: Select G_SHL

    I think this manages to not break the DAG handling with the divergent
    predicates because the stadalone divergent patterns end up with a
    higher priority than the pattern on the instruction definition.

    The 16-bit versions don't work yet. — arsenm / ViewSVN
  244. [GWP-ASan] Add thread ID to PRNG seed.

    Summary:
    Adds thread ID to PRNG seed for increased entropy. In particular, this allows
    multiple runs in quick succession that will have different PRNG seeds, allowing
    for better demos/testing.

    Reviewers: kcc

    Reviewed By: kcc

    Subscribers: kubamracek, #sanitizers, llvm-commits

    Tags: #sanitizers, #llvm

    Differential Revision: https://reviews.llvm.org/D64453 — hctim / ViewSVN
  245. [AMDGPU] Change register type for v32 vectors

    When it is AReg_1024 this results in unnecessary copying into
    AGPRs of a 32 element vectors even though they are not intended
    for an mfma instruction.

    Differential Revision: https://reviews.llvm.org/D64815 — rampitec / ViewSVN
  246. Fix -Wreturn-type warning. NFC. — hliao / ViewSVN
  247. AMDGPU: Fix some missing GCCBuiltin declarations — arsenm / ViewSVN
  248. AMDGPU/GlobalISel: Fix selection of private stores — arsenm / ViewSVN
  249. AMDGPU/GlobalISel: Select private loads — arsenm / ViewSVN
  250. AMDGPU/GlobalISel: Select flat stores — arsenm / ViewSVN
  251. Mark new test as requiring an x86 backend for LTO native object generation — rnk / ViewSVN
  252. Fix linkrepro.test after safeseh:no change

    Add the @feat.00 flag to the input. — rnk / ViewSVN
  253. AMDGPU: Add register classes to flat store patterns

    For some reason GlobalISelEmitter needs register classes to import
    these, although it works for the load patterns. — arsenm / ViewSVN
  254. [IndVars] Speculative fix for an assertion failure seen in bots

    I don't have an IR sample which is actually failing, but the issue described in the comment is theoretically possible, and should be guarded against even if there's a different root cause for the bot failures. — reames / ViewSVN
  255. AMDGPU: Replace store PatFrags

    Convert the easy cases to formats understood for GlobalISel. — arsenm / ViewSVN
  256. [COFF] Implement /safeseh:no and check @feat.00 flags by default

    Summary:
    Fixes PR41828. Before this, LLD always emitted SafeSEH chunks and
    defined __safe_se_handler_table & size. Now, /safeseh:no leaves those
    undefined.

    Additionally, we were checking for the safeseh @feat.00 flag in two
    places: once to emit errors, and once during safeseh table construction.
    The error was set up to be off by default, but safeseh is supposed to be
    on by default. I combined the two checks, so now LLD emits an error if
    an input object lacks @feat.00 and safeseh is enabled. This caused the
    majority of 32-bit LLD tests to fail, since many test input object files
    lack @feat.00 symbols. I explicitly added -safeseh:no to those tests to
    preserve behavior.

    Finally, LLD no longer sets IMAGE_DLL_CHARACTERISTICS_NO_SEH if any
    input file wasn't compiled for safeseh.

    Reviewers: mstorsjo, ruiu, thakis

    Reviewed By: ruiu, thakis

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63570 — rnk / ViewSVN
  257. AMDGPU/GlobalISel: Select flat loads

    Now that the patterns use the new PatFrag address space support, the
    only blocker to importing most load patterns is the addressing mode
    complex patterns. — arsenm / ViewSVN
  258. Teach `llvm-pdbutil pretty -native` about `-injected-sources`

    `pretty -native -injected-sources -injected-source-content` works with
    this patch, and produces identical output to the dia version.

    Differential Revision: https://reviews.llvm.org/D64428 — nico / ViewSVN
  259. [AMDGPU] Optimize atomic max/min

    Summary:
    Extend the atomic optimizer to handle signed and unsigned max and min
    operations, as well as add and subtract.

    Reviewers: arsenm, sheredom, critson, rampitec

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64328 — foad / ViewSVN
  260. AMDGPU: Redefine load PatFrags

    Rewrite PatFrags using the new PatFrag address space matching in
    tablegen. These will now work with both SelectionDAG and GlobalISel. — arsenm / ViewSVN
  261. fix unnamed fiefield issue and add tests for __builtin_preserve_access_index intrinsic

    The original commit is r366076. It is temporarily reverted (r366155)
    due to test failure. This resubmit makes test more robust by accepting
    regex instead of hardcoded names/references in several places.

    This is a followup patch for https://reviews.llvm.org/D61809.
    Handle unnamed bitfield properly and add more test cases.

    Fixed the unnamed bitfield issue. The unnamed bitfield is ignored
    by debug info, so we need to ignore such a struct/union member
    when we try to get the member index in the debug info.

    D61809 contains two test cases but not enough as it does
    not checking generated IRs in the fine grain level, and also
    it does not have semantics checking tests.
    This patch added unit tests for both code gen and semantics checking for
    the new intrinsic.

    Signed-off-by: Yonghong Song <yhs@fb.com> — yhs / ViewSVN
  262. AMDGPU: Fix missing immarg for mfma intrinsics — arsenm / ViewSVN
  263. Removed -mno-omit-leaf-frame-pointer from flags.

    Removes -mno-omit-leaf-frame-pointer from Scudo and GWP-ASan's CFlags. Attempt to fix
    the sanitizer buildbots. — hctim / ViewSVN
  264. [TSan] Improve handling of stack pointer mangling in {set,long}jmp, pt.10

    Remove now-unused assembly code for determining xor key on
    Linux/AArch64. This is the final commit of this refactoring. — yln / ViewSVN
  265. [AMDGPU] Add the adjusted FP as a livein register.

    Reviewers: arsenm, rampitec

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64145 — hliao / ViewSVN
  266. [Strict FP] Allow more relaxed scheduling

    Reimplement scheduling constraints for strict FP instructions in
    ScheduleDAGInstrs::buildSchedGraph to allow for more relaxed
    scheduling.  Specifially, allow one strict FP instruction to
    be scheduled across another, as long as it is not moved across
    any global barrier.

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

    Reviewed By: cameron.mcinally — uweigand / ViewSVN
  267. Revert [tools] [llvm-nm] Default to reading from stdin not a.out

    This reverts r365889 (git commit 60c81354b1d3fced1bd284d334f118d2d792ab4b) — abrachet / ViewSVN
  268. Add missing test for r366215 — aemerson / ViewSVN
  269. [Remarks] Simplify and refactor the RemarkParser interface

    Before, everything was based on some kind of type erased parser
    implementation which container a lot of boilerplate code when multiple
    formats were to be supported.

    This simplifies it by:

    * the remark now owns its arguments
    * *always* returning an error from the implementation side
    * working around the way the YAML parser reports errors: catch them through
    callbacks and re-insert them in a proper llvm::Error
    * add a CParser wrapper that is used when implementing the C API to
    avoid cluttering the C++ API with useless state
    * LLVMRemarkParserGetNext now returns an object that needs to be
    released to avoid leaking resources
    * add a new API to dispose of a remark entry: LLVMRemarkEntryDispose — thegameg / ViewSVN
  270. [Remarks][NFC] Combine ParserFormat and SerializerFormat

    It's useless to have both. — thegameg / ViewSVN
  271. [ADCE] Fix non-deterministic behaviour due to iterating over a pointer set.

    Original patch by Yann Laigle-Chapuy

    Differential Revision: https://reviews.llvm.org/D64785 — aemerson / ViewSVN
  272. [DAGCombiner] fold (addcarry (xor a, -1), b, c) -> (subcarry b, a, !c) and flip carry.

    Summary:
    As per title. DAGCombiner only mathes the special case where b = 0, this patches extends the pattern to match any value of b.

    Depends on D57302

    Reviewers: hfinkel, RKSimon, craig.topper

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D59208 — deadalnix / ViewSVN
  273. [OpenCL] Fixing sampler initialisations for C++ mode.

    Allow conversions between integer and sampler type.

    Differential Revision: https://reviews.llvm.org/D64791 — neil.hickey / ViewSVN
  274. [OPENMP]Add support for analysis of if clauses.

    Summary:
    Added support for analysis of if clauses in the OpenMP directives to be
    able to check for the use of uninitialized variables.

    Reviewers: NoQ

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

    Tags: clang

    Differential Revision: https://reviews.llvm.org/D64646 — abataev / ViewSVN
  275. AMDGPU/GlobalISel: Fix test failures in release build

    Apparently the check for legal instructions during instruction
    select does not happen without an asserts build, so these would
    successfully select in release, and fail in debug.

    Make s16 and/or/xor legal. These can just be selected directly
    to the 32-bit operation, as is already done in SelectionDAG, so just
    make them legal. — arsenm / ViewSVN
  276. [llvm-ar][test] Add to llvm-ar test coverage

    This change adds tests to cover existing llvm-ar functionality.
    print.test is omitted due to failing on Darwin.

    Differential Revision: https://reviews.llvm.org/D64330 — gbreynoo / ViewSVN
  277. [clangd] Added highlighting for the targets in typedefs and using.

    Summary:
    In `typedef int A` the `A` was not highlighted previously.

    This patch gives `A` the same kind of highlighting that the underlying type has (class/enum) (which in this example is no special highlighting because builtins are not handled yet)
    Will add highlightings for built ins in another patch.

    Reviewers: hokein, sammccall, ilya-biryukov

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64754 — jvikstrom / ViewSVN
  278. Reapply [llvm-ar][test] Increase llvm-ar test coverage

    This reapplies 365316 without extract.test due to failing on Darwin.

    Differential Revision: https://reviews.llvm.org/D63935 — gbreynoo / ViewSVN
  279. remove a duplicate declaration — sylvestre / ViewSVN
  280. Document the LLVM_ENABLE_BINDINGS option — sylvestre / ViewSVN
  281. [Object/llvm-readelf/llvm-readobj] - Improve error reporting when e_shstrndx is broken.

    When e_shstrndx is broken, it is impossible to get a section name.
    In this patch I improved the error message we show and
    added tests for Object and for llvm-readelf/llvm-readobj

    Message was changed in two places:
    1) llvm-readelf/llvm-readobj previously used a code from Object/ELF.h,
    now they have a modified version of it (it has less checks and allows
    dumping broken things).
    2) Code in Object/ELF.h is still used for generic cases.

    Differential revision: https://reviews.llvm.org/D64714 — grimar / ViewSVN
  282. [Driver] Don't pass --dynamic-linker to ld on Solaris

    I noticed that clang currently passes --dynamic-linker to ld.  This has been the case
    since Solaris 11 support was added initially back in 2012 by David Chisnall (r150580).
    I couldn't find any patch submission, let alone a justification, for this, and it seems
    completely useless: --dynamic-linker is a gld compatibility form of the option, the
    native option being -I.  First of all, however, the dynamic linker passed is simply the
    default, so there's no reason at all to specify it in the first place.

    This patch removes passing the option and adjusts the affected testcase accordingly.

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

    Differential Revision: https://reviews.llvm.org/D64493 — ro / ViewSVN
  283. Reapply [llvm-ar][test] Add to MRI test coverage

    This reapplies 363232 without mri-utf8.test due to failing on Darwin.

    Differential Revision: https://reviews.llvm.org/D63197 — gbreynoo / ViewSVN
  284. [SemaTemplate] Fix uncorrected typos after pack expansion

    Summary:
    This case is particularly important for clangd, as it is triggered after
    inserting the snippet for variadic functions.

    Reviewers: kadircet, ilya-biryukov

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64677 — sammccall / ViewSVN
  285. [clangd] Don't rebuild background index until we indexed one TU per thread.

    Summary:
    This increases the odds that the boosted file (cpp file matching header)
    will be ready. (It always enqueues first, so it'll be present unless
    another thread indexes *two* files before the first thread indexes one.)

    Reviewers: kadircet

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64682 — sammccall / ViewSVN
  286. Remove username from git-llvm script, erroneously added in 366197 — sammccall / ViewSVN
  287. [AArch64] Implement __jcvt intrinsic from Armv8.3-A

    The jcvt intrinsic defined in ACLE [1] is available when ARM_FEATURE_JCVT is defined.

    This change introduces the AArch64 intrinsic, wires it up to the instruction and a new clang builtin function.
    The __ARM_FEATURE_JCVT macro is now defined when an Armv8.3-A or higher target is used.
    I've implemented the target detection logic in Clang so that this feature is enabled for architectures from armv8.3-a onwards (so -march=armv8.4-a also enables this, for example).

    make check-all didn't show any new failures.

    [1] https://developer.arm.com/docs/101028/latest/data-processing-intrinsics

    Differential Revision: https://reviews.llvm.org/D64495 — ktkachov / ViewSVN
  288. [NFC] Test commit: add full stop at end of comment — ktkachov / ViewSVN
  289. [clang-scan-view] Force utf-8 when handling report (python2 only)

    Original patch by random human <random.bored.human@gmail.com>

    Differential Revision: https://reviews.llvm.org/D64129 — serge_sans_paille / ViewSVN
  290. [COFF] Rename variale references in comments after VariableName -> variableName change — maskray / ViewSVN
  291. [WebAssembly] Rename variale references in comments after VariableName -> variableName change — maskray / ViewSVN
  292. [NFC][PowerPC] Add test case for D64195 — wuzish / ViewSVN
  293. [DWARF] Fix the reserved values for unit length in DWARFDebugLine.

    The DWARF3 documentation had inconsistency concerning the reserved range
    for unit length values. The issue was fixed in DWARF4.

    Differential Revision: https://reviews.llvm.org/D64622 — ikudrin / ViewSVN
  294. [DWARF] Fix an incorrect format specifier.

    This adjusts the format specifier because PCOffset is uint16_t.

    Differential Revision: https://reviews.llvm.org/D64620 — ikudrin / ViewSVN
  295. [DWARF] Simplify DWARFAttribute. NFC.

    The first argument in the constructor was ignored, and the remaining
    arguments were always passed as their defaults.

    Differential Revision: https://reviews.llvm.org/D64407 — ikudrin / ViewSVN
  296. Finish "Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO"

    i.e., recent 5745eccef54ddd3caca278d1d292a88b2281528b:

    * Bump the function_type_mismatch handler version, as its signature has changed.

    * The function_type_mismatch handler can return successfully now, so
      SanitizerKind::Function must be AlwaysRecoverable (like for
      SanitizerKind::Vptr).

    * But the minimal runtime would still unconditionally treat a call to the
      function_type_mismatch handler as failure, so disallow -fsanitize=function in
      combination with -fsanitize-minimal-runtime (like it was already done for
      -fsanitize=vptr).

    * Add tests.

    Differential Revision: https://reviews.llvm.org/D61479 — sberg / ViewSVN
  297. [NFC][test] Fix for riscv tests.

    Following tests need updating for: https://reviews.llvm.org/D55277 — zer0 / ViewSVN
  298. [X86] In combineStore, don't convert v2f32 load/store pairs to f64 loads/stores.

    Type legalization can take care of this. This gives DAG combine
    a little more time with the original types. — ctopper / ViewSVN
  299. [ELF] Fix variable names in comments after VariableName -> variableName change

    Also fix some typos. — maskray / ViewSVN
  300. [RISCV] Match GNU tools canonical JALR and add aliases

    The canonical GNU form of JALR resembles a load/store instruction rather
    than placing the immediate offset as a separate argument, so match this
    behaviour. Also add parser-only aliases for the three-operand form, and
    add other shorter aliases also emitted by GNU tools.

    Differential Revision: https://reviews.llvm.org/D55277
    Patch by James Clarke. — asb / ViewSVN
  301. Fix parameter name comments using clang-tidy. NFC.

    This patch applies clang-tidy's bugprone-argument-comment tool
    to LLVM, clang and lld source trees. Here is how I created this
    patch:

    $ git clone https://github.com/llvm/llvm-project.git
    $ cd llvm-project
    $ mkdir build
    $ cd build
    $ cmake -GNinja -DCMAKE_BUILD_TYPE=Debug \
        -DLLVM_ENABLE_PROJECTS='clang;lld;clang-tools-extra' \
        -DCMAKE_EXPORT_COMPILE_COMMANDS=On -DLLVM_ENABLE_LLD=On \
        -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ ../llvm
    $ ninja
    $ parallel clang-tidy -checks='-*,bugprone-argument-comment' \
        -config='{CheckOptions: [{key: StrictMode, value: 1}]}' -fix \
        ::: ../llvm/lib/**/*.{cpp,h} ../clang/lib/**/*.{cpp,h} ../lld/**/*.{cpp,h} — ruiu / ViewSVN
  302. [RISCV] Avoid overflow when determining number of nops for code align

    RISCVAsmBackend::shouldInsertExtraNopBytesForCodeAlign() assumed that the
    align specified would be greater than or equal to the minimum nop length, but
    that is not always the case - for example if a user specifies ".align 0" in
    assembly.

    Differential Revision: https://reviews.llvm.org/D63274
    Patch by Edward Jones. — asb / ViewSVN
  303. [RISCV] Fix a potential issue in shouldInsertFixupForCodeAlign()

    The bool result of shouldInsertExtraNopBytesForCodeAlign() is not checked but
    the returned nop count is unconditionally read even though it could be
    uninitialized.

    Differential Revision: https://reviews.llvm.org/D63285
    Patch by Edward Jones. — asb / ViewSVN
  304. [RISCV][NFC] Split PseudoCALL pattern out from instruction

    Since PseudoCALL defines AsmString, it can be generated from assembly,
    and so code-gen patterns should be defined separately to be consistent
    with the style of the RISCV backend. Other pseudo-instructions exist
    that have code-gen patterns defined directly, but these instructions are
    purely for code-gen and cannot be written in assembly.

    Differential Revision: https://reviews.llvm.org/D64012
    Patch by James Clarke. — asb / ViewSVN
  305. [RISCV][NFC] Fix HasStedExtA -> HasStdExtA typo in comment

    Differential Revision: https://reviews.llvm.org/D64011
    Patch by James Clarke. — asb / ViewSVN
  306. [RISCV] Make RISCVELFObjectWriter::getRelocType check IsPCRel

    Previously, this function didn't check the IsPCRel argument. But doing so is a
    useful check for errors, and also seemingly necessary for FK_Data_4 (which we
    produce a R_RISCV_32_PCREL relocation for if IsPCRel).

    Other than R_RISCV_32_PCREL, this should be NFC. Future exception handling
    related patches will include tests that capture this behaviour. — asb / ViewSVN
  307. hwasan: Pad arrays with non-1 size correctly.

    Spotted by eugenis.

    Differential Revision: https://reviews.llvm.org/D64783 — pcc / ViewSVN
  308. Add contains method to associative containers. This patch implements P0458R2, adding contains to map, multimap, unordered_map, unordered_multimap, set, multiset, unordered_set, and unordered_multiset. — zoecarver / ViewSVN
  309. Revert "[OPENMP]Add support for analysis of if clauses."

    This reverts commit rL366068.
    The patch broke 86 tests under clang/test/OpenMP/ when run with address sanitizer. — tamur / ViewSVN
  310. AMDGPU: Avoid code predicates for extload PatFrags

    Use the MemoryVT field. This will be necessary for tablegen to
    automatically handle patterns for GlobalISel.

    Doesn't handle the d16 lo/hi patterns. Those are a special case since
    it involvess the custom node type. — arsenm / ViewSVN
  311. Change a lit test to permit vendor specific clang version

    A test manually checks for the string `__VERSION__ "Clang`. This needs
    to permit vendor specific variants. — lanza / ViewSVN
  312. reland "add -fthinlto-index= option to clang-cl"

    Summary:
    This is a reland of r366146, adding in the previously missing '--'
    flag that prevents filenames from being interpreted as flags.

    Original description:
    This adds a -fthinlto-index= option to clang-cl, which allows it to
    be used to drive ThinLTO backend passes. This allows clang-cl to be
    used for distributed ThinLTO.

    Tags: #clang — inglorion / ViewSVN
  313. Re-land "[DebugInfo] Move function from line table to the prologue (NFC)"

    In LLDB, when parsing type units, we don't need to parse the whole line
    table. Instead, we only need to parse the "support files" from the line
    table prologue.

    To make that possible, this patch moves the respective functions from
    the LineTable into the Prologue. Because I don't think users of the
    LineTable should have to know that these files come from the Prologue,

    I've left the original methods in place, and made them redirect to the
    LineTable.

    Differential revision: https://reviews.llvm.org/D64774 — Jonas Devlieghere / ViewSVN
  314. [Sema] Suppress additional warnings for C's zero initializer

    Summary:
    D28148 relaxed some checks for assigning { 0 } to a structure for all C
    standards, but it failed to handle structures with non-integer
    subobjects. Relax -Wmissing-braces checks for such structures, and add
    some additional tests.

    This fixes PR39931.

    Patch By: al3xtjames

    Reviewed By: Lekensteyn

    Differential Revision: https://reviews.llvm.org/D61838 — lekensteyn / ViewSVN
  315. [InstructionSimplify] Apply sext/trunc after pointer stripping

    Summary:
    - As the pointer stripping could trace through `addrspacecast` now, need
      to sext/trunc the offset to ensure it has the same width as the
      pointer after stripping.

    Reviewers: jdoerfert

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64768 — hliao / ViewSVN
  316. Revert "[DebugInfo] Move function from line table to the prologue (NFC)"

    This broke LLD, which I didn't have enabled. — Jonas Devlieghere / ViewSVN
  317. Allow for vendor prefixes in a list test

    Summary:
    Preprocessor/init.c contains a line that explicitly checks for the
    string

    __VERSION__ "Clang{{.*}}

    It's valid to have a toolchain configured to emit a vendor prefix
    before the word Clang. e.g.

    __VERSION__ "Vendor Clang{{.*}}

    Subscribers: fedor.sergeev, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64772 — lanza / ViewSVN
  318. [DebugInfo] Move function from line table to the prologue (NFC)

    In LLDB, when parsing type units, we don't need to parse the whole line
    table. Instead, we only need to parse the "support files" from the line
    table prologue.

    To make that possible, this patch moves the respective functions from
    the LineTable into the Prologue. Because I don't think users of the
    LineTable should have to know that these files come from the Prologue,

    I've left the original methods in place, and made them redirect to the
    LineTable.

    Differential revision: https://reviews.llvm.org/D64774 — Jonas Devlieghere / ViewSVN
  319. Temporarily revert "add -fthinlto-index= option to clang-cl"

    This is causing testsuite failures on (at least) darwin release+asserts.

    This reverts commit r366146. — echristo / ViewSVN
  320. Temporarily Revert "fix unnamed fiefield issue and add tests for __builtin_preserve_access_index intrinsic"

    The commit had tests that would only work with names in the IR.

    This reverts commit r366076. — echristo / ViewSVN
  321. Temporarily Revert "[SLP] Recommit: Look-ahead operand reordering heuristic."

    As there are some reported miscompiles with AVX512 and performance regressions
    in Eigen. Verified with the original committer and testcases will be forthcoming.

    This reverts commit r364964. — echristo / ViewSVN
  322. Revert "[NewPM] Port Sancov"

    This reverts commit 5652f35817f07b16f8b3856d594cc42f4d7ee29c. — leonardchan / ViewSVN
  323. [DirectoryWatcher][linux] Fix for older kernels

    IN_EXCL_UNLINK exists since Linux 2.6.36

    Differential Revision: https://reviews.llvm.org/D64764 — Jan Korous / ViewSVN
  324. [X86] Teach convertToThreeAddress to handle SUB with immediate

    We mostly avoid sub with immediate but there are a couple cases that can create them. One is the add 128, %rax -> sub -128, %rax trick in isel. The other is when a SUB immediate gets created for a compare where both the flags and the subtract value is used. If we are unable to linearize the SelectionDAG to satisfy the flag user and the sub result user from the same instruction, we will clone the sub immediate for the two uses. The one that produces flags will eventually become a compare. The other will have its flag output dead, and could then be considered for LEA creation.

    I added additional test cases to add.ll to show the the sub -128 trick gets converted to LEA and a case where we don't need to convert it.

    This showed up in the current codegen for PR42571.

    Differential Revision: https://reviews.llvm.org/D64574 — ctopper / ViewSVN
  325. [TSan] Fix asm token error (again) — yln / ViewSVN
  326. [WebAssembly] Add missing utility methods for exnref type

    Summary:
    This adds missing utility methods and copy instruction handling for
    `exnref` type and also adds tests.

    `tee` instruction tests are missing because `isTee` is currently only
    used in ExplicitLocals pass and testing that pass in mir requires
    serialization of stackified registers in mir files, which is a bit
    nontrivial because `MachineFunctionInfo` only has info of vreg numbers
    (which are large integers) but not the mir's register numbers. But this
    change is quite trivial anyway.

    Reviewers: tlively

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64705 — aheejin / ViewSVN
  327. [llvm-readelf] Print "File: lib.a(file.o)" info when dumping archive files.

    Match GNU readelf.

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

    Reviewers: jhenderson, grimar, MaskRay, rupprecht

    Reviewed by: jhenderson, MaskRay, grimar

    Differential Revision: https://reviews.llvm.org/D64361 — yuanfang / ViewSVN
  328. add -fthinlto-index= option to clang-cl

    Summary:
    This adds a -fthinlto-index= option to clang-cl, which allows it to
    be used to drive ThinLTO backend passes. This allows clang-cl to be
    used for distributed ThinLTO.

    Reviewers: tejohnson, pcc, rnk

    Subscribers: mehdi_amini, steven_wu, dexonsmith, arphaman, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64458 — inglorion / ViewSVN
  329. [WebAssembly] Rename except_ref type to exnref

    Summary:
    We agreed to rename `except_ref` to `exnref` for consistency with other
    reference types in
    https://github.com/WebAssembly/exception-handling/issues/79. This also
    renames WebAssemblyInstrExceptRef.td to WebAssemblyInstrRef.td in order
    to use the file for other reference types in future.

    Reviewers: dschuff

    Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, jfb, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64703 — aheejin / ViewSVN
  330. Revert [llvm-lipo] Implement -create (with hardcoded alignments)

    This reverts r366142 (git commit 67cee1dc7ee285b03372eb818a3894d35efa7394)

    The test is failing on the Windows buildbots. Reverting while I
    investigate. — smeenai / ViewSVN
  331. [OpenCL] Make TableGen'd builtin tables and helper functions static

    Reviewers: Pierre, Anastasia

    Reviewed By: Anastasia

    Subscribers: yaxunl, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64608 — tstellar / ViewSVN
  332. [llvm-lipo] Implement -create (with hardcoded alignments)

    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
  333. [clang-fuzzer] Remove 'setUseOrcMCJITReplacement(false)' call.

    The default value for this option (UseMCJITReplacement) is already false, and
    OrcMCJITReplacement is going to have deprecation warnings attached in LLVM 9.0.
    Removing this call removes a spurious warning. — Lang Hames / ViewSVN
  334. [WebAssembly] Simplify regcopy.mir

    Summary:
    This deletes the ll templates from the functions because they don't need
    them (mir files need ll templates only when they have function calls or
    BB names that are not numbers).

    This also renames the filename to `reg-copy.mir`, because I'm planning
    to add some more `reg-*.mir` soon.

    Reviewers: tlively

    Subscribers: dschuff, sbc100, jgravelle-google, sunfish, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64704 — aheejin / ViewSVN
  335. [WebAssembly] Assembler: support special floats: infinity / nan

    Summary:
    These are emitted as identifiers by the InstPrinter, so we should
    parse them as such. These could potentially clash with symbols of
    the same name, but that is out of our (the WebAssembly backend) control.

    Reviewers: dschuff

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64770 — aardappel / ViewSVN
  336. [DirectoryWatcher][test] Relax test assumptions

    Workaround for FSEvents sometimes sending notifications for events that happened
    before DirectoryWatcher was created.

    This caused tests to be flaky on green dragon. — Jan Korous / ViewSVN
  337. [DirectoryWatcher][NFC][test] Add typedef for enum — Jan Korous / ViewSVN
  338. [ASan] Fix >80 character line. — morehouse / ViewSVN
  339. [AMDGPU] Enable merging m0 initializations.

    Summary:
    Enable hoisting and merging m0 defs that are initialized with the same
    immediate value. Fixes bug where removed instructions are not considered
    to interfere with other inits, and make sure to not hoist inits before block
    prologues.

    Reviewers: rampitec, arsenm

    Reviewed By: rampitec

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64766 — kerbowa / ViewSVN
  340. [ScopInfo][NFC] Add dot at the end of comment statement. — domada / ViewSVN
  341. [mips] Print BEQZL and BNEZL pseudo instructions

    One of the reasons - to be compatible with GNU tools. — atanasyan / ViewSVN
  342. AMDGPU: Use standalone MUBUF load patterns

    We already do this for the flat and DS instructions, although it is
    certainly uglier and more verbose.

    This will allow using separate pattern definitions for extload and
    zextload. Currently we get away with using a single PatFrag with
    custom predicate code to check if the extension type is a zextload or
    anyextload. The generic mechanism the global isel emitter understands
    treats these as mutually exclusive. I was considering making the
    pattern emitter accept zextload or sextload extensions for anyextload
    patterns, but in global isel, the different extending loads have
    distinct opcodes, and there is currently no mechanism for an opcode
    matcher to try multiple (and there probably is very little need for
    one beyond this case). — arsenm / ViewSVN
  343. [TSan] Fix asm token error — yln / ViewSVN
  344. [LoopUnroll+LoopUnswitch] do not transform loops containing callbr

    Summary:
    There is currently a correctness issue when unrolling loops containing
    callbr's where their indirect targets are being updated correctly to the
    newly created labels, but their operands are not.  This manifests in
    unrolled loops where the second and subsequent copies of callbr
    instructions have blockaddresses of the label from the first instance of
    the unrolled loop, which would result in nonsensical runtime control
    flow.

    For now, conservatively do not unroll the loop.  In the future, I think
    we can pursue unrolling such loops provided we transform the cloned
    callbr's operands correctly.

    Such a transform and its legalities are being discussed in:
    https://reviews.llvm.org/D64101

    Link: https://bugs.llvm.org/show_bug.cgi?id=42489
    Link: https://groups.google.com/forum/#!topic/clang-built-linux/z-hRWP9KqPI

    Reviewers: fhahn, hfinkel, efriedma

    Reviewed By: fhahn, hfinkel, efriedma

    Subscribers: efriedma, hiraditya, zzheng, dmgreen, llvm-commits, pirama, kees, nathanchance, E5ten, craig.topper, chandlerc, glider, void, srhines

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64368 — nickdesaulniers / ViewSVN
  345. TableGen/GlobalISel: Fix handling of truncstore patterns

    This was failing to import the AMDGPU truncstore patterns. The
    truncating stores from 32-bit to 8/16 were then somehow being
    incorrectly selected to a 4-byte store.

    A separate check is emitted for the LLT size in comparison to the
    specific memory VT, which looks strange to me but makes sense based on
    the hierarchy of PatFrags used for the default truncstore PatFrags. — arsenm / ViewSVN
  346. TableGen: Add address space to matchers

    Currently AMDGPU uses a CodePatPred to check address spaces from the
    MachineMemOperand. Introduce a new first class property so that the
    existing patterns can be easily modified to uses the new generated
    predicate, which will also be handled for GlobalISel.

    I would prefer these to match against the pointer type of the
    instruction, but that would be difficult to get working with
    SelectionDAG compatbility. This is much easier for now and will avoid
    a painful tablegen rewrite for all the loads and stores.

    I'm also not sure if there's a better way to encode multiple address
    spaces in the table, rather than putting the number to expect. — arsenm / ViewSVN
  347. [clang] allow -fthinlto-index= without -x ir

    Summary:
    Previously, passing -fthinlto-index= to clang required that bitcode
    files be explicitly marked by -x ir. This change makes us detect files
    with object file extensions as bitcode files when -fthinlto-index= is
    present, so that explicitly marking them is no longer necessary.
    Explicitly specifying -x ir is still accepted and continues to be part
    of the test case to ensure we continue to support it.

    Reviewers: tejohnson, rnk, pcc

    Subscribers: mehdi_amini, steven_wu, dexonsmith, arphaman, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64610 — inglorion / ViewSVN
  348. [TSan] Improve handling of stack pointer mangling in {set,long}jmp, pt.9

    Switch over to computing the xor key in C, instead of assembly for
    Linux/AArch64. — yln / ViewSVN
  349. AMDGPU/GlobalISel: Allow scalar s1 and/or/xor

    If a 1-bit value is in a 32-bit VGPR, the scalar opcodes set SCC to
    whether the result is 0. If the inputs are SCC, these can be copied to
    a 32-bit SGPR to produce an SCC result. — arsenm / ViewSVN
  350. [libc++] Implement P0433: deduction guides for <unordered_map>

    Thanks to Arthur O'Dwyer for the patch.

    Differential Revision: https://reviews.llvm.org/D58590 — Louis Dionne / ViewSVN
  351. ARM MTE stack sanitizer.

    Add "memtag" sanitizer that detects and mitigates stack memory issues
    using armv8.5 Memory Tagging Extension.

    It is similar in principle to HWASan, which is a software implementation
    of the same idea, but there are enough differencies to warrant a new
    sanitizer type IMHO. It is also expected to have very different
    performance properties.

    The new sanitizer does not have a runtime library (it may grow one
    later, along with a "debugging" mode). Similar to SafeStack and
    StackProtector, the instrumentation pass (in a follow up change) will be
    inserted in all cases, but will only affect functions marked with the
    new sanitize_memtag attribute.

    Reviewers: pcc, hctim, vitalybuka, ostannard

    Subscribers: srhines, mehdi_amini, javed.absar, kristof.beyls, hiraditya, cryptoad, steven_wu, dexonsmith, cfe-commits, llvm-commits

    Tags: #clang, #llvm

    Differential Revision: https://reviews.llvm.org/D64169 — eugenis / ViewSVN
  352. Constrain workaround to avoid affecting other buildbots — ericwf / ViewSVN
  353. AMDGPU/GlobalISel: Select G_AND/G_OR/G_XOR — arsenm / ViewSVN
  354. AMDGPU/GlobalISel: Don't constrain source register of VCC copies

    This is a hack until I come up with a better way of dealing with the
    pseudo-register banks used for boolean values. If the use instruction
    constrains the register, the selector for the def instruction won't
    see that the bank was VCC. A 1-bit SReg_32 is could ambiguously have
    been SCCRegBank or VCCRegBank in wave32.

    This is necessary to successfully select branches with and and/or/xor
    condition. — arsenm / ViewSVN
  355. AMDGPU/GlobalISel: Fix selecting vcc->vcc bank copies

    The extra test change is correct, although how it arrives there is a
    bug that needs work. With wave32, the test for isVCC ambiguously
    reports true for an SCC or VCC source. A new allocatable pseudo
    register class for SCC may be necesssary. — arsenm / ViewSVN
  356. AMDGPU/GlobalISel: Fix not constraining result reg of copies to VCC — arsenm / ViewSVN
  357. AMDGPU/GlobalISel: Fix handling of sgpr (not scc bank) s1 to VCC

    This was emitting a copy from a 32-bit register to a 64-bit. — arsenm / ViewSVN
  358. AMDGPU/GlobalISel: Custom legalize G_INSERT_VECTOR_ELT — arsenm / ViewSVN
  359. AMDGPU/GlobalISel: Custom legalize G_EXTRACT_VECTOR_ELT

    Turn the constant cases into G_EXTRACTs. — arsenm / ViewSVN
  360. AMDGPU/GlobalISel: Fix G_ICMP for wave32 — arsenm / ViewSVN
  361. GlobalISel: Implement narrowScalar for vector extract/insert indexes — arsenm / ViewSVN
  362. AMDGPU: Fix missing immarg from interp intrinsics — arsenm / ViewSVN
  363. [FileCheck] Store line numbers as optional values

    Summary:
    Processing of command-line definition of variable and logic around
    implicit not directives both reuse parsing code that expects a line
    number to be defined. So far, a special line number of 0 was used for
    those users of the parsing code where a line number does not make sense.
    This commit instead represents line numbers as Optional values so that
    they can be None for those cases.

    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/D64639 — thopre / ViewSVN
  364. [cmake] Don't set install rules for tblgen if building utils is disabled

    Summary:
    This is a follow up to D64032. Afterwards if building utils is disabled
    and cross compilation is attempted, CMake will complain that adding
    `install()` directives to targets with EXCLUDE_FROM_ALL set is "undefined".
    Indeed, it appears depending on the CMake version and the selected
    Generator, the install rule will error because the underlying target isn't
    built. Fix that by not adding the install rule if building utils is not
    requested. Note that this doesn't prevent building tblgen as a
    dependency in not cross-build, even if building tools is disabled.

    Reviewed By: smeenai
    Differential Revision: https://reviews.llvm.org/D64225 — kfischer / ViewSVN
  365. Expand comment about how StringsToBuckets was computed, and add more entries

    The construction was explained in
    https://reviews.llvm.org/D44810?id=139526#inline-391999 but reading the code
    shouldn't require hunting down old reviews to understand it.

    The precomputed list was missing an entry for the empty list case, and
    one entry at the very end. (The current last entry is the last one where
    3 * BucketCount fits in a signed int, but the reference implementation
    uses unsigneds as far as I can tell, so there's room for one more entry.)

    No behavior change for inputs seen in practice.

    Differential Revision: https://reviews.llvm.org/D64738 — nico / ViewSVN
  366. [ARM] MVE vector for 64bit types

    We need to make sure that we are sensibly dealing with vectors of types v2i64
    and v2f64, even if most of the time we cannot generate native operations for
    them. This mostly adds a lot of testing, plus fixes up a couple of the issues
    found. And, or and xor can be legal for v2i64, and shifts combining needs a
    slight fixup.

    Differential Revision: https://reviews.llvm.org/D64316 — dmgreen / ViewSVN
  367. [sanitizers][windows][mingw32] Mingw32 RTL fixes
    RTL interception broke mingw32, this should fix those builds by
    removing dependency on windows.h

    reviewed in https://reviews.llvm.org/D64694 — mcgov / ViewSVN
  368. [WebAssembly] Assembler: recognize .init_array as data section.

    Reviewers: sbc100

    Subscribers: dschuff, jgravelle-google, aheejin, sunfish, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64602 — aardappel / ViewSVN
  369. AMDGPU/GlobalISel: Widen vector extracts — arsenm / ViewSVN
  370. AMDGPU/GlobalISel: Handle llvm.amdgcn.if.break — arsenm / ViewSVN
  371. AMDGPU: Remove reserved value accidentally left in for gfx908 — kzhuravl / ViewSVN
  372. AMDGPU/GlobalISel: Select llvm.amdgcn.end.cf — arsenm / ViewSVN
  373. [x86] try to keep FP casted+truncated+extracted vector element out of GPRs

    inttofp (trunc (extelt X, 0)) --> inttofp (extelt (bitcast X), 0)

    We have pseudo-vectorization of scalar int to FP casts, so this tries to
    make that more likely by replacing a truncate with a bitcast. I didn't see
    any test diffs starting from 'uitofp', so I left that as a TODO. We can't
    only match the shorter trunc+extract pattern because there's an opposing
    transform somewhere, so we infinite loop. Waiting to try this during
    lowering is another possibility.

    A motivating case is shown in PR39975 and included in the test diffs here:
    https://bugs.llvm.org/show_bug.cgi?id=39975

    Differential Revision: https://reviews.llvm.org/D64710 — spatel / ViewSVN
  374. [llvm-lib] Add a dependency to intrinsics_gen to the LLVMLibDriver build

    Summary:
    Occasionally the build of LLVMLibDriver will fail because Attributes.inc has not been generated yet. Add an explicit dependency, so that we can guarantee that the file has been generated before LLVMLibDriver is build.

    ##[error]llvm\include\llvm\IR\Attributes.h(73,0): Error C1083: Cannot open include file: 'llvm/IR/Attributes.inc': No such file or directory
    llvm\include\llvm/IR/Attributes.h(73): fatal error C1083: Cannot open include file: 'llvm/IR/Attributes.inc': No such file or directory [LLVMLibDriver.vcxproj]

    Reviewers: asmith

    Subscribers: mgorny, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64357 — stella.stamenova / ViewSVN
  375. [X86] Return UNDEF from LowerScalarImmediateShift when the shift amount is out of range.

    I think we only turn out of range shiftss to undef when
    all elements are out of range or the shift amount is a splat out
    of range. I'm not sure which, I didn't check.

    During lowering we can split a shift where some elements
    are out of range into multiple shifts. This can create a
    new shift with a splat shift amount that is out of range.

    This patch returns undef for this case.

    Fixes PR42615.

    Differential Revision: https://reviews.llvm.org/D64699 — ctopper / ViewSVN
  376. Reland "[COFF] Add null check in case of symbols defined in LTO blobs"

    This reverts r365990 (git commit 1a6053ebc61cb0b8146f5ca27b74859a9a91e0a3)

    The test no longer depends on the Visual C++ libraries. I confirmed that
    the crash still reproduces with the new test case if I remove the null
    check. — rnk / ViewSVN
  377. AMDGPU: Add 24-bit mul intrinsics

    Insert these during codegenprepare.

    This works around a DAG issue where generic combines eliminate the and
    asserting the high bits are zero, which then exposes an unknown read
    source to the mul combine. It doesn't worth the hassle of trying to
    insert an AssertZext or something to try to deal with it. — arsenm / ViewSVN
  378. Add some release notes for 9.0 release — arsenm / ViewSVN
  379. [AMDGPU] Copy missing predicate from pseudo to real

    NFC at the momemnt, needed for future commit.

    Differential Revision: https://reviews.llvm.org/D64761 — rampitec / ViewSVN
  380. Update __VERSION__ to remove the hardcoded 4.2.1 version

    Summary:
    Just like in https://reviews.llvm.org/D56803
    for -dumpversion

    Reviewers: rnk

    Reviewed By: rnk

    Subscribers: dexonsmith, lebedev.ri, hubert.reinterpretcast, xbolva00, fedor.sergeev, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D63048 — sylvestre / ViewSVN
  381. [FunctionAttrs] Remove readonly and writeonly assertion

    There are scenarios where mutually recursive functions may cause the SCC
    to contain both read only and write only functions. This removes an
    assertion when adding read attributes which caused a crash with a the
    provided test case, and instead just doesn't add the attributes.

    Patch by Luke Lau <luke.lau@intel.com>

    Differential Revision: https://reviews.llvm.org/D60761 — jdoerfert / ViewSVN
  382. [ARM] Minor formatting in ARMInstrMVE.td. NFC — dmgreen / ViewSVN
  383. Use a unique_ptr instead of manual memory management for LineTable — nico / ViewSVN
  384. AMDGPU/GlobalISel: Select easy cases for G_BUILD_VECTOR — arsenm / ViewSVN
  385. AMDGPU/GlobalISel: RegBankSelect for G_CONCAT_VECTORS — arsenm / ViewSVN
  386. Use a unique_ptr instead of manual memory management for CustomDiagInfo — nico / ViewSVN
  387. Use unique_ptr instead of manual delete in one place. No behavior change. — nico / ViewSVN
  388. [x86] add tests for reductions that might be better with more horizontal ops; NFC — spatel / ViewSVN
  389. Revert "r366069: [PatternMatch] Implement matching code for LibFunc"

    Reason: the change introduced a layering violation by adding a
    dependency on IR to Analysis. — ibiryukov / ViewSVN
  390. [docs][llvm-nm] Fix inconsistent grammar — jhenderson / ViewSVN
  391. [X86][SSE] Regenerated packss.ll test file.

    Not sure what went wrong in rL366077.... — rksimon / ViewSVN
  392. [X86][SSE] Add PACKSS with zero shuffle masks.

    This is an example of expansion due to D61129 - it should combine back to a PACKSS with a zero operand. — rksimon / ViewSVN
  393. fix unnamed fiefield issue and add tests for __builtin_preserve_access_index intrinsic

    This is a followup patch for https://reviews.llvm.org/D61809.
    Handle unnamed bitfield properly and add more test cases.

    Fixed the unnamed bitfield issue. The unnamed bitfield is ignored
    by debug info, so we need to ignore such a struct/union member
    when we try to get the member index in the debug info.

    D61809 contains two test cases but not enough as it does
    not checking generated IRs in the fine grain level, and also
    it does not have semantics checking tests.
    This patch added unit tests for both code gen and semantics checking for
    the new intrinsic.

    Signed-off-by: Yonghong Song <yhs@fb.com> — yhs / ViewSVN
  394. [ORC] Start adding ORCv1 to ORCv2 transition tips to the ORCv2 doc. — Lang Hames / ViewSVN
  395. [AMDGPU] fixed scheduler crash in gfx908

    For some reason scheduler can send down an SUnit without an
    instruction.

    Differential Revision: https://reviews.llvm.org/D64709 — rampitec / ViewSVN
  396. [clangd] Fix doc — kadircet / ViewSVN
  397. gn build: Add a note on how to locally tell git to ignore build dir — nico / ViewSVN
  398. [AMDGPU][MC][GFX9][GFX10] Added support of GET_DOORBELL message

    Reviewers: artem.tamazov, arsenm

    Differential Revision: https://reviews.llvm.org/D64729 — dpreobra / ViewSVN
  399. [clangd] Fix duplicate highlighting tokens appearing in initializer lists.

    Summary: The RecursiveASTVisitor sometimes visits exprs in initializer lists twice. Added deduplication to prevent duplicate highlighting tokens from appearing. Done by sorting and a linear search.

    Reviewers: hokein, sammccall, ilya-biryukov

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64634 — jvikstrom / ViewSVN
  400. [PatternMatch] Implement matching code for LibFunc

    Summary: Provides m_LibFunc pattern that can be used to match LibFuncs.

    Reviewers: spatel, hfinkel, efriedma, lebedev.ri

    Reviewed By: lebedev.ri

    Subscribers: lebedev.ri, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D42047 — quolyk / ViewSVN
  401. [OPENMP]Add support for analysis of if clauses.

    Summary:
    Added support for analysis of if clauses in the OpenMP directives to be
    able to check for the use of uninitialized variables.

    Reviewers: NoQ

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64646 — abataev / ViewSVN
  402. [AMDGPU][MC] Corrected encoding of src0 for DS_GWS_* instructions

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

    Reviewers: artem.tamazov, arsenm

    Differential Revision: https://reviews.llvm.org/D64716 — dpreobra / ViewSVN
  403. [X86] isTargetShuffleEquivalent - assert the expected mask is correctly formed. NFCI.

    While we don't make any assumptions about the actual mask, assert that the expected mask only contains valid mask element values. — rksimon / ViewSVN
  404. [Testing] Add missing "REQUIRES: asserts"

    This broke after r366048 / https://reviews.llvm.org/D63923 — davezarzycki / ViewSVN
  405. [mips] Remove "else-after-return". NFC — atanasyan / ViewSVN
  406. [OpenCL] Deduce addr space for pointee of dependent types in instantiation.

    Since pointee doesn't require context sensitive addr space deduction
    it's easier to handle pointee of dependent types during templ
    instantiation.

    Differential Revision: https://reviews.llvm.org/D64400 — stulova / ViewSVN
  407. Fix uninitialized variable analyzer warning. NFCI. — rksimon / ViewSVN
  408. [ASTImporter] Using Lang_CXX14 in ASTImporterVisibilityTest.

    Summary:
    These tests may work with C++14 language constructs in the future
    (variable templates and others).
    To avoid warnings about language version C++ version constants in the tests
    are updated.

    Reviewers: martong, a.sidorin

    Reviewed By: martong

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64477 — balazske / ViewSVN
  409. PDB HashTable: Make iterator key type const

    Having the hash table key change during iteration is bad, so make it
    impossible. Nothing relied on the key type not being const.

    (This is also necessary to be able to call the const version of
    iterator_facade_base::operator->(). Nothing calls this, and nothing
    will, but I tried using it locally during development and it took me a
    while to understand what was going wrong.)

    Also rename the iterator typedef to const_iterator.

    No behavior change.

    Differential Revision: https://reviews.llvm.org/D64641 — nico / ViewSVN
  410. [OpenCL][PR41727] Prevent ICE on global dtors

    Pass NULL to pointer arg of __cxa_atexit if addr space
    is not matching with its param. This doesn't align yet
    with how dtors are generated that should be changed too.

    Differential Revision: https://reviews.llvm.org/D62413 — stulova / ViewSVN
  411. Recommit r366052 "[obj2yaml] - Rework tool's error reporting logic for ELF target."

    No changes, LLD code was updated in r366057.

    Original commit message:

    ELF.h contains two getSymbol methods
    which seems to be used only from obj2yaml.

    One of these methods calls another, which in turn
    contains untested error message which doesn't
    provide enough information.

    Problem is that after improving only just that message,
    obj2yaml will not show it,
    ("Error reading file: yaml: Invalid data was
    encountered while parsing the file" message will be shown instead),
    because internal errors handling of tool is based on ErrorOr<> class which
    stores a error code and as a result can only show a predefined error string, what
    actually isn't very useful.

    In this patch, I rework obj2yaml's error reporting system
    for ELF targets to use Error  Expected<> classes.
    Also, I improve the error message produced
    by getSymbol for demonstration of the new functionality.

    Differential revision: https://reviews.llvm.org/D64631 — grimar / ViewSVN
  412. [LLD][ELF] - Minor simplification. NFC.

    This removes a call to `object::getSymbol<ELFT>`.
    We used this function in a next way: it was given an
    array of symbols and index and returned either a symbol
    at the index given or a error.

    This function was removed in D64631.
    (rL366052, but was reverted because of LLD compilation error
    that I didn't know about).

    It does not make much sense to keep this function on LLVM side
    only for LLD, because having only a list of symbols and the index it
    is not able to produce a valueable error message about context anyways. — grimar / ViewSVN
  413. [ARM] MVE Vector Shifts

    This adds basic lowering for MVE shifts. There are many shifts in MVE, but the
    instructions handled here are:
    VSHL (imm)
    VSHRu (imm)
    VSHRs (imm)
    VSHL (vector)
    VSHL (register)

    MVE, like NEON before it, doesn't have shift right by a vector (or register).
    We instead have to negate the amount and shift in the opposite direction. This
    means we have to convert any SHR's into a form of SHL (that is still signed or
    unsigned) with a negated condition and selecting from there. MVE still does
    have shifting by an immediate for SHL, ASR and LSR.

    This adds lowering for these and for register forms, which work well for shift
    lefts but may require an extra fold of neg(vdup(x)) -> vdup(neg(x)) to potentially
    work optimally for right shifts.

    Differential Revision: https://reviews.llvm.org/D64212 — dmgreen / ViewSVN
  414. [libFuzzer] Disable fork.test on AArch64

    This crashes sporadically on our AArch64 buildbots. Disable for now. — rovka / ViewSVN
  415. [ARM] Move Shifts after Bits. NFC

    This just moves the shift instruction definitions further down the
    ARMInstrMVE.td file, to make positioning patterns slightly more natural. — dmgreen / ViewSVN
  416. Revert r366052 "[obj2yaml] - Rework tool's error reporting logic for ELF target."

    Seems it broke LLD:
    http://lab.llvm.org:8011/builders/sanitizer-windows/builds/48434 — grimar / ViewSVN
  417. [obj2yaml] - Rework tool's error reporting logic for ELF target.

    ELF.h contains two getSymbol methods
    which seems to be used only from obj2yaml.

    One of these methods calls another, which in turn
    contains untested error message which doesn't
    provide enough information.

    Problem is that after improving only just that message,
    obj2yaml will not show it,
    ("Error reading file: yaml: Invalid data was
    encountered while parsing the file" message will be shown instead),
    because internal errors handling of tool is based on ErrorOr<> class which
    stores a error code and as a result can only show a predefined error string, what
    actually isn't very useful.

    In this patch, I rework obj2yaml's error reporting system
    for ELF targets to use Error  Expected<> classes.
    Also, I improve the error message produced
    by getSymbol for demonstration of the new functionality.

    Differential revision: https://reviews.llvm.org/D64631 — grimar / ViewSVN
  418. [ARM] Adjust how NEON shifts are lowered

    This adjusts the way that we lower NEON shifts to use a DAG target node, not
    via a neon intrinsic. This is useful for handling MVE shifts operations in the
    same the way. It also renames some of the immediate shift nodes for
    consistency, and moves some of the processing of immediate shifts into
    LowerShift allowing it to capture more cases.

    Differential Revision: https://reviews.llvm.org/D64426 — dmgreen / ViewSVN
  419. [Loop Peeling] Fix the bug with IDom setting for exit loops

    It is possible that loop exit has two predecessors in a loop body.
    In this case after the peeling the iDom of the exit should be a clone of
    iDom of original exit but no a clone of a block coming to this exit.

    Reviewers: reames, fhahn
    Reviewed By: reames
    Subscribers: hiraditya, zzheng, llvm-commits
    Differential Revision: https://reviews.llvm.org/D64618 — skatkov / ViewSVN
  420. [LoopVectorize] Pass unfiltered list of arguments to getIntrinsicInstCost.

    We do not compute the scalarization overhead in getVectorIntrinsicCost
    and TTI::getIntrinsicInstrCost requires the full arguments list. — fhahn / ViewSVN
  421. [Loop Peeling] Enable peeling for loops with multiple exits

    This CL enables peeling of the loop with multiple exits where
    one exit should be from latch and others are basic blocks with
    call to deopt.

    The peeling is enabled under the flag which is false by default.

    Reviewers: reames, mkuper, iajbar, fhahn
    Reviewed By: reames
    Subscribers: xbolva00, hiraditya, zzheng, llvm-commits
    Differential Revision: https://reviews.llvm.org/D63923 — skatkov / ViewSVN
  422. [clangd] Added highlighting for members and methods.

    Summary: Added highlighting for members and methods.

    Reviewers: hokein, sammccall, ilya-biryukov

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64617 — jvikstrom / ViewSVN
  423. DeveloperPolicy: fix a typo — rsandifo / ViewSVN
  424. [clangd] Added highlighting to enum constants.

    Summary: VSCode does not have a scope for enum constants. So they were placed under "constant.other.enum" as that seems to be the most correct scope for enum constants. However, this makes theia color them blue (the same color it uses for keywords).

    Reviewers: hokein, sammccall, ilya-biryukov

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64624 — jvikstrom / ViewSVN
  425. [PowerPC] Support -mabi=ieeelongdouble and -mabi=ibmlongdouble

    gcc PowerPC supports 3 representations of long double:

    * -mlong-double-64

      long double has the same representation of double but is mangled as `e`.
      In clang, this is the default on AIX, FreeBSD and Linux musl.

    * -mlong-double-128

      2 possible 128-bit floating point representations:

      + -mabi=ibmlongdouble
        IBM extended double format. Mangled as `g`
        In clang, this is the default on Linux glibc.
      + -mabi=ieeelongdouble
        IEEE 754 quadruple-precision format. Mangled as `u9__ieee128` (`U10__float128` before gcc 8.2)
        This is currently unavailable.

    This patch adds -mabi=ibmlongdouble and -mabi=ieeelongdouble, and thus
    makes the IEEE 754 quadruple-precision long double available for
    languages supported by clang.

    Reviewed By: hfinkel

    Differential Revision: https://reviews.llvm.org/D64283 — maskray / ViewSVN
  426. [Attributor] Deduce "nonnull" attribute

    Summary:
    Porting nonnull attribute to attributor.

    Reviewers: jdoerfert, sstefan1

    Reviewed By: jdoerfert

    Subscribers: xbolva00, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63604 — uenoku / ViewSVN
  427. [LoopUtils] Extend the scope of getLoopEstimatedTripCount

    With this patch the getLoopEstimatedTripCount function will
    accept also the loops where there are more than one exit but
    all exits except latch block should ends up with a call to deopt.

    This side exits should not impact the estimated trip count.

    Reviewers: reames, mkuper, danielcdh
    Reviewed By: reames
    Subscribers: fhahn, lebedev.ri, hiraditya, llvm-commits
    Differential Revision: https://reviews.llvm.org/D64553 — skatkov / ViewSVN
  428. Remove set but unused variable. — void / ViewSVN
  429. [LoopInfo] Introduce getUniqueNonLatchExitBlocks utility function

    Extract the code from LoopUnrollRuntime into utility function to
    re-use it in D63923.

    Reviewers: reames, mkuper
    Reviewed By: reames
    Subscribers: fhahn, hiraditya, zzheng, dmgreen, llvm-commits
    Differential Revision: https://reviews.llvm.org/D64548 — skatkov / ViewSVN
  430. [PowerPC] Support fp128 libcalls

    On PowerPC, IEEE 754 quadruple-precision libcall names use "kf" instead of "tf".

    In libgcc, libgcc/config/rs6000/float128-sed converts TF names to KF
    names. This patch implements its 24 substitution rules.

    Reviewed By: hfinkel

    Differential Revision: https://reviews.llvm.org/D64282 — maskray / ViewSVN
  431. [BPF] add unit tests for preserve_{array,union,struct}_access_index intrinsics

    This is a followup patch for https://reviews.llvm.org/D61810/new/,
    which adds new intrinsics preserve_{array,union,struct}_access_index.

    Currently, only BPF backend utilizes preserve_{array,union,struct}_access_index
    intrinsics, so all tests are compiled with BPF target.

    https://reviews.llvm.org/D61524 already added some tests for these
    intrinsics, but some of them pretty complex.
    This patch added a few unit test cases focusing on individual intrinsic
    functions.

    Also made a few clarification on language reference for these intrinsics.

    Differential Revision: https://reviews.llvm.org/D64606 — yhs / ViewSVN
  432. [NFC][PowerPC] Add the test block-placement.mir — zhangkang / ViewSVN
  433. [ValueTracking] Look through constant Int2Ptr/Ptr2Int expressions

    Summary:
    This is analogous to the int2ptr/ptr2int instruction handling introduced
    in D54956.

    Reviewers: fhahn, efriedma, spatel, nlopes, sanjoy, lebedev.ri

    Subscribers: hiraditya, bollu, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64708 — jdoerfert / ViewSVN
  434. [X86] Separate the memory size of vzext_load/vextract_store from the element size of the result type. Use them improve the codegen of v2f32 loads/stores with sse1 only.

    Summary:
    SSE1 only supports v4f32. But does have instructions like movlps/movhps that load/store 64-bits of memory.

    This patch breaks the connection between the node VT of the vzext_load/vextract_store patterns and the memory VT. Enabling a v4f32 node with a 64-bit memory VT. I've used i64 as the memory VT here. I've written the PatFrag predicate to just check the store size not the specific VT. I think the VT will only matter for CSE purposes. We could use v2f32, but if we want to start using these operations in more places a simple integer type might make the most sense.

    I'd like to maybe use this same thing for SSE2 and later as well, but that will need more work to be supported by EltsFromConsecutiveLoads to avoid regressing lit tests. I'd maybe also like to combine bitcasts with these load/stores nodes now that the types are disconnected. And I'd also like to consider canonicalizing (scalar_to_vector + load) to vzext_load.

    If you want I can split the mechanical tablegen stuff where I added the 32/64 off from the sse1 change.

    Reviewers: spatel, RKSimon

    Reviewed By: RKSimon

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64528 — ctopper / ViewSVN
  435. Improve compile time of variant.

    In particular, improve the compile time of the overload set builder
    that variant uses to determine which alternative to construct.

    Instead of having the __overload type construct itself recursively,
    this patch uses a flat construction for the overload set. — ericwf / ViewSVN
  436. Add test for variant construction with duplicate types. — ericwf / ViewSVN
  437. [TargetParser][ARM] Account dependencies when processing target features

    Teaches ARM::appendArchExtFeatures to account dependencies when processing
    target features: i.e. when you say -march=armv8.1-m.main+mve.fp+nofp it
    means mve.fp should get discarded too. (Split from D63936)

    Differential Revision: https://reviews.llvm.org/D64048 — alelab01 / ViewSVN
  438. [LV] Exclude loop-invariant inputs from scalar cost computation.

    Loop invariant operands do not need to be scalarized, as we are using
    the values outside the loop. We should ignore them when computing the
    scalarization overhead.

    Fixes PR41294

    Reviewers: hsaito, rengolin, dcaballe, Ayal

    Reviewed By: Ayal

    Differential Revision: https://reviews.llvm.org/D59995 — fhahn / ViewSVN
  439. Fix uninitialized variable analyzer warning. NFCI. — rksimon / ViewSVN
  440. Support __seg_fs and __seg_gs on x86

    Summary:
    GCC supports named address spaces macros:
      https://gcc.gnu.org/onlinedocs/gcc/Named-Address-Spaces.html

    clang does as well with address spaces:
      https://clang.llvm.org/docs/LanguageExtensions.html#memory-references-to-specified-segments

    Add the __seg_fs and __seg_gs macros for compatibility with GCC.

    <rdar://problem/52944935>

    Subscribers: jkorous, dexonsmith, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64676 — jfb / ViewSVN
  441. [clang][Driver][ARM] Favor -mfpu over default CPU features

    When processing the command line options march, mcpu and mfpu, we store
    the implied target features on a vector. The change D62998 introduced a
    temporary vector, where the processed features get accumulated. When
    calling DecodeARMFeaturesFromCPU, which sets the default features for
    the specified CPU, we certainly don't want to override the features
    that have been explicitly specified on the command line. Therefore, the
    default features should appear first in the final vector. This problem
    became evident once I added the missing (unhandled) target features in
    ARM::getExtensionFeatures.

    Differential Revision: https://reviews.llvm.org/D63936 — alelab01 / ViewSVN
  442. Cleanup whitespace in <variant>. NFC. — ericwf / ViewSVN
  443. Harden variant test added in r366022

    The test was brittle since it only went boom for one specific type, when
    really it should go boom for all of them. — ericwf / ViewSVN
  444. consistency in the release notes — sylvestre / ViewSVN
  445. [GitSVN][NFC] Mark dry-run commits as such in the log output

    Summary: This helps to avoid worries about the "dry run flag" while testing.

    Reviewers: jyknight, rnk, mehdi_amini

    Subscribers: bollu, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64697 — jdoerfert / ViewSVN
  446. Avoid eager template instantiation caused by the variant narrowing checks.

    The standard disallows narrowing conversions when constructing a variant.
    This is checked by attempting to perform braced initialization of the
    destination type from the argument type. However, braced initialization
    can force the compiler (mostly clang) to eagerly instantiate the
    constructors of the destintation type -- which can lead to errors in
    a non-immediate context.

    However, as variant is currently specified, the narrowing checks only
    observably apply when the destination type is arithmetic. Meaning we can
    skip the check for class types. Hense avoiding the hard errors.

    In order to cause fewer build breakages, this patch avoids the narrowing
    check except when the destination type is arithmetic. — ericwf / ViewSVN
  447. [InstCombine] Add assume context test; NFC

    Baseline test for D37215. — nikic / ViewSVN
  448. [Hashing] hash_1to3_bytes - avoid trunc(v + zext(x)) NFCI.

    MSVC complains about the extension to uint64_t for an addition followed by truncation back to uint32_t - add an explicit uint32_t cast to avoid this. — rksimon / ViewSVN
  449. [x86] add test for sub-with-flags opportunity (PR40483); NFC — spatel / ViewSVN
  450. Recommit "[BitcodeReader] Validate OpNum, before accessing Record array."

    This recommits r365750 (git commit 8b222ecf2769ee133691f208f6166ce118c4a164)

    Original message:

       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

       llvm-svn: 365750jkkkk — fhahn / ViewSVN
  451. [BitcodeReader] Use tighter upper bound to validate forward references.

    At the moment, bitcode files with invalid forward reference can easily
    cause the bitcode reader to run out of memory, by creating a forward
    reference with a very high index.

    We can use the size of the bitcode file as an upper bound, because a
    valid bitcode file can never contain more records. This should be
    sufficient to fail early in most cases. The only exception is large
    files with invalid forward references close to the file size.

    There are a couple of clusterfuzz runs that fail with out-of-memory
    because of very high forward references and they should be fixed by this
    patch.

    A concrete example for this is D64507, which causes out-of-memory on
    systems with low memory, like the hexagon upstream bots.

    Reviewers: t.p.northover, thegameg, jfb, efriedma, hfinkel

    Reviewed By: jfb

    Differential Revision: https://reviews.llvm.org/D64577 — fhahn / ViewSVN
  452. VirtRegMap - add missing initializers. NFCI. — rksimon / ViewSVN
  453. SlotIndexes - add missing initializer. NFCI. — rksimon / ViewSVN
  454. [MachineOutliner] Add missing initializers for OutlinedFunction. NFCI.

    Appeases MSVC/cppcheck. — rksimon / ViewSVN
  455. [Driver] Simplify AddLibgcc — maskray / ViewSVN
  456. [Driver] Simplify -lgcc & -lgcc_s

    gcc defaults to -shared-libgcc in C++ mode.
    Letting getLibGccType() return SharedLibGcc simplifies the logic. — maskray / ViewSVN
  457. [X86] Remove offset of 8 from the call to FuseInst for UNPCKLPDrr folding added in r365287.

    This was copy/pasted from above and I forgot to change it. We just
    need the default offset of 0 here.

    Fixes PR42616. — ctopper / ViewSVN
  458. Remove extra ';' to silent compiler warning.

    - Plus extra style formatting. — hliao / ViewSVN
  459. [Attributor][Fix] Never override given argument numbers — jdoerfert / ViewSVN
  460. [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
  461. Template-related improvements to Visual Studio visualizers — mps / ViewSVN
  462. [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
  463. [ARM] MVE integer abs

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

    Differential Revision: https://reviews.llvm.org/D64027 — dmgreen / ViewSVN
  464. [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
  465. [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
  466. [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
  467. 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
  468. 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
  469. [InstCombine] add tests for umin/umax via usub.sat; NFC — spatel / ViewSVN
  470. [x86] simplify cmov with same true/false operands — spatel / ViewSVN
  471. [Object] isNotObjectErrorInvalidFileType: simplify — maskray / ViewSVN
  472. [Object] isNotObjectErrorInvalidFileType: fix use-after-move — maskray / ViewSVN
  473. Fix -Wdocumentation warning. NFCI. — rksimon / ViewSVN
  474. [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
  475. Simplify with llvm::is_contained. NFC — maskray / ViewSVN
  476. 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
  477. Revert "[COFF] Add null check in case of symbols defined in LTO blobs"

    This reverts commit r365979: COFF/undefined-symbol-lto.test is failing. — phosek / ViewSVN
  478. 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
  479. [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
  480. [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
  481. [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
  482. [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
  483. [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
  484. [TSan] Tiny cleanup of UnmangleLongJmpSp for Linux/x86_64

    NFC. — yln / ViewSVN
  485. 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
  486. 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
  487. [COFF] Add null check in case of symbols defined in LTO blobs

    The test case could probably be improved further if the failure path was
    better understood.

    Fixes PR42536 — rnk / ViewSVN
  488. [Attributor][FIX] Lookup of (call site) argument attributes — jdoerfert / ViewSVN
  489. [DirectoryWatcher][test][NFC] Add information to test failure reports — Jan Korous / ViewSVN
  490. Re-land [JSONCompilationDatabase] Strip distcc/ccache/gomacc wrappers from parsed commands.

    Use //net/dir like other test cases for windows compatibility — sammccall / ViewSVN
  491. 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
  492. 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
  493. [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
  494. 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
  495. [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
  496. 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
  497. [DirectoryWatcher][NFC] Silence warnings in release build — Jan Korous / ViewSVN
  498. [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
  499. [DirectoryWatcher][linux] Fix use of uninitialized value — Jan Korous / ViewSVN
  500. [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
  501. [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
  502. 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
  503. [test][AArch64] Relax the opcode tests for FP min/max instructions. — dyung / ViewSVN
  504. 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
  505. [InstCombine] Disable fold from D64285 for non-integer types — xbolva00 / ViewSVN
  506. 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
  507. [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
  508. 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
  509. [clangd] Fix off-by-one in CodeComplete and assertion in Dex — sammccall / ViewSVN
  510. 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
  511. 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
  512. 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
  513. [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
  514. Revert "Reland [clang] DirectoryWatcher"

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

    This reverts commit abce8c457dd3de6b156756e547cc0eefb7653c79.

    + Fix the build for platforms that don't have DW implementated. — Jan Korous / ViewSVN
  516. [X86] Use MachineInstr::findRegisterDefOperand to simplify some code in optimizeCompareInstr. NFCI — ctopper / ViewSVN
  517. [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
  518. 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
  519. [SystemZ] Fix build bot failure after r365932

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

    This is NFC, but required for future commit.

    Differential Revision: https://reviews.llvm.org/D64649 — rampitec / ViewSVN
  522. Addition to rL365925, removing remaining virtuals — sstefan / ViewSVN
  523. [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
  524. 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
  525. [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
  526. 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
  527. [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
  528. [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
  529. Remove unused methods in Sancov. — leonardchan / ViewSVN
  530. [WebAssembly] i32.const operands should be signed

    Summary:
    This was causing large addresses to be emitted as negative numbers,
    which rightfully caused crashes in binaryen.

    Reviewers: aheejin, dschuff

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64612 — tlively / ViewSVN
  531. [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
  532. [X86][AVX] Add PR34359 shuffle test case. — rksimon / ViewSVN
  533. [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
  534. [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
  535. [libc++] Add XFAILs for CTAD tests on older compilers — Louis Dionne / ViewSVN
  536. 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
  537. 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
  538. [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
  539. 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
  540. Fix some minor coding-style issues in git-llvm. — jyknight / ViewSVN
  541. 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
  542. [FunctionAttrs] Add a test for "nofree" function attribute

    This patch adds a test for nofree function attribute. — uenoku / ViewSVN
  543. [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
  544. Add missing <atomic> include to appease MSVC builds. — rksimon / ViewSVN
  545. 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
  546. Test commit — uenoku / ViewSVN
  547. 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
  548. [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
  549. [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
  550. [LegacyPassManager] Small ModuleCount cleanup — maskray / ViewSVN
  551. Revert "[JSONCompilationDatabase] Strip distcc/ccache/gomacc wrappers from parsed commands."

    New test is failing on Windows bot

    This reverts commit 9c0391b36a76f8e3949588de3f44b7314c2318bf. — russell_gallop / ViewSVN
  552. cmake: Fix install of libclang-cpp.so when LLVM_INSTALL_TOOLCHAIN_ONLY=ON

    Summary:
    If CLANG_LINK_CLANG_DYLIB is also enabled, then this library needs to be
    installed.

    Fixes PR42575.

    Reviewers: beanz, smeenai

    Subscribers: mgorny, cfe-commits

    Tags: #clang

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

    Conflicts:
    clang/tools/clang-shlib/CMakeLists.txt — tstellar / ViewSVN
  553. [AMDGPU] Restrict v_cndmask_b32 abs/neg modifiers to f32

    Summary:
    D64497 allowed abs/neg source modifiers on v_cndmask_b32 but it doesn't
    make any sense to apply them to f16 operands; they would interpret the
    bits of the value as an f32, giving nonsensical results. This patch
    restricts them to f32 operands.

    Reviewers: arsenm, hakzsam

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64636 — foad / ViewSVN
  554. Delete dead stores — maskray / ViewSVN
  555. 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
  556. Delete dead stores — maskray / ViewSVN
  557. 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
  558. Revert "[clangd] Implement typeHierarchy/resolve for subtypes"

    Causing test failure on Windows bot

    This reverts commit 5b9484e559d44bd923fc290e335891b1dd2e17c4. — russell_gallop / ViewSVN
  559. [Driver] Delete dead code — maskray / ViewSVN
  560. [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
  561. [DAGCombine] narrowExtractedVectorBinOp - wrap subvector extraction in helper. NFCI.

    First step towards supporting 'free' subvector extractions other than concat_vectors. — rksimon / ViewSVN
  562. [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
  563. [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
  564. [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
  565. Fix test case of llvm-nm using implicit a.out — abrachet / ViewSVN
  566. [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
  567. [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
  568. [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
  569. [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
  570. Revert "[DwarfDebug] Dump call site debug info"

    A build failure was found on the SystemZ platform.

    This reverts commit 9e7e73578e54cd22b3c7af4b54274d743b6607cc. — djtodoro / ViewSVN
  571. [clangd] Move the expandAuto tweak from global namespace into annoymous namespace. — hokein / ViewSVN
  572. [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
  573. [NFC][PowerPC] Added test for MachinePRE. — lkail / ViewSVN
  574. [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
  575. [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
  576. 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
  577. [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
  578. Test commit. NFC.

    Formatting fix. — bryant / ViewSVN
  579. [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
  580. [YAMLIO] Wrap explicit specialization in llvm::yaml to appease build bots — maskray / ViewSVN
  581. Fix odd variable names. — ruiu / ViewSVN
  582. [test] Delete trailing spaces from YAML tests after D65566/r365869 — maskray / ViewSVN
  583. [test] Delete trailing spaces from YAML tests — maskray / ViewSVN
  584. test/Driver/fsanitize.c: delete -target x86_64-linux-gnu from tests that should always be available

    Follow-up of D64317/r365587. — maskray / ViewSVN
  585. [AMDGPU] Fixed comment. NFC. — rampitec / ViewSVN
  586. [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
  587. [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
  588. [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
  589. [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
  590. docs/GithubMove.rst: Add link to GitHub migration status page — tstellar / ViewSVN
  591. 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
  592. NFC: Unforget a colon in a few CHECK: directives.

    Differential Revision: https://reviews.llvm.org/D64526 — dergachev / ViewSVN
  593. [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
  594. [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
  595. [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
  596. [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
  597. 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
  598. Codegen, NFC: 32bit test in auto-var-init.cpp — Vitaly Buka / ViewSVN
  599. Mark destroying delete test as UNSUPPORTED with clang 7 — ericwf / ViewSVN
  600. Tolerate import errors in "not.py" implementation — ericwf / ViewSVN
  601. Reorganize the 'bit' header to make most of the facilities available for internal use pre-C++20. NFC for external users — marshall / ViewSVN
  602. NFC: lit: python3 compatibility for functions
    usePlatformSdkOnDarwin/findPlatformSdkVersionOnMacOS

    These functions should decode subprocess output — arphaman / ViewSVN
  603. [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
  604. 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
  605. [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
  606. Add another buildbot username to the workaround list — ericwf / ViewSVN
  607. 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
  608. [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
  609. [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
  610. [clangd] Fix MSVC build failure.

    http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/26898 — probinson / ViewSVN
  611. 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
  612. 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
  613. 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
  614. [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
  615. [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
  616. [AMDGPU] Fixed asan error with agpr spilling

    Instruction was used after it was erased. — rampitec / ViewSVN
  617. 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
  618. CodeGen: Suppress c++ warnings in test — Vitaly Buka / ViewSVN
  619. [mips] Simplify test case. NFC

    Before rL295040 the linker just crashed when a GOT relocation (R_MIPS_GOT16)
    comes from a merge section. To ensure that this bug still fixed it's enough
    to check that the linker does not crash and create GOT entries. — atanasyan / ViewSVN
  620. [AMDGPU] gfx908 agpr spilling

    Differential Revision: https://reviews.llvm.org/D64594 — rampitec / ViewSVN
  621. 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
  622. 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
  623. [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
  624. [AMDGPU] gfx908 hazard recognizer

    Differential Revision: https://reviews.llvm.org/D64593 — rampitec / ViewSVN
  625. [InstCombine][NFCI] Add more test coverage to onehot_merge.ll

    Prep work for upcoming patch D64275. — huihuiz / ViewSVN
  626. [analyzer] exploded-graph-rewriter: Fix filenames in program point.

    Fix a typo in JSON field name. — dergachev / ViewSVN
  627. [AMDGPU] gfx908 scheduling

    Differential Revision: https://reviews.llvm.org/D64590 — rampitec / ViewSVN
  628. [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
  629. [AMDGPU] gfx908 mfma support

    Differential Revision: https://reviews.llvm.org/D64584 — rampitec / ViewSVN
  630. [COFF] Share the tail in delayimport symbol thunks

    E.g. for x86_64, previously each symbol's thunk was 87 bytes. Now
    there's a 12 byte thunk per symbol, plus a shared 83 byte tail
    function.

    This is similar to what both MS link.exe and GNU tools do for
    delay imports.

    Differential Revision: https://reviews.llvm.org/D64288 — mstorsjo / ViewSVN
  631. CodeGen, NFC: Test for auto-init for 32bit pointers — Vitaly Buka / ViewSVN
  632. [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
  633. Open native file handles to avoid converting from FDs, NFC

    Follow up to r365588. — rnk / ViewSVN
  634. [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
  635. [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
  636. [NFC] Revisited tests for D64285 — xbolva00 / ViewSVN
  637. Revert "[CGDebugInfo] Simplify EmitFunctionDecl parameters, NFC"

    This reverts commit 1af41074445229fea66b99710a850e5f42ecfa95. — Vedant Kumar / ViewSVN
  638. [NVPTX] Remove now unused atomic.load.add.f32 intrinsics — d0k / ViewSVN
  639. [PowerPC][NFC] Update testcase to avoid dead code

    The original testcase might be optimized out due to dead code,
    update the testcase to avoid it. — jsji / ViewSVN
  640. [CGDebugInfo] Simplify EmitFunctionDecl parameters, NFC

    Replace a `llvm::Function *` parameter with a bool, which seems harder
    to set to the wrong value by accident.

    Differential Revision: https://reviews.llvm.org/D64540 — Vedant Kumar / ViewSVN
  641. [Driver] -noprofilelib flag

    This flag is analoguous to other flags like -nostdlib or -nolibc
    and could be used to disable linking of profile runtime library.
    This is useful in certain environments like kernel, where profile
    instrumentation is still desirable, but we cannot use the standard
    runtime library. — phosek / ViewSVN
  642. [lld-link] implement -thinlto-{prefix,object-suffix}-replace

    Summary:
    Adds the following two options to lld-link:

    -thinlto-prefix-replace: allows replacing a prefix in paths generated
    for ThinLTO. This can be used to ensure index files and native object
    files are stored in unique directories, allowing multiple distributed
    ThinLTO links to proceed concurrently.

    -thinlto-object-suffix-replace: allows replacing a suffix in object
    file paths involved in ThinLTO. This allows minimized index files to
    be used for the thin link while storing the paths to the full bitcode
    files for subsequent steps (code generation and final linking).

    Reviewers: ruiu, tejohnson, pcc, rnk

    Subscribers: mehdi_amini, steven_wu, dexonsmith, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64542 — inglorion / ViewSVN
  643. [TSan] Move DECLARE_REAL macro outside of namespace

    This should fix the "undefined reference to
    tsan::interception::real_setjmp" linker errors. — yln / ViewSVN
  644. [profile][test] Fix Profile-* :: instrprof-merge.c etc. on SPARC

    While working on https://reviews.llvm.org/D40900 (which effectively is about enabling compiler-rt on sparc these days), I came across two failing profile testcases:

      Profile-sparc :: instrprof-merge-match.test
      Profile-sparc :: instrprof-merge.c
      Profile-sparcv9 :: instrprof-merge-match.test
      Profile-sparcv9 :: instrprof-merge.c

    All of them crashed with a SIGBUS in __llvm_profile_merge_from_buffer:

      Thread 2 received signal SIGSEGV, Segmentation fault.
      [Switching to Thread 1 (LWP 1)]
      0x00012368 in __llvm_profile_merge_from_buffer (
          ProfileData=0x2384c <main.Buffer> "\377lprofR\201", ProfileSize=360)
          at /vol/llvm/src/llvm/local/projects/compiler-rt/lib/profile/InstrProfilingMerge.c:95
      95        SrcDataEnd = SrcDataStart + Header->DataSize;

    where Header is insufficiently aligned for a strict-alignment target like SPARC.

    Fixed by forcing the alignment to uint64_t, the members of struct __llvm_profile_header,
    in the callers.

    Tested on sparcv9-sun-solaris2.11.

    https://reviews.llvm.org/D64498 — ro / ViewSVN
  645. [clangd][NFC] Decrease template depth limit in RecursiveHierarchyUnbounded test

    ...to minimize the chance of stack overflow before reaching the limit. — Jan Korous / ViewSVN
  646. [X86] Pre commit test cases for D64574. Along with a test case for PR42571. NFC — ctopper / ViewSVN
  647. [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
  648. 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
  649. [lld-link] implement -thinlto-index-only

    Summary:
    This implements -thinlto-index-only, -thinlto-index-only:,
    and -thinlto-emit-imports-files options in lld-link. They are
    analogous to their counterparts in ld.lld: -thinlto-index-only
    causes us to perform ThinLTO's thin link and write index files,
    but not perform code generation. -thinlto-index-only: does the
    same, but also writes a text file listing the native object
    files expected to be generated. -thinlto-emit-imports-files
    creates a text file next to each index file, listing the files
    to import from.

    Reviewers: ruiu, tejohnson, pcc, rnk

    Subscribers: mehdi_amini, steven_wu, dexonsmith, arphaman, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64461 — inglorion / ViewSVN
  650. [HIP] Add GPU arch gfx1010, gfx1011, and gfx1012

    Differential Revision: https://reviews.llvm.org/D64364 — yaxunl / ViewSVN
  651. [CodeGen] NVPTX: Switch from atomic.load.add.f32 to atomicrmw fadd — d0k / ViewSVN
  652. [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
  653. [NVPTX] Use atomicrmw fadd instead of intrinsics

    AutoUpgrade the old intrinsics to atomicrmw fadd. — d0k / ViewSVN
  654. gn build: Merge r365792 — nico / ViewSVN
  655. [clangd] Avoid template in Task constructor, hopefully fix MSVC build — sammccall / ViewSVN
  656. [clangd] Consume llvm::Error in test after r365792 — sammccall / ViewSVN
  657. [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
  658. [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
  659. [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
  660. 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
  661. [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
  662. gn build: Merge r365773 — nico / ViewSVN
  663. [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
  664. [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
  665. RegUsageInfoCollector: Skip calling conventions I missed before — arsenm / ViewSVN
  666. Fix support for user mode emulation when using cmake/lit.

    When using user mode emulation, i.e. cross-compiling programs for a
    different target and running them on a host under qemu user mode
    emulation, timeit and fpcmp should have host versions, not target
    versions.

    Running under user mode emulation had been broken for a while,
    presumably since https://reviews.llvm.org/rT341257

    I first tried an alternative approach where fpcmp would be run under qemu user
    mode emulation too.  That in itself worked, but if going for that approach, for
    orthogonality reasons, we probably should also run the other helper programs as
    if they were running on the target, i.e. also under qemu user mode emulation.
    I ran into issues with running timeit under qemu user mode emulation and also
    running RunSafely.sh under user mode emulation doesn't seem trivial.

    In the end, it seemed better to me to explicitly add a cmake option to mark
    that we're running under qemu user mode emulation, and in that mode, only aim
    to run the test/benchmark under qemu user mode emulation, rather than also all
    the helper programs (such as fpcmp, timeit, RunSafely.sh) under it (which is
    what would be needed if we just kept on using only the RUN_UNDER option for
    qemu user mode emulation.

    Differential Revision: https://reviews.llvm.org/D61597 — kbeyls / ViewSVN
  667. AMDGPU/GlobalISel: Move kernel argument handling to separate function — arsenm / ViewSVN
  668. Fix missing C++ mode comment — arsenm / ViewSVN
  669. GlobalISel: Use Register — arsenm / ViewSVN
  670. 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
  671. [clangd] Remove an extra ";", NFC — hokein / ViewSVN
  672. 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
  673. [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
  674. [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
  675. [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
  676. [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
  677. [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
  678. [WebAssembly] Import __stack_pointer when building -pie binaries

    The -pie binary doesn't know that layout ahead of time so needs to
    import the stack pointer from the embedder, just like we do already
    for shared libraries.

    This change is needed in order to address:
    https://github.com/emscripten-core/emscripten/issues/8915

    Differential Revision: https://reviews.llvm.org/D64516 — sbc / ViewSVN
  679. OpaquePtr: switch to GlobalValue::getValueType in a few places. NFC. — Tim Northover / ViewSVN
  680. 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
  681. OpaquePtr: use load instruction directly for type. NFC. — Tim Northover / ViewSVN
  682. 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
  683. [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
  684. [NFC] Updated tests for D64285 — xbolva00 / ViewSVN
  685. [clangd] Remove the extra ";", NFC — hokein / ViewSVN
  686. [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
  687. [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
  688. [ELF] Handle non-glob patterns before glob patterns in version scripts & fix a corner case of --dynamic-list

    This fixes PR38549, which is silently accepted by ld.bfd.
    This seems correct because it makes sense to let non-glob patterns take
    precedence over glob patterns.

    lld issues an error because
    `assignWildcardVersion(ver, VER_NDX_LOCAL);` is processed before `assignExactVersion(ver, v.id, v.name);`.

    Move all assignWildcardVersion() calls after assignExactVersion() calls
    to fix this.

    Also, move handleDynamicList() to the bottom. computeBinding() called by
    includeInDynsym() has this cryptic rule:

        if (versionId == VER_NDX_LOCAL && isDefined() && !isPreemptible)
          return STB_LOCAL;

    Before the change:

    * foo's version is set to VER_NDX_LOCAL due to `local: *`
    * handleDynamicList() is called
      - foo.computeBinding() is STB_LOCAL
      - foo.includeInDynsym() is false
      - foo.isPreemptible is not set (wrong)
    * foo's version is set to V1

    After the change:

    * foo's version is set to VER_NDX_LOCAL due to `local: *`
    * foo's version is set to V1
    * handleDynamicList() is called
      - foo.computeBinding() is STB_GLOBAL
      - foo.includeInDynsym() is true
      - foo.isPreemptible is set (correct)

    Reviewed By: ruiu

    Differential Revision: https://reviews.llvm.org/D64550 — maskray / ViewSVN
  689. [ELF] Warn rather than error when duplicate version assignments occur

    In lvm2, libdevmapper.so is linked with a version script with duplicate
    version assignments:

        DM_1_02_138 { global: ... dm_bitset_parse_list; ... };
        DM_1_02_129 { global: ... dm_bitset_parse_list; ... };

    ld.bfd silently accepts this while gold issues a warning. We currently
    error, thus inhibit producing the executable. Change the error to
    warning to allow this case, and improve the message.

    There are some cases where ld.bfd error
    `anonymous version tag cannot be combined with other version tags`
    but we just warn. It is probably OK for now.

    Reviewed By: grimar, ruiu

    Differential Revision: https://reviews.llvm.org/D64549 — maskray / ViewSVN
  690. [InstCombine] Reorder recently added/improved pow transformations

    Changed cases are now faster with exp2. — xbolva00 / ViewSVN
  691. 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
  692. [clangd] Fix windows buildbots — kadircet / ViewSVN
  693. [X86] Regenerate intrinsics tests. NFCI. — rksimon / ViewSVN
  694. [AMDGPU] Regenerate idot tests. NFCI.

    Reduces diff in D63281. — rksimon / ViewSVN
  695. [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
  696. [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
  697. [clangd] Add a missing "return nullptr;" to the SelectionTree::commonAncestor.

    This would fix some mysterious crashes on codeAction in clangd. — hokein / ViewSVN
  698. [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
  699. [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
  700. [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
  701. [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
  702. [NFC][PowerPC] Added test to track current behaviour of TailDup — lkail / ViewSVN
  703. [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
  704. [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
  705. [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
  706. 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
  707. Remove some redundant code from r290372 and improve a comment. — foad / ViewSVN
  708. [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
  709. [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
  710. [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
  711. Fix build breakage on Win32. — ruiu / ViewSVN
  712. [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
  713. 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
  714. Fix build breakage on Darwin. — ruiu / ViewSVN
  715. Update comments for r365730. NFC. — ruiu / ViewSVN
  716. Fix build breakage on Win32. — ruiu / ViewSVN
  717. [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
  718. [Coding style change][lld] Rename variables for non-ELF ports

    This patch does the same thing as r365595 to other subdirectories,
    which completes the naming style change for the entire lld directory.

    With this, the naming style conversion is complete for lld.

    Differential Revision: https://reviews.llvm.org/D64473 — ruiu / ViewSVN
  719. [InstCombine][NFCI] Add test coverage to onehot_merge.ll

    Prep work for upcoming patch D64275. — huihuiz / ViewSVN
  720. 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
  721. [SCEV] teach SCEV symbolical execution about overflow intrinsics folding.
    Differential Revision: https://reviews.llvm.org/D64422 — shchenz / ViewSVN
  722. Change another test I missed in r365724 — nico / ViewSVN
  723. 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
  724. 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
  725. [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
  726. 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
  727. [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
  728. [AMDGPU] gfx908 atomic fadd and atomic pk_fadd

    Differential Revision: https://reviews.llvm.org/D64435 — rampitec / ViewSVN
  729. [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
  730. [AMDGPU] gfx908 dot instruction support

    Differential Revision: https://reviews.llvm.org/D64431 — rampitec / ViewSVN
  731. Attempt to fix bots after r365703 — nico / ViewSVN
  732. 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
  733. 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
  734. [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
  735. Add IsBytewiseValue unit test

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63966 — Vitaly Buka / ViewSVN
  736. 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
  737. 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
  738. [TSan] Fix linker error on Linux/AArch64 — yln / ViewSVN
  739. 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
  740. [X86] Add patterns with and_flag_nocf for BLSI and TBM instructions.

    Fixes similar issues to r352306. — ctopper / ViewSVN
  741. [X86] Add a few more TBM and BLSI test cases that show the same issue that r352306 fixed for BLSR. — ctopper / ViewSVN
  742. 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
  743. [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
  744. [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
  745. [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

#4170 (Jul 10, 2019 2:34:36 PM)

  1. [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
  2. [X86] Remove unused variable. NFC — ctopper / ViewSVN
  3. My first test commit. — saar.raz / ViewSVN
  4. [NFC][InstCombine] Comb through just-added "omit mask before left-shift" tests once more — lebedevri / ViewSVN
  5. [TSan] Fix compiler error on Linux/AArch64 — yln / ViewSVN
  6. 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
  7. [OPENMP]Remove not used check line from the test, NFC. — abataev / ViewSVN
  8. [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
  9. gn build: Merge r365687 — nico / ViewSVN
  10. [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
  11. Revert "[ELF] Update test case due to llvm r365618"

    Reverting du to reverting r365618

    This reverts commit b1e76d1d41c2303f70b53e352bdefbff2a2a9d37. — nikolaprica / ViewSVN
  12. 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
  13. [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
  14. [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
  15. 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
  16. [TSan] Attempt to fix linker error on Linux/AArch64 — yln / ViewSVN

#4169 (Jul 10, 2019 11:38:14 AM)

  1. Revert "[System Model] [TTI] Update cache and prefetch TTI interfaces"

    This broke some PPC prefetching tests.

    This reverts commit 9fdfb045ae8bb643ab0d0455dcf9ecaea3b1eb3c. — greened / ViewSVN
  2. 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
  3. 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
  4. [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
  5. 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
  6. [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
  7. [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
  8. [ORC] Add custom IR compiler configuration to LLJITBuilder to enable obj caches.

    LLJITBuilder now has a setCompileFunctionCreator method which can be used to
    construct a CompileFunction for the LLJIT instance being created. The motivating
    use-case for this is supporting ObjectCaches, which can now be set up at
    compile-function construction time. To demonstrate this an example project,
    LLJITWithObjectCache, is included. — Lang Hames / ViewSVN
  9. [X86] Regenerate tests. NFCI.

    Hasn't been regenerated since the update script could merge 32/64-bit checks. — rksimon / ViewSVN
  10. [X86] Change the IR sequence for _mm_storeh_pi and _mm_storel_pi to perform the store as a <2 x float> instead of i64.

    This is similar to what we do for loadl_pi and loadh_pi. — ctopper / ViewSVN
  11. [X86] Add guards to some of the x86 intrinsic tests to skip 64-bit mode only intrinsics when compiled for 32-bit mode.

    All the command lines are for 64-bit mode, but sometimes I compile
    the tests in 32-bit mode to see what assembly we get and we need
    to skip these to do that. — ctopper / ViewSVN
  12. [X86] Add tests for an alternative sequence for _mm_storel_pi/_mm_storeh_pi intrinsics. NFC — ctopper / ViewSVN
  13. [clang] Preserve names of addrspacecast'ed values.

    Differential Revision: https://reviews.llvm.org/D63846 — vzakhari / ViewSVN
  14. [TargetLowering] support BlockAddress as "i" inline asm constraint

    Summary:
    This allows passing address of labels to inline assembly "i" input
    constraints.

    Fixes pr/42502.

    Reviewers: ostannard

    Reviewed By: ostannard

    Subscribers: void, echristo, nathanchance, ostannard, javed.absar, hiraditya, llvm-commits, srhines

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64167 — nickdesaulniers / ViewSVN
  15. [NFC][InstCombine] Fixup some tests in just-added "omit mask before left-shift" tests — lebedevri / ViewSVN
  16. ELF: Add support for R_AARCH64_ADR_PREL_PG_HI21_NC relocation.

    Differential Revision: https://reviews.llvm.org/D64456 — pcc / ViewSVN
  17. MC: AArch64: Add support for pg_hi21_nc relocation specifier.

    Differential Revision: https://reviews.llvm.org/D64455 — pcc / ViewSVN
  18. [CodeExtractor] Fix sinking of allocas with multiple bitcast uses (PR42451)

    An alloca which can be sunk into the extraction region may have more
    than one bitcast use. Move these uses along with the alloca to prevent
    use-before-def.

    Testing: check-llvm, stage2 build of clang

    Fixes llvm.org/PR42451.

    Differential Revision: https://reviews.llvm.org/D64463 — Vedant Kumar / ViewSVN
  19. [CodeExtractor] Simplify findAllocas, NFC

    Split getLifetimeMarkers out into its own method and have it return a
    struct.

    Differential Revision: https://reviews.llvm.org/D64467 — Vedant Kumar / ViewSVN
  20. GlobalISel: Legalization for G_FMINNUM/G_FMAXNUM — arsenm / ViewSVN
  21. GlobalISel: Define the full family of FP min/max instructions — arsenm / ViewSVN
  22. [X86] EltsFromConsecutiveLoads - remove duplicate check for element size. NFCI.

    We've already checked that each element is the correct contributory size for VT when we inspect the elements for Undef/Zero/Load. — rksimon / ViewSVN
  23. [X86] EltsFromConsecutiveLoads - ensure element reg/store sizes are the same size. NFCI.

    This renames the type so it doesn't sound like its based off the load size - as we're moving towards supporting combining loads of different sizes. — rksimon / ViewSVN
  24. AMDGPU: Serialize mode from MachineFunctionInfo — arsenm / ViewSVN
  25. [PatternMatch] Generalize m_SpecificInt_ULT() to take ICmpInst::Predicate

    As discussed in the original review, this may be useful,
    so let's just do it. — lebedevri / ViewSVN
  26. [Remarks] Add cl::Hidden to -remarks-yaml-string-table

    It was showing up in a lot of unrelated tools. — thegameg / ViewSVN
  27. 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
  28. [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
  29. [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

#4168 (Jul 10, 2019 8:07:14 AM)

  1. [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
  2. [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
  3. [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
  4. 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
  5. [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
  6. [InferFunctionAttrs] add/adjust tests for dereferenceable; NFC

    Based on review comments for D64258. — spatel / ViewSVN
  7. [LLD][ELF] - Linkerscript: fix FILL() expressions handling.

    D64130 introduced a bug described in the following message:
    https://reviews.llvm.org/D64130#1571560

    The problem can happen with the following script:

    SECTIONS {
      .out : {
    ...
       FILL(0x10101010)
       *(.aaa)
    ...
    }

    The current code tries to read (0x10101010) as an expression and
    does not break when meets *, what results in a script parsing error.

    In this patch, I verify that FILL command's expression always wrapped in ().
    And at the same time =<fillexp> expression can be both wrapped or unwrapped.
    I checked it matches to bfd/gold.

    Differential revision: https://reviews.llvm.org/D64476 — grimar / ViewSVN
  8. [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
  9. gn build: Merge r365585 — nico / ViewSVN
  10. [clangd] Trim spaces around parsed include in include extractor — kadircet / ViewSVN
  11. [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
  12. [docs][llvm-symbolizer] Fix grammar — jhenderson / ViewSVN
  13. 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
  14. [X86] EltsFromConsecutiveLoads - cleanup Zero/Undef/Load element collection. NFCI. — rksimon / ViewSVN
  15. [MIPS GlobalISel] Select float and double phi

    Select float and double phi for MIPS32.

    Differential Revision: https://reviews.llvm.org/D64420 — petar.avramovic / ViewSVN
  16. [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
  17. [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
  18. [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
  19. [NFC][ARM] Convert lambdas to static helpers

    Break up and convert some of the lambdas in ARMLowOverheadLoops into
    static functions. — sam_parker / ViewSVN
  20. [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
  21. [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
  22. [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
  23. [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
  24. [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

#4167 (Jul 10, 2019 3:49:15 AM)

  1. [ELF] Update test case due to llvm r365618 — nikolaprica / ViewSVN
  2. Fix const/non-const lambda return type warning. NFCI. — rksimon / ViewSVN
  3. Fix "result of 32-bit shift implicitly converted to 64 bits" warning. NFCI. — rksimon / ViewSVN
  4. [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
  5. [test-suite] Fix RISC-V Support in benchmark 1.3.0

    Summary:
    Fixed by backporting the upstream fix from here:
      https://github.com/google/benchmark/pull/833

    Reviewers: lebedev.ri

    Reviewed By: lebedev.ri

    Subscribers: asb, kito-cheng, shiva0217, rogfer01, rkruppe, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64237 — lenary / ViewSVN
  6. [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
  7. [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
  8. [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
  9. [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
  10. Make functions and member variables distinguishable even after the name style change. NFC. — ruiu / ViewSVN
  11. [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
  12. [docs][llvm-dwarfdump] Normalise some wording — jhenderson / ViewSVN
  13. [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
  14. [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
  15. [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
  16. [Syntax] Add assertion to catch invalid tokens early. NFC

    To help with identifiying root cause of a crash we are seeing. — ibiryukov / ViewSVN
  17. [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

#4166 (Jul 10, 2019 12:53:28 AM)

  1. 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

#4165 (Jul 9, 2019 11:18:29 PM)

  1. [Coding style change] Rename variables so that they start with a lowercase letter

    This patch is mechanically generated by clang-llvm-rename tool that I wrote
    using Clang Refactoring Engine just for creating this patch. You can see the
    source code of the tool at https://reviews.llvm.org/D64123. There's no manual
    post-processing; you can generate the same patch by re-running the tool against
    lld's code base.

    Here is the main discussion thread to change the LLVM coding style:
    https://lists.llvm.org/pipermail/llvm-dev/2019-February/130083.html
    In the discussion thread, I proposed we use lld as a testbed for variable
    naming scheme change, and this patch does that.

    I chose to rename variables so that they are in camelCase, just because that
    is a minimal change to make variables to start with a lowercase letter.

    Note to downstream patch maintainers: if you are maintaining a downstream lld
    repo, just rebasing ahead of this commit would cause massive merge conflicts
    because this patch essentially changes every line in the lld subdirectory. But
    there's a remedy.

    clang-llvm-rename tool is a batch tool, so you can rename variables in your
    downstream repo with the tool. Given that, here is how to rebase your repo to
    a commit after the mass renaming:

    1. rebase to the commit just before the mass variable renaming,
    2. apply the tool to your downstream repo to mass-rename variables locally, and
    3. rebase again to the head.

    Most changes made by the tool should be identical for a downstream repo and
    for the head, so at the step 3, almost all changes should be merged and
    disappear. I'd expect that there would be some lines that you need to merge by
    hand, but that shouldn't be too many.

    Differential Revision: https://reviews.llvm.org/D64121 — ruiu / ViewSVN
  2. 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

#4164 (Jul 9, 2019 8:21:04 PM)

  1. [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
  2. [analyzer] CastValueChecker: Remove a dump()

    Summary: Fix a nit. — charusso / ViewSVN
  3. [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
  4. [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
  5. [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
  6. 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

#4163 (Jul 9, 2019 5:23:51 PM)

  1. [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
  2. Revert "[analyzer] CastValueChecker: Model casts"

    This reverts commit 27cf6664437efd640bb6db5594bafcce68fa2854. — charusso / ViewSVN
  3. 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
  4. [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
  5. Revert [clang] DirectoryWatcher

    This reverts r365574 (git commit 31babea94a3ed38a140540f2252cf043dacec1f7) — rnk / ViewSVN
  6. [Bitcode] Explicitly include Bitstream/BitCodes.h and BitstreamWriter.h

    This fixes a modules issue. — thegameg / ViewSVN
  7. [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
  8. [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
  9. [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
  10. [clangd] fix assert in test after r365531.

    Unverified because CMake/ninja seems to be broken... — sammccall / ViewSVN
  11. AMDGPU/GlobalISel: Fix legality for G_BUILD_VECTOR — arsenm / ViewSVN
  12. [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
  13. [AMDGPU] gfx908 v_pk_fmac_f16 support

    Differential Revision: https://reviews.llvm.org/D64433 — rampitec / ViewSVN
  14. gn build: Merge r365536. — pcc / ViewSVN
  15. gn build: Merge r365532. — pcc / ViewSVN
  16. gn build: Merge r365541. — pcc / ViewSVN
  17. gn build: Merge r365531. — pcc / ViewSVN
  18. 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
  19. GlobalISel: Combine unmerge of merge with intermediate cast

    This eliminates some illegal intermediate vectors when operations are
    scalarized. — arsenm / ViewSVN
  20. [Profile] Support raw/indexed profiles larger than 4GB

    rdar://45955976 — Vedant Kumar / ViewSVN
  21. [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
  22. [AMDGPU] gfx908 mAI instructions, MC part

    Differential Revision: https://reviews.llvm.org/D64446 — rampitec / ViewSVN
  23. 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
  24. 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
  25. XFAIL clang/test/Headers/max_align.c on i686 — andusy / ViewSVN
  26. 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
  27. 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
  28. [CXX] Exercise all paths through these tests.

    Differential Revision: https://reviews.llvm.org/D63894 — probinson / ViewSVN
  29. [TSan] Refine longjmp key management on Darwin

    NFC. — yln / ViewSVN
  30. [lld][WebAssembly] Report undefined symbols during scanRelocations

    This puts handling of undefined symbols in a single location.  Its
    also more in line with the ELF backend which only reports undefined
    symbols based on relocations.

    One side effect is that we no longer report undefined symbols that are
    only referenced in GC'd sections.

    This also fixes a crash reported in the emscripten toolchain:
    https://github.com/emscripten-core/emscripten/issues/8930.

    Differential Revision: https://reviews.llvm.org/D64280 — sbc / ViewSVN
  31. [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
  32. 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
  33. [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
  34. [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
  35. Fix build error for VC STL, use llvm::make_unique — rnk / ViewSVN
  36. [lld][WebAssembly] Fix name of data section in PIC mode

    This should always have been ".data".  Without this we treat the
    section as a user-defined section in other places (such as the
    generation of __start/__stop symbols).

    Differential Revision: https://reviews.llvm.org/D64439 — sbc / ViewSVN
  37. [AMDGPU] gfx908 register file changes

    Differential Revision: https://reviews.llvm.org/D64438 — rampitec / ViewSVN
  38. [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
  39. [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
  40. [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
  41. 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
  42. [X86] LowerToHorizontalOp - use count_if to count non-UNDEF ops. NFCI. — rksimon / ViewSVN
  43. [PoisonChecking] Add validation rules for "exact" on sdiv/udiv

    As directly stated in the LangRef, no ambiguity here... — reames / ViewSVN
  44. [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
  45. 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
  46. 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
  47. Revert "[TSan] Improve handling of stack pointer mangling in {set,long}jmp, pt.8"

    This reverts commit 521f77e6351fd921f5a81027c7c72addca378989. — yln / ViewSVN
  48. [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
  49. [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
  50. gn build: Merge r365503. — pcc / ViewSVN
  51. [unittest] Add the missing bogus machine register info initialization. — hliao / ViewSVN
  52. [AMDGPU] gfx908 clang target

    Differential Revision: https://reviews.llvm.org/D64430 — rampitec / ViewSVN
  53. [AMDGPU] gfx908 target

    Differential Revision: https://reviews.llvm.org/D64429 — rampitec / ViewSVN
  54. [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
  55. [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
  56. [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

#4162 (Jul 9, 2019 10:55:42 AM)

  1. AMDGPU: Fix test failing since r365512 — arsenm / ViewSVN
  2. Revert "[HardwareLoops] NFC - move hardware loop checking code to isHardwareLoopProfitable()"

    This reverts commit d95557306585404893d610784edb3e32f1bfce18. — jsji / ViewSVN
  3. 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
  4. [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
  5. Remove a comment that has been obsolete since r327679 — nico / ViewSVN
  6. [unittest] Add bogus register info.

    Reviewers: dstenb

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64421 — hliao / ViewSVN
  7. 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
  8. 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
  9. [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
  10. [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
  11. [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
  12. [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
  13. 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
  14. [mips] Show error in case of using FP64 mode on pre MIPS32R2 CPU — atanasyan / ViewSVN
  15. [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
  16. [NFC] Fixed tests — xbolva00 / ViewSVN
  17. [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
  18. [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
  19. [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
  20. [NFC] Added tests for D64285 — xbolva00 / ViewSVN
  21. [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
  22. [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
  23. 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
  24. [HardwareLoops] NFC - move hardware loop checking code to isHardwareLoopProfitable()

    Differential Revision: https://reviews.llvm.org/D64197 — shchenz / ViewSVN

#4161 (Jul 9, 2019 7:58:01 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. lld-link: Stop accepting /natvis and /fastfail in .drectve sections

    link.exe doesn't accept them either.

    Differential Revision: https://reviews.llvm.org/D64352 — nico / ViewSVN

#4160 (Jul 9, 2019 6:29:08 AM)

  1. [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
  2. [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
  3. [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
  4. [docs][llvm-objdump] Make some wording improvements/simplifications. — jhenderson / ViewSVN
  5. [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
  6. 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
  7. [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
  8. OpaquePtr: Update polly's calls to Loads.h API

    The Loads.h API changed so that a Type parameter is now mandatory in
    preparation for pointer types being opaque. Unfortunately I don't build
    polly routinely and it still had some uses. This just provides the
    (obvious) load type in each case. — Tim Northover / ViewSVN
  9. [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
  10. 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
  11. [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
  12. Reland r365355: [Syntax] Introduce syntax trees

    With a fix to a PS4 buildbot crash. — ibiryukov / ViewSVN
  13. 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
  14. [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
  15. 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
  16. [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
  17. [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

#4159 (Jul 9, 2019 3:31:40 AM)

  1. Fixed assertion — sureyeaah / ViewSVN
  2. [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
  3. [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
  4. 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
  5. 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
  6. 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
  7. [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
  8. [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
  9. 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
  10. Revert r364515 and r364524

    Jordan reports on llvm-commits a performance regression with r364515,
    backing the patch out while it's investigated. — jmorse / ViewSVN
  11. [NFC][PowerPC] Added a test to show current codegen of MachinePRE — lkail / ViewSVN

#4158 (Jul 9, 2019 1:51:37 AM)

  1. Remove trailing whitespaces in the Language Extensions doc — sylvestre / ViewSVN
  2. Add AlignConsecutiveMacros to the clang release notes — sylvestre / ViewSVN
  3. 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
  4. [ELF] Assert sizeof(SymbolUnion) <= 80

    Reviewed By: ruiu

    Differential Revision: https://reviews.llvm.org/D64077 — maskray / ViewSVN
  5. [ELF][test] Rename tail-merge-string-align2.s to merge-string-align2.s

    This test was added by D64200/r365139 to check we don't merge
    SHF_MERGE|SHF_STRINGS sections with different alignments (that wastes
    space and can make MergeTailAlignment::Builder out of sync).

    It has nothing to do with tail merge (-O2), so rename it. — maskray / ViewSVN
  6. [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

#4157 (Jul 8, 2019 10:57:51 PM)

  1. 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
  2. [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
  3. [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
  4. 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
  5. [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
  6. [LLD] NFC: Fixed GCC warning in ELF/Arch/RISCV.cpp

    GCC emits warning on this line:
    error: enumeral and non-enumeral type in conditional
    expression [-Werror=extra]

    Change-Id: I04969cc32e27e310968b88ebaa4e1c4894528d74 — dendibakh / 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

#4156 (Jul 8, 2019 7:32:23 PM)

  1. [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
  2. [PowerPC][MachinePipeliner][NFC] Add a testcase for Phi bug. — jsji / ViewSVN
  3. [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
  4. [LoopPred] Stylistic improvement to recently added NE/EQ normalization [NFC] — reames / ViewSVN
  5. [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
  6. [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
  7. [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
  8. [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
  9. [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
  10. 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
  11. [TSan] Fix linker error for Linux/AArch64 — yln / ViewSVN
  12. 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
  13. 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
  14. [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
  15. clang-cl: Port cl.exe's C4659 to clang-cl

    Differential Revision: https://reviews.llvm.org/D64349 — nico / ViewSVN
  16. [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
  17. [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
  18. [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

#4155 (Jul 8, 2019 4:35:48 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
  4. [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
  5. Fix line endings. NFC — probinson / ViewSVN
  6. [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
  7. [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
  8. 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
  9. Add parentheses to silence warnings. — void / ViewSVN
  10. [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
  11. Add parentheses to silence warnings. — void / ViewSVN
  12. Add parentheses to silence warning. — void / ViewSVN
  13. 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

#4154 (Jul 8, 2019 2:41:26 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
  4. Revert "Reapply [llvm-ar][test] Increase llvm-ar test coverage"

    llvm-ar.extract.test has been failing on greendragon and gone unfixed. — jfb / ViewSVN
  5. [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
  6. [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
  7. A test commit following 'Obtaining Commit Access' (https://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access) — jcai19 / ViewSVN
  8. [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
  9. AMDGPU: Fix unused variable in release build — arsenm / ViewSVN
  10. Add missing declarations of explicit member specializations.

    This should fix the build under -Wundefined-func-template and certain
    versions of GCC. — rsmith / ViewSVN
  11. 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
  12. Revert "[TSan] Attempt to fix iOS on-device test"

    This reverts commit a2ca358291a3a621bfae66eeb01f51eeb69d2dd4. — yln / ViewSVN
  13. [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
  14. AMDGPU: Fix stray typing — arsenm / ViewSVN
  15. 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
  16. 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
  17. AMDGPU: Move DEBUG_TYPE definition below includes — arsenm / ViewSVN
  18. Revert "[TSan] Attempt to fix linker error for Linux on AArch64"

    This reverts commit be4148062b155f3be52e0f6ebcb228f2dc137dcf. — yln / ViewSVN
  19. 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
  20. 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
  21. [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
  22. [SCEV] Fix for PR42397. SCEVExpander wrongly adds nsw to shl instruction.

    Change-Id: I76c9f628c092ae3e6e78ebdaf55cec726e25d692 — dendibakh / ViewSVN
  23. [InstCombine] add tests for insert of same splatted scalar; NFC — spatel / ViewSVN
  24. Update gn files — Vitaly Buka / ViewSVN
  25. 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
  26. 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
  27. Replace temporary variable matches in test since r363952 causes an
    extra temporary variable to be created. — akhuang / ViewSVN
  28. [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
  29. [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
  30. Update gn files — Vitaly Buka / ViewSVN
  31. [AMDGPU][MC][DOC] Updated AMD GPU assembler syntax description.

    Corrected a typo. — dpreobra / ViewSVN
  32. [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
  33. [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
  34. 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
  35. AMDGPU: Move waitcnt intrinsic to instruction definition pattern — arsenm / ViewSVN
  36. [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
  37. [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
  38. Add, and infer, a nofree function attribute

    Removing dead code leftover from refactor.

    Reviewers: jdoerfert

    Differential Revision: https://reviews.llvm.org/D49165 — homerdin / ViewSVN
  39. GlobalISel: Convert some build functions to using SrcOp/DstOp — arsenm / ViewSVN
  40. [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
  41. 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
  42. [Bitcode][NFC] Remove unused variable from BitcodeAnalyzer — thegameg / ViewSVN
  43. 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
  44. 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
  45. [docs][llvm-readobj][llvm-readelf] Improve wording — jhenderson / ViewSVN
  46. [InstCombine] fix typo in test; NFC

    I added this test in rL365325, but didn't mean to create an undef insert. — spatel / ViewSVN
  47. [PowerPC][NFC]Update testcases using script. — jsji / ViewSVN

#4153 (Jul 8, 2019 8:24:34 AM)

  1. [OPENMP]Add -Wunintialized to the erroneous tests for future fix PR42392,
    NFC. — abataev / ViewSVN
  2. [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
  3. [RISCV][NFC] Make use of Triple::isRISCV

    Use new helper introduced in rL365327. — asb / ViewSVN
  4. [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
  5. [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
  6. [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
  7. [InstCombine] add tests for splat shuffles; NFC — spatel / ViewSVN
  8. [Float2Int] Add support for unary FNeg to Float2Int

    Differential Revision: https://reviews.llvm.org/D63941 — mcinally / ViewSVN
  9. [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
  10. [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
  11. [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
  12. GlobalISel: widenScalar for G_BUILD_VECTOR — arsenm / ViewSVN
  13. 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
  14. 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
  15. Revert [llvm-ar][test] Increase llvm-ar test coverage

    Reverted due to test failures

    Differential Revision: https://reviews.llvm.org/D63935 — gbreynoo / ViewSVN
  16. [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
  17. [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
  18. [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
  19. [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
  20. [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
  21. [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

#4146 (Jul 4, 2019 3:10:49 AM)

  1. [clangd] Turn background-index on by default

    Reviewers: sammccall

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64019 — kadircet / ViewSVN
  2. [clangd] Make HadErrors part of background index's internal state

    Reviewers: sammccall

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64147 — kadircet / ViewSVN
  3. [clangd] Add HadErrors field into shards

    Reviewers: sammccall

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64133 — kadircet / ViewSVN
  4. [clangd] Store hash of command line in index shards.

    Summary: This is to enable cache invalidation when command line flags changes.

    Reviewers: sammccall

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64018 — kadircet / ViewSVN
  5. [clangd] Also cache failures while indexing

    Summary:
    Clangd currently doesn't cache any indexing failures, which results in
    retrying those failed files even if their contents haven't changed.

    Reviewers: sammccall

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D63986 — kadircet / ViewSVN
  6. Fix MSVC "not all control paths return a value" warnings. NFCI. — rksimon / ViewSVN
  7. [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
  8. [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
  9. [ARM] Added testing for D64160. NFC

    Adds some extra vsel testing and regenerates long shift and saturation bitop
    tests. — dmgreen / ViewSVN
  10. [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
  11. [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
  12. [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
  13. [clangd] Add missing changes for 365111 — jvikstrom / ViewSVN

#4145 (Jul 4, 2019 1:08:54 AM)

  1. [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
  2. [NFC][PowerPC] Make the PowerPC scheduling strategy feature only control the strategy instead of the scheduler. — qshanz / ViewSVN
  3. [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
  4. [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

#4144 (Jul 3, 2019 11:02:06 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

#4143 (Jul 3, 2019 8:46:06 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

#4142 (Jul 3, 2019 6:41:56 PM)

  1. [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
  2. [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
  3. [Remarks][NFC] Move the string table parsing out of the parser constructor

    Make the parser take an already-parsed string table. — thegameg / ViewSVN
  4. [WebAssembly] Update test failure explanations — dschuff / ViewSVN
  5. [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
  6. [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
  7. 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
  8. [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

#4141 (Jul 3, 2019 4:44:42 PM)

  1. 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
  2. [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
  3. GlobalISel: Fix widenScalar for pointer typed G_MERGE_VALUES — arsenm / ViewSVN
  4. 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
  5. [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
  6. [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
  7. [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
  8. 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
  9. [analyzer] exploded-graph-rewriter: Implement a black-and-white color scheme.

    For accessibility!

    Differential Revision: https://reviews.llvm.org/D64153 — dergachev / ViewSVN
  10. 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
  11. Add tests for regex_match ambiguity (aka LWG2273). NFC. Reviewed as https://reviews.llvm.org/D63051 — marshall / ViewSVN
  12. 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
  13. Fixed a link in ReleaseNotes.rst (follow-up to r365007) — gribozavr / ViewSVN
  14. [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
  15. Try to XFAIL mri-utf8.test on Mac — rnk / ViewSVN
  16. [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
  17. 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
  18. [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
  19. [LFTR] Remove a stray variable shadow *of the same value* [NFC] — reames / ViewSVN
  20. [LFTR] Style and comment changes to clarify the narrow vs wide bitwidth evaluation behavior [NFC] — reames / ViewSVN
  21. [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
  22. 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
  23. [libc++] Update availability markup for Filesystem on Apple platforms — Louis Dionne / ViewSVN
  24. [LFTR] Remove falsely generalized (dead) code [NFC] — reames / ViewSVN
  25. [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
  26. [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
  27. [macCatalyst] Print out macCatalyst in llvm-objdump for the platform

    'macCatalyst' is more readable than 'maccatalyst'. — arphaman / ViewSVN
  28. [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
  29. [X86] Update test; NFC

    This updates pr38743.ll after D62605. — rlougher / ViewSVN

#4140 (Jul 3, 2019 10:49:18 AM)

  1. [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
  2. [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
  3. [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
  4. [X86] ComputeNumSignBitsForTargetNode - add target shuffle support. — rksimon / ViewSVN
  5. [NFC][InstCombine] onehot_merge.ll: add last few tests in the state they regress to in D62818 — lebedevri / ViewSVN
  6. [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
  7. Use getAllOnesConstants instead of -1 in DAGCombiner. NFC — deadalnix / ViewSVN
  8. [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
  9. [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
  10. [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
  11. [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
  12. [ELF][RISCV] Error on R_RISCV_PCREL_LO12_[IS] that point to absolute symbols

    The referenced symbol is expected to point to an R_RISCV_*_HI20
    relocation. An absolute symbol has no associated section, therefore
    there cannot be a matching R_RISCV_*_HI20.

    This fixes the crash reported by PR42038. For reference, ld.bfd errors:

        (.init+0x4): dangerous relocation: %pcrel_lo missing matching %pcrel_hi

    Differential Revision: https://reviews.llvm.org/D63273 — maskray / ViewSVN
  13. Revert D63432 "[ELF] Allow placing SHF_MERGE sections with different alignments into the same MergeSyntheticSection"

    This reverts r365015.

    David Zarzycki reported this change broke stage2 and stage3 tests.  The
    root cause is still not very clear, but I guess some SHF_MERGE sections
    with the same name have different alignments. They were not merged
    before but were merged after r365015.

    Something that assumes address uniqueness of such mergeable data caused
    the bug. — maskray / ViewSVN
  14. [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

#4139 (Jul 3, 2019 7:50:01 AM)

  1. [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
  2. [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
  3. [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
  4. [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
  5. [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
  6. [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
  7. [ThinLTO] Optimize writeonly globals out

    Differential revision: https://reviews.llvm.org/D63444 — evgeny777 / ViewSVN
  8. [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
  9. 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
  10. [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
  11. [ELF][RISCV] Allow R_RISCV_ADD in relocateNonAlloc()

    gcc may generate .debug_info/.debug_aranges/.debug_line/etc that are
    relocated by R_RISCV_ADD*/R_RISCV_SUB* pairs.
    Allow R_RISCV_ADD in non-SHF_ALLOC section to fix link errors like:

        ld.lld: error: print.c:(.debug_frame+0x60): has non-ABS relocation R_RISCV_ADD64 against symbol '.L0 '

    Differential Revision: https://reviews.llvm.org/D63259 — maskray / ViewSVN
  12. [mips] Mark general scheduling model as complete — atanasyan / ViewSVN
  13. [mips] Add missing atomic instructions to general scheduling definitions — atanasyan / ViewSVN
  14. [mips] Add missing microMIPS instructions to general scheduling definitions — atanasyan / ViewSVN
  15. Fix -Wcast-qual const warning. NFCI. — rksimon / ViewSVN
  16. 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
  17. Specialize an anchor() function in the correct namespace — szelethus / ViewSVN
  18. [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

#4138 (Jul 3, 2019 4:25:50 AM)

  1. [X86][SSE] lowerUINT_TO_FP_v2i32 - explicitly cast half word to double

    Fixes MSVC analyzer extension->double warning. — rksimon / ViewSVN
  2. [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
  3. [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
  4. [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
  5. [mips] Add SIGRIE,GINVI,GINVT to general scheduling definitions — atanasyan / ViewSVN
  6. [mips] Add missing mips16 instructions to general scheduling definitions — atanasyan / ViewSVN
  7. [mips] Add missing MSA and ASE instructions to general scheduling definitions — atanasyan / ViewSVN
  8. [mips] Replace some itineraries by instructions in the general scheduling definitions — atanasyan / ViewSVN
  9. Fix MSVC "signed/unsigned mismatch" warning. NFCI.

    Fixes PR42426. — rksimon / ViewSVN
  10. Fix uninitialized variable warnings. NFCI.

    Both MSVC and cppcheck don't like the fact that the variables are initialized via references. — rksimon / ViewSVN
  11. [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
  12. [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
  13. [ELF] Allow placing SHF_MERGE sections with different alignments into the same MergeSyntheticSection

    This should fix PR42289: the Linux kernel has a use case that input
    files have .rodata.cst32 sections with different alignments. The
    expectation (and what ld.bfd and gold do) is that in the -r link, there
    is only one .rodata.cst32 (SHF_MERGE sections with different alignments
    can be combined), but lld currently creates one for each different
    alignment.

    The current merging strategy:

    1) Group SHF_MERGE sections by (name, sh_flags, sh_entsize and
       sh_addralign). String merging is performed among a group, even if -O0 is specified.
    2) Create one output section for each group. This is a special case in
       addInputSec().

    This patch changes 1) to:

    1) Group SHF_MERGE sections by (name, sh_flags, sh_entsize).
       String merging is performed among a group, even if -O0 is specified.

    We will thus create just one .rodata.cst32 . This also improves merging
    efficiency when sections with the same name but different alignments are
    combined.

    Reviewed By: ruiu

    Differential Revision: https://reviews.llvm.org/D63432 — maskray / ViewSVN
  14. [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
  15. 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
  16. Fix MSVC "not all control paths return a value" warnings. NFCI. — rksimon / ViewSVN
  17. [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
  18. [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
  19. [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
  20. 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
  21. [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

#4137 (Jul 3, 2019 1:30:09 AM)

  1. Change std::{lower,upper}_bound to llvm::{lower,upper}_bound or llvm::partition_point. NFC — maskray / ViewSVN
  2. [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
  3. Avoid identifiers that are different only in case. NFC. — ruiu / ViewSVN
  4. Avoid identifiers that are different only in case. NFC.

    Some variables in lld have the same name as functions ignoring case.
    This patch gives them different names, so that my next patch is easier
    to read. — ruiu / ViewSVN
  5. [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
  6. Revert r364999: [lld] Use -o /dev/null in test when output is not needed.

    This reverts commit r364999 as it broke a build. Looks like `%t.archive.o`
    is used two lines below where it was created. — ruiu / ViewSVN

#4136 (Jul 2, 2019 10:36:46 PM)

  1. 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
  2. [lld] Use -o /dev/null in test when output is not needed.

    Feedback nit from rL364998 — sbc / ViewSVN

#4135 (Jul 2, 2019 7:38:01 PM)

  1. [ELF] Error on archive with missing index

    This matches the wasm lld and GNU ld behavior.

    The ELF linker has special handling for bitcode archives but if that
    doesn't kick in we probably want to error out rather than silently
    ignore the library.

    Differential Revision: https://reviews.llvm.org/D63781 — sbc / ViewSVN
  2. [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
  3. [ELF][RISCV] Support RISC-V in getBitcodeMachineKind

    Add Triple::riscv64 and Triple::riscv32 to getBitcodeMachineKind for get right
    e_machine during LTO.

    Reviewed By: ruiu, MaskRay

    Differential Revision: https://reviews.llvm.org/D52165 — kito / 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

#4134 (Jul 2, 2019 4:45:53 PM)

  1. [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
  2. [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
  3. Attempt #2 to fix gcc builds. This time check
    against CXX compiler ID instead of CRT test ID. — hctim / ViewSVN
  4. [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
  5. Only use -mno-omit-leaf-frame-pointer with clang builds.
    Fix build breakage caused by D64085 — hctim / ViewSVN
  6. [triple] add 'macCatalyst' environment type

    Mac Catalyst is a new deployment platform in macOS Catalina.

    Differential Revision: https://reviews.llvm.org/D64097 — arphaman / ViewSVN
  7. [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
  8. [NFC] Strenghten isInteger condition for rL364940 — xbolva00 / ViewSVN
  9. [ThinLTO] Address post-review suggestions for index-based WPD summary

    Removes a couple of unnecessary and/or redundant checks introduced by
    r364960. — tejohnson / ViewSVN

#4133 (Jul 2, 2019 1:47:13 PM)

  1. [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
  2. [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
  3. [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
  4. [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
  5. [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
  6. [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
  7. 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
  8. [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
  9. [X86] Copy test cases from vector-zext.ll to vector-zext-widen.ll. Same for vector-sext.ll. NFC — ctopper / ViewSVN
  10. [lli] Fix a typo in a header. — Lang Hames / ViewSVN
  11. [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
  12. [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
  13. [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
  14. [AMDGPU] LCSSA pass added in preISel. Fixing typo in previous commit — alex-t / ViewSVN
  15. [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
  16. [clang-doc] Fix segfault in comment sorting

    Differential Revision: https://reviews.llvm.org/D63962 — juliehockett / ViewSVN
  17. [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

#4132 (Jul 2, 2019 10:53:42 AM)

  1. [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
  2. [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
  3. Fix GN build — Vitaly Buka / ViewSVN

#4131 (Jul 2, 2019 9:07:16 AM)

  1. [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
  2. [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
  3. 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
  4. 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
  5. Provide basic Full LTO extension points

    Differential Revision: https://reviews.llvm.org/D61738 — serge_sans_paille / ViewSVN
  6. 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
  7. AMDGPU: Fix broken test — arsenm / ViewSVN
  8. AMDGPU/GlobalISel: Try generated matcher with intrinsics — arsenm / ViewSVN
  9. AMDGPU/GlobalISel: Select mul — arsenm / ViewSVN
  10. GlobalISel: Define GINodeEquiv for G_UMULH/G_SMULH — arsenm / ViewSVN
  11. [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
  12. Use --defsym instead of sed in a test. NFC — probinson / ViewSVN
  13. 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
  14. AMDGPU/GlobalISel: Select G_FENCE

    Manually select to workaround tablegen emitter emitting checks for
    G_CONSTANT. — arsenm / ViewSVN
  15. GlobalISel: Add G_FENCE

    The pattern importer is for some reason emitting checks for G_CONSTANT
    for the immediate operands. — arsenm / ViewSVN
  16. [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
  17. Removed extra ; after function definition — szelethus / ViewSVN
  18. [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
  19. [NFC][TargetLowering] Some preparatory cleanups around 'prepareUREMEqFold()' from D63963 — lebedevri / ViewSVN
  20. [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
  21. Fix line endings (NFC) — probinson / ViewSVN
  22. [docs][llvm-readelf] Delete old llvm-readelf.md

    This was accidentally missed when committing r364800. — jhenderson / ViewSVN
  23. [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
  24. [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
  25. [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

#4130 (Jul 2, 2019 5:55:00 AM)

  1. Attempt to fix buildbot failures with MSVC — szelethus / ViewSVN
  2. [ELF] Only allow the binding of SharedSymbol to change for the first undef ref

    Fixes PR42442

    t.o has a STB_GLOBAL undef ref to f
    t2.so has a STB_WEAK undef ref to f
    t1.so defines f

    ld.lld t.o t1.so t2.so currently sets the binding of `f` to STB_WEAK.
    This is not correct because there exists a STB_GLOBAL undef ref from a
    regular object. The problem is that resolveUndefined() doesn't check
    if the undef ref is seen for the first time:

        if (isShared() || isLazy() || (isUndefined() && Other.Binding != STB_WEAK))
          Binding = Other.Binding;

    The isShared() condition should be `isShared() && !Referenced`
    where Referenced is set to true after an undef ref is seen.

    In practice, when linking a pthread program with glibc:

        // a.o
        #include <pthread.h>
        pthread_mutex_t mu = PTHREAD_MUTEX_INITIALIZER;
        int main() { pthread_mutex_unlock(&mu); }

    {clang,gcc} -fuse-ld=lld a.o -lpthread # libpthread.so is linked before libgcc_s.so.1

    The weak undef pthread_mutex_unlock in libgcc_s.so.1 makes the result
    weak, which diverges from GNU linkers where STB_DEFAULT is used:

        23: 0000000000000000     0 FUNC    WEAK   DEFAULT  UND pthread_mutex_lock

    (Note, if -pthread is used instead, libpthread.so will be linked **after**
    libgcc_s.so.1 . lld sets the binding to the expected STB_GLOBAL)

    Similar linking sequences (ld.lld t.o t1.so t2.so) appear to be used by
    Go, which cause a build error https://github.com/golang/go/issues/31912.

    Reviewed By: grimar, ruiu

    Differential Revision: https://reviews.llvm.org/D63974 — maskray / ViewSVN
  3. [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
  4. [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
  5. [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
  6. [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
  7. gn build: Merge r364866 — nico / ViewSVN
  8. [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
  9. [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
  10. [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
  11. [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
  12. [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
  13. [mips] Mark P5600 scheduling model as complete — atanasyan / ViewSVN
  14. clang-cl: Make /d1reportAllClassLayout actually work and improve test

    See review thread for r301567. — nico / ViewSVN
  15. [mips] Add missing schedinfo for FPU load/store/conv instructions — atanasyan / ViewSVN
  16. [mips] Map SNOP, NOP to the P5600Nop scheduler resource — atanasyan / ViewSVN
  17. [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
  18. [NFC][InstCombine] Revisit tests for "redundant shift input masking" (PR42456) — lebedevri / ViewSVN
  19. [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

#4129 (Jul 2, 2019 2:58:02 AM)

  1. [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
  2. [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
  3. [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
  4. [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
  5. [ASTImporter] Make headers self-contained — d0k / ViewSVN
  6. [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

#4128 (Jul 1, 2019 11:58:54 PM)

  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

#4127 (Jul 1, 2019 9:05:14 PM)

  1. [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
  2. Update status of papers for upcoming WG21 meeting. NFC — marshall / ViewSVN
  3. Use new '__libcpp_is_constant_evaluated' call to remove an '#ifdef' from the bit code. NFC — marshall / ViewSVN
  4. [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
  5. [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
  6. [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
  7. [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

#4126 (Jul 1, 2019 6:11:44 PM)

  1. 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
  2. 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
  3. 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
  4. 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
  5. [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
  6. [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
  7. 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
  8. [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
  9. [analyzer] exploded-graph-rewriter: NFC: Add a forgotten test file.

    This fell off of r364865. — dergachev / ViewSVN
  10. [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
  11. [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
  12. [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
  13. [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
  14. [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
  15. [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
  16. [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
  17. Update status for bit operations — marshall / ViewSVN
  18. Bit Operations: P0556, P0553 and P1355. Reviewed as: https://reviews.llvm.org/D51262 — marshall / ViewSVN
  19. [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

#4125 (Jul 1, 2019 3:14:58 PM)

  1. AMDGPU: Correct properties for adjcallstack* pseudos

    These should be SALU writes, and these are lowered to instructions
    that def SCC. — arsenm / ViewSVN
  2. Fix broken C++ mode comment — arsenm / ViewSVN
  3. [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
  4. [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
  5. 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
  6. [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
  7. [mips] Add missing schedinfo for MIPSeh_return[32|64] instructions — atanasyan / ViewSVN
  8. [mips] Add virtualization ASE to P5600 scheduling definitions — atanasyan / ViewSVN
  9. [mips] Add missing schedinfo for LONG_BRANCH_* instructions — atanasyan / ViewSVN
  10. [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
  11. Revert [SLP] Look-ahead operand reordering heuristic.

    This reverts r364478 (git commit 574cb0eb3a7ac95e62d223a60bef891171dfe321)

    The patch is causing compilation timeouts. — rupprecht / ViewSVN
  12. [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

#4124 (Jul 1, 2019 1:34:04 PM)

  1. Testing commit access through minor formatting change — nilanjana_basu / ViewSVN
  2. Ensure bitset's string constructor doesn't poison the overload set. — ericwf / ViewSVN
  3. 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
  4. 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
  5. AMDGPU: Revert accidental change to test — arsenm / ViewSVN
  6. [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
  7. Fixed two issues in clang-tidy -help.

    HeaderFilter -> HeaderFilterRegex — alexfh / ViewSVN
  8. AMDGPU/GlobalISel: Handle more input argument intrinsics — arsenm / ViewSVN
  9. AMDGPU/GlobalISel: Lower kernarg segment ptr intrinsics — arsenm / ViewSVN
  10. AMDGPU/GlobalISel: Legalize workgroup ID intrinsics — arsenm / ViewSVN
  11. 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
  12. 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
  13. 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
  14. 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
  15. [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
  16. AMDGPU/GlobalISel: Add tests for add legalization — arsenm / ViewSVN
  17. 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
  18. 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
  19. [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
  20. [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
  21. GlobalISel: Verify G_MERGE_VALUES operand sizes — arsenm / ViewSVN
  22. [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
  23. [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
  24. AMDGPU/GlobalISel: RegBankSelect for sendmsg/sendmsghalt — arsenm / ViewSVN
  25. [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
  26. AMDGPU/GlobalISel: Legalize s16 fcmp — arsenm / ViewSVN
  27. GlobalISel: Implement lower for min/max — arsenm / ViewSVN
  28. 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
  29. 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
  30. [ELF][RISCV] Support GD/LD/IE/LE TLS models

    RISC-V psABI doesn't specify TLS relaxation. It can be handled the same
    way as we handle ARM TLS. RISC-V TLS is even simpler because GD/LD use
    the same relocation type.

    Reviewed By: jrtc27, ruiu

    Differential Revision: https://reviews.llvm.org/D63220 — maskray / ViewSVN
  31. [ELF][RISCV] Support PLT, GOT, copy and relative relocations

    * Handle initial relocation types: R_RISCV_CALL_PLT and R_RISCV_GOT_HI20.
    * Produce dynamic relocation types: R_RISCV_COPY, R_RISCV_RELATIVE, R_RISCV_JUMP_SLOT.
    * Define SymbolRel as R_RISCV_{32,64}
    * Generate PLT header: it is used by lazy binding PLT in glibc.
    * R_RISCV_CALL is changed from R_PC to R_PC_PLT. If the target symbol is preemptable, this will suppress an unnecessary "canonical PLT".
      This behavior is different from ld.bfd but it is agreed the current lld behavior is favored.
      I have received positive responses from the binutils maintainer that the ABI/binutils implementation can be improved, see:
      https://github.com/riscv/riscv-elf-psabi-doc/issues/98
      https://sourceware.org/bugzilla/show_bug.cgi?id=24685

    Many -no-pie/-pie/-shared programs linked against musl or glibc should work with this patch.

    Reviewed By: jrtc27

    Differential Revision: https://reviews.llvm.org/D63076 — maskray / ViewSVN
  32. AMDGPU/GlobalISel: RegBankSelect for DS ordered add/swap — arsenm / ViewSVN
  33. AArch64/GlobalISel: Fix trying to select invalid MIR

    Physical registers are not allowed to be a phi operand. — arsenm / ViewSVN
  34. 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
  35. AMDGPU/GlobalISel: RegBankSelect for amdgcn.writelane — arsenm / ViewSVN
  36. AMDGPU/GlobalISel: Fail instead of assert when selecting loads — arsenm / ViewSVN
  37. 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
  38. AMDGPU/GlobalISel: Select G_PHI — arsenm / ViewSVN
  39. 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
  40. [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
  41. AMDGPU/GlobalISel: RegBankSelect for readlane/readfirstlane — arsenm / ViewSVN
  42. [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
  43. 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
  44. [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
  45. AMDGPU/GlobalISel: Select G_BRCOND for vcc — arsenm / ViewSVN
  46. [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
  47. Update email address in CODE_OWNERS — kparzysz / ViewSVN

#4123 (Jul 1, 2019 9:04:39 AM)

  1. Implement LWG2221: 'Formatted output for nullptr_t' Reviewed as: https://reviews.llvm.org/D63053 — marshall / ViewSVN
  2. __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
  3. Fix -Wdouble-promotion warnings.

    Reviewers: mclow.lists

    Subscribers: christof, ldionne, cfe-commits, libcxx-commits

    Differential Revision: https://reviews.llvm.org/D62782 — brucem / ViewSVN
  4. [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
  5. [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
  6. [Hexagon] Custom-lower UADDO(x, 1) and USUBO(x, 1) — kparzysz / ViewSVN
  7. AMDGPU/GlobalISel: Select G_FRAME_INDEX — arsenm / ViewSVN
  8. 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
  9. AMDGPU/GlobalISel: Make s16 select legal

    This is easy to handle and avoids legalization artifacts which are
    likely to obscure combines. — arsenm / ViewSVN
  10. AMDGPU/GlobalISel: Select G_BRCOND for scc conditions — arsenm / ViewSVN
  11. [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
  12. 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
  13. AMDGPU: Fix tests using the default alloca address space — arsenm / ViewSVN
  14. AMDGPU/GlobalISel: Select src modifiers — arsenm / ViewSVN
  15. 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
  16. [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
  17. [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
  18. [ASTImporter] Silence unused variable warning in Release builds. NFC. — d0k / ViewSVN
  19. [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
  20. [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
  21. [Hexagon] Rework VLCR algorithm

    Add code to catch pattern for commutative instructions for VLCR.

    Patch by Suyog Sarda. — kparzysz / ViewSVN
  22. AMDGPU: Convert some places to Register — arsenm / ViewSVN
  23. AMDGPU/GlobalISel: Fix RegBankSelect for G_FCANONICALIZE — arsenm / ViewSVN
  24. AMDGPU/GlobalISel: Fix RegBankSelect for G_BUILD_VECTOR — arsenm / ViewSVN
  25. AMDGPU/GlobalISel: Fail on store to 32-bit address space — arsenm / ViewSVN
  26. AMDGPU/GlobalISel: Improve icmp selection coverage.

    Select s64 eq/ne scalar icmp. — arsenm / ViewSVN
  27. [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
  28. AMDGPU/GlobalISel: RegBankSelect for WWM/WQM — arsenm / ViewSVN
  29. AMDGPU/GlobalISel: Use vcc reg bank for amdgcn.wqm.vote — arsenm / ViewSVN
  30. 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
  31. 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
  32. GlobalISel: Add GINodeEquiv for min/max — arsenm / ViewSVN
  33. GlobalISel: Add DAG compat for G_FCANONICALIZE — arsenm / ViewSVN
  34. [mips] Add missing schedinfo for MSA and ASE instructions — atanasyan / ViewSVN
  35. [mips] Add missing schedinfo for atomic instructions — atanasyan / ViewSVN
  36. [mips] Add missing schedinfo for ADJCALLSTACKDOWN, ADJCALLSTACKUP — atanasyan / ViewSVN
  37. [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
  38. [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
  39. [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

#4122 (Jul 1, 2019 4:58:32 AM)

  1. [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
  2. [RISCV] Add break; to the last switch case

    As suggested by jrtc27 in the post-commit review of D60528. — maskray / ViewSVN
  3. [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
  4. [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
  5. [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
  6. [clangd] Fix unused var from r364735 — sammccall / ViewSVN
  7. [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
  8. [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
  9. [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
  10. [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
  11. [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
  12. [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
  13. [SimpleLoopUnswitch] Implement handling of prof branch_weights metadata for SwitchInst

    Differential Revision: https://reviews.llvm.org/D60606 — yrouban / ViewSVN

#4121 (Jul 1, 2019 1:25:30 AM)

  1. [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
  2. [libcxx] [test] Add void cast to result of compare_exchange_weak to suppress [[nodiscard]]. — bion / ViewSVN
  3. [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
  4. [X86] Add more load folding tests for vcvt(t)ps2(u)qq showing missed foldings. NFC — ctopper / ViewSVN
  5. [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
  6. [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
  7. [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
  8. [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

#4119 (Jun 30, 2019 6:09:28 PM)

  1. 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
  2. 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