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

Changes

rL:372902 - C:372898 - #778 (Sep 25, 2019 10:35:34 AM)

  1. [NFC] Add { } to silence compiler warning [-Wmissing-braces].

    llvm-project/llvm/unittests/ADT/ArrayRefTest.cpp:254:25: warning: suggest braces around initialization of subobject [-Wmissing-braces]
      std::array<int, 5> A1{42, -5, 0, 1000000, -1000000};
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
                            {                           } — huihuiz / ViewSVN
  2. [InstCombine] Limit FMul constant folding for fma simplifications.

    As @reames pointed out post-commit, rL371518 adds additional rounding
    in some cases, when doing constant folding of the multiplication.
    This breaks a guarantee llvm.fma makes and must be avoided.

    This patch reapplies rL371518, but splits off the simplifications not
    requiring rounding from SimplifFMulInst as SimplifyFMAFMul.

    Reviewers: spatel, lebedev.ri, reames, scanon

    Reviewed By: reames

    Differential Revision: https://reviews.llvm.org/D67434 — fhahn / ViewSVN
  3. [CUDA][HIP] Enable kernel function return type deduction.

    Summary:
    - Even though only `void` is still accepted as the deduced return type,
      enabling deduction/instantiation on the return type allows more
      consistent coding.

    Reviewers: tra, jlebar

    Subscribers: cfe-commits, yaxunl

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68031 — hliao / ViewSVN
  4. [AArch64][GlobalISel] Choose CCAssignFns per-argument for tail call lowering

    When checking for tail call eligibility, we should use the correct CCAssignFn
    for each argument, rather than just checking if the caller/callee is varargs or
    not.

    This is important for tail call lowering with varargs. If we don't check it,
    then basically any varargs callee with parameters cannot be tail called on
    Darwin, for one thing. If the parameters are all guaranteed to be in registers,
    this should be entirely safe.

    On top of that, not checking for this could potentially make it so that we have
    the wrong stack offsets when checking for tail call eligibility.

    Also refactor some of the stuff for CCAssignFnForCall and pull it out into a
    helper function.

    Update call-translator-tail-call.ll to show that we can now correctly tail call
    on Darwin. Also add two extra tail call checks. The first verifies that we still
    respect the caller's stack size, and the second verifies that we still don't
    tail call when a varargs function has a memory argument.

    Differential Revision: https://reviews.llvm.org/D67939 — paquette / ViewSVN
  5. Add a missing default parameter to regex::assign. This is LWG3296; reviewed as https://reviews.llvm.org/D67944 — marshall / ViewSVN

rL:372893 - C:372889 - #777 (Sep 25, 2019 9:13:04 AM)

  1. [CodeGen] Replace -max-jump-table-size with -max-jump-table-targets

    Modern processors predict the targets of an indirect branch regardless of
    the size of any jump table used to glean its target address.  Moreover,
    branch predictors typically use resources limited by the number of actual
    targets that occur at run time.

    This patch changes the semantics of the option `-max-jump-table-size` to limit
    the number of different targets instead of the number of entries in a jump
    table.  Thus, it is now renamed to `-max-jump-table-targets`.

    Before, when `-max-jump-table-size` was specified, it could happen that
    cluster jump tables could have targets used repeatedly, but each one was
    counted and typically resulted in tables with the same number of entries.
    With this patch, when specifying `-max-jump-table-targets`, tables may have
    different lengths, since the number of unique targets is counted towards the
    limit, but the number of unique targets in tables is the same, but for the
    last one containing the balance of targets.

    Differential revision: https://reviews.llvm.org/D60295 — evandro / ViewSVN
  2. [LangRef] Clarify absence of rounding guarantees for fmuladd.

    During the review of D67434, it was recommended to make fmuladd's
    behavior more explicit. D67434 depends on this interpretation.

    Reviewers: efriedma, jfb, reames, scanon, lebedev.ri, spatel

    Reviewed By: spatel

    Differential Revision: https://reviews.llvm.org/D67552 — fhahn / ViewSVN
  3. Re-land r372863: [AST] Extract Decl::printNestedNameSpecifier helper from Decl::printQualifiedName

    Reverted in r372880 due to the test failure.
    Also contains a fix that adjusts printQualifiedName to return the same results as before in
    case of anonymous function locals and parameters. — ibiryukov / ViewSVN
  4. [clangd] Change constness of parameters to findExplicitRefs

    Summary:
    Recursive AST requires non-const ast nodes, but it doesn't really
    mutate them. In addition to that, in clangd we mostly have const ast nodes. So
    it makes sense to move the const_cast into callee rather than having it at every
    caller in the future.

    Reviewers: ilya-biryukov

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68027 — kadircet / ViewSVN
  5. [DAGCombiner] add one-use restriction to vector transform with cheap extract

    We might be able to do better on the example in the test,
    but in general, we should not scalarize a splatted vector
    binop if there are other uses of the binop. Otherwise, we
    can end up with code as we had - a scalar op that is
    redundant with a vector op. — spatel / ViewSVN
  6. [PatternMatch] Make m_Br more flexible, add matchers for BB values.

    Currently m_Br only takes references to BasicBlock*, which limits its
    flexibility. For example, you have to declare a variable, even if you
    ignore the result or you have to have additional checks to make sure the
    matched BB matches an expected one.

    This patch adds m_BasicBlock and m_SpecificBB matchers, which can be
    used like the existing matchers for constants or values.

    I also had a look at the existing uses and updated a few. IMO it makes
    the code a bit more explicit.

    Reviewers: spatel, craig.topper, RKSimon, majnemer, lebedev.ri

    Reviewed By: lebedev.ri

    Differential Revision: https://reviews.llvm.org/D68013 — fhahn / ViewSVN
  7. [x86] add test for multi-use scalarization of vector binop; NFC — spatel / ViewSVN
  8. [TargetInstrInfo] Let findCommutedOpIndices take const MachineInstr&

    Neither the base implementation of findCommutedOpIndices nor any in-tree target modifies the instruction passed in and there is no reason why they would in the future.

    Committed on behalf of @hvdijk (Harald van Dijk)

    Differential Revision: https://reviews.llvm.org/D66138 — rksimon / ViewSVN
  9. [PatternMatch] Generalize brc_match (NFC).

    Preparation for D68013. — fhahn / ViewSVN

rL:372878 - C:372884 - #776 (Sep 25, 2019 7:45:27 AM)

  1. [NFC] Fix typo in `getPreviousDecl` comment. — ymandel / ViewSVN
  2. Revert r372863: [AST] Extract Decl::printNestedNameSpecifier helper from Decl::printQualifiedName

    Reason: causes a test failure, will investigate and re-land with a fix. — ibiryukov / ViewSVN
  3. [IR] allow fast-math-flags on phi of FP values (2nd try)

    The changes here are based on the corresponding diffs for allowing FMF on 'select':
    D61917 <https://reviews.llvm.org/D61917>

    As discussed there, we want to have fast-math-flags be a property of an FP value
    because the alternative (having them on things like fcmp) leads to logical
    inconsistency such as:
    https://bugs.llvm.org/show_bug.cgi?id=38086

    The earlier patch for select made almost no practical difference because most
    unoptimized conditional code begins life as a phi (based on what I see in clang).
    Similarly, I don't expect this patch to do much on its own either because
    SimplifyCFG promptly drops the flags when converting to select on a minimal
    example like:
    https://bugs.llvm.org/show_bug.cgi?id=39535

    But once we have this plumbing in place, we should be able to wire up the FMF
    propagation and start solving cases like that.

    The change to RecurrenceDescriptor::AddReductionVar() is required to prevent a
    regression in a LoopVectorize test. We are intersecting the FMF of any
    FPMathOperator there, so if a phi is not properly annotated, new math
    instructions may not be either. Once we fix the propagation in SimplifyCFG, it
    may be safe to remove that hack.

    Differential Revision: https://reviews.llvm.org/D67564 — spatel / ViewSVN
  4. Fix analyzer TypeAttributeImpl::anchor() override.

    TypeAttributeImpl inherits from EnumAttributeImpl which already defines anchor() as a virtual, so we should override this instead of redeclaring it. — rksimon / ViewSVN
  5. [gn build] Fix Python DeprecationWarning

    Summary:
    This fixes two issues:
    - DeprecationWarning: invalid escape sequence \`
    - ResourceWarning: unclosed file

    Subscribers: mgorny, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67753 — mantognini / ViewSVN
  6. [clangd] Fix parseNamespaceEvents to parse the last token

    Reviewers: hokein, ilya-biryukov

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68020 — kadircet / ViewSVN
  7. [Dominators][AMDGPU] Don't use virtual exit node in findNearestCommonDominator. Cleanup MachinePostDominators.

    Summary:
    This patch fixes a bug that originated from passing a virtual exit block (nullptr) to `MachinePostDominatorTee::findNearestCommonDominator` and resulted in assertion failures inside its callee. It also applies a small cleanup to the class.

    The patch introduces a new function in PDT that given a list of `MachineBasicBlock`s finds their NCD. The new overload of `findNearestCommonDominator` handles virtual root correctly.

    Note that similar handling of virtual root nodes is not necessary in (forward) `DominatorTree`s, as right now they don't use virtual roots.

    Reviewers: tstellar, tpr, nhaehnle, arsenm, NutshellySima, grosser, hliao

    Reviewed By: hliao

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

    Tags: #amdgpu, #llvm

    Differential Revision: https://reviews.llvm.org/D67974 — kuhar / ViewSVN
  8. [SystemZ]  Improve emitSelect()

    Merge more Select pseudo instructions in emitSelect() by allowing other
    instructions between them as long as they do not clobber CC.

    Debug value instructions are now moved down to below the new PHIs instead of
    erasing them.

    Review: Ulrich Weigand
    https://reviews.llvm.org/D67619 — jonpa / ViewSVN
  9. Fix cppcheck variable shadow warning. NFCI. — rksimon / ViewSVN
  10. Add missing ExplicitTy default initialization to ConstantExprKeyType constructors.

    Fixes cppcheck uninitialized variable warnings — rksimon / ViewSVN

rL:372868 - C:372870 - #775 (Sep 25, 2019 6:37:33 AM)

  1. [libTooling] Introduce the MatchConsumer abstraction

    Summary:
    This revision introduces a separate (small) library for the `MatchConsumer`
    abstraction: computations over AST match results.  This abstraction is central
    to the Transformer framework, and there deserves being defined explicitly.

    Reviewers: gribozavr

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67961 — ymandel / ViewSVN
  2. Revert [IR] allow fast-math-flags on phi of FP values

    This reverts r372866 (git commit dec03223a97af0e4dfcb23da55c0f7f8c9b62d00) — spatel / ViewSVN
  3. [llvm-readobj/llvm-readelf] - .stack_sizes: demangle symbol names in warnings reported.

    I started this patch as a refactoring, tried to make a helper for
    getting symbol names, similar to how we get section names
    used in warning messages.

    So this patch cleanups the code and fixes an issue: symbol names
    in warning messages were not demangled.

    Differential revision: https://reviews.llvm.org/D68012 — grimar / ViewSVN
  4. [IR] allow fast-math-flags on phi of FP values

    The changes here are based on the corresponding diffs for allowing FMF on 'select':
    D61917

    As discussed there, we want to have fast-math-flags be a property of an FP value
    because the alternative (having them on things like fcmp) leads to logical
    inconsistency such as:
    https://bugs.llvm.org/show_bug.cgi?id=38086

    The earlier patch for select made almost no practical difference because most
    unoptimized conditional code begins life as a phi (based on what I see in clang).
    Similarly, I don't expect this patch to do much on its own either because
    SimplifyCFG promptly drops the flags when converting to select on a minimal
    example like:
    https://bugs.llvm.org/show_bug.cgi?id=39535

    But once we have this plumbing in place, we should be able to wire up the FMF
    propagation and start solving cases like that.

    The change to RecurrenceDescriptor::AddReductionVar() is required to prevent a
    regression in a LoopVectorize test. We are intersecting the FMF of any
    FPMathOperator there, so if a phi is not properly annotated, new math
    instructions may not be either. Once we fix the propagation in SimplifyCFG, it
    may be safe to remove that hack.

    Differential Revision: https://reviews.llvm.org/D67564 — spatel / ViewSVN
  5. [docs][llvm-strings] Clarify "printable character" wording

    The --bytes option uses the phrase "printable ASCII characters", but the
    description section used simply "printable characters". To avoid any
    confusion about locale impacts etc, this change adopts the former's
    phrasing in both places. It also fixes a minor grammar issue in the
    description.

    Reviewed by: MaskRay

    Differential Revision: https://reviews.llvm.org/D68016 — jhenderson / ViewSVN
  6. [docs][llvm-strip] Update llvm-strip doc to better match llvm-objcopy's

    Main changes are mostly wording of some options, but this change also
    fixes a switch reference so that a link is created and moves
    --strip-sections into the ELF-specific area since it is only supported
    for ELF currently. — jhenderson / ViewSVN
  7. [AST] Extract Decl::printNestedNameSpecifier helper from Decl::printQualifiedName

    Summary:
    To be used in clangd, e.g. in D66647.
    Currently the alternative to this function is doing string manipulation on results of `printQualifiedName`, which is
    hard-to-impossible to get right in presence of template arguments.

    Reviewers: kadircet, aaron.ballman

    Reviewed By: kadircet, aaron.ballman

    Subscribers: aaron.ballman, usaxena95, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67825 — ibiryukov / ViewSVN
  8. [clangd] Add missing header guard, NFC. — hokein / ViewSVN
  9. [clangd] A helper to find explicit references and their names

    Summary:
    Allows to simplify pending code tweaks:
      - the upcoming DefineInline tweak (D66647)
      - remove using declaration (D56612)
      - qualify name under cursor (D56610)

    Another potential future application is simplifying semantic highlighting.

    Reviewers: kadircet

    Reviewed By: kadircet

    Subscribers: mgrang, jfb, MaskRay, jkorous, arphaman, usaxena95, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67826 — ibiryukov / ViewSVN
  10. [AMDGPU][MC][DOC] Updated AMD GPU assembler description.

    Summary of changes:
    - Updated to reflect recent changes in assembler;
    - Minor bugfixing and improvements. — dpreobra / ViewSVN
  11. [DAG] Pull out minimum shift value calc into a helper function. NFCI. — rksimon / ViewSVN
  12. [llvm-readobj] - Simplify stack-sizes.test test case.

    This is a follow-up for D67757,
    which allows to describe .stack_sizes sections with a new
    YAML syntax.

    Differential revision: https://reviews.llvm.org/D67759 — grimar / ViewSVN
  13. [yaml2elf] - Support describing .stack_sizes sections using unique suffixes.

    Currently we can't use unique suffixes in section names to describe
    stack sizes sections. E.g. '.stack_sizes [1]' will be treated as a regular section.
    This happens because we recognize stack sizes section by name and
    do not yet drop the suffix before the check.

    The patch fixes it.

    Differential revision: https://reviews.llvm.org/D68018 — grimar / ViewSVN
  14. gn build: (manually) merge r372843 — nico / ViewSVN

rL:372845 - C:372846 - #774 (Sep 25, 2019 4:50:30 AM)

  1. builtins test: Move clear_cache_test.c from a mprotect()ed global to a mmap()ed variable

    ld64 in the macOS 10.15 SDK gives __DATA a maxprot of 3, meaning it
    can't be made executable at runtime by default.

    Change clear_cache_test.c to use mmap()ed data that's mapped as writable
    and executable from the beginning, instead of trying to mprotect()ing a
    __DATA variable as executable. This fixes the test on macOS with the
    10.15 SDK.

    PR43407.

    Differential Revision: https://reviews.llvm.org/D67929 — nico / ViewSVN
  2. Add a release note for r372844 — hans / ViewSVN
  3. [yaml2obj] - Add a Size field for StackSizesSection.

    It is a follow-up requested in the review comment
    for D67757. Allows to use Content + Size or just Size
    when describing .stack_sizes sections in YAML document

    Differential revision: https://reviews.llvm.org/D67958 — grimar / ViewSVN
  4. Revert r370850 "Re-commit r363191 "[MS] Pretend constexpr variable template specializations are inline""

    This work-around was necessary to handle standard library headers in
    Visual Studio 2019 16.2. Now that 16.3 has shipped to stable, we can
    remove it.

    > Re-commit r363191 "[MS] Pretend constexpr variable template specializations are inline"
    >
    > While the next Visual Studio update (16.3) will fix this issue, that hasn't
    > shipped yet. Until then Clang wouldn't work with MSVC's headers which seems
    > unfortunate. Let's keep this in until VS 16.3 ships. (See also PR42843.)
    >
    >> Fixes link errors with clang and the latest Visual C++ 14.21.27702
    >> headers, which was reported as PR42027.
    >>
    >> I chose to intentionally make these things linkonce_odr, i.e.
    >> discardable, so that we don't emit definitions of these things in every
    >> translation unit that includes STL headers.
    >>
    >> Note that this is *not* what MSVC does: MSVC has not yet implemented C++
    >> DR2387, so they emit fully specialized constexpr variable templates with
    >> static / internal linkage.
    >>
    >> Reviewers: rsmith
    >>
    >> Differential Revision: https://reviews.llvm.org/D63175 — hans / ViewSVN

rL:372842 - C:372833 - #773 (Sep 25, 2019 3:56:31 AM)

  1. gn build: Merge r372841 — gnsyncbot / ViewSVN
  2. [clangd] Move the existing heder-source-switch implemenation out of clangdServer.

    Summary: This is a NFC change.

    Reviewers: kadircet

    Reviewed By: kadircet

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67960 — hokein / ViewSVN
  3. [ARM] Ensure we do not attempt to create lsll #0

    During legalisation we can end up with some pretty strange nodes, like shifts
    of 0. We need to make sure we don't try to make long shifts of these, ending up
    with invalid assembly instructions. A long shift with a zero immediate actually
    encodes a shift by 32.

    Differential Revision: https://reviews.llvm.org/D67664 — dmgreen / ViewSVN
  4. [llvm-readobj] - Don't crash when dumping .stack_sizes and unable to find a relocation resolver.

    The crash might happen when we have either a broken or unsupported object
    and trying to resolve relocations when dumping the .stack_sizes section.

    For the test case I used a 32-bits ELF header and a 64-bit relocation.
    In this case a null pointer is returned by the code instead of the relocation
    resolver function and then we crash.

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

rL:372829 - C:372833 - #772 (Sep 25, 2019 3:13:35 AM)

  1. [OpenCL] Add image query builtin functions

    Add the image query builtin functions from the OpenCL C specification.

    Patch by Pierre Gondois and Sven van Haastregt.

    Differential Revision: https://reviews.llvm.org/D67713 — svenvh / ViewSVN

rL:372829 - C:372814 - #771 (Sep 25, 2019 2:12:59 AM)

  1. Revert r372777: [libc++] Implement LWG 2510 and its follow-ups

    This also reverts:
    - r372778: [libc++] Implement LWG 3158
    - r372782: [libc++] Try fixing tests that fail on GCC 5 and older
    - r372787: Purge mentions of GCC 4 from the test suite

    Reason: the change breaks compilation of LLVM with libc++, for details see
    http://lists.llvm.org/pipermail/libcxx-dev/2019-September/000599.html — ibiryukov / ViewSVN
  2. Add tracing in pickNodeFromQueue.

    This matches GenericScheduler::pickNodeFromQueue, from which this
    function was mostly cut and pasted. — foad / ViewSVN
  3. Fix signature of overloaded operator delete.

    This overload was left over from an operator new that was removed in
    r123027. Fix it to match another operator new that was added in r248453. — foad / ViewSVN

rL:372824 - C:372814 - #770 (Sep 25, 2019 1:29:14 AM)

  1. [clangd] Fix the stale documentation about background indexing.

    Reviewers: kadircet

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D66937 — hokein / ViewSVN
  2. [AArch64] Convert neon_ushl and neon_sshl with positive constants to VSHL.

    I think we should be able to use shl instead of sshl and ushl for
    positive constant shift values, unless I am missing something.

    We already have the machinery in place to ensure we only replace
    nodes, if the shift value is positive and <= the element width.

    This is a generalization of an earlier patch rL372565.

    Reviewers: t.p.northover, samparker, dmgreen, anemet

    Reviewed By: anemet

    Differential Revision: https://reviews.llvm.org/D67955 — fhahn / ViewSVN

rL:372813 - C:372814 - #769 (Sep 25, 2019 12:07:07 AM)

  1. [Driver] Always use -z separate-loadable-segments with lld on Fuchsia

    The option was added to lld in D67481/372807.

    Reviewed By: phosek

    Differential Revision: https://reviews.llvm.org/D68009 — maskray / ViewSVN

rL:372813 - C:372802 - #768 (Sep 24, 2019 10:05:36 PM)

  1. [ADT] Add StringMap::insert_or_assign

    Summary: Similar to std::unordered_map::insert_or_assign

    Reviewers: alexshap, bkramer, dblaikie, lhames

    Subscribers: jkorous, dexonsmith, kristina, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67668 — maskray / ViewSVN
  2. [AArch64][GlobalISel] Tweak legalization rule for G_BSWAP to handle widening s16. — aemerson / ViewSVN
  3. [NFC] Add { } to silence compiler warning [-Wmissing-braces].

    /local/mnt/workspace/huihuiz/llvm-comm-git-2/llvm-project/llvm/lib/Object/MachOObjectFile.cpp:2731:7: warning: suggest braces around initialization of subobject [-Wmissing-braces]
          "i386",   "x86_64", "x86_64h",  "armv4t",  "arm",    "armv5e",
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          {
    1 warning generated.

    /local/mnt/workspace/huihuiz/llvm-comm-git-2/llvm-project/llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp:355:46: warning: suggest braces around initialization of subobject [-Wmissing-braces]
        return addMappingFromTable<1>(MI, MRI, { 0 }, Table);
                                                 ^
                                                 {}
    1 warning generated.

    /local/mnt/workspace/huihuiz/llvm-comm-git-2/llvm-project/llvm/tools/llvm-objcopy/ELF/Object.cpp:400:57: warning: suggest braces around initialization of subobject [-Wmissing-braces]
    static constexpr std::array<uint8_t, 4> ZlibGnuMagic = {'Z', 'L', 'I', 'B'};
                                                            ^~~~~~~~~~~~~~~~~~
                                                            {                 }
    1 warning generated. — huihuiz / ViewSVN

rL:372809 - C:372802 - #767 (Sep 24, 2019 9:00:04 PM)

  1. [llvm-objcopy][test] Clean up -B tests

    -B is ignored for GNU objcopy compatibility after D67215/r371914.

    * Delete mentions of -B from input-output-target.test - we have enough -B tests.
    * Merge binary-input-with-arch.test into binary-output-target.test.

    Reviewed By: rupprecht

    Differential Revision: https://reviews.llvm.org/D67693 — maskray / ViewSVN

rL:372803 - C:372802 - #766 (Sep 24, 2019 8:26:33 PM)

  1. [Powerpc][LoopPreIncPrep] NFC - refactor this pass for ds/dq form.

    Differential Revision: https://reviews.llvm.org/D67431 — shchenz / ViewSVN

rL:372796 - C:372802 - #765 (Sep 24, 2019 7:47:20 PM)

  1. [x86] Adding support for some missing intrinsics: _castf32_u32, _castf64_u64, _castu32_f32, _castu64_f64

    Summary:
    Adding support for some missing intrinsics:
    _castf32_u32, _castf64_u64, _castu32_f32, _castu64_f64

    Reviewers: craig.topper, LuoYuanke, RKSimon, pengfei

    Reviewed By: RKSimon

    Subscribers: llvm-commits

    Patch by yubing (Bing Yu)

    Differential Revision: https://reviews.llvm.org/D67212 — pengfei / ViewSVN

rL:372796 - C:372775 - #764 (Sep 24, 2019 5:49:59 PM)

  1. [Docs] Moves Reference docs to new page

    Moves Reference docs to new page. Also adds a table of contents to Getting Involved page. — dr87 / ViewSVN
  2. [WebAssembly][NFC] Remove duplicate SIMD instructions and predicates

    Summary:
    Instead of having different v128.load and v128.store instructions for
    each MVT, just have one of each that is reused in all the
    patterns. Also removes the HasSIMD128 predicate where accompanied by
    HasUnimplementedSIMD128, since the latter implies the former.

    Reviewers: aheejin, dschuff

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67930 — tlively / ViewSVN
  3. Use double quotes for LDFLAGS in -DLLVM_BUILD_INSTRUMENTED_COVERAGE

    Mimics the changes in r372209 to handle the change of quotes in
    r372226. Probably isn't sufficient for windows, but unbreaks the cmake
    flag at least. — Justin Bogner / ViewSVN
  4. [NFC] Invoke lipo from CMAKE_LIPO.

    This shouldn't change anything, except that a cmake cache file that specifies
    CMAKE_LIPO can specify an alternate lipo to use. — zer0 / ViewSVN

rL:372789 - C:372775 - #763 (Sep 24, 2019 4:29:43 PM)

  1. [SCEV] Disable canonical expansion for non-affine addrecs.

    Reviewed By: apilipenko

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

    Patch by Evgeniy Brevnov (ybrevnov@azul.com) — apilipenko / ViewSVN
  2. [libc++] Purge mentions of GCC 4 from the test suite

    We don't support GCC 4 and older according to the documentation, so
    we should pretend it doesn't exist. — Louis Dionne / ViewSVN
  3. [BPF] Generate array dimension size properly for zero-size elements

    Currently, if an array element type size is 0, the number of
    array elements will be set to 0, regardless of what user
    specified. This implementation is done in the beginning where
    BTF is mostly used to calculate the member offset.

    For example,
      struct s {};
      struct s1 {
            int b;
            struct s a[2];
      };
      struct s1 s1;
    The BTF will have struct "s1" member "a" with element count 0.

    Now BTF types are used for compile-once and run-everywhere
    relocations and we need more precise type representation
    for type comparison. Andrii reported the issue as there
    are differences between original structure and BTF-generated
    structure.

    This patch made the change to correctly assign "2"
    as the number elements of member "a".
    Some dead codes related to ElemSize compuation are also removed.

    Differential Revision: https://reviews.llvm.org/D67979 — yhs / ViewSVN
  4. Adding support for overriding LLVM_ENABLE_RUNTIMES for runtimes builds.

    Second attempt: Now with ';' -> '|' replacement.

    On some platforms, certain runtimes are not supported. For runtimes builds of
    those platforms it would be nice if we could disable certain runtimes (ie
    libunwind on Windows).

    Differential Revision: https://reviews.llvm.org/D67195 — zer0 / ViewSVN
  5. [PGO][PGSO] ProfileSummary changes.

    (Split of off D67120)

    ProfileSummary changes for profile guided size optimization.

    Differential Revision: https://reviews.llvm.org/D67377 — yamauchi / ViewSVN
  6. [libc++] Try fixing tests that fail on GCC 5 and older — Louis Dionne / ViewSVN

rL:372772 - C:372775 - #761 (Sep 24, 2019 1:46:31 PM)

  1. [libc++] Remove C++03 variadics in shared_ptr

        Summary: As suggested by @ldionne in D66178, this patch removes C++03 variadics //only//. Following patches will apply more updates.

        Reviewers: ldionne, EricWF, mclow.lists

        Subscribers: christof, dexonsmith, libcxx-commits, ldionne

        Tags: #libc

        Differential Revision: https://reviews.llvm.org/D67675 — zoecarver / ViewSVN
  2. [libc++] Implement LWG 3158

    Summary:
    LWG 3158 marks the allocator_arg_t constructor of std::tuple as
    conditionnally explicit based on whether the default constructors
    of the tuple's members are explicitly default constructible.

    Reviewers: EricWF, mclow.lists

    Subscribers: christof, jkorous, dexonsmith, libcxx-commits

    Tags: #libc

    Differential Revision: https://reviews.llvm.org/D65232 — Louis Dionne / ViewSVN
  3. [libc++] Implement LWG 2510

    Summary:
    LWG2510 makes tag types like allocator_arg_t explicitly default
    constructible instead of implicitly default constructible. It also
    makes the constructors for std::pair and std::tuple conditionally
    explicit based on the explicit-ness of the default constructibility
    for the pair/tuple's elements.

    Reviewers: mclow.lists, EricWF

    Subscribers: christof, jkorous, dexonsmith, libcxx-commits

    Tags: #libc

    Differential Revision: https://reviews.llvm.org/D65161 — Louis Dionne / ViewSVN
  4. [NFC] Strenghten preconditions for warning — xbolva00 / ViewSVN
  5. [HIP] Support new kernel launching API

    Differential Revision: https://reviews.llvm.org/D67947 — yaxunl / ViewSVN
  6. Extends the expansion of the LWZtoc pseduo op for AIX.

    Differential Revision: https://reviews.llvm.org/D67853 — sfertile / ViewSVN

rL:372771 - C:372760 - #760 (Sep 24, 2019 11:00:39 AM)

  1. [GCRelocate] Add a peephole to canonicalize base pointer relocation

    If we generate the gc.relocate, and then later prove two arguments to the statepoint are equivalent, we should canonicalize the gc.relocate to the form we would have produced if this had been known before rewriting. — reames / ViewSVN

rL:372686 - C:372689 - #755 (Sep 23, 2019 11:53:13 PM)

  1. [clang-format] NFC clang-format the clang-format unit tests

    Summary:
    It is annoying that the clang-format tests aren't themselves clang-formatted, if you use a format on save option in VS or vim this file gets massively changed then you have to `git difftool` all the other changes back out, which is risky.

    I know people don't like mass clang-format changes but sometimes it becomes unmanageable to not. There are no other changes here other than just the reformat.

    clang-format tests all pass.

    ```
    [==========] 691 tests from 21 test cases ran. (55990 ms total)
    [  PASSED  ] 691 tests.
    ```

    Reviewers: klimek, owenpan, timwoj

    Reviewed By: owenpan

    Subscribers: cfe-commits

    Tags: #clang-tools-extra, #clang

    Differential Revision: https://reviews.llvm.org/D67888 — paulhoad / ViewSVN

rL:372686 - C:372688 - #754 (Sep 23, 2019 10:57:25 PM)

  1. [ASTImporter] 3rd attempt to fix Windows buildbot test errors — martong / ViewSVN

rL:372686 - C:372687 - #753 (Sep 23, 2019 9:16:11 PM)

  1. Revert "[lit] Add -D__clang_analyzer__ to clang_analyze_cc1"

    This reverts commit 4185460f758b98ea5b898c04c179704756ca8f53. — Jan Korous / ViewSVN

rL:372682 - C:372687 - #752 (Sep 23, 2019 8:09:37 PM)

  1. Revert "[static analyzer] Define __clang_analyzer__ macro in driver"

    This reverts commit fbd13570b0d5f92ef2cf6bcfe7cc2f6178500187. — Jan Korous / ViewSVN
  2. Revert "[static analyzer][test] Test directly that driver sets D__clang_analyzer__"

    This reverts commit c7541903d72765a38808e9973572a8d50c9d94fb. — Jan Korous / ViewSVN
  3. Fix int to bool errors exposed due to r372612.
     
    Differential Revision: https://reviews.llvm.org/D67937
    M    lib/builtins/fp_add_impl.inc
    M    lib/builtins/fp_lib.h
    M    lib/builtins/fp_trunc_impl.inc — rdhindsa / ViewSVN

rL:372682 - C:372683 - #751 (Sep 23, 2019 7:17:27 PM)

  1. [static analyzer][test] Test directly that driver sets D__clang_analyzer__

    Follow-up to fbd13570b0d — Jan Korous / ViewSVN
  2. [lit] Add -D__clang_analyzer__ to clang_analyze_cc1

    Fixup after fbd13570b0d — Jan Korous / ViewSVN

rL:372678 - C:372681 - #750 (Sep 23, 2019 6:00:13 PM)

  1. Support for DWARF-5 C++ language tags.

    This patch provides support for DW_LANG_C_plus_plus_11,
    DW_LANG_C_plus_plus_14 tags in the Clang C++ frontend.

    Patch by Sourabh Singh Tomar!
    Differential Revision: https://reviews.llvm.org/D67613

    Reapplies r372663 after adapting a failing test in the LLDB testsuite. — Adrian Prantl / ViewSVN
  2. [static analyzer] Remove --analyze-auto

    Differential Revision: https://reviews.llvm.org/D67934 — Jan Korous / ViewSVN
  3. [static analyzer] Define __clang_analyzer__ macro in driver

    Differential Revision: https://reviews.llvm.org/D67938 — Jan Korous / ViewSVN
  4. [InstCombine] Fold a shifty implementation of clamp-to-allones.

    Summary:
    Fold
    or(ashr(subNSW(Y, X), ScalarSizeInBits(Y)-1), X)
    into
    X s> Y ? -1 : X

    https://rise4fun.com/Alive/d8Ab

    clamp255 is a common operator in image processing, can be implemented
    in a shifty way "(255 - X) >> 31 | X & 255". Fold shift into select
    enables more optimization, e.g., vmin generation for ARM target.

    Reviewers: lebedev.ri, efriedma, spatel, kparzysz, bcahoon

    Reviewed By: lebedev.ri

    Subscribers: kristof.beyls, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67800 — huihuiz / ViewSVN
  5. [InstCombine] Fold a shifty implementation of clamp-to-zero.

    Summary:
    Fold
    and(ashr(subNSW(Y, X), ScalarSizeInBits(Y)-1), X)
    into
    X s> Y ? X : 0

    https://rise4fun.com/Alive/lFH

    Fold shift into select enables more optimization,
    e.g., vmax generation for ARM target.

    Reviewers: lebedev.ri, efriedma, spatel, kparzysz, bcahoon

    Reviewed By: lebedev.ri

    Subscribers: xbolva00, andreadb, craig.topper, RKSimon, kristof.beyls, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67799 — huihuiz / ViewSVN
  6. [GlobalISel][IRTranslator] Fix switch table lowering to use signed LE not unsigned.

    We were miscompiling switch value comparisons with the wrong signedness, which
    shows up when we have things like switch case values with i1 types, which end up
    being legalized incorrectly.

    Fixes PR43383 — aemerson / ViewSVN

rL:372673 - C:372672 - #749 (Sep 23, 2019 5:02:13 PM)

  1. [llvm-cov] NFC: Specify a specific C++ standard in the test.

    Makes life easier for downstream users with customized default standard. — dergachev / ViewSVN
  2. [MemorySSA] Update Phi insertion.

    Summary:
    MemoryPhis may be needed following a Def insertion inthe IDF of all the
    new accesses added (phis + potentially a def). Ensure this also  occurs when
    only the new MemoryPhis are the defining accesses.

    Note: The need for computing IDF here is because of new Phis added with
    edges incoming from unreachable code, Phis that had previously been
    simplified. The preferred solution is to not reintroduce such Phis.
    This patch is the needed fix while working on the preferred solution.

    Reviewers: george.burgess.iv

    Subscribers: Prazek, sanjoy.google, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67927 — asbirlea / ViewSVN
  3. Revert "Support for DWARF-5 C++ language tags."

    This reverts commit bf9c8ffb54943c6d77398adbedddf05ef9724007. — Jonas Devlieghere / ViewSVN
  4. [NFC][InstCombine] Add tests for shifty implementation of clamping.

    Summary:
    Clamp negative to zero and clamp positive to allOnes are common
    operation in image saturation.

    Add tests for shifty implementation of clamping, as prepare work for
    folding:

    and(ashr(subNSW(Y, X), ScalarSizeInBits(Y)-1), X) --> X s> 0 ? X : 0;

    or(ashr(subNSW(Y, X), ScalarSizeInBits(Y)-1), X) --> X s> Y ? allOnes : X.

    Reviewers: lebedev.ri, efriedma, spatel, kparzysz, bcahoon

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67798 — huihuiz / ViewSVN

rL:372667 - C:372668 - #748 (Sep 23, 2019 3:34:40 PM)

  1. [NFCI] Return PathSensitiveBugReport where appropriate

    Some compilers have trouble converting unique_ptr<PathSensitiveBugReport> to
    unique_ptr<BugReport> causing some functions to fail to compile.
    Changing the return type of the functions that fail to compile does not
    appear to have any issues.
    I ran into this issue building with clang 3.8 on Ubuntu 16.04. — xiaobai / ViewSVN
  2. HotColdSplitting: invalidate the AssumptionCache on split

    When a cold path is outlined, the value tracking in the assumption cache may be
    invalidated due to the code motion.  We would previously trip an assertion in
    subsequent passes (but required the passes to happen in a single run as the
    assumption cache is shared across the passes).  Invalidating the cache ensures
    that we get the correct information when needed with the legacy pass manager as
    well. — Saleem Abdulrasool / ViewSVN
  3. [llvm-lipo] Add support for archives

    Add support for creating universal binaries which
    can contain an archive.

    Differential revision: https://reviews.llvm.org/D67758

    Test plan: make check-all — alexshap / ViewSVN
  4. [SampleFDO] Treat names in profile as not cold only when profile symbol list
    is available

    In rL372232, we treated names showing up in profile as not cold when
    profile-sample-accurate is enabled. This caused 70k size regression in
    Chrome/Android. The patch put a guard and only enable the change when
    profile symbol list is available, i.e., keep the old behavior when profile
    symbol list is not available.

    Differential Revision: https://reviews.llvm.org/D67931 — wmi / ViewSVN
  5. [Diagnostics] Warn for enum constants in bool context (-Wint-in-bool-context; GCC compatibility)

    Extracted from D63082. — xbolva00 / ViewSVN
  6. Support for DWARF-5 C++ language tags.

    This patch provides support for DW_LANG_C_plus_plus_11,
    DW_LANG_C_plus_plus_14 tags in the Clang C++ frontend.

    Patch by Sourabh Singh Tomar!
    Differential Revision: https://reviews.llvm.org/D67613 — Adrian Prantl / ViewSVN
  7. Fix uninitialized variable warning. NFCI. — rksimon / ViewSVN
  8. [X86] Reduce the number of unique check prefixes in memset-nonzero.ll. NFC

    The avx512 with prefer-256-bit generates the same code as AVX2 so
    just reuse that prefix. — ctopper / ViewSVN

rL:372655 - C:372646 - #747 (Sep 23, 2019 2:15:37 PM)

  1. [WebAssembly] vNxM.load_splat instructions

    Summary:
    Adds the new load_splat instructions as specified at
    https://github.com/WebAssembly/simd/blob/master/proposals/simd/SIMD.md#load-and-splat.

    DAGISel does not allow matching multiple copies of the same load in a
    single pattern, so we use a new node in WebAssemblyISD to wrap loads
    that should be splatted.

    Depends on D67783.

    Reviewers: aheejin

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67784 — tlively / ViewSVN

rL:372654 - C:372646 - #746 (Sep 23, 2019 1:42:35 PM)

  1. [InstCombine] foldOrOfICmps(): Acquire SimplifyQuery with set CxtI

    Extracted from https://reviews.llvm.org/D67849#inline-610377 — lebedevri / ViewSVN
  2. [InstCombine] foldAndOfICmps(): Acquire SimplifyQuery with set CxtI

    Extracted from https://reviews.llvm.org/D67849#inline-610377 — lebedevri / ViewSVN
  3. [WebAssembly] Remove unused memory instructions and patterns

    Summary:
    Removes duplicated SIMD loads and store instructions and removes
    patterns involving GlobalAddresses that were not used in any tests.

    Reviewers: aheejin, sunfish

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67783 — tlively / ViewSVN
  4. [InstCombine] Annotate strndup calls with dereferenceable_or_null

    "Implementations are free to malloc() a buffer containing either (size + 1) bytes or (strnlen(s, size) + 1) bytes. Applications should not assume that strndup() will allocate (size + 1) bytes when strlen(s) is smaller than size." — xbolva00 / ViewSVN
  5. [ASTImporter] 2nd attempt to fix Windows buildbot test errors — martong / ViewSVN
  6. [X86] Use TargetConstant for condition code on X86ISD::SETCC/CMOV/BRCOND nodes.

    This removes the need for ConvertToTarget opcodes in the isel table.
    It's also consistent with the recent changes to use TargetConstant
    for intrinsic nodes that always take immediates.

    Differential Revision: https://reviews.llvm.org/D67902 — ctopper / ViewSVN

rL:372641 - C:372640 - #745 (Sep 23, 2019 12:06:11 PM)

  1. [TableGen] Emit OperandType enums for RegisterOperands/RegisterClasses

    https://reviews.llvm.org/D66773

    The OpTypes::OperandType was creating an enum for all records that
    inherit from Operand, but in reality there are operands for instructions
    that inherit from other types too. In particular, RegisterOperand and
    RegisterClass. This commit adds those types to the list of operand types
    that are tracked by the OperandType enum.

    Patch by: nlguillemot — aditya_nandakumar / ViewSVN
  2. [Sema] Fix the atomic expr rebuilding order.

    Summary:
    - Rearrange the atomic expr order to the API order when rebuilding
      atomic expr during template instantiation.

    Reviewers: erichkeane

    Subscribers: jfb, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67924 — hliao / ViewSVN
  3. [IR] Add getExtendedType() to IntegerType and Type (dispatching to IntegerType or VectorType) — lebedevri / ViewSVN
  4. [InstCombine] dropRedundantMaskingOfLeftShiftInput(): improve comment — lebedevri / ViewSVN
  5. [SLC] Convert some strndup calls to strdup calls

    Summary:
    Motivation:
    - If we can fold it to strdup, we should (strndup does more things than strdup).
    - Annotation mechanism. (Works for strdup well).

    strdup and strndup are part of C 20 (currently posix fns), so we should optimize them.

    Reviewers: efriedma, jdoerfert

    Reviewed By: jdoerfert

    Subscribers: lebedev.ri, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67679 — xbolva00 / ViewSVN
  6. [OPENMP]Use standard parsing for 'match' clause, NFC.

    Reused standard clauses parsing scheme for parsing/matching 'match'
    clause in 'declare variant' directive. — abataev / ViewSVN

rL:372630 - C:372633 - #744 (Sep 23, 2019 10:45:19 AM)

  1. [ASTImporter] Attempt to fix Windows buildbot test errors — martong / ViewSVN
  2. [libc++] Mark CTAD tests as not failing on AppleClang 10.0.1

    They do fail on AppleClang 10.0.0, but not AppleClang 10.0.1 — Louis Dionne / ViewSVN
  3. NFC: Fix a poorly-written test

    The author of r364954 foolishly forgot that == binds tighter than ?: — epilk / ViewSVN
  4. [InstCombine] dropRedundantMaskingOfLeftShiftInput(): pat. c/d/e with mask (PR42563)

    Summary:
    If we have a pattern `(x & (-1 >> maskNbits)) << shiftNbits`,
    we already know (have a fold) that will drop the `& (-1 >> maskNbits)`
    mask iff `(shiftNbits-maskNbits) s>= 0` (i.e. `shiftNbits u>= maskNbits`).

    So even if `(shiftNbits-maskNbits) s< 0`, we can still
    fold, we will just need to apply a **constant** mask afterwards:
    ```
    Name: c, normal+mask
      %t0 = lshr i32 -1, C1
      %t1 = and i32 %t0, %x
      %r = shl i32 %t1, C2
    =>
      %n0 = shl i32 %x, C2
      %n1 = i32 ((-(C2-C1))+32)
      %n2 = zext i32 %n1 to i64
      %n3 = lshr i64 -1, %n2
      %n4 = trunc i64 %n3 to i32
      %r = and i32 %n0, %n4
    ```
    https://rise4fun.com/Alive/gslRa

    Naturally, old `%masked` will have to be one-use.
    This is not valid for pattern f - where "masking" is done via `ashr`.

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

    Reviewers: spatel, nikic, xbolva00

    Reviewed By: spatel

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67725 — lebedevri / ViewSVN
  5. [InstCombine] dropRedundantMaskingOfLeftShiftInput(): pat. a/b with mask (PR42563)

    Summary:
    And this is **finally** the interesting part of that fold!

    If we have a pattern `(x & (~(-1 << maskNbits))) << shiftNbits`,
    we already know (have a fold) that will drop the `& (~(-1 << maskNbits))`
    mask iff `(maskNbits+shiftNbits) u>= bitwidth(x)`.
    But that is actually ignorant, there's more general fold here:

    In this pattern, `(maskNbits+shiftNbits)` actually correlates
    with the number of low bits that will remain in the final value.
    So even if `(maskNbits+shiftNbits) u< bitwidth(x)`, we can still
    fold, we will just need to apply a **constant** mask afterwards:
    ```
    Name: a, normal+mask
      %onebit = shl i32 -1, C1
      %mask = xor i32 %onebit, -1
      %masked = and i32 %mask, %x
      %r = shl i32 %masked, C2
    =>
      %n0 = shl i32 %x, C2
      %n1 = add i32 C1, C2
      %n2 = zext i32 %n1 to i64
      %n3 = shl i64 -1, %n2
      %n4 = xor i64 %n3, -1
      %n5 = trunc i64 %n4 to i32
      %r = and i32 %n0, %n5
    ```
    https://rise4fun.com/Alive/F5R

    Naturally, old `%masked` will have to be one-use.
    Similar fold exists for patterns c,d,e, will post patch later.

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

    Reviewers: spatel, nikic, xbolva00

    Reviewed By: spatel

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67677 — lebedevri / ViewSVN
  6. [BreakFalseDeps] ignore function with minsize attribute

    This came up in the x86-specific:
    https://bugs.llvm.org/show_bug.cgi?id=43239
    ...but it is a general problem for the BreakFalseDeps pass.
    Dependencies may be broken by adding some other instruction,
    so that should be avoided if the overall goal is to minimize size.

    Differential Revision: https://reviews.llvm.org/D67363 — spatel / ViewSVN

rL:372626 - C:372624 - #743 (Sep 23, 2019 9:30:59 AM)

  1. [Clang-doc] NFC: Fixed link to llvm bugs in documentation — sureyeaah / ViewSVN
  2. [SLP] Fix for PR31847: Assertion failed: (isLoopInvariant(Operands[i], L) && "SCEVAddRecExpr operand is not loop-invariant!")

    Summary:
    Initially SLP vectorizer replaced all going-to-be-vectorized
    instructions with Undef values. It may break ScalarEvaluation and may
    cause a crash.
    Reworked SLP vectorizer so that it does not replace vectorized
    instructions by UndefValue anymore. Instead vectorized instructions are
    marked for deletion inside if BoUpSLP class and deleted upon class
    destruction.

    Reviewers: mzolotukhin, mkuper, hfinkel, RKSimon, davide, spatel

    Subscribers: RKSimon, Gerolf, anemet, hans, majnemer, llvm-commits, sanjoy

    Differential Revision: https://reviews.llvm.org/D29641 — abataev / ViewSVN
  3. [InstCombine] foldUnsignedUnderflowCheck(): s/Subtracted/ZeroCmpOp/ — lebedevri / ViewSVN
  4. Fix __is_fundamental to accept nullptr_t

        Summary: This patch updates the __is_fundamental builtin type trait to return true for nullptr_t.

        Reviewers: rsmith, EricWF, efriedma, craig.topper, erichkeane

        Subscribers: cfe-commits

        Tags: #clang

        Differential Revision: https://reviews.llvm.org/D67899 — zoecarver / ViewSVN
  5. [AMDGPU][MC] Corrected handling of relocatable expressions

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

    Reviewers: rampitec

    Differential Revision: https://reviews.llvm.org/D67829 — dpreobra / ViewSVN

rL:372619 - C:372623 - #742 (Sep 23, 2019 8:39:29 AM)

  1. [OPENMP]Fix PR43355: DO not emit target calls if only -fopenmp-targets
    is not provided.

    We should not emit any target-dependent code if only -fopenmp flag is
    used and device targets are not provided to prevent compiler crash. — abataev / ViewSVN
  2. Fix __is_signed builtin

        Summary: This patch fixes the __is_signed builtin type trait to work with floating point types and enums. Now, the builtin will return true if it is passed a floating point type and false for an enum type.

        Reviewers: EricWF, rsmith, erichkeane, craig.topper, efriedma

        Subscribers: cfe-commits

        Tags: #clang

        Differential Revision: https://reviews.llvm.org/D67897 — zoecarver / ViewSVN
  3. [libc++] Mark iostreams test as XFAIL on older macOSes — Louis Dionne / ViewSVN
  4. HexagonLoopIdiomRecognition - silence static analyzer dyn_cast<> null dereference warnings. NFCI. — rksimon / ViewSVN
  5. [TextAPI] Add New Supported Platforms

    Summary: This patch introduces simulators, as well was the restriced zippered and macCatalyst to supported platforms

    Reviewers: ributzka, steven_wu

    Reviewed By: ributzka

    Subscribers: hiraditya, dexonsmith, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67528 — cishida / ViewSVN
  6. [clangd] Simplify the callside of URI::resolve, NFC.

    Summary:
    - Add a overrloded URI::resolve, which accepts a string URI;
    - also fixed some callside that don't check the error;

    Reviewers: kadircet

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67916 — hokein / ViewSVN
  7. [Hexagon] Bitcast v4i16 to v8i8, unify no-op casts between scalar and HVX — kparzysz / ViewSVN
  8. [docs] Fix some typos in InternalsManual — svenvh / ViewSVN
  9. [Alignment][NFC] Migrate Instructions to Align

    Summary:
    This is patch is part of a series to introduce an Alignment type.
    See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
    See this patch for the introduction of the type: https://reviews.llvm.org/D64790

    Reviewers: courbet

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67917 — gchatelet / ViewSVN
  10. [Diagnostics] Warn if '<<' in bool context with -Wint-in-bool-context (GCC compatibility)

    Extracted from D63082, addressed review comments related to a warning message. — xbolva00 / ViewSVN
  11. Fix test atomic-expr.cpp after R372422

    The test tried to match a path in a printout by doing '^:' which failed
    on windows, since C:\... is a path. — erichkeane / ViewSVN
  12. [llvm] [cmake] Add possibility to use ChooseMSVCCRT.cmake when include LLVM library

    Modify LLVMConfig to produce LLVM_USE_CRT variables in build-directory. It helps to set the same compiler debug options like in builded library.

    Committed on behalf of @igorban (Igor)

    Differential Revision: https://reviews.llvm.org/D67175 — rksimon / ViewSVN

rL:372606 - C:372609 - #741 (Sep 23, 2019 6:59:43 AM)

  1. [OPENMP]Call __kmpc_push_tripcount in task context.

    Runtime function __kmpc_push_tripcount better to call inside of the task
    context for target regions. Otherwise, the libomptarget is unable to
    link the provided tripcount value for nowait target regions and
    completely looses this information. — abataev / ViewSVN
  2. Added a test for agreement between paths used in ClangTidy's diagnostics and header filter

    This test would have been broken by r372388. — gribozavr / ViewSVN
  3. [x86] fix assert with horizontal math + broadcast of vector (PR43402)

    https://bugs.llvm.org/show_bug.cgi?id=43402 — spatel / ViewSVN
  4. [libTooling] Add `access` and `ifBound` combinators to Stencil library.

    Summary:
    This revision add the `access` and `ifBound` combinators to the Stencil library:
    * `access` -- constructs an idiomatic expression for accessing a member (a
      `MemberExpr`).
    * `ifBound` -- chooses between two `StencilParts` based on the whether an id is
      bound in the match (corresponds to the combinator of the same name in
      RangeSelector).

    Reviewers: gribozavr

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67633 — ymandel / ViewSVN
  5. [ValueTracking] Remove unused matchSelectPattern optional argument. NFCI.

    The matchSelectPattern const wrapper is never explicitly called with the optional Instruction::CastOps argument, and it turns out that it wasn't being forwarded to matchSelectPattern anyway!

    Noticed while investigating clang static analyzer warnings. — rksimon / ViewSVN
  6. [ValueTracking] Fix uninitialized variable warnings in matchSelectPattern const wrapper. NFCI.

    Static analyzer complains about const_cast uninitialized variables, we should explicitly set these to null.

    Ideally that const wrapper would go away though....... — rksimon / ViewSVN
  7. llvm-undname: Add support for demangling typeinfo names

    typeinfo names aren't symbols but string constant contents
    stored in compiler-generated typeinfo objects, but llvm-cxxfilt
    can demangle these for Itanium names.

    In the MSVC ABI, these are just a '.' followed by a mangled
    type -- this means they don't start with '?' like all MS-mangled
    symbols do.

    Differential Revision: https://reviews.llvm.org/D67851 — nico / ViewSVN
  8. Revert "[clang-tidy] Fix relative path in header-filter."

    This reverts commit r372388. It made '-header-filter' inconsistent with
    paths printed in diagnostics. — gribozavr / ViewSVN
  9. [Diagnostics] Avoid -Wsizeof-array-div when dividing the size of a nested array by the size of the deepest base type — xbolva00 / ViewSVN
  10. Cosmetic; don't use the magic constant 35 when HASH is more readable. This matches other MCK__<THING>_* usage better.

    Summary: No functional change. This fixes a magic constant in MCK__*_... macros only.

    Reviewers: ostannard

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67840 — markrvmurray / ViewSVN
  11. Function::BuildLazyArguments() - fix "variable used but never read" analyzer warning. NFCI.

    Simplify the code by separating the masking of the SDC variable from using it. — rksimon / ViewSVN
  12. gn build: Merge r372595 — gnsyncbot / ViewSVN
  13. [Alignment][NFC] DataLayout migration to llvm::Align

    Summary:
    This is patch is part of a series to introduce an Alignment type.
    See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
    See this patch for the introduction of the type: https://reviews.llvm.org/D64790

    Reviewers: courbet

    Subscribers: jholewinski, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67914 — gchatelet / ViewSVN
  14. [libTooling] Introduce new library of source-code builders.

    Summary:
    Introduces facilities for easily building source-code strings, including
    idiomatic use of parentheses and the address-of, dereference and member-access
    operators (dot and arrow) and queries about need for parentheses.

    Reviewers: gribozavr

    Subscribers: mgorny, cfe-commits, ilya-biryukov

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67632 — ymandel / ViewSVN

rL:372585 - C:372594 - #740 (Sep 23, 2019 5:31:58 AM)

  1. Removed dead code from Stencil.h — gribozavr / ViewSVN
  2. Removed an incorred namespace-end comment — gribozavr / ViewSVN
  3. [Alignment] Get DataLayout::StackAlignment as Align

    Summary:
    Internally it is needed to know if StackAlignment is set but we can
    expose it as llvm::Align.

    This is patch is part of a series to introduce an Alignment type.
    See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
    See this patch for the introduction of the type: https://reviews.llvm.org/D64790

    Reviewers: courbet

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67852 — gchatelet / ViewSVN
  4. Localizer - fix "variable used but never read" analyzer warning. NFCI.

    Simplify the code by separating the modification of the Changed variable from returning it. — rksimon / ViewSVN
  5. TargetInstrInfo::getStackSlotRange - fix "variable used but never read" analyzer warning. NFCI.

    We don't need to divide the BitSize local variable at all. — rksimon / ViewSVN
  6. gn build: Merge r372564 — gnsyncbot / ViewSVN
  7. Revert "Reland "[utils] Implement the llvm-locstats tool""

    This reverts commit rL372554. — djtodoro / ViewSVN

rL:372578 - C:372575 - #739 (Sep 23, 2019 4:02:10 AM)

  1. [llvm-readobj] - Stop treating ".stack_sizes.*" sections as stack sizes sections.

    llvm-readobj currently handles .stack_sizes.* (e.g. .stack_sizes.foo)
    as a normal stack sizes section. Though MC does not produce sections with
    such names. Also, linkers do not combine .stack_sizes.* into .stack_sizes.

    A mini discussion about this correctness issue is here: https://reviews.llvm.org/D67757#inline-609274
    This patch changes implementation so that only now only '.stack_sizes' name is
    accepted as a real stack sizes section.

    Differential revision: https://reviews.llvm.org/D67824 — grimar / ViewSVN
  2. CriticalAntiDepBreaker - Assert that we've found the bottom of the critical path. NFCI.

    Silences static analyzer null dereference warnings. — rksimon / ViewSVN

rL:372576 - C:372575 - #738 (Sep 23, 2019 3:39:08 AM)

  1. [llvm-readobj] - Implement LLVM-style dumping for .stack_sizes sections.

    D65313 implemented GNU-style dumping (llvm-readelf).
    This one implements LLVM-style dumping (llvm-readobj).

    Differential revision: https://reviews.llvm.org/D67834 — grimar / ViewSVN
  2. [NFC] Fixed clang wasm test after rL372573

    These tests should not depend on -O1.. — xbolva00 / ViewSVN
  3. [FunctionAttrs] Enable nonnull arg propagation

    Enable flag introduced in rL294998. Security concerns are no longer valid, since function signatures for mentioned libc functions has no nonnull attribute (Clang does not generate them? I see no nonnull attr in LLVM IR for these functions) and since rL372091 we carefully annotate the callsites where we know that size is static, non zero. So let's enable this flag again.. — xbolva00 / ViewSVN
  4. [ARM][MVE] Remove old tail predicates

    Remove any predicate that we replace with a vctp intrinsic, and try
    to remove their operands too. Also look into the exit block to see if
    there's any duplicates of the predicates that we've replaced and
    clone the vctp to be used there instead.

    Differential Revision: https://reviews.llvm.org/D67709 — sam_parker / ViewSVN
  5. [AArch64] support neon_sshl and neon_ushl in performIntrinsicCombine.

    Try to generate ushll/sshll for aarch64_neon_ushl/aarch64_neon_sshl,
    if their first operand is extended and the second operand is a constant

    Also adds a few tests marked with FIXME, where we can further increase
    codegen.

    Reviewers: t.p.northover, samparker, dmgreen, anemet

    Reviewed By: anemet

    Differential Revision: https://reviews.llvm.org/D62308 — fhahn / ViewSVN
  6. [ASTImporter][NFC] Add comprehensive tests for ODR violation handling strategies

    Summary:
    In this patch we provide additional and comprehensive tests for the ODR
    handling strategies. This is the continuation of
    https://reviews.llvm.org/D59692.

    Reviewers: shafik, a_sidorin, balazske, a.sidorin

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

    Tags: #clang

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

rL:372560 - C:372562 - #737 (Sep 23, 2019 2:20:37 AM)

  1. [Alignment] fix build — gchatelet / ViewSVN
  2. [ARM][LowOverheadLoops] Use subs during revert.

    Check whether there are any uses or defs between the LoopDec and
    LoopEnd. If there's not, then we can use a subs to set the cpsr and
    skip generating a cmp.

    Differential Revision: https://reviews.llvm.org/D67801 — sam_parker / ViewSVN
  3. [Alignment][NFC] Switch DataLayout private members to llvm::Align

    Summary:
    This is patch is part of a series to introduce an Alignment type.
    See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
    See this patch for the introduction of the type: https://reviews.llvm.org/D64790

    Reviewers: courbet

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67836 — gchatelet / ViewSVN

rL:372544 - C:372541 - #734 (Sep 22, 2019 11:38:08 PM)

  1. Revert "Extension: Mark the default constructor of chrono::duration as conditionally noexcept"; this breaks the gcc5 bot for C++11

    This reverts commit c8ca15c95c4c0d6d1356500d5fe49a319ea4ca01. — marshall / ViewSVN

rL:372544 - C:372541 - #733 (Sep 22, 2019 10:40:09 PM)

  1. [X86] Canonicalize all zeroes vector to RHS in X86DAGToDAGISel::tryVPTESTM. — ctopper / ViewSVN
  2. [X86] Remove SETEQ/SETNE canonicalization code from LowerIntVSETCC_AVX512 to prevent an infinite loop.

    The attached test case would previous infinite loop after
    r365711.

    I'm going to move this to X86ISelDAGToDAG.cpp to get the setcc
    to match VPTEST in 32-bit mode in a follow up commit. — ctopper / ViewSVN
  3. [X86] Add 32-bit command line to avx512f-vec-test-testn.ll — ctopper / ViewSVN
  4. For P0784R7: add further testing of requirements on constexpr
    destructors. — rsmith / ViewSVN
  5. Prefer AVX512 memcpy when applicable

    When AVX512 is available and the preferred vector width is 512-bits or
    more, we should prefer AVX512 for memcpy().

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

    https://reviews.llvm.org/D67874 — davezarzycki / ViewSVN

rL:372537 - C:372538 - #732 (Sep 22, 2019 9:37:11 PM)

  1. Extension: Mark the default constructor of chrono::duration as conditionally noexcept — marshall / ViewSVN

rL:372537 - C:372538 - #731 (Sep 22, 2019 9:12:30 PM)

  1. For P0784R7: add support for constexpr destructors, and call them as
    appropriate during constant evaluation.

    Note that the evaluator is sometimes invoked on incomplete expressions.
    In such cases, if an object is constructed but we never reach the point
    where it would be destroyed (and it has non-trivial destruction), we
    treat the expression as having an unmodeled side-effect. — rsmith / ViewSVN

rL:372537 - C:372534 - #730 (Sep 22, 2019 7:13:43 PM)

  1. [X86] Convert to Constant arguments to MMX shift by i32 intrinsics to TargetConstant during lowering.

    This allows us to use timm in the isel table which is more
    consistent with other intrinsics that take an immediate now.

    We can't declare the intrinsic as taking an ImmArg because we
    need to match non-constants to the shift by MMX register
    instruction which we do by mutating the intrinsic id during
    lowering. — ctopper / ViewSVN
  2. [X86] Remove stale FIXME.

    This goes back to when MMX was migrated to intrinsic only. The
    hack referenced here has been gone for quite a while. — ctopper / ViewSVN

rL:372535 - C:372534 - #729 (Sep 22, 2019 6:07:05 PM)

  1. [X86][SelectionDAGBuilder] Move the hack for handling MMX shift by i32 intrinsics into the X86 backend.

    This intrinsics should be shift by immediate, but gcc allows any
    i32 scalar and clang needs to match that. So we try to detect the
    non-constant case and move the data from an integer register to an
    MMX register.

    Previously this was done by creating a v2i32 build_vector and
    bitcast in SelectionDAGBuilder. This had to be done early since
    v2i32 isn't a legal type. The bitcast+build_vector would be DAG
    combined to X86ISD::MMX_MOVW2D which isel will turn into a
    GPR->MMX MOVD.

    This commit just moves the whole thing to lowering and emits
    the X86ISD::MMX_MOVW2D directly to avoid the illegal type. The
    test changes just seem to be due to nodes being linearized in a
    different order. — ctopper / ViewSVN

rL:372534 - C:372534 - #728 (Sep 22, 2019 4:58:32 PM)

  1. [X86] Require last argument to LWPINS/LWPVAL builtins to be an ICE. Add ImmArg to the llvm intrinsics.

    Update the isel patterns to use timm instead of imm. — ctopper / ViewSVN

rL:372532 - C:372533 - #727 (Sep 22, 2019 4:08:20 PM)

  1. [NFC] Fixed failed test — xbolva00 / ViewSVN

rL:372532 - C:372531 - #726 (Sep 22, 2019 3:07:41 PM)

  1. [X86] X86DAGToDAGISel::matchBEXTRFromAndImm(): if can't use BEXTR, fallback to BZHI is profitable (PR43381)

    Summary:
    PR43381 notes that while we are good at matching `(X >> C1) & C2` as BEXTR/BEXTRI,
    we only do that if we either have BEXTRI (TBM),
    or if BEXTR is marked as being fast (`-mattr=+fast-bextr`).
    In all other cases we don't match.

    But that is mainly only true for AMD CPU's.
    However, for all the CPU's for which we have sched models,
    the BZHI is always fast (or the sched models are all bad.)

    So if we decide that it's unprofitable to emit BEXTR/BEXTRI,
    we should consider falling-back to BZHI if it is available,
    and follow-up with the shift.

    While it's really tempting to do something because it's cool
    it is wise to first think whether it actually makes sense to do.
    We shouldn't just use BZHI because we can, but only it it is beneficial.
    In particular, it isn't really worth it if the input is a register,
    mask is small, or we can fold a load.
    But it is worth it if the mask does not fit into 32-bits.

    (careful, i don't know much about intel cpu's, my choice of `-mcpu` may be bad here)
    Thus we manage to fold a load:
    https://godbolt.org/z/Er0OQz
    Or if we'd end up using BZHI anyways because the mask is large:
    https://godbolt.org/z/dBJ_5h
    But this isn'r actually profitable in general case,
    e.g. here we'd increase microop count
    (the register renaming is free, mca does not model that there it seems)
    https://godbolt.org/z/k6wFoz
    Likewise, not worth it if we just get load folding:
    https://godbolt.org/z/1M1deG

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

    Reviewers: RKSimon, craig.topper, davezarzycki, spatel

    Reviewed By: craig.topper, davezarzycki

    Subscribers: andreadb, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67875 — lebedevri / ViewSVN
  2. [Diagnostics] Warn if ?: with integer constants always evaluates to true

    Extracted from D63082. GCC has this warning under -Wint-in-bool-context, but as noted in the D63082's review, we should put it under TautologicalConstantCompare. — xbolva00 / ViewSVN
  3. [clang] fixing conditional explicit for out-of-line definition PR42980

    Summary: not every read in CXXConstructorDecl::getExplicitSpecifierInternal() was made on the canonical declaration.

    Reviewers: rsmith, aaron.ballman

    Reviewed By: rsmith

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67889 — tyker / ViewSVN

rL:372529 - C:372527 - #725 (Sep 22, 2019 2:21:15 PM)

  1. Verifier - silence static analyzer dyn_cast<VectorType> null dereference warnings. NFCI.

    The static analyzer is warning about potential null dereferences, but we should be able to use cast<VectorType> directly and if not assert will fire for us. — rksimon / ViewSVN
  2. [AMDGPU] isSDNodeAlwaysUniform - silence static analyzer dyn_cast<LoadSDNode> null dereference warning. NFCI.

    The static analyzer is warning about a potential null dereference, but we should be able to use cast<LoadSDNode> directly and if not assert will fire for us. — rksimon / ViewSVN
  3. [clang] [Basic] Enable __has_feature(leak_sanitizer)

    Add a 'leak_sanitizer' feature akin to existing '*_sanitizer' features
    to let programmers switch code paths accounting for leak sanitizers
    being enabled.

    Differential Revision: https://reviews.llvm.org/D67719 — mgorny / ViewSVN
  4. [X86] Fix some VCVTPS2PH isel patterns where 'i32' was used instead of 'timm'

    This seems to have completed omitted any check for the opcode
    of the operand in the isel table. — ctopper / ViewSVN

rL:372525 - C:372516 - #724 (Sep 22, 2019 1:07:26 PM)

  1. [X86][TableGen] Allow timm to appear in output patterns. Use it to remove ConvertToTarget opcodes from the X86 isel table.

    We're now using a lot more TargetConstant nodes in SelectionDAG.
    But we were still telling isel to convert some of them
    to TargetConstants even though they already are. This is because
    isel emits a conversion anytime the output pattern has a an 'imm'.
    I guess for patterns in instructions we take the 'timm' from the
    'set' pattern, but for Pat patterns with explcicit output we
    previously had to say 'imm' since 'timm' wasn't allowed in outputs. — ctopper / ViewSVN
  2. [NFC][X86] Add BEXTR test with load and 33-bit mask (PR43381 / D67875) — lebedevri / ViewSVN

rL:372523 - C:372516 - #723 (Sep 22, 2019 12:23:29 PM)

  1. [X86] Update commutable EVEX vcmp patterns to use timm instead of imm.

    We need to match TargetConstant, not Constant. This was broken
    in r372338, but we lacked test coverage. — ctopper / ViewSVN
  2. [X86] Add more tests for commuting evex vcmp instructions during isel to fold a load.

    Some of the isel patterns were not updated to check for
    TargetConstant instead of Constant in r372338. — ctopper / ViewSVN
  3. [SelectionDAG] computeKnownBits/ComputeNumSignBits - cleanup demanded/unknown paths. NFCI.

    Merge the calls, just adjust the demandedelts if we have a valid extract_subvector constant index, else demand all elts. — rksimon / ViewSVN
  4. [XRay] Silence static analyzer dyn_cast<BufferExtents> null dereference warning. NFCI. — rksimon / ViewSVN

rL:372518 - C:372516 - #722 (Sep 22, 2019 11:27:43 AM)

  1. [LSR] Silence static analyzer null dereference warnings with assertions. NFCI.

    Add assertions to make it clear that GenerateIVChain / NarrowSearchSpaceByPickingWinnerRegs should succeed in finding non-null values — rksimon / ViewSVN
  2. ConstantHoisting - Silence static analyzer dyn_cast<PointerType> null dereference warning. NFCI. — rksimon / ViewSVN
  3. [CLANG][BPF] permit any argument type for __builtin_preserve_access_index()

    Commit c15aa241f821 ("[CLANG][BPF] change __builtin_preserve_access_index()
    signature") changed the builtin function signature to
      PointerT __builtin_preserve_access_index(PointerT ptr)
    with a pointer type as the argument/return type, where argument and
    return types must be the same.

    There is really no reason for this constraint. The builtin just
    presented a code region so that IR builtins
      __builtin_{array, struct, union}_preserve_access_index
    can be applied.

    This patch removed the pointer type restriction to permit any
    argument type as long as it is permitted by the compiler.

    Differential Revision: https://reviews.llvm.org/D67883 — yhs / ViewSVN

rL:372515 - C:372497 - #721 (Sep 22, 2019 10:19:00 AM)

  1. gn build: Friendlier error on invalid entries in llvm_targets_to_build — nico / ViewSVN
  2. [Cost][X86] Add more missing vector truncation costs

    The AVX512 cases still need some work to correct recognise the PMOV truncation cases. — rksimon / ViewSVN
  3. gn build: consolidate "Nothing to do" branches in targets.gni

    No behavior change. — nico / ViewSVN

rL:372510 - C:372497 - #720 (Sep 22, 2019 8:14:31 AM)

  1. [compiler-rt] Fix lint check failure on comments

    This fixes buildbot failures for https://reviews.llvm.org/rL372459.
    (at least on PowerPC/Z )

    The fix is generated by running clang-format on the error lines only. — jsji / ViewSVN
  2. [InstCombine] allow icmp+binop folds before min/max bailout (PR43310)

    This has the potential to uncover missed analysis/folds as shown in the
    min/max code comment/test, but fewer restrictions on icmp folds should
    be better in general to solve cases like:
    https://bugs.llvm.org/show_bug.cgi?id=43310 — spatel / ViewSVN
  3. [InstCombine] add tests for icmp fold hindered by min/max; NFC — spatel / ViewSVN
  4. Fix uninitialized variable warning. NFCI. — rksimon / ViewSVN
  5. [AArch64] AArch64StackTagging - Silence static analyzer dyn_cast<> null dereference warning. NFCI.

    The static analyzer is warning about potential null dereferences, but we should be able to use cast<> directly and if not assert will fire for us. — rksimon / ViewSVN
  6. gn build: Add missing RISCV to llvm_targets_to_build="all" — nico / ViewSVN
  7. gn build: Add build files for llvm/lib/Target/AVR

    Differential Revision: https://reviews.llvm.org/D67872 — nico / ViewSVN
  8. [NVPTX] NVPTXLowerAggrCopies - Silence static analyzer dyn_cast<StoreInst> null dereference warning. NFCI. — rksimon / ViewSVN
  9. [Lanai] LanaiAsmParser - Silence static analyzer dyn_cast null dereference warnings. NFCI.

    We were already doing this dyn_cast && isa<> && cast<> pattern for some add*Operands methods, just do this more consistently to stop clang static analyzer warning so much. — rksimon / ViewSVN

rL:372502 - C:372497 - #719 (Sep 22, 2019 6:08:02 AM)

  1. [VPlan] Silence static analyzer dyn_cast null dereference warning. NFCI. — rksimon / ViewSVN
  2. AMDGPUPrintfRuntimeBinding - silence static analyzer null dereference warnings. NFCI. — rksimon / ViewSVN
  3. [MIPS] Don't dereference dyn_cast<> Constant results. NFCI.

    The static analyzer is warning about potential null dereferences, but we should be able to use cast<> directly and if not assert will fire for us. — rksimon / ViewSVN
  4. [Hexagon] Don't dereference dyn_cast<ConstantFPSDNode> result. NFCI.

    The static analyzer is warning about potential null dereference, but we should be able to use cast<ConstantFPSDNode> directly and if not assert will fire for us. — rksimon / ViewSVN
  5. [Cost][X86] Add v2i64 truncation costs

    We are missing costs for a lot of truncation cases, I'm hoping to address all the 'zero cost' cases in trunc.ll

    I thought this was a vector widening side effect, but even before this we had some interesting LV decisions (notably over indvars) being made due to these zero costs. — rksimon / ViewSVN
  6. Clang-format: Add Whitesmiths indentation style

    Summary:
    This patch adds support for the Whitesmiths indentation style to clang-format. It’s an update to a patch submitted in 2015 (D6833), but reworks it to use the newer API.

    There are still some issues with this patch, primarily around `switch` and `case` support. The added unit test won’t currently pass because of the remaining issues.

    Reviewers: mboehme, MyDeveloperDay, djasper

    Reviewed By: MyDeveloperDay

    Subscribers: krasimir, MyDeveloperDay, echristo, cfe-commits

    Patch By: @timwoj (Tim Wojtulewicz)

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67627 — paulhoad / ViewSVN
  7. Move classes into anonymous namespaces. NFC. — d0k / ViewSVN
  8. [X86] Add test memset and memcpy testcases for D67874. NFC — ctopper / ViewSVN

rL:372491 - C:372492 - #718 (Sep 21, 2019 3:36:05 PM)

  1. NFC: Change ObjCQualified*TypesAreCompatible to take
    ObjCObjectPointerType arguments.

    All callers already had one, just creating a QualType to pass, after
    which the function cast it right back. — jyknight / ViewSVN
  2. [InstSimplify] simplifyUnsignedRangeCheck(): X >= Y && Y == 0  -->  Y == 0

    https://rise4fun.com/Alive/v9Y4 — lebedevri / ViewSVN
  3. [InstSimplify][NFC] Reorganize simplifyUnsignedRangeCheck() to emphasize and/or symmetry

    Only a single `X >= Y && Y == 0  -->  Y == 0` fold appears to be missing. — lebedevri / ViewSVN
  4. [NFC][InstSimplify] Add exhaustive test coverage for simplifyUnsignedRangeCheck().

    One case is not handled. — lebedevri / ViewSVN

rL:372488 - C:372462 - #717 (Sep 21, 2019 2:46:04 PM)

  1. [Docs] Updates sidebar links

    Adds sidebar links to mailing lists, IRC, and meetups and social events. — dr87 / ViewSVN

rL:372487 - C:372462 - #716 (Sep 21, 2019 1:57:02 PM)

  1. [Docs] Adds new page for Getting Involved articles

    Adds a new page for existing Getting Involved, Development Process, and Community Proposals articles. Also moves Mailing Lists, Meetups and social events, and IRC sections. — dr87 / ViewSVN

rL:372481 - C:372462 - #715 (Sep 21, 2019 1:11:28 PM)

  1. [CodeView] Add pragma push/pop_macro for ARM64_FPSR to enum header

    This fixes (one aspect of) compilation of LLDB with MSVC for ARM64.

    LLDB source files include intrin.h, and the MSVC intrin.h transitively
    includes arm64intr.h, which has an ARM64_FPSR define, which clashes
    with the enum declaration.

    Differential Revision: https://reviews.llvm.org/D67864 — mstorsjo / ViewSVN

rL:372480 - C:372462 - #714 (Sep 21, 2019 11:57:37 AM)

  1. SROA: Check Total Bits of vector type

    While Promoting alloca instruction of Vector Type,
    Check total size in bits of its slices too.
    If they don't match, don't promote the alloca instruction.

    Bug : https://bugs.llvm.org/show_bug.cgi?id=42585 — ssarda / ViewSVN

rL:372479 - C:372462 - #713 (Sep 21, 2019 11:11:41 AM)

  1. Test mail. NFC.

    Testing commit acces. NFC. — ssarda / ViewSVN

rL:372478 - C:372462 - #712 (Sep 21, 2019 10:26:59 AM)

  1. Recommit [SampleFDO] Expose an interface to return the size of a section
    or the size of the profile for profile in ExtBinary format.

    Fix a test failure on Mac.

    [SampleFDO] Expose an interface to return the size of a section or the
    size of the profile for profile in ExtBinary format.

    Sometimes we want to limit the size of the profile by stripping some functions
    with low sample count or by stripping some function names with small text size
    from profile symbol list. That requires the profile reader to have the
    interfaces returning the size of a section or the size of total profile. The
    patch add those interfaces.

    At the same time, add some dump facility to show the size of each section.

    Differential revision: https://reviews.llvm.org/D67726 — wmi / ViewSVN

rL:372475 - C:372462 - #711 (Sep 21, 2019 9:23:25 AM)

  1. [Attributor] Implement "norecurse" function attribute deduction

    Summary:
    This patch introduces `norecurse` function attribute deduction.

    `norecurse` will be deduced if the following conditions hold:
    * The size of SCC in which the function belongs equals to 1.
    * The function doesn't have self-recursion.
    * We have `norecurse` for all call site.

    To avoid a large change, SCC is calculated using scc_iterator in InfoCache initialization for now.

    Reviewers: jdoerfert, sstefan1

    Reviewed By: jdoerfert

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67751 — uenoku / ViewSVN

rL:372473 - C:372462 - #710 (Sep 21, 2019 8:06:18 AM)

  1. [Support] Add a DataExtractor constructor that takes ArrayRef<uint8_t>

    The new constructor can simplify some llvm-readobj call sites.

    Reviewed By: grimar, dblaikie

    Differential Revision: https://reviews.llvm.org/D67797 — maskray / ViewSVN
  2. [Docs] Bug fix for document not included in toctree

    Fixes 'document not included in toctree' bug for FAQ and Lexicon topics. — dr87 / ViewSVN
  3. [Docs] Updates sidebar links

    Adds additional links to sidebar. Also removes Glossary and FAQ from LLVM Design & Overview section. (These links now reside on the sidebar.) — dr87 / ViewSVN

rL:372468 - C:372462 - #709 (Sep 21, 2019 5:35:54 AM)

  1. [NFC][X86] Adjust check prefixes in bmi.ll (PR43381) — lebedevri / ViewSVN

rL:372467 - C:372462 - #708 (Sep 21, 2019 3:11:57 AM)

  1. [AArch64][GlobalISel] Implement selection for G_SHL of <2 x i64>

    Simple continuation of existing selection support. — aemerson / ViewSVN
  2. [AArch64][GlobalISel] Selection support for G_ASHR of <2 x s64>

    Just add an extra case to the existing selection logic. — aemerson / ViewSVN
  3. [AArch64][GlobalISel] Make <4 x s32> G_ASHR and G_LSHR legal. — aemerson / ViewSVN

rL:372464 - C:372462 - #707 (Sep 21, 2019 2:17:10 AM)

  1. Revert "[SampleFDO] Expose an interface to return the size of a section or the size"

    This reverts commit f118852046a1d255ed8c65c6b5db320e8cea53a0.

    Broke the macOS build/greendragon bots. — aemerson / ViewSVN
  2. [MachinePipeliner] Improve the TargetInstrInfo API analyzeLoop/reduceLoopCount

    Recommit: fix asan errors.

    The way MachinePipeliner uses these target hooks is stateful - we reduce trip
    count by one per call to reduceLoopCount. It's a little overfit for hardware
    loops, where we don't have to worry about stitching a loop induction variable
    across prologs and epilogs (the induction variable is implicit).

    This patch introduces a new API:

      /// Analyze loop L, which must be a single-basic-block loop, and if the
      /// conditions can be understood enough produce a PipelinerLoopInfo object.
      virtual std::unique_ptr<PipelinerLoopInfo>
      analyzeLoopForPipelining(MachineBasicBlock *LoopBB) const;

    The return value is expected to be an implementation of the abstract class:

      /// Object returned by analyzeLoopForPipelining. Allows software pipelining
      /// implementations to query attributes of the loop being pipelined.
      class PipelinerLoopInfo {
      public:
        virtual ~PipelinerLoopInfo();
        /// Return true if the given instruction should not be pipelined and should
        /// be ignored. An example could be a loop comparison, or induction variable
        /// update with no users being pipelined.
        virtual bool shouldIgnoreForPipelining(const MachineInstr *MI) const = 0;

        /// Create a condition to determine if the trip count of the loop is greater
        /// than TC.
        ///
        /// If the trip count is statically known to be greater than TC, return
        /// true. If the trip count is statically known to be not greater than TC,
        /// return false. Otherwise return nullopt and fill out Cond with the test
        /// condition.
        virtual Optional<bool>
        createTripCountGreaterCondition(int TC, MachineBasicBlock &MBB,
                                     SmallVectorImpl<MachineOperand> &Cond) = 0;

        /// Modify the loop such that the trip count is
        /// OriginalTC + TripCountAdjust.
        virtual void adjustTripCount(int TripCountAdjust) = 0;

        /// Called when the loop's preheader has been modified to NewPreheader.
        virtual void setPreheader(MachineBasicBlock *NewPreheader) = 0;

        /// Called when the loop is being removed.
        virtual void disposed() = 0;
      };

    The Pipeliner (ModuloSchedule.cpp) can use this object to modify the loop while
    allowing the target to hold its own state across all calls. This API, in
    particular the disjunction of creating a trip count check condition and
    adjusting the loop, improves the code quality in ModuloSchedule.cpp. — jamesm / ViewSVN

rL:372458 - C:372462 - #706 (Sep 21, 2019 1:05:23 AM)

  1. Attempt to fix a windows buildbot failure — szelethus / ViewSVN
  2. Add __lsan::ScopedInterceptorDisabler for strerror(3)

    Summary:
    strerror(3) on NetBSD uses internally TSD with a destructor that is never
    fired for exit(3). It's correctly called for pthread_exit(3) scenarios.

    This is a case when a leak on exit(3) is expected, unavoidable and harmless.

    Reviewers: joerg, vitalybuka, dvyukov, mgorny

    Reviewed By: vitalybuka

    Subscribers: dmgreen, kristof.beyls, jfb, llvm-commits, #sanitizers

    Tags: #sanitizers, #llvm

    Differential Revision: https://reviews.llvm.org/D67337 — kamil / ViewSVN
  3. Avoid memory leak in ASan test

    Summary:
    Add missing free(3) for the malloc(3) call.

    Detected on NetBSD with LSan.

    Reviewers: joerg, mgorny, vitalybuka, dvyukov

    Reviewed By: vitalybuka

    Subscribers: llvm-commits, #sanitizers

    Tags: #sanitizers, #llvm

    Differential Revision: https://reviews.llvm.org/D67330 — kamil / ViewSVN
  4. Stop tracking atexit/__cxa_atexit/pthread_atfork allocations in LSan/NetBSD

    Summary:
    The atexit(3) and __cxa_atexit() calls allocate internally memory and free on exit,
    after executing all callback. This causes false positives as DoLeakCheck() is called
    from the atexit handler. In the LSan/ASan tests there are strict checks triggering
    false positives here.

    Intercept all atexit(3) and __cxa_atexit() calls and disable LSan when calling the
    real functions.

    Stop tracing allocations in pthread_atfork(3) funtions, as there are performed
    internal allocations that are not freed for the time of running StopTheWorld()
    code. This avoids false-positives.

    The same changes have to be replicated in the ASan and LSan runtime.

    Non-NetBSD OSs are not tested and this code is restricted to NetBSD only.

    Reviewers: dvyukov, joerg, mgorny, vitalybuka, eugenis

    Reviewed By: vitalybuka

    Subscribers: jfb, llvm-commits, #sanitizers

    Tags: #sanitizers, #llvm

    Differential Revision: https://reviews.llvm.org/D67331 — kamil / ViewSVN
  5. [X86] Use sse_load_f32/f64 and timm in patterns for memory form of vgetmantss/sd.

    Previously we only matched scalar_to_vector and scalar load, but
    we should be able to narrow a vector load or match vzload.

    Also need to match TargetConstant instead of Constant. The register
    patterns were previously updated, but not the memory patterns. — ctopper / ViewSVN
  6. [X86] Add test case to show failure to fold load with getmantss due to isel pattern looking for Constant instead of TargetConstant

    The intrinsic has an immarg so its gets created with a TargetConstant
    instead of a Constant after r372338. The isel pattern was only
    updated for the register form, but not the memory form. — ctopper / ViewSVN

rL:372451 - C:372455 - #705 (Sep 20, 2019 11:35:26 PM)

  1. [Clang Interpreter] Fixed Bug 43362, build failure on GCC

    free() was not directly included in InterpStack.cpp, added include now. — nand / ViewSVN

rL:372451 - C:372454 - #704 (Sep 20, 2019 10:14:42 PM)

  1. Fix bad APInt compare.

    APInt comparison require both to have the same bitwidth.  Since only the value
    is needed, use the compare function APInt::isSameValue instead. — rtrieu / ViewSVN

rL:372451 - C:372453 - #703 (Sep 20, 2019 8:25:24 PM)

  1. Merge and improve code that detects same value in comparisons.

    -Wtautological-overlap-compare and self-comparison from -Wtautological-compare
    relay on detecting the same operand in different locations.  Previously, each
    warning had it's own operand checker.  Now, both are merged together into
    one function that each can call.  The function also now looks through member
    access and array accesses.

    Differential Revision: https://reviews.llvm.org/D66045 — rtrieu / ViewSVN
  2. Revert assertion added by r372394

    The assertion added by r372394 causes CUDA test in test-suite to assert.

    The assertion was not there originally, so revert it. — yaxunl / ViewSVN
  3. avr targetinfo: remove unneeded dep on MC — nico / ViewSVN
  4. AMDGPU/GlobalISel: Allow selection of scalar min/max

    I believe all of the uniform/divergent pattern predicates are
    redundant and can be removed. The uniformity bit already influences
    the register class, and nothhing has broken when I've removed this and
    others. — arsenm / ViewSVN
  5. LiveIntervals: Add missing operator!= for segments — arsenm / ViewSVN
  6. Improve -Wtautological-overlap-compare

    Allow this warning to detect a larger number of constant values, including
    negative numbers, and handle non-int types better.

    Differential Revision: https://reviews.llvm.org/D66044 — rtrieu / ViewSVN

rL:372447 - C:372444 - #702 (Sep 20, 2019 6:46:02 PM)

  1. Support for 64-bit PC-relative relocations for X86_64

    ELF files generated for X86_64 targets may contain 64-bit PC-relative
    relocations. For instance, an exception handler table entry contains the start
    of exception-throwing frame relative to the start of exception handler. As these
    two labels belong to different sections, their difference and so the relocation
    is 64-bit.

    An attempt to parse such file, i.e. in DWARFContext::create, results in "failed
    to compute relocation" error.

    This fix adds support for such relocations to RelocationResolver.cpp.

    Reviewed By: MaskRay

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

    Patch by Oleg Pliss (Oleg.Pliss@azul.com) — apilipenko / ViewSVN
  2. gn build: Merge r372445 — gnsyncbot / ViewSVN
  3. [clang-tidy] Add check for classes missing -hash ⚠️

    Summary:
    Apple documentation states that:
    "If two objects are equal, they must have the same hash value. This last
    point is particularly important if you define isEqual: in a subclass and
    intend to put instances of that subclass into a collection. Make sure
    you also define hash in your subclass."
    https://developer.apple.com/documentation/objectivec/1418956-nsobject/1418795-isequal?language=objc

    In many or all versions of libobjc, -[NSObject isEqual:] is a pointer
    equality check and -[NSObject hash] returns the messaged object's
    pointer. A relatively common form of developer error is for a developer to
    override -isEqual: in a subclass without overriding -hash to ensure that
    hashes are equal for objects that are equal.

    It is assumed that an override of -isEqual: is a strong signal for
    changing the object's equality operator to something other than pointer
    equality which implies that a missing override of -hash could result in
    distinct objects being equal but having distinct hashes because they are
    independent instances. This added check flags classes that override
    -isEqual: but inherit NSObject's implementation of -hash to warn of the
    potential for unexpected behavior.

    The proper implementation of -hash is the responsibility of the
    developer and the check will only verify that the developer made an
    effort to properly implement -hash. Developers can set up unit tests
    to verify that their implementation of -hash is appropriate.

    Test Notes:
    Ran check-clang-tools.

    Reviewers: aaron.ballman, benhamilton

    Reviewed By: aaron.ballman

    Subscribers: Eugene.Zelenko, mgorny, xazax.hun, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67737 — stephanemoore / ViewSVN

rL:372443 - C:372444 - #701 (Sep 20, 2019 5:29:13 PM)

  1. [clang-scan-deps] strip the --serialize-diagnostics argument

    This ensures that clang-scan-deps won't write out diagnostics when
    scanning dependencies. — arphaman / ViewSVN
  2. [GlobalISel] Defer setting HasCalls on MachineFrameInfo to selection time.

    We currently always set the HasCalls on MFI during translation and legalization if
    we're handling a call or legalizing to a libcall. However, if that call is later
    optimized to a tail call then we don't need the flag. The flag being set to true
    causes frame lowering to always save and restore FP/LR, which adds unnecessary code.

    This change does the same thing as SelectionDAG and ports over some code that scans
    instructions after selection, using TargetInstrInfo to determine if target opcodes
    are known calls.

    Code size geomean improvements on CTMark:
    -O0 : 0.1%
    -Os : 0.3%

    Differential Revision: https://reviews.llvm.org/D67868 — aemerson / ViewSVN
  3. [Inliner] Remove incorrect early exit during switch cost computation

    Summary:
    The CallAnalyzer::visitSwitchInst has an early exit when the estimated
    lower bound of the switch cost will put the overall cost of the inline
    above the threshold. However, this code is not correctly estimating the
    lower bound for switches that can be transformed into bit tests, leading
    to unnecessary lost inlines, and also differing behavior with
    optimization remarks enabled.

    First, the early exit is controlled by whether ComputeFullInlineCost is
    enabled or not, and that in turn is disabled by default but enabled when
    enabling -pass-remarks=missed. This by itself wouldn't lead to a
    problem, except that as described below, the lower bound can be above
    the real lower bound, so we can sometimes get different inline decisions
    with inline remarks enabled, which is problematic.

    The early exit was added in along with a new switch cost model in D31085.
    The reason why this early exit was added is due to a concern one reviewer
    raised about compile time for large switches:
    https://reviews.llvm.org/D31085?id=94559#inline-276200

    However, the code just below there calls
    getEstimatedNumberOfCaseClusters, which in turn immediately calls
    BasicTTIImpl getEstimatedNumberOfCaseClusters, which in the worst case
    does a linear scan of the cases to get the high and low values. The
    bit test handling in particular is guarded by whether the number of
    cases fits into the max bit width. There is no suggestion that anyone
    measured a compile time issue, it appears to be theoretical.

    The problem is that the reviewer's comment about the lower bound
    calculation is incorrect, specifically in the case of a switch that can
    be lowered to a bit test. This isn't followed up on the comment
    thread, but the author does add a FIXME to that effect above the early
    exit added when they subsequently revised the patch.

    As a result, we were incorrectly early exiting and not inlining
    functions with switch statements that would be lowered to bit tests in
    cases where we were nearing the threshold. Combined with the fact that
    this early exit was skipped with opt remarks enabled, this caused
    different inlining decisions to be made when -pass-remarks=missed is
    enabled to debug the missing inline.

    Remove the early exit for the above reasons.

    I also copied over an existing AArch64 inlining test to X86, and
    adjusted the threshold so that the bit test inline only occurs with the
    fix in this patch.

    Reviewers: davidxl

    Subscribers: eraman, kristof.beyls, haicheng, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67716 — tejohnson / ViewSVN

rL:372439 - C:372438 - #700 (Sep 20, 2019 4:26:52 PM)

  1. [SampleFDO] Expose an interface to return the size of a section or the size
    of the profile for profile in ExtBinary format.

    Sometimes we want to limit the size of the profile by stripping some functions
    with low sample count or by stripping some function names with small text size
    from profile symbol list. That requires the profile reader to have the
    interfaces returning the size of a section or the size of total profile. The
    patch add those interfaces.

    At the same time, add some dump facility to show the size of each section. — wmi / ViewSVN
  2. Remove outdated FIXME. — rsmith / ViewSVN
  3. Fix assertion failure when constant evaluation of a switch jumps over an
    uninitialized variable in an init-statement of a 'for' or 'if'. — rsmith / ViewSVN
  4. [SystemZ] Support z15 processor name

    The recently announced IBM z15 processor implements the architecture
    already supported as "arch13" in LLVM.  This patch adds support for
    "z15" as an alternate architecture name for arch13.

    Corrsponding LLVM support was committed as rev. 372435. — uweigand / ViewSVN
  5. [SystemZ] Support z15 processor name

    The recently announced IBM z15 processor implements the architecture
    already supported as "arch13" in LLVM.  This patch adds support for
    "z15" as an alternate architecture name for arch13.

    The patch also uses z15 in a number of places where we used arch13
    as long as the official name was not yet announced. — uweigand / ViewSVN
  6. Fix missed case of switching getConstant to getTargetConstant. Try 2.

    Summary: This fixes a crasher introduced by r372338.

    Reviewers: echristo, arsenm

    Subscribers: wdng, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67850 — saugustine / ViewSVN
  7. Remove sanitizer-aarch64-linux-mte bot.

    We never did anything with it, and it looks easier to add the tests
    on one of the existing x86_64 bots (via qemu). — eugenis / ViewSVN
  8. [Docs] Add a custom sidebar to doc pages

    Adds a custom sidebar to LLVM docs. Sidebar includes links to How to submit a bug and FAQ topics, as well as a Show Source link and search box. — dr87 / ViewSVN

rL:372430 - C:372422 - #699 (Sep 20, 2019 3:07:59 PM)

  1. [PPC] PPCLoopPreIncPrep - silence static analyzer null dereference warning. — rksimon / ViewSVN

rL:372429 - C:372422 - #698 (Sep 20, 2019 2:09:14 PM)

  1. [AddressSanitizer] Don't dereference dyn_cast<ConstantInt> results. NFCI.

    The static analyzer is warning about potential null dereference, but we can use cast<ConstantInt> directly and if not assert will fire for us. — rksimon / ViewSVN
  2. [Docs] Move topics to new categories

    This commit moves several topics to new categories. — dr87 / ViewSVN
  3. [NFC][PowerPC] Consolidate testing of common linkage symbols

    Add a new file to test the code gen for common linkage symbol.
    Remove common linkage in some other testcases to avoid distraction. — jsji / ViewSVN
  4. Revert "[MachinePipeliner] Improve the TargetInstrInfo API analyzeLoop/reduceLoopCount"

    This commit broke the ASan buildbot. See comments in rL372376 for more
    information.

    This reverts commit 15e27b0b6d9d51362fad85dbe95ac5b3fadf0a06. — hctim / ViewSVN

rL:372423 - C:372422 - #697 (Sep 20, 2019 12:47:21 PM)

  1. [docs] Update structure-aware-fuzzing link.

    The document has been moved to the google/fuzzing GitHub repo. — morehouse / ViewSVN
  2. Ensure AtomicExpr goes through SEMA checking after TreeTransform

    RebuildAtomicExpr was skipping doing semantic analysis which broke in
    the cases where the expressions were not dependent. This resulted in the
    ImplicitCastExpr from an array to a pointer being lost, causing a crash
    in IR CodeGen.

    Differential Revision: https://reviews.llvm.org/D67854 — erichkeane / ViewSVN
  3. Can't pass .dSYM directory to llvm-objdump -dsym= (and error message is wrong)

    Summary:
    Allow users to pass the path to a .dSYM directory to llvm-objdump's -dsym
    flag rather than requiring users to find the DWARF DSYM Mach-O within the
    bundle structure by hand.

    rdar://46873333

    Reviewers: pete, lhames, friss, aprantl

    Reviewed By: pete, aprantl

    Subscribers: MaskRay, aprantl, rupprecht, seiya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67780 — mtrent / ViewSVN

rL:372420 - C:372419 - #696 (Sep 20, 2019 12:05:55 PM)

  1. [Mips] Remove immarg test for intrinsics that no longer have an immarg after r372409. — ctopper / ViewSVN
  2. Fix a documentation error — szelethus / ViewSVN
  3. Fix -Wdocumentation warning. NFCI. — rksimon / ViewSVN
  4. [NFC][PowerPC] Refactor classifyGlobalReference

    We always(and only) check the NLP flag after calling
    classifyGlobalReference to see whether it is accessed
    indirectly.

    Refactor to code to use isGVIndirectSym instead. — jsji / ViewSVN
  5. Fix MSVC "not all control paths return a value" warning. NFCI. — rksimon / ViewSVN
  6. [www] Turn 'Clang 9' boxes green in C++ status pages now Clang 9 is
    released. — rsmith / ViewSVN

rL:372413 - C:372414 - #695 (Sep 20, 2019 11:00:16 AM)

  1. Reland '[analyzer][MallocChecker][NFC] Document and reorganize some functions'

    Differential Revision: https://reviews.llvm.org/D54823 — szelethus / ViewSVN
  2. [NFC][InstCombine] Fixup newly-added tests — lebedevri / ViewSVN
  3. [MTE] Handle MTE instructions in AArch64LoadStoreOptimizer.

    Summary: Generate pre- and post-indexed forms of ST*G and STGP when possible.

    Reviewers: ostannard, vitalybuka

    Subscribers: kristof.beyls, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67741 — eugenis / ViewSVN

rL:372409 - C:372410 - #694 (Sep 20, 2019 10:10:10 AM)

  1. [libTooling] Add `ifBound`, `elseBranch` RangeSelector combinators.

    Summary:
    Adds two new combinators and corresponding tests to the RangeSelector library.
    * `ifBound` -- conditional evaluation of range-selectors, based on whether a
       given node id is bound in the match.
    * `elseBranch` -- selects the source range of the else and its statement.

    Reviewers: gribozavr

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67621 — ymandel / ViewSVN
  2. [SelectionDAG][Mips][Sparc] Don't allow SimplifyDemandedBits to constant fold TargetConstant nodes to a Constant.

    Summary:
    After the switch in SimplifyDemandedBits, it tries to create a
    constant when possible. If the original node is a TargetConstant
    the default in the switch will call computeKnownBits on the
    TargetConstant which will succeed. This results in the
    TargetConstant becoming a Constant. But TargetConstant exists to
    avoid being changed.

    I've fixed the two cases that relied on this in tree by explicitly
    making the nodes constant instead of target constant. The Sparc
    case is an old bug. The Mips case was recently introduced now that
    ImmArg on intrinsics gets turned into a TargetConstant when the
    SelectionDAG is created. I've removed the ImmArg since it lowers
    to generic code.

    Reviewers: arsenm, RKSimon, spatel

    Subscribers: jyknight, sdardis, wdng, arichardson, hiraditya, fedor.sergeev, jrtc27, atanasyan, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67802 — ctopper / ViewSVN
  3. [aarch64] add def-pats for dot product

    This patch adds the patterns to select the dot product instructions.
    Tested on aarch64-linux with make check-all.

    Differential Revision: https://reviews.llvm.org/D67645 — spop / ViewSVN

rL:372405 - C:372394 - #693 (Sep 20, 2019 8:39:41 AM)

  1. Remove assert from MachineLoop::getLoopPredecessor()

    According to the documentation method returns predecessor
    if the given loop's header has exactly one unique predecessor
    outside the loop. Otherwise return null.

    In reality it asserts if there is no predecessor outside of
    the loop.

    The testcase has the loop where predecessors outside of the
    loop were not identified as analyzeBranch() was unable to
    process the mask branch and returned true. That is also not
    correct to assert for the truly dead loops.

    Differential Revision: https://reviews.llvm.org/D67634 — rampitec / ViewSVN
  2. [MVT] Add v256i1 to MachineValueType

    This type can show up when lowering some HVX vector code on Hexagon. — kparzysz / ViewSVN
  3. [InstCombine] Tests for (a+b)<=a && (a+b)!=0 fold (PR43259)

    https://rise4fun.com/Alive/knp
    https://rise4fun.com/Alive/ALap — lebedevri / ViewSVN
  4. [ARM] Fix CTTZ not generating correct instructions MVE

    CTTZ intrinsic should have been set to Custom, not Expand — oliverlars / ViewSVN
  5. [docs] Remove training whitespaces. NFC

    Subscribers: jfb, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67835 — fpetrogalli / ViewSVN
  6. Add a missing space in a MIR parser error message — dstenb / ViewSVN
  7. gn build: Merge r372396 — gnsyncbot / ViewSVN
  8. [TextAPI] Arch&Platform to Target

    Summary:
    This is a patch for updating TextAPI/Macho to read in targets as opposed to arch/platform.
    This is because in previous versions tbd files only supported a single platform but that is no longer the case,
    so, now its tracked by unique triples.
    This precedes a seperate patch that will add  the TBD-v4 format

    Reviewers: ributzka, steven_wu, plotfi, compnerd, smeenai

    Reviewed By: ributzka

    Subscribers: mgorny, hiraditya, dexonsmith, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67527 — cishida / ViewSVN

rL:372395 - C:372394 - #692 (Sep 20, 2019 7:31:34 AM)

  1. Use llvm::StringLiteral instead of StringRef in few places — maskray / ViewSVN
  2. [CUDA][HIP] Fix hostness of defaulted constructor
    Clang does not respect the explicit device host attributes of defaulted special members.
    Also clang does not respect the hostness of special members determined by their
    first declarations.
    Clang also adds duplicate implicit device or host attributes in certain cases.
    This patch fixes that.
    Differential Revision: https://reviews.llvm.org/D67509 — yaxunl / ViewSVN
  3. [SLPVectorizer] add tests for bogus reductions; NFC

    https://bugs.llvm.org/show_bug.cgi?id=42708
    https://bugs.llvm.org/show_bug.cgi?id=43146 — spatel / ViewSVN
  4. [Testing] Python 3 requires `print` to use parens — davezarzycki / ViewSVN
  5. [RISCV] Fix static analysis issues

    Unlikely to be problematic but still worth fixing.

    Differential Revision: https://reviews.llvm.org/D67640 — luismarques / ViewSVN
  6. [Alignment][NFC] migrate DataLayout internal struct to llvm::Align

    Summary:
    This is patch is part of a series to introduce an Alignment type.
    See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
    See this patch for the introduction of the type: https://reviews.llvm.org/D64790

    With this patch the PointerAlignElem struct goes from 20B to 16B.

    Reviewers: courbet

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67400 — gchatelet / ViewSVN
  7. [FastISel] Fix insertion of unconditional branches during FastISel

    The insertion of an unconditional branch during FastISel can differ depending on
    building with or without debug information. This happens because FastISel::fastEmitBranch
    emits an unconditional branch depending on the size of the current basic block
    without distinguishing between debug and non-debug instructions.

    This patch fixes this issue by ignoring debug instructions when getting the size
    of the basic block.

    Reviewers: aprantl

    Reviewed By: aprantl

    Subscribers: ormris, aprantl, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67703 — tellenbach / ViewSVN

rL:372384 - C:372387 - #691 (Sep 20, 2019 6:10:02 AM)

  1. [clang-tidy] Fix relative path in header-filter.

    Summary:
    Clang-tidy supports output diagnostics from header files if user
    specifies --header-filter. But it can't handle relative path well.
    For example, the folder structure of a project is:

    ```
    // a.h is in /src/a/a.h

    // b.h is in /src/b/b.h
    ...

    // c.cpp is in /src/c.cpp

    ```

    Now, we set --header-filter as --header-filter=/a/. That means we only
    want to check header files under /src/a/ path, and ignore header files
    uder /src/b/ path, but in current implementation, clang-tidy will check
    /src/b/b.h also, because the name of b.h used in clang-tidy is
    /src/a/../b/b.h.

    This change tries to fix this issue.

    Reviewers: alexfh, hokein, aaron.ballman, gribozavr

    Reviewed By: gribozavr

    Subscribers: MyDeveloperDay, xazax.hun, cfe-commits

    Tags: #clang, #clang-tools-extra

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

    Patch by Yubo Xie. — gribozavr / ViewSVN
  2. [SystemZ]  Add SystemZ as supporting target in help text for -mfentry.

    => "Insert calls to fentry at function entry (x86/SystemZ only)"

    Review: Ulrich Weigand — jonpa / ViewSVN
  3. [StaticAnalyzer] Use llvm::StringLiteral instead of StringRef in few places

    StringRef's constexpr constructor seems to be extremely slow in MSVC
    2017, so don't use it for generated tables. Should make PR43369 a bit
    better, no functionality change. — d0k / ViewSVN
  4. [AMDGPU] Use std::make_tuple to make some toolchains happy again

    My toolchain stopped working (LLVM 8.0 , libstdc++ 5.4.0) after
    r372338.

    The same problem was seen in clang-cuda-build buildbots:

    clang-cuda-build/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp:763:12:
    error: chosen constructor is explicit in copy-initialization
        return {Reg, 0, nullptr};
               ^~~~~~~~~~~~~~~~~
    /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/tuple:479:19:
    note: explicit constructor declared here
            constexpr tuple(_UElements&&... __elements)
                      ^

    This commit adds explicit calls to std::make_tuple to work around
    the problem. — bjope / ViewSVN
  5. Revert r372366 "Use getTargetConstant for BLENDI, and add a test to catch it."

    This reverts commit 52621307bcab2013e8833f3317cebd63a6db3885.

    Tests have been failing all night with

        [0/2] ACTION //llvm/test:check-llvm(//llvm/utils/gn/build/toolchain:unix)
        -- Testing: 33647 tests, 64 threads --
        Testing: 0 .. 10..
        UNRESOLVED: LLVM :: CodeGen/AMDGPU/GlobalISel/isel-blendi-gettargetconstant.ll (6943 of 33647)
        ******************** TEST 'LLVM :: CodeGen/AMDGPU/GlobalISel/isel-blendi-gettargetconstant.ll' FAILED ********************
        Test has no run line!
        ********************

    Since there were other concerns on https://reviews.llvm.org/D67785,
    I'm just reverting for now. — nico / ViewSVN

rL:372380 - C:372368 - #690 (Sep 20, 2019 4:10:00 AM)

  1. [IntrinsicEmitter] Add overloaded types for SVE intrinsics (Subdivide2 & Subdivide4)

    Summary:
    Both match the type of another intrinsic parameter of a vector type, but where each element is subdivided to form a vector with more elements of a smaller type.

    Subdivide2Argument allows intrinsics such as the following to be defined:
    - declare <vscale x 4 x i32> @llvm.something.nxv4i32(<vscale x 8 x i16>)

    Subdivide4Argument allows intrinsics such as:
    - declare <vscale x 4 x i32> @llvm.something.nxv4i32(<vscale x 16 x i8>)

    Tests are included in follow up patches which add intrinsics using these types.

    Reviewers: sdesmalen, SjoerdMeijer, greened, rovka

    Reviewed By: sdesmalen

    Subscribers: rovka, tschuett, jdoerfert, cfe-commits, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67549 — kmclaughlin / ViewSVN
  2. [NFC] Test commit, deleting some whitespace — tellenbach / ViewSVN

rL:372378 - C:372368 - #689 (Sep 20, 2019 2:30:41 AM)

  1. [llvm-dwarfdump] Adjust Windows path to be acceptable by JSON

    Backslash is a special character according to JSON specification,
    so we should avoid that when printing a file path with the
    --statistics option.

    Differential Revision: https://reviews.llvm.org/D67699 — djtodoro / ViewSVN
  2. [yaml2obj/obj2yaml] - Do not trigger llvm_unreachable when dumping/parsing relocations and e_machine is unsupported.

    Currently when e_machine is set to something that is not supported by YAML lib,
    then tools fail with llvm_unreachable.

    In this patch I allow them to handle relocations in this case.
    It can be used to dump and create objects for broken or unsupported targets.

    Differential revision: https://reviews.llvm.org/D67657 — grimar / ViewSVN
  3. [MachinePipeliner] Improve the TargetInstrInfo API analyzeLoop/reduceLoopCount

    The way MachinePipeliner uses these target hooks is stateful - we reduce trip
    count by one per call to reduceLoopCount. It's a little overfit for hardware
    loops, where we don't have to worry about stitching a loop induction variable
    across prologs and epilogs (the induction variable is implicit).

    This patch introduces a new API:

      /// Analyze loop L, which must be a single-basic-block loop, and if the
      /// conditions can be understood enough produce a PipelinerLoopInfo object.
      virtual std::unique_ptr<PipelinerLoopInfo>
      analyzeLoopForPipelining(MachineBasicBlock *LoopBB) const;

    The return value is expected to be an implementation of the abstract class:

      /// Object returned by analyzeLoopForPipelining. Allows software pipelining
      /// implementations to query attributes of the loop being pipelined.
      class PipelinerLoopInfo {
      public:
        virtual ~PipelinerLoopInfo();
        /// Return true if the given instruction should not be pipelined and should
        /// be ignored. An example could be a loop comparison, or induction variable
        /// update with no users being pipelined.
        virtual bool shouldIgnoreForPipelining(const MachineInstr *MI) const = 0;

        /// Create a condition to determine if the trip count of the loop is greater
        /// than TC.
        ///
        /// If the trip count is statically known to be greater than TC, return
        /// true. If the trip count is statically known to be not greater than TC,
        /// return false. Otherwise return nullopt and fill out Cond with the test
        /// condition.
        virtual Optional<bool>
        createTripCountGreaterCondition(int TC, MachineBasicBlock &MBB,
                                     SmallVectorImpl<MachineOperand> &Cond) = 0;

        /// Modify the loop such that the trip count is
        /// OriginalTC + TripCountAdjust.
        virtual void adjustTripCount(int TripCountAdjust) = 0;

        /// Called when the loop's preheader has been modified to NewPreheader.
        virtual void setPreheader(MachineBasicBlock *NewPreheader) = 0;

        /// Called when the loop is being removed.
        virtual void disposed() = 0;
      };

    The Pipeliner (ModuloSchedule.cpp) can use this object to modify the loop while
    allowing the target to hold its own state across all calls. This API, in
    particular the disjunction of creating a trip count check condition and
    adjusting the loop, improves the code quality in ModuloSchedule.cpp. — jamesm / ViewSVN
  4. [CallSiteSplitting] Remove unused includes (NFC). — fhahn / ViewSVN

rL:372374 - C:372368 - #688 (Sep 20, 2019 1:10:30 AM)

  1. Reapply [llvm-ar] Include a line number when failing to parse an MRI script

    Reapply r372309

    Errors that occur when reading an MRI script now include a corresponding
    line number.

    Differential Revision: https://reviews.llvm.org/D67449 — gbreynoo / ViewSVN
  2. [X86] Convert tbm_bextri_u32/tbm_bextri_u64 intrinsics TargetConstant argument to a regular Constant during lowering.

    We reuse an ISD opcode here that can be reached from BMI that
    doesn't require it to be an immediate. Our isel patterns to match
    the TBM immediate form require a Constant and not a TargetConstant.

    We were accidentally getting the Constant due to a quirk of
    combineBEXTR calling SimplifyDemandedBits. The call to
    SimplifyDemandedBits ended up constant folding the TargetConstant
    to a regular Constant. But we should probably instead be asserting
    if SimplifyDemandedBits on a TargetConstant so we shouldn't rely
    on this behavior. — ctopper / ViewSVN

rL:372372 - C:372368 - #687 (Sep 19, 2019 11:49:46 PM)

  1. [llvm-readobj] flush output before crash

    Otherwise the output could be lost. — yuanfang / ViewSVN
  2. [X86] Use timm in MMX pinsrw/pextrw isel patterns. Add missing test cases.

    This fixes an isel failure after r372338. — ctopper / ViewSVN

rL:372370 - C:372368 - #686 (Sep 19, 2019 9:45:36 PM)

  1. [llvm-ar] Removes repetition in the error message

    As per bug 40244, fixed an error where the error message was repeated.

    Differential Revision: https://reviews.llvm.org/D67038
    Patch by Yu Jian (wyjw) — maskray / ViewSVN
  2. [Object] Uncapitalize an error message

    Test case will be added by my next commit. — maskray / ViewSVN
  3. Finish building the full-expression for a static_assert expression
    before evaluating it rather than afterwards.

    This is groundwork for C++20's P0784R7, where non-trivial destructors
    can be constexpr, so we need ExprWithCleanups markers in constant
    expressions.

    No significant functionality change intended (though this fixes a bug
    only visible through libclang / -ast-dump / tooling: we now store the
    converted condition on the StaticAssertDecl rather than the original). — rsmith / ViewSVN
  4. llvm-undname: Delete an empty, unused method. — nico / ViewSVN
  5. Use getTargetConstant for BLENDI, and add a test to catch it.

    Summary: This fixes a crasher introduced by r372338.

    Reviewers: echristo, arsenm

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

    Tags: #llvm

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

    Tighten up the test case. — saugustine / ViewSVN
  6. [X86] Remove the special isBuildVectorOfConstantSDNodes handling from LowerBUILD_VECTORvXi1.

    The later code that generates a constant when there are
    some non-const elements works basically the same and doesn't
    require there to be any non-const elements. — ctopper / ViewSVN

rL:372362 - C:372363 - #685 (Sep 19, 2019 6:29:12 PM)

  1. [NFCI] Always initialize const members of AttributeCommonInfo

    Some compilers require that const fields of an object must be explicitly
    initialized by the constructor. I ran into this issue building with
    clang 3.8 on Ubuntu 16.04. — xiaobai / ViewSVN
  2. MachineScheduler: Fix missing dependency with multiple subreg defs

    If an instruction had multiple subregister defs, and one of them was
    undef, this would improperly conclude all other lanes are
    killed. There could still be other defs of those read-undef lanes in
    other operands. This would improperly remove register uses from
    CurrentVRegUses, so the visitation of later operands would not find
    the necessary register dependency. This would also mean this would
    fail or not depending on how different subregister def operands were
    ordered.

    On an undef subregister def, scan the instruction for other
    subregister defs and avoid killing those.

    This possibly should be deferring removing anything from
    CurrentVRegUses until the entire instruction has been processed
    instead. — arsenm / ViewSVN

rL:372357 - C:372361 - #684 (Sep 19, 2019 4:40:59 PM)

  1. [Consumed] Treat by-value class arguments as consuming by default, like rvalue refs.

    Differential Revision: https://reviews.llvm.org/D67743 — comex / ViewSVN

rL:372357 - C:372360 - #683 (Sep 19, 2019 3:55:59 PM)

  1. Fix for stringized function-macro args continued across lines

    In case of certain #define'd macros, there's a space just before line continuation
    that the minimized-source lexer was missing to include, resulting in invalid stringize.

    Patch by: kousikk (Kousik Kumar)

    Differential Revision: https://reviews.llvm.org/D67635 — arphaman / ViewSVN

rL:372357 - C:372359 - #682 (Sep 19, 2019 2:56:04 PM)

  1. Model converted constant expressions as full-expressions.

    This is groundwork for C++20's P0784R7, where non-trivial destructors
    can be constexpr, so we need ExprWithCleanups markers in constant
    expressions.

    No functionality change intended. — rsmith / ViewSVN
  2. [AArch64] Fix formatting (NFC) — evandro / ViewSVN
  3. [CUDA][HIP] Re-apply part of r372318.

    - r372318 causes violation of `use-of-uninitialized-value` detected by
      MemorySanitizer. Once `Viable` field is set to false, `FailureKind`
      needs setting as well as it will be checked during destruction if
      `Viable` is not true.
    - Revert the part trying to skip `std::vector` erasing. — hliao / ViewSVN
  4. Revert "[CUDA][HIP] Fix typo in `BestViableFunction`"

    Broke the msan buildbots (see comments on rL372318 for more details).

    This reverts commit eb231d15825ac345b546f4c99372d1cac8f14f02. — hctim / ViewSVN
  5. [ObjC][ARC] Skip debug instructions when computing the insert point of
    objc_release calls

    This fixes a bug where the presence of debug instructions would cause
    ARC optimizer to change the order of retain and release calls.

    rdar://problem/55319419 — ahatanak / ViewSVN

rL:372350 - C:372334 - #681 (Sep 19, 2019 1:51:01 PM)

  1. [AMDGPU] fixed underflow in getOccupancyWithNumVGPRs

    The function could return zero if an extreme number or
    registers were used. Minimal possible occupancy is 1.

    Differential Revision: https://reviews.llvm.org/D67771 — rampitec / ViewSVN

rL:372349 - C:372334 - #680 (Sep 19, 2019 1:06:43 PM)

  1. llvm-reduce: Follow-up to 372280, now with more-better msan fixing — dblaikie / ViewSVN
  2. [lsan] Fix deadlock in dl_iterate_phdr.

    Summary:
    Do not grab the allocator lock before calling dl_iterate_phdr. This may
    cause a lock order inversion with (valid) user code that uses malloc
    inside a dl_iterate_phdr callback.

    Reviewers: vitalybuka, hctim

    Subscribers: jfb, #sanitizers, llvm-commits

    Tags: #sanitizers, #llvm

    Differential Revision: https://reviews.llvm.org/D67738 — eugenis / ViewSVN
  3. Don't use invalidated iterators in FlattenCFGPass

    Summary:
    FlattenCFG may erase unnecessary blocks, which also invalidates iterators to those erased blocks.
    Before this patch, `iterativelyFlattenCFG` could try to increment a BB iterator after that BB has been removed and crash.

    This patch makes FlattenCFGPass use `WeakVH` to skip over erased blocks.

    Reviewers: dblaikie, tstellar, davide, sanjoy, asbirlea, grosser

    Reviewed By: asbirlea

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67672 — kuhar / ViewSVN

rL:372346 - C:372334 - #679 (Sep 19, 2019 11:41:13 AM)

  1. [Analysis] Allow -scalar-evolution-max-iterations more than once

    At present, `-scalar-evolution-max-iterations` is a `cl::Optional`
    option, which means it demands to be passed exactly zero or one times.
    Our build system makes it pretty tricky to guarantee this. We often
    accidentally pass the flag more than once (but always with the same
    value) which results in an error, after which compilation fails:

    ```
    clang (LLVM option parsing): for the -scalar-evolution-max-iterations option: may only occur zero or one times!
    ```

    It seems reasonable to allow -scalar-evolution-max-iterations to be
    passed more than once. Quoting the [[ http://llvm.org/docs/CommandLine.html#controlling-the-number-of-occurrences-required-and-allowed | documentation ]]:

    > The cl::ZeroOrMore modifier ... indicates that your program will allow the option to be specified zero or more times.
    > ...
    > If an option is specified multiple times for an option of the cl::opt class, only the last value will be retained.

    Original patch by: Enrico Bern Hardy Tanuwidjaja <etanuwid@fb.com>

    Differential Revision: https://reviews.llvm.org/D67512 — smeenai / ViewSVN
  2. [NFC][PowerPC] Fast-isel VSX support test

    We have fixed most of the VSX limitation in Fast-isel,
    so we can remove the -mattr=-vsx for most testcases now. — jsji / ViewSVN

rL:372344 - C:372334 - #678 (Sep 19, 2019 11:01:55 AM)

  1. gn build: Merge r372343 — gnsyncbot / ViewSVN
  2. [SVFS] Vector Function ABI demangling.

    This patch implements the demangling functionality as described in the
    Vector Function ABI. This patch will be used to implement the
    SearchVectorFunctionSystem (SVFS) as described in the RFC:

    http://lists.llvm.org/pipermail/llvm-dev/2019-June/133484.html

    A fuzzer is added to test the demangling utility.

    Patch by Sumedh Arani <sumedh.arani@arm.com>

    Differential revision: https://reviews.llvm.org/D66024 — fpetrogalli / ViewSVN
  3. The LLD buildbot has some tests that are not reliable.
    Hopefully reducing the number of threads for the test will fix the issue.
    It seems that the quotes around the parameters means it tries to take everything as one argument. Bu using -j we can actually pass everything as one argument by attaching the j to the sv.

    Patch by Stefan Pintilie. — gkistanova / ViewSVN
  4. [InstCombine] Simplify @llvm.usub.with.overflow+non-zero check (PR43251)

    Summary:
    This is again motivated by D67122 sanitizer check enhancement.
    That patch seemingly worsens `-fsanitize=pointer-overflow`
    overhead from 25% to 50%, which strongly implies missing folds.

    In this particular case, given
    ```
    char* test(char& base, unsigned long offset) {
      return &base - offset;
    }
    ```
    it will end up producing something like
    https://godbolt.org/z/luGEju
    which after optimizations reduces down to roughly
    ```
    declare void @use64(i64)
    define i1 @test(i8* dereferenceable(1) %base, i64 %offset) {
      %base_int = ptrtoint i8* %base to i64
      %adjusted = sub i64 %base_int, %offset
      call void @use64(i64 %adjusted)
      %not_null = icmp ne i64 %adjusted, 0
      %no_underflow = icmp ule i64 %adjusted, %base_int
      %no_underflow_and_not_null = and i1 %not_null, %no_underflow
      ret i1 %no_underflow_and_not_null
    }
    ```
    Without D67122 there was no `%not_null`,
    and in this particular case we can "get rid of it", by merging two checks:
    Here we are checking: `Base u>= Offset && (Base u- Offset) != 0`, but that is simply `Base u> Offset`

    Alive proofs:
    https://rise4fun.com/Alive/QOs

    The `@llvm.usub.with.overflow` pattern itself is not handled here
    because this is the main pattern, that we currently consider canonical.

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

    Reviewers: spatel, nikic, xbolva00, majnemer

    Reviewed By: xbolva00, majnemer

    Subscribers: vsk, majnemer, xbolva00, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67356 — lebedevri / ViewSVN

rL:372340 - C:372334 - #677 (Sep 19, 2019 9:45:21 AM)

  1. [AMDGPU] Unnecessary -amdgpu-scalarize-global-loads=false flag removed from min/max lit tests.

    Reviewers: arsenm

    Differential Revision: https://reviews.llvm.org/D67712 — alex-t / ViewSVN
  2. [Float2Int] avoid crashing on unreachable code (PR38502)

    In the example from:
    https://bugs.llvm.org/show_bug.cgi?id=38502
    ...we hit infinite looping/crashing because we have non-standard IR -
    an instruction operand is used before defined.
    This and other unusual constructs are allowed in unreachable blocks,
    so avoid the problem by using DominatorTree to step around landmines.

    Differential Revision: https://reviews.llvm.org/D67766 — spatel / ViewSVN
  3. Reapply r372285 "GlobalISel: Don't materialize immarg arguments to intrinsics"

    This reverts r372314, reapplying r372285 and the commits which depend
    on it (r372286-r372293, and r372296-r372297)

    This was missing one switch to getTargetConstant in an untested case. — arsenm / ViewSVN
  4. [MCA] Improved cost computation for loop carried dependencies in the bottleneck analysis.

    This patch introduces a cut-off threshold for dependency edge frequences with
    the goal of simplifying the critical sequence computation.  This patch also
    removes the cost normalization for loop carried dependencies.  We didn't really
    need to artificially amplify the cost of loop-carried dependencies since it is
    already computed as the integral over time of the delay (in cycle).

    In the absence of backend stalls there is no need for computing a critical
    sequence. With this patch we early exit from the critical sequence computation
    if no bottleneck was reported during the simulation. — adibiagio / ViewSVN
  5. Make appendCallNB lambda mutable

    Lambdas are by deafult const so that they produce the same output every time they are run. This lambda needs to set the value on a captured promise which is a mutating operation, so it must be mutable. — cbieneman / ViewSVN
  6. X86: Add missing test for vshli SimplifyDemandedBitsForTargetNode

    This would have caught this regression which triggered the revert of
    r372285: https://bugs.chromium.org/p/chromium/issues/detail?id=1005750 — arsenm / ViewSVN

rL:372333 - C:372334 - #676 (Sep 19, 2019 8:18:09 AM)

  1. Revert r372325 - Reverting r372323 because it broke color tests on Linux.

    This corrects the testing issues. — aaronballman / ViewSVN
  2. [DAG][X86] Convert isNegatibleForFree/GetNegatedExpression to a target hook (PR42863)

    This patch converts the DAGCombine isNegatibleForFree/GetNegatedExpression into overridable TLI hooks and includes a demonstration X86 implementation.

    The intention is to let us extend existing FNEG combines to work more generally with negatible float ops, allowing it work with target specific combines and opcodes (e.g. X86's FMA variants).

    Unlike the SimplifyDemandedBits, we can't just handle target nodes through a Target callback, we need to do this as an override to allow targets to handle generic opcodes as well. This does mean that the target implementations has to duplicate some checks (recursion depth etc.).

    I've only begun to replace X86's FNEG handling here, handling FMADDSUB/FMSUBADD negation and some low impact codegen changes (some FMA negatation propagation). We can build on this in future patches.

    Differential Revision: https://reviews.llvm.org/D67557 — rksimon / ViewSVN
  3. [DAGCombiner] Add node to the worklist in topological order in scalarizeExtractedVectorLoad

    Summary: As per title.

    Reviewers: craig.topper, efriedma, RKSimon, lebedev.ri

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D66661 — deadalnix / ViewSVN
  4. [docs] Break long (>80) line. NFC — fpetrogalli / ViewSVN
  5. Reverting r372323 because it broke color tests on Linux.

    http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/17919 — aaronballman / ViewSVN
  6. [Float2Int] auto-generate complete test checks; NFC — spatel / ViewSVN
  7. Remove an unsafe member variable that wasn't needed; NFC.

    People use the AST dumping interface while debugging, so it's not safe to assume that a declaration will be dumped before a constant expression is dumped. This means the Context member may not get set properly and problems would happen. Rather than rely on the interface that requires the ASTContext, call the generic dump() interface instead; this allows us to remove the Context member variable. — aaronballman / ViewSVN

rL:372305 - C:372299 - #673 (Sep 19, 2019 1:21:58 AM)

  1. [Unroll] Add an option to control complete unrolling

    Add an ability to specify the max full unroll count for LoopUnrollPass pass
    in pass options.

    Reviewers: fhahn, fedor.sergeev
    Reviewed By: fedor.sergeev
    Subscribers: hiraditya, zzheng, dmgreen, llvm-commits
    Differential Revision: https://reviews.llvm.org/D67701 — skatkov / ViewSVN

rL:372293 - C:372294 - #668 (Sep 18, 2019 8:05:49 PM)

  1. [CLANG][BPF] change __builtin_preserve_access_index() signature

    The clang intrinsic __builtin_preserve_access_index() currently
    has signature:
      const void * __builtin_preserve_access_index(const void * ptr)

    This may cause compiler warning when:
      - parameter type is "volatile void *" or "const volatile void *", or
      - the assign-to type of the intrinsic does not have "const" qualifier.
    Further, this signature does not allow dereference of the
    builtin result pointer as it is a "const void *" type, which
    adds extra step for the user to do type casting.

    Let us change the signature to:
      PointerT __builtin_preserve_access_index(PointerT ptr)
    such that the result and argument types are the same.
    With this, directly dereferencing the builtin return value
    becomes possible.

    Differential Revision: https://reviews.llvm.org/D67734 — yhs / ViewSVN
  2. AMDGPU/GlobalISel: Select llvm.amdgcn.raw.buffer.store.format

    This needs special handling due to some subtargets that have a
    nonstandard register layout for f16 vectors

    Also reject some illegal types on other targets. — arsenm / ViewSVN
  3. AMDGPU/GlobalISel: Select llvm.amdgcn.raw.buffer.store — arsenm / ViewSVN
  4. AMDGPU/GlobalISel: RegBankSelect struct buffer load/store — arsenm / ViewSVN
  5. AMDGPU/GlobalISel: RegBankSelect llvm.amdgcn.raw.buffer.{load|store} — arsenm / ViewSVN
  6. AMDGPU/GlobalISel: Attempt to RegBankSelect image intrinsics

    Images should always have 2 consecutive, mandatory SGPR arguments. — arsenm / ViewSVN
  7. Fix typo — arsenm / ViewSVN
  8. MachineScheduler: Fix assert from not checking subregs

    The assert would fail if there was a dead def of a subregister if
    there was a previous use of a different subregister. — arsenm / ViewSVN

rL:372286 - C:372281 - #667 (Sep 18, 2019 7:04:05 PM)

  1. AMDGPU/GlobalISel: Fix RegBankSelect G_SMULH/G_UMULH pre-gfx9

    The scalar versions were only introduced in gfx9. — arsenm / ViewSVN
  2. GlobalISel: Don't materialize immarg arguments to intrinsics

    Encode them directly as an imm argument to G_INTRINSIC*.

    Since now intrinsics can now define what parameters are required to be
    immediates, avoid using registers for them. Intrinsics could
    potentially want a constant that isn't a legal register type. Also,
    since G_CONSTANT is subject to CSE and legalization, transforms could
    potentially obscure the value (and create extra work for the
    selector). The register bank of a G_CONSTANT is also meaningful, so
    this could throw off future folding and legalization logic for AMDGPU.

    This will be much more convenient to work with than needing to call
    getConstantVRegVal and checking if it may have failed for every
    constant intrinsic parameter. AMDGPU has quite a lot of intrinsics wth
    immarg operands, many of which need inspection during lowering. Having
    to find the value in a register is going to add a lot of boilerplate
    and waste compile time.

    SelectionDAG has always provided TargetConstant for constants which
    should not be legalized or materialized in a register. The distinction
    between Constant and TargetConstant was somewhat fuzzy, and there was
    no automatic way to force usage of TargetConstant for certain
    intrinsic parameters. They were both ultimately ConstantSDNode, and it
    was inconsistently used. It was quite easy to mis-select an
    instruction requiring an immediate. For SelectionDAG, start emitting
    TargetConstant for these arguments, and using timm to match them.

    Most of the work here is to cleanup target handling of constants. Some
    targets process intrinsics through intermediate custom nodes, which
    need to preserve TargetConstant usage to match the intrinsic
    expectation. Pattern inputs now need to distinguish whether a constant
    is merely compatible with an operand or whether it is mandatory.

    The GlobalISelEmitter needs to treat timm as a special case of a leaf
    node, simlar to MachineBasicBlock operands. This should also enable
    handling of patterns for some G_* instructions with immediates, like
    G_FENCE or G_EXTRACT.

    This does include a workaround for a crash in GlobalISelEmitter when
    ARM tries to uses "imm" in an output with a "timm" pattern source. — arsenm / ViewSVN
  3. gn build: Merge r372282 — gnsyncbot / ViewSVN
  4. llvm-reduce: Add pass to reduce instructions

    Patch by Diego Treviño!

    Differential Revision: https://reviews.llvm.org/D66263 — dblaikie / ViewSVN
  5. Initialize all fields in ABIArgInfo.

    Due to usage of an uninitialized fields, we end up with
    a Conditional jump or move depends on uninitialised value

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

    Commited on behalf of Martin Liska <mliska@suse.cz> — serge_sans_paille / ViewSVN

rL:372280 - C:372269 - #666 (Sep 18, 2019 5:43:28 PM)

  1. llvm-reduce: Avoid use-after-free when removing a branch instruction

    Found my msan buildbot & pointed out by Nico Weber - thanks Nico! — dblaikie / ViewSVN
  2. [Object] Extend MachOUniversalBinary::getObjectForArch

    Make the method MachOUniversalBinary::getObjectForArch return MachOUniversalBinary::ObjectForArch
    and add helper methods MachOUniversalBinary::getMachOObjectForArch, MachOUniversalBinary::getArchiveForArch
    for those who explicitly expect to get a MachOObjectFile or an Archive.

    Differential revision: https://reviews.llvm.org/D67700

    Test plan: make check-all — alexshap / ViewSVN
  3. [utils] Add minimal support for MIR inputs to update_llc_test_checks.py

    update_{llc,mir}_test_checks.py applicability is determined by the
    output (assembly or MIR), not the input, which makes
    update_llc_test_checks.py the right tool to generate tests that start at
    MIR and stop at the final assembly.

    This commit adds the minimal support for this path. Main limitation that
    remains:

    - MIR has to have LLVM IR section, and the CHECK lines will be inserted
      into the LLVM IR functions that correspond to the MIR functions.

    Running
      ../utils/update_llc_test_checks.py --llc-binary ./bin/llc
    on a slightly modified  ../test/CodeGen/X86/bad-tls-fold.mir

    produces the following diff:

    +# NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
    +# RUN: llc %s -o - | FileCheck %s
    --- |
       target triple = "x86_64-unknown-linux-gnu"

    @@ -6,17 +7,31 @@
       @i = external thread_local global i32

       define i32 @or() {
    +  ; CHECK-LABEL: or:
    +  ; CHECK:       # %bb.0: # %entry
    +  ; CHECK-NEXT:    movq {{.*}}(%rip), %rax
    +  ; CHECK-NEXT:    orq $7, %rax
    +  ; CHECK-NEXT:    movq i@{{.*}}(%rip), %rcx
    +  ; CHECK-NEXT:    orq %rax, %rcx
    +  ; CHECK-NEXT:    movl %fs:(%rcx), %eax
    +  ; CHECK-NEXT:    retq
       entry:
         ret i32 undef
       }
    -
       define i32 @and() {
    +  ; CHECK-LABEL: and:
    +  ; CHECK:       # %bb.0: # %entry
    +  ; CHECK-NEXT:    movq {{.*}}(%rip), %rax
    +  ; CHECK-NEXT:    orq $7, %rax
    +  ; CHECK-NEXT:    movq i@{{.*}}(%rip), %rcx
    +  ; CHECK-NEXT:    andq %rax, %rcx
    +  ; CHECK-NEXT:    movl %fs:(%rcx), %eax
    +  ; CHECK-NEXT:    retq
       entry:
         ret i32 undef
       }
    ...

    (not applied) — rtereshin / ViewSVN
  4. [utils] Amend update_llc_test_checks.py to non-llc tooling, NFC

    Very minor change aiming to make it easier to extend the script
    downstream to support non-llc, but llc-like tools. The main objective is
    to decrease the probability of merge conflicts. — rtereshin / ViewSVN

rL:372275 - C:372269 - #665 (Sep 18, 2019 4:22:52 PM)

  1. [WebAssembly] Restore defaults for stores per memop

    Summary:
    Large slowdowns were observed in Rust due to many small, constant
    sized copies in conjunction with poorly-optimized memory.copy
    implementations. Since memory.copy cannot be expected to be inlined
    efficiently by engines at this time, stop using it for the smallest
    copies. We continue to lower all memcpy intrinsics to memory.copy,
    though.

    Reviewers: aheejin, alexcrichton

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67639 — tlively / ViewSVN
  2. [Docs] Moves topics to new categories

    This commit moves several topics to new categories. It also removes a few duplicate links in Subsystem Documentation. — dr87 / ViewSVN
  3. [AArch64][GlobalISel] Support lowering musttail calls

    Since we now lower most tail calls, it makes sense to support musttail.

    Instead of always falling back to SelectionDAG, only fall back when a musttail
    call was not able to be emitted as a tail call. Once we can handle most
    incoming and outgoing arguments, we can change this to a `report_fatal_error`
    like in ISelLowering.

    Remove the assert that we don't have varargs and a musttail, and replace it
    with a return false. Implementing this requires that we implement
    `saveVarArgRegisters` from AArch64ISelLowering, which is an entirely different
    patch.

    Add GlobalISel lines to vararg-tallcall.ll to make sure that we produce correct
    code. Right now we only fall back, but eventually this will be relevant.

    Differential Revision: https://reviews.llvm.org/D67681 — paquette / ViewSVN
  4. Remove the obsolete BlockByRefStruct flag from LLVM IR

    DIFlagBlockByRefStruct is an unused DIFlag that originally was used by
    clang to express (Objective-)C block captures in debug info. For the
    last year Clang has been emitting complex DIExpressions to describe
    block captures instead, which makes all the code supporting this flag
    redundant.

    This patch removes the flag and all supporting "dead" code, so we can
    reuse the bit for something else in the future.

    Since this only affects debug info generated by Clang with the block
    extension this mostly affects Apple platforms and I don't have any
    bitcode compatibility concerns for removing this. The Verifier will
    reject debug info that uses the bit and thus degrade gracefully when
    LTO'ing older bitcode with a newer compiler.

    rdar://problem/44304813

    Differential Revision: https://reviews.llvm.org/D67453 — Adrian Prantl / ViewSVN
  5. llvm-reduce: Remove inaccurate doxy comment about a return that isn't returned

    Addressing post-commit code review feedback from Dávid Bolvanský -
    thanks! — dblaikie / ViewSVN
  6. llvm-reduce: Fix inconsistencies between int/unsigned usage (standardize on int) — dblaikie / ViewSVN
  7. [analyzer] PR43102: Fix an assertion and an out-of-bounds error for diagnostic location construction

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

    In today's edition of "Is this any better now that it isn't crashing?", I'd like to show you a very interesting test case with loop widening.

    Looking at the included test case, it's immediately obvious that this is not only a false positive, but also a very bad bug report in general. We can see how the analyzer mistakenly invalidated `b`, instead of its pointee, resulting in it reporting a null pointer dereference error. Not only that, the point at which this change of value is noted at is at the loop, rather then at the method call.

    It turns out that `FindLastStoreVisitor` works correctly, rather the supplied explodedgraph is faulty, because `BlockEdge` really is the `ProgramPoint` where this happens.
    {F9855739}
    So it's fair to say that this needs improving on multiple fronts. In any case, at least the crash is gone.

    Full ExplodedGraph: {F9855743}

    Reviewers: NoQ, xazax.hun, baloghadamsoftware, Charusso, dcoughlin, rnkovacs, TWeaver

    Subscribers: JesperAntonsson, uabelho, Ka-Ka, bjope, whisperity, szepet, a.sidorin, mikhail.ramalho, donat.nagy, dkrupp, gamesh411, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D66716 — szelethus / ViewSVN
  8. gn build: Merge r372267 — gnsyncbot / ViewSVN

rL:372267 - C:372263 - #664 (Sep 18, 2019 3:17:38 PM)

  1. Add AutoUpgrade function to add new address space datalayout string to existing datalayouts.

    Summary:
    Add function to AutoUpgrade to change the datalayout of old X86 datalayout strings.
    This adds "-p270:32:32-p271:32:32-p272:64:64" to X86 datalayouts that are otherwise valid
    and don't already contain it.

    This also removes the compatibility changes in https://reviews.llvm.org/D66843.
    Datalayout change in https://reviews.llvm.org/D64931.

    Reviewers: rnk, echristo

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67631 — akhuang / ViewSVN
  2. gn build: Merge r372264 — gnsyncbot / ViewSVN
  3. llvm-reduce: Add pass to reduce basic blocks

    Patch by Diego Treviño!

    Differential Revision: https://reviews.llvm.org/D66320 — dblaikie / ViewSVN
  4. fix build, adjust test also for Windows path separator

    Introduced in 1e9c1d2b7bfc. — llunak / ViewSVN

rL:372262 - C:372261 - #663 (Sep 18, 2019 2:18:02 PM)

  1. [SimplifyCFG] mergeConditionalStoreToAddress(): try to pacify MSAN

    MSAN bot complains that there is use-of-uninitialized-value
    of this FreeStores later in IsWorthwhile().
    Perhaps FreeStores needs to be stored in a vector? — lebedevri / ViewSVN
  2. On PowerPC, Secure-PLT by default for FreeBSD 13 and higher

    Summary:
    In https://svnweb.freebsd.org/changeset/base/349351, FreeBSD 13 and
    higher transitioned to Secure-PLT for PowerPC.  This part contains the
    changes in clang's PPC architecture defaults.

    Reviewers: emaste, jhibbits, hfinkel

    Reviewed By: jhibbits

    Subscribers: wuzish, nemanjai, krytarowski, kbarton, MaskRay, jsji, shchenz, steven.zhang, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67119 — dim / ViewSVN
  3. On PowerPC, Secure-PLT by default for FreeBSD 13 and higher

    Summary:
    In https://svnweb.freebsd.org/changeset/base/349351, FreeBSD 13 and
    higher transitioned to Secure-PLT for PowerPC.  This part contains the
    changes in llvm's PPC subtarget.

    Reviewers: emaste, jhibbits, hfinkel

    Reviewed By: jhibbits

    Subscribers: wuzish, nemanjai, krytarowski, kbarton, MaskRay, jsji, shchenz, steven.zhang, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67118 — dim / ViewSVN
  4. [DAGCombine][ARM][X86] (sub Carry, X)  ->  (addcarry (sub 0, X), 0, Carry)  fold

    Summary:
    `DAGCombiner::visitADDLikeCommutative()` already has a sibling fold:
    `(add X, Carry) -> (addcarry X, 0, Carry)`

    This fold, as suggested by @efriedma, helps recover from //some//
    of the regressions of D62266

    Reviewers: efriedma, deadalnix

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D62392 — lebedevri / ViewSVN
  5. [CodeGen][X86][NFC] Tests for (sub Carry, X) -> (addcarry (sub 0, X), 0, Carry) fold (D62392) — lebedevri / ViewSVN
  6. [InstCombine] foldUnsignedUnderflowCheck(): handle last few cases (PR43251)

    Summary:
    I don't have a direct motivational case for this,
    but it would be good to have this for completeness/symmetry.

    This pattern is basically the motivational pattern from
    https://bugs.llvm.org/show_bug.cgi?id=43251
    but with different predicate that requires that the offset is non-zero.

    The completeness bit comes from the fact that a similar pattern (offset != zero)
    will be needed for https://bugs.llvm.org/show_bug.cgi?id=43259,
    so it'd seem to be good to not overlook very similar patterns..

    Proofs: https://rise4fun.com/Alive/21b

    Also, there is something odd with `isKnownNonZero()`, if the non-zero
    knowledge was specified as an assumption, it didn't pick it up (PR43267)

    With this, i see no other missing folds for
    https://bugs.llvm.org/show_bug.cgi?id=43251

    Reviewers: spatel, nikic, xbolva00

    Reviewed By: spatel

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67412 — lebedevri / ViewSVN

rL:372256 - C:372252 - #662 (Sep 18, 2019 12:55:13 PM)

  1. [AArch64] Don't implicitly enable global isel on Darwin if code-model==large.

    Summary:
    AArch64 GlobalISel doesn't support MachO's large code model, so this patch
    adds a check for that combination before implicitly enabling it.

    Reviewers: paquette

    Subscribers: kristof.beyls, ributzka, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67724 — Lang Hames / ViewSVN
  2. [SimplifyCFG] mergeConditionalStoreToAddress(): consider cost, not instruction count

    Summary:
    As it can be see in the changed test, while `div` is really costly,
    we were speculating it. This does not seem correct.

    Also, the old code would run for every single insturuction in BB,
    instead of eagerly bailing out as soon as there are too many instructions.

    This function still has a problem that `PHINodeFoldingThreshold` is
    per-basic-block, while it should be for all the basic blocks.

    Reviewers: efriedma, craig.topper, dmgreen, jmolloy

    Reviewed By: jmolloy

    Subscribers: xbolva00, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67315 — lebedevri / ViewSVN
  3. [MIPS] For vectors, select `add %x, C` as `sub %x, -C` if it results in inline immediate

    Summary:
    As discussed in https://reviews.llvm.org/D62341#1515637,
    for MIPS `add %x, -1` isn't optimal. Unlike X86 there
    are no fastpaths to matearialize such `-1`/`1` vector constants,
    and `sub %x, 1` results in better codegen,
    so undo canonicalization

    Reviewers: atanasyan, Petar.Avramovic, RKSimon

    Reviewed By: atanasyan

    Subscribers: sdardis, arichardson, hiraditya, jrtc27, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D66805 — lebedevri / ViewSVN
  4. [CodeGen][MIPS][NFC] Some standalone tests for D66805 "or vectors, select `add %x, C` as `sub %x, -C` if it results in inline immediate" — lebedevri / ViewSVN
  5. [OPENMP]Fix for PR43349: Crash for privatized loop bound.

    If the variable, used in the loop boundaries, is not captured in the
    construct, this variable must be considered as undefined if it was
    privatized. — abataev / ViewSVN
  6. [mips] Expand 'lw/sw' instructions for 32-bit GOT

    In case of using 32-bit GOT access to the table requires two instructions
    with attached %got_hi and %got_lo relocations. This patch implements
    correct expansion of 'lw/sw' instructions in that case.

    Differential Revision: https://reviews.llvm.org/D67705 — atanasyan / ViewSVN
  7. actually also compile output in tests for -frewrite-includes

    Checking that the created output matches something is nice, but
    this should also check whether the output makes sense.

    Differential Revision: https://reviews.llvm.org/D63979 — llunak / ViewSVN
  8. [clang-format][PR41899] PointerAlignment: Left leads to useless space in lambda intializer expression

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

    ```auto lambda = [&a = a]() { a = 2; };```

    is formatted as

    ```auto lambda = [& a = a]() { a = 2; };```

    With an extra space if PointerAlignment is set to Left

    > The space "& a" looks strange when there is no type in the lambda's intializer expression. This can be worked around with by setting "PointerAlignment: Right", but ideally "PointerAlignment: Left" would not add a space in this case.

    Reviewers: klimek, owenpan, krasimir, timwoj

    Reviewed By: klimek

    Subscribers: cfe-commits

    Tags: #clang-tools-extra, #clang

    Differential Revision: https://reviews.llvm.org/D67718 — paulhoad / ViewSVN
  9. make -frewrite-includes also rewrite conditions in #if/#elif

    Those conditions may use __has_include, which needs to be rewritten.
    The existing code has already tried to rewrite just __has_include,
    but it didn't work with macro expansion, so e.g. Qt's
    "#define QT_HAS_INCLUDE(x) __has_include(x)" didn't get handled
    properly. Since the preprocessor run knows what each condition evaluates
    to, just rewrite the entire condition. This of course requires that
    the -frewrite-include pass has the same setup as the following
    compilation, but that has always been the requirement.

    Differential Revision: https://reviews.llvm.org/D63508 — llunak / ViewSVN

rL:372245 - C:372247 - #661 (Sep 18, 2019 12:01:44 PM)

  1. [Sema] Suppress -Wformat diagnostics for bool types when printed using %hhd

    Also, add a diagnostic under -Wformat for printing a boolean value as a
    character.

    rdar://54579473

    Differential revision: https://reviews.llvm.org/D66856 — epilk / ViewSVN
  2. [clang-format][PR41964] Fix crash with SIGFPE when TabWidth is set to 0 and line starts with tab

    Summary:
    clang-format 8.0 crashes with SIGFPE (floating point exception) when formatting following file:
    app.cpp:
    void a() {
    //line starts with '\t'
    }

    $ clang-format -style='{TabWidth: 0}' app.cpp

    Reviewers: owenpan, klimek, russellmcc, timwoj

    Reviewed By: klimek

    Subscribers: cfe-commits

    Tags: #clang-tools-extra, #clang

    Differential Revision: https://reviews.llvm.org/D67670 — paulhoad / ViewSVN
  3. [InstCombine] dropRedundantMaskingOfLeftShiftInput(): some cleanup before upcoming patch — lebedevri / ViewSVN
  4. [NFC][InstCombine] More tests for PR42563 "Dropping pointless masking before left shift"

    For patterns c/d/e we too can deal with the pattern even if we can't
    just drop the mask, we can just apply it afterwars:
       https://rise4fun.com/Alive/gslRa — lebedevri / ViewSVN
  5. Fix compile-time regression caused by rL371928

    Summary:
    Also fixup rL371928 for cases that occur on our out-of-tree backend

    There were still quite a few intermediate APInts and this caused the
    compile time of MCCodeEmitter for our target to jump from 16s up to
    ~5m40s. This patch, brings it back down to ~17s by eliminating pretty
    much all of them using two new APInt functions (extractBitsAsZExtValue(),
    insertBits() but with a uint64_t). The exact conditions for eliminating
    them is that the field extracted/inserted must be <=64-bit which is
    almost always true.

    Note: The two new APInt API's assume that APInt::WordSize is at least
    64-bit because that means they touch at most 2 APInt words. They
    statically assert that's true. It seems very unlikely that someone
    is patching it to be smaller so this should be fine.

    Reviewers: jmolloy

    Reviewed By: jmolloy

    Subscribers: hiraditya, dexonsmith, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67686 — dsanders / ViewSVN
  6. Revert "Revert "Implement std::condition_variable via pthread_cond_clockwait() where available""

    With the fix for non-Linux.

    This reverts commit c1c519d2f1a66dd2eeaa4c321d8d7b50f623eb71. — danalbert / ViewSVN
  7. [DDG] Break a cyclic dependency from Analysis to ScalarOpts — d0k / ViewSVN

rL:372239 - C:372237 - #660 (Sep 18, 2019 10:58:41 AM)

  1. gn build: Merge r372238 — gnsyncbot / ViewSVN
  2. Data Dependence Graph Basics

    Summary:
    This is the first patch in a series of patches that will implement data dependence graph in LLVM. Many of the ideas used in this implementation are based on the following paper:
    D. J. Kuck, R. H. Kuhn, D. A. Padua, B. Leasure, and M. Wolfe (1981). DEPENDENCE GRAPHS AND COMPILER OPTIMIZATIONS.
    This patch contains support for a basic DDGs containing only atomic nodes (one node for each instruction). The edges are two fold: def-use edges and memory-dependence edges.
    The implementation takes a list of basic-blocks and only considers dependencies among instructions in those basic blocks. Any dependencies coming into or going out of instructions that do not belong to those basic blocks are ignored.

    The algorithm for building the graph involves the following steps in order:

      1. For each instruction in the range of basic blocks to consider, create an atomic node in the resulting graph.
      2. For each node in the graph establish def-use edges to/from other nodes in the graph.
      3. For each pair of nodes containing memory instruction(s) create memory edges between them. This part of the algorithm goes through the instructions in lexicographical order and creates edges in reverse order if the sink of the dependence occurs before the source of it.

    Authored By: bmahjour

    Reviewer: Meinersbur, fhahn, myhsu, xtian, dmgreen, kbarton, jdoerfert

    Reviewed By: Meinersbur, fhahn, myhsu

    Subscribers: ychen, arphaman, simoll, a.elovikov, mgorny, hiraditya, jfb, wuzish, llvm-commits, jsji, Whitney, etiotto

    Tag: #llvm

    Differential Revision: https://reviews.llvm.org/D65350 — bmahjour / ViewSVN
  3. [c++20] P1331R2: Allow transient use of uninitialized objects in
    constant evaluation. — rsmith / ViewSVN
  4. [InstSimplify] add tests for fma/fmuladd; NFC — spatel / ViewSVN

rL:372234 - C:372235 - #659 (Sep 18, 2019 9:29:36 AM)

  1. [OPENMP5.0]Allow multiple context selectors in the context selector
    sets.

    According to OpenMP 5.0, context selector set might include several
    context selectors, separated with commas. Patch fixes this problem. — abataev / ViewSVN
  2. [Alignment][NFC] Align(1) to Align::None() conversions

    Summary:
    This is patch is part of a series to introduce an Alignment type.
    See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
    See this patch for the introduction of the type: https://reviews.llvm.org/D64790

    Reviewers: courbet

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67715 — gchatelet / ViewSVN
  3. [SampleFDO] Minimize performance impact when profile-sample-accurate
    is enabled.

    We can save memory and reduce binary size significantly by enabling
    ProfileSampleAccurate. However when ProfileSampleAccurate is true,
    function without sample will be regarded as cold and this could
    potentially cause performance regression.

    To minimize the potential negative performance impact, we want to be
    a little conservative here saying if a function shows up in the profile,
    no matter as outline instance, inline instance or call targets, treat
    the function as not being cold. This will handle the cases such as most
    callsites of a function are inlined in sampled binary (thus outline copy
    don't get any sample) but not inlined in current build (because of source
    code drift, imprecise debug information, or the callsites are all cold
    individually but not cold accumulatively...), so that the outline function
    showing up as cold in sampled binary will actually not be cold after current
    build. After the change, such function will be treated as not cold even
    profile-sample-accurate is enabled.

    At the same time we lower the hot criteria of callsiteIsHot check when
    profile-sample-accurate is enabled. callsiteIsHot is used to determined
    whether a callsite is hot and qualified for early inlining. When
    profile-sample-accurate is enabled, functions without profile will be
    regarded as cold and much less inlining will happen in CGSCC inlining pass,
    so we can worry less about size increase and be aggressive to allow more
    early inlining to happen for warm callsites and it is helpful for performance
    overall.

    Differential Revision: https://reviews.llvm.org/D67561 — wmi / ViewSVN
  4. [Alignment][NFC] Remove LogAlignment functions

    Summary:
    This is patch is part of a series to introduce an Alignment type.
    See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
    See this patch for the introduction of the type: https://reviews.llvm.org/D64790

    Reviewers: courbet

    Subscribers: arsenm, sdardis, nemanjai, jvesely, nhaehnle, hiraditya, kbarton, jrtc27, MaskRay, atanasyan, jsji, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67620 — gchatelet / ViewSVN
  5. [Alignment][NFC] Use Align::None instead of 1

    Summary:
    This is patch is part of a series to introduce an Alignment type.
    See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
    See this patch for the introduction of the type: https://reviews.llvm.org/D64790

    Reviewers: courbet

    Subscribers: sdardis, nemanjai, hiraditya, kbarton, jrtc27, MaskRay, atanasyan, jsji, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67704 — gchatelet / ViewSVN

rL:372228 - C:372229 - #658 (Sep 18, 2019 8:21:00 AM)

  1. Recommit -r372180

    Commit message below, original caused the sphinx build bot to fail, this
    one should fix it.

    Create UsersManual section entitled 'Controlling Floating Point
    Behavior'

    Create a new section for documenting the floating point options. Move
    all the floating point options into this section, and add new entries
    for the floating point options that exist but weren't previously
    described in the UsersManual.

    Patch By: mibintc
    Differential Revision: https://reviews.llvm.org/D67517 — erichkeane / ViewSVN
  2. Revert "[AArch64][DebugInfo] Do not recompute CalleeSavedStackSize"

    Summary:
    This reverts commit r372204.

    This change causes build bot failures under msan:
    http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/35236/steps/check-llvm%20msan/logs/stdio:

    ```
    FAIL: LLVM :: DebugInfo/AArch64/asan-stack-vars.mir (19531 of 33579)
    ******************** TEST 'LLVM :: DebugInfo/AArch64/asan-stack-vars.mir' FAILED ********************
    Script:
    --
    : 'RUN: at line 1';   /b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/llc -O0 -start-before=livedebugvalues -filetype=obj -o - /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/DebugInfo/AArch64/asan-stack-vars.mir | /b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/llvm-dwarfdump -v - | /b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/FileCheck /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/DebugInfo/AArch64/asan-stack-vars.mir
    --
    Exit Code: 2

    Command Output (stderr):
    --
    ==62894==WARNING: MemorySanitizer: use-of-uninitialized-value
        #0 0xdfcafb in llvm::AArch64FrameLowering::resolveFrameOffsetReference(llvm::MachineFunction const&, int, bool, unsigned int&, bool, bool) const /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp:1658:3
        #1 0xdfae8a in resolveFrameIndexReference /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp:1580:10
        #2 0xdfae8a in llvm::AArch64FrameLowering::getFrameIndexReference(llvm::MachineFunction const&, int, unsigned int&) const /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp:1536
        #3 0x46642c1 in (anonymous namespace)::LiveDebugValues::extractSpillBaseRegAndOffset(llvm::MachineInstr const&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/LiveDebugValues.cpp:582:21
        #4 0x4647cb3 in transferSpillOrRestoreInst /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/LiveDebugValues.cpp:883:11
        #5 0x4647cb3 in process /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/LiveDebugValues.cpp:1079
        #6 0x4647cb3 in (anonymous namespace)::LiveDebugValues::ExtendRanges(llvm::MachineFunction&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/LiveDebugValues.cpp:1361
        #7 0x463ac0e in (anonymous namespace)::LiveDebugValues::runOnMachineFunction(llvm::MachineFunction&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/LiveDebugValues.cpp:1415:18
        #8 0x4854ef0 in llvm::MachineFunctionPass::runOnFunction(llvm::Function&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/MachineFunctionPass.cpp:73:13
        #9 0x53b0b01 in llvm::FPPassManager::runOnFunction(llvm::Function&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1648:27
        #10 0x53b15f6 in llvm::FPPassManager::runOnModule(llvm::Module&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1685:16
        #11 0x53b298d in runOnModule /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1750:27
        #12 0x53b298d in llvm::legacy::PassManagerImpl::run(llvm::Module&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1863
        #13 0x905f21 in compileModule(char**, llvm::LLVMContext&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/tools/llc/llc.cpp:601:8
        #14 0x8fdc4e in main /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/tools/llc/llc.cpp:355:22
        #15 0x7f67673632e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0)
        #16 0x882369 in _start (/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/llc+0x882369)

    MemorySanitizer: use-of-uninitialized-value /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp:1658:3 in llvm::AArch64FrameLowering::resolveFrameOffsetReference(llvm::MachineFunction const&, int, bool, unsigned int&, bool, bool) const
    Exiting
    error: -: The file was not recognized as a valid object file
    FileCheck error: '-' is empty.
    FileCheck command line:  /b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/FileCheck /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/DebugInfo/AArch64/asan-stack-vars.mir
    ```

    Reviewers: bkramer

    Reviewed By: bkramer

    Subscribers: sdardis, aprantl, kristof.beyls, jrtc27, atanasyan, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67710 — krasimir / ViewSVN
  3. [SimplifyLibCalls] fix crash with empty function name (PR43347)

    ...and improve some variable names while here.

    https://bugs.llvm.org/show_bug.cgi?id=43347 — spatel / ViewSVN
  4. Follow-up to r372209: Use single quotes for host_ldflags in the lit config

    HOST_LDFLAGS is now using double quotes, and that would break the lit
    config file. — hans / ViewSVN

rL:372223 - C:372225 - #657 (Sep 18, 2019 7:13:05 AM)

  1. Revert r372082 "[Clang] Pragma vectorize_width() implies vectorize(enable)"

    This broke the Chromium build. Consider the following code:

      float ScaleSumSamples_C(const float* src, float* dst, float scale, int width) {
        float fsum = 0.f;
        int i;
      #if defined(__clang__)
      #pragma clang loop vectorize_width(4)
      #endif
        for (i = 0; i < width; ++i) {
          float v = *src++;
          fsum += v * v;
          *dst++ = v * scale;
        }
        return fsum;
      }

    Compiling at -Oz, Clang  now warns:

      $ clang++ -target x86_64 -Oz -c /tmp/a.cc
      /tmp/a.cc:1:7: warning: loop not vectorized: the optimizer was unable to
      perform the requested transformation; the transformation might be disabled or
      specified as part of an unsupported transformation ordering
      [-Wpass-failed=transform-warning]

    this suggests it's not actually enabling vectorization hard enough.

    At -Os it asserts instead:

      $ build.release/bin/clang++ -target x86_64 -Os -c /tmp/a.cc
      clang-10: /work/llvm.monorepo/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:2734: void
      llvm::InnerLoopVectorizer::emitMemRuntimeChecks(llvm::Loop*, llvm::BasicBlock*): Assertion `
      !BB->getParent()->hasOptSize() && "Cannot emit memory checks when optimizing for size"' failed.

    Of course neither of these are what the developer expected from the pragma.

    > Specifying the vectorization width was supposed to implicitly enable
    > vectorization, except that it wasn't really doing this. It was only
    > setting the vectorize.width metadata, but not vectorize.enable.
    >
    > This should fix PR27643.
    >
    > Differential Revision: https://reviews.llvm.org/D66290 — hans / ViewSVN
  2. [SDA] Don't stop divergence propagation at the IPD.

    Summary:
    This fixes B42473 and B42706.

    This patch makes the SDA propagate branch divergence until the end of the RPO traversal. Before, the SyncDependenceAnalysis propagated divergence only until the IPD in rpo order. RPO is incompatible with post dominance in the presence of loops. This made the SDA crash because blocks were missed in the propagation.

    Reviewers: foad, nhaehnle

    Reviewed By: foad

    Subscribers: jvesely, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D65274 — foad / ViewSVN
  3. [mips] Pass "xgot" flag as a subtarget feature

    We need "xgot" flag in the MipsAsmParser to implement correct expansion
    of some pseudo instructions in case of using 32-bit GOT (XGOT).
    MipsAsmParser does not have reference to MipsSubtarget but has a
    reference to "feature bit set". — atanasyan / ViewSVN
  4. [mips] Mark tests for lw/sw expansion in PIC by a separate "check prefix". NFC

    That simplify adding XGOT tests later. — atanasyan / ViewSVN
  5. [mips] Reduce code duplication in the `loadAndAddSymbolAddress`. NFC — atanasyan / ViewSVN

rL:372215 - C:372220 - #656 (Sep 18, 2019 5:20:29 AM)

  1. [mips] Pass "xgot" flag as a subtarget feature

    We need "xgot" flag in the MipsAsmParser to implement correct expansion
    of some pseudo instructions in case of using 32-bit GOT (XGOT).
    MipsAsmParser does not have reference to MipsSubtarget but has a
    reference to "feature bit set". — atanasyan / ViewSVN
  2. [AST] CommentLexer - Remove (optional) Invalid parameter from getSpelling.

    The static analyzer noticed that we were dereferencing it even when the default null value was being used. Further investigation showed that we never explicitly set the parameter so I've just removed it entirely. — rksimon / ViewSVN

rL:372215 - C:372203 - #655 (Sep 18, 2019 4:54:20 AM)

  1. Fix -Wdocumentation warning. NFCI. — rksimon / ViewSVN

rL:372214 - C:372203 - #654 (Sep 18, 2019 3:40:42 AM)

  1. Fix -Wdocumentation "empty paragraph passed to '\brief'" warning. NFCI. — rksimon / ViewSVN
  2. Fix -Wdocumentation "@returns in a void function" warning. NFCI. — rksimon / ViewSVN
  3. Fix -Wdocumentation "Unknown param" warning. NFCI. — rksimon / ViewSVN
  4. [cmake] Changes to get Windows self-host working with PGO

    Fixes quoting of profile arguments to work on Windows
    Suppresses adding profile arguments to linker flags when using lld-link
    Avoids -fprofile-instr-use being added to rc.exe flags
    Removes duplicated adding of -fprofile-instr-use to linker flags (since
    r355541)
    Move handling LLVM_PROFDATA_FILE to HandleLLVMOptions.cmake

    Differential Revision: https://reviews.llvm.org/D62063 — russell_gallop / ViewSVN

rL:372208 - C:372203 - #653 (Sep 18, 2019 2:35:42 AM)

  1. [AMDGPU] Allow FP inline constant in v_madak_f16 and v_fmaak_f16

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

    Change-Id: Ic38f47cb2079c2c1070a441b5943854844d80a7c — tpr / ViewSVN
  2. [Alignment] Add a None() member function

    Summary:
    This will allow writing `if(A != llvm::Align::None())` which is clearer than `if(A > llvm::Align(1))`

    This is patch is part of a series to introduce an Alignment type.
    See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
    See this patch for the introduction of the type: https://reviews.llvm.org/D64790

    Reviewers: courbet

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67697 — gchatelet / ViewSVN
  3. [clang-tidy] Fix a potential infinite loop in readability-isolate-declaration check.

    Reviewers: ilya-biryukov

    Subscribers: xazax.hun, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67654 — hokein / ViewSVN
  4. tsan: allow the Go runtime to return multiple stack frames for a single PC

    This fix allows tsan to report stack traces correctly even in the
    presence of mid-stack inlining by the Go compiler.

    See https://go-review.googlesource.com/c/go/+/195781 for the Go runtime side of this change.

    Author: randall77 (Keith Randall)
    Reviewed: https://reviews.llvm.org/D67671 — dvyukov / ViewSVN
  5. [AArch64][DebugInfo] Do not recompute CalleeSavedStackSize

    This patch fixes a bug exposed by D65653 where a subsequent invocation
    of `determineCalleeSaves` ends up with a different size for the callee
    save area, leading to different frame-offsets in debug information.

    In the invocation by PEI, `determineCalleeSaves` tries to determine
    whether it needs to spill an extra callee-saved register to get an
    emergency spill slot. To do this, it calls 'estimateStackSize' and
    manually adds the size of the callee-saves to this. PEI then allocates
    the spill objects for the callee saves and the remaining frame layout
    is calculated accordingly.

    A second invocation in LiveDebugValues causes estimateStackSize to return
    the size of the stack frame including the callee-saves. Given that the
    size of the callee-saves is added to this, these callee-saves are counted
    twice, which leads `determineCalleeSaves` to believe the stack has
    become big enough to require spilling an extra callee-save as emergency
    spillslot. It then updates CalleeSavedStackSize with a larger value.

    Since CalleeSavedStackSize is used in the calculation of the frame
    offset in getFrameIndexReference, this leads to incorrect offsets for
    variables/locals when this information is recalculated after PEI.

    Reviewers: omjavaid, eli.friedman, thegameg, efriedma

    Reviewed By: efriedma

    Differential Revision: https://reviews.llvm.org/D66935 — s.desmalen / ViewSVN

rL:372202 - C:372203 - #652 (Sep 18, 2019 2:00:18 AM)

  1. [lldb] Print better diagnostics for user expressions and modules

    Summary:
    Currently our expression evaluators only prints very basic errors that are not very useful when writing complex expressions.

    For example, in the expression below the user made a type error, but it's not clear from the diagnostic what went wrong:
    ```
    (lldb) expr printf("Modulos are:", foobar%mo1, foobar%mo2, foobar%mo3)
    error: invalid operands to binary expression ('int' and 'double')
    ```

    This patch enables full Clang diagnostics in our expression evaluator. After this patch the diagnostics for the expression look like this:

    ```
    (lldb) expr printf("Modulos are:", foobar%mo1, foobar%mo2, foobar%mo3)
    error: <user expression 1>:1:54: invalid operands to binary expression ('int' and 'float')
    printf("Modulos are:", foobar%mo1, foobar%mo2, foobar%mo3)
                                                   ~~~~~~^~~~
    ```

    To make this possible, we now emulate a user expression file within our diagnostics. This prevents that the user is exposed to
    our internal wrapper code we inject.

    Note that the diagnostics that refer to declarations from the debug information (e.g. 'note' diagnostics pointing to a called function)
    will not be improved by this as they don't have any source locations associated with them, so caret or line printing isn't possible.
    We instead just suppress these diagnostics as we already do with warnings as they would otherwise just be a context message
    without any context (and the original diagnostic in the user expression should be enough to explain the issue).

    Fixes rdar://24306342

    Reviewers: JDevlieghere, aprantl, shafik, #lldb

    Reviewed By: JDevlieghere, #lldb

    Subscribers: usaxena95, davide, jingham, aprantl, arphaman, kadircet, lldb-commits

    Tags: #lldb

    Differential Revision: https://reviews.llvm.org/D65646 — Raphael Isemann / ViewSVN
  2. Revert "r372201: [Support] Replace function with function_ref in writeFileAtomically. NFC"

    function_ref causes calls to the function to be ambiguous, breaking
    compilation.

    Reverting for now. — ibiryukov / ViewSVN

rL:372201 - C:372197 - #651 (Sep 18, 2019 1:31:57 AM)

  1. [Support] Replace function with function_ref in writeFileAtomically. NFC

    Summary:
    The latter is slightly more efficient and communicates the intent of the
    API: writeFileAtomically does not own or copy the callback, it merely
    calls it at some point.

    Reviewers: jkorous

    Reviewed By: jkorous

    Subscribers: hiraditya, dexonsmith, jfb, llvm-commits, cfe-commits

    Tags: #llvm

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

rL:372200 - C:372197 - #650 (Sep 17, 2019 11:07:00 PM)

  1. [X86] Break non-power of 2 vXi1 vectors into scalars for argument passing with avx512.

    This generates worse code, but matches what is done for avx2 and
    prevents crashes when more arguments are passed than we have
    registers for. — ctopper / ViewSVN
  2. [X86] Add test case for passing a v17i1 vector with avx512 — ctopper / ViewSVN

rL:372198 - C:372197 - #649 (Sep 17, 2019 9:03:58 PM)

  1. [BPF] Permit all user instructed offset relocatiions

    Currently, not all user specified relocations
    (with clang intrinsic __builtin_preserve_access_index())
    will turn into relocations.

    In the current implementation, a __builtin_preserve_access_index()
    chain is turned into relocation only if the result of the clang
    intrinsic is used in a function call or a nonzero offset computation
    of getelementptr. For all other cases, the relocatiion request
    is ignored and the __builtin_preserve_access_index() is turned
    into regular getelementptr instructions.
    The main reason is to mimic bpf_probe_read() requirement.

    But there are other use cases where relocatable offset is
    generated but not used for bpf_probe_read(). This patch
    relaxed previous constraints when to generate relocations.
    Now, all user __builtin_preserve_access_index() will have
    relocations generated.

    Differential Revision: https://reviews.llvm.org/D67688 — yhs / ViewSVN

rL:372197 - C:372197 - #648 (Sep 17, 2019 7:05:50 PM)

  1. [X86] Prevent assertion when calling a function that returns double with -mno-sse2 on x86-64.

    As seen in the most recent updates to PR10498 — ctopper / ViewSVN
  2. [Remarks] Allow the RemarkStreamer to be used directly with a stream

    The filename in the RemarkStreamer should be optional to allow clients
    to stream remarks to memory or to existing streams.

    This introduces a new overload of `setupOptimizationRemarks`, and avoids
    enforcing the presence of a filename at different places. — thegameg / ViewSVN

rL:372189 - C:372191 - #647 (Sep 17, 2019 5:08:17 PM)

  1. [Timers] Fix printing some `-ftime-report` sections twice. Fixes PR40328.

    Starting from r324788 timer groups aren't cleared automatically when
    printed out. As a result some timer groups were printed one more time.
    For example, "Pass execution timing report" was printed again in
    `ManagedStatic<PassTimingInfo>` destructor, "DWARF Emission" in
    `ManagedStatic<Name2PairMap> NamedGroupedTimers` destructor.

    Fix by clearing timer groups manually.

    Reviewers: thegameg, george.karpenkov

    Reviewed By: thegameg

    Subscribers: aprantl, jkorous, dexonsmith, ributzka, aras-p, cfe-commits

    Differential Revision: https://reviews.llvm.org/D67683 — vsapsai / ViewSVN
  2. [PGO] Change hardcoded thresholds for cold/inlinehint to use summary

    Summary:
    The PGO counter reading will add cold and inlinehint (hot) attributes
    to functions that are very cold or hot. This was using hardcoded
    thresholds, instead of the profile summary cutoffs which are used in
    other hot/cold detection and are more dynamic and adaptable. Switch
    to using the summary-based cold/hot detection.

    The hardcoded limits were causing some code that had a medium level of
    hotness (per the summary) to be incorrectly marked with a cold
    attribute, blocking inlining.

    Reviewers: davidxl

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67673 — tejohnson / ViewSVN

rL:372186 - C:372187 - #646 (Sep 17, 2019 3:37:06 PM)

  1. [ARM] Update clang for removal of vfp2d16 and vfp2d16sp

    Matching fix for https://reviews.llvm.org/D67375 (r372186).

    Differential Revision: https://reviews.llvm.org/D67467 — efriedma / ViewSVN
  2. [ARM] VFPv2 only supports 16 D registers.

    r361845 changed the way we handle "D16" vs. "D32" targets; there used to
    be a negative "d16" which removed instructions from the instruction set,
    and now there's a "d32" feature which adds instructions to the
    instruction set.  This is good, but there was an oversight in the
    implementation: the behavior of VFPv2 was changed.  In particular, the
    "vfp2" feature was changed to imply "d32". This is wrong: VFPv2 only
    supports 16 D registers.

    In practice, this means if you specify -mfpu=vfpv2, the compiler will
    generate illegal instructions.

    This patch gets rid of "vfp2d16" and "vfp2d16sp", and fixes "vfp2" and
    "vfp2sp" so they don't imply "d32".

    Differential Revision: https://reviews.llvm.org/D67375 — efriedma / ViewSVN
  3. Revert "Create UsersManual section entitled 'Controlling Floating Point"

    This reverts commit a08d5a4b0ebd44dc64f41049ed4e97a3c6d31498. — erichkeane / ViewSVN

rL:372182 - C:372183 - #645 (Sep 17, 2019 2:21:30 PM)

  1. [Sema] Split of versions of -Wimplicit-{float,int}-conversion for Objective-C BOOL

    Also, add a diagnostic group, -Wobjc-signed-char-bool, to control all these
    related diagnostics.

    rdar://51954400

    Differential revision: https://reviews.llvm.org/D67559 — epilk / ViewSVN
  2. [PGO] Don't use comdat groups for counters & data on COFF

    For COFF, a comdat group is really a symbol marked
    IMAGE_COMDAT_SELECT_ANY and zero or more other symbols marked
    IMAGE_COMDAT_SELECT_ASSOCIATIVE. Typically the associative symbols in
    the group are not external and are not referenced by other TUs, they are
    things like debug info, C++ dynamic initializers, or other section
    registration schemes. The Visual C++ linker reports a duplicate symbol
    error for symbols marked IMAGE_COMDAT_SELECT_ASSOCIATIVE even if they
    would be discarded after handling the leader symbol.

    Fixes coverage-inline.cpp in check-profile after r372020. — rnk / ViewSVN
  3. Reland "[docs][Bugpoint]Add notes about multiple crashes"

    Fix the warning.
    Bugpoint.rst:124:Mismatch: both interpreted text role prefix and
    reference suffix.

    Note that the line no here is wrong and misleading,
    the problem is in line 128, not 124. — jsji / ViewSVN
  4. Create UsersManual section entitled 'Controlling Floating Point
    Behavior'

    Create a new section for documenting the floating point options. Move
    all the floating point options into this section, and add new entries
    for the floating point options that exist but weren't previously
      described in the UsersManual.

    Patch By: mibintc
    Differential Revision: https://reviews.llvm.org/D67517 — erichkeane / ViewSVN
  5. Fix buildbots.

    MSVC doesn't correctly capture constexpr in lambdas, and other builds warn if you do, others will error out if you do. Avoid lambdas. — gclayton / ViewSVN
  6. Ignore exception specifier mismatch when merging redeclarations

    Exception specifiers are now part of the function type in C++17.
    Normally, it is illegal to redeclare the same function or specialize a
    template with a different exception specifier, but under
    -fms-compatibility, we accept it with a warning. Without this change,
    the function types would not match due to the exception specifier, and
    clang would claim that the types were "incompatible". Now we emit the
    warning and merge the redeclaration as we would in C++14 and earlier.

    Fixes PR42842, which is about compiling _com_ptr_t in C++17.

    Based on a patch by Alex Fusco <alexfusco@google.com>!

    Differential Revision: https://reviews.llvm.org/D67590 — rnk / ViewSVN
  7. [AArch64][GlobalISel] Support -tailcallopt

    This adds support for `-tailcallopt` tail calls to CallLowering. This
    piggy-backs off the changes from D67577, since doing it without a bit of
    refactoring gets extremely ugly.

    Support is basically ported from AArch64ISelLowering. The main difference here
    is that tail calls in `-tailcallopt` change the ABI, so there's some extra
    bookkeeping for the stack.

    Show that we are correctly lowering these by updating tail-call.ll.

    Also show that we don't do anything strange in general by updating
    fastcc-reserved.ll, which passes `-tailcallopt`, but doesn't emit any tail
    calls.

    Differential Revision: https://reviews.llvm.org/D67580 — paquette / ViewSVN

rL:372173 - C:372174 - #644 (Sep 17, 2019 1:11:47 PM)

  1. [clang-scan-deps] Add verbose mode

    When running in the default mode we don't print anything other than actual output to stdout to make automated processing easier.

    Differential Revision: https://reviews.llvm.org/D67522 — Jan Korous / ViewSVN
  2. gn build: Merge r372168 — gnsyncbot / ViewSVN
  3. AArch64CallLowering::lowerCall(): fix build by not passing InArgs into lowerTailCall() — lebedevri / ViewSVN
  4. [NFC][InstCombine] dropRedundantMaskingOfLeftShiftInput(): some NFC diff shaving — lebedevri / ViewSVN
  5. [NFC][InstCombine] More tests for "Dropping pointless masking before left shift" (PR42563)

    While we already fold that pattern if the sum of shift amounts is not
    smaller than bitwidth, there's painfully obvious generalization:
      https://rise4fun.com/Alive/F5R
    I.e. the "sub of shift amounts" tells us how many bits will be left
    in the output. If it's less than bitwidth, we simply need to
    apply a mask, which is constant. — lebedevri / ViewSVN

rL:372168 - C:372152 - #643 (Sep 17, 2019 12:30:41 PM)

  1. Revert "Data Dependence Graph Basics"

    This reverts commit c98ec60993a7aa65073692b62f6d728b36e68ccd, which broke the sphinx-docs build. — bmahjour / ViewSVN
  2. NVPTXAsmPrinter - Don't dereference a dyn_cast result. NFCI. — rksimon / ViewSVN
  3. WasmEmitter - Don't dereference a dyn_cast result. NFCI. — rksimon / ViewSVN
  4. [AArch64][GlobalISel][NFC] Refactor tail call lowering code

    When you begin implementing -tailcallopt, this gets somewhat hairy. Refactor
    the call lowering code so that the tail call lowering stuff gets its own
    function.

    Differential Revision: https://reviews.llvm.org/D67577 — paquette / ViewSVN
  5. gn build: Merge r372162 — gnsyncbot / ViewSVN
  6. Data Dependence Graph Basics

    Summary:
    This is the first patch in a series of patches that will implement data dependence graph in LLVM. Many of the ideas used in this implementation are based on the following paper:
    D. J. Kuck, R. H. Kuhn, D. A. Padua, B. Leasure, and M. Wolfe (1981). DEPENDENCE GRAPHS AND COMPILER OPTIMIZATIONS.
    This patch contains support for a basic DDGs containing only atomic nodes (one node for each instruction). The edges are two fold: def-use edges and memory-dependence edges.
    The implementation takes a list of basic-blocks and only considers dependencies among instructions in those basic blocks. Any dependencies coming into or going out of instructions that do not belong to those basic blocks are ignored.

    The algorithm for building the graph involves the following steps in order:

      1. For each instruction in the range of basic blocks to consider, create an atomic node in the resulting graph.
      2. For each node in the graph establish def-use edges to/from other nodes in the graph.
      3. For each pair of nodes containing memory instruction(s) create memory edges between them. This part of the algorithm goes through the instructions in lexicographical order and creates edges in reverse order if the sink of the dependence occurs before the source of it.

    Authored By: bmahjour

    Reviewer: Meinersbur, fhahn, myhsu, xtian, dmgreen, kbarton, jdoerfert

    Reviewed By: Meinersbur, fhahn, myhsu

    Subscribers: ychen, arphaman, simoll, a.elovikov, mgorny, hiraditya, jfb, wuzish, llvm-commits, jsji, Whitney, etiotto

    Tag: #llvm

    Differential Revision: https://reviews.llvm.org/D65350 — bmahjour / ViewSVN
  7. [docs][Bugpoint] Revert 5584ead50 a5aa3353

    No sure why there are still warnings, revert while I investigate. — jsji / ViewSVN

rL:372160 - C:372152 - #642 (Sep 17, 2019 11:26:03 AM)

  1. [docs][Bugpoint] Fix build break.

    Bugpoint.rst:124: WARNING: Mismatch: both interpreted text role prefix
    and reference suffix. — jsji / ViewSVN
  2. [X86] Use APInt::operator<<= and APInt::lshrInPlace. NFC — ctopper / ViewSVN
  3. [SimplifyDemandedBits] Use APInt::intersects to instead of ANDing and comparing to 0 separately. NFC — ctopper / ViewSVN
  4. [docs][Bugpoint]Add notes about multiple crashes

    Summary:
        When reducing case for a CodeGenCrash, bugpoint may generate a new
        reduced
        testcase that exposes/causes another crash or break something due to
        limitation.

        Bugpoint does not distiguish different crashes currently,
        so when this happens, bugpoint will go on reducing for the new crash,
        or just abort, we can't get the case reduced for the origial crash.

        An advice is added into usage doc to connect to recommend checking error
        message with scripts and `-compile-command`.

    Reviewers: modocache, bogner, sebpop, reames, vsk, MatzeB

    Reviewed By: vsk

    Subscribers: mehdi_amini, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D66832 — jsji / ViewSVN
  5. [X86] Simplify b2b KSHIFTL+KSHIFTR using demanded elts. — ctopper / ViewSVN
  6. [X86] Call SimplifyDemandedVectorElts on KSHIFTL/KSHIFTR nodes during DAG combine. — ctopper / ViewSVN
  7. [X86] Simplify some code in LowerBUILD_VECTORvXi1. NFCI

    The case were Immediate is 0 and HasConstElts is true should never
    happen since that would mean the constant elts were all zero. But
    we check for all zero build vector earlier. So just use HasConstElts
    and blindly take Immediate without checking if its 0.

    Move the code that bitcasts and extract the immediate into the
    the HasConstElts case since the other code just creates an undef
    with the right type. No casting needed. — ctopper / ViewSVN
  8. Use 'BOOL' instead of BOOL in diagnostic messages

    Type names should be enclosed in single quotes. — epilk / ViewSVN
  9. [AMDGPU] Added MI bit IsDOT

    NFC, needed for future commit.

    Differential Revision: https://reviews.llvm.org/D67669 — rampitec / ViewSVN
  10. gn build: Merge r372149 — gnsyncbot / ViewSVN
  11. GSYM: Add the llvm::gsym::Header header class with tests

    This patch adds the llvm::gsym::Header class which appears at the start of a stand alone GSYM file, or in the first bytes of the GSYM data in a GSYM section within a file. Added encode and decode methods with full error handling and full tests.

    Differential Revision: https://reviews.llvm.org/D67666 — gclayton / ViewSVN
  12. [TableGen] CodeGenMapTable - Don't dereference a dyn_cast result. NFCI.

    The static analyzer is warning about potential null dereferences of dyn_cast<> results - in these cases we can safely use cast<> directly as we know that these cases should all be the correct type, which is why its working atm and anyway cast<> will assert if they aren't. — rksimon / ViewSVN

rL:372145 - C:372148 - #641 (Sep 17, 2019 10:34:14 AM)

  1. [OPENMP] Rework the test, NFC. — abataev / ViewSVN
  2. [OPENMP5.0]Introduce attribute for declare variant directive.

    Added attribute for declare variant directive. It will allow to handle
    declare variant directive at the codegen and will allow to add extra
    checks. — abataev / ViewSVN
  3. [ARM][AsmParser] Don't dereference a dyn_cast result. NFCI.

    The static analyzer is warning about potential null dereferences of dyn_cast<> results - in these cases we can safely use cast<> directly as we know that these cases should all be the correct type, which is why its working atm and anyway cast<> will assert if they aren't. — rksimon / ViewSVN
  4. Fix MSVC lambda capture warnings. NFCI. — rksimon / ViewSVN
  5. Remove asan test for strncat(x, y, 0) — xbolva00 / ViewSVN
  6. Reland "[SLC] Preserve attrs for strncpy(x, "", y) -> memset(align 1 x, '\0', y)" — xbolva00 / ViewSVN
  7. [ASAN] Adjust asan tests due to new optimizations — xbolva00 / ViewSVN
  8. [PowerPC] Exploit single instruction load-and-splat for word and doubleword

    We currently produce a load, followed by (possibly a move for integers and) a
    splat as separate instructions. VSX has always had a splatting load for
    doublewords, but as of Power9, we have it for words as well. This patch just
    exploits these instructions.

    Differential revision: https://reviews.llvm.org/D63624 — nemanjai / ViewSVN
  9. [MemorySSA] Fix phi insertion when inserting a def.

    Summary:
    When inserting a Def, the current algorithm is walking edges backward
    and inserting new Phis where needed. There may be additional Phis needed
    in the IDF of the newly inserted Def and Phis.
    Adding Phis in the IDF of the Def was added ina  previous patch, but we
    may also need other Phis in the IDF of the newly added Phis.

    Reviewers: george.burgess.iv

    Subscribers: Prazek, sanjoy.google, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67637 — asbirlea / ViewSVN
  10. [MemorySSA] Update MSSA for non-conventional AA.

    Summary:
    Regularly when moving an instruction that may not read or write memory,
    the instruction is not modelled in MSSA, so not action is necessary.
    For a non-conventional AA pipeline, MSSA needs to explicitly check when
    creating accesses, so as to not model instructions that may not read and
    write memory.

    Reviewers: george.burgess.iv

    Subscribers: Prazek, sanjoy.google, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67562 — asbirlea / ViewSVN
  11. Move DK_Misexpect for compatability with getNextAvailablePluginDiagnosticKind

    First identified after D66324 landed.

    Patch By: paulkirth
    Differential Revision: https://reviews.llvm.org/D67648 — phosek / ViewSVN

rL:372135 - C:372130 - #640 (Sep 17, 2019 9:24:03 AM)

  1. GSYM: add encoding and decoding to FunctionInfo

    This patch adds encoding and decoding of the FunctionInfo objects along with full error handling and tests. Full details of the FunctionInfo encoding format appear in the FunctionInfo.h header file.

    Differential Revision: https://reviews.llvm.org/D67506 — gclayton / ViewSVN
  2. [ARM] Add a SelectTAddrModeImm7 for MVE narrow loads and stores

    We were previously using the SelectT2AddrModeImm7 for both normal and narrowing
    MVE loads/stores. As the narrowing instructions do not accept sp as a register,
    it makes little sense to optimise a FrameIndex into the load, only to have to
    recover that later on. This adds a SelectTAddrModeImm7 which does not do that
    folding, and uses it for narrowing load/store patterns.

    Differential Revision: https://reviews.llvm.org/D67489 — dmgreen / ViewSVN
  3. [ARM] Fixup pipeline test. NFC — dmgreen / ViewSVN
  4. [ARM] Reserve an emergency spill slot for fp16 addressing modes that need it

    Similar to D67327, but this time for the FP16 VLDR and VSTR instructions that
    use the AddrMode5FP16 addressing mode. We need to reserve an emergency spill
    slot for instructions that will be out of range to use sp directly.
    AddrMode5FP16 is 8 bits with a scale of 2.

    Differential Revision: https://reviews.llvm.org/D67483 — dmgreen / ViewSVN

rL:372127 - C:372130 - #639 (Sep 17, 2019 8:22:32 AM)

  1. [OPENMP]Try to rework the test to pacify the buildbots, NFC. — abataev / ViewSVN
  2. [clang-format] Fix cleanup of `AnnotatedLine` to include children nodes.

    Summary:
    AnnotatedLine has a tree structure, and things like the body of a lambda will be
    a child of the lambda expression. For example,

        [&]() { foo(a); };

    will have an AnnotatedLine with a child:

        [&]() {};
         '- foo(a);

    Currently, when the `Cleaner` class analyzes the affected lines, it does not
    cleanup the lines' children nodes, which results in missed cleanup
    opportunities, like the lambda body in the example above.

    This revision extends the algorithm to visit children, thereby fixing the above problem.

    Patch by Eric Li.

    Reviewers: krasimir

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67659 — ymandel / ViewSVN
  3. [clangd] Fix another TSAN issue — d0k / ViewSVN
  4. [RISCV] Unbreak the build — d0k / ViewSVN

rL:372126 - C:372124 - #638 (Sep 17, 2019 7:27:42 AM)

  1. [ARM] Fix for buildbots

    Remove setPreservesCFG from ARMConstantIslandPass and add a couple
    of -verify-machine-dom-info instances into the existing codegen
    tests. — sam_parker / ViewSVN
  2. Revert "[SLC] Preserve attrs for strncpy(x, "", y) -> memset(align 1 x, '\0', y)"

    Summary:
    This reverts commit r372101.

    Causes ASAN build bot failures:

    http://lab.llvm.org:8011/builders/sanitizer-ppc64be-linux/builds/14176
    From http://lab.llvm.org:8011/builders/sanitizer-ppc64be-linux/builds/14176/steps/64-bit%20check-asan/logs/stdio:

    ```
    [ RUN      ] AddressSanitizer.StrNCatOOBTest
    /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/asan/tests/asan_str_test.cpp:462: Failure
    Death test: strncat(to - 1, from, 0)
        Result: failed to die.
    ```

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67658 — krasimir / ViewSVN
  3. Add SpellingNotCalculated to Attribute Enums to suppress UBSan warnings

    UBSan downstreams noticed that the assignment of SpellingNotCalculated
    to the spellings caused warnings. — erichkeane / ViewSVN
  4. gn build: (manually) merge r372076 — nico / ViewSVN
  5. [llvm-readobj/llvm-objdump] - Improve how tool locate the dynamic table and report warnings about that.

    Before this patch we gave a priority to a dynamic table found
    from the section header.

    It was discussed (here: https://reviews.llvm.org/D67078?id=218356#inline-602082)
    that probably preferring the table from PT_DYNAMIC is better,
    because it is what runtime loader sees.

    This patch makes the table from PT_DYNAMIC be chosen at first place if it is available.
    But also it adds logic to fall back to SHT_DYNAMIC if the table from the dynamic segment is
    broken or fall back to use no table if both are broken.

    It adds a few more diagnostic warnings for the logic above.

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

rL:372121 - C:372119 - #637 (Sep 17, 2019 6:51:48 AM)

  1. [ARM] Fix for buildbots

    Add --verifymachineinstrs and update the remaining low overhead loop
    tests. — sam_parker / ViewSVN
  2. [RISCV][NFC] Use NoRegister instead of 0 literal

    Summary: Trivial cleanup.

    Reviewers: asb, lenary

    Reviewed By: lenary

    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, s.egerton, pzheng, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67526 — luismarques / ViewSVN
  3. [OpenCL] Tidy up some comments; NFC — svenvh / ViewSVN
  4. [X86] X86DAGToDAGISel::tryFoldLoad - assert root/parent pointers are non-null. NFCI.

    Silences a static analyzer warning. — rksimon / ViewSVN
  5. InterleavedAccessInfo - Don't dereference a dyn_cast result. NFCI. — rksimon / ViewSVN
  6. [LoopVectorize] Don't dereference a dyn_cast result. NFCI.

    The static analyzer is warning about potential null dereferences of dyn_cast<> results, we can use cast<> directly as we know that these cases should all be CastInst, which is why its working atm and anyway cast<> will assert if they aren't. — rksimon / ViewSVN
  7. [ARM] Fix for MVE load/store stack accesses

    MVE loads and stores have a 7 bit immediate range, scaled by the length of the type. This needs to be taught to the stack estimation code to ensure that an emergency spill slot is reserved in case we run out of registers when materialising stack indices.

    Also the narrowing loads/stores can be created with frame indices even though they do not accept SP as a register. We need in those cases to make sure we have an emergency register to use as the frame base, as SP can never be used.

    Differential Revision: https://reviews.llvm.org/D67327 — dmgreen / ViewSVN
  8. Hide implementation details in namespaces. — d0k / ViewSVN
  9. [ARM][LowOverheadLoops] Add LR def safety check

    Converting the *LoopStart pseudo instructions into DLS/WLS results in
    LR being defined. These instructions were inserted on the assumption
    that LR would already contain the loop counter because a mov is
    introduced during ISel as the the consumers in the loop can only use
    LR. That assumption proved wrong!

    So perform a safety check, finding an appropriate place to insert the
    DLS/WLS instructions or revert if this isn't possible.

    Differential Revision: https://reviews.llvm.org/D67539 — sam_parker / ViewSVN

rL:372110 - C:372095 - #636 (Sep 17, 2019 5:11:23 AM)

  1. [llvm-readobj] - Test PPC64 relocations properly.

    We had a precompiled binary committed and not all of the relocations
    supported were tested. This patch fixes this.

    Differential revision: https://reviews.llvm.org/D67617 — grimar / ViewSVN
  2. [obj2yaml] - Support PPC64 relocation types.

    We do not support them and fail with llvm_unreachable currently.
    This is not the only target we do not support and also seems we are missing
    the tests for those we have already. But I needed this one for another patch,
    so posted it separatelly.

    Relocation names are taken from llvm\include\llvm\BinaryFormat\ELFRelocs\PowerPC64.def

    Differential revision: https://reviews.llvm.org/D67615 — grimar / ViewSVN
  3. [yaml2obj/obj2yaml] - Allow setting an arbitrary values for e_machine.

    Currently we only allow using a known named constants
    for `Machine` field in YAML documents.

    This patch allows using any numbers (valid or "unknown")
    and adds test cases for current and new functionality.

    With this it is possible to write a test cases for really unknown
    EM_* targets.

    Differential revision: https://reviews.llvm.org/D67652 — grimar / ViewSVN
  4. [docs] Make --version text more correct

    Follow-up to r371983. Referring to "this program" in the description of
    the --version option in the documentation isn't exactly correct, because
    the docs are not part of the program, and so "this program" doesn't
    really refer to anything. This patch brings the other users of this
    terminology into line with the new updates to llvm-size and
    llvm-strings.

    Reviewed by: alexshap, MaskRay

    Differential Revision: https://reviews.llvm.org/D67618 — jhenderson / ViewSVN
  5. [RISCV] Switch to the Machine Scheduler

    Most of the test changes are trivial instruction reorderings and differing
    register allocations, without any obvious performance impact.

    Differential Revision: https://reviews.llvm.org/D66973 — luismarques / ViewSVN

rL:372105 - C:372095 - #635 (Sep 17, 2019 3:56:08 AM)

  1. [Attributor][Fix] Initialize the cache prior to using it

    Summary:
    There were segfaults as we modified and iterated the instruction maps in
    the cache at the same time. This was happening because we created new
    instructions while we populated the cache. This fix changes the order
    in which we perform these actions. First, the caches for the whole
    module are created, then we start to create abstract attributes.

    I don't have a unit test but the LLVM test suite exposes this problem.

    Reviewers: uenoku, sstefan1

    Subscribers: hiraditya, bollu, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67232 — jdoerfert / ViewSVN
  2. Revert Patch from Phabricator

    This reverts r372092 (git commit e38695a0255c9e7b53639f349f8101bae1ce5c04) — luismarques / ViewSVN
  3. [X86] Use APInt::getLowBitsSet helper. NFCI.

    Also avoids a static analyzer warning about out of range shifts. — rksimon / ViewSVN
  4. Add SemanticRanges to Clangd server.

    Summary:
    Adds Semantic Ranges capabilities to Clangd server.
    Also adds tests for running it via clangd server.

    This differs from the LSP spec as the spec needs this to be evaluated on multiple 'pos' and the expected output is an list of list of semantic ranges.
    This is majorly for multi cursor and assuming this is a rare thing, we don't want to optimize make things complicated just for this.
    This should be done in the LSP level by queueing one request per 'pos' in the input.

    LSP Spec:
    https://github.com/microsoft/language-server-protocol/blob/dbaeumer/3.15/specification.md#textDocument_selectionRange

    Reviewers: hokein

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67650 — usaxena95 / ViewSVN

rL:372101 - C:372095 - #634 (Sep 17, 2019 3:29:00 AM)

  1. [SLC] Preserve attrs for strncpy(x, "", y) -> memset(align 1 x, '\0', y) — xbolva00 / ViewSVN
  2. [SVE][MVT] Fixed-length vector MVT ranges

      * Reordered MVT simple types to group scalable vector types
        together.
      * New range functions in MachineValueType.h to only iterate over
        the fixed-length int/fp vector types.
      * Stopped backends which don't support scalable vector types from
        iterating over scalable types.

    Reviewers: sdesmalen, greened

    Reviewed By: greened

    Differential Revision: https://reviews.llvm.org/D66339 — huntergr / ViewSVN
  3. [InstCombine] Annotate strdup with deref_or_null — xbolva00 / ViewSVN
  4. [NFCI] Fixed buildbots — xbolva00 / ViewSVN
  5. [SimplifyLibCalls] Fix -Wunused-result after D53342/r372091 — maskray / ViewSVN
  6. [NFC] Updated test — xbolva00 / ViewSVN
  7. [NFC} Updated test — xbolva00 / ViewSVN
  8. Patch from Phabricator — luismarques / ViewSVN
  9. [SimplifyLibCalls] Mark known arguments with nonnull

    Reviewers: efriedma, jdoerfert

    Reviewed By: jdoerfert

    Subscribers: ychen, rsmith, joerg, aaron.ballman, lebedev.ri, uenoku, jdoerfert, hfinkel, javed.absar, spatel, dmgreen, llvm-commits

    Differential Revision: https://reviews.llvm.org/D53342 — xbolva00 / ViewSVN
  10. [llvm-readobj] - Fix BB after r372087.

    Seems I forgot to update the number of bytes checked. — grimar / ViewSVN
  11. [llvm-ar] Parse 'h' and '-h': display help and exit

    Support `llvm-ar h` and `llvm-ar -h` because they may be what users try
    at first. Note, operation 'h' is undocumented in GNU ar.

    Reviewed By: jhenderson

    Differential Revision: https://reviews.llvm.org/D67560 — maskray / ViewSVN
  12. [llvm-readobj] - Fix a TODO in elf-reloc-zero-name-or-value.test.

    The "TODO" mentioned was:

    "Add test for symbol with no name but with a value once yaml2obj allows
    referencing symbols with no name from relocations."

    We can do it now.

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

rL:372086 - C:372082 - #633 (Sep 17, 2019 2:12:15 AM)

  1. [AMDGPU]: PHI Elimination hooks added for custom COPY insertion. Fixed

    Defferential Revision: https://reviews.llvm.org/D67101

    Reviewers: rampitec, vpykhtin — alex-t / ViewSVN
  2. [ARM] LE support in ConstantIslands

    The low-overhead branch extension provides a loop-end 'LE' instruction
    that performs no decrement nor compare, it just jumps backwards. This
    patch modifies the constant islands pass to try to insert LE
    instructions in place of a Thumb2 conditional branch, instead of
    shrinking it. This only happens if a cmp can be converted to a cbn/z
    and used to exit the loop.

    Differential Revision: https://reviews.llvm.org/D67404 — sam_parker / ViewSVN
  3. [LoopUnroll] Use LoopSize+1 as threshold, to allow unrolling loops matching LoopSize.

    We use `< UP.Threshold` later on, so we should use LoopSize + 1, to
    allow unrolling if the result won't exceed to loop size.

    Fixes PR43305.

    Reviewers: efriedma, dmgreen, paquette

    Reviewed By: dmgreen

    Differential Revision: https://reviews.llvm.org/D67594 — fhahn / ViewSVN
  4. [llvm-readobj] - Refactor the code.

    It's a straightforward refactoring that allows to simplify and encapsulate the code.

    Differential revision: https://reviews.llvm.org/D67624 — grimar / ViewSVN
  5. [Clang] Pragma vectorize_width() implies vectorize(enable)

    Specifying the vectorization width was supposed to implicitly enable
    vectorization, except that it wasn't really doing this. It was only
    setting the vectorize.width metadata, but not vectorize.enable.

    This should fix PR27643.

    Differential Revision: https://reviews.llvm.org/D66290 — sjoerdmeijer / ViewSVN
  6. [llvm-objcopy] - Remove python invocations from 2 test cases.

    It is possible to use yaml2obj to create sections with overlapping sh_offset now.
    This patch does that.

    Differential revision: https://reviews.llvm.org/D67610 — grimar / ViewSVN
  7. [RISCV] Add option aliases: -mcmodel=medany and -mcmodel=medlow

    RISC-V GCC use -mcmodel=medany and -mcmodel=medlow, but LLVM use
    -mcmodel=small and -mcmodel=medium.

    Add those two option aliases for provide same user interface between
    GCC and LLVM.

    Reviewed By: lenary

    Differential Revision: https://reviews.llvm.org/D67066 — kito / ViewSVN
  8. [bugpoint] Add support for -Oz and properly enable -Os.

    This patch adds -Oz as option and also properly enables support for -Os.
    Currently, the existing check for -Os is dead, because the enclosing if
    only checks of O1, O2 and O3.

    There is still a difference between the -Oz pipeline compared to opt,
    but I have not been able to track that down yet.

    Reviewers: bogner, sebpop, efriedma

    Reviewed By: efriedma

    Differential Revision: https://reviews.llvm.org/D67593 — fhahn / ViewSVN
  9. [RISCV] Define __riscv_cmodel_medlow and __riscv_cmodel_medany correctly

    RISC-V LLVM was only implement small/medlow code model, so it defined
    __riscv_cmodel_medlow directly without check.

    Now, we have medium/medany code model in RISC-V back-end, it should
    define according the actually code model.

    Reviewed By: lewis-revill

    Differential Revision: https://reviews.llvm.org/D67065 — kito / ViewSVN

rL:372076 - C:372063 - #632 (Sep 17, 2019 12:45:55 AM)

  1. [ARM][MVE] Add invalidForTailPredication to TSFlags

    Set this bit for the MVE reduction instructions to prevent a loop from
    becoming tail predicated in their presence.

    Differential Revision: https://reviews.llvm.org/D67444 — sam_parker / ViewSVN
  2. [Attributor] Use Alias Analysis in noalias callsite argument deduction

    Summary: This patch adds a check of alias analysis in `noalias` callsite argument deduction.

    Reviewers: jdoerfert, sstefan1

    Reviewed By: jdoerfert

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67604 — uenoku / ViewSVN
  3. [clangd] Remove stale comment. NFC — ibiryukov / ViewSVN

rL:372072 - C:372063 - #631 (Sep 16, 2019 11:24:02 PM)

  1. [Attributor] Create helper struct for handling analysis getters

    Summary: This patch introduces a helper struct `AnalysisGetter` to put together analysis getters. In this patch, a getter for `AAResult` is also added for  `noalias`.

    Reviewers: jdoerfert, sstefan1

    Reviewed By: jdoerfert

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67603 — uenoku / ViewSVN

rL:372070 - C:372063 - #630 (Sep 16, 2019 10:42:04 PM)

  1. [git-llvm] Do not reinvent `@{upstream}` (take 2)

    This makes git-llvm more of a thin wrapper around git while temporarily
    maintaining backwards compatibility with past git-llvm behavior.

    Using @{upstream} makes git-llvm more robust when used with a nontrivial
    local repository.

    https://reviews.llvm.org/D67389 — davezarzycki / ViewSVN
  2. [X86] Split oversized vXi1 vector arguments and return values into scalars on avx512 targets.

    Previously we tried to split them into narrower v64i1 or v16i1
    pieces that each got promoted to vXi8 and then passed in a zmm
    or xmm register. But this crashes when you need to pass more
    pieces than available registers reserved for argument passing.

    The scalarizing done here generates much longer and slower code,
    but is consistent with the behavior of avx2 and earlier targets
    for these types.

    Fixes PR43323. — ctopper / ViewSVN
  3. [X86] Allow masked VBROADCAST instructions to be turned into BLENDM with a broadcast load to avoid a copy.

    The BLENDM instructions allow an 2 sources and an independent
    destination while masked VBROADCAST has the destination tied
    to the source. — ctopper / ViewSVN
  4. [X86] Add support for commuting EVEX VCMP instructons with any immediate value.

    Previously we limited to the EQ/NE/TRUE/FALSE/ORD/UNORD immediates. — ctopper / ViewSVN
  5. [X86] Add test case for missed opportunity to commute a VCMP instruction after unfolding one load in order to fold another load. — ctopper / ViewSVN
  6. [X86] Enable commuting of EVEX VCMP for all immediate values during isel. — ctopper / ViewSVN

rL:372054 - C:372063 - #629 (Sep 16, 2019 9:11:31 PM)

  1. Fix reliance on -flax-vector-conversions in AVX intrinsics headers and
    corresponding tests. — rsmith / ViewSVN
  2. Fix reliance on lax vector conversions in tests for x86 intrinsics. — rsmith / ViewSVN
  3. Remove reliance on lax vector conversions from altivec.h in VSX mode. — rsmith / ViewSVN

rL:372054 - C:372058 - #628 (Sep 16, 2019 7:25:27 PM)

  1. Push lambda scope earlier when transforming lambda expression

    Differential Revision: https://reviews.llvm.org/D66067 — comex / ViewSVN

rL:372054 - C:372055 - #627 (Sep 16, 2019 6:01:58 PM)

  1. [libFuzzer] Always print DSO map on Fuchsia libFuzzer launch

    Fuchsia doesn't have /proc/id/maps, so it relies on the kernel logging system
    to provide the DSO map to be able to symbolize in the context of ASLR. The DSO
    map is logged automatically on Fuchsia when encountering a crash or writing to
    the sanitizer log for the first time in a process. There are several cases
    where libFuzzer doesn't encounter a crash, e.g. on timeouts, OOMs, and when
    configured to print new PCs as they become covered, to name a few. Therefore,
    this change always writes to the sanitizer log on startup to ensure the DSO map
    is available in the log.

    Author: aarongreen
    Differential Revision: https://reviews.llvm.org/D66233 — jakehehrlich / ViewSVN

rL:372054 - C:372055 - #626 (Sep 16, 2019 5:21:55 PM)

  1. [OPENMP] Fix the test, NFC — abataev / ViewSVN
  2. llvm-reduce: Clean out previous test temp/output dir, since it was a dir and now it's used as just a single file — dblaikie / ViewSVN
  3. llvm-reduce: Remove some string copies — dblaikie / ViewSVN
  4. Revert r372035: "[lit] Make internal diff work in pipelines"

    This breaks a Windows bot. — jdenny / ViewSVN
  5. [GlobalISel] Partially revert r371901.

    r371901 was overeager and widenScalarDst() and the like in the legalizer
    attempt to increment the insert point given in order to add new instructions
    after the currently legalizing inst. In cases where the insertion point is not
    exactly the current instruction, then callers need to de-compensate for the
    behaviour by decrementing the insertion iterator before calling them. It's not
    a nice state of affairs, for now just undo the problematic parts of the change. — aemerson / ViewSVN
  6. llvm-reduce: Make tests shell-independent by passing the interpreter on the command line rather than using #! in the test file — dblaikie / ViewSVN
  7. Add libc to path mappings in git-llvm. — dlj / ViewSVN

rL:372043 - C:372040 - #625 (Sep 16, 2019 4:04:55 PM)

  1. [PowerPC] Cust lower fpext v2f32 to v2f64 from extract_subvector v4f32

    Add the missing piece of r372029.
    Somehow when the patch for review D61961 was committed, only the test case
    went in and the code didn't. This of course caused all kinds of build bot
    breaks.
    This patch just adds the code for that patch.

    Author: Lei Huang
    Differential revision: https://reviews.llvm.org/D61961 — nemanjai / ViewSVN
  2. [Remarks] Allow remarks::Format::YAML to take a string table

    It should be allowed to take a string table in case all the strings in
    the remarks point there, but it shouldn't use it during serialization. — thegameg / ViewSVN
  3. [test] Clean up previous raw profile before merging into it

    This fixes a test failure in instrprof-set-file-object-merging.c which
    seems to have been caused by reuse of stale data in old raw profiles. — Vedant Kumar / ViewSVN
  4. [OPENMP]Fix the test, NFC. — abataev / ViewSVN
  5. [Modules][Objective-C] Use complete decl from module when diagnosing missing import

    Summary:
    Otherwise the definition (first found) for ObjCInterfaceDecl's might
    precede the module one, which will eventually lead to crash, since
    diagnoseMissingImport needs one coming from a module.

    This behavior changed after Richard's r342018, which started to look
    into the definition of ObjCInterfaceDecls.

    rdar://problem/49237144

    Reviewers: rsmith, arphaman

    Subscribers: jkorous, dexonsmith, ributzka, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D66982 — Bruno Lopes / ViewSVN
  6. [compiler-rt][crt]  make test case nontrivial in check_cxx_section_exists

    Summary:
    .init_array gets optimized away when building with -O2 and as a result,
    check_cxx_section_exists failed to pass -DCOMPILER_RT_HAS_INITFINI_ARRAY
    when building crtbegin.o and crtend.o, which causes binaries linked with
    them encounter segmentation fault. See https://crbug.com/855759 for
    details. This change prevents .init_array section to be optimized away
    even with -O2 or higher optimization level.

    Subscribers: dberris, mgorny, #sanitizers, llvm-commits

    Tags: #sanitizers, #llvm

    Differential Revision: https://reviews.llvm.org/D67628 — jcai19 / ViewSVN
  7. [clang-tidy] add checks to bugprone-posix-return

    This check now also checks if any calls to pthread_* functions expect negative return values. These functions return either 0 on success or an errno on failure, which is positive only. — jcai19 / ViewSVN

rL:372035 - C:372026 - #624 (Sep 16, 2019 2:29:08 PM)

  1. [lit] Make internal diff work in pipelines

    When using lit's internal shell, RUN lines like the following
    accidentally execute an external `diff` instead of lit's internal
    `diff`:

    ```
    # RUN: program | diff file -
    # RUN: not diff file1 file2 | FileCheck %s
    ```

    Such cases exist now, in `clang/test/Analysis` for example.  We are
    preparing patches to ensure lit's internal `diff` is called in such
    cases, which will then fail because lit's internal `diff` cannot
    currently be used in pipelines and doesn't recognize `-` as a
    command-line option.

    To enable pipelines, this patch moves lit's `diff` implementation into
    an out-of-process script, similar to lit's `cat` implementation.  A
    follow-up patch will implement `-` to mean stdin.

    Reviewed By: probinson, stella.stamenova

    Differential Revision: https://reviews.llvm.org/D66574 — jdenny / ViewSVN

rL:372033 - C:372026 - #623 (Sep 16, 2019 2:22:03 PM)

  1. Revert "Implement std::condition_variable via pthread_cond_clockwait() where available"

    This reverts commit 5e37d7f9ff257ec62d733d3d94b11f03e0fe51ca. — danalbert / ViewSVN

rL:372033 - C:372026 - #622 (Sep 16, 2019 1:45:20 PM)

  1. [NFC] Test commit access — bmahjour / ViewSVN
  2. [Docs] Bug fix for docs homepage

    Removes reference to non-existent Reference Documentation page. — dr87 / ViewSVN

rL:372031 - C:372026 - #621 (Sep 16, 2019 1:28:27 PM)

  1. [Docs] Adds Getting Started/Tutorials, Reference to LLVM docs homepage

    Adds a section for Getting Started/Tutorials and Reference topics to the LLVM docs homepage. — dr87 / ViewSVN

rL:372029 - C:372026 - #620 (Sep 16, 2019 1:11:28 PM)

  1. [PowerPC] Cust lower fpext v2f32 to v2f64 from extract_subvector v4f32

    This is a follow up patch from https://reviews.llvm.org/D57857 to handle
    extract_subvector v4f32.  For cases where we fpext of v2f32 to v2f64 from
    extract_subvector we currently generate on P9 the following:

      lxv 0, 0(3)
      xxsldwi 1, 0, 0, 1
      xscvspdpn 2, 0
      xxsldwi 3, 0, 0, 3
      xxswapd 0, 0
      xscvspdpn 1, 1
      xscvspdpn 3, 3
      xscvspdpn 0, 0
      xxmrghd 0, 0, 3
      xxmrghd 1, 2, 1
      stxv 0, 0(4)
      stxv 1, 0(5)

    This patch custom lower it to the following sequence:

      lxv 0, 0(3)       # load the v4f32 <w0, w1, w2, w3>
      xxmrghw 2, 0, 0   # Produce the following vector <w0, w0, w1, w1>
      xxmrglw 3, 0, 0   # Produce the following vector <w2, w2, w3, w3>
      xvcvspdp 2, 2     # FP-extend to <d0, d1>
      xvcvspdp 3, 3     # FP-extend to <d2, d3>
      stxv 2, 0(5)      # Store <d0, d1> (%vecinit11)
      stxv 3, 0(4)      # Store <d2, d3> (%vecinit4)

    Differential Revision: https://reviews.llvm.org/D61961 — lei / ViewSVN

rL:372025 - C:372026 - #618 (Sep 16, 2019 12:24:31 PM)

  1. Open fstream files in O_CLOEXEC mode when possible.

    Reviewers: EricWF, mclow.lists, ldionne

    Reviewed By: ldionne

    Subscribers: smeenai, dexonsmith, christof, ldionne, libcxx-commits

    Tags: #libc

    Differential Revision: https://reviews.llvm.org/D59839 — danalbert / ViewSVN
  2. do not emit -Wunused-macros warnings in -frewrite-includes mode (PR15614)

    -frewrite-includes calls PP.SetMacroExpansionOnlyInDirectives() to avoid
    macro expansions that are useless in that mode, but this can lead
    to -Wunused-macros false positives. As -frewrite-includes does not emit
    normal warnings, block -Wunused-macros too.

    Differential Revision: https://reviews.llvm.org/D65371 — llunak / ViewSVN
  3. [Coverage] Speed up file-based queries for coverage info, NFC

    Speed up queries for coverage info in a file by reducing the amount of
    time spent determining whether a function record corresponds to a file.

    This gives a 36% speedup when generating a coverage report for `llc`.
    The reduction is entirely in user time.

    rdar://54758110

    Differential Revision: https://reviews.llvm.org/D67575 — Vedant Kumar / ViewSVN
  4. [Coverage] Assert that filenames in a TU are unique, NFC — Vedant Kumar / ViewSVN

rL:372021 - C:372015 - #617 (Sep 16, 2019 12:01:32 PM)

  1. [LTO][Legacy] Add new C inferface to query libcall functions

    Summary:
    This is needed to implemented the same approach as lld (implemented in r338434)
    for how to handling symbols that can be generated by LTO code generator
    but not present in the symbol table for linker that uses legacy C APIs.

    libLTO is in charge of providing the list of symbols. Linker is in
    charge of implementing the eager loading from static libraries using
    the list of symbols.

    rdar://problem/52853974

    Reviewers: tejohnson, bd1976llvm, deadalnix, espindola

    Reviewed By: tejohnson

    Subscribers: emaste, arichardson, hiraditya, MaskRay, dang, kledzik, mehdi_amini, inglorion, jkorous, dexonsmith, ributzka, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67568 — steven_wu / ViewSVN
  2. [PGO] Use linkonce_odr linkage for __profd_ variables in comdat groups

    This fixes relocations against __profd_ symbols in discarded sections,
    which is PR41380.

    In general, instrumentation happens very early, and optimization and
    inlining happens afterwards. The counters for a function are calculated
    early, and after inlining, counters for an inlined function may be
    widely referenced by other functions.

    For C++ inline functions of all kinds (linkonce_odr &
    available_externally mainly), instr profiling wants to deduplicate these
    __profc_ and __profd_ globals. Otherwise the binary would be quite
    large.

    I made __profd_ and __profc_ comdat in r355044, but I chose to make
    __profd_ internal. At the time, I was only dealing with coverage, and in
    that case, none of the instrumentation needs to reference __profd_.
    However, if you use PGO, then instrumentation passes add calls to
    __llvm_profile_instrument_range which reference __profd_ globals. The
    solution is to make these globals externally visible by using
    linkonce_odr linkage for data as was done for counters.

    This is safe because PGO adds a CFG hash to the names of the data and
    counter globals, so if different TUs have different globals, they will
    get different data and counter arrays.

    Reviewers: xur, hans

    Differential Revision: https://reviews.llvm.org/D67579 — rnk / ViewSVN

rL:372019 - C:372015 - #616 (Sep 16, 2019 11:32:17 AM)

  1. [ARM][Codegen] Autogenerate arm-cgp-casts.ll test.

    Apparently it got broken by r372009 while i thought it was r372012. — lebedevri / ViewSVN

rL:372013 - C:372015 - #615 (Sep 16, 2019 10:48:10 AM)

  1. Implement std::condition_variable via pthread_cond_clockwait() where available

    std::condition_variable is currently implemented via
    pthread_cond_timedwait() on systems that use pthread. This is
    problematic, since that function waits by default on CLOCK_REALTIME
    and libc++ does not provide any mechanism to change from this
    default.

    Due to this, regardless of if condition_variable::wait_until() is
    called with a chrono::system_clock or chrono::steady_clock parameter,
    condition_variable::wait_until() will wait using CLOCK_REALTIME. This
    is not accurate to the C++ standard as calling
    condition_variable::wait_until() with a chrono::steady_clock parameter
    should use CLOCK_MONOTONIC.

    This is particularly problematic because CLOCK_REALTIME is a bad
    choice as it is subject to discontinuous time adjustments, that may
    cause condition_variable::wait_until() to immediately timeout or wait
    indefinitely.

    This change fixes this issue with a new POSIX function,
    pthread_cond_clockwait() proposed on
    http://austingroupbugs.net/view.php?id=1216. The new function is
    similar to pthread_cond_timedwait() with the addition of a clock
    parameter that allows it to wait using either CLOCK_REALTIME or
    CLOCK_MONOTONIC, thus allowing condition_variable::wait_until() to
    wait using CLOCK_REALTIME for chrono::system_clock and CLOCK_MONOTONIC
    for chrono::steady_clock.

    pthread_cond_clockwait() is implemented in glibc (2.30 and later) and
    Android's bionic (Android API version 30 and later).

    This change additionally makes wait_for() and wait_until() with clocks
    other than chrono::system_clock use CLOCK_MONOTONIC.<Paste> — danalbert / ViewSVN
  2. [Clang][Codegen] Disable arm_acle.c test.

    This test is broken by design. Clang codegen tests should not depend
    on llvm middle-end behaviour, they should *only* test clang codegen.
    Yet this test runs whole optimization pipeline.
    I've really tried to fix it, but there isn't just a few things
    that depend on passes, but everything there does. — lebedevri / ViewSVN
  3. [Clang][Codegen] Relax available-externally-suppress.c test

    That test is broken by design.
    It depends on llvm middle-end behavior.
    No clang codegen test should be doing that.
    This one is salvageable by relaxing check lines. — lebedevri / ViewSVN
  4. [X86][AVX] matchShuffleWithSHUFPD - add support for zeroable operands

    Determine if all of the uses of LHS/RHS operands can be replaced with a zero vector. — rksimon / ViewSVN
  5. [ARM] A predicate cast of a predicate cast is a predicate cast

    The adds some very basic folding of PREDICATE_CASTS, removing cases when they
    are chained together. These would already be removed eventually, as these are
    lowered to copies. This just allows it to happen earlier, which can help other
    simplifications.

    Differential Revision: https://reviews.llvm.org/D67591 — dmgreen / ViewSVN
  6. [OPENMP]Fix parsing/sema for function templates with declare simd.

    Need to return original declaration group with FunctionTemplateDecl, not
    the inner FunctionDecl, to correctly handle parsing of directives with
    the templates parameters. — abataev / ViewSVN
  7. [SimplifyCFG] FoldTwoEntryPHINode(): consider *total* speculation cost, not per-BB cost

    Summary:
    Previously, if the threshold was 2, we were willing to speculatively
    execute 2 cheap instructions in both basic blocks (thus we were willing
    to speculatively execute cost = 4), but weren't willing to speculate
    when one BB had 3 instructions and other one had no instructions,
    even thought that would have total cost of 3.

    This looks inconsistent to me.
    I don't think `cmov`-like instructions will start executing
    until both of it's inputs are available: https://godbolt.org/z/zgHePf
    So i don't see why the existing behavior is the correct one.

    Also, let's add it's own `cl::opt` for this threshold,
    with default=4, so it is not stricter than the previous threshold:
    will allow to fold when there are 2 BB's each with cost=2.
    And since the logic has changed, it will also allow to fold when
    one BB has cost=3 and other cost=1, or there is only one BB with cost=4.

    This is an alternative solution to D65148:
    This fix is mainly motivated by `signbit-like-value-extension.ll` test.
    That pattern 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).
    That branch is not predictable, and it is within the innermost loop,
    so the fact that that pattern ends up being stuck with a branch
    instead of `select` (i.e. `CMOV` for x86) is unlikely to be beneficial.

    This has great results on the final assembly (vanilla test-suite + RawSpeed): (metric pass - D67240)
    | metric                                 |     old |     new | delta |      % |
    | x86-mi-counting.NumMachineFunctions    |   37720 |   37721 |     1 |  0.00% |
    | x86-mi-counting.NumMachineBasicBlocks  |  773545 |  771181 | -2364 | -0.31% |
    | x86-mi-counting.NumMachineInstructions | 7488843 | 7486442 | -2401 | -0.03% |
    | x86-mi-counting.NumUncondBR            |  135770 |  135543 |  -227 | -0.17% |
    | x86-mi-counting.NumCondBR              |  423753 |  422187 | -1566 | -0.37% |
    | x86-mi-counting.NumCMOV                |   24815 |   25731 |   916 |  3.69% |
    | x86-mi-counting.NumVecBlend            |      17 |      17 |     0 |  0.00% |

    We significantly decrease basic block count, notably decrease instruction count,
    significantly decrease branch count and very significantly increase `cmov` count.

    Performance-wise, unsurprisingly, this has great effect on
    target RawSpeed benchmark. I'm seeing 5 **major** improvements:
    ```
    Benchmark                                                                                             Time             CPU      Time Old      Time New       CPU Old       CPU New
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Samsung/NX3000/_3184416.SRW/threads:8/process_time/real_time_pvalue                                 0.0000          0.0000      U Test, Repetitions: 49 vs 49
    Samsung/NX3000/_3184416.SRW/threads:8/process_time/real_time_mean                                  -0.3064         -0.3064      226.9913      157.4452      226.9800      157.4384
    Samsung/NX3000/_3184416.SRW/threads:8/process_time/real_time_median                                -0.3057         -0.3057      226.8407      157.4926      226.8282      157.4828
    Samsung/NX3000/_3184416.SRW/threads:8/process_time/real_time_stddev                                -0.4985         -0.4954        0.3051        0.1530        0.3040        0.1534
    Kodak/DCS760C/86L57188.DCR/threads:8/process_time/real_time_pvalue                                  0.0000          0.0000      U Test, Repetitions: 49 vs 49
    Kodak/DCS760C/86L57188.DCR/threads:8/process_time/real_time_mean                                   -0.1747         -0.1747       80.4787       66.4227       80.4771       66.4146
    Kodak/DCS760C/86L57188.DCR/threads:8/process_time/real_time_median                                 -0.1742         -0.1743       80.4686       66.4542       80.4690       66.4436
    Kodak/DCS760C/86L57188.DCR/threads:8/process_time/real_time_stddev                                 +0.6089         +0.5797        0.0670        0.1078        0.0673        0.1062
    Sony/DSLR-A230/DSC08026.ARW/threads:8/process_time/real_time_pvalue                                 0.0000          0.0000      U Test, Repetitions: 49 vs 49
    Sony/DSLR-A230/DSC08026.ARW/threads:8/process_time/real_time_mean                                  -0.1598         -0.1598      171.6996      144.2575      171.6915      144.2538
    Sony/DSLR-A230/DSC08026.ARW/threads:8/process_time/real_time_median                                -0.1598         -0.1597      171.7109      144.2755      171.7018      144.2766
    Sony/DSLR-A230/DSC08026.ARW/threads:8/process_time/real_time_stddev                                +0.4024         +0.3850        0.0847        0.1187        0.0848        0.1175
    Canon/EOS 77D/IMG_4049.CR2/threads:8/process_time/real_time_pvalue                                  0.0000          0.0000      U Test, Repetitions: 49 vs 49
    Canon/EOS 77D/IMG_4049.CR2/threads:8/process_time/real_time_mean                                   -0.0550         -0.0551      280.3046      264.8800      280.3017      264.8559
    Canon/EOS 77D/IMG_4049.CR2/threads:8/process_time/real_time_median                                 -0.0554         -0.0554      280.2628      264.7360      280.2574      264.7297
    Canon/EOS 77D/IMG_4049.CR2/threads:8/process_time/real_time_stddev                                 +0.7005         +0.7041        0.2779        0.4725        0.2775        0.4729
    Canon/EOS 5DS/2K4A9929.CR2/threads:8/process_time/real_time_pvalue                                  0.0000          0.0000      U Test, Repetitions: 49 vs 49
    Canon/EOS 5DS/2K4A9929.CR2/threads:8/process_time/real_time_mean                                   -0.0354         -0.0355      316.7396      305.5208      316.7342      305.4890
    Canon/EOS 5DS/2K4A9929.CR2/threads:8/process_time/real_time_median                                 -0.0354         -0.0356      316.6969      305.4798      316.6917      305.4324
    Canon/EOS 5DS/2K4A9929.CR2/threads:8/process_time/real_time_stddev                                 +0.0493         +0.0330        0.3562        0.3737        0.3563        0.3681
    ```

    That being said, it's always best-effort, so there will likely
    be cases where this worsens things.

    Reviewers: efriedma, craig.topper, dmgreen, jmolloy, fhahn, Carrot, hfinkel, chandlerc

    Reviewed By: jmolloy

    Subscribers: xbolva00, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67318 — lebedevri / ViewSVN
  8. [InstCombine] remove unneeded one-use checks for icmp fold

    Related folds were added in:
    rL125734
    ...the code comment about register pressure is discussed in
    more detail in:
    https://bugs.llvm.org/show_bug.cgi?id=2698

    But 10 years later, perf testing bzip2 with this change now
    shows a slight (0.2% average) improvement on Haswell although
    that's probably within test noise.

    Given that this is IR canonicalization, we shouldn't be worried
    about register pressure though; the backend should be able to
    adjust for that as needed.

    This is part of solving PR43310 the theoretically right way:
    https://bugs.llvm.org/show_bug.cgi?id=43310
    ...ie, if we don't cripple basic transforms, then we won't
    need to add special-case code to detect larger patterns.

    rL371940 and rL371981 are related patches in this series. — spatel / ViewSVN

rL:372004 - C:371985 - #614 (Sep 16, 2019 9:11:47 AM)

  1. [clangd] Simplify semantic highlighting visitor

    Summary:
    - Functions to compute highlighting kinds for things are separated from
      the ones that add highlighting tokens.
      This keeps each of them more focused on what they're doing: getting
      locations and figuring out the kind of the entity, correspondingly.

    - Less special cases in visitor for various nodes.

    This change is an NFC.

    Reviewers: hokein

    Reviewed By: hokein

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67341 — ibiryukov / ViewSVN
  2. [InstCombine] move tests for icmp+add; NFC — spatel / ViewSVN
  3. [ARM] Add patterns for BSWAP intrinsic on MVE

    BSWAP can use the VREV instruction on MVE to produce better results than
    expanding. — oliverlars / ViewSVN
  4. [ARM] Add patterns for bitreverse intrinsic on MVE

    BITREVERSE can use the VBRSR which will reverse and right shift.
    Shifting right by 0 will just reverse the bits. — oliverlars / ViewSVN
  5. [ARM] Lower CTTZ on MVE

    Lower CTTZ on MVE using VBRSR and VCLS which will reverse the bits and
    count the leading zeros, equivalent to a count trailing zeros (CTTZ). — oliverlars / ViewSVN
  6. [ARM] Add patterns for CTLZ on MVE

    CTLZ intrinsic can use the VCLS instruction on MVE, which produces
    better results than expanding. — oliverlars / ViewSVN
  7. [ExecutionEngine] Don't dereference a dyn_cast result. NFCI.

    The static analyzer is warning about potential null dereferences of dyn_cast<> results - in these cases we can safely use cast<> directly as we know that these cases should all be the correct type, which is why its working atm and anyway cast<> will assert if they aren't. — rksimon / ViewSVN

rL:371996 - C:371985 - #613 (Sep 16, 2019 8:17:48 AM)

  1. [libFuzzer] Remove unused version of FuzzedDataProvider.h.

    Summary: The actual version lives in compiler-rt/include/fuzzer/.

    Reviewers: Dor1s

    Reviewed By: Dor1s

    Subscribers: delcypher, #sanitizers, llvm-commits

    Tags: #llvm, #sanitizers

    Differential Revision: https://reviews.llvm.org/D67623 — dor1s / ViewSVN
  2. [LV] Add ARM MVE tail-folding tests

    Now that the vectorizer can do tail-folding (rL367592), and the ARM backend
    understands MVE masked loads/stores (rL371932), it's time to add the MVE
    tail-folding equivalent of the X86 tests that I added. — sjoerdmeijer / ViewSVN
  3. [SystemZ]  Call erase() on the right MBB in SystemZTargetLowering::emitSelect()

    Since MBB was split *before* MI, the MI(s) will reside in JoinMBB (MBB) at
    the point of erasing them, so calling StartMBB->erase() is actually wrong,
    although it is "working" by all appearances.

    Review: Ulrich Weigand — jonpa / ViewSVN
  4. [NFC] remove unused functions

    Reviewers: courbet

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67616 — gchatelet / ViewSVN
  5. AMDGPU/GlobalISel: Fail select of G_INSERT non-32-bit source

    This was producing an illegal copy which would hit an assert
    later. Error on selection for now until this is implemented. — arsenm / ViewSVN
  6. AMDGPU/GlobalISel: Fix some broken run lines — arsenm / ViewSVN
  7. AMDGPU/GlobalISel: Fix RegBankSelect for G_FRINT and G_FCEIL — arsenm / ViewSVN
  8. AMDGPU/GlobalISel: Remove another illegal select test — arsenm / ViewSVN
  9. [X86][NFC] Add a `use-aa` feature.

    Summary:
    This allows enabling useaa on the command-line and will allow enabling the
    feature on a per-CPU basis where benchmarking shows improvements.

    This is modelled after the ARM/AArch64 target.

    Reviewers: RKSimon, andreadb, craig.topper

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67266 — courbet / ViewSVN
  10. [InstCombine] add/move tests for icmp with add operand; NFC — spatel / ViewSVN

rL:371984 - C:371985 - #612 (Sep 16, 2019 7:01:44 AM)

  1. [clangd][vscode] update the development doc. — hokein / ViewSVN
  2. Move some definitions from Sema to Basic to fix shared libs build

    r371875 moved some functionality around to a Basic header file, but
    didn't move its definitions as well.  This patch moves some things
    around so that shared library building can work. — erichkeane / ViewSVN
  3. [docs][llvm-strings] Write llvm-strings documentation

    Previously we only had a stub document.

    Reviewed by: MaskRay

    Differential Revision: https://reviews.llvm.org/D67554 — jhenderson / ViewSVN
  4. [docs][llvm-size] Write llvm-size documentation

    Previously we only had a stub document.

    Reviewed by: serge-sans-paille, MaskRay

    Differential Revision: https://reviews.llvm.org/D67555 — jhenderson / ViewSVN
  5. [ARM] Fold VCMP into VPT

    MVE has VPT instructions, which perform the duties of both a VCMP and a VPST in
    a single instruction, performing the compare and starting the VPT block in one.
    This teaches the MVEVPTBlockPass to fold them, searching back through the
    basicblock for a valid VCMP and creating the VPT from its operands.

    There are some changes to the VPT instructions to accommodate this, altering
    the order of the operands to match the VCMP better, and changing P0 register
    defs to be VPR defs, as is used in other places.

    Differential Revision: https://reviews.llvm.org/D66577 — dmgreen / ViewSVN
  6. [InstCombine] remove unneeded one-use checks for icmp fold

    This fold and several others were added in:
    rL125734 <https://reviews.llvm.org/rL125734>
    ...with no explanation for the one-use checks other than the code
    comments about register pressure.

    Given that this is IR canonicalization, we shouldn't be worried
    about register pressure though; the backend should be able to
    adjust for that as needed.

    This is part of solving PR43310 the theoretically right way:
    https://bugs.llvm.org/show_bug.cgi?id=43310
    ...ie, if we don't cripple basic transforms, then we won't
    need to add special-case code to detect larger patterns.

    rL371940 is a related patch in this series. — spatel / ViewSVN
  7. [clangd] Bump vscode-clangd v0.0.17

    CHANGELOG:
    - added semantic highlighting support (under the clangd.semanticHighlighting
      flag);
    - better error message when clangd fails to execute refactoring-like
      actions;
    - improved the readme doc; — hokein / ViewSVN
  8. [InstCombine] add icmp tests with extra uses; NFC — spatel / ViewSVN
  9. [InstCombine] fix comments to match code; NFC

    This blob was written before match() existed, so it
    could probably be reduced significantly.

    But I suspect it isn't well tested, so tests would have
    to be added to reduce risk from logic changes. — spatel / ViewSVN

rL:371977 - C:371971 - #611 (Sep 16, 2019 4:52:36 AM)

  1. gn build: Merge r371976 — nico / ViewSVN
  2. Implement semantic selections.

    Summary:
    For a given cursor position, it returns ranges that are interesting to the user.
    Currently the semantic ranges correspond to the nodes of the syntax trees.

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67358 — usaxena95 / ViewSVN
  3. [VPlanSLP] Don't dereference a cast_or_null<VPInstruction> result. NFCI.

    The static analyzer is warning about a potential null dereference of the cast_or_null result, I've split the cast_or_null check from the ->getUnderlyingInstr() call to avoid this, but it appears that we weren't seeing any null pointers in the dumped bundles in the first place. — rksimon / ViewSVN
  4. [SLPVectorizer] Assert that we find a LastInst to silence analyzer null dereference warning. NFCI. — rksimon / ViewSVN
  5. [SLPVectorizer] Don't dereference a dyn_cast result. NFCI.

    The static analyzer is warning about potential null dereferences of dyn_cast<> results - in these cases we can safely use cast<> directly as we know that these cases should all be the correct type, which is why its working atm and anyway cast<> will assert if they aren't. — rksimon / ViewSVN
  6. Added return statement to fix compile and build warning:

    llvm-rtdyld.cpp:966:7: warning: variable ‘Result’ set but not used — sjoerdmeijer / ViewSVN
  7. [clangd] Fix a crash when renaming operator.

    Summary:
    The renamelib uses a tricky way to calculate the end location by relying
    on decl name, this is incorrect for the overloaded operator (the name is
    "operator++" instead of "++"), which will cause out-of-file offset.

    We also disable renaming operator symbol, this case is tricky, and
    renamelib doesnt handle it properly.

    Reviewers: ilya-biryukov

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67607 — hokein / ViewSVN

rL:371967 - C:371969 - #610 (Sep 16, 2019 3:16:39 AM)

  1. Change signature of __builtin_rotateright64 back to unsigned

    The signature of __builtin_rotateright64 was by misstake changed from
    unsigned to signed in r360863, this patch will change it back to
    unsigned as intended.

    This fixes pr43309

    Reviewers: efriedma, hans

    Reviewed By: hans

    Differential Revision: https://reviews.llvm.org/D67606 — karka / ViewSVN
  2. Fix the rst doc, unbreak buildbot. — hokein / ViewSVN
  3. [SVE][Inline-Asm] Add constraints for SVE predicate registers

    Summary:
    Adds the following inline asm constraints for SVE:
      - Upl: One of the low eight SVE predicate registers, P0 to P7 inclusive
      - Upa: SVE predicate register with full range, P0 to P15

    Reviewers: t.p.northover, sdesmalen, rovka, momchil.velikov, cameron.mcinally, greened, rengolin

    Reviewed By: rovka

    Subscribers: javed.absar, tschuett, rkruppe, psnobl, cfe-commits, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D66524 — kmclaughlin / ViewSVN
  4. gn build: Merge r371965 — nico / ViewSVN

rL:371961 - C:371934 - #609 (Sep 16, 2019 2:35:39 AM)

  1. [clang-tidy] performance-inefficient-vector-operation: Support proto repeated field

    Summary:
    Finds calls that add element to protobuf repeated field in a loop
    without calling Reserve() before the loop. Calling Reserve() first can avoid
    unnecessary memory reallocations.

    A new option EnableProto is added to guard this feature.

    Patch by Cong Liu!

    Reviewers: gribozavr, alexfh, hokein, aaron.ballman

    Reviewed By: hokein

    Subscribers: lebedev.ri, xazax.hun, Eugene.Zelenko, cfe-commits

    Tags: #clang, #clang-tools-extra

    Differential Revision: https://reviews.llvm.org/D67135 — hokein / ViewSVN

rL:371961 - C:371934 - #608 (Sep 16, 2019 12:45:23 AM)

  1. gn build: Merge r371959 — nico / ViewSVN
  2. [AArch64] Some more FP16 FMA pattern matching

    After our previous machinecombiner exercises (rL371321, rL371818, rL371833), we
    were still missing a few FP16 FMA patterns.

    Differential Revision: https://reviews.llvm.org/D67576 — sjoerdmeijer / ViewSVN
  3. [SystemZ]  Merge the SystemZExpandPseudo pass into SystemZPostRewrite.

    SystemZExpandPseudo:s only job was to expand LOCRMux instructions into jump
    sequences. This needs to be done if expandLOCRPseudo() or expandSELRPseudo()
    fails to find a legal opcode (all registers "high" or "low"). This task has
    now been moved to SystemZPostRewrite while removing the SystemZExpandPseudo
    pass.

    It is in fact preferred to expand these pseudos directly after register
    allocation in SystemZPostRewrite since the hinted register combinations are
    then not subject to later optimizations.

    Review: Ulrich Weigand
    https://reviews.llvm.org/D67432 — jonpa / ViewSVN

rL:371955 - C:371934 - #607 (Sep 15, 2019 9:22:08 PM)

  1. AMDGPU/GlobalISel: Remove illegal select tests

    These fail in a release build. — arsenm / ViewSVN

rL:371954 - C:371934 - #606 (Sep 15, 2019 6:17:51 PM)

  1. AMDGPU/GlobalISel: Select SMRD loads for more types — arsenm / ViewSVN
  2. AMDGPU/GlobalISel: RegBankSelect for kill — arsenm / ViewSVN
  3. AMDGPU/GlobalISel: Legalize s1 source G_[SU]ITOFP — arsenm / ViewSVN
  4. AMDGPU/GlobalISel: Set type on vgpr live in special arguments

    Fixes assertion with workitem ID intrinsics used in non-kernel
    functions. — arsenm / ViewSVN
  5. AMDGPU/GlobalISel: Select S16->S32 fptoint — arsenm / ViewSVN
  6. AMDGPU/GlobalISel: Select s32->s16 G_[US]ITOFP — arsenm / ViewSVN

rL:371948 - C:371934 - #605 (Sep 15, 2019 5:22:06 PM)

  1. AMDGPU/GlobalISel: Fix VALU s16 fneg — arsenm / ViewSVN

rL:371942 - C:371934 - #604 (Sep 15, 2019 4:20:59 PM)

  1. [Attributor] Heap-To-Stack Conversion

    D53362 gives a prototype heap-to-stack conversion pass. With addition of new attributes in the attributor, this can now be revisted and improved. This will place it in the Attributor to make it easier to use new attributes (eg. nofree, nosync, willreturn, etc.) and other attributor features.

    Reviewers: jdoerfert, uenoku, hfinkel, efriedma

    Subscribers: lebedev.ri, xbolva00, hiraditya, llvm-commits

    Differential Revision: https://reviews.llvm.org/D65408 — sstefan / ViewSVN

rL:371940 - C:371934 - #603 (Sep 15, 2019 2:23:40 PM)

  1. Commit missing part of "Split many_tls_keys.cpp into two tests"

    https://reviews.llvm.org/D67428

    This change was lost due to a file rename and modification. — kamil / ViewSVN
  2. [InstCombine] remove unneeded one-use checks for icmp fold

    This fold and several others were added in:
    rL125734
    ...with no explanation for the one-use checks other than the code
    comments about register pressure.

    Given that this is IR canonicalization, we shouldn't be worried
    about register pressure though; the backend should be able to
    adjust for that as needed.

    There are similar checks as noted with the TODO comments. I'm
    hoping to remove those restrictions too, but if any of these
    does cause a regression, it should be easier to correct by making
    small, individual commits.

    This is part of solving PR43310 the theoretically right way:
    https://bugs.llvm.org/show_bug.cgi?id=43310
    ...ie, if we don't cripple basic transforms, then we won't
    need to add special-case code to detect larger patterns. — spatel / ViewSVN

rL:371939 - C:371934 - #602 (Sep 15, 2019 1:17:13 PM)

  1. [InstCombine] add icmp tests with extra uses; NFC — spatel / ViewSVN
  2. [PowerPC][NFC] Add a testcase for fdiv expansion.

    Pre-commit for following patch. — jsji / ViewSVN

rL:371937 - C:371934 - #601 (Sep 15, 2019 10:01:48 AM)

  1. [GlobalISel] findGISelOptimalMemOpLowering - remove dead initalization. NFCI.

    Fixes static analyzer warning that "Value stored to 'NewTySize' during its initialization is never read". — rksimon / ViewSVN
  2. [LoadStoreVectorizer] vectorizeLoadChain - ensure we find a valid Type down the load chain. NFCI.

    Silence static analyzer uninitialized variable warning by setting the LoadTy to null and then asserting we find a real value. — rksimon / ViewSVN

rL:371935 - C:371934 - #600 (Sep 15, 2019 9:30:43 AM)

  1. InterleavedLoadCombine - merge isa<> and dyn_cast<> duplicates. NFCI.

    Silence static analyzer null dereference warning of *dyn_cast<BinaryOperator> by merging with the isa<BinaryOperator> above. — rksimon / ViewSVN
  2. [OpenMP] Fix OMPClauseReader::readClause() uninitialized variable warning. NFCI.

    Fixes static analyzer uninitialized variable warning for the OMPClause - the function appears to cover all cases, but I've added an assertion to make sure. — rksimon / ViewSVN
  3. [DebugInfo] Don't dereference a dyn_cast<PDBSymbolData> result. NFCI.

    The static analyzer is warning about a potential null dereference - but as we're in DataMemberLayoutItem we should be able to guarantee that the Symbol is a PDBSymbolData type, allowing us to use cast<PDBSymbolData> - and if not assert will fire for us. — rksimon / ViewSVN

rL:371932 - C:371924 - #599 (Sep 15, 2019 7:53:55 AM)

  1. [ARM] Masked loads and stores

    Masked loads and store fit naturally with MVE, the instructions being easily
    predicated. This adds lowering for the simple cases of masked loads and stores.
    It does not yet deal with widening/narrowing or pre/post inc, and so is
    currently behind an option.

    The llvm masked load intrinsic will accept a "passthru" value, dictating the
    values used for the zero masked lanes. In MVE the instructions write 0 to the
    zero predicated lanes, so we need to match a passthru that isn't 0 (or undef)
    with a select instruction to pull in the correct data after the load.

    Differential Revision: https://reviews.llvm.org/D67186 — dmgreen / ViewSVN

rL:371923 - C:371924 - #595 (Sep 14, 2019 12:41:12 PM)

  1. Add debug check for null pointers passed to <string_view> — ericwf / ViewSVN
  2. [Diagnostics] Added silence note for -Wsizeof-array-div; suggest extra parens — xbolva00 / ViewSVN

rL:371923 - C:371920 - #594 (Sep 14, 2019 10:34:35 AM)

  1. [TargetLowering] SimplifyDemandedBits - add EXTRACT_SUBVECTOR support.

    Call SimplifyDemandedBits on the source vector. — rksimon / ViewSVN

rL:371921 - C:371920 - #593 (Sep 14, 2019 8:00:53 AM)

  1. [InstSimplify] simplifyUnsignedRangeCheck(): handle few tautological cases (PR43251)

    Summary:
    This is split off from D67356, since these cases produce a constant,
    no real need to keep them in instcombine.

    Alive proofs:
    https://rise4fun.com/Alive/u7Fk
    https://rise4fun.com/Alive/4lV

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

    Reviewers: spatel, nikic, xbolva00

    Reviewed By: spatel

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67498 — lebedevri / ViewSVN

rL:371916 - C:371920 - #592 (Sep 14, 2019 1:31:49 AM)

  1. [clang-scan-deps] Add -M to work around -MT issue after r371918

    gcc will complain if -MT is used but neither -M nor -MM is specified:

    > cc1: error: to generate dependencies you must specify either -M or -MM

    r371918 changed our behavior to match GCC, but apparently
    clang-scan-deps is not happy. — maskray / ViewSVN

rL:371916 - C:371918 - #591 (Sep 13, 2019 11:50:52 PM)

  1. [Driver] Fix multiple bugs related to dependency file options: -M -MM -MD -MMD -MT -MQ

    -M -o test.i => dependency file is test.d, not test.i
    -MM -o test.i => dependency file is test.d, not test.i
    -M -MMD => bogus warning -Wunused-command-line-argument
    -M MT dummy => -w not rendered — maskray / ViewSVN

rL:371916 - C:371917 - #590 (Sep 13, 2019 10:35:28 PM)

  1. [Driver] Improve Clang::getDependencyFileName and its tests after rC371853

    The test file name metadata-with-dots.c is confusing because -MD and -MMD
    have nothing to do with metadata. — maskray / ViewSVN

rL:371916 - C:371906 - #589 (Sep 13, 2019 9:00:02 PM)

  1. [ScheduleDAGMILive] Fix typo in comment.

    Differential Revision: https://reviews.llvm.org/D67478 — xmj / ViewSVN
  2. [Attributor][Fix] Use right type to replace expressions

    Summary: This should be obsolete once the functionality in D66967 is integrated.

    Reviewers: uenoku, sstefan1

    Subscribers: hiraditya, bollu, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67231 — jdoerfert / ViewSVN

rL:371914 - C:371906 - #588 (Sep 13, 2019 7:08:00 PM)

  1. [llvm-objcopy] Ignore -B --binary-architecture=

    GNU objcopy documents that -B is only useful with architecture-less
    input (i.e. "binary" or "ihex"). After D67144, -O defaults to -I, and
    -B is essentially a NOP.

    * If -O is binary/ihex, GNU objcopy ignores -B.
    * If -O is elf*, -B provides the e_machine field in GNU objcopy.

    So to convert a blob to an ELF, `-I binary -B i386:x86-64 -O elf64-x86-64` has to be specified.

    `-I binary -B i386:x86-64 -O elf64-x86-64` creates an ELF with its
    e_machine field set to EM_NONE in GNU objcopy, but a regular x86_64 ELF
    in elftoolchain elfcopy. Follow the elftoolchain approach (ignoring -B)
    to simplify code. Users that expect their command line portable should
    specify -B.

    Reviewed By: jhenderson

    Differential Revision: https://reviews.llvm.org/D67215 — maskray / ViewSVN
  2. [llvm-objcopy] Default --output-target to --input-target when unspecified

    Fixes PR42171.

    In GNU objcopy, if -O (--output-target) is not specified, the value is
    copied from -I (--input-target).

    ```
    objcopy -I binary -B i386:x86-64 a.txt b       # b is copied from a.txt
    llvm-objcopy -I binary -B i386:x86-64 a.txt b  # b is an x86-64 object file
    ```

    This patch changes our behavior to match GNU. With this change, we can
    delete code related to -B handling (D67215).

    Reviewed By: jakehehrlich

    Differential Revision: https://reviews.llvm.org/D67144 — maskray / ViewSVN
  3. [llvm-ar] Uncapitalize error messages and delete full stop

    Most GNU binutils don't append full stops in error messages. This
    convention has been adopted by a bunch of LLVM binary utilities. Make
    llvm-ar follow the convention as well.

    Reviewed By: grimar

    Differential Revision: https://reviews.llvm.org/D67558 — maskray / ViewSVN
  4. [llvm-objcopy] Add support for response files in llvm-strip and llvm-objcopy

    Summary: Addresses https://bugs.llvm.org/show_bug.cgi?id=42671

    Reviewers: jhenderson, espindola, alexshap, rupprecht

    Reviewed By: jhenderson

    Subscribers: seiya, emaste, arichardson, jakehehrlich, MaskRay, abrachet, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D65372 — pozulp / ViewSVN

rL:371901 - C:371904 - #585 (Sep 13, 2019 3:11:13 PM)

  1. Make test check position independent as they sometimes come out reversed. NFCI. — dyung / ViewSVN
  2. [clang-scan-deps] Fix for headers having the same name as a directory

    Scan deps tool crashes when called on a C++ file, containing an include
    that has the same name as a directory.
    The tool crashes since it finds foo/dir and tries to read that as a file and fails.

    Patch by: kousikk (Kousik Kumar)

    Differential Revision: https://reviews.llvm.org/D67091 — arphaman / ViewSVN
  3. [GlobalISel] Fix insertion point of new instructions to be after PHIs.

    For some reason we sometimes insert new instructions one instruction before
    the first non-PHI when legalizing. This can result in having non-PHI
    instructions before PHIs, which mean that PHI elimination doesn't catch them.

    Differential Revision: https://reviews.llvm.org/D67570 — aemerson / ViewSVN
  4. [NFC][libLTO] Rearrange declaration in lto.h

    Summary:
    Rearrange the function declaration in lto.h so they falls in the correct
    doxygen group.

    Reviewers: tejohnson, bd1976llvm, deadalnix

    Reviewed By: tejohnson

    Subscribers: mehdi_amini, inglorion, jkorous, dexonsmith, ributzka, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67565 — steven_wu / ViewSVN

rL:371898 - C:371897 - #584 (Sep 13, 2019 2:17:09 PM)

  1. Add dependency from Orc to Passes

    Summary: Orc uses registerFunctionAnalyses that's defined in Passes.

    Reviewers: dblaikie

    Subscribers: mcrosier, bixia, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67477 — sanjoy / ViewSVN
  2. Fix test to use %t for newly created files.

    This is both for consistency with other `mkdir`s in tests, and
    fixing permission issues with the non-temporary cwd during testing (they
    are not always writable). — timshen / ViewSVN
  3. [llvm-opt-report] Improve error handling

    * std::move the error extracted from the parsing creation to avoid asserts
    * print a newline after the error message
    * create the parser from the metadata — thegameg / ViewSVN
  4. Fix C++03 build failures due to >> — ericwf / ViewSVN
  5. [AArch64][GlobalISel] Tail call memory intrinsics

    Because memory intrinsics are handled differently than other calls, we need to
    check them for tail call eligiblity in the legalizer. This allows us to still
    inline them when it's beneficial to do so, but also tail call when possible.

    This adds simple tail calling support for when the intrinsic is followed by a
    return.

    It ports the attribute checks from `TargetLowering::isInTailCallPosition` into
    a similarly-named function in LegalizerHelper.cpp. The target-specific
    `isUsedByReturnOnly` hook is not ported here.

    Update tailcall-mem-intrinsics.ll to show that GlobalISel can now tail call
    memory intrinsics.

    Update legalize-memcpy-et-al.mir to have a case where we don't tail call.

    Differential Revision: https://reviews.llvm.org/D67566 — paquette / ViewSVN
  6. [OPENMP5.0]Add basic support for declare variant directive.

    Added basic support for declare variant directive and its match clause
    with user context selector. — abataev / ViewSVN
  7. [Support] Add overload writeFileAtomically(std::function Writer)

    Differential Revision: https://reviews.llvm.org/D67424 — Jan Korous / ViewSVN
  8. [Docs] Bug fix for reference to nonexistent document

    This commit fixes a bug in which the toctree contained a reference to a non-existent document. — dr87 / ViewSVN

rL:371888 - C:371878 - #583 (Sep 13, 2019 12:46:43 PM)

  1. [FPEnv] Document that constrained FP intrinsics cannot be mixed with non-constrained

    Reviewed by: andrew.w.kaylor, cameron.mcinally, uweigand
    Approved by: andrew.w.kaylor
    Differential Revision: https://reviews.llvm.org/D67360 — kpn / ViewSVN
  2. [aarch64] move custom isel of extract_vector_elt to td file - NFC

    In preparation for def-pat selection of dot product instructions,
    this patch moves the custom instruction selection of extract_vector_elt
    to the td file. Without this change it is impossible to catch a pattern that
    starts with an extract_vector_elt: the custom cpp code is executed first
    ahead of the patterns in the td files that are only executed at the end of
    the switch statement in SelectCode(Node).

    With this patch applied, it becomes possible to select a different pattern
    that starts with extract_vector_elt by selecting a higher complexity than
    this pattern.

    The patch has been tested on aarch64-linux with make check-all.

    Differential Revision: https://reviews.llvm.org/D67497 — spop / ViewSVN
  3. Mark [[nodiscard]] test as unsupported with GCC 5 — ericwf / ViewSVN
  4. Fix pretty printer test with GCC — ericwf / ViewSVN
  5. AArch64: fix EXPENSIVE_CHECKS for arm64_32.

    For some reason I'd decided to mark the end-result of a GOT load as
    dead. It's clearly not (necessarily). — Tim Northover / ViewSVN
  6. Fix various test failures with GCC — ericwf / ViewSVN
  7. [SLP] add test for vectorization of constant expressions; NFC

    Goes with D67362. — spatel / ViewSVN
  8. [NFC][InstSimplify] Add some more tests for D67498/D67502 — lebedevri / ViewSVN

rL:371873 - C:371878 - #582 (Sep 13, 2019 10:54:13 AM)

  1. Reland r371785: Add -Wpoison-system-directories warning

    When using clang as a cross-compiler, we should not use system
    headers to do the compilation.
    This CL adds support of a new warning flag -Wpoison-system-directories which
    emits warnings if --sysroot is set and headers from common host system location
    are used.
    By default the warning is disabled.

    The intention of the warning is to catch bad includes which are usually
    generated by third party build system not targeting cross-compilation.
    Such cases happen in Chrome OS when someone imports a new package or upgrade
    one to a newer version from upstream.

    This is reland of r371785 with a fix to test file.

    Patch by: denik (Denis Nikitin) — manojgupta / ViewSVN
  2. Fix build error in 371875

    Apparently Clang complains about the name hiding here in a way that my
    GCC build does not, so a shocking number of buildbots decided to tell me
    about it.  Change the name of the variable to prevent the name hiding
    and hope we don't have to fix this again. — erichkeane / ViewSVN
  3. [NFCI]Create CommonAttributeInfo Type as base type of *Attr and ParsedAttr.

    In order to enable future improvements to our attribute diagnostics,
    this moves info from ParsedAttr into CommonAttributeInfo, then makes
    this type the base of the *Attr and ParsedAttr types. Quite a bit of
    refactoring took place, including removing a bunch of redundant Spelling
    Index propogation.

    Differential Revision: https://reviews.llvm.org/D67368 — erichkeane / ViewSVN
  4. Fix failing negative compilation test for some versions of Clang — ericwf / ViewSVN
  5. Revert for: [AMDGPU]: PHI Elimination hooks added for custom COPY insertion. — alex-t / ViewSVN
  6. Fix bug in `darwin_test_archs()` when the cache variable is set but empty.

    Summary:
    If the cache variable named in `${valid_archs}` (e.g. `DARWIN_osx_BUILTIN_ARCHS`)
    is set in the cache but is empty then the cache check
    `if(${valid_archs})` will be false so the function will probe the
    compiler but the `set(...)` command at the end of the function to update
    the cache variable will be a no-op. This is because `set(...)` will not
    update an existing cache variable unless the `FORCE` argument is
    provided.

    To fix this this patch adds `FORCE` so the cache is always updated.

    rdar://problem/55323665

    Reviewers: vsk, kubamracek

    Subscribers: mgorny, #sanitizers, llvm-commits

    Tags: #llvm, #sanitizers

    Differential Revision: https://reviews.llvm.org/D67530 — delcypher / ViewSVN
  7. [CMake] Separate the detection Darwin platforms architectures for the
    built-ins from the rest of compiler-rt.

    The detection of supported platform (os) architectures for Darwin relies
    on the `darwin_test_archs()` CMake function. This is used both for
    building the builtins (`builtin-config-ix.cmake`) and for the rest of
    the compiler-rt (`config-ix.cmake`).

    `darwin_test_archs()`  implements a cache, presumably to speed up CMake
    re-configures.  Unfortunately this caching is buggy because it depends
    on external global state (i.e. the `TEST_COMPILE_ONLY` variable) and
    this is not taken into account. For `config-ix.cmake`
    `TEST_COMPILE_ONLY` is not set and for `builtin-config-ix.cmake`
    `TEST_COMPILE_ONLY` is set to `On`.  This makes the
    `darwin_test_archs()` function racey in the sense that a call from one
    calling context will poison the cache for the other calling context.

    This is actually an issue George Karpenkov discovered a while back
    and had an incomplete patch for (https://reviews.llvm.org/D45337)
    but this was never merged.

    To workaround this, this patch switches to using a different set of
    variables for the platform architecture builtins, i.e.
    `DARWIN_<OS>_ARCHS` -> `DARWIN_<OS>_BUILTIN_ARCHS`. This avoids the
    cache poisoning problem because the cached variable names are different.
    This also has the advantage that the the configured architectures for
    builtins and the rest of the compiler-rt are now independent and
    can be set differently if necessary.

    Note in `darwin_test_archs()` we also now pass `-w` to the compiler
    because `try_compile_only()` treats compiler warnings as errors.  This
    was extremely fragile because compiler warnings (can easily appear due
    to a buggy compiler or SDK headers) would cause compiler-rt to think an
    architecture on Darwin wasn't supported.

    rdar://problem/48637491 — delcypher / ViewSVN
  8. [Remarks][NFC] Forward declare ParsedStringTable — thegameg / ViewSVN
  9. [Remarks][NFC] Use StringLiteral for magic numbers — thegameg / ViewSVN

rL:371868 - C:371859 - #581 (Sep 13, 2019 9:32:16 AM)

  1. [AArch64][GlobalISel] Add support for sibcalling callees with varargs

    This adds support for tail calling callees with varargs, equivalent to how it
    is done in AArch64ISelLowering.

    This only works for sibling calls, and does not add the necessary support for
    musttail with varargs. (See r345641 for equivalent ISelLowering support.) This
    should be implemented when we stop falling back on musttail.

    Update call-translator-tail-call.ll to show that we can now tail call varargs.

    Differential Revision: https://reviews.llvm.org/D67518 — paquette / ViewSVN
  2. Recommit r370502: Make `vector` unconditionally move elements when
    exceptions are disabled.

    The patch was reverted due to some confusion about non-movable types. ie
    types
    that explicitly delete their move constructors. However, such types do
    not meet
    the requirement for `MoveConstructible`, which is required by
    `std::vector`:

    Summary:

    `std::vector<T>` is free choose between using copy or move operations
    when it
    needs to resize. The standard only candidates that the correct exception
    safety
    guarantees are provided. When exceptions are disabled these guarantees
    are
    trivially satisfied. Meaning vector is free to optimize it's
    implementation by
    moving instead of copying.

    This patch makes `std::vector` unconditionally move elements when
    exceptions are
    disabled. This optimization is conforming according to the current
    standard wording.

    There are concerns that moving in `-fno-noexceptions`mode will be a
    surprise to
    users. For example, a user may be surprised to find their code is slower
    with
    exceptions enabled than it is disabled. I'm sympathetic to this
    surprised, but
    I don't think it should block this optimization.

    Reviewers: mclow.lists, ldionne, rsmith
    Reviewed By: ldionne
    Subscribers: zoecarver, christof, dexonsmith, libcxx-commits
    Tags: #libc
    Differential Revision: https://reviews.llvm.org/D62228 — ericwf / ViewSVN
  3. [yaml2obj/ObjectYAML] - Cleanup the error reporting API, add custom errors handlers.

    This is a continuation of the YAML library error reporting
    refactoring/improvement and the idea by itself was mentioned
    in the following thread:
    https://reviews.llvm.org/D67182?id=218714#inline-603404

    This performs a cleanup of all object emitters in the library.
    It allows using the custom one provided by the caller.

    One of the nice things is that each tool can now print its tool name,
    e.g: "yaml2obj: error: <text>"

    Also, the code became a bit simpler.

    Differential revision: https://reviews.llvm.org/D67445 — grimar / ViewSVN
  4. Only initialize the streams cout/wcout/cerr/wcerr etc once, rather than any time Init::Init is called. Fixes PR#43300 — marshall / ViewSVN
  5. Fix build in C++20 — ericwf / ViewSVN

rL:371862 - C:371859 - #580 (Sep 13, 2019 8:03:42 AM)

  1. [docs][llvm-readelf][llvm-readobj] Improve --stack-sizes documentation

    llvm-readobj's document was missing --stack-sizes entirely from its
    document, so this patch adds it. It also adds a note to the llvm-readelf
    description that the switch is only implemented for GNU style output
    currently. For reference, --stack-sizes was added in r367942.

    Reviewed by: MaskRay

    Differential Revision: https://reviews.llvm.org/D67548 — jhenderson / ViewSVN
  2. [X86] Use incDecVectorConstant to simplify the min/max code in LowerVSETCC.

    incDecVectorConstant is used for a similar reason in LowerVSETCCWithSUBUS
    so we might as well share the code. — ctopper / ViewSVN
  3. Fix a few spellos in docs.

    (Trying to debug an incremental build thing on a bot...) — nico / ViewSVN
  4. [Sema][Typo Correction] Fix potential infite loop on ambiguity checks

    Summary:
    This fixes a bug introduced in D62648, where Clang could infinite loop
    if it became stuck on a single TypoCorrection when it was supposed to
    be testing ambiguous corrections. Although not a common case, it could
    happen if there are multiple possible corrections with the same edit
    distance.

    The fix is simply to wipe the TypoExpr from the `TransformCache` so that
    the call to `TransformTypoExpr` doesn't use the `CachedEntry`.

    Reviewers: rsmith

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67515 — dgoldman / ViewSVN
  5. gn build: pacify "gn format" after 371102 — nico / ViewSVN
  6. [PowerPC][NFC] Move codegen tests to PowerPC from MIR/PowerPC

    All tests with -run-pass !=none should not in MIR/, See MIR/README.

    ```
    Tests for codegen passes should NOT be here but in
    test/CodeGen/sometarget. As
    a rule of thumb this directory should only contain tests using
    'llc -run-pass none'.
    ``` — jsji / ViewSVN
  7. [ADT] Remove a workaround for old versions of clang — d0k / ViewSVN
  8. [docs][llvm-objcopy][llvm-strip] Improve --strip-unneeded description

    Behaviour was recently added to this switch to strip debug sections too.
    See r369761.

    This change also makes the description for the --strip-unneeded switch
    consistent between the two docs.

    Reviewed by: MaskRay

    Differential Revision: https://reviews.llvm.org/D67546 — jhenderson / ViewSVN
  9. clang-format: Add support for formatting (some) lambdas with explicit template parameters.

    This patch makes cases work where the lambda's template list doesn't
    contain any of + - ! ~ / % << | || && ^ == != >= <= ? : true false
    (see added FIXME).

    Ports r359967 to clang-format.

    Differential Revision: https://reviews.llvm.org/D67246 — nico / ViewSVN
  10. Fix depfile name construction

    - When using -o, the provided filename is using for constructing the depfile
      name (when -MMD is passed).
    - The logic looks for the rightmost '.' character and replaces what comes after
      with 'd'.
    - This works incorrectly when the filename has no extension and the directories
      have '.' in them (e.g. out.dir/test)
    - This replaces the funciton to just llvm::sys::path functionality

    Differential Revision: https://reviews.llvm.org/D67542 — lukecheeseman / ViewSVN
  11. gn build: (manually) merge r371834, take 2 — nico / ViewSVN
  12. Revert "gn build: (manually) merge r371834"

    This reverts commit abc7e2b6004cd693cf3b6dedbc7908e099c7ac6a.
    The commit was incomplete. I'll revert and reland the full commit,
    so that the correct change is a single commit. — nico / ViewSVN
  13. gn build: (manually) merge r371834 — nico / ViewSVN
  14. gn build: Merge r371822 — nico / ViewSVN
  15. gn build: (manually) merge r371787 — nico / ViewSVN

rL:371846 - C:371839 - #579 (Sep 13, 2019 5:46:33 AM)

  1. [ADT] Make DenseMap use allocate_buffer

    This unlocks some goodies like sized deletion and gets the alignment
    right on platforms that chose to provide a lower default new alignment. — d0k / ViewSVN
  2. [llvm-size] Fix spelling errors (Berkely -> Berkeley) — jhenderson / ViewSVN
  3. [Orc] Roll back ThreadPool to std::function

    MSVC doesn't allow move-only types in std::packaged_task. Boo. — d0k / ViewSVN
  4. [Orc] Address the remaining move-capture FIXMEs

    This required spreading unique_function a bit more, which I think is a
    good thing. — d0k / ViewSVN
  5. [X86] negateFMAOpcode - extend to support FMADDSUB/FMSUBADD and output negation. NFCI.

    Some prep work for PR42863, this change allows us to move all the FMA opcode mappings into the negateFMAOpcode helper.

    For the FMADDSUB/FMSUBADD cases, we can only negate the accumulator - any other negations will result in an error. — rksimon / ViewSVN
  6. [ASTImporter] Add development internals docs

    Reviewers: a_sidorin, shafik, teemperor, gamesh411, balazske, dkrupp, a.sidorin

    Subscribers: rnkovacs, Szelethus, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D66336 — martong / ViewSVN
  7. [ARM] Add earlyclobber for cross beat MVE instructions

    rL367544 added @earlyclobbers for the MVE VREV64 instruction. This adds the
    same for a number of other 32bit instructions that are similarly unpredictable
    if the destination equals the source (due to the cross beat nature of the
    instructions).
    This includes:
      VCADD.f32
      VCADD.i32
      VCMUL.f32
      VHCADD.s32
      VMULLT/B.s/u32
      VQDMLADH{X}.s32
      VQRDMLADH{X}.s32
      VQDMLSDH{X}.s32
      VQRDMLSDH{X}.s32
      VQDMULLT/B.s32 with Qm and Rm

    No tests here as this would require intrinsics (or very interesting codegen) to
    manifest. The tests will follow naturally as the intrinsics are added.

    Differential Revision: https://reviews.llvm.org/D67462 — dmgreen / ViewSVN

rL:371834 - C:371834 - #578 (Sep 13, 2019 3:06:51 AM)

  1. Remove redundant linaro slaves from slaves.py

    The slaves.py file contains several linaro administered build slaves that
    are no longer used in builders.py. This patch removes them.

    Differential Revision: https://reviews.llvm.org/D67494 — psmith / ViewSVN
  2. [Clang Interpreter] Initial patch for the constexpr interpreter

    Summary:
    This patch introduces the skeleton of the constexpr interpreter,
    capable of evaluating a simple constexpr functions consisting of
    if statements. The interpreter is described in more detail in the
    RFC. Further patches will add more features.

    Reviewers: Bigcheese, jfb, rsmith

    Subscribers: bruno, uenoku, ldionne, Tyker, thegameg, tschuett, dexonsmith, mgorny, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64146 — nand / ViewSVN
  3. [AArch64] More @llvm.fma.f16 tests

    Follow up of rL371321 that added FMA FP16 patterns. This adds more tests
    for @llvm.fma.f16. This probably shows we miss one fmsub optimisation
    opportunity, which I will look into. — sjoerdmeijer / ViewSVN
  4. Fix a perl warning: Scalar value @ArgParts[0] better written as $ArgParts[0] at /usr/share/clang/scan-build-10/libexec/ccc-analyzer line 502. — sylvestre / ViewSVN
  5. [Alignment] Introduce llvm::Align to MCSection

    Summary:
    This is patch is part of a series to introduce an Alignment type.
    See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
    See this patch for the introduction of the type: https://reviews.llvm.org/D64790

    Reviewers: courbet, JDevlieghere

    Subscribers: arsenm, sdardis, jvesely, nhaehnle, sbc100, hiraditya, aheejin, jrtc27, atanasyan, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67486 — gchatelet / ViewSVN
  6. [lib/ObjectYAML] - Change interface to return `bool` instead of `int`. NFCI

    It was suggested in comments for D67445 to split this part.

    Differential revision: https://reviews.llvm.org/D67488 — grimar / ViewSVN
  7. [ARM] Add support for MVE vmaxv and vminv

    This patch adds vecreduce_smax, vecredude_umax, vecreduce_smin, vecreduce_umin and selection for vmaxv and minv.

    Differential Revision: https://reviews.llvm.org/D66413 — samtebbs / ViewSVN
  8. [llvm-objdump] Fix llvm-objdump --all-headers output order

    Patch by Justice Adams!

    Made llvm-objdump --all-headers output match the order of GNU objdump for compatibility reasons.

    Old order of the headers output:
    * file header
    * section header table
    * symbol table
    * program header table
    * dynamic section

    New order of the headers output (GNU compatible):
    * file header information
    * program header table
    * dynamic section
    * section header table
    * symbol table

    (Relevant BugZilla Bug: https://bugs.llvm.org/show_bug.cgi?id=41830)

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

rL:371824 - C:371820 - #577 (Sep 13, 2019 1:50:42 AM)

  1. Revert "Fix test failures after r371640"

    This reverts commit r371645, because r371640 was reverted. — gribozavr / ViewSVN
  2. [compiler-rt] Add ubsan interface header.

    This is to document __ubsan_default_options().

    Reviewed By: vitalybuka

    Differential Revision: https://reviews.llvm.org/D67503 — pgousseau / ViewSVN
  3. [Clang][ASTImporter] Added visibility check for FunctionTemplateDecl.

    Summary:
    ASTImporter makes now difference between function templates with same
    name in different translation units if these are not visible outside.

    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/D67490 — balazske / ViewSVN
  4. [BasicBlockUtils] Add optional BBName argument, in line with BB:splitBasicBlock

    Reviewers: spatel, asbirlea, craig.topper

    Reviewed By: asbirlea

    Differential Revision: https://reviews.llvm.org/D67521 — fhahn / ViewSVN

rL:371818 - C:371817 - #576 (Sep 13, 2019 12:48:14 AM)

  1. [AArch64] MachineCombiner FMA matching. NFC.

    Follow-up of rL371321 that added some more FP16 FMA patterns, and an attempt to
    reduce the copy-pasting and make this more readable.

    Differential Revision: https://reviews.llvm.org/D67403 — sjoerdmeijer / ViewSVN
  2. For PR17164: split -fno-lax-vector-conversion into three different
    levels:

    -- none: no lax vector conversions [new GCC default]
    -- integer: only conversions between integer vectors [old GCC default]
    -- all: all conversions between same-size vectors [Clang default]

    For now, Clang still defaults to "all" mode, but per my proposal on
    cfe-dev (2019-04-10) the default will be changed to "integer" as soon as
    that doesn't break lots of testcases. (Eventually I'd like to change the
    default to "none" to match GCC and general sanity.)

    Following GCC's behavior, the driver flag -flax-vector-conversions is
    translated to -flax-vector-conversions=integer.

    This reinstates r371805, reverted in r371813, with an additional fix for
    lldb. — rsmith / ViewSVN

rL:371815 - C:371816 - #575 (Sep 12, 2019 10:55:43 PM)

  1. Fix interaction between r371813 and r371814. — rsmith / ViewSVN
  2. [TargetRegisterInfo] Remove SVT argument from getCommonSubClass.

    This was added to support fp128 on x86-64, but appears to be
    unneeded now. This may be because the FR128 register class
    added back then was merged with the VR128 register class later. — ctopper / ViewSVN
  3. Remove reliance on lax vector conversions from altivec.h and its test. — rsmith / ViewSVN
  4. Revert "For PR17164: split -fno-lax-vector-conversion into three different"

    This breaks the LLDB build. I tried reaching out to Richard, but haven't
    gotten a reply yet. — Jonas Devlieghere / ViewSVN

rL:371812 - C:371805 - #574 (Sep 12, 2019 9:29:43 PM)

  1. AMDGPU/GlobalISel: Fix assert on multi-return side effect intrinsics

    llvm.amdgcn.else hits this. — arsenm / ViewSVN
  2. AMDGPU/GlobalISel: Legalize s32->s16 G_SITOFP/G_UITOFP — arsenm / ViewSVN
  3. [RISCV] Support stack offset exceed 32-bit for RV64

    Differential Revision: https://reviews.llvm.org/D61884 — shiva / ViewSVN
  4. Revert "[RISCV] Support stack offset exceed 32-bit for RV64"

    This reverts commit 1c340c62058d4115d21e5fa1ce3a0d094d28c792. — shiva / ViewSVN

rL:371808 - C:371805 - #573 (Sep 12, 2019 8:57:08 PM)

  1. AMDGPU/GlobalISel: Fix RegBankSelect for amdgcn.else — arsenm / ViewSVN
  2. AMDGPU/GlobalISel: Select 16-bit VALU bit ops — arsenm / ViewSVN

rL:371806 - C:371805 - #572 (Sep 12, 2019 8:17:36 PM)

  1. [RISCV] Support stack offset exceed 32-bit for RV64

    Differential Revision: https://reviews.llvm.org/D61884 — shiva / ViewSVN
  2. For PR17164: split -fno-lax-vector-conversion into three different
    levels:

    -- none: no lax vector conversions [new GCC default]
    -- integer: only conversions between integer vectors [old GCC default]
    -- all: all conversions between same-size vectors [Clang default]

    For now, Clang still defaults to "all" mode, but per my proposal on
    cfe-dev (2019-04-10) the default will be changed to "integer" as soon as
    that doesn't break lots of testcases. (Eventually I'd like to change the
    default to "none" to match GCC and general sanity.)

    Following GCC's behavior, the driver flag -flax-vector-conversions is
    translated to -flax-vector-conversions=integer. — rsmith / ViewSVN

rL:371803 - C:371799 - #571 (Sep 12, 2019 7:01:48 PM)

  1. AMDGPU/GlobalISel: Legalize G_FFLOOR — arsenm / ViewSVN
  2. Temporarily revert r371640 "LiveIntervals: Split live intervals on multiple dead defs".

    It reveals a miscompile on Hexagon. See PR43302 for details. — timshen / ViewSVN
  3. AMDGPU/GlobalISel: Legalize G_FMAD

    Unlike SelectionDAG, treat this as a normally legalizable operation.
    In SelectionDAG this is supposed to only ever formed if it's legal,
    but I've found that to be restricting. For AMDGPU this is contextually
    legal depending on whether denormal flushing is allowed in the use
    function.

    Technically we currently treat the denormal mode as a subtarget
    feature, so custom lowering could be avoided. However I consider this
    to be a defect, and this should be contextually dependent on the
    controllable rounding mode of the parent function. — arsenm / ViewSVN

rL:371798 - C:371799 - #570 (Sep 12, 2019 5:31:20 PM)

  1. Revert r371785.

    r371785 is causing fails on clang-hexagon-elf buildbots. — manojgupta / ViewSVN
  2. AMDGPU/GlobalISel: Select G_CTPOP — arsenm / ViewSVN
  3. DAG/GlobalISel: Correct type profile of bitcount ops

    The result integer does not need to be the same width as the input.
    AMDGPU, NVPTX, and Hexagon all have patterns working around the types
    matching. GlobalISel defines these as being different type indexes. — arsenm / ViewSVN
  4. [libclang] Fix UninstallAbortingLLVMFatalErrorHandler test — Jan Korous / ViewSVN
  5. AMDGPU: Add immarg to llvm.amdgcn.init.exec.from.input

    As far as I can tell this has to be a constant. — arsenm / ViewSVN
  6. LiveIntervals: Remove assertion

    This testcase is invalid, and caught by the verifier. For the verifier
    to catch it, the live interval computation needs to complete. Remove
    the assert so the verifier catches this, which is less confusing.

    In this testcase there is an undefined use of a subregister, and lanes
    which aren't used or defined. An equivalent testcase with the
    super-register shrunk to have no untouched lanes already hit this
    verifier error. — arsenm / ViewSVN
  7. AMDGPU: Inline constant when materalizing FI with add on gfx9

    This was relying on the SGPR usable for the carry out clobber to also
    be used for the input. There was no carry out on gfx9. With no carry
    out clobber to worry about, so the literal can just be directly used
    with a VOP2 add. — arsenm / ViewSVN
  8. [Test] Restructure check lines to show differences between modes more clearly

    With the landing of the previous patch (in particular D66318) there are a lot fewer diffs now.  I added an experimental O0 line, and updated all the tests to group experimental and non-experimental O0/O3 together.

    Skimming the remaining diffs, there's only a few which are obviously incorrect.  There's a large number which are questionable, so more todo. — reames / ViewSVN

rL:371789 - C:371787 - #569 (Sep 12, 2019 4:14:38 PM)

  1. Rename nonvolatile_load/store to simple_load/store [NFC]

    Implement the TODO from D66318. — reames / ViewSVN
  2. [AArch64][GlobalISel] Support tail calling with swiftself parameters

    Swiftself uses a callee-saved register. We can tail call when the register used
    in the caller and callee is the same.

    This behaviour is equivalent to that in `TargetLowering::parametersInCSRMatch`.

    Update call-translator-tail-call.ll to verify that we can do this. When we
    support inline assembly, we can write a check similar to the one in the
    general swiftself.ll. For now, we need to verify that we get the correct COPY
    instruction after call lowering.

    Differential Revision: https://reviews.llvm.org/D67511 — paquette / ViewSVN
  3. [libclang] Expose abort()-ing LLVM fatal error handler

    Differential Revision: https://reviews.llvm.org/D66775 — Jan Korous / ViewSVN
  4. [SDAG] Update generic code to conservatively check for isAtomic in addition to isVolatile

    This is the first sweep of generic code to add isAtomic bailouts where appropriate. The intention here is to have the switch from AtomicSDNode to LoadSDNode/StoreSDNode be close to NFC; that is, I'm not looking to allow additional optimizations at this time. That will come later.  See D66309 for context.

    Differential Revision: https://reviews.llvm.org/D66318 — reames / ViewSVN
  5. Add -Wpoison-system-directories warning

    When using clang as a cross-compiler, we should not use system
    headers to do the compilation.
    This CL adds support of a new warning flag -Wpoison-system-directories which
    emits warnings if --sysroot is set and headers from common host system location
    are used.
    By default the warning is disabled.

    The intention of the warning is to catch bad includes which are usually
    generated by third party build system not targeting cross-compilation.
    Such cases happen in Chrome OS when someone imports a new package or upgrade
    one to a newer version from upstream.

    Patch by: denik (Denis Nikitin) — manojgupta / ViewSVN
  6. [NFC] Fix file header filename to be Range.h — gclayton / ViewSVN
  7. [Docs] Adds page for reference docs

    Adds a Reference Documentation page for LLVM and API reference documentation. — dr87 / ViewSVN

rL:371780 - C:371781 - #568 (Sep 12, 2019 3:15:46 PM)

  1. [analyzer] Fix the 'analyzer-enabled-checkers.c' test on non-linux machines.

    '-Xclang -triple' doesn't seem to override the default target triple
    as reliably as '--target'. This leads to test failing due to
    platform-specific checks getting unexpectedly enabled. — dergachev / ViewSVN
  2. [AArch64][GlobalISel] Support sibling calls with outgoing arguments

    This adds support for lowering sibling calls with outgoing arguments.

    e.g

    ```
    define void @foo(i32 %a)
    ```

    Support is ported from AArch64ISelLowering's `isEligibleForTailCallOptimization`.
    The only thing that is missing is a full port of
    `TargetLowering::parametersInCSRMatch`. So, if we're using swiftself,
    we'll never tail call.

    - Rename `analyzeCallResult` to `analyzeArgInfo`, since the function is now used
      for both outgoing and incoming arguments
    - Teach `OutgoingArgHandler` about tail calls. Tail calls use frame indices for
      stack arguments.
    - Teach `lowerFormalArguments` to set the bytes in the caller's stack argument
      area. This is used later to check if the tail call's parameters will fit on
      the caller's stack.
    - Add `areCalleeOutgoingArgsTailCallable` to perform the eligibility check on
      the callee's outgoing arguments.

    For testing:

    - Update call-translator-tail-call to verify that we can now tail call with
      outgoing arguments, use G_FRAME_INDEX for stack arguments, and respect the
      size of the caller's stack
    - Remove GISel-specific check lines from speculation-hardening.ll, since GISel
      now tail calls like the other selectors
    - Add a GISel test line to tailcall-string-rvo.ll since we can tail call in that
      test now
    - Add a GISel test line to tailcall_misched_graph.ll since we tail call there
      now. Add specific check lines for GISel, since the debug output from the
      machine-scheduler differs with GlobalISel. The dependency still holds, but
      the output comes out in a different order.

    Differential Revision: https://reviews.llvm.org/D67471 — paquette / ViewSVN
  3. [PowerPC] Remove the SPE4RC register class and instead add f32 to the GPRC register class.

    Summary:
    Since the SPE4RC register class contains an identical set of registers
    and an identical spill size to the GPRC class its slightly confusing
    the tablegen emitter. It's preventing the GPRC_and_GPRC_NOR0 synthesized
    register class from inheriting VTs and AltOrders from GPRC or GPRC_NOR0.
    This is because SPE4C is found first in the super register class list
    when inheriting these properties and it doesn't set the VTs or
    AltOrders the same way as GPRC or GPRC_NOR0.

    This patch replaces all uses of GPE4RC with GPRC and allows GPRC and
    GPRC_NOR0 to contain f32.

    The test changes here are because the AltOrders are being inherited
    to GPRC_NOR0 now.

    Found while trying to determine if getCommonSubClass needs to take
    a VT argument. It was originally added to support fp128 on x86-64,
    I've changed some things about that so that it might be needed
    anymore. But a PowerPC test crashed without it and I think its
    due to this subclass issue.

    Reviewers: jhibbits, nemanjai, kbarton, hfinkel

    Subscribers: wuzish, nemanjai, mehdi_amini, hiraditya, kbarton, MaskRay, dexonsmith, jsji, shchenz, steven.zhang, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67513 — ctopper / ViewSVN
  4. Remove a duplicate test

    Turns out I'd already added exactly the same test under the name non_unit_stride. — reames / ViewSVN
  5. [SCEV] Add smin support to getRangeRef

    We were failing to compute trip counts (both exact and maximum) for any loop which involved a comparison against either an umin or smin. It looks like this simply got missed when we added smin/umin to SCEV.  (Note: umin was submitted separately earlier today.  Turned out two folks hit this at the same time.)

    Differential Revision: https://reviews.llvm.org/D67514 — reames / ViewSVN

rL:371775 - C:371767 - #567 (Sep 12, 2019 2:31:05 PM)

  1. [DAGCombiner][X86] Pass the CmpOpVT to reduceSelectOfFPConstantLoads so X86 can exclude fp128 compares.

    The X86 decision assumes the compare will produce a result in an XMM
    register, but that can't happen for an fp128 compare since those
    go to a libcall the returns an i32. Pass the VT so X86 can check
    the type. — ctopper / ViewSVN
  2. [ConstantFolding] Expand folding of some library functions

    Expanding the folding of `nearbyint()`, `rint()` and `trunc()` to library
    functions, in addition to the current support for intrinsics.

    Differential revision: https://reviews.llvm.org/D67468 — evandro / ViewSVN
  3. [ClangTidy] Adjust the name getCheckName to getCheckerName due to API change. — timshen / ViewSVN
  4. Fix llvm-reduce tests so that they don't assume the source code is
    writable.

    Instead of copying over the original file permissions, just create
    a new file and add the executable bit. — timshen / ViewSVN
  5. [SelectionDAGBuilder] Simplify loop in visitSelect back to how it was before r255558.

    This code was changed to accomodate fp128 being softened to itself
    during type legalization on x86-64. This was done in order to create
    libcalls while having fp128 as a legal type. We're now doing the
    libcall creation during LegalizeDAG and the type legalization changes
    to enable the old behavior have been removed. So this change to
    SelectionDAGBuilder is no longer needed. — ctopper / ViewSVN

rL:371770 - C:371767 - #566 (Sep 12, 2019 1:41:34 PM)

  1. [X86] Move negateFMAOpcode helper earlier to help future patch. NFCI. — rksimon / ViewSVN
  2. [LV] Update test case after r371768. — fhahn / ViewSVN
  3. [SCEV] Support SCEVUMinExpr in getRangeRef.

    This patch adds support for SCEVUMinExpr to getRangeRef,
    similar to the support for SCEVUMaxExpr.

    Reviewers: sanjoy.google, efriedma, reames, nikic

    Reviewed By: sanjoy.google

    Differential Revision: https://reviews.llvm.org/D67177 — fhahn / ViewSVN
  4. Improve code generation for thread_local variables:

    Summary:
    * Don't bother using a thread wrapper when the variable is known to
       have constant initialization.
    * Emit the thread wrapper as discardable-if-unused in TUs that don't
       contain a definition of the thread_local variable.
    * Don't emit the thread wrapper at all if the thread_local variable
       is unused and discardable; it will be emitted by all TUs that need
       it.

    Reviewers: rjmccall, jdoerfert

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67429 — rsmith / ViewSVN
  5. [Clang][CodeGen] support alias attribute w/ gnu_inline

    Summary:
    r369705 did not consider the addition of gnu_inline on function
    declarations of alias attributed functions. This resulted in a reported
    regression in the clang-9-rc4 release from the Zig developers building
    glibc, which was observable as a failed assertion:

    llvm-project/clang/lib/AST/Decl.cpp:3336: bool
    clang::FunctionDecl::isInlineDefinitionExternallyVisible() const:
    Assertion `(doesThisDeclarationHaveABody() || willHaveBody()) && "Must
    be a function definition"' failed.

    Alias function declarations do not have bodies, so allow us to proceed
    if we have the alias function attribute but no body/definition, and add
    a test case.  The emitted symbols and their linkage matches GCC for the
    added test case.

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

    Reviewers: aaron.ballman, rsmith, erichkeane, andrewrk

    Reviewed By: andrewrk

    Subscribers: cfe-commits, andrewrk, hans, srhines

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67455 — nickdesaulniers / ViewSVN
  6. [CFG] Add dumps for CFGElement and CFGElementRef

    Seems like we never had these, so here we go! I also did some refactoring as I
    was chasing a bug unrelated to this revision.

    Differential Revision: https://reviews.llvm.org/D66715 — szelethus / ViewSVN
  7. llvm-reduce: For now, mark these tests as requiring a shell

    (since they execute shell scripts/that's the only entry point at the
    moment) — dblaikie / ViewSVN
  8. [libc++] Mark issue 2587 resolved by issue 2567

    Updates status. NFC. — zoecarver / ViewSVN

rL:371762 - C:371760 - #565 (Sep 12, 2019 12:44:14 PM)

  1. Precommit tests for D67514 — reames / ViewSVN
  2. AMDGPU: Fix bug in r371671 on some builds. — kerbowa / ViewSVN
  3. [analyzer][NFC] Fix inconsistent references to checkers as "checks"

    Traditionally, clang-tidy uses the term check, and the analyzer uses checker,
    but in the very early years, this wasn't the case, and code originating from the
    early 2010's still incorrectly refer to checkers as checks.

    This patch attempts to hunt down most of these, aiming to refer to checkers as
    checkers, but preserve references to callback functions (like checkPreCall) as
    checks.

    Differential Revision: https://reviews.llvm.org/D67140 — szelethus / ViewSVN
  4. NFC, add missing cl::cat option category to clang-scan-deps options to ensure they show up in -help — arphaman / ViewSVN
  5. Add getauxval() compat for NetBSD

    Summary:
    getauxval() is not available on NetBSD and there is no a direct equivalent.

    Add a function that implements the same semantics with NetBSD internals.

    Reorder the GetPageSize() functions to prefer the sysctl approach for NetBSD.
    It no longer makes a difference which approach is better. Avoid changing
    conditional code path.

    Reviewers: vitalybuka, dvyukov, mgorny, joerg

    Reviewed By: vitalybuka

    Subscribers: llvm-commits, #sanitizers

    Tags: #sanitizers, #llvm

    Differential Revision: https://reviews.llvm.org/D67329 — kamil / ViewSVN
  6. Split many_tls_keys.cpp into two tests

    Summary:
    many_tls_keys_pthread.cpp for TSD
    many_tls_keys_thread.cpp for TLS

    The TSD test is unsupported on NetBSD as it assumes TLS used internally.
    TSD on NetBSD does not use TLS.

    Reviewers: joerg, vitalybuka, mgorny, dvyukov, kcc

    Reviewed By: vitalybuka

    Subscribers: jfb, llvm-commits, #sanitizers

    Tags: #sanitizers, #llvm

    Differential Revision: https://reviews.llvm.org/D67428 — kamil / ViewSVN
  7. [analyzer] Don't run the analyzer for -analyzer-list-enabled-checkers

    Short and sweet. Whenever I use -analyzer-list-enabled-checkers, I'm only
    interested about the configuration, not about the analysis.

    Differential Revision: https://reviews.llvm.org/D66714 — szelethus / ViewSVN
  8. llvm-reduce: Remove unused plugin support/requirements — dblaikie / ViewSVN
  9. Use host's executable suffix for clang when cross-compiling compiler-rt

    When cross-compiling compiler-rt as part of LLVM e. g. for Linux on
    a Windows host and using the just-built clang as cross-compiler, we set
    the -DBUILTINS_CMAKE_ARGS="-DCMAKE_SYSTEM_NAME=Linux" flag in top-level
    cmake invocation, which causes CMAKE_EXECUTABLE_SUFFIX to be an empty
    string in the nested cmake invocation for building builtins.

    But the compiler for compiling test cases is meant to be run on host,
    therefore it may have the '.exe' suffix.

    Handle this by asking cmake about the host system.

    Patch by Sergej Jaskiewicz <jaskiewiczs@icloud.com>

    Reviewed By: rnk

    Differential Revision: https://reviews.llvm.org/D67401 — rnk / ViewSVN
  10. [MS] Warn when shadowing template parameters under -fms-compatibility

    Summary:
    C++ does not allow shadowing template parameters, but previously we
    allowed it under -fms-extensions. Now this behavior is controlled by
    -fms-compatibility, and we emit a -Wmicrosoft-template warning when it
    happens.

    Fixes PR43265

    Reviewers: thakis, hans

    Subscribers: amccarth, rsmith, STL_MSFT, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67463 — rnk / ViewSVN

rL:371752 - C:371751 - #564 (Sep 12, 2019 11:11:01 AM)

  1. [LICM/AST] Check if the AliasAny set is removed from the tracker.

    Summary:
    Resolves PR38513.
    Credit to @bjope for debugging this.

    Reviewers: hfinkel, uabelho, bjope

    Subscribers: sanjoy.google, bjope, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67417 — asbirlea / ViewSVN
  2. [clang-scan-deps] remove dots and dots dots from the reported file dependency paths

    This resolves differences observed on LLVM + Clang when running the comparison between canonical
    dependencies (full preprocessing, no file manager reused), and dependencies obtained
    when the file manager was reused between the full preprocessing invocations. — arphaman / ViewSVN
  3. [InstCombine] add tests for fptrunc; NFC — spatel / ViewSVN
  4. Don't warn about selectany on implicitly inline variables

    Summary:
    This avoids a -Wignored-attribute warning on the code pattern Microsoft
    recommends for integral const static data members defined in headers
    here:
    https://docs.microsoft.com/en-us/cpp/build/reference/microsoft-extensions-to-c-and-cpp?view=vs-2019

    The attribute is redundant, but it is necessary when compiling in C++14
    modes with /Za, which disables MSVC's extension that treats such
    variables as implicitly inline.

    Fixes PR43270

    Reviewers: epastor, thakis, hans

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67426 — rnk / ViewSVN

rL:371694 - C:371694 - #559 (Sep 11, 2019 5:03:41 PM)

  1. [X86] Enable -mprefer-vector-width=256 by default for Skylake-avx512 and later Intel CPUs.

    AVX512 instructions can cause a frequency drop on these CPUs. This
    can negate the performance gains from using wider vectors. Enabling
    prefer-vector-width=256 will prevent generation of zmm registers
    unless explicit 512 bit operations are used in the original source
    code.

    I believe gcc and icc both do something similar to this by default.

    Differential Revision: https://reviews.llvm.org/D67259 — ctopper / ViewSVN
  2. [AArch64][GlobalISel] Fall back on attempts to allocate split types on the stack.

    First we were asserting that the ValNo of a VA was the wrong value. It doesn't actually
    make a difference for us in CallLowering but fix that anyway to silence the assert.

    The bigger issue was that after fixing the assert we were generating invalid MIR
    because the merging/unmerging of values split across multiple registers wasn't
    also implemented for memory locs. This happens when we run out of registers and
    have to pass the split types like i128 -> i64 x 2 on the stack. This is do-able, but
    for now just fall back. — aemerson / ViewSVN
  3. [GlobalISel][AArch64] Check caller for swifterror params in tailcall eligibility

    Before, we only checked the callee for swifterror. However, we should also be
    checking the caller to see if it has a swifterror parameter.

    Since we don't currently handle outgoing arguments, this didn't show up in the
    swifterror.ll testcase.

    Also, remove the swifterror checks from call-translator-tail-call.ll, since
    they are covered by the existing swifterror testing. Better to have it all in
    one place.

    Differential Revision: https://reviews.llvm.org/D67465 — paquette / ViewSVN
  4. [dfsan] Revert dfsan_set_label removal

    It's part of interface, maybe it is used in external code. — Vitaly Buka / ViewSVN
  5. Replaced non-existent argument 'target_arch' for 'vs_target_arch'. — gkistanova / ViewSVN
  6. Remove NOLINTs from compiler-rt — Vitaly Buka / ViewSVN
  7. Run svn cleanup before svn up on Windows annotated build bots

    This should help them recover better form random svn flakiness for
    another few months. — rnk / ViewSVN
  8. [TableGen] Skip CRLF conversion when writing output

    Doing the CRLF translation while writing the file defeats our
    optimization to not update the file if it hasn't changed.

    Fixes PR43271. — rnk / ViewSVN
  9. [InstCombine] rename variable for readability; NFC

    There's more that can be done here, but "OpI"
    doesn't convey that we casted to BinaryOperator. — spatel / ViewSVN
  10. Add some missing changes to GSYM that was addressing a gcc compilation error due to a type and variable with the same name — dblaikie / ViewSVN
  11. Fix mac build — Vitaly Buka / ViewSVN
  12. PR43278: Temporarily disable llvm-reduce tests due to exhausting temp files — dblaikie / ViewSVN
  13. [X86] Fix latent bugs in 32-bit CMPXCHG8B inserter

    I found three issues:
    1. the loop over E[ABCD]X copies run over BB start
    2. the direct address of cmpxchg8b could be a frame index
    3. the displacement of cmpxchg8b could be a global instead of an
       immediate

    These were all introduced together in r287875, and should be fixed with
    this change.

    Issue reported by Zachary Turner. — rnk / ViewSVN
  14. [ConstantFolding] Refactor math functions to use LLVM ones (NFC)

    When possible, replace calls to library routines on the host with equivalent
    ones in LLVM.

    Differential revision: https://reviews.llvm.org/D67459 — evandro / ViewSVN
  15. Revert [llvm-nm] Add tapi file support

    This reverts r371576 (git commit f88f46358dbffa20af3b054a9346e5154789d50f) — cishida / ViewSVN
  16. Update compiler-rt cpplint.py
    https://github.com/cpplint/cpplint/commit/adb3500107f409ac5491188ae652ac3f4d03d9d3 — Vitaly Buka / ViewSVN
  17. Revert [Object][TextAPI] NFC, fix tapi lit tests

    This reverts r371577 (git commit b2b0ccab2f76733679eeceecf31b21ebc1fe23ac) — cishida / ViewSVN
  18. [X86] Add test case for v16i64->v16i32 truncate on min-legal-vector-width=256.

    I think this case would crash before I added back the -x86-experimental-vector-widening command line option. Adding this test case to prevent breaking it again when we remove the option. — ctopper / ViewSVN
  19. [X86] Move x86_64 fp128 conversion to libcalls from type legalization to DAG legalization

    fp128 is considered a legal type for a register, but has almost no legal operations so everything needs to be converted to a libcall. Previously this was implemented by tricking type legalization into softening the operations with various checks for "is legal in hardware register" to change the behavior to still use f128 as the resulting type instead of converting to i128.

    This patch abandons this approach and instead moves the libcall conversions to LegalizeDAG. This is the approach taken by AArch64 where they also have a legal fp128 type, but no legal operations. I think this is more in spirit with how SelectionDAG's phases are supposed to work.

    I had to make some hacks for STRICT_FP_ROUND because some of the strict FP handling checks if ISD::FP_ROUND is Legal for a given result type, but I had to make ISD::FP_ROUND Custom to allow making a libcall when the input is f128. For all other types the Custom handler just returns the original node. These hacks are incomplete and don't work for a strict truncate from f128, but I don't think it worked before either since LegalizeFloatTypes doesn't know about strict ops yet. I've also raised PR43209 against AArch64 which currently crashes on a strict ftrunc from f64->f32 because of FP_ROUND being marked Custom for the same reason there.

    Differential Revision: https://reviews.llvm.org/D67128 — ctopper / ViewSVN
  20. AMDGPU: Move m0 initializations earlier

    Summary:
    After hoisting and merging m0 initializations schedule them as early as
    possible in the MBB. This helps the scheduler avoid hazards in some
    cases.

    Reviewers: rampitec, arsenm

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67450 — kerbowa / ViewSVN
  21. gn build: Merge r371661 — nico / ViewSVN
  22. gn build: Merge r371657 — nico / ViewSVN
  23. [DWARF] Emit call site parameter info when tuning for lldb

    Emit debug entry values using standard DWARF5 opcodes when the debugger
    tuning is set to lldb.

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

rL:371645 - C:371646 - #556 (Sep 11, 2019 11:56:44 AM)

  1. [NFC] Added triple to test file to avoid arm buildbots failures — xbolva00 / ViewSVN
  2. Fix test failures after r371640

    r371640 evidently fixed bug 39481 — arsenm / ViewSVN
  3. [ConstantHoisting] Fix non-determinism.

    Differential Revision: https://reviews.llvm.org/D66114 — efriedma / ViewSVN
  4. [IRMover] Don't map globals if their types are the same

    Summary:
    During IR Linking, if the types of two globals in destination and source
    modules are the same, it can only be because the global in the
    destination module is originally from the source module and got added to
    the destination module from a shared metadata.

    We shouldn't map this type to itself in case the type's components get
    remapped to a new type from the destination (for instance, during the
    loop over SrcM->getIdentifiedStructTypes() further below in
    IRLinker::computeTypeMapping()).

    Fixes PR40312.

    Reviewers: tejohnson, pcc, srhines

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D66814 — pirama / ViewSVN
  5. [MS] Consder constexpr globals to be inline, as in C++17

    Summary:
    Microsoft seems to do this regardless of the language mode, so we must
    also do it in order to be ABI compatible.

    Fixes PR36125

    Reviewers: thakis

    Subscribers: cfe-commits

    Differential Revision: https://reviews.llvm.org/D47956 — rnk / ViewSVN
  6. LiveIntervals: Split live intervals on multiple dead defs

    If there are multiple dead defs of the same virtual register, these
    are required to be split into multiple virtual registers with separate
    live intervals to avoid a verifier error. — arsenm / ViewSVN
  7. Consolidate swap, swap_ranges, and iter_swap in <type_traits>.

    NFC. Thanks to @Quuxplusone (Arthur O'Dwyer) for this change. — zoecarver / ViewSVN

rL:371636 - C:371637 - #555 (Sep 11, 2019 10:29:03 AM)

  1. [libc++] Add a CMake cache for Apple-specific configuration options — Louis Dionne / ViewSVN
  2. [Clang][Bundler] Replace std::vector by SmallVector [NFC]

    Differential Revision: https://reviews.llvm.org/D67413 — sdmitriev / ViewSVN
  3. gn build: Merge r371635 — nico / ViewSVN

rL:371635 - C:371635 - #554 (Sep 11, 2019 9:29:20 AM)

  1. Reland "clang-misexpect: Profile Guided Validation of Performance Annotations in LLVM"

    This patch contains the basic functionality for reporting potentially
    incorrect usage of __builtin_expect() by comparing the developer's
    annotation against a collected PGO profile. A more detailed proposal and
    discussion appears on the CFE-dev mailing list
    (http://lists.llvm.org/pipermail/cfe-dev/2019-July/062971.html) and a
    prototype of the initial frontend changes appear here in D65300

    We revised the work in D65300 by moving the misexpect check into the
    LLVM backend, and adding support for IR and sampling based profiles, in
    addition to frontend instrumentation.

    We add new misexpect metadata tags to those instructions directly
    influenced by the llvm.expect intrinsic (branch, switch, and select)
    when lowering the intrinsics. The misexpect metadata contains
    information about the expected target of the intrinsic so that we can
    check against the correct PGO counter when emitting diagnostics, and the
    compiler's values for the LikelyBranchWeight and UnlikelyBranchWeight.
    We use these branch weight values to determine when to emit the
    diagnostic to the user.

    A future patch should address the comment at the top of
    LowerExpectIntrisic.cpp to hoist the LikelyBranchWeight and
    UnlikelyBranchWeight values into a shared space that can be accessed
    outside of the LowerExpectIntrinsic pass. Once that is done, the
    misexpect metadata can be updated to be smaller.

    In the long term, it is possible to reconstruct portions of the
    misexpect metadata from the existing profile data. However, we have
    avoided this to keep the code simple, and because some kind of metadata
    tag will be required to identify which branch/switch/select instructions
    are influenced by the use of llvm.expect

    Patch By: paulkirth
    Differential Revision: https://reviews.llvm.org/D66324 — phosek / ViewSVN
  2. Revert [InstCombine] Use SimplifyFMulInst to simplify multiply in fma.

    This introduces additional rounding error in some cases. See D67434.

    This reverts r371518 (git commit 18a1f0818b659cee13865b4fad2648d85984a4ed) — fhahn / ViewSVN
  3. [Clang][Bundler] Fix for a potential memory leak [NFC]

    Bundler leaks memory if it is called with -type=o but given input isn't an object file (though it has to have a known binary type like IR, archive, etc...). Memory leak is happening when binary object returned by the createBinary(...) call cannot be casted to an ObjectFile type. In this case returned BinaryOrErr object releases ownership of the binary, but no one is taking it (see line 626).

    Differential Revision: https://reviews.llvm.org/D67416 — sdmitriev / ViewSVN
  4. [OPENMP] Update the diagnosis message for canonical loop form, by Chi
    Chun Chen.

    The previous patch (https://reviews.llvm.org/D54441) support the
    relational-op != very well for openmp canonical loop form, however,
    it didn't update the diagnosis message. So this patch is simply
    update the diagnosis message by adding !=, update the test
    related to it, and update the section number for canonical loop
    form for OpenMP 5.0 in comment.

    Differential Revision: https://reviews.llvm.org/D66559 — abataev / ViewSVN
  5. [InstSimplify] Pass SimplifyQuery into simplifyUnsignedRangeCheck() and use it for isKnownNonZero()

    This was actually the original intention in D67332,
    but i messed up and forgot about it.
    This patch was originally part of D67411, but precommitting this. — lebedevri / ViewSVN
  6. [NFC][InstSimplify] Add extra test for D67411 with @llvm.assume — lebedevri / ViewSVN

rL:371626 - C:371627 - #553 (Sep 11, 2019 7:52:34 AM)

  1. [scudo][standalone] Android related improvements

    Summary:
    This changes a few things to improve memory footprint and performances
    on Android, and fixes a test compilation error:
    - add `stdlib.h` to `wrappers_c_test.cc` to address
      https://bugs.llvm.org/show_bug.cgi?id=42810
    - change Android size class maps, based on benchmarks, to improve
      performances and lower the Svelte memory footprint. Also change the
      32-bit region size for said configuration
    - change the `reallocate` logic to reallocate in place for sizes larger
      than the original chunk size, when they still fit in the same block.
      This addresses patterns from `memory_replay` dumps like the following:
    ```
    202: realloc 0xb48fd000 0xb4930650 12352
    202: realloc 0xb48fd000 0xb48fd000 12420
    202: realloc 0xb48fd000 0xb48fd000 12492
    202: realloc 0xb48fd000 0xb48fd000 12564
    202: realloc 0xb48fd000 0xb48fd000 12636
    202: realloc 0xb48fd000 0xb48fd000 12708
    202: realloc 0xb48fd000 0xb48fd000 12780
    202: realloc 0xb48fd000 0xb48fd000 12852
    202: realloc 0xb48fd000 0xb48fd000 12924
    202: realloc 0xb48fd000 0xb48fd000 12996
    202: realloc 0xb48fd000 0xb48fd000 13068
    202: realloc 0xb48fd000 0xb48fd000 13140
    202: realloc 0xb48fd000 0xb48fd000 13212
    202: realloc 0xb48fd000 0xb48fd000 13284
    202: realloc 0xb48fd000 0xb48fd000 13356
    202: realloc 0xb48fd000 0xb48fd000 13428
    202: realloc 0xb48fd000 0xb48fd000 13500
    202: realloc 0xb48fd000 0xb48fd000 13572
    202: realloc 0xb48fd000 0xb48fd000 13644
    202: realloc 0xb48fd000 0xb48fd000 13716
    202: realloc 0xb48fd000 0xb48fd000 13788
    ...
    ```
      In this situation we were deallocating the old chunk, and
      allocating a new one for every single one of those, but now we can
      keep the same chunk (we just updated the header), which saves some
      heap operations.

    Reviewers: hctim, morehouse, vitalybuka, eugenis, cferris, rengolin

    Reviewed By: morehouse

    Subscribers: srhines, delcypher, #sanitizers, llvm-commits

    Tags: #llvm, #sanitizers

    Differential Revision: https://reviews.llvm.org/D67293 — cryptoad / ViewSVN
  2. [OPENMP]Updated status page, NFC. — abataev / ViewSVN
  3. gn build: Merge r371562 — nico / ViewSVN
  4. LLVM: Optimization Pass: Remove conflicting attribute, if any, before
    adding new read attribute to an argument
    Summary: Update optimization pass to prevent adding read-attribute to an
    argument without removing its conflicting attribute.

    A read attribute, based on the result of the attribute deduction
    process, might be added to an argument. The attribute might be in
    conflict with other read/write attribute currently associated with the
    argument. To ensure the compatibility of attributes, conflicting
    attribute, if any, must be removed before a new one is added.

    The following snippet shows the current behavior of the compiler, where
    the compilation process is aborted due to incompatible attributes.

    $ cat x.ll
    ; ModuleID = 'x.bc'

    %_type_of_d-ccc = type <{ i8*, i8, i8, i8, i8 }>

    @d-ccc = internal global %_type_of_d-ccc <{ i8* null, i8 1, i8 13, i8 0,
    i8 -127 }>, align 8

    define void @foo(i32* writeonly %.aaa) {
    foo_entry:
      %_param_.aaa = alloca i32*, align 8
      store i32* %.aaa, i32** %_param_.aaa, align 8
      store i8 0, i8* getelementptr inbounds (%_type_of_d-ccc,
    %_type_of_d-ccc* @d-ccc, i32 0, i32 3)
      ret void
    }

    $ opt -O3 x.ll
    Attributes 'readnone and writeonly' are incompatible!
    void (i32*)* @foo
    in function foo
    LLVM ERROR: Broken function found, compilation aborted!
    The purpose of this changeset is to fix the above error. This fix is
    based on a suggestion from Johannes @jdoerfert (many thanks!!!)
    Authored By: anhtuyen
    Reviewer: nicholas, rnk, chandlerc, jdoerfert
    Reviewed By: rnk
    Subscribers: hiraditya, jdoerfert, llvm-commits, anhtuyen, LLVM
    Tag: LLVM
    Differential Revision: https://reviews.llvm.org/D58694 — whitneyt / ViewSVN
  5. [ConstProp] add tests for fma that produce NaN; NFC — spatel / ViewSVN
  6. [libFuzzer] Make -merge=1 to reuse coverage information from the control file.

    Summary:
    This change allows to perform corpus merging in two steps. This is useful when
    the user wants to address the following two points simultaneously:

    1) Get trustworthy incremental stats for the coverage and corpus size changes
        when adding new corpus units.
    2) Make sure the shorter units will be preferred when two or more units give the
        same unique signal (equivalent to the `REDUCE` logic).

    This solution was brainstormed together with @kcc, hopefully it looks good to
    the other people too. The proposed use case scenario:

    1) We have a `fuzz_target` binary and `existing_corpus` directory.
    2) We do fuzzing and write new units into the `new_corpus` directory.
    3) We want to merge the new corpus into the existing corpus and satisfy the
        points mentioned above.
    4) We create an empty directory `merged_corpus` and run the first merge step:

        `
        ./fuzz_target -merge=1 -merge_control_file=MCF ./merged_corpus ./existing_corpus
        `

        this provides the initial stats for `existing_corpus`, e.g. from the output:

        `
        MERGE-OUTER: 3 new files with 11 new features added; 11 new coverage edges
        `

    5) We recreate `merged_corpus` directory and run the second merge step:

        `
        ./fuzz_target -merge=1 -merge_control_file=MCF ./merged_corpus ./existing_corpus ./new_corpus
        `

        this provides the final stats for the merged corpus, e.g. from the output:

        `
        MERGE-OUTER: 6 new files with 14 new features added; 14 new coverage edges
        `

    Alternative solutions to this approach are:

    A) Store precise coverage information for every unit (not only unique signal).
    B) Execute the same two steps without reusing the control file.

    Either of these would be suboptimal as it would impose an extra disk or CPU load
    respectively, which is bad given the quadratic complexity in the worst case.

    Tested on Linux, Mac, Windows.

    Reviewers: morehouse, metzman, hctim, kcc

    Reviewed By: morehouse

    Subscribers: JDevlieghere, delcypher, mgrang, #sanitizers, llvm-commits, kcc

    Tags: #llvm, #sanitizers

    Differential Revision: https://reviews.llvm.org/D66107 — dor1s / ViewSVN
  7. [ConstProp] move test file from InstSimplify; NFC

    These are constant folding tests; there is no code
    directly in InstSimplify for this. — spatel / ViewSVN
  8. [InstSimplify] regenerate test CHECKs; NFC — spatel / ViewSVN

rL:371616 - C:371605 - #552 (Sep 11, 2019 6:46:22 AM)

  1. [Alignment][NFC] use llvm::Align for AsmPrinter::EmitAlignment

    Summary:
    This is patch is part of a series to introduce an Alignment type.
    See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
    See this patch for the introduction of the type: https://reviews.llvm.org/D64790

    Reviewers: courbet

    Subscribers: dschuff, sdardis, nemanjai, hiraditya, kbarton, jrtc27, MaskRay, atanasyan, jsji, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67443 — gchatelet / ViewSVN
  2. [LangRef] add link for fma intrinsic — spatel / ViewSVN

rL:371612 - C:371605 - #551 (Sep 11, 2019 5:39:25 AM)

  1. Bring back clang-x64-ninja-win7/windows7-buildbot

    Summary:
    Bring back clang-x64-ninja-win7/windows7-buildbot with correct info and 'autodetect' visual studio parameter.


    Reviewers: gkistanova

    Reviewed By: gkistanova

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67402 — itaraban / ViewSVN
  2. [LangRef] fix punctuation; NFC — spatel / ViewSVN
  3. gn build: add include_dir that's necessary after r371564 — nico / ViewSVN
  4. [InstCombine] fold sign-bit compares of srem

    (srem X, pow2C) sgt/slt 0 can be reduced using bit hacks by masking
    off the sign bit and the module (low) bits:
    https://rise4fun.com/Alive/jSO
    A '2' divisor allows slightly more folding:
    https://rise4fun.com/Alive/tDBM

    Any chance to remove an 'srem' use is probably worthwhile, but this is limited
    to the one-use improvement case because doing more may expose other missing
    folds. That means it does nothing for PR21929 yet:
    https://bugs.llvm.org/show_bug.cgi?id=21929

    Differential Revision: https://reviews.llvm.org/D67334 — spatel / ViewSVN
  5. [Alignment] Use llvm::Align in MachineFunction and TargetLowering - fixes mir parsing

    Summary:
    This catches malformed mir files which specify alignment as log2 instead of pow2.
    See https://reviews.llvm.org/D65945 for reference,

    This is patch is part of a series to introduce an Alignment type.
    See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
    See this patch for the introduction of the type: https://reviews.llvm.org/D64790

    Reviewers: courbet

    Subscribers: MatzeB, qcolombet, dschuff, arsenm, sdardis, nemanjai, jvesely, nhaehnle, hiraditya, kbarton, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, jsji, Petar.Avramovic, asbirlea, s.egerton, pzheng, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67433 — gchatelet / ViewSVN
  6. [mips][msa] Fix infinite loop for mips.nori.b intrinsic

    When value of immediate in `mips.nori.b` is 255 (which has all ones in
    binary form as 8bit integer) DAGCombiner and Legalizer would fall in an
    infinite loop. DAGCombiner would try to simplify `or %value, -1` by
    turning `%value` into UNDEF. Legalizer will turn it back into `Constant<0>`
    which would then be again turned into UNDEF by DAGCombiner. To avoid this
    loop we make UNDEF legal for MSA int types on Mips.

    Patch by Mirko Brkusanin.

    Differential Revision: https://reviews.llvm.org/D67280 — atanasyan / ViewSVN
  7. Fix -Wdocumentation warning - void function doesn't need a @returns. NFCI. — rksimon / ViewSVN

rL:371604 - C:371605 - #550 (Sep 11, 2019 4:11:26 AM)

  1. [Diagnostics] Add -Wsizeof-array-div

    Summary: Clang version of https://www.viva64.com/en/examples/v706/

    Reviewers: rsmith

    Differential Revision: https://reviews.llvm.org/D67287 — xbolva00 / ViewSVN
  2. [NFC] Updated objsize-64.ll test — xbolva00 / ViewSVN
  3. [NFC] Fixed test — xbolva00 / ViewSVN
  4. [InstCombine] Fixed handling of isOpNewLike (PR11748) — xbolva00 / ViewSVN
  5. [LoopInterchange] Drop unused splitInnerLoopHeader declaration. — fhahn / ViewSVN

rL:371598 - C:371598 - #549 (Sep 11, 2019 3:09:48 AM)

  1. Revert "clang-misexpect: Profile Guided Validation of Performance Annotations in LLVM"

    This reverts commit r371584. It introduced a dependency from compiler-rt
    to llvm/include/ADT, which is problematic for multiple reasons.

    One is that it is a novel dependency edge, which needs cross-compliation
    machinery for llvm/include/ADT (yes, it is true that right now
    compiler-rt included only header-only libraries, however, if we allow
    compiler-rt to depend on anything from ADT, other libraries will
    eventually get used).

    Secondly, depending on ADT from compiler-rt exposes ADT symbols from
    compiler-rt, which would cause ODR violations when Clang is built with
    the profile library. — gribozavr / ViewSVN

rL:371595 - C:371597 - #548 (Sep 11, 2019 2:10:16 AM)

  1. [ARM] Take into account -mcpu and -mfpu options while handling 'crypto' feature

    Submittin in behalf of krisb (Kristina Bessonova) <ch.bessonova@gmail.com>

    Summary:
    '+crypto' means '+aes' and '+sha2' for arch >= ARMv8 when they were
    not disabled explicitly. But this is correctly handled only in case of
    '-march' option, though the feature may also be specified through
    the '-mcpu' or '-mfpu' options. In the following example:

      $ clang -mcpu=cortex-a57 -mfpu=crypto-neon-fp-armv8

    'aes' and 'sha2' are disabled that is quite unexpected:

      $ clang -cc1 -triple armv8--- -target-cpu cortex-a57
        <...> -target-feature -sha2 -target-feature -aes -target-feature +crypto

    This exposed by https://reviews.llvm.org/D63936 that makes
    the 'aes' and 'sha2' features disabled by default.

    So, while handling the 'crypto' feature we need to take into account:
      - a CPU name, as it provides the information about architecture
        (if no '-march' option specified),
      - features, specified by the '-mcpu' and '-mfpu' options.

    Reviewers: SjoerdMeijer, ostannard, labrinea, dnsampaio

    Reviewed By: dnsampaio

    Subscribers: ikudrin, javed.absar, kristof.beyls, cfe-commits

    Tags: #clang

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

    Author: krisb — dnsampaio / ViewSVN
  2. [LoopInterchange] Properly move condition, induction increment and ops to latch.

    Currently we only rely on the induction increment to come before the
    condition to ensure the required instructions get moved to the new
    latch.

    This patch duplicates and moves the required instructions to the
    newly created latch. We move the condition to the end of the new block,
    then process its operands. We stop at operands that are defined
    outside the loop, or are the induction PHI.

    We duplicate the instructions and update the uses in the moved
    instructions, to ensure other users remain intact. See the added
    test2 for such an example.

    Reviewers: efriedma, mcrosier

    Reviewed By: efriedma

    Differential Revision: https://reviews.llvm.org/D67367 — fhahn / ViewSVN
  3. [NFC][ARM] Add and modify tests

    Add test for ParallelDSP. — sam_parker / ViewSVN

rL:371593 - C:371586 - #547 (Sep 11, 2019 12:58:29 AM)

  1. [LTO] Avoid calling GlobalValue::getGUID (MD5) twice — maskray / ViewSVN

rL:371592 - C:371586 - #546 (Sep 11, 2019 12:27:31 AM)

  1. [TLI][AMDGPU] AMDPAL does not have library functions

    Configure TLI to say that r600/amdgpu does not have any library
    functions, such that InstCombine does not do anything like turn sin/cos
    into the library function @tan with sufficient fast math flags.

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

    Change-Id: I02f907d3e64832117ea9800e9f9285282856e5df — tpr / ViewSVN
  2. [llvm-objcopy] Simplify --prefix-alloc-sections

    Handle --prefix-alloc-sections after --rename-sections so that --prefix-alloc-sections code
    does not have to check if renaming has been performed.

    Reviewed By: jhenderson

    Differential Revision: https://reviews.llvm.org/D66931 — maskray / ViewSVN
  3. [Attributor] Implement "noalias" callsite argument deduction

    Summary: Now, `nocapture` is deduced in Attributor therefore, this patch introduces deduction for `noalias` callsite argument using `nocapture`.

    Reviewers: jdoerfert, sstefan1

    Reviewed By: jdoerfert

    Subscribers: lebedev.ri, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67286 — uenoku / ViewSVN
  4. [Attributor][Fix] Manifest nocapture only in CSArgument or Argument

    Summary:
    We can query to Attributor whether the value is captured in the scope or not on the following way:

    ```
        const auto & NoCapAA = A.getAAFor<AANoCapture>(*this, IRPosition::value(V));
    ```
    And if V is CallSiteReturned then `getDeducedAttribute` will add `nocatpure` to the callsite returned value. It is not valid.
    This patch checks the position is an argument or call site argument.

    This is tested in D67286.

    Reviewers: jdoerfert, sstefan1

    Reviewed By: jdoerfert

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67342 — uenoku / ViewSVN

rL:371587 - C:371586 - #545 (Sep 10, 2019 11:11:53 PM)

  1. [Debuginfo][Instcombiner] Do not clone dbg.declare.

    TryToSinkInstruction() has a bug: While updating debug info for
    sunk instruction, it could clone dbg.declare intrinsic.
    That is wrong. There could be only one dbg.declare.
    The fix is to not clone dbg.declare intrinsic and to update
    it`s arguments, to not to point to sunk instruction.

    Differential Revision: https://reviews.llvm.org/D67217 — avl / ViewSVN

rL:371585 - C:371586 - #544 (Sep 10, 2019 7:30:18 PM)

  1. [CodeGen] Add alias for cpu_dispatch function with IFunc & Fix resolver linkage type

    Multi-versioned functions defined by cpu_dispatch and implemented with IFunc
    can not be called outside the translation units where they are defined due to
    lack of symbols. This patch add function aliases for these functions and thus
    make them visible outside.

    Differential Revision: https://reviews.llvm.org/D67058
    Patch by Senran Zhang — maskray / ViewSVN
  2. [llvm-nm] Fix -DBUILD_SHARED_LIBS=ON builds after D66160/r371576 — maskray / ViewSVN

rL:371584 - C:371584 - #543 (Sep 10, 2019 6:11:46 PM)

  1. clang-misexpect: Profile Guided Validation of Performance Annotations in LLVM

    This patch contains the basic functionality for reporting potentially
    incorrect usage of __builtin_expect() by comparing the developer's
    annotation against a collected PGO profile. A more detailed proposal and
    discussion appears on the CFE-dev mailing list
    (http://lists.llvm.org/pipermail/cfe-dev/2019-July/062971.html) and a
    prototype of the initial frontend changes appear here in D65300

    We revised the work in D65300 by moving the misexpect check into the
    LLVM backend, and adding support for IR and sampling based profiles, in
    addition to frontend instrumentation.

    We add new misexpect metadata tags to those instructions directly
    influenced by the llvm.expect intrinsic (branch, switch, and select)
    when lowering the intrinsics. The misexpect metadata contains
    information about the expected target of the intrinsic so that we can
    check against the correct PGO counter when emitting diagnostics, and the
    compiler's values for the LikelyBranchWeight and UnlikelyBranchWeight.
    We use these branch weight values to determine when to emit the
    diagnostic to the user.

    A future patch should address the comment at the top of
    LowerExpectIntrisic.cpp to hoist the LikelyBranchWeight and
    UnlikelyBranchWeight values into a shared space that can be accessed
    outside of the LowerExpectIntrinsic pass. Once that is done, the
    misexpect metadata can be updated to be smaller.

    In the long term, it is possible to reconstruct portions of the
    misexpect metadata from the existing profile data. However, we have
    avoided this to keep the code simple, and because some kind of metadata
    tag will be required to identify which branch/switch/select instructions
    are influenced by the use of llvm.expect

    Patch By: paulkirth
    Differential Revision: https://reviews.llvm.org/D66324 — phosek / ViewSVN
  2. Emit -Wmicrosoft-enum-value warning instead of error in MS ABI

    Summary:
    The first NFC change is to replace a getCXXABI().isMicrosoft() check
    with getTriple().isWindowsMSVCEnvironment(). This code takes effect in
    non-C++ compilations, so it doesn't make sense to check the C++ ABI. In
    the MS ABI, enums are always considered to be "complete" because the
    underlying type of an unfixed enum will always be 'int'. This behavior
    was moved from -fms-compatibility to MS ABI back in r249656.

    The second change is functional, and it downgrades an error to a warning
    when the MS ABI is used rather than only under -fms-compatibility. The
    reasoning is that it's unreasonable for the following code to reject the
    following code for all MS ABI targets with -fno-ms-compatibility:
      enum Foo { Foo_Val = 0xDEADBEEF };
    This is valid code for any other target, but in the MS ABI, Foo_Val just
    happens to be negative. With this change, clang emits a
    -Wmicrosoft-enum-value warning on this code, but compiles it without
    error.

    Fixes PR38478

    Reviewers: hans, rsmith, STL_MSFT

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67304 — rnk / ViewSVN
  3. Revert "llvm-reduce: Add pass to reduce parameters"

    Looks to be failing on asan buildbots

    This reverts commit r371567. — dblaikie / ViewSVN
  4. Revert "Adding support for overriding LLVM_ENABLE_RUNTIMES for runtimes builds."

    This reverts commit r371566: this doesn't correctly handle the case
    where LLVM_ENABLE_RUNTIMES contains a list of values. — phosek / ViewSVN
  5. [clang-scan-deps][NFC] Fix tests - prevent FileCheck matching test dir path

    Differential Revision: https://reviews.llvm.org/D67379 — Jan Korous / ViewSVN
  6. [Object][TextAPI] NFC, fix tapi lit tests

    FileCheck command had wrong casing, which works fine on macOS, repairs the linux build bots — cishida / ViewSVN

rL:371576 - C:371571 - #542 (Sep 10, 2019 5:11:52 PM)

  1. [llvm-nm] Add tapi file support

    Summary:
    This commit is the final one for adding tapi support to the llvm-nm implementation.
    This commit also has accompanying tests the additions to lib/Object

    Reviewers: ributzka, steven_wu

    Reviewed By: ributzka

    Subscribers: hiraditya, plotfi, dexonsmith, rupprecht, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D66160 — cishida / ViewSVN
  2. Remove xfail i386 NetBSD mark in vptr-non-unique-typeinfo.cpp

    This test passes now. — kamil / ViewSVN
  3. Remove xfail NetBSD mark from ignored-interceptors-mmap.cpp

    This test now passes. — kamil / ViewSVN
  4. [MemorySSA] MemorySSA should not model debuginfo, and need not update it.

    Reverts the change in r371084, but keeps the test.
    After r371565, debuginfo cannot be modelled in MemorySSA, even with a
    non-standard AA pipeline. — asbirlea / ViewSVN
  5. [GlobalISel] When a tail call is emitted in a block, stop translating it

    This fixes a crash in tail call translation caused by assume and lifetime_end
    intrinsics.

    It's possible to have instructions other than a return after a tail call which
    will still have `Analysis::isInTailCallPosition` return true. (Namely,
    lifetime_end and assume intrinsics.)

    If we emit a tail call, we should stop translating instructions in the block.
    Otherwise, we can end up emitting an extra return, or dead instructions in
    general. This makes the verifier unhappy, and is generally unfortunate for
    codegen.

    This also removes the code from AArch64CallLowering that checks if we have a
    tail call when lowering a return. This is covered by the new code now.

    Also update call-translator-tail-call.ll to show that we now properly tail call
    in the presence of lifetime_end and assume.

    Differential Revision: https://reviews.llvm.org/D67415 — paquette / ViewSVN
  6. [clang-format] Apply BAS_AlwaysBreak to C++11 braced lists

    See PR18455.

    Differential Revision: https://reviews.llvm.org/D67395 — owenpan / ViewSVN
  7. [AArch64][GlobalISel] Support sibling calls with mismatched calling conventions

    Add support for sibcalling calls whose calling convention differs from the
    caller's.

    - Port over `CCState::resultsCombatible` from CallingConvLower.cpp into
      CallLowering. This is used to verify that the way the caller and callee CC
      handle incoming arguments matches up.

    - Add `CallLowering::analyzeCallResult`. This is basically a port of
      `CCState::AnalyzeCallResult`, but using `ArgInfo` rather than `ISD::InputArg`.

    - Add `AArch64CallLowering::doCallerAndCalleePassArgsTheSameWay`. This checks
      that the calling conventions are compatible, and that the caller and callee
      preserve the same registers.

    For testing:

    - Update call-translator-tail-call.ll to show that we can now handle this.

    - Add a GISel line to tailcall-ccmismatch.ll to show that we will not tail call
      when the regmasks don't line up.

    Differential Revision: https://reviews.llvm.org/D67361 — paquette / ViewSVN
  8. Update ReleaseNotes: add enabling of MemorySSA. — asbirlea / ViewSVN
  9. Reland "Change the X86 datalayout to add three address spaces
    for 32 bit signed, 32 bit unsigned, and 64 bit pointers."
    This reverts 57076d3199fc2b0af4a3736b7749dd5462cacda5.

    Original review at https://reviews.llvm.org/D64931.
    Review for added fix at https://reviews.llvm.org/D66843. — akhuang / ViewSVN
  10. llvm-reduce: Add pass to reduce parameters

    Patch by Diego Treviño!

    Differential Revision: https://reviews.llvm.org/D65479 — dblaikie / ViewSVN
  11. Adding support for overriding LLVM_ENABLE_RUNTIMES for runtimes builds.

    On some platforms, certain runtimes are not supported. For runtimes builds of
    those platforms it would be nice if we could disable certain runtimes (ie
    libunwind on Windows).



    Differential Revision: https://reviews.llvm.org/D67195 — zer0 / ViewSVN
  12. [MemorySSA] Do not create memoryaccesses for debug info intrinsics.

    Summary:
    Do not model debuginfo intrinsics in MemorySSA.
    Regularly these are non-memory modifying instructions. With -disable-basicaa, they were being modelled as Defs.

    Reviewers: george.burgess.iv

    Subscribers: aprantl, Prazek, sanjoy.google, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67307 — asbirlea / ViewSVN
  13. llvm-reduce: Remove some unused headers/more narrowly include them — dblaikie / ViewSVN

rL:371563 - C:371559 - #541 (Sep 10, 2019 3:26:20 PM)

  1. llvm-remove: Remove "using namespace" in header. — dblaikie / ViewSVN
  2. llvm-reduce: Add pass to reduce Metadata

    Patch by Diego Treviño!

    Differential Revision: https://reviews.llvm.org/D65026 — dblaikie / ViewSVN
  3. Move LLVM_ENABLE_ABI_BREAKING_CHECKS variables to their own file
    so that you don't have to link Error.o and all of its dependencies.

    In more detail: global initializers in Error.o can't be elided with
    -ffunction-sections/-gc-sections since they always need to be run
    causing a fairly significant binary bloat if all you want is the
    ABI breaking checks code.

    Differential Revision: https://reviews.llvm.org/D67387 — echristo / ViewSVN
  4. Actually reorder not and env in crash-recovery-modules.m — rnk / ViewSVN

rL:371558 - C:371557 - #540 (Sep 10, 2019 2:52:47 PM)

  1. [Loads] Move generic code out of vectorizer into a location it might be reused [NFC] — reames / ViewSVN
  2. When evaluating a __builtin_constant_p conditional, always enter
    constant-folding mode regardless of the original evaluation mode.

    In order for this to be correct, we need to track whether we're checking
    for a potential constant expression or checking for undefined behavior
    separately from the evaluation mode enum, since we don't want to clobber
    those states when entering constant-folding mode. — rsmith / ViewSVN
  3. [ValueTracking] Factor our common speculation suppression logic [NFC]

    Expose a utility function so that all places which want to suppress speculation (when otherwise legal) due to ordering and/or sanitizer interaction can do so. — reames / ViewSVN
  4. llvm-reduce: Simplify testing using -implicit-check-not

    Also fix llvm-reduce to use the specified output file name directly,
    without appending '.ll' to the name. — dblaikie / ViewSVN

rL:371551 - C:371553 - #539 (Sep 10, 2019 1:37:03 PM)

  1. [OPENMP5.0]Allow teams directive outside of the target directives.

    According to OpenMP 5.0, teams directives are allowed not only in the
    target context, but also in the implicit parallel regions. — abataev / ViewSVN
  2. Re-land Remove REQUIRES:shell from tests that pass for me on Windows

    This reverts r371497 (git commit 3d7e9ab7b9f8c53aa41420c54970f0fb421004a2)

    Reorder `not` with `env` in these two tests so they pass:
      Driver/rewrite-map-in-diagnostics.c
      Index/crash-recovery-modules.m.

    This will not be necessary after D66531 lands. — rnk / ViewSVN
  3. [x86] add test for false dependency with AVX; NFC

    Goes with D67363 — spatel / ViewSVN
  4. [NFC][InstCombine] rewrite test added in r371537 to use non-null pointer instead

    I only want to ensure that %offset is non-zero there,
    it doesn't matter how that info is conveyed.
    As filed in PR43267, the assumption way does not work. — lebedevri / ViewSVN

rL:371547 - C:371548 - #538 (Sep 10, 2019 12:19:44 PM)

  1. Fix for PR43175: compiler crash when trying to emit noncapturable
    constant.

    If the constexpr variable is partially initialized, the initializer can
    be emitted as the structure, not as an array, because of some early
    optimizations. The llvm variable gets the type from this constant and,
    thus, gets the type which is pointer to struct rather than pointer to an
    array. We need to convert this type to be truely array, otherwise it may
    lead to the compiler crash when trying to emit array subscript
    expression. — abataev / ViewSVN
  2. [X86] Updated target specific selection dag code to conservatively check for isAtomic in addition to isVolatile

    See D66309 for context.

    This is the first sweep of x86 target specific code to add isAtomic bailouts where appropriate. The intention here is to have the switch from AtomicSDNode to LoadSDNode/StoreSDNode be close to NFC; that is, I'm not looking to allow additional optimizations at this time.

    Sorry for the lack of tests.  As discussed in the review, most of these are vector tests (for which atomicity is not well defined) and I couldn't figure out to exercise the anyextend cases which aren't vector specific.

    Differential Revision: https://reviews.llvm.org/D66322 — reames / ViewSVN
  3. [NFC][InstSimplify] rewrite test added in r371537 to use non-null pointer instead

    I only want to ensure that %offset is non-zero there,
    it doesn't matter how that info is conveyed.
    As filed in PR43267, the assumption way does not work. — lebedevri / ViewSVN

rL:371542 - C:371530 - #537 (Sep 10, 2019 11:34:19 AM)

  1. GlobalISel/TableGen: Handle REG_SEQUENCE patterns

    The scalar f64 patterns don't work yet because they fail on multiple
    results from the unused implicit def of scc in the result bit
    operation. — arsenm / ViewSVN

rL:371541 - C:371530 - #536 (Sep 10, 2019 10:36:48 AM)

  1. [BPI] Adjust the probability for floating point unordered comparison

    Since NaN is very rare in normal programs, so the probability for floating point unordered comparison should be extremely small. Current probability is 3/8, it is too large, this patch changes it to a tiny number.

    Differential Revision: https://reviews.llvm.org/D65303 — carrot / ViewSVN
  2. AMDGPU/GlobalISel: Select G_FABS/G_FNEG

    f64 doesn't work yet because tablegen currently doesn't handlde
    REG_SEQUENCE.

    This does regress some multi use VALU fneg cases since now the
    immediate remains in an SGPR, and more moves are used for legalizing
    the xor. This is a SIFixSGPRCopies deficiency. — arsenm / ViewSVN
  3. AMDGPU/GlobalISel: Select cvt pk intrinsics — arsenm / ViewSVN
  4. AMDGPU/GlobalISel: Select llvm.amdgcn.sffbh — arsenm / ViewSVN
  5. [NFC][InstCombine][InstSimplify] PR43251 - and some patterns with offset != 0

    https://rise4fun.com/Alive/21b — lebedevri / ViewSVN

rL:371536 - C:371530 - #535 (Sep 10, 2019 9:50:08 AM)

  1. AMDGPU/GlobalISel: RegBankSelect for G_ZEXTLOAD/G_SEXTLOAD — arsenm / ViewSVN
  2. AMDGPU/GlobalISel: Legalize constant 32-bit loads

    Legalize by casting to a 64-bit constant address. This isn't how the
    DAG implements it, but it should. — arsenm / ViewSVN
  3. [RISCV] Support llvm-objdump -M no-aliases and -M numeric

    Summary:
    Now that llvm-objdump allows target-specific options, we match the
    `no-aliases` and `numeric` options for RISC-V, as supported by GNU objdump.

    This is done by overriding the variables used for the command-line options, so
    that the command-line options are still supported.

    This patch updates all tests using `llvm-objdump -riscv-no-aliases` to use
    `llvm-objdump -M no-aliases`.

    Reviewers: luismarques, asb

    Reviewed By: luismarques, asb

    Subscribers: pzheng, 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, s.egerton, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D66139 — lenary / ViewSVN
  4. AMDGPU/GlobalISel: First pass at attempting to legalize load/stores

    There's still a lot more to do, but this handles decomposing due to
    alignment. I've gotten it to the point where nothing crashes or
    infinite loops the legalizer. — arsenm / ViewSVN
  5. [RISCV] Add Option for Printing Architectural Register Names

    Summary:
    This is an option primarily to use during testing. Instead of always
    printing registers using their ABI names, this allows a user to request they
    are printed with their architectural name.

    This is then used in the register constraint tests to ensure the mapping
    between architectural and abi names is correct.

    Reviewers: asb, luismarques

    Reviewed By: asb

    Subscribers: pzheng, 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, s.egerton, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D65950 — lenary / ViewSVN
  6. Don't emit .gnu_pubnames when tuning for LLDB.

    LLDB reads the various .apple* accelerator tables (and in the near
    future: the DWARF 5 accelerator tables) which should make
    .gnu_pubnames redundant. This changes the Clang driver to no longer
    pass -ggnu-pubnames when tuning for LLDB.

    Thanks to David Blaikie for pointing this out!
    http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20190422/thread.html#646062

    rdar://problem/50142073

    Differential Revision: https://reviews.llvm.org/D67373 — Adrian Prantl / ViewSVN
  7. [x86] add a test for BreakFalseDeps; NFC

    As discussed in D67363 — spatel / ViewSVN

rL:371527 - C:371522 - #534 (Sep 10, 2019 8:35:04 AM)

  1. Revert "[utils] Implement the llvm-locstats tool"

    This reverts commit rL371520. — djtodoro / ViewSVN
  2. [ARM] add test for BreakFalseDeps with minsize attribute; NFC — spatel / ViewSVN
  3. [X86] Add AVX partial dependency tests as noted on D67363 — rksimon / ViewSVN
  4. [ARM] auto-generate complete test checks; NFC — spatel / ViewSVN

rL:371523 - C:371522 - #533 (Sep 10, 2019 7:21:36 AM)

  1. [VectorUtils] Remove unused include. [NFC]

    Patch by Francesco Petrogalli <francesco.petrogalli@arm.com>

    Reviewers: fhahn

    Reviewed By: fhahn

    Differential Revision: https://reviews.llvm.org/D67365 — fhahn / ViewSVN
  2. [clang][codegen][NFC] Make test patterns more permissive.

    See the discussion in:
    http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20190909/692736.html — courbet / ViewSVN
  3. [CMake] Don't pass all LLVM_COMPILE_FLAGS to the C compiler

    GCC (unlike clang!) warns about C++ flags when compiling C.

    https://reviews.llvm.org/D67171 — davezarzycki / ViewSVN
  4. [utils] Implement the llvm-locstats tool

    The tool reports verbose output for the DWARF debug location coverage.
    The llvm-locstats for each variable or formal parameter DIE computes what
    percentage from the code section bytes, where it is in scope, it has
    location description. The line 0 shows the number (and the percentage) of
    DIEs with no location information, but the line 100 shows the number (and
    the percentage) of DIEs where there is location information in all code
    section bytes (where the variable or parameter is in the scope). The line
    50..59 shows the number (and the percentage) of DIEs where the location
    information is in between 50 and 59 percentage of its scope covered.

    The tool will be very useful for tracking improvements regarding the
    "debugging optimized code" support with LLVM ecosystem.

    Differential Revision: https://reviews.llvm.org/D66526 — djtodoro / ViewSVN

rL:371519 - C:371497 - #532 (Sep 10, 2019 6:46:39 AM)

  1. [NFC][InstCombine] PR43251 - valid for other predicates too — lebedevri / ViewSVN
  2. [InstCombine] Use SimplifyFMulInst to simplify multiply in fma.

    This allows us to fold fma's that multiply with 0.0. Also, the
    multiply by 1.0 case is handled there as well. The fneg/fabs cases
    are not handled by SimplifyFMulInst, so we need to keep them.

    Reviewers: spatel, anemet, lebedev.ri

    Reviewed By: spatel

    Differential Revision: https://reviews.llvm.org/D67351 — fhahn / ViewSVN
  3. [InstCombine] Precommit tests for D67351. — fhahn / ViewSVN
  4. [BreakFalseDeps] fix typos/grammar in documentation comment; NFC — spatel / ViewSVN

rL:371515 - C:371497 - #531 (Sep 10, 2019 5:51:30 AM)

  1. [Object] Implement relocation resolver for COFF ARM/ARM64

    Adding testscases for this via llvm-dwarfdump.

    Also add testcases for the existing resolver support for X86.

    Differential Revision: https://reviews.llvm.org/D67340 — mstorsjo / ViewSVN
  2. Fix the "git modified" issue on the preserve-comments-crlf.s.

    Summary:
    rL371473 corrected the line ending (to crlf) in preserve-comments-crlf.s, but it causes a wired issue on git
    repository (I ran git pull today, it showed a local change of that file even I did not change anything).

    Reviewers: gribozavr

    Reviewed By: gribozavr

    Subscribers: llvm-commits, cfe-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67391 — hokein / ViewSVN
  3. [Alignment][NFC] Use llvm::Align for TargetLowering::getPrefLoopAlignment

    Summary:
    This is patch is part of a series to introduce an Alignment type.
    See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
    See this patch for the introduction of the type: https://reviews.llvm.org/D64790

    Reviewers: courbet

    Reviewed By: courbet

    Subscribers: wuzish, arsenm, nemanjai, jvesely, nhaehnle, hiraditya, kbarton, MaskRay, jsji, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67386 — gchatelet / ViewSVN
  4. Reland [DWARF] Add a unit test for DWARFUnit::getLength().

    This is a follow-up of rL369529, where the return value of
    DWARFUnit::getLength() was changed from uint32_t to uint64_t.
    The test checks that a unit header with Length > 4G can be successfully
    parsed and the value of the Length field is not truncated.

    Differential Revision: https://reviews.llvm.org/D67276 — ikudrin / ViewSVN

rL:371508 - C:371497 - #530 (Sep 10, 2019 4:07:28 AM)

  1. [AMDGPU]: PHI Elimination hooks added for custom COPY insertion.

      Reviewers: rampitec, vpykhtin

      Differential Revision: https://reviews.llvm.org/D67101 — alex-t / ViewSVN
  2. Revert "Reland "r364412 [ExpandMemCmp][MergeICmps] Move passes out of CodeGen into opt pipeline.""

    This reverts commit r371502, it broke tests
    (clang/test/CodeGenCXX/auto-var-init.cpp). — gribozavr / ViewSVN
  3. [llvm-dwarfdump] Add additional stats fields

    The additional fields will be parsed by the llvm-locstats tool in order to
    produce more human readable output of the DWARF debug location quality
    generated.

    Differential Revision: https://reviews.llvm.org/D66525 — djtodoro / ViewSVN
  4. Revert "[DWARF] Add a unit test for DWARFUnit::getLength()" because it broke ASAN bot. — ikudrin / ViewSVN
  5. [clangd] Collect location of macro definition in the ParsedAST

    allows semantic hightlighting macro definition

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67264 — hokein / ViewSVN
  6. [ExpandMemCmp] Add lit.local.cfg

    To prevent AArch64 tests from running when the target is not compiled.

    Fixes r371502:

    /home/buildslave/ps4-buildslave4/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/llvm.src/test/Transforms/ExpandMemCmp/AArch64/memcmp.ll:11:15: error: CHECK-NEXT: expected string not found in input
    ; CHECK-NEXT: [[TMP0:%.*]] = bitcast i8* [[S1:%.*]] to i64* — courbet / ViewSVN

rL:371502 - C:371497 - #529 (Sep 10, 2019 2:24:48 AM)

  1. Reland "r364412 [ExpandMemCmp][MergeICmps] Move passes out of CodeGen into opt pipeline."

    With a fix for sanitizer breakage (see explanation in D60318). — courbet / ViewSVN
  2. [yaml2obj] Set p_align to the maximum sh_addralign of contained sections

    The address difference between two sections in a PT_LOAD is a constant.
    Consider a hypothetical case (pagesize can be very small, say, 4).

    ```
    .text     sh_addralign=4
    .text.hot sh_addralign=16
    ```

    If we set p_align to 4, the PT_LOAD will be loaded at an address which
    is a multiple of 4. The address of .text.hot is guaranteed to be a
    multiple of 4, but not necessarily a multiple of 16.

    This patch deletes the constraint

      if (SHeader->sh_offset == PHeader.p_offset)

    Reviewed By: grimar, jhenderson

    Differential Revision: https://reviews.llvm.org/D67260 — maskray / ViewSVN
  3. [DWARF] Add a unit test for DWARFUnit::getLength().

    This is a follow-up of rL369529, where the return value of
    DWARFUnit::getLength() was changed from uint32_t to uint64_t.
    The test checks that a unit header with Length > 4G can be successfully
    parsed and the value of the Length field is not truncated.

    Differential Revision: https://reviews.llvm.org/D67276 — ikudrin / ViewSVN
  4. [Alignment] Use Align for TargetLowering::MinStackArgumentAlignment

    Summary:
    This is patch is part of a series to introduce an Alignment type.
    See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
    See this patch for the introduction of the type: https://reviews.llvm.org/D64790

    Reviewers: courbet

    Subscribers: sdardis, nemanjai, hiraditya, kbarton, jrtc27, MaskRay, atanasyan, jsji, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67288 — gchatelet / ViewSVN
  5. Revert Remove REQUIRES:shell from tests that pass for me on Windows

    This reverts r371478 (git commit a9980f60ce083fa6d5fd03c12c58ca0b293e3d60) — jhenderson / ViewSVN