Build stability: No recent builds failed.100
Build History
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems


r302669 (#5822) (May 10, 2017 8:27:23 AM)

  1. [InstCombine] fix typo in test comment; NFC — spatel / ViewSVN
  2. [ELF] - Don't segfault when assigning non-calculatable absolute symbol value.

    This is PR32664.

    Issue was revealed by linux kernel script which was:

    . = (0xffffffff80000000 + ALIGN(0x1000000, 0x200000));
    phys_startup_64 = ABSOLUTE(startup_64 - 0xffffffff80000000);

    .text : AT(ADDR(.text) - 0xffffffff80000000) {
    Where startup_64 is in .head.text.

    At the place of assignment to phys_startup_64 we can not calculate absolute value for startup_64
    because .text section has no VA assigned. Two patches were prepared earlier to address this: D32173 and D32174.

    And in comments for D32173 was suggested not try to support this case, but error out.

    Differential revision: https://reviews.llvm.org/D32793 — grimar / ViewSVN
  3. [SystemZ] Add miscellaneous instructions

    This adds a few missing instructions for the assembler and
    disassembler.  Those should be the last missing general-
    purpose (Chapter 7) instructions for the z10 ISA. — uweigand / ViewSVN
  4. [ELF] - Use LLVM_FALLTHROUGH in code.

    When compiling LLD using GCC 7 it reports warnings like:
    "warning: this statement may fall through [-Wimplicit-fallthrough=]"

    LLVM has LLVM_FALLTHROUGH macro which can be used to avoid such warnings.
    Together with D33036 this patch fixes them.

    Differential revision: https://reviews.llvm.org/D32907 — grimar / ViewSVN
  5. [SystemZ] Add missing arithmetic instructions

    This adds the remaining general arithmetic instructions
    for assembler / disassembler use.  Most of these are not
    useful for codegen; a few might be, and those are listed
    in the README.txt for future improvements. — uweigand / ViewSVN
  6. [llvm-readobj] Improve errors on invalid binary

    The previous code was discarding the error message from
    createBinary() by calling errorToErrorCode().
    This meant that such error were always reported unhelpfully
    as "Invalid data was encountered while parsing the file".

    Other tools such as llvm-objdump already produce a more
    the error message in this case.

    Differential Revision: https://reviews.llvm.org/D32985 — sbc / ViewSVN
  7. [OpenMP] Changes in the plugin interface

    This patch chagnes the plugin interface so that:
    1) future plugins can take advantage of systems with shared CPU/device storage
    2) instead of using base addresses, target regions are launched by providing target addresseds and base offsets explicitly.

    Differential revision: https://reviews.llvm.org/D33028 — grokos / ViewSVN
  8. Remove another use of section names. NFC. — rafael / ViewSVN
  9. Don't use section names in getFiller. NFC.

    This is just faster and avoids using names. — rafael / ViewSVN
  10. chang type from 'int' to 'size_t'. This will fix revision number 302652 — mzuckerm / ViewSVN
  11. [InstCombine] add (ashr (shl i32 X, 31), 31), 1 --> and (not X), 1

    This is another step towards favoring 'not' ops over random 'xor' in IR:

    This transformation may have occurred in longer IR sequences using computeKnownBits,
    but that could be much more expensive to calculate.

    As the scalar result shows, we do not currently favor 'not' in all cases. The 'not'
    created by the transform is transformed again (unnecessarily). Vectors don't have
    this problem because vectors are (wrongly) excluded from several other combines. — spatel / ViewSVN
  12. clang-format: refine calculating brace types.

    For C++ code, opening parenthesis following a } indicate a braced init. For JavaScript and other languages, this is an invalid syntactical construct, unless the closing parenthesis belongs to a function - in which situation its a BK_Block.

    This fixes indenting IIFEs following top level functions:

        function foo() {}
        (function() { codeHere(); }());

    clang-format used to collapse these lines together.

    Subscribers: klimek

    Differential Revision: https://reviews.llvm.org/D33006 — mprobst / ViewSVN
  13. [Polly][CMake] Fix syntactical errors in the exported config — pfaffe / ViewSVN
  14. Use explicit false instead of casted nullptr. NFC. — serge_sans_paille / ViewSVN
  15. Use clang++-3.5 compatible initializer_list constructor

    Otherwise, a warning is issued. — serge_sans_paille / ViewSVN
  16. Use clang++-3.5 compatible initializer_list constructor

    Otherwise, a warning is issued. — serge_sans_paille / ViewSVN
  17. [Fortran Support] Detect Fortran arrays & metadata from dragonegg output

    Add the ability to tag certain memory accesses as those belonging to
    Fortran arrays. We do this by pattern matching against known patterns
    of Dragonegg's LLVM IR output from Fortran code.

    Fortran arrays have metadata stored with them in a struct. This struct
    is called the "Fortran array descriptor", and a reference to this is
    stored in each MemoryAccess.

    Differential Revision: https://reviews.llvm.org/D32639 — bollu / ViewSVN
  18. [LLVM][inline-asm] Altmacro string escape character '!'

    This patch is the fourth patch in a series of reviews for the Altmacro feature.
    This patch introduces a new escape character '!' and it depends on D32701.

    according to https://sourceware.org/binutils/docs/as/Altmacro.html:
    "single-character string escape
    To include any single character literally in a string (even if the character would otherwise have some special meaning), you can prefix the character with !' (an exclamation mark). For example, you can write <4.3 !> 5.4!!>' to get the literal text `4.3 > 5.4!'. "

    Differential Revision: https://reviews.llvm.org/D32792 — mzuckerm / ViewSVN
  19. [DAGCombiner] Dropped explicit (sra 0, x) -> 0 and (sra -1, x) -> 0 folds.

    These are both handled (and tested) by the earlier ComputeNumSignBits == EltSizeInBits fold. — rksimon / ViewSVN
  20. [IfConversion] Add missing check in IfConversion/canFallThroughTo

    When trying to figure out if MBB could fallthrough to ToMBB (possibly by
    falling through a bunch of other MBBs) we didn't actually check if there
    was fallthrough between the last two blocks in the chain.

    Reviewers: kparzysz, iteratee, MatzeB

    Reviewed By: kparzysz, iteratee

    Subscribers: javed.absar, llvm-commits

    Differential Revision: https://reviews.llvm.org/D32996 — uabelho / ViewSVN
  21. [SystemZ]  Implement getRepRegClassFor()

    This method must return a valid register class, or the list-ilp isel
    scheduler will crash. For MVT::Untyped nullptr was previously returned, but
    now ADDR128BitRegClass is returned instead. This is needed just as long as
    list-ilp (and probably also list-hybrid) is still there.

    Review: Ulrich Weigand, A Trick
    https://reviews.llvm.org/D32802 — jonpa / ViewSVN
  22. [AMDGPU][MC] Corrected v_madak/madmk to avoid printing "_e32" in disassembler output

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

    Reviewers: vpykhtin, artem.tamazov, arsenm

    Differential Revision: https://reviews.llvm.org/D32913 — dpreobra / ViewSVN
  23. [GlobalISel][X86] Split test file. NFC — ibreger / ViewSVN

r302646 (#5821) (May 10, 2017 6:53:22 AM)

  1. [SystemZ] Add decimal integer instructions

    This adds the set of decimal integer (BCD) instructions for
    assembler / disassembler use. — uweigand / ViewSVN
  2. [SystemZ] Add crypto instructions

    This adds the set of message-security assist instructions for
    assembler / disassembler use. — uweigand / ViewSVN
  3. [SystemZ] Add translate/convert instructions

    This adds the set of character-set translate and convert instructions
    for assembler / disassembler use. — uweigand / ViewSVN
  4. [SystemZ] Add missing memory/string instructions

    This adds a number of missing memory and string instructions
    for assembler / disassembler use. — uweigand / ViewSVN
  5. [SystemZ] Reformat assembler/disassembler tests

    The assembler and disassmebler test cases started out formatted and
    sorted in a particular way, but this got lost over time as patches
    were added.  Reformat them again.  NFC. — uweigand / ViewSVN
  6. [DAGCombiner] Add vector support to fold (shl/srl 0, x) -> 0 — rksimon / ViewSVN
  7. Revert r301950: SpeculativeExecution: Stop using whitelist for costs

    This pass doesn't correctly handle testing for when it is legal to hoist
    arbitrary instructions. The whitelist happens to make it safe, so before
    it is removed the pass's legality checks will need to be enhanced.

    Details have been added to the code review thread for the patch. — chandlerc / ViewSVN
  8. [msan] Fix getmntent{_r} for empty /etc/fstab

    Some configuration (for instance default docker ubuntu images) uses
    a default empty and invalid /etc/fstab configuration file.  It makes
    any call to getmntent return NULL and it leads to failures on

    This patch fixes it by creating a temporary file with some valid
    entries (although not valid for the system) to use along with
    setmntent/getmntent. — azanella / ViewSVN
  9. [GPUJIT] Disabled gcc's -Wpedantic for use of dlsym

    GCC's ISO C standard does not strictly define the bahavior of converting
    a `void*` pointer to a function pointer, but dlsym's POSIX standard

    The retrieval of function pointers through dlsym in this case
    generates an unnecessary amount of warnings for every API function
    assignment, bloating the output.

    This patch removes GCC's `-Wpedantic` flag for retrieval and assignment
    of these functions. This simplifies debugging the output of GPUJIT.

    Differential Revision: https://reviews.llvm.org/D33008 — bollu / ViewSVN
  10. [clang-tidy] Add new cert-dcl21-cpp check

    This check flags postfix operator++/-- declarations,
    where the return type is not a const object.

    Differential Revision: https://reviews.llvm.org/D32743 — xazax / ViewSVN
  11. [Polly] Canonicalize arrays according to base-ptr equivalence class

        In case two arrays share base pointers in the same invariant load equivalence
        class, we canonicalize all memory accesses to the first of these arrays
        (according to their order in the equivalence class).

        This enables us to optimize kernels such as boost::ublas by ensuring that
        different references to the C array are interpreted as accesses to the same
        array. Before this change the runtime alias check for ublas would fail, as it
        would assume models of the C array with differing (but identically valued) base
        pointers would reference distinct regions of memory whereas the referenced
        memory regions were indeed identical.

        As part of this change we remove most of the MemoryAccess::get*BaseAddr
        interface. We removed already all references to get*BaseAddr in previous
        commits to ensure that no code relies on matching base pointers between
        memory accesses and scop arrays -- except for three remaining uses where we
        need the original base pointer. We document for these situations that
        MemoryAccess::getOriginalBaseAddr may return a base pointer that is distinct
        to the base pointer of the scop array referenced by this memory access.

    Reviewers: sebpop, Meinersbur, zinob, gareevroman, pollydev, huihuiz, efriedma, jdoerfert

    Reviewed By: Meinersbur

    Subscribers: etherzhhb

    Tags: #polly

    Differential Revision: https://reviews.llvm.org/D28518 — grosser / ViewSVN
  12. [mips] XFAIL getpwnam_r_invalid_user.cc test

    XFAIL this test while we investigate the root cause. — sdardis / ViewSVN

r302634 (#5820) (May 10, 2017 5:20:59 AM)

  1. [AArch64] Fix a comment to match the code. NFC.

    For the ELF case, the default/preferred form is the generic one, not
    the short one as used for Apple - fix the comment to say so. Currently
    it is a copy-paste typo.

    Make the comments on the darwin default a bit more verbose.

    Use enum names instead of literal 0/1 to further increase readability
    and reduce fragility.

    Differential Revision: https://reviews.llvm.org/D32963 — mstorsjo / ViewSVN
  2. [OpenCL] Handle OpenCL specific subelement types

    Reviewers: Anastasia, cfe-commits

    Reviewed By: Anastasia

    Subscribers: bader, yaxunl

    Differential Revision: https://reviews.llvm.org/D32898 — echuraev / ViewSVN

r302632 (#5819) (May 10, 2017 4:05:05 AM)

  1. [index] Index simple dependent declaration references

    This commit implements basic support for indexing of dependent declaration
    references. Now the indexer tries to find a suitable match in the base template
    for a dependent member ref/decl ref/dependent type.


    Differential Revision: https://reviews.llvm.org/D32972 — arphaman / ViewSVN
  2. Add a late IR expansion pass for the experimental reduction intrinsics.

    This pass uses a new target hook to decide whether or not to expand a particular
    intrinsic to the shuffevector sequence.

    Differential Revision: https://reviews.llvm.org/D32245 — Amara Emerson / ViewSVN

r302630 (#5818) (May 10, 2017 2:43:25 AM)

  1. [OpenCL] Added checking OpenCL version for cl_khr_mipmap_image built-ins

    Reviewers: Anastasia, cfe-commits

    Reviewed By: Anastasia

    Subscribers: bader, yaxunl

    Differential Revision: https://reviews.llvm.org/D32897 — echuraev / ViewSVN
  2. Fix use of removed SH test replacement %exec — ericwf / ViewSVN
  3. [Safestack] Fix the canary test to catch the libc's message regarding stack smashing

    By default glibc writes its diagnostics directly to tty so the `2>&1 |`
    redirection in the test doesn't catch the *** stack smashing detected ***
    message, which in turn breaks printing the lit's progress bar. By defining
    the LIBC_FATAL_STDERR_ environment variable we force glibc to direct
    diagnostic messages to stderr.

    Differential Revision: https://reviews.llvm.org/D32599 — kosarev / ViewSVN
  4. Attempt to speculatively unbreak Apple build bots — ericwf / ViewSVN
  5. [APInt] Fix indentation of tcDivide. Combine variable declaration and initialization. — ctopper / ViewSVN
  6. [APInt] Use getNumWords function in udiv/urem/udivrem instead of reimplementinging it. — ctopper / ViewSVN
  7. Add ASTMatchRefactorer and ReplaceNodeWithTemplate to RefactoringCallbacks

    Summary: This is the first change as part of developing a clang-query based search and replace tool.

    Reviewers: klimek, bkramer, ioeric, sbenza, jbangert

    Reviewed By: ioeric, jbangert

    Subscribers: sbenza, ioeric, cfe-commits

    Patch by Julian Bangert!

    Differential Revision: https://reviews.llvm.org/D29621 — ioeric / ViewSVN

r302623 (#5817) (May 10, 2017 1:23:27 AM)

  1. [GlobalISel][X86] G_ZEXT i1 to i32/i64 support.

    Summary: Support G_ZEXT i1 to i32/i64 instruction selection.

    Reviewers: zvi, guyblank

    Reviewed By: guyblank

    Subscribers: rovka, llvm-commits, kristof.beyls

    Differential Revision: https://reviews.llvm.org/D32965 — ibreger / ViewSVN

r302622 (#5816) (May 10, 2017 12:27:33 AM)

  1. [UnreachableBlockElim] Check return value of constrainRegClass().

    MachineRegisterInfo::constrainRegClass() can fail if two register classes
    don't have a common subclass or if the register class doesn't contain
    enough registers. Check the return value before trying to remove Phi nodes,
    and if we can't constrain, we output a COPY instead of simply replacing

    Reviewers: kparzysz, david2050, wmi

    Reviewed By: kparzysz

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D32999 — uabelho / ViewSVN

r302621 (#5815) (May 9, 2017 11:31:20 PM)

  1. Add noreturn attribute to avoid warnings about missing initialization

    Before this change we saw warnings such as:

      warning: variable 'DevPtr' is used uninitialized whenever switch default is
      taken [-Wsometimes-uninitialized]
        default: — grosser / ViewSVN

r302620 (#5814) (May 9, 2017 10:34:41 PM)

  1. Fix formatting in Polly — grosser / ViewSVN

r302619 (#5813) (May 9, 2017 9:07:19 PM)

  1. Rename Appveyor install helper script.

    I'm really lazy and the old name for the helper script
    killed 2 letter tab completion for the include directory.
    This patch renames it to avoid that problem and enable
    lazyness. — ericwf / ViewSVN
  2. Update Polly for LLVM API change r302571 that removed varargs functions
    with a nullptr sentinel in favor of nicely typed variadic templates. — chandlerc / ViewSVN
  3. Support using MinGW POSIX threads on Windows — ericwf / ViewSVN
  4. attempt to fix appveyor syntax error — ericwf / ViewSVN
  5. When we see a '<' operator, check whether it's a probable typo for a template-id.

    The heuristic that we use here is:
    * the left-hand side must be a simple identifier or a class member access
    * the right-hand side must be '<' followed by either a '>' or by a type-id that
       cannot be an expression (in particular, not followed by '(' or '{')
    * there is a '>' token matching the '<' token

    The second condition guarantees the expression would otherwise be ill-formed.

    If we're confident that the user intended the name before the '<' to be
    interpreted as a template, diagnose the fact that we didn't interpret it
    that way, rather than diagnosing that the template arguments are not valid
    expressions. — rsmith / ViewSVN
  6. Add MinGW64 builder to Appveyor.

    With the amount of work happening on Windows we should
    have a MinGW bot to make sure we don't regress that functionality.
    Currently it doesn't build :-( — ericwf / ViewSVN

r302613 (#5812) (May 9, 2017 7:38:40 PM)

  1. [Core] Make parallel algorithms match C++ Parallelism TS.

    Differential Revision: https://reviews.llvm.org/D33016 — zturner / ViewSVN
  2. [CodeGen] Don't require AA in TwoAddress at -O0.

    This is a follow-up to r302611, which moved an -O0 computation of DT
    from SDAGISel to TwoAddress.

    Don't use it here either, and avoid computing it completely.  The only
    use was forwarding the analysis as an optional argument to utility

    Differential Revision: https://reviews.llvm.org/D32766 — Ahmed Bougacha / ViewSVN
  3. [CodeGen] Don't require AA in SDAGISel at -O0.

    Before r247167, the pass manager builder controlled which AA
    implementations were used, exporting them all in the AliasAnalysis
    analysis group.

    Now, AAResultsWrapperPass always uses BasicAA, but still uses other AA
    implementations if made available in the pass pipeline.

    But regardless, SDAGISel is required at O0, and really doesn't need to
    be doing fancy optimizations based on useful AA results.

    Don't require AA at CodeGenOpt::None, and only use it otherwise.

    This does have a functional impact (and one testcase is pessimized
    because we can't reuse a load).  But I think that's desirable no matter

    Note that this alone doesn't result in less DT computations: TwoAddress
    was previously able to reuse the DT we computed for SDAG.  That will be
    fixed separately.

    Differential Revision: https://reviews.llvm.org/D32766 — Ahmed Bougacha / ViewSVN
  4. [CodeGen] Compute DT/LI lazily in SafeStackLegacyPass. NFC.

    We currently require SCEV, which requires DT/LI.  Those are expensive to
    compute, but the pass only runs for functions that have the safestack

    Compute DT/LI to build SCEV lazily, only when the pass is actually going
    to transform the function.

    Differential Revision: https://reviews.llvm.org/D31302 — Ahmed Bougacha / ViewSVN
  5. [CodeGen] Split SafeStack into a LegacyPass and a utility. NFC.

    This lets the pass focus on gathering the required analyzes, and the
    utility class focus on the transformation.

    Differential Revision: https://reviews.llvm.org/D31303 — Ahmed Bougacha / ViewSVN
  6. [CodeGen] Add an -O0 backend pipeline test. NFC.

    This should hopefully makes changes to the O0 pipeline obvious; it's
    easy to require expensive passes, and this helps make informed

    Case in point: in the few weeks separating the time when I initially
    wrote this patch to the time when I committed, the test regressed as
    r302103 added another use of DT! — Ahmed Bougacha / ViewSVN
  7. Improve how LIT reports the added environment variables — ericwf / ViewSVN

r302606 (#5811) (May 9, 2017 6:09:53 PM)

  1. [WebAssembly] Fix build error in wasm YAML code

    This warning didn't show up on my local build
    but is causing the bots to fail.  Seems like a
    bad idea to have types and variables with the
    same name anyhow.

    Differential Revision: https://reviews.llvm.org/D33022 — sbc / ViewSVN
  2. [InstCombine] add helper function for add X, C folds; NFCI — spatel / ViewSVN
  3. Attempt to unbreak Libc++ test configuration — ericwf / ViewSVN
  4. When instantiating a friend function template, don't forget to inherit default template arguments from other declarations. — rsmith / ViewSVN
  5. Fix test runtime environment on Windows — ericwf / ViewSVN
  6. [WebAssembly] Improve libObject support for wasm imports and exports

    Previously we had only supported the importing and
    exporting of functions and globals.

    Also, add usefull overload of getWasmSymbol() and
    getNumberOfSymbols() in support of lld port.

    Differential Revision: https://reviews.llvm.org/D33011 — sbc / ViewSVN
  7. Fix misspelling of environment throughout libc++ — ericwf / ViewSVN
  8. [InstCombine] add tests for andn; NFC — spatel / ViewSVN
  9. [ubsan] Mark overflow checks with !nosanitize

    Sanitizer instrumentation generally needs to be marked with !nosanitize,
    but we're not doing this properly for ubsan's overflow checks.

    r213291 has more information about why this is needed. — Vedant Kumar / ViewSVN
  10. [ProfileSummary] Make getProfileCount a non-static member function.

    This change is required because the notion of count is different for
    sample profiling and getProfileCount will need to determine the
    underlying profile type.

    Differential revision: https://reviews.llvm.org/D33012 — eraman / ViewSVN
  11. Don't mark a member as a member specialization until we know we're keeping the specialization.

    This improves our behavior in a few ways:

    * We now guarantee that if a member is marked as being a member
       specialization, there will actually be a member specialization declaration
       somewhere on its redeclaration chain. This fixes a crash in modules builds
       where we would try to check that there was a visible declaration of the
       member specialization and be surprised to not find any declaration of it at

    * We don't set the source location of the in-class declaration of the member
       specialization to the out-of-line declaration's location until we have
       actually finished merging them. This fixes some very silly looking
       diagnostics, where we'd point a "previous declaration is here" note at the
       same declaration we're complaining about. Ideally we wouldn't mess with the
       prior declaration's location at all, but too much code assumes that the
       first declaration of an entity is a reasonable thing to use as an indication
       of where it was declared, and that's not really true for a member
       specialization unless we fake it like this. — rsmith / ViewSVN
  12. FunctionImport: Simplify function llvm::thinLTOInternalizeModule. NFCI. — pcc / ViewSVN

r302594 (#5810) (May 9, 2017 4:40:33 PM)

  1. Fix clang_cl argument in fsanitize.c driver test. — eugenis / ViewSVN
  2. [Sema] Implement Core 2094: Trivial copy/move constructor for class with volatile member

    Summary: This patch implements http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#2094 which reverts Core 496.

    Reviewers: rsmith

    Reviewed By: rsmith

    Subscribers: cfe-commits

    Differential Revision: https://reviews.llvm.org/D32984 — ericwf / ViewSVN
  3. Update Clang C++ DR documentation for new issue list — ericwf / ViewSVN
  4. [asan] A clang flag to enable ELF globals-gc.

    This feature is subtly broken when the linker is gold 2.26 or
    earlier. See the following bug for details:

    Since the decision needs to be made at compilation time, we can not
    test the linker version. The flag is off by default on ELF targets,
    and on otherwise. — eugenis / ViewSVN
  5. Remove unnecessary calls to MakeArgString. — eugenis / ViewSVN
  6. [ExecutionEngine] Make RuntimeDyld::MemoryManager responsible for tracking EH

    RuntimeDyld was previously responsible for tracking allocated EH frames, but it
    makes more sense to have the RuntimeDyld::MemoryManager track them (since the
    frames are allocated through the memory manager, and written to memory owned by
    the memory manager). This patch moves the frame tracking into
    RTDyldMemoryManager, and changes the deregisterFrames method on
    RuntimeDyld::MemoryManager from:

    void deregisterEHFrames(uint8_t *Addr, uint64_t LoadAddr, size_t Size);


    void deregisterEHFrames();

    Separating this responsibility will allow ORC to continue to throw the
    RuntimeDyld instances away post-link (saving a few dozen bytes per lazy
    function) while properly deregistering frames when modules are unloaded.

    This patch also updates ORC to call deregisterEHFrames when modules are
    unloaded. This fixes a bug where an exception that tears down the JIT can then
    unwind through dangling EH frames that have been deallocated but not
    deregistered, resulting in UB.

    For people using SectionMemoryManager this should be pretty much a no-op. For
    people with custom allocators that override registerEHFrames/deregisterEHFrames,
    you will now be responsible for tracking allocated EH frames.

    Reviewed in https://reviews.llvm.org/D32829 — Lang Hames / ViewSVN
  7. Fix CGObjCGNU::init bug introduced by r302572 — serge_sans_paille / ViewSVN
  8. [GVN] Fix a crash on encountering non-integral pointers

    This fixes the immediate crash caused by introducing an incorrect inttoptr
    before attempting the conversion. There may still be a legality
    check missing somewhere earlier for non-integral pointers, but this change
    seems necessary in any case.

    Reviewers: sanjoy, dberlin

    Reviewed By: dberlin

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D32623 — kfischer / ViewSVN
  9. [AMDGPU] Fixed typo in GCNRegPressure, NFC

    VGRP -> VGPR, SGRP -> SGPR — rampitec / ViewSVN
  10. [InstCombine] update test file to use FileCheck; NFC — spatel / ViewSVN

r302584 (#5809) (May 9, 2017 3:03:38 PM)

  1. Import sys in repo.py.

    The find function in repo.py calls sys.exit on error. Without this import that
    call to exit will fail, masking the actual error message. This patch fixes that. — Lang Hames / ViewSVN
  2. DAGCombine: Combine shuffles of splat-shuffles

    Summary: Reapply r299047, but this time handle correctly splat-masks with undef elements.

    Reviewers: spatel, RKSimon, eli.friedman, andreadb

    Reviewed By: spatel

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D31961 — zvi / ViewSVN
  3. [AArch64] Consider widening instructions in cost calculations

    The AArch64 instruction set has a few "widening" instructions (e.g., uaddl,
    saddl, uaddw, etc.) that take one or more doubleword operands and produce
    quadword results. The operands are automatically sign- or zero-extended as
    appropriate. However, in LLVM IR, these extends are explicit. This patch
    updates TTI to consider these widening instructions as single operations whose
    cost is attached to the arithmetic instruction. It marks extends that are part
    of a widening operation "free" and applies a sub-target specified overhead
    (zero by default) to the arithmetic instructions.

    Differential Revision: https://reviews.llvm.org/D32706 — mssimpso / ViewSVN
  4. [InstCombine] clean up matchDeMorgansLaws(); NFCI

    The motivation for getting rid of dyn_castNotVal is to allow fixing:

    So this was supposed to be functional-change-intended for the case
    of inverting constants and applying DeMorgan. However, I can't find
    any cases where that pattern will actually get to matchDeMorgansLaws()
    because we have other folds in visitAnd/visitOr that do the same
    thing. So this ends up just being a clean-up patch with slight efficiency
    improvement, but no-functional-change-intended. — spatel / ViewSVN
  5. clang-format: [JS] Don't indent JavaScript IIFEs.

    Because IIFEs[1] are often used like an anonymous namespace around large
    sections of JavaScript code, it's useful not to indent to them (which
    effectively reduces the column limit by the indent amount needlessly).

    It's also common for developers to wrap these around entire files or
    libraries. When adopting clang-format, changing the indent entire file
    can reduce the usefulness of the blame annotations.

    Patch by danbeam, thanks!

    Differential Revision: https://reviews.llvm.org/D32989 — mprobst / ViewSVN
  6. [NewGVN] Simplify a DEBUG() statement. NFCI. — davide / ViewSVN

r302578 (#5808) (May 9, 2017 1:52:03 PM)

  1. [codeview] Check for a DIExpression offset for local variables

    Fixes inalloca parameters, which previously all pointed to the same
    offset. Extend the test to use llvm-readobj so that we can test the
    offset in a readable way. — rnk / ViewSVN
  2. Update testcase for upstream LLVM changes (r302469). — Adrian Prantl / ViewSVN
  3. Make it illegal for two Functions to point to the same DISubprogram

    As recently discussed on llvm-dev [1], this patch makes it illegal for
    two Functions to point to the same DISubprogram and updates
    FunctionCloner to also clone the debug info of a function to conform
    to the new requirement. To simplify the implementation it also factors
    out the creation of inlineAt locations from the Inliner into a
    general-purpose utility in DILocation.

    [1] http://lists.llvm.org/pipermail/llvm-dev/2017-May/112661.html

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

    This reapplies r302469 with a fix for a bot failure (reparentDebugInfo
    now checks for the case the orig and new function are identical). — Adrian Prantl / ViewSVN
  4. NFC: refactor replaceDominatedUsesWith

    Since I will post patch with some changes to
    replaceDominatedUsesWith, it would be good to avoid
    duplicating code again.

    Reviewers: davide, dberlin

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D32798 — prazek / ViewSVN
  5. [DWARF] Fix a parsing issue with type unit headers.

    Reviewers: dblaikie

    Differential Revision: https://reviews.llvm.org/D32987 — wolfgangp / ViewSVN
  6. Fix the Endianness bug by adding the little endian UTF marker.

    Summary: Quick fix

    Reviewers: zturner, uweigand

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D33014 — ecbeckmann / ViewSVN
  7. Suppress all uses of LLVM_END_WITH_NULL. NFC.

    Use variadic templates instead of relying on <cstdarg> + sentinel.

    This enforces better type checking and makes code more readable.

    Differential revision: https://reviews.llvm.org/D32550 — serge_sans_paille / ViewSVN
  8. Suppress all uses of LLVM_END_WITH_NULL. NFC.

    Use variadic templates instead of relying on <cstdarg> + sentinel.
    This enforces better type checking and makes code more readable.

    Differential Revision: https://reviews.llvm.org/D32541 — serge_sans_paille / ViewSVN
  9. [mips] XFAIL dfsan's custom.cc test on mips64.

    Test was already marked as failing for mips64el. Now that it's being
    tested on mips64, it has to be XFAILed there as well. — sdardis / ViewSVN

r302569 (#5807) (May 9, 2017 12:56:04 PM)

  1. [WebAssembly] Fix failing wasm-toolchain test

    This test was broken in r302558.

    Differential Revision: https://reviews.llvm.org/D33015 — sbc / ViewSVN
  2. [lanai] Add computeKnownBitsForTargetNode for Lanai.

    Summary: computeKnownBitsForTargetNode was not defined for Lanai which resulted in additional AND's with 0x1 for the output of SETCC instructions.

    Reviewers: eliben, majnemer

    Reviewed By: majnemer

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D29605 — jpienaar / ViewSVN
  3. [mips] Remove XFAIL from sanitizer_coverage_no_prune.cc

    Test is XPASSing, so remove the XFAIL marker. — sdardis / ViewSVN
  4. [NewGVN] Explain why sorting by pointer values doesn't introduce non-determinism.

    Thanks to Eli for pointing out in a post-commit review comment. — davide / ViewSVN
  5. [SystemZ] Support missing relocation types in RuntimeDyldELF

    Handle some more relocation types in

    This fixes a number of failing LLDB test cases. — uweigand / ViewSVN
  6. Add memory ORIGIN and LENGTH expression support

    Adds support for the ORIGIN and LENGTH linker script built in functions.

      ORIGIN(memory) Return the origin of the memory region
      LENGTH(memory) Return the length of the memory region

    Redo of D29775 for refactored linker script parsing.

    Patch by Robert Clarke

    Differential Revision: https://reviews.llvm.org/D32934 — ruiu / ViewSVN
  7. [SystemZ] Remove XFAIL on sanitizer_coverage_no_prune.cc

    This test case works fine on SystemZ as well. — uweigand / ViewSVN
  8. [SystemZ] Fix failures after D32542

    This commit made ubsan use the fast unwinder.  On SystemZ this requires
    test cases to be compiled with -mbackchain.  That was already done for
    asan, but not ubsan.  Add the flag for ubsan as well. — uweigand / ViewSVN
  9. [compiler-rt][mips] Fix a test for mips.

    GCC 4.9.2 likes the specialize one of the memcpys in msan_interceptors.cc,
    leading to test failure. — sdardis / ViewSVN
  10. [WebAssembly] Fix validation of start function

    The check for valid start function was inverted.  Added a new
    test in test/Object to check this case and fixed the existing
    tests in for ObjectYAML.

    Differential Revision: https://reviews.llvm.org/D32986 — sbc / ViewSVN
  11. [X86][LWP] Remove MSVC LWP intrinsics stubs.

    Now provided in lwpintrin.h — rksimon / ViewSVN
  12. [WebAssembly] Fix location and -flavor when running lld

    Add the toolchain installation directory to the program
    path so that lld can be found.

    Change -flavor to wasm.  Although this new flavor hasn't
    yet landed in upstream lld yet there are no point in
    passing wasm objects the gnu flavor.

    Differential Revision: https://reviews.llvm.org/D32976 — sbc / ViewSVN
  13. [X86][LWP] Removing LWP todo comment. NFCI.

    LWP / lwpintrin.h is now supported — rksimon / ViewSVN
  14. Build the Apple-style stage2 with modules

    Green dragon had a green stage2 modules bot for a long time now[1] and
    it is time to retire it and make a modules build the default for
    Apple-style stage2 builds.

    This patch turns on LLVM_ENABLE_MODULES.

    [1] http://green.lab.llvm.org/green/job/clang-stage2-cmake-modulesRDA_build/

    Differential Revision: https://reviews.llvm.org/D32603 — Adrian Prantl / ViewSVN

r302555 (#5806) (May 9, 2017 11:27:25 AM)

  1. Revert r302547 ([mips] Impose a threshold for coercion of aggregates)

      Modified MipsABIInfo::classifyArgumentType so that it now coerces
      aggregate structures only if the size of said aggregate is less than 16/64
      bytes, depending on the ABI.
    as it broke clang-with-lto-ubuntu builder. — petarj / ViewSVN
  2. [RegScavenger] Rangify a loop, NFC — kparzysz / ViewSVN
  3. Adding VSCode syntax colorizer to utils (generated from textmate colorizer).
    --This line, and those below, will be igored--

    A    utils/vscode
    A    utils/vscode/README
    A    utils/vscode/tablegen
    A    utils/vscode/tablegen/.vscode
    A    utils/vscode/tablegen/.vscode/launch.json
    A    utils/vscode/tablegen/CHANGELOG.md
    A    utils/vscode/tablegen/README.md
    A    utils/vscode/tablegen/language-configuration.json
    A    utils/vscode/tablegen/package.json
    A    utils/vscode/tablegen/syntaxes
    A    utils/vscode/tablegen/syntaxes/TableGen.tmLanguage
    A    utils/vscode/tablegen/vsc-extension-quickstart.md — zer0 / ViewSVN
  4. [NewGVN] Fix a consistent order for phi nodes operands.

    The way we currently define congruency for two PHIExpression(s) is:

    1) The operands to the phi functions are congruent
    2) The PHIs are defined in the same BasicBlock.

    NewGVN works under the assumption that phi operands are in predecessor
    order, or at least in some consistent order. OTOH, is valid IR:

      %meh = phi i16 [ %0, %winky ], [ %conv1, %tinky ]
      %banana = phi i16 [ %0, %tinky ], [ %conv1, %winky ]
      br label %end

    and the in-memory representations of the two SSA registers have an
    inconsistent order. This violation of NewGVN assumptions results into
    two PHIs found congruent when they're not. While we think it's useful
    to have always a consistent order enforced, let's fix this in NewGVN
    sorting uses in predecessor order before creating a PHI expression.

    Differential Revision:  https://reviews.llvm.org/D32990 — davide / ViewSVN
  5. [APInt] Remove return value from tcFullMultiply.

    The description says it returns the number of words needed to represent the results. But the way it was coded it always returns (lhsWords + rhsWords) or (lhsWords + rhsWords - 1). But the result could be even smaller than that and it wouldn't tell you.

    No one uses the result today so rather than try to fix it, just remove it. — ctopper / ViewSVN
  6. NewGVN: Make all of symbolic evaluation logically const. — dannyb / ViewSVN
  7. [X86] Add more patterns for BZHI isel

    This patch adds more patterns that a reasonable person might write that can be compiled to BZHI.

    This adds support for

    (~0U >> (32 - b)) & a;


    a << (32 - b) >> (32 - b);

    This was inspired by the code in APInt::clearUnusedBits.

    This can pass an index of 32 to the bzhi instruction which a quick test of Haswell hardware shows will not mask any bits. Though the description text in the Intel manual says the "index is saturated to OperandSize-1". The pseudocode in the same manual indicates no bits will be zeroed for this case.

    I think this is still missing cases where the subtract portion is an 8-bit operation.

    Differential Revision: https://reviews.llvm.org/D32616 — ctopper / ViewSVN
  8. [InstCombineCasts] Fix checks in sext->lshr->trunc pattern.

    The comment says to avoid the case where zero bits are shifted into the truncated value,
    but the code checks that the shift is smaller than the truncated value instead of the
    number of bits added by the sign extension. Fixing this allows a shift by more than the
    value size to be introduced, which is undefined behavior, so the shift is capped at the
    value size minus one, which has the expected behavior of filling the value with the sign

    Patch by Jacob Young!

    Differential Revision: https://reviews.llvm.org/D32285 — spatel / ViewSVN
  9. [mips] Impose a threshold for coercion of aggregates

    Modified MipsABIInfo::classifyArgumentType so that it now coerces aggregate
    structures only if the size of said aggregate is less than 16/64 bytes,
    depending on the ABI.

    Patch by Stefan Maksimovic.

    Differential Revision: https://reviews.llvm.org/D32900 — petarj / ViewSVN
  10. VX512] Only look at lower bit in constant scalar masks

    for scalar masked instructions only the lower bit of the mask is relevant. so for constant masks we should either do an unmasked operation or no operation, depending on the value of the lower bit.
    This patch handles cases where the lower bit is '1'.

    Differential Revision: https://reviews.llvm.org/D32805 — guyblank / ViewSVN
  11. [CodeCompletion] Complete platform names in @available expressions

    rdar://32074504 — arphaman / ViewSVN
  12. Re-land "Use the frame index side table for byval and inalloca arguments"

    This re-lands r302483. It was not the cause of PR32977. — rnk / ViewSVN
  13. Re-land "Don't add DBG_VALUE instructions for static allocas in dbg.declare"

    This re-lands commit r302461. It was not the cause of PR32977. — rnk / ViewSVN
  14. Revert r302476 "Update testcase for upstream LLVM changes."

    That test update was for r302469, which was reverted in r302533 due to PR32977. — hans / ViewSVN
  15. Allow compiler-rt to find lld and libc++ parallel to LLVM, as in the monorepo — rnk / ViewSVN

r302540 (#5805) (May 9, 2017 9:58:21 AM)

  1. Add support for pretty platform names to `@available`/

    This commit allows us to use the macOS/iOS/tvOS/watchOS platform names in


    Differential Revision: https://reviews.llvm.org/D33000 — arphaman / ViewSVN
  2. [Atomic] Remove IsStore/IsLoad in the interface, and pass the instruction instead. NFC.

    Now both emitLeadingFence and emitTrailingFence take the instruction
    itself, instead of taking IsLoad/IsStore pairs.
    Instruction::mayReadFromMemory and Instrucion::mayWriteToMemory are used
    for determining those two booleans.

    The instruction argument is also useful for later D32763, in
    emitTrailingFence. For emitLeadingFence, it seems to have cleaner
    interface with the proposed change.

    Differential Revision: https://reviews.llvm.org/D32762 — timshen / ViewSVN
  3. [scudo] CRC32 optimizations

    This change optimizes several aspects of the checksum used for chunk headers.

    First, there is no point in checking the weak symbol `computeHardwareCRC32`
    everytime, it will either be there or not when we start, so check it once
    during initialization and set the checksum type accordingly.

    Then, the loading of `HashAlgorithm` for SSE versions (and ARM equivalent) was
    not optimized out, while not necessary. So I reshuffled that part of the code,
    which duplicates a tiny bit of code, but ends up in a much cleaner assembly
    (and faster as we avoid an extraneous load and some calls).

    The following code is the checksum at the end of `scudoMalloc` for x86_64 with
    full SSE 4.2, before:
    mov     rax, 0FFFFFFFFFFFFFFh
    shl     r10, 38h
    mov     edi, dword ptr cs:_ZN7__scudoL6CookieE ; __scudo::Cookie
    and     r14, rax
    lea     rsi, [r13-10h]
    movzx   eax, cs:_ZN7__scudoL13HashAlgorithmE ; __scudo::HashAlgorithm
    or      r14, r10
    mov     rbx, r14
    xor     bx, bx
    call    _ZN7__scudo20computeHardwareCRC32Ejm ; __scudo::computeHardwareCRC32(uint,ulong)
    mov     rsi, rbx
    mov     edi, eax
    call    _ZN7__scudo20computeHardwareCRC32Ejm ; __scudo::computeHardwareCRC32(uint,ulong)
    mov     r14w, ax
    mov     rax, r13
    mov     [r13-10h], r14
    mov     rax, cs:_ZN7__scudoL6CookieE ; __scudo::Cookie
    lea     rcx, [rbx-10h]
    mov     rdx, 0FFFFFFFFFFFFFFh
    and     r14, rdx
    shl     r9, 38h
    or      r14, r9
    crc32   eax, rcx
    mov     rdx, r14
    xor     dx, dx
    mov     eax, eax
    crc32   eax, rdx
    mov     r14w, ax
    mov     rax, rbx
    mov     [rbx-10h], r14

    Reviewers: dvyukov, alekseyshl, kcc

    Reviewed By: alekseyshl

    Subscribers: aemerson, rengolin, llvm-commits

    Differential Revision: https://reviews.llvm.org/D32971 — cryptoad / ViewSVN
  4. Amend r302535; ifndef and ifdef are different, as it turns out. — aaronballman / ViewSVN
  5. [clang-tidy] Allow disabling compatibility check for generated fixes. — alexfh / ViewSVN
  6. ARMRegisterBankInfo.h requires LLVM_BUILD_GLOBAL_ISEL to be defined. If it is not defined, then ARMGenRegisterBank.inc is not table generated and the inclusion of this header causes the build to fail. — aaronballman / ViewSVN
  7. Change EOL style to LF. NFC — alexfh / ViewSVN

r302533 (#5804) (May 9, 2017 8:28:06 AM)

  1. Revert r302469 "Make it illegal for two Functions to point to the same DISubprogram"

    This caused PR32977.

    Original commit message:

    > Make it illegal for two Functions to point to the same DISubprogram
    > As recently discussed on llvm-dev [1], this patch makes it illegal for
    > two Functions to point to the same DISubprogram and updates
    > FunctionCloner to also clone the debug info of a function to conform
    > to the new requirement. To simplify the implementation it also factors
    > out the creation of inlineAt locations from the Inliner into a
    > general-purpose utility in DILocation.
    > [1] http://lists.llvm.org/pipermail/llvm-dev/2017-May/112661.html
    > <rdar://problem/31926379>
    > Differential Revision: https://reviews.llvm.org/D32975 — hans / ViewSVN

r302532 (#5803) (May 9, 2017 8:15:31 AM)

  1. [LV] Fix insertion point for shuffle vectors in first order recurrence

    In first order recurrence vectorization, when the previous value is a phi node, we need to
    set the insertion point to the first non-phi node.
    We can have the previous value being a phi node, due to the generation of new
    IVs as part of trunc optimization [1].

    [1] https://reviews.llvm.org/rL294967

    Reviewers: mssimpso, mkuper

    Subscribers: mzolotukhin, llvm-commits

    Differential Revision: https://reviews.llvm.org/D32969 — annat / ViewSVN
  2. Removing a file that is not necessary (and was causing link diagnostics with MSVC 2015); NFC. — aaronballman / ViewSVN
  3. Avoid unnecessary calls to vm_region_recurse

    Summary: This should significantly improve darwin lsan performance in cases where root regions are not used.

    Reviewers: alekseyshl, kubamracek

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D32966 — fjricci / ViewSVN

r302529 (#5802) (May 9, 2017 7:44:01 AM)

  1. [X86][AVX512] Refine some avx512er intrinsics tests. NFC.

    The modified tests should test the masked intrinsics.
    Currently the mask is constant, which with a future patch (https://reviews.llvm.org/D32805) will cause the intrinsics to be replaced with an unmasked version.
    This patch changes the constant mask to be a variable one. — guyblank / ViewSVN
  2. Use a simpler heuristic for placing orphans.

    This is a bit easier to read and a lot faster in some cases. A version
    of many-sections.s with linker scripts goes from 0m41.232s to
    0m19.575s. — rafael / ViewSVN

r302527 (#5801) (May 9, 2017 7:14:41 AM)

  1. Add extra operand to CALLSEQ_START to keep frame part set up previously

    Using arguments with attribute inalloca creates problems for verification
    of machine representation. This attribute instructs the backend that the
    argument is prepared in stack prior to  CALLSEQ_START..CALLSEQ_END
    sequence (see http://llvm.org/docs/InAlloca.htm for details). Frame size
    stored in CALLSEQ_START in this case does not count the size of this
    argument. However CALLSEQ_END still keeps total frame size, as caller can
    be responsible for cleanup of entire frame. So CALLSEQ_START and
    CALLSEQ_END keep different frame size and the difference is treated by
    MachineVerifier as stack error. Currently there is no way to distinguish
    this case from actual errors.

    This patch adds additional argument to CALLSEQ_START and its
    target-specific counterparts to keep size of stack that is set up prior to
    the call frame sequence. This argument allows MachineVerifier to calculate
    actual frame size associated with frame setup instruction and correctly
    process the case of inalloca arguments.

    The changes made by the patch are:
    - Frame setup instructions get the second mandatory argument. It
      affects all targets that use frame pseudo instructions and touched many
      files although the changes are uniform.
    - Access to frame properties are implemented using special instructions
      rather than calls getOperand(N).getImm(). For X86 and ARM such
      replacement was made previously.
    - Changes that reflect appearance of additional argument of frame setup
      instruction. These involve proper instruction initialization and
      methods that access instruction arguments.
    - MachineVerifier retrieves frame size using method, which reports sum of
      frame parts initialized inside frame instruction pair and outside it.

    The patch implements approach proposed by Quentin Colombet in
    It fixes 9 tests failed with machine verifier enabled and listed
    in PR27481.

    Differential Revision: https://reviews.llvm.org/D32394 — sepavloff / ViewSVN

r302526 (#5800) (May 9, 2017 6:59:51 AM)

  1. Revert "[MIPS] Add support to match more patterns for DINS instruction"

    This reverts commit rL302512. This broke the mips buildbots. — sdardis / ViewSVN
  2. [X86][SSE42] Lower v2i64/v4i64 ASHR(X, 63) as PCMPGTQ(0, X)

    Similar to what we do for vXi8 ASHR(X, 7), use SSE42's PCMPGTQ to splat the sign instead of using the PSRAD+PSHUFD.

    Avoiding bitcasts this improves combines that utilize computeNumSignBits, permits memory folding and reduces pipe pressure. Although it does require a second register, given that this is a (cheap) zero register the impact is minimal.

    Differential Revision: https://reviews.llvm.org/D32973 — rksimon / ViewSVN
  3. Revert "[Dwarf] Disable reference verification for now (PR32972)"

    This reverts commit r302520 because it break the unit tests. — rovka / ViewSVN

r302523 (#5799) (May 9, 2017 6:25:45 AM)

  1. clang-format: [JS] keep triple slash directives intact.

    TypeScript uses triple slash directives of the form:
        /// <reference path="..."/>

    For various non-source instructions that should not be wrapped.


    Reviewers: djasper

    Subscribers: cfe-commits, klimek

    Differential Revision: https://reviews.llvm.org/D32997 — mprobst / ViewSVN

r302522 (#5798) (May 9, 2017 6:19:37 AM)

  1. [clang-tidy] Minor cleanup + a disabled test case for PR26228. NFC — alexfh / ViewSVN
  2. PR5935: Adjust documentation.


    Patch by Johannes Altmanninger! — vvassilev / ViewSVN

r302520 (#5797) (May 9, 2017 6:15:45 AM)

  1. [Dwarf] Disable reference verification for now (PR32972)

    There is no other explanation about why this only started happening
    now, even though it crashes on old code (supposedly reachable from

    The only common factor between the failing bots is that they use GCC
    (4.9 and 5.3) to compile Clang, while the others use Clang 3.8, but the
    failure is while building the tests, as an assertion, on Clang.

    Commenting it out for now in hope the bots will go back green, but we
    should keep looking for the real cause, and update bugzilla. — rengolin / ViewSVN
  2. [X86][AVX512] Add test for masking of scalar instructions. — guyblank / ViewSVN

r302518 (#5796) (May 9, 2017 5:21:44 AM)

  1. Reland "Warn about unused static file scope function template declarations."

    This patch reinstates r299930, reverted in r299956, as a separate diagnostic
    option (-Wunused-template). — vvassilev / ViewSVN
  2. docs: Fix Sphinx detection with out-of-tree builds

    Adapt to changes made in r302499. — tstellar / ViewSVN

r302516 (#5795) (May 9, 2017 4:49:40 AM)

  1. docs: Fix Sphinx detection with out-of-tree builds

    Adapt to changes made in r302499. — tstellar / ViewSVN

r302515 (#5794) (May 9, 2017 4:29:48 AM)

  1. [Polly][PPCGCodeGen] OpenCL now gets kernel argument size from PPCG CodeGen

    Summary: PPCGCodeGeneration now attaches the size of the kernel launch parameters at the end of the parameter list. For the existing CUDA Runtime, this gets ignored, but the OpenCL Runtime knows to check for kernel-argument size at the end of the parameter list. (The resulting parameters list is twice as long. This has been accounted for in the corresponding test cases).

    Reviewers: grosser, Meinersbur, bollu

    Reviewed By: bollu

    Subscribers: nemanjai, yaxunl, Anastasia, pollydev, llvm-commits

    Tags: #polly

    Differential Revision: https://reviews.llvm.org/D32961 — bollu / ViewSVN
  2. Introduce experimental generic intrinsics for horizontal vector reductions.

    - This change allows targets to opt-in to using them instead of the log2
      shufflevector algorithm.
    - The SLP and Loop vectorizers have the common code to do shuffle reductions
      factored out into LoopUtils, and now have a unified interface for generating
      reductions regardless of the preference of the target. LoopUtils now uses TTI
      to determine what kind of reductions the target wants to handle.
    - For CodeGen, basic legalization support is added.

    Differential Revision: https://reviews.llvm.org/D30086 — Amara Emerson / ViewSVN

r302513 (#5793) (May 9, 2017 3:54:40 AM)

  1. [X86] Clang option -fuse-init-array has no effect when generating for MCU target

    Reviewers: Eugene.Zelenko, dschuff, craig.topper

    Reviewed By: craig.topper

    Subscribers: ahatanak, aaboud, DavidKreitzer, llvm-commits, cfe-commits

    Differential Revision: https://reviews.llvm.org/D32543
    Patch by AndreiGrischenko <andrei.l.grischenko@intel.com> — n.bozhenov / ViewSVN

r302512 (#5792) (May 9, 2017 3:44:21 AM)

  1. [MIPS] Add support to match more patterns for DINS instruction

    This patch adds support for recognizing patterns to match
    DINS instruction.

    Differential Revision: https://reviews.llvm.org/D31465 — spetrovic / ViewSVN

r302511 (#5791) (May 9, 2017 2:14:23 AM)

  1. [ARM GlobalISel] Remove hand-written G_FADD selection

    Remove the code selecting G_FADD - now that TableGen can handle more
    opcodes, it's not needed anymore. — rovka / ViewSVN

r302510 (#5790) (May 9, 2017 12:44:37 AM)

  1. [ConstantRange] Rewrite shl to avoid repeated calls to getUnsignedMax and avoid creating the min APInt until we're sure we need it. Use inplace shift operations. — ctopper / ViewSVN
  2. [ConstantRange] Combine the two adds max+1 in lshr into a single addition. — ctopper / ViewSVN

r302508 (#5789) (May 8, 2017 10:44:42 PM)

  1. [ConstantRange] Use APInt::isNullValue in place of comparing with 0. The compiler should be able to generate slightly better code for the former. NFC — ctopper / ViewSVN

r302507 (#5788) (May 8, 2017 10:00:38 PM)

  1. Fix PR32638 : Make sure we switch Sema's CurContext to the substituted FunctionDecl when instantiating the exception specification.

    This fixes the bug: https://bugs.llvm.org/show_bug.cgi?id=32638

      int main()
        [](auto x) noexcept(noexcept(x)) { } (0);

    In the above code, prior to this patch, when substituting into the noexcept expression, i.e. transforming the DeclRefExpr that represents 'x' - clang attempts to capture 'x' because Sema's CurContext is still pointing to the pattern FunctionDecl (i.e. the templated-decl set in FinishTemplateArgumentDeduction) which does not match the substituted 'x's DeclContext, which leads to an attempt to capture and an assertion failure. 

    We fix this by adjusting Sema's CurContext to point to the substituted FunctionDecl under which the noexcept specifier's argument should be transformed, and so the ParmVarDecl that 'x' refers to has the same declcontext and no capture is attempted.

    I briefly investigated whether the SwitchContext should occur right after VisitMethodDecl creates the new substituted FunctionDecl, instead of only during instantiating the exception specification - but seeing no other code that seemed to rely on that, I decided to leave it just for the duration of the exception specification instantiation. — faisalv / ViewSVN

r302506 (#5787) (May 8, 2017 9:44:39 PM)

  1. [Sema] Make typeof(OverloadedFunctionName) not a pointer.

    We were sometimes doing a function->pointer conversion in
    Sema::CheckPlaceholderExpr, which isn't the job of CheckPlaceholderExpr.

    So, when we saw typeof(OverloadedFunctionName), where
    OverloadedFunctionName referenced a name with only one function that
    could have its address taken, we'd give back a function pointer type
    instead of a function type. This is incorrect.

    I kept the logic for doing the function pointer conversion in
    resolveAndFixAddressOfOnlyViableOverloadCandidate because it was more
    consistent with existing ResolveAndFix* methods. — George Burgess IV / ViewSVN

r302505 (#5786) (May 8, 2017 9:05:32 PM)

  1. [ODRHash] Loosen checks on typedefs.

    When a type in a class is from a typedef, only check the canonical type.  Skip
    checking the intermediate underlying types.  This is in response to PR 32965 — rtrieu / ViewSVN

r302504 (#5785) (May 8, 2017 7:59:22 PM)

  1. Revert "Don't add DBG_VALUE instructions for static allocas in dbg.declare"

    This reverts commit r302461.

    It appears to be causing failures compiling gtest with debug info on the
    Linux sanitizer bot. I was unable to reproduce the failure locally,
    however. — rnk / ViewSVN

r302503 (#5784) (May 8, 2017 7:35:44 PM)

  1. [Sema][ObjC] Clean up possible null dereference.

    It appears that the code is actually dead since unbridged-cast
    placeholder types are created by calling CastOperation::complete and
    ImplicitCastExprs are never passed to it.

    Spotted by Vedant Kumar.

    rdar://problem/31542226 — ahatanak / ViewSVN

r302502 (#5783) (May 8, 2017 7:29:04 PM)

  1. Fix code section prefix for proper layout

    r284533 added hot and cold section prefixes based on profile
    information, to enable grouping of hot/cold functions at link time.
    However, it used "cold" as the prefix for cold sections, but gold only
    recognizes "unlikely" (which is used by gcc for cold sections).
    Therefore, cold sections were not properly being grouped. Switch to
    using "unlikely"

    Reviewers: danielcdh, davidxl

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D32983 — tejohnson / ViewSVN
  2. docs: Fix Sphinx detection with out-of-tree builds

    Adapt to changes made in r302499. — tstellar / ViewSVN
  3. docs: Fix Sphinx detection with out-of-tree builds

    Adapt to changes made in r302499. — tstellar / ViewSVN
  4. Revert "Revert "CMake: Move sphinx detection into AddSphinxTarget.cmake""

    This reverts commit r302054.

    Re-commit now that I have fixes for clang/lld. — tstellar / ViewSVN

r302498 (#5782) (May 8, 2017 7:15:19 PM)

  1. [libFuzzer] update docs on -print_coverage/-dump_coverage — kcc / ViewSVN
  2. Fix Windows tests when __config_site is present.
    Previously, the force includes would complain about a missing _DEBUG symbol.
    Now we dump macros before adding the force includes to the command line.
    Now with proper newlines. — bcraig / ViewSVN
  3. Revert "Fix Windows tests when __config_site is present."
    It's 2017, and line endings are still an issue. — bcraig / ViewSVN
  4. [CodeGen][ObjC] Emit @objc_retain at -O0 for variables captured by

    r302270 made changes to avoid emitting clang.arc.use at -O0 and instead
    emit @objc_release. We also have to emit @objc_retain for the captured
    variable at -O0 to match the @objc_release instead of just storing the
    pointer to the capture field. — ahatanak / ViewSVN
  5. [libFuzzer] make sure the input data is not overwritten in the fuzz target (if it is -- report an error) — kcc / ViewSVN
  6. Revert "Use the frame index side table for byval and inalloca arguments"

    This reverts r302483 and it's follow up fix. — rnk / ViewSVN

r302492 (#5781) (May 8, 2017 6:31:14 PM)

  1. [XRay] Add __xray_customeevent(...) as a clang-supported builtin

    We define the `__xray_customeevent` builtin that gets translated to
    IR calls to the correct intrinsic. The default implementation of this is
    a no-op function. The codegen side of this follows the following logic:

    - When `-fxray-instrument` is not provided in the driver, we elide all
    calls to `__xray_customevent`.
    - When `-fxray-instrument` is enabled and a function is marked as "never
    instrumented", we elide all calls to `__xray_customevent` in that
    function; if either marked as "always instrumented" or subject to
    threshold-based instrumentation, we emit a call to the
    `llvm.xray.customevent` intrinsic from LLVM for each
    `__xray_customevent` occurrence in the function.

    This change depends on D27503 (to land in LLVM first).

    Reviewers: echristo, rsmith

    Subscribers: mehdi_amini, pelikan, lrl, cfe-commits

    Differential Revision: https://reviews.llvm.org/D30018 — dberris / ViewSVN
  2. [Modules] Allow umbrella frameworks to define private submodules for subframeworks

    In r298391 we fixed the umbrella framework model to work when submodules
    named "Private" are used. This complements the work by allowing the
    umbrella framework model to work in general.

    rdar://problem/31790067 — Bruno Lopes / ViewSVN

r302490 (#5780) (May 8, 2017 6:08:12 PM)

  1. Rename a method. NFC. — Vedant Kumar / ViewSVN
  2. XFAIL noexcept member function throw/catch test under GCC.

    I'm still not exactly sure why the test fails, but I suspect it's
    a bug in GCC. More investigation needed. — ericwf / ViewSVN

r302488 (#5779) (May 8, 2017 5:40:41 PM)

  1. Fix GCC 7 test failures.

    This patch fixes the test failures and unexpected passes that occur
    when testing against GCC 7. Specifically:

    * don't mark __gcd as always inline because it's a recursive function. GCC diagnoses this.
    * don't XFAIL the aligned allocation tests. GCC 7 supports them but not the -faligned-allocation option.
    * Work around gcc.gnu.org/PR78489 in variants constructors. — ericwf / ViewSVN

r302487 (#5778) (May 8, 2017 5:30:35 PM)

  1. [APInt] Use default constructor instead of explicitly creating a 1-bit APInt in udiv and urem. NFC

    The default constructor does the same thing. — ctopper / ViewSVN
  2. [APInt] Remove 'else' after 'return' in udiv and urem. NFC — ctopper / ViewSVN

r302485 (#5777) (May 8, 2017 5:24:56 PM)

  1. Ignore !associated metadata with null argument.

    Fixes PR32577 (comment 10).
    Such metadata may legitimately appear in LTO. — eugenis / ViewSVN
  2. Relax Dwarf filecheck test for 32-bit hosts — rnk / ViewSVN
  3. Use the frame index side table for byval and inalloca arguments

    For inalloca functions, this is a very common code pattern:

      %argpack = type <{ i32, i32, i32 }>
      define void @f(%argpack* inalloca %args) {
        %a = getelementptr inbounds %argpack, %argpack* %args, i32 0, i32 0
        %b = getelementptr inbounds %argpack, %argpack* %args, i32 0, i32 1
        %c = getelementptr inbounds %argpack, %argpack* %args, i32 0, i32 2
        tail call void @llvm.dbg.declare(metadata i32* %a, ... "a")
        tail call void @llvm.dbg.declare(metadata i32* %c, ... "b")
        tail call void @llvm.dbg.declare(metadata i32* %b, ... "c")

    Even though these GEPs can be simplified to a constant offset from EBP
    or RSP, we don't do that at -O0, and each GEP is computed into a
    register. Registers used to compute argument addresses are typically
    spilled and clobbered very quickly after the initial computation, so
    live debug variable tracking loses information very quickly if we use
    DBG_VALUE instructions.

    This change moves processing of dbg.declare between argument lowering
    and basic block isel, so that we can ask if an argument has a frame
    index or not. If the argument lives in a register as is the case for
    byval arguments on some targets, then we don't put it in the side table
    and during ISel we emit DBG_VALUE instructions.

    Reviewers: aprantl

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D32980 — rnk / ViewSVN
  4. Add basic test case for -instnamer — sanjoy / ViewSVN
  5. [InstNamer] Use range-for — sanjoy / ViewSVN
  6. [InstNamer] Don't check type of arguments (they're never void) — sanjoy / ViewSVN
  7. Delete trailing whitespace — sanjoy / ViewSVN

r302478 (#5776) (May 8, 2017 4:45:15 PM)

  1. Skip install step if not requested. — gkistanova / ViewSVN
  2. Changed a default source code directory from llvm.src to llvm. — gkistanova / ViewSVN
  3. Update testcase for upstream LLVM changes. — Adrian Prantl / ViewSVN
  4. [InstCombine] add tests from D32285 to show current problems; NFC — spatel / ViewSVN
  5. Refactor <locale> RAII guards to aid upcoming Windows locale changes.

    Previously <locale> used std::unique_ptr<remove_ptr<locale_t>, locale-mgmt-function>
    as a scope guard for (A) creating new locales, and (B) setting the thread specific locale
    in RAII safe manner.

    However using unique_ptr has some problems, first it requires that locale_t is a pointer
    type, which may not be the case (Windows will need a non-pointer locale_t type that emulates _locale_t).

    The second problem is that users of the guards had to supply the locale management function to the custom
    deleter at every call site. However these locale management functions don't exist natively Windows, making
    a good Windows implementation of locale more difficult.

    This patch creates distinct and simply RAII guards that replace unique_ptr. These guards handle calling
    the correct locale management function so that callers don't have too. This simplification will
    aid in upcoming Windows fixes. — ericwf / ViewSVN
  6. Fix possible loss of data warnings on amd64

    In T_size_size.pass, there is an explicit template argument to std::min to ask
    for unsigned, to avoid type deduction errors. However, C1XX' warnings still
    hate this use, because a 64 bit value (a size_t) is being passed to a function
    accepting an unsigned (a 32 bit value).

    Instead, change the tests to pass around std::size_t instances, and explicitly
    narrow when constructing the string type under test. This also allows
    removal of explicit template arguments to std::min. — bion / ViewSVN
  7. Resolve integer overflow warnings in GCD and LCM tests

    19: Update headers to that actually used in the test.
    41: test0 was triggering narrowing warnings for all callers, because the
    inputs were always ints, but some of the explicit template arguments were
    smaller than that. Instead, have this function accept ints and static_cast
    explicitly to the types we want before calling std::lcm.
    47: Replace unnecessary ternary.
    55: Use foo_t instead of typename foo<>::type
    111/116: intX_t were not std::qualified but only <cfoo> headers were included.
    141: C1XX has a bug where it interprets 2147483648 as unsigned int. Then the
    negation trips "negation of unsigned value, result still unsigned" warnings.
    Perma-workaround this issue by saying INT_MIN, which better documents the
    intended behavior and avoids triggering warnings on C1XX.

    Same changes as lcm.pass.cpp but for GCD. — bion / ViewSVN
  8. Add const to "DWARFDie &Die" in a few functions as they can't change the DWARFDie. — gclayton / ViewSVN
  9. Fix typo — eugene / ViewSVN
  10. Make it illegal for two Functions to point to the same DISubprogram

    As recently discussed on llvm-dev [1], this patch makes it illegal for
    two Functions to point to the same DISubprogram and updates
    FunctionCloner to also clone the debug info of a function to conform
    to the new requirement. To simplify the implementation it also factors
    out the creation of inlineAt locations from the Inliner into a
    general-purpose utility in DILocation.

    [1] http://lists.llvm.org/pipermail/llvm-dev/2017-May/112661.html

    Differential Revision: https://reviews.llvm.org/D32975 — Adrian Prantl / ViewSVN
  11. [Driver] Don't enable -fsanitize-use-after-scope when ASan is disabled

    When enabling any sanitizer, -fsanitize-use-after-scope is enabled by
    default. This doesn't actually turn ASan on, because we've been getting
    lucky and there are extra checks in BackendUtil that stop this from

    However, this has been causing a behavior change: extra lifetime markers
    are emitted in some cases where they aren't needed or expected. — Vedant Kumar / ViewSVN
  12. STLExtras: Fix enumerate() documentation — matze / ViewSVN
  13. Fix typo "veify" to "verify". — gclayton / ViewSVN
  14. [InstCombine] add folds for not-of-shift-right

    This is another step towards getting rid of dyn_castNotVal,
    so we can recommit:

    As the tests show, we were missing the lshr case for constants
    and both ashr/lshr vector splat folds. The ashr case with constant
    was being performed inefficiently in 2 steps. It's also possible
    there was a latent bug in that case because we can't do that fold
    if the constant is positive:
    http://rise4fun.com/Alive/Bge — spatel / ViewSVN
  15. [PartialInlining] Capture by reference rather than by value. — davide / ViewSVN
  16. If we are building a module, and we read a second description of the same
    module from a different module map, ignore it.

    This happens during builds of preprocessed modules (where it is harmless). — rsmith / ViewSVN

r302462 (#5775) (May 8, 2017 3:15:52 PM)

  1. ARM: use divmod libcalls on embedded MachO platforms too.

    The separated libcalls are implemented in terms of __divmodsi4 and __udivmodsi4
    anyway, so we should always use them if possible. — Tim Northover / ViewSVN
  2. Don't add DBG_VALUE instructions for static allocas in dbg.declare

    An llvm.dbg.declare of a static alloca is always added to the
    MachineFunction dbg variable map, so these values are entirely
    redundant. They survive all the way through codegen to be ignored by
    DWARF emission.

    Effectively revert r113967

    Two bugpoint-reduced test cases from 2012 broke as a result of this
    change. Despite my best efforts, I haven't been able to rewrite the test
    case using dbg.value. I'm not too concerned about the lost coverage
    because these were reduced from the test-suite, which we still run.

    Reviewers: aprantl, dblaikie

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D32920 — rnk / ViewSVN
  3. Add some useful helper methods / operators to TypeIndex. — zturner / ViewSVN
  4. Update instructions for using the experimental monorepo — rnk / ViewSVN
  5. [BitVector] Make find_prev member function const.

    NFC. — zturner / ViewSVN

r302457 (#5774) (May 8, 2017 1:46:48 PM)

  1. Set ENABLE_WERROR=OFF for ABITestsuitBuilder. — gkistanova / ViewSVN
  2. Add a blurb to the release notes about the WeakVH -> WeakTrackingVH transition — sanjoy / ViewSVN
  3. Fixed 'haltOnFailure' for build step. — gkistanova / ViewSVN
  4. [CodeView] Add support for random access type visitors.

    Previously type visitation was done strictly sequentially, and
    TypeIndexes were computed by incrementing the TypeIndex of the
    last visited record.  This works fine for situations like dumping,
    but not when you want to visit types in random order.  For example,
    in a debug session someone might lookup a symbol by name, find that
    it has TypeIndex 10,000 and then want to go straight to TypeIndex

    In order to make this work, the visitation framework needs a mode
    where it can plumb TypeIndices through the callback pipeline.  This
    patch adds such a mode.  In doing so, it is necessary to provide
    an alternative implementation of TypeDatabase that supports random
    access, so that is done as well.

    Nothing actually uses these random access capabilities yet, but
    this will be done in subsequent patches.

    Differential Revision: https://reviews.llvm.org/D32928 — zturner / ViewSVN
  5. [AArch64][RegisterBankInfo] Change the default mapping of fp loads.

    This fixes PR32550, in a way that does not imply running the greedy
    mode at O0.

    The fix consists in checking if a load is used by any floating point
    instruction and if yes, we return a default mapping with FPR instead
    of GPR. — qcolombet / ViewSVN
  6. [AArch64][RegisterBankInfo] Fix mapping cost for GPR.

    In r292478, we changed the order of the enum that is referenced by
    PMI_FirstXXX. This had the side effect of changing the cost of the
    mapping of all the loads, instead of just the FPRs ones.

    Reinstate the higher cost for all but GPR loads.
    Note: This did not have any external visible effects:
    - For Fast mode, the cost would have been higher, but we don't care
      because we don't try to use alternative mappings.
    - For Greedy mode, the higher cost of the GPR loads, would have
      triggered the use of the supposedly alternative mapping, that
      would be in fact the same GPR mapping but with a lower cost. — qcolombet / ViewSVN
  7. [InstCombine] move/add tests for not(shr (not X), Y); NFC — spatel / ViewSVN
  8. [ARM] Use a Changed flag to avoid making a pass's return value dependent on a compare with a Statistic object.

    Statistic compile to always be 0 in release build so this compare would always return false. And in the debug builds Statistic are global variables and remember their values across pass runs. So this compare returns true anytime the pass runs after the first time it modifies something.

    This was found after reviewing all usages of comparison operators on a Statistic object. We had some internal code that did a compare with a statistic that caused a mismatch in output between debug and release builds. So we did an audit out of paranoia. — ctopper / ViewSVN

r302449 (#5773) (May 8, 2017 12:17:44 PM)

  1. [SCEV] Make setRange take ConstantRange by value instead of rvalue reference so we don't force anything on the caller. — ctopper / ViewSVN
  2. [SCEV] Don't use std::move on both inputs to APInt::operator+ or operator-. It might be confusing to the reader. NFC — ctopper / ViewSVN
  3. ConstantFold: Handle gep nonnull, undef as well — dannyb / ViewSVN
  4. ConstantFold: Fold  getelementptr (i32, i32* null, i64 undef) to null.
    Transforms/IndVarSimplify/2011-10-27-lftrnull will fail if this regresses.
    Transforms/GVN/PRE/2011-06-01-NonLocalMemdepMiscompile.ll has been changed to still test what it was
    trying to test. — dannyb / ViewSVN
  5. [X86][LWP] Add __LWP__ macro tests

    Missed in rL302418

    Differential Revision: https://reviews.llvm.org/D32770 — rksimon / ViewSVN
  6. [ValueTracking] Use KnownOnes to provide a better bound on known zeros for ctlz/cttz intrinics

    This patch uses KnownOnes of the input of ctlz/cttz to bound the value that can be returned from these intrinsics. This makes these intrinsics more similar to the handling for ctpop which already uses known bits to produce a similar bound.

    Differential Revision: https://reviews.llvm.org/D32521 — ctopper / ViewSVN
  7. Fix grammar in comment. NFC — Jonathan Roelofs / ViewSVN

r302442 (#5772) (May 8, 2017 10:48:45 AM)

  1. [X86] Split test configurations. NFC.

    Split test that includes reproducer for pr32967 to KNL and SKX. — zvi / ViewSVN
  2. Simplify orphan section positioning.

    The code following this one already considers every possible insertion
    point for orphan sections, there is no point in sorting them before. — rafael / ViewSVN
  3. [AST] Fix copy&paste error in comment. NFC. — malcolm.parsons / ViewSVN
  4. [InstSimplify] fix typo; NFC — spatel / ViewSVN
  5. [InstCombine] use local variable to reduce code duplication; NFCI — spatel / ViewSVN
  6. [ValueTracking] Introduce a version of computeKnownBits that returns a KnownBits struct. Begin using it to replace internal usages of ComputeSignBit

    This introduces a new interface for computeKnownBits that returns the KnownBits object instead of requiring it to be pre-constructed and passed in by reference.

    This is a much more convenient interface as it doesn't require the caller to figure out the BitWidth to pre-construct the object. It's so convenient that I believe we can use this interface to remove the special ComputeSignBit flavor of computeKnownBits.

    As a step towards that idea, this patch replaces all of the internal usages of ComputeSignBit with this new interface. As you can see from the patch there were a couple places where we called ComputeSignBit which really called computeKnownBits, and then called computeKnownBits again directly. I've reduced those places to only making one call to computeKnownBits. I bet there are probably external users that do it too.

    A future patch will update the external users and remove the ComputeSignBit interface. I'll also working on moving more locations to the KnownBits returning interface for computeKnownBits.

    Differential Revision: https://reviews.llvm.org/D32848 — ctopper / ViewSVN
  7. [InstCombine/InstSimplify] add comments about code duplication; NFC — spatel / ViewSVN
  8. [Sema] Fix typos handling in an overloadable call.

    In C typos in arguments in a call of an overloadable function lead
    to a failure of construction of CallExpr and following recovery does
    not handle created delayed typos. This causes an assertion fail in
    Sema::~Sema since Sema::DelayedTypos remains not empty.

    The patch fixes that behavior by handling a call with arguments
    having dependant types in the way that C++ does.

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

    Patch by Dmitry Borisenkov! — stulova / ViewSVN
  9. [InstCombine] add another test for PR32949; NFC

    A patch for the InstSimplify variant of this bug is up for review here:
    https://reviews.llvm.org/D32954 — spatel / ViewSVN
  10. InstructionSimplify: Refactor foldIdentityShuffles. NFC.

    Minor refactoring of foldIdentityShuffles() which allows the removal of a
    ConstantDataVector::get() in SimplifyShuffleVectorInstruction.

    Reviewers: spatel

    Reviewed By: spatel

    Subscribers: llvm-commits

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

    lib/Analysis/InstructionSimplify.cpp — zvi / ViewSVN
  11. Fix comment typos. — gberry / ViewSVN
  12. [clang-tidy] Fix readability-implicit-bool-cast false positives

    The patch makes the check treat binary conditional operator (`x ?: y`), `while`
    and regular `for` loops as conditional statements for the purpose of
    AllowConditional*Cast options. — alexfh / ViewSVN

r302430 (#5771) (May 8, 2017 9:19:17 AM)

  1. [powerpc] Remove XFAIL for sanitizer_coverage_no_prune.cc on powerpc64

    This test case works fine on powerpc64 (both BE and LE). — seurer / ViewSVN
  2. clang-tidy: add IgnoreMacros option to modernize-use-default-member-init

    And also enable it by default to be consistent with e.g.

    This helps e.g. when running this check on cppunit client code where the
    macro is provided by the system, so there is no easy way to modify it.

    Reviewers: alexfh, malcolm.parsons

    Reviewed By: malcolm.parsons

    Subscribers: cfe-commits

    Differential Revision: https://reviews.llvm.org/D32945 — vmiklos / ViewSVN
  3. [clang-format] Convert AlignEscapedNewlinesLeft to an enum, adding

    This converts the clang-format option AlignEscapedNewlinesLeft from a
    boolean to an enum, named AlignEscapedNewlines, with options Left (prev.
    true), Right (prev. false), and a new option DontAlign.

    When set to DontAlign, the backslashes are placed just after the last token in each line:
      #define EXAMPLE \
        do { \
            int x = aaaaa; \
            int b; \
            int dddddddddd; \
        } while (0)

    Patch by jtbandes. Thank you! — djasper / ViewSVN
  4. [clang-format] Don’t propagate AvoidBinPacking into argument

    This is an attempt to fix the issue described in a recent email:

    Patch by jtbandes. Thank you!
    Review: https://reviews.llvm.org/D32475 — djasper / ViewSVN
  5. Adding reproducer for pr32967. NFC. — zvi / ViewSVN
  6. [clang-tidy] Ignore private =deleted methods in macros.

    modernize-use-equals-delete is extremely noisy in code using
    DISALLOW_COPY_AND_ASSIGN-style macros and there's no easy way to automatically
    fix the warning when macros are in play. — alexfh / ViewSVN
  7. [X86][SSE] Improve combineLogicBlendIntoPBLENDV to use general masks.

    Currently combineLogicBlendIntoPBLENDV can only match ASHR to detect sign splatting of a bit mask, this patch generalises this to use computeNumSignBits instead.

    This is a first step in several things we can do to improve PBLENDV support:

    * Better matching of X86ISD::ANDNP patterns.
    * Handle floating point cases.
    * Better vector and bitcast support in computeNumSignBits.
    * Recognise that PBLENDV only uses the sign bit of the mask, we should be able strip away sign splats (ASHR, PCMPGT isNeg tests etc.).

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

r302423 (#5770) (May 8, 2017 7:50:12 AM)

  1. [Polly][GPUJIT] Fixed OpenCL 2.0 min requirement for Error codes

    Summary: Removed OpenCL error code identifiers introduced in version 2.0.

    Reviewers: grosser, bollu

    Reviewed By: bollu

    Subscribers: yaxunl, Anastasia, pollydev, llvm-commits

    Tags: #polly

    Differential Revision: https://reviews.llvm.org/D32962 — bollu / ViewSVN
  2. Normalize line endings. NFCI, — rksimon / ViewSVN

r302421 (#5769) (May 8, 2017 6:54:23 AM)

  1. Fix Windows tests when __config_site is present.
    Previously, the force includes would complain about a missing _DEBUG symbol.
    Now we dump macros before adding the force includes to the command line. — bcraig / ViewSVN
  2. IR: Add a shufflevector mask commutation helper function. NFC.

    Following up on Sanjay's suggetion in D32955, move this functionality
    into ShuffleVectornstruction.

    Reviewers: spatel, RKSimon

    Reviewed By: RKSimon

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D32956 — zvi / ViewSVN
  3. Correct the attribute spelling for guarded_var and pt_guarded_var.

    Patch by Roman Lebedev. — aaronballman / ViewSVN

r302418 (#5768) (May 8, 2017 5:49:26 AM)

  1. [X86][LWP] Add clang support for LWP instructions.

    This patch adds support for the the LightWeight Profiling (LWP) instructions which are available on all AMD Bulldozer class CPUs (bdver1 to bdver4).

    Differential Revision: https://reviews.llvm.org/D32770 — rksimon / ViewSVN
  2. [ARM][NEON] Add support for ISD::ABS lowering

    Update NEON int_arm_neon_vabs intrinsic to use the ISD::ABS opcode directly

    Added constant folding tests.

    Differential Revision: https://reviews.llvm.org/D32938 — rksimon / ViewSVN
  3. [ARM] Clear the constant pool cache on explicit .ltorg directives

    Multiple ldr pseudoinstructions with the same constant value will
    reuse the same constant pool entry. However, if the constant pool
    is explicitly flushed with a .ltorg directive, we should not try
    to reference constants in the previous pool any longer, since they
    may be out of range.

    This fixes assembling hand-written assembler source which repeatedly
    loads the same constant value, across a binary size larger than the
    pc-relative fixup range for ldr instructions (4096 bytes). Such
    assembler source already uses explicit .ltorg instructions to emit
    constant pools with regular intervals. However if we try to reuse
    constants emitted in earlier pools, they end up out of range.

    This makes the output of the testcase match what binutils gas does
    (prior to this patch, it would fail to assemble).

    Differential Revision: https://reviews.llvm.org/D32847 — mstorsjo / ViewSVN
  4. [AARCH64][NEON] Add support for ISD::ABS lowering

    Update int_aarch64_neon_abs intrinsic to use the ISD::ABS opcode directly

    Differential Revision: https://reviews.llvm.org/D32940 — rksimon / ViewSVN
  5. [ELF] - Set DF_STATIC_TLS flag for i386 target.

    This is PR32437.

    If set in a shared object or executable, this flag instructs the
    dynamic linker to reject attempts to load this file dynamically.
    It indicates that the shared object or executable contains code
    using a static thread-local storage scheme. Implementations need
    not support any form of thread-local storage.

    Patch checks if IE/LE relocations were used to check if code uses
    static model. If so it sets the DF_STATIC_TLS flag.

    Differential revision: https://reviews.llvm.org/D32354 — grimar / ViewSVN
  6. [ELF] - Linkerscript: support combination of linkerscript and --compress-debug-sections.

    Previously it was impossible to use linkerscript with --compress-debug-sections
    because of assert failture:
    Assertion failed: isFinalized(), file C:\llvm\lib\MC\StringTableBuilder.cpp, line 64

    Patch fixes the issue — grimar / ViewSVN

r302412 (#5767) (May 8, 2017 3:30:16 AM)

  1. [GlobalISel][X86] G_GEP selection support.

    Summary: [GlobalISel][X86] G_GEP selection support.

    Reviewers: zvi, guyblank

    Reviewed By: guyblank

    Subscribers: dberris, rovka, llvm-commits, kristof.beyls

    Differential Revision: https://reviews.llvm.org/D32396 — ibreger / ViewSVN
  2. [OpenCL] Check that global samplers are const

    Patch by Simon Perretta.

    Differential Revision: https://reviews.llvm.org/D32856 — svenvh / ViewSVN
  3. [GlobalISel][X86] G_MUL legalizer/selector support.

    G_MUL legalizer/selector/regbank support.
    Use only Tablegen-erated instruction selection.
    This patch dealing with legal operations only.

    Reviewers: zvi, guyblank

    Reviewed By: guyblank

    Subscribers: krytarowski, rovka, kristof.beyls, llvm-commits

    Differential Revision: https://reviews.llvm.org/D32698 — ibreger / ViewSVN

r302409 (#5766) (May 8, 2017 2:34:21 AM)

  1. [Lit] Fix to prevent creation of "%SystemDrive%" directory on Windows.

    This patch propogates the environment variable SYSTEMDRIVE on Windows when
    running the unit tests. This prevents the creation of a directory named
    "%SystemDrive%" when running the unit tests from FileSystemTest that use the
    function llvm::sys::fs::remove_directories which in turn uses SHFileOperationW.
    It is within SHFileOperationW that this environment variable may be used and if
    undefined causes the creation of a "%SystemDrive%" directory in the current

    Differential Revision: https://reviews.llvm.org/D32910 — anng / ViewSVN
  2. [APInt] Modify tcMultiplyPart's overflow detection to not depend on 'i' from the earlier loop. NFC

    The value of 'i' is always the smaller of DstParts and SrcParts so we can just use that fact to write all the code in terms of SrcParts and DstParts. — ctopper / ViewSVN
  3. [APInt] Use std::min instead of writing the same thing with the ternary operator. NFC — ctopper / ViewSVN
  4. [APInt] Remove 'else' after 'return' in tcMultiply methods. NFC — ctopper / ViewSVN

r302405 (#5765) (May 7, 2017 11:30:39 PM)

  1. [XRay] Custom event logging intrinsic

    This patch introduces an LLVM intrinsic and a target opcode for custom event
    logging in XRay. Initially, its use case will be to allow users of XRay to log
    some type of string ("poor man's printf"). The target opcode compiles to a noop
    sled large enough to enable calling through to a runtime-determined relative
    function call. At runtime, when X-Ray is enabled, the sled is replaced by
    compiler-rt with a trampoline to the logic for creating the custom log entries.

    Future patches will implement the compiler-rt parts and clang-side support for
    emitting the IR corresponding to this intrinsic.

    Reviewers: timshen, dberris

    Subscribers: igorb, pelikan, rSerge, timshen, echristo, dberris, llvm-commits

    Differential Revision: https://reviews.llvm.org/D27503 — dberris / ViewSVN

r302404 (#5764) (May 7, 2017 10:34:27 PM)

  1. [SCEV] Use APInt::operator*=(uint64_t) to avoid a temporary APInt for a constant. — ctopper / ViewSVN
  2. [APInt] Take advantage of new operator*=(uint64_t) to remove a temporary APInt. — ctopper / ViewSVN
  3. [APInt] Add support for multiplying by a uint64_t.

    This makes multiply similar to add, sub, xor, and, and or. — ctopper / ViewSVN
  4. Hopefully one last commit to fix this patch, addresses string reference
    issues. — ecbeckmann / ViewSVN
  5. Quick fix to D32609, it seems .o files are not transferred in all cases.

    Therefore the .o file in question is renamed to .obj.coff. — ecbeckmann / ViewSVN
  6. Update llvm-readobj -coff-resources to display tree structure.

    Summary: Continue making updates to llvm-readobj to display resource sections.  This is necessary for testing the up and coming cvtres tool.

    Reviewers: zturner

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D32609 — ecbeckmann / ViewSVN
  7. [SCEV] Have getRangeForAffineARHelper take StartRange by const reference to avoid a copy in many of the cases. — ctopper / ViewSVN
  8. Revert "Hopefully one last commit to fix this patch, addresses string reference"

    This reverts commit 56beec1b1cfc6d263e5eddb7efff06117c0724d2.

    Revert "Quick fix to D32609, it seems .o files are not transferred in all cases."

    This reverts commit 7652eecd29cfdeeab7f76f687586607a99ff4e36.

    Revert "Update llvm-readobj -coff-resources to display tree structure."

    This reverts commit 422b62c4d302cfc92401418c2acd165056081ed7.

    Reviewers: zturner

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D32958 — ecbeckmann / ViewSVN

r302396 (#5763) (May 7, 2017 8:33:58 PM)

  1. Fix Windows locale detection — ericwf / ViewSVN
  2. Hopefully one last commit to fix this patch, addresses string reference
    issues. — ecbeckmann / ViewSVN
  3. Fix shared_mutex dll import errors on Windows — ericwf / ViewSVN

r302393 (#5762) (May 7, 2017 7:03:43 PM)

  1. [libc++] Implement exception_ptr on Windows

    This patch implements exception_ptr on Windows using the `__ExceptionPtrFoo` functions provided by MSVC.

    The `__ExceptionPtrFoo` functions are defined inside the C++ standard library, `msvcprt`, which is unfortunate because it requires libc++ to link to the MSVC STL. However this doesn't seem to cause any immediate problems. However to be safe I kept all usages within the libc++ dylib so that user programs wouldn't have to link to MSVCPRT as well.

    Note there are still 2 outstanding exception_ptr/nested_exception test failures.

    * `current_exception.pass.cpp` needs to be rewritten for the Windows exception_ptr semantics which copy the exception every time.
    * `rethrow_if_nested.pass.cpp` need investigation. It hits a stack overflow, likely from recursion.

    This patch also gets most of the `<future>` tests passing as well.

    Reviewers: mclow.lists, compnerd, bcraig, rmaprath, majnemer, BillyONeal, STL_MSFT

    Subscribers: mgorny, cfe-commits

    Differential Revision: https://reviews.llvm.org/D32927 — ericwf / ViewSVN
  2. [XRay][compiler-rt] XFAIL on ppc

    Follow-up on D32846. — dberris / ViewSVN
  3. Fix DLL import/export on Win32 locale helpers — ericwf / ViewSVN
  4. Fix DLL import for __time_get_c_storage member functions. — ericwf / ViewSVN
  5. Revert "Actually remove the MSVC STL when linking and testing libc++ on Windows"

    This reverts commit r302387. — ericwf / ViewSVN
  6. Quick fix to D32609, it seems .o files are not transferred in all cases.

    Therefore the .o file in question is renamed to .obj.coff. — ecbeckmann / ViewSVN

r302387 (#5761) (May 7, 2017 5:34:59 PM)

  1. Actually remove the MSVC STL when linking and testing libc++ on Windows — ericwf / ViewSVN
  2. Update llvm-readobj -coff-resources to display tree structure.

    Summary: Continue making updates to llvm-readobj to display resource sections.  This is necessary for testing the up and coming cvtres tool.

    Reviewers: zturner

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D32609 — ecbeckmann / ViewSVN
  3. [ConstantRange][SimplifyCFG] Add a helper method to allow SimplifyCFG to determine if a ConstantRange has more than 8 elements without requiring an allocation if the ConstantRange is 64-bits wide.

    Previously SimplifyCFG used getSetSize which returns an APInt that is 1 bit wider than the ConstantRange's bit width. In the reasonably common case that the ConstantRange is 64-bits wide, this requires returning a 65-bit APInt. APInt's can only store 64-bits without a memory allocation so this is inefficient.

    The new method takes the 8 as an input and tells if the range contains more than that many elements without requiring any wider math. — ctopper / ViewSVN
  4. Temporarly XFAIL aligned new/delete tests on Windows.

    Libc++ doesn't provide its own definitions of new/delete on Windows,
    instead using the versions provided by VCRuntime. However VCRuntime
    does not yet implement aligned new/delete so these tests fail.

    It might be possible for libc++ to provide its own definitions only
    for aligned new/delete as long as MSVC doesn't provide it. However
    before this can be done libc++ needs to figure out how to implement
    std::get_new_handler. — ericwf / ViewSVN
  5. [ConstantRange] Remove 'Of' from name of ConstantRange::isSizeStrictlySmallerThanOf so that it reads better. NFC — ctopper / ViewSVN

r302382 (#5760) (May 7, 2017 4:06:12 PM)

  1. Fix Windows test failures caused by identical temp file names.

    This patch fixes test failures that occur on Windows because
    the tests attempt to generate two distinct temp file names but
    get the same name both time.

    The fix for this is to create the first temp file before requesting
    a second temporary file name. This ensures that the second name
    will be unique. — ericwf / ViewSVN
  2. Accept Windows specific output in system error tests — ericwf / ViewSVN
  3. Fix two test failures caused by Windows mangling of function types.

    On Windows the function template `template <class T> void test()` has
    the same mangled name when instantiated with the distinct types `void()`
    and `void() noexcept`. When this occurs Clang emits an error. This error
    was causing two type-traits tests to fail.

    However this can be worked around by using class templates instead of
    function templates, which is what this patch does to fix the errors. — ericwf / ViewSVN
  4. [Polly] Added OpenCL Runtime to GPURuntime Library for GPGPU CodeGen

    When compiling for GPU, one can now choose to compile for OpenCL or CUDA,
    with the corresponding polly-gpu-runtime flag (libopencl / libcudart). The
    GPURuntime library (GPUJIT) has been extended with the OpenCL Runtime library
    for that purpose, correctly choosing the corresponding library calls to the
    option chosen when compiling (via different initialization calls).

    Additionally, a specific GPU Target architecture can now be chosen with -polly-gpu-arch (only nvptx64 implemented thus far).

    Reviewers: grosser, bollu, Meinersbur, etherzhhb, singam-sanjay

    Reviewed By: grosser, Meinersbur

    Subscribers: singam-sanjay, llvm-commits, pollydev, nemanjai, mgorny, yaxunl, Anastasia

    Tags: #polly

    Differential Revision: https://reviews.llvm.org/D32431 — bollu / ViewSVN
  5. [X86][AVX1] Improve 256-bit vector costs for integer unary intrinsics.

    Account for subvector extraction/insertion, helps prevent the vectorizers from selecting 256-bit vectors that will have to be split anyhow on AVX1 targets. — rksimon / ViewSVN

r302377 (#5759) (May 7, 2017 2:36:36 PM)

  1. [Orc] Remove trailing whitespace. — Lang Hames / ViewSVN
  2. [Polly] [GPUJIT] Adapted argument capitalization to fit standard

    Summary: Function argument naming changed to reflect capitalization standards.

    Reviewers: grosser, Meinersbur

    Reviewed By: grosser

    Differential Revision: https://reviews.llvm.org/D32854 — bollu / ViewSVN

r302375 (#5758) (May 7, 2017 1:08:07 PM)

  1. [Polly] [GPUJIT] Moved error prints to stderr

    Summary: Errors previously printed to stdout now get printed to stderr.

    Reviewers: grosser, Meinersbur

    Reviewed By: grosser

    Differential Revision: https://reviews.llvm.org/D32852 — bollu / ViewSVN
  2. [InstSimplify] add tests for PR32949 miscompile; NFC — spatel / ViewSVN
  3. InstructionSimplify: Relanding r301766

    Re-applying r301766 with a fix to a typo and a regression test.

    The log message for r301766 was:
        InstructionSimplify: Canonicalize shuffle operands. NFC-ish.

         Apply canonicalization rules:
            1. Input vectors with no elements selected from can be replaced with undef.
            2. If only one input vector is constant it shall be the second one.

        This allows constant-folding to cover more ad-hoc simplifications that
        were in place and avoid duplication for RHS and LHS checks.

        There are more rules we may want to add in the future when we see a
        justification. e.g. mask elements that select undef elements can be
        replaced with undef.

    Reviewers: spatel, RKSimon

    Reviewed By: spatel

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D32863 — zvi / ViewSVN

r302372 (#5757) (May 7, 2017 11:38:50 AM)

  1. Make llvm-rtdlyd -check preserve automatic address mappings made by RuntimeDyld.

    Currently llvm-rtdyld in -check mode will map sections to back-to-back 4k
    aligned slabs starting at 0x1000. Automatically remapping sections by default is
    helpful because it quickly exposes relocation bugs due to use of local addresses
    rather than load addresses (these would silently pass if the load address was
    not remapped). These mappings can be explicitly overridden on a per-section
    basis using llvm-rtdlyd's -map-section option. This patch extends this scheme to
    also preserve any mappings made by RuntimeDyld itself. Preserving RuntimeDyld's
    automatic mappings allows us to write test cases to verify that these automatic
    mappings have been applied.

    This will allow the fix in https://reviews.llvm.org/D32899 to be tested with
    llvm-rtdyld -check. — Lang Hames / ViewSVN

r302371 (#5756) (May 7, 2017 10:09:25 AM)

  1. [SCEV] Use move semantics in ScalarEvolution::setRange

    Summary: This makes setRange take ConstantRange by rvalue reference since most callers were passing an unnamed temporary ConstantRange. We can then move that ConstantRange into the DenseMap caches. For the callers that weren't passing a temporary, I've added std::move to to the local variable being passed.

    Reviewers: sanjoy, mzolotukhin, efriedma

    Reviewed By: sanjoy

    Subscribers: takuto.ikuta, llvm-commits

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

r302370 (#5755) (May 7, 2017 8:49:33 AM)

  1. [InstSimplify] use ConstantRange to simplify or-of-icmps

    We can simplify (or (icmp X, C1), (icmp X, C2)) to 'true' or one of the icmps in many cases.
    I had to check some of these with Alive to prove to myself it's right, but everything seems
    to check out. Eg, the deleted code in instcombine was completely ignoring predicates with
    mismatched signedness.

    This is a follow-up to:
    https://reviews.llvm.org/D32143 — spatel / ViewSVN

r302369 (#5754) (May 7, 2017 4:39:30 AM)

  1. [Kaleidoscope] toy.cpp use after move fix

    The variable Proto is moved at the beginning of the codegen() function.
    According to the comment above, the pointed object should be used due the
    reference P.

    Differential Revision: https://reviews.llvm.org/D32939 — szepet / ViewSVN

r302368 (#5753) (May 6, 2017 11:09:27 PM)

  1. Remove unnecessary const_cast — sanjoy / ViewSVN
  2. Use array_pod_sort instead of std::sort — sanjoy / ViewSVN

r302366 (#5752) (May 6, 2017 9:34:38 PM)

  1. Fix comment. — Lang Hames / ViewSVN
  2. COFF: add ARM64 relocation types

    Add the ARM64 COFF relocation types.  This will be needed to add support
    for the AArch64 Windows object file emission support. — Saleem Abdulrasool / ViewSVN

r302364 (#5751) (May 6, 2017 5:11:44 PM)

  1. Update LanguageExtensions doc to refer to C++14 instead of C++1y — ericwf / ViewSVN

r302363 (#5750) (May 6, 2017 3:49:21 PM)

  1. Fix undefined pthread references when building against libc++ — ericwf / ViewSVN

r302362 (#5749) (May 6, 2017 2:39:30 PM)

  1. Ensure showbase does not overflow do_put buffers

    In https://bugs.freebsd.org/207918, Daniel McRobb describes how using
    std::showbase with ostreams can cause truncation of unsigned long long
    when output format is octal.  In fact, this can even happen with
    unsigned int and unsigned long.

    To ensure this does not happen, add one additional character to the
    do_put buffers if std::showbase is on.  Also add a test case.

    Reviewers: EricWF, mclow.lists

    Reviewed By: EricWF

    Subscribers: cfe-commits, emaste

    Differential Revision: https://reviews.llvm.org/D32670 — dim / ViewSVN
  2. [X86][AVX512] Relax assertion and just exit combine for unsupported types (PR32907) — rksimon / ViewSVN
  3. Really disable test as intended in the previous commit — grosser / ViewSVN
  4. [X86][AVX512] Move v2i64/v4i64 VPABS lowering to tablegen

    Extend NoVLX targets to use the 512-bit versions — rksimon / ViewSVN

r302358 (#5748) (May 6, 2017 1:31:02 PM)

  1. Disable test to avoid buildbot noise

    This test was introduced in r302339. It works on my system, but breaks on the
    buildbots. — grosser / ViewSVN

r302357 (#5747) (May 6, 2017 12:34:59 PM)

  1. [X86] Reduce code for setting operations actions by merging into loops across multiple types/ops. NFCI. — rksimon / ViewSVN

r302356 (#5746) (May 6, 2017 11:39:00 AM)

  1. [NVPTX] Add support for ISD::ABS lowering

    Use the ISD::ABS opcode directly

    Differential Revision: https://reviews.llvm.org/D32944 — rksimon / ViewSVN
  2. [X86][SSE] Break register dependencies on v16i8/v8i16 BUILD_VECTOR on SSE41

    rL294581 broke unnecessary register dependencies on partial v16i8/v8i16 BUILD_VECTORs, but on SSE41 we (currently) use insertion for full BUILD_VECTORs as well. By allowing full insertion to occur on SSE41 targets we can break register dependencies here as well. — rksimon / ViewSVN

r302354 (#5745) (May 6, 2017 10:35:15 AM)

  1. [Analysis] Print out unreachable loops

    When writing a loop pass I made a mistake and hit the assertion
    "Unreachable block in loop". Later, I hit an assertion when I called
    `BasicBlock::eraseFromParent()` incorrectly: "Use still stuck around
    after Def is destroyed". This latter assertion, however, printed out
    exactly which value is being deleted and what uses remain, which helped
    me debug the issue.

    To help people debugging their loop passes in the future, print out
    exactly which basic block is unreachable in a loop.

    Reviewers: sanjoy, hfinkel, mehdi_amini

    Reviewed By: mehdi_amini

    Subscribers: mzolotukhin

    Differential Revision: https://reviews.llvm.org/D32878 — modocache / ViewSVN

r302353 (#5744) (May 6, 2017 9:39:14 AM)

  1. Updating branches/google/stable to r302012 — djasper / ViewSVN
  2. Creating tags/google/stable/2017-05-06 from r302012 — djasper / ViewSVN
  3. Updating branches/google/stable to r302012 — djasper / ViewSVN
  4. Creating tags/google/stable/2017-05-06 from r302012 — djasper / ViewSVN
  5. Updating branches/google/stable to r302012 — djasper / ViewSVN
  6. Creating tags/google/stable/2017-05-06 from r302012 — djasper / ViewSVN
  7. Updating branches/google/stable to r302012 — djasper / ViewSVN
  8. Creating tags/google/stable/2017-05-06 from r302012 — djasper / ViewSVN
  9. Updating branches/google/stable to r302012 — djasper / ViewSVN
  10. Creating tags/google/stable/2017-05-06 from r302012 — djasper / ViewSVN
  11. Updating branches/google/stable to r302012 — djasper / ViewSVN
  12. Creating tags/google/stable/2017-05-06 from r302012 — djasper / ViewSVN
  13. Cleaning up stable branch — djasper / ViewSVN
  14. [builtins] Fixup emulated TLS for mingw.

    Enabled emulated TLS on WOA for mingw
    Fix <windows.h> include for mingw

    Reviewed By: chapuni, mstorsjo

    Subscribers: compnerd, llvm-commits

    Differential Revision: https://reviews.llvm.org/D32681 — martell / ViewSVN

r302339 (#5743) (May 6, 2017 8:43:18 AM)

  1. [DeLICM] Known knowledge.

    Extend the Knowledge class to store information about the contents
    of array elements and which values are written. Two knowledges do
    not conflict the known content is the same. The content information
    if computed from writes to and loads from the array elements, and
    represented by "ValInst": isl spaces that compare equal if the value
    represented is the same.

    Differential Revision: https://reviews.llvm.org/D31247 — meinersbur / ViewSVN

r302338 (#5742) (May 6, 2017 7:28:04 AM)

  1. [X86][AVX2] Add scheduling latency/throughput tests for some AVX2 instructions

    Many more to come... — rksimon / ViewSVN
  2. [DAGCombiner] If ISD::ABS is legal/custom, use it directly instead of canonicalizing first.

    Remove an extra canonicalization step if ISD::ABS is going to be used anyway.

    Updated x86 abs combine to check that we are lowering from both canonicalizations. — rksimon / ViewSVN
  3. [CMake] Introduce POLLY_BUNDLED_JSONCPP.

    Allow using a system's install jsoncpp library instead of the bundled
    one with the setting POLLY_BUNDLED_JSONCPP=OFF.

    This fixes llvm.org/PR32929

    Differential Revision: https://reviews.llvm.org/D32922 — meinersbur / ViewSVN

r302335 (#5741) (May 5, 2017 11:52:29 PM)

  1. [SCEV] Remove extra APInt copies from getRangeForAffineARHelper.

    This changes one parameter to be a const APInt& since we only read from it. Use std::move on local APInts once they are no longer needed so we can reuse their allocations. Lastly, use operator+=(uint64_t) instead of adding 1 to an APInt twice creating a new APInt each time. — ctopper / ViewSVN
  2. [SCEV] Use std::move to avoid some APInt copies. — ctopper / ViewSVN

r302333 (#5740) (May 5, 2017 10:54:38 PM)

  1. [SCEV] Use APInt's uint64_t operations instead of creating a temporary APInt to hold 1. — ctopper / ViewSVN
  2. [SCEV] Avoid a couple APInt copies by capturing by reference since the method returns a reference. — ctopper / ViewSVN

r302331 (#5739) (May 5, 2017 9:43:57 PM)

  1. [LazyValueInfo] Avoid unnecessary copies of ConstantRanges

    ConstantRange contains two APInts which can allocate memory if their width is larger than 64-bits. So we shouldn't copy it when we can avoid it.

    This changes LVILatticeVal::getConstantRange() to return its internal ConstantRange by reference. This allows many places that just need a ConstantRange reference to avoid making a copy.

    Several places now capture the return value of getConstantRange() by reference so they can call methods on it that don't need a new object.

    Lastly it adds std::move in one place to capture to move a local ConstantRange into an LVILatticeVal.

    Reviewers: reames, dberlin, sanjoy, anna

    Reviewed By: reames

    Subscribers: grandinj, llvm-commits

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

r302330 (#5738) (May 5, 2017 8:48:27 PM)

  1. Fix lgamma_r linking errors on Windows. It appears the normal lgamma function is thread safe anyway — ericwf / ViewSVN
  2. Note addition of NetBSD support in googletest

    Recreated patch for __NetBSD__ has been pushed upstream to Google. — kamil / ViewSVN

r302328 (#5737) (May 5, 2017 7:52:40 PM)

  1. Add GCC ToT libc++ builder — ericwf / ViewSVN

r302327 (#5736) (May 5, 2017 6:56:45 PM)

  1. Be a little more permissive in DynamicLoaderMacOS::CanLoadImage

    If we can't find the "is dyld locked" symbol, assume it is safe
    to load the image unless we only have 1 image loaded - in which case
    we are in _dyld_start and it is definitely NOT safe.

    Also add a little better errors to that function, and better logging
    in SBProcess.cpp.

    <rdar://problem/30174817> — jingham / ViewSVN

r302326 (#5735) (May 5, 2017 6:00:27 PM)

  1. Use the same terminology as ELF.

    This patch do s/color/class/g. — ruiu / ViewSVN
  2. [libcxx] [test] Suppress MSVC's /analyze warning C6294 in a more fine-grained manner.

    Fixes D32926. — stl_msft / ViewSVN
  3. Remove dead file. — ruiu / ViewSVN
  4. Added "info threads", "thread 1" and "apropos". — jingham / ViewSVN
  5. [libcxx] [test] Fix MSVC "warning C6326: Potential comparison of a constant with another constant".

    The expressions `1 == 1` and `true` have the same type, value category, and value.

    Fixes D32924. — stl_msft / ViewSVN
  6. [sanitizer-coverage] implement -fsanitize-coverage=no-prune,... instead of a hidden -mllvm flag. compiler-rt part (test only). — kcc / ViewSVN
  7. [sanitizer-coverage] implement -fsanitize-coverage=no-prune,... instead of a hidden -mllvm flag. clang part. — kcc / ViewSVN
  8. [sanitizer-coverage] implement -fsanitize-coverage=no-prune,... instead of a hidden -mllvm flag. llvm part. — kcc / ViewSVN
  9. [libcxx] [test] Be compatible with LWG 2438 "std::iterator inheritance shouldn't be mandated".

    In C++17, these iterators are allowed but not required
    to inherit from the deprecated std::iterator base class.

    Fixes D32727. — stl_msft / ViewSVN
  10. [clang-tidy] Use cxxStdInitializerListExpr in modernize-use-emplace

    Summary: Use the cxxStdInitializerListExp matcher from ASTMatchers.h instead of a local one.

    Reviewers: aaron.ballman, alexfh, Prazek

    Reviewed By: aaron.ballman

    Subscribers: xazax.hun, cfe-commits

    Tags: #clang-tools-extra

    Differential Revision: https://reviews.llvm.org/D32923 — kuhar / ViewSVN
  11. [RegisterBankInfo] Uniquely allocate instruction mapping.

    This is a step toward having statically allocated instruciton mapping.
    We are going to tablegen them eventually, so let us reflect that in
    the API.

    NFC. — qcolombet / ViewSVN
  12. [BitVector] Improve the description of the BitVector::clear to say it removes the bits rather than clearing since clearing could be interpreted as just zeroing. NFC — ctopper / ViewSVN
  13. Add DidStartExecuting/WillFinishExecuting methods to Expression.

    These methods can be used by the derived expression types to perform expression
    specific and/or language specific actions before and after the expression runs.
    (ThreadPlanCallUserExpression is modified to call these methods on the
    expression immediately before/after execution of the expression).

    The immediate motivation is allowing Swift expressions to notify the swift
    runtime that exclusivity enforcement should be suspended while the expression
    runs (we want LLDB expressions to be able to access variables even when they're
    considered exclusively owned by someone else in the original program).

    Reviewed in https://reviews.llvm.org/D32889 — Lang Hames / ViewSVN

r302313 (#5734) (May 5, 2017 4:33:42 PM)

  1. AArch64: fix weird edge case in ABI.

    It turns out there are some sort-of-but-not-quite empty structs that break all
    the rules. For example:

    struct SuperEmpty { int arr[0]; };
    struct SortOfEmpty { struct SuperEmpty e; };

    Both of these have sizeof == 0, even in C++ mode, for GCC compatibility. The
    first one also doesn't occupy a register when passed by value in GNU C++ mode,
    unlike everything else.

    On Darwin, we want to ignore the lot (and especially don't want to try to use
    an i0 as we were). — Tim Northover / ViewSVN
  2. Permit keywords in module names in #pragma clang module *.

    This is necessary to be able to build a libc++ module from preprocessed source
    (due to the submodule std.new). — rsmith / ViewSVN
  3. Fix spelling error in command line option description. NFC — ctopper / ViewSVN
  4. [IR] Fix some Clang-tidy modernize-use-using warnings; other minor fixes (NFC). — eugenezelenko / ViewSVN
  5. Add support for building modules from preprocessed source.

    To support this, an optional marker "#pragma clang module contents" is
    recognized in module map files, and the rest of the module map file from that
    point onwards is treated as the source of the module. Preprocessing a module
    map produces the input module followed by the marker and then the preprocessed
    contents of the module.

    Ignoring line markers, a preprocessed module might look like this:

      module A {
        header "a.h"
      #pragma clang module contents
      #pragma clang module begin A
      // ... a.h ...
      #pragma clang module end

    The preprocessed output generates line markers, which are not accepted by the
    module map parser, so -x c++-module-map-cpp-output should be used to compile
    such outputs.

    A couple of major parts do not work yet:

    1) The files that are listed in the module map must exist on disk, in order to
       build the on-disk header -> module lookup table in the PCM file. To fix
       this, we need the preprocessed output to track the file size and other stat
       information we might use to build the lookup table.

    2) Declaration ownership semantics don't work properly yet, since mapping from
       a source location to a module relies on mapping from FileIDs to modules,
       which we can't do if module transitions can occur in the middle of a file. — rsmith / ViewSVN
  6. Override invalidate of ProfileSummaryInfo to return false.

    Differential revision: https://reviews.llvm.org/D32775 — eraman / ViewSVN
  7. [Hexagon] Disable predicated calls by default — kparzysz / ViewSVN
  8. [Hexagon] Remove C6 and C7 as separate registers

    These are M0 and M1. Removing duplicated registers reduces the number
    of explicit register aliasing. — kparzysz / ViewSVN
  9. [RDF] Remove covered parts of reached uses for phi and use in same block — kparzysz / ViewSVN
  10. lld Fixups for TypeDatabase changes. — zturner / ViewSVN
  11. ARM: Compute MaxCallFrame size early

    This exposes a method in MachineFrameInfo that calculates
    MaxCallFrameSize and calls it after instruction selection in the ARM

    This avoids
    giving different answers in early/late phases of codegen.

    The testcase shows a particular nasty example result of that where we
    would fail to properly align an alloca.

    Differential Revision: https://reviews.llvm.org/D32622 — matze / ViewSVN
  12. [CodeView] Reserve TypeDatabase records up front.

    Most of the time we know exactly how many type records we
    have in a list, and we want to use the visitor to deserialize
    them into actual records in a database.  Previously we were
    just using push_back() every time without reserving the space
    up front in the vector.  This is obviously terrible from a
    performance standpoint, and it's not uncommon to have PDB
    files with half a million type records, where the performance
    degredation was quite noticeable. — zturner / ViewSVN

r302301 (#5733) (May 5, 2017 3:37:32 PM)

  1. Add missing target triple to test — matze / ViewSVN
  2. [scudo] Add Android support

    This change adds Android support to the allocator (but doesn't yet enable it in
    the cmake config), and should be the last fragment of the rewritten change

    Android has more memory constraints than other platforms, so the idea of a
    unique context per thread would not have worked. The alternative chosen is to
    allocate a set of contexts based on the number of cores on the machine, and
    share those contexts within the threads. Contexts can be dynamically reassigned
    to threads to prevent contention, based on a scheme suggested by @dvyuokv in
    the initial review.

    Additionally, given that Android doesn't support ELF TLS (only emutls for now),
    we use the TSan TLS slot to make things faster: Scudo is mutually exclusive
    with other sanitizers so this shouldn't cause any problem.

    An additional change made here, is replacing `thread_local` by `THREADLOCAL`
    and using the initial-exec thread model in the non-Android version to prevent
    extraneous weak definition and checks on the relevant variables.

    Reviewers: kcc, dvyukov, alekseyshl

    Reviewed By: alekseyshl

    Subscribers: srhines, mgorny, llvm-commits

    Differential Revision: https://reviews.llvm.org/D32649 — cryptoad / ViewSVN
  3. Delete LinkerScript::getSectionIndex.

    We can set SectionIndex tentatively as we process the linker script
    instead of looking it repeatedly.

    In general we should try to have as few name lookups as possible. — rafael / ViewSVN
  4. Mark test using <sys/time.h> as UNSUPPORTED on Windows — ericwf / ViewSVN
  5. Fix condition_variable::wait_until and wait_for on Windows.

    The ERROR_TIMEDOUT returned by the Windows API does not
    have the same value as ETIMEDOUT. This caused condition_variable
    to return timeouts as unknown errors. — ericwf / ViewSVN
  6. Multilib: add dump methods — Jonathan Roelofs / ViewSVN
  7. Fix build breakage on Linux. — ruiu / ViewSVN
  8. Fix -Wreorder warning. — zturner / ViewSVN
  9. Fix another incorrectly cased header include. — zturner / ViewSVN
  10. [StreamArray] Pipe the Offset through the constructor.

    When randomly accessing an element by offset, we weren't passing
    the offset through so if you called .offset() it would return a
    value of 0. — zturner / ViewSVN
  11. Fix #include case sensitivity problem. — zturner / ViewSVN
  12. [AMDGPU] In the new waitcnt insertion pass, use getHeader
             instead of getTopBlock to find the loop header.

    Differential Revision: https://reviews.llvm.org/D32831 — kannann / ViewSVN
  13. MIParser/MIRPrinter: Compute block successors if not explicitely specified

    - MIParser: If the successor list is not specified successors will be
      added based on basic block operands in the block and possible

    - MIRPrinter: Adds a new `simplify-mir` option, with that option set:
      Skip printing of block successor lists in cases where the
      parser is guaranteed to reconstruct it. This means we still print the
      list if some successor cannot be determined (happens for example for
      jump tables), if the successor order changes or branch probabilities
      being unequal.

    Differential Revision: https://reviews.llvm.org/D31262 — matze / ViewSVN
  14. Split up Parallel and LLVM'ize naming conventions.

    This is one step in preparation of raising this up to
    LLVM.  This hides all of the Executor stuff in a private
    implementation file, leaving only the core algorithms and
    the TaskGroup class exposed.  In doing so, fix up all the
    variable names to conform to LLVM style.

    Differential Revision: https://reviews.llvm.org/D32890 — zturner / ViewSVN
  15. Add cxxStdInitializerListExpr AST matcher

    This adds a new ASTMatcher for CXXStdInitializerListExprs that matches C++ initializer list expressions.

    The primary motivation is to use it to fix [[ https://bugs.llvm.org/show_bug.cgi?id=32896 | PR32896 ]] (review here [[ https://reviews.llvm.org/D32767 | D32767 ]]).

    Reviewers: alexfh, Prazek, aaron.ballman

    Reviewed By: alexfh, aaron.ballman

    Subscribers: malcolm.parsons, cfe-commits, klimek

    Differential Revision: https://reviews.llvm.org/D32810 — kuhar / ViewSVN
  16. [X86] Use SDValue::getConstantOperandVal helper. NFCI. — rksimon / ViewSVN
  17. Fix detection for [[fallthrough]] with GCC — ericwf / ViewSVN
  18. [ODRHash] Fix typo, NFC

    NestedNameSpecifer to NestedNameSpecifier.  This was not a problem before since
    one of the included headers transitively brought in the definition of the class
    and only manifested as a problem when using the typoed NestedNameSpecifer and
    getting an incomplete type error instead of a typo correction. — rtrieu / ViewSVN

r302283 (#5732) (May 5, 2017 2:41:43 PM)

  1. Fix remaining GCC 7 build warnings — ericwf / ViewSVN
  2. Fix UDP Socket connections

    Some of the refactoring in r301492 broke UDP socket connections. This is a partial revert of that refactoring. At some point I'll spend more time diagnosing where the refactoring went wrong and how to better clean up this code, but I don't have time to do that today. — cbieneman / ViewSVN
  3. [clang-tidy] Fix PR32896: detect initializer lists in modernize-use-empalce

    This patch fixes [[ https://bugs.llvm.org/show_bug.cgi?id=32896 | PR32896 ]].

    The problem was that modernize-use-emplace incorrectly removed changed push_back into emplace_back, removing explicit constructor call with initializer list parameter, resulting in compiler error after applying fixits.
    modernize-use-emplace used to check if matched constructor had InitListExpr, but didn't check against CXXStdInitializerListExpr.


    std::vector<std::vector<int>> v;
      v.push_back(std::vector<int>({1})); // --> v.emplace_back({1});

    Reviewers: Prazek, alexfh, aaron.ballman

    Reviewed By: Prazek, alexfh, aaron.ballman

    Subscribers: xazax.hun, cfe-commits

    Tags: #clang-tools-extra

    Differential Revision: https://reviews.llvm.org/D32767 — kuhar / ViewSVN
  4. Fix new warnings emitted by GCC 7 — ericwf / ViewSVN
  5. Remove isTlsLocalDynamicRel and isTlsInitialExecRel.

    This feels a bit hackish, but I think it is still an improvement.

    The way a tls address is computed in the various architectures is not
    that different. For example, for local dynamic we need the base of the
    tls (R_TLSLD or R_TLSLD_PC), and the offset of that particular symbol

    Given the similarity, we can just use the expressions instead of
    having two additional target hooks. — rafael / ViewSVN
  6. TargetLibraryInfo: Introduce wcslen

    wcslen is part of the C99 and C++98 standards.

    - This introduces the function to TargetLibraryInfo.
    - Also set attributes for wcslen in llvm::inferLibFuncAttributes().

    Differential Revision: https://reviews.llvm.org/D32837 — matze / ViewSVN

    This field is populated by the CP

    Differential Revision: https://reviews.llvm.org/D32619 — kzhuravl / ViewSVN
  8. [ScopBuilder] Move Scop::init to ScopBuilder. NFC.

    Scop::init is used only during SCoP construction. Therefore ScopBuilder
    seems the more appropriate place for it. We integrate it onto its only
    caller ScopBuilder::buildScop where some other construction steps
    already took place.

    Differential Revision: https://reviews.llvm.org/D32908 — meinersbur / ViewSVN

r302275 (#5731) (May 5, 2017 1:45:28 PM)

  1. Do not redefine the THREAD_ANNOTATION_ATTRIBUTE__ macro in the documentation.

    Patch by Roman Lebedev. — aaronballman / ViewSVN
  2. [ARM] Limit the diagnose when an ISR calls a regular function

    When the function is compiled with soft-float or on CPU with no FPU, we
    don't need to diagnose for a call from an ISR to a regular function.

    Reviewers: jroelofs, eli.friedman

    Reviewed By: jroelofs

    Subscribers: aemerson, rengolin, javed.absar, cfe-commits

    Differential Revision: https://reviews.llvm.org/D32918 — weimingz / ViewSVN
  3. Remove redundant `explicit`. — ruiu / ViewSVN

r302272 (#5730) (May 5, 2017 12:49:11 PM)

  1. CFI: Add a blacklist entry for std::_Sp_counted_ptr_inplace::_Sp_counted_ptr_inplace().

    This ctor is used by std::make_shared and needs to cast to uninitialized T*
    in order to call std::allocator_traits<T>::construct. — pcc / ViewSVN
  2. Make sure sdk is set on darwin

    I noticed in some places xcrun was not correctly picking the macOS sdk.
    Lets set that explicitly. — Chris Matthews / ViewSVN
  3. CodeGen: avoid use of @clang.arc.use intrinsic at O0

    The clang.arc.use intrinsic is removed via the ARC Contract Pass.  This
    pass is only executed in optimized builds (>= opt level 1).  Prevent the
    optimization implemented in SVN r301667 from triggering at optimization
    level 0 like every other ARC use intrinsic usage. — Saleem Abdulrasool / ViewSVN
  4. Fix LNT’s js to corrrectly determine base URL when server has a prefix

    There was a number of errors in the JS leading to a invalid prefix being
    generated at runtime. That made some of the URLs and ajax requests
    invalid. The prefix was being overwritten, and had the wrong value.

    Now we use a global determined by Flask (which should know these things)
    and update the urls to not overwrite each other. — Chris Matthews / ViewSVN
  5. Fix missing strftime in production — Chris Matthews / ViewSVN
  6. Simplify dbg.value handling in SDISel with early returns

    No functional change other than improving dbgs logging accuracy on
    constant dbg values. Previously we would add things like "i32 42" as
    debug values, and then log that we were dropping the debug info, which
    is silly.

    Delete some dead code that was checking for static allocas. This
    remained after r207165, but served no purpose. Currently, static alloca
    dbg.values are always sent through the DanglingDebugInfoMap, and are
    usually made valid the first time the alloca is used. — rnk / ViewSVN
  7. [WebAssembly] Add ObjectYAML support for wasm name section

    Differential Revision: https://reviews.llvm.org/D32841 — sbc / ViewSVN
  8. [bpf] fix a bug which causes incorrect big endian reloc fixup

      o Add bpfeb support in BPF dwarfdump unit test case

    Signed-off-by: Yonghong Song <yhs@fb.com>
    Signed-off-by: Alexei Starovoitov <ast@fb.com> — ast / ViewSVN
  9. Add NetBSD to the list of platforms supporting death tests. Two unit
    tests require this for compilation. — joerg / ViewSVN
  10. If posix_fallocate returns EOPNOTSUPP, fallback to ftruncate.
    This can happen at least on NetBSD. — joerg / ViewSVN
  11. [KnownBits] Add wrapper methods for setting and clear all bits in the underlying APInts in KnownBits.

    This adds routines for reseting KnownBits to unknown, making the value all zeros or all ones. It also adds methods for querying if the value is zero, all ones or unknown.

    Differential Revision: https://reviews.llvm.org/D32637 — ctopper / ViewSVN
  12. [clang-tidy] Fix misc-move-const-arg for move-only types.

    Summary: Fix misc-move-const-arg false positives on move-only types.

    Reviewers: sbenza

    Reviewed By: sbenza

    Subscribers: xazax.hun, cfe-commits

    Differential Revision: https://reviews.llvm.org/D31160 — alexfh / ViewSVN
  13. Add missing 'arch' key to valid qHostInfo keys

    'arch' is a valid qHostInfo key, but the unit
    test for qHostInfo did not include it in the set of possible keys.

    Reviewers: tfiala, labath

    Subscribers: lldb-commits

    Differential Revision: https://reviews.llvm.org/D32711 — fjricci / ViewSVN
  14. ANSIfy more. Still no behavior change. — nico / ViewSVN
  15. ANSIfy. No behavior change. — nico / ViewSVN
  16. Allow operator-> to work from a FixedStreamArrayIterator.

    This is similar to my recent fix for VarStreamArrayIterator, but the cause
    (and thus the fix) is subtley different.  The FixedStreamArrayIterator
    iterates over a const Array, so the iterator's value type must be const. — amccarth / ViewSVN
  17. [Float2Int] Replace a ConstantRange copy with a move. Remove an extra call to MapVector::find. — ctopper / ViewSVN
  18. Warn that the [] spelling of uuid(...) is deprecated.

    https://reviews.llvm.org/D32879 — nico / ViewSVN
  19. [ADT] Add BitVector::find_prev.

    This almost completes the matrix of all possible find




    Differential Revision: https://reviews.llvm.org/D32885 — zturner / ViewSVN

r302253 (#5729) (May 5, 2017 11:19:37 AM)

  1. Add a fix-it for -Wunguarded-availability

    This patch adds a fix-it for the -Wunguarded-availability warning. This fix-it
    is similar to the Swift one: it suggests that you wrap the statement in an
    `if (@available)` check. The produced fixits are indented (just like the Swift
    ones) to make them look nice in Xcode's fix-it preview.


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

r302252 (#5728) (May 5, 2017 10:15:22 AM)

  1. Add more variations of addcarry in the tests. NFC. — deadalnix / ViewSVN
  2. [InstSimplify] fix copy-paste mistake in test comments; NFC — spatel / ViewSVN
  3. [ObjC] Don't disallow vector parameters/return values in methods
    whose introduced version is lower than the allowed version.

    We should just rely on the target version as this introduced version can lead
    to false positives (e.g. deprecated declarations).

    rdar://31964333 — arphaman / ViewSVN
  4. [llvm-dwarfdump] - Add comment for maybeDecompress(). NFC.

    Addresses post commit review comment. — grimar / ViewSVN
  5. [InstSimplify] add tests for (icmp X, C1 | icmp X, C2); NFC

    These are the 'or' counterparts for the tests added with r300493. — spatel / ViewSVN
  6. Introduce Wzero-as-null-pointer-constant.

    Add an opt-in warning that fires when 0 is used as a null pointer.
    gcc has this warning, and there's some demand for it.

    https://reviews.llvm.org/D32914 — nico / ViewSVN
  7. fix build on Cygwin — nlopes / ViewSVN
  8. [AArch64] Remove AArch64AddressTypePromotion pass

    Remove the AArch64AddressTypePromotion pass as we migrated all transformations
    done in this pass into CGP in r299379.

    Reviewers: qcolombet, jmolloy, javed.absar, mcrosier

    Reviewed By: qcolombet

    Subscribers: aemerson, rengolin, mgorny, llvm-commits

    Differential Revision: https://reviews.llvm.org/D31623 — junbuml / ViewSVN
  9. Fix typo — grosser / ViewSVN
  10. [X86][SSE] Add 128/256/512 bit vector build vector from register tests — rksimon / ViewSVN

r302242 (#5727) (May 5, 2017 9:19:26 AM)

  1. Remember OffsetInArchive in LazyObjectFile.

    LazyObjectFile might turn out to be a BitcodeFile, so we need
    OffsetInArchive. — rafael / ViewSVN
  2. Use the archive offset with --whole-archive.

    The test ELF/lto/thin-archivecollision.ll was not testing what it
    wanted to test. It needs two archive members with the same name, but
    different offsets.

    Without this we could remove all references of OffsetInArchive and all
    tests would still pass.

    Fixing the test showed that the --whole-archive case was broken, which
    this patch fixes. — rafael / ViewSVN
  3. [Driver] Add a "-mmacos_version_min" option that's an alias for

    The option -mmacosx_version_min will still be the canonical option for now, but
    in the future we will switch over to -mmacos_version_min and make
    -mmacosx_version_min an alias instead.


    Differential Revision: https://reviews.llvm.org/D32796 — arphaman / ViewSVN
  4. [ubsan]: temporarily disable print_stack_trace.cc test

    Some problems with ARM stack unwinding led to inaccurate stack traces being
    printed, which caused this test to fail on
    http://lab.llvm.org:8011/builders/clang-cmake-thumbv7-a15-full-sh — glider / ViewSVN
  5. [LoopIdiom] check for safety while expanding

    Loop Idiom recognition was generating memset in a case that
    would result generating a division operation to an unsafe location.

    Differential Revision: https://reviews.llvm.org/D32674 — hiraditya / ViewSVN

r302237 (#5726) (May 5, 2017 8:16:21 AM)

  1. [powerpc] Mark coverage-sample.cc as XFAIL on powerpc64le

    When run this test case causes a segementation fault on powerpc64le.
    The xfail should be removed when the problem is fixed. — seurer / ViewSVN
  2. [Tooling] Remove redundant check, NFCi

    Summary: The Database check looks redundant.

    Reviewers: bkramer

    Subscribers: klimek, cfe-commits

    Differential Revision: https://reviews.llvm.org/D32909 — krasimir / ViewSVN
  3. Remember archive name when creating LazyObjectFile.

    It is needed for creating an unique identifier for ThinLTO.

    This fixes pr32931. — rafael / ViewSVN
  4. [ScopBuilder] Do not verify unfeasible SCoPs.

    SCoPs with unfeasible runtime context are thrown away and therefore
    do not need their uses verified.

    The added test case requires a complexity limit to exceed.
    Normally, error statements are removed from the SCoP and for that
    reason are skipped during the verification. If there is a unfeasible
    runtime context (here: because of the complexity limit being reached),
    the removal of error statements and other SCoP construction steps are
    skipped to not waste time. Error statements are not modeled in SCoPs
    and therefore have no requirements on whether the scalars used in
    them are available. — meinersbur / ViewSVN

r302233 (#5725) (May 5, 2017 7:20:39 AM)

  1. [X86][AVX512] Improve support and testing for CTLZ of 512-bit vectors without CDI — rksimon / ViewSVN
  2. Empty CMAKE_C_FLAGS_{build_type} when setting flags manually.

    This is for lnt runtest test-suite.
    When requesting specific compiler flags, users probably don't want
    whatever the cmake defaults are for a particular build type to be
    injected too into the build command line.
    For example, 'lnt runtest test-suite --cppflags="-O0 -g"', would still
    build the test-suite at -O3, since the test-suite sets CMAKE_BUILD_TYPE to
    RELEASE by default, which appends flags "-O3 -DNDEBUG" after "-O0 -g" on the
    command line (at least on my linux setup).
    To make sure that doesn't happen, clear the default build flags for
    all cmake build types, when the user requested specific build flags. — kbeyls / ViewSVN
  3. Fix handling of signWrappedSets in access relations

    Since r294891, in MemoryAccess::computeBoundsOnAccessRelation(), we skip
    manually bounding the access relation in case the parameter of the load
    instruction is already a wrapped set. Later on we assume that the lower
    bound on the set is always smaller or equal to the upper bound on the
    set. Bug 32715 manages to construct a sign wrapped set, in which case
    the assertion does not necessarily hold. Fix this by handling a sign
    wrapped set similar to a normal wrapped set, that is skipping the

    Contributed-by: Maximilian Falkenstein <falkensm@student.ethz.ch>

    Reviewers: grosser

    Subscribers: pollydev, llvm-commits

    Tags: #Polly

    Differential Revision: https://reviews.llvm.org/D32893 — grosser / ViewSVN
  4. [X86] Remove duplicate operation actions. NFCI. — rksimon / ViewSVN
  5. [X86][AVX512CDI] Move v2i64/v4i64 and v4i32/v8i32 VPLZCNT lowering to tablegen

    Extend NoVLX targets to use the 512-bit versions — rksimon / ViewSVN
  6. Remove stale live-ins in the branch folder

    Hoisting common code can cause registers that live-in in the successor
    blocks to no longer be live-in. The live-in information needs to be
    updated to reflect this, or otherwise incorrect code can be generated
    later on.

    Differential Revision: https://reviews.llvm.org/D32661 — kparzysz / ViewSVN

r302227 (#5724) (May 5, 2017 6:25:00 AM)

  1. [ELF] - Accept --defsym foo=value form.

    Previously we accepted --defsym=foo=value only.

    Reported by Sean Silva. — grimar / ViewSVN
  2. Remove unused variable — rksimon / ViewSVN
  3. Fix segfault resulting from empty print prompt

    I have found a way to segfault lldb in 7 keystrokes! Steps to reproduce:
    1) Launch lldb
    2) Type `print` and hit enter. lldb will now prompt you to type a list of
        expressions, followed by an empty line.
    3) Hit enter, indicating the end of your input.
    4) Segfault!

    After some investigation, I've found the issue in Host/common/Editline.cpp.
    Editline::MoveCursor() relies on m_input_lines not being empty when the `to`
    argument is CursorPosition::BlockEnd. This scenario, as far as I can tell,
    occurs in one specific instance: In Editline::EndOrAddLineCommand() when the
    list of lines being processed contains exactly one string (""). Meeting this
    condition is fairly simple, I have posted steps to reproduce above.

    Reviewers: krytarowski, zturner, labath

    Reviewed By: labath

    Subscribers: scott.smith, lldb-commits

    Differential Revision: https://reviews.llvm.org/D32421
    Patch by Alex Langford. — labath / ViewSVN

r302224 (#5723) (May 5, 2017 5:29:27 AM)

  1. [ARM] Add support for ORR and ORN instruction substitutions

    Recently support was added for substituting one intruction for another by
    negating or inverting the immediate, but ORR and ORN were missed so this patch
    adds them.

    This one is slightly different to the others in that ORN only exists in thumb,
    so we only do the substitution in thumb.

    Differential Revision: https://reviews.llvm.org/D32534 — john.brawn / ViewSVN
  2. Add TaskMap for iterating a function over a set of integers

    Many parallel tasks just want to iterate over all the possible numbers from 0 to N-1.  Rather than enqueue N work items, instead just "map" the function across the requested integer space.

    Reviewers: clayborg, labath, tberghammer, zturner

    Reviewed By: clayborg, zturner

    Subscribers: zturner, lldb-commits

    Differential Revision: https://reviews.llvm.org/D32757
    Patch by Scott Smith <scott.smith@purestorage.com>. — labath / ViewSVN
  3. [X86][AVX] Add LowerIntUnary helpers to split unary vector ops in half. NFCI.

    Same as LowerIntArith helpers but for unary ops instead of binary. — rksimon / ViewSVN
  4. [llvm-dwarfdump] - Print an error message if section decompression failed.

    llvm-dwarfdump currently prints no message if decompression fails
    for some reason. I noticed that during work on one of LLD patches
    where LLD produced an broken output. It was a bit confusing to see
    no output for section dumped and no any error message at all.

    Patch adds error message for such cases.

    Differential revision: https://reviews.llvm.org/D32865 — grimar / ViewSVN
  5. ABISysV_arm64: compute return value for large vectors correctly

    Arm64 Procedure Call Standard specifies than only vectors up to 16 bytes
    are stored in v0 (which makes sense, as that's the size of the
    register). 32-byte vector types are passed as regular structs via x8
    pointer. Treat them as such.

    This fixes TestReturnValue for arm64-clang. I also split the test case
    into two so I can avoid the if(gcc) line, and annotate each test
    instead. (It seems the vector type tests fail with gcc only when
    targetting x86 arches).

    Reviewers: tberghammer, eugene

    Subscribers: aemerson, omjavaid, rengolin, srhines, lldb-commits

    Differential Revision: https://reviews.llvm.org/D32813 — labath / ViewSVN

r302219 (#5722) (May 5, 2017 4:00:41 AM)

  1. [X86] Remove unused code from X86 optimize LEAs. NFC.

    This patch removes unused code which is no longer required because of changes
    to the DIExpression::prepend function. — anng / ViewSVN

r302218 (#5721) (May 5, 2017 3:01:28 AM)

  1. [ubsan] Implement __sanitizer_print_stack_trace for standalone UBSan runtime.

    Patch by Max Moroz, reviewed at https://reviews.llvm.org/D32542 — glider / ViewSVN
  2. Revert "[Polly] Added OpenCL Runtime to GPURuntime Library for GPGPU CodeGen"

    This reverts commit 17a84e414adb51ee375d14836d4c2a817b191933.

    Patches should have been submitted in the order of:

    1. D32852
    2. D32854
    3. D32431

    I mistakenly pushed D32431(3) first. Reverting to push in the correct
    order. — bollu / ViewSVN
  3. [ArgPromotion] Add a testcase for PR32917

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

r302215 (#5720) (May 5, 2017 2:05:41 AM)

  1. [Polly] Added OpenCL Runtime to GPURuntime Library for GPGPU CodeGen

    When compiling for GPU, one can now choose to compile for OpenCL or CUDA,
    with the corresponding polly-gpu-runtime flag (libopencl / libcudart). The
    GPURuntime library (GPUJIT) has been extended with the OpenCL Runtime library
    for that purpose, correctly choosing the corresponding library calls to the
    option chosen when compiling (via different initialization calls).

    Additionally, a specific GPU Target architecture can now be chosen with -polly-gpu-arch (only nvptx64 implemented thus far).

    Reviewers: grosser, bollu, Meinersbur, etherzhhb, singam-sanjay

    Reviewed By: grosser, Meinersbur

    Subscribers: singam-sanjay, llvm-commits, pollydev, nemanjai, mgorny, yaxunl, Anastasia

    Tags: #polly

    Differential Revision: https://reviews.llvm.org/D32431 — bollu / ViewSVN

r302214 (#5719) (May 5, 2017 1:09:35 AM)

  1. Initialize new member X86Operand::FrontendSize in all codepaths.

    This fixes MSAN-builds after r302179. — djasper / ViewSVN

r302213 (#5718) (May 4, 2017 10:59:45 PM)

  1. Document XFAIL's with the relevent bug number — ericwf / ViewSVN

r302212 (#5717) (May 4, 2017 7:52:56 PM)

  1. [XRay][compiler-rt] Remove dependency on FileCheck from function id utilities tests

    Follow-up on D32846 to simplify testing and not rely on FileCheck to
    test boundary conditions, and instead do all the testing in code
    instead. — dberris / ViewSVN
  2. [ubsan] Fix error summary message for ObjC BOOL invalid loads — Vedant Kumar / ViewSVN
  3. [XRay][compiler-rt] Add function id utilities for XRay

    This change allows us to provide users and implementers of XRay handlers
    a means of converting XRay function id's to addresses. This, in
    combination with the facilities provided in D32695, allows users to find

      - How many function id's there are defined in the current binary.
      - Get the address of the function associated with this function id.
      - Patch only specific functions according to their requirements.

    While we don't directly provide symbolization support in XRay, having
    the function's address lets users determine this information easily
    either during runtime, or offline with tools like 'addr2line'.

    Reviewers: dblaikie, echristo, pelikan

    Subscribers: kpw, llvm-commits

    Differential Revision: https://reviews.llvm.org/D32846 — dberris / ViewSVN
  4. Update VP prof metadata during inlining.

    Summary: r298270 added profile update logic for branch_weights. This patch implements profile update logic for VP prof metadata too.

    Reviewers: eraman, tejohnson, davidxl

    Reviewed By: eraman

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D32773 — dehao / ViewSVN

r302208 (#5716) (May 4, 2017 6:23:46 PM)

  1. [ADT] A few minor improvements to BitVector

    Fixes some spelling mistakes, uses a helper function, and
    adds an additional test case. — zturner / ViewSVN
  2. Document that Multilib flags must be actual flags

    This is because -print-multi-lib depends on them being flags for correctness.

    Fixes a case of this in the arm-android multilib selection logic. — Jonathan Roelofs / ViewSVN
  3. [pdb] Don't verify TPI hash values up front.

    Verifying the hash values as we are currently doing
    results in iterating every type record before the user
    even tries to access the first one, and the API user
    has no control over, or ability to hook into this

    As a result, when the user wants to iterate over types
    to print them or index them, this results in a second
    iteration over the same list of types.  When there's
    upwards of 1,000,000 type records, this is obviously
    quite undesirable.

    This patch raises the verification outside of TpiStream
    , and llvm-pdbdump hooks a hash verification visitor
    into the normal dumping process.  So we still verify
    the hash records, but we can do it while not requiring
    a second iteration over the type stream.

    Differential Revision: https://reviews.llvm.org/D32873 — zturner / ViewSVN
  4. [PDB] Don't build the entire source file list up front.

    I tried to run llvm-pdbdump on a very large (~1.5GB) PDB to
    try and identify show-stopping performance problems.  This
    patch addresses the first such problem.

    When loading the DBI stream, before anyone has even tried to
    access a single record, we build an in memory map of every
    source file for every module.  In the particular PDB I was
    using, this was over 85 million files.  Specifically, the
    complexity is O(m*n) where m is the number of modules and
    n is the average number of source files (including headers)
    per module.

    The whole reason for doing this was so that we could have
    constant time access to any module and any of its source
    file lists.  However, we can still get O(1) access to the
    source file list for a given module with a simple O(m)
    precomputation, and access to the list of modules is
    already O(1) anyway.

    So this patches reduces the O(m*n) up-front precomputation
    to an O(m) one, where n is ~6,500 and n*m is about 85 million
    in my pathological test case.

    Differential Revision: https://reviews.llvm.org/D32870 — zturner / ViewSVN
  5. [llvm-pdbdump] Only build the TypeDatabase if necessary.

    Building the type database is expensive, and can take multiple
    minutes for large PDBs.  But we only need it in certain cases
    depending on what command line options are specified.  So only
    build it when we know we're about to need it. — zturner / ViewSVN
  6. Remap metadata attached to global variables.

    Fix for PR32577.
    Global variables may have !associated metadata, which includes a reference to another global. It needs remapping. — eugenis / ViewSVN

r302202 (#5715) (May 4, 2017 4:54:39 PM)

  1. [RegisterBankInfo] Fix 80-col introduced in r293506.

    NFC. — qcolombet / ViewSVN
  2. [GlobalISel] Add missing doxygen keyword for doxygen groups.

    NFC — qcolombet / ViewSVN
  3. AMDGPU: GFX9 GS and HS shaders always have the scratch wave offset in SGPR5

    Reviewers: arsenm, nhaehnle

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

    Differential Revision: https://reviews.llvm.org/D32645 — mareko / ViewSVN
  4. [GISel]:Skip legalizing Intermediate inst(with generic types)

    During legalization, targets can create Pseudo Instructions with
    generic types. We shouldn't try to legalize them.

    Reviewed by Quentin, dsanders
    https://reviews.llvm.org/D32575 — aditya_nandakumar / ViewSVN
  5. [JumpThreading] When processing compares, explicitly check that the result type is not a vector rather than check for it being an integer.

    Compares always return a scalar integer or vector of integers. isIntegerTy returns false for vectors, but that's not completely obvious. So using isVectorTy is less confusing. — ctopper / ViewSVN
  6. [JumpThreading] Change a dyn_cast that is already protected by an isa check to a static cast. Combine the with another static cast. NFC

    Differential Revision: https://reviews.llvm.org/D32874 — ctopper / ViewSVN
  7. [GISel]: Add support to translate ConstantVectors

    Reviewed by Quentin
    https://reviews.llvm.org/D32814 — aditya_nandakumar / ViewSVN
  8. Fix whitespace before token-paste of an argument.

    The whitespace should come from the argument name in the macro
    expansion, rather than from the token passed to the macro (same as it
    does when not pasting).

    Added a new test case for the change in behavior to stringize_space.c.

    FileCheck'ized macro_paste_commaext.c, tweaked the test case, and
    added a comment; no behavioral change to this test.

    Differential Revision: https://reviews.llvm.org/D30427 — jyknight / ViewSVN
  9. [ConstantRange] Add LLVM_NODISCARD to ConstantRange since a large number of its methods construct new ConstantRange objects. — ctopper / ViewSVN
  10. [Float2Int] Remove return of ConstantRange from seen method. Nothing uses it so it just creates and discards a ConstantRange object for no reason. — ctopper / ViewSVN

r302192 (#5714) (May 4, 2017 3:25:21 PM)

  1. Strip trailing whitespace. NFCI. — rksimon / ViewSVN
  2. [clangd] Add documentation page

    Add a simple documentation page for Clangd.
    This will be useful for interested users and contributors to get basic information about how
    to get started and the progress of Clangd.

    Reviewers: krasimir, bkramer

    Reviewed By: krasimir

    Subscribers: Prazek, jbcoe, JDevlieghere, mgehre, JonasToth, kromanenkov, xazax.hun, cfe-commits

    Tags: #clang-tools-extra

    Differential Revision: https://reviews.llvm.org/D31887 — malaperle / ViewSVN

r302190 (#5713) (May 4, 2017 1:56:14 PM)

  1. Turn on -Wmicrosoft-enum-forward-reference by default.

    clang-cl already errs or warns on everything that cl
    warns on in /permissive- mode, except for enum foward
    declarations (and ATL attributes).
    So warn on enum forward declarations by default. — nico / ViewSVN
  2. [InstSimplify] add folds for or-of-casted-icmps

    The sibling folds for 'and' with casts were added with https://reviews.llvm.org/rL273200.
    This is a preliminary step for adding the 'or' variants for the folds added with https://reviews.llvm.org/rL301260.

    The reason for the strange form with constant LHS in the 1st test is because there's another missing fold in that
    case for the inverted predicate. That should be fixed when we add the ConstantRange functionality for 'or-of-icmps'
    that already exists for 'and-of-icmps'.

    I'm hoping to share more code for the and/or cases, so we won't have these differences. This will allow us to remove
    code from InstCombine. It's also possible that we can remove some code here in InstSimplify. I think we have some
    duplicated folds because patterns are not matched in a general way.

    Differential Revision: https://reviews.llvm.org/D32876 — spatel / ViewSVN
  3. Fix bugs checking va_start in lambdas and erroneous contexts

    First, getCurFunction looks through blocks and lambdas, which is wrong.
    Inside a lambda, va_start should refer to the lambda call operator
    prototype. This fixes PR32737.

    Second, we shouldn't use any of the getCur* methods, because they look
    through contexts that we don't want to look through (EnumDecl,
    CapturedStmtDecl). We can use CurContext directly as the calling

    Finally, this code assumed that CallExprs would never appear outside of
    code contexts (block, function, obj-c method), which is wrong. Struct
    member initializers are an easy way to create and parse exprs in a
    non-code context.

    Reviewers: rsmith

    Subscribers: cfe-commits

    Differential Revision: https://reviews.llvm.org/D32761 — rnk / ViewSVN
  4. Turn -Wmicrosoft-enum-value off by default.

    The warning is currently way too noisy to be useful. The plan is
    to make it warn when an MS enum that's negative is compared to
    something, but until that's done the warning shouldn't default
    to on. — nico / ViewSVN
  5. Simplify the header allocation.

    In the non linker script case we would try very early to find out if
    we could allocate the headers. Failing to do that would add extra
    alignment to the first ro section, since we would set PageAlign
    thinking it was the first section in the PT_LOAD.

    In the linker script case the header allocation must be done in the
    end, causing some duplication.

    We now tentatively add the headers to the first PT_LOAD and if it
    turns out they don't fit, remove them. With this we only need to
    allocate the headers in one place in the code. — rafael / ViewSVN
  6. [WebAssembly] Add wasm symbol table support to llvm-objdump

    Differential Revision: https://reviews.llvm.org/D32760 — sbc / ViewSVN

r302184 (#5711) (May 4, 2017 1:16:23 PM)

  1. Driver: only inject libstdc++ paths when needed on CrossWindows

    When building with libc++ don't bother with injecting the libstdc++
    search paths into the linker search path.  This will make it easier to
    switch between ld and lld. — Saleem Abdulrasool / ViewSVN
  2. [PPC] When restoring R30 (PIC base pointer), mark it as <def>

    This happened on the PPC32/SVR4 path and was discovered when building
    FreeBSD on PPC32. It was a typo-class error in the frame lowering code.

    This fixes PR26519. — kparzysz / ViewSVN
  3. Fix test failure with GCC 4.9 — ericwf / ViewSVN
  4. Change Appveyor to download Clang from llvm.org instead of my private server — ericwf / ViewSVN
  5. Don't return an invalid line table if the DW_AT_stmt_list value is not in the .debug_line section. — gclayton / ViewSVN
  6. [ms-inline-asm] Use the frontend size only for ambiguous instructions

    This avoids problems on code like this:
      char buf[16];
      __asm {
        movups xmm0, [buf]
        mov [buf], eax

    The frontend size in this case (1) is wrong, and the register makes the
    instruction matching unambiguous. There are also enough bytes available
    that we shouldn't complain to the user that they are potentially using
    an incorrectly sized instruction to access the variable.

    Supersedes D32636 and D26586 and fixes PR28266 — rnk / ViewSVN
  7. [InstSimplify] move logic-of-icmps helper functions; NFC

    Putting these next to each other should make it easier to see
    what's missing from each side. Patch to plug one of those holes
    should be posted soon. — spatel / ViewSVN
  8. [powerpc] Reactivate ppc64le lnt buildbot

    The tests that were flakey have been disabled.  Initially this will be run
    on the silent master. — seurer / ViewSVN
  9. Re-apply r302108, "IR: Use pointers instead of GUIDs to represent edges in the module summary. NFCI."
    with a fix for the clang backend. — pcc / ViewSVN
  10. Fix a typo. — Michael Zolotukhin / ViewSVN

r302174 (#5710) (May 4, 2017 12:09:24 PM)

  1. [InstSimplify] add tests for or-of-casted-icmps; NFC — spatel / ViewSVN
  2. [NewGVN] Remove unneeded newline and format assertions. NFCI. — davide / ViewSVN
  3. Add markup for libc++ dylib availability

    Libc++ is used as a system library on macOS and iOS (amongst others). In order
    for users to be able to compile a binary that is intended to be deployed to an
    older version of the platform, clang provides the
    availability attribute <https://clang.llvm.org/docs/AttributeReference.html#availability>_
    that can be placed on declarations to describe the lifecycle of a symbol in the

    See docs/DesignDocs/AvailabilityMarkup.rst for more information.

    Differential Revision: https://reviews.llvm.org/D31739 — mehdi_amini / ViewSVN
  4. [APInt] Reduce number of allocations involved in multiplying. Reduce worst case multiply size

    Currently multiply is implemented in operator*=. Operator* makes a copy and uses operator*= to modify the copy.

    Operator*= itself allocates a temporary buffer to hold the multiply result as it computes it. Then copies it to the buffer in *this.

    Operator*= attempts to bound the size of the result based on the number of active bits in its inputs. It also has a couple special cases to handle 0 inputs without any memory allocations or multiply operations. The best case is that it calculates a single word regardless of input bit width. The worst case is that it calculates the a 2x input width result and drop the upper bits.

    Since operator* uses operator*= it incurs two allocations, one for a copy of *this and one for the temporary allocation. Neither of these allocations are kept after the method operation is done.

    The main usage in the backend appears to be ConstantRange::multiply which uses operator* rather than operator*=.

    This patch moves the multiply operation to operator* and implements operator*= using it. This avoids the copy in operator*. operator* now allocates a result buffer sized the same width as its inputs no matter what. This buffer will be used as the buffer for the returned APInt. Finally, we reuse tcMultiply to implement the multiply operation. This function is capable of not calculating additional upper words that will be discarded.

    This change does lose the special optimizations for the inputs using less words than their size implies. But it also removed the getActiveBits calls from all multiplies. If we think those optimizations are important we could look at providing additional bounds to tcMultiply to limit the computations.

    Differential Revision: https://reviews.llvm.org/D32830 — ctopper / ViewSVN
  5. [PM] Add ProfileSummaryAnalysis as a required pass in the new pipeline.

    Differential revision: https://reviews.llvm.org/D32768 — eraman / ViewSVN
  6. [Lexicon] Add BDCE

    Summary: Add an entry to the Lexicon for "BDCE."

    Reviewers: jmolloy, hfinkel

    Reviewed By: jmolloy

    Differential Revision: https://reviews.llvm.org/D31861 — modocache / ViewSVN

r302168 (#5709) (May 4, 2017 10:52:01 AM)

  1. Use lgamma_r instead of lgamma in binomial_distribution, because freakin' POSIX took a perfectly fine call and made it not thread safe. — marshall / ViewSVN
  2. Add accidentally deleted testcase back. — Adrian Prantl / ViewSVN
  3. Cleanup tests to not share a DISubprogram between multiple Functions.

    rdar://problem/31926379 — Adrian Prantl / ViewSVN
  4. [test-release] Status update *before* long gzip — rengolin / ViewSVN
  5. [clang-tidy] fix readability-implicit-bool-cast false positive with xor — alexfh / ViewSVN
  6. [ScopBuilder] Add missing semicolon after LLVM_FALLTHROUGH.

    It was forgotten in r302157. — meinersbur / ViewSVN
  7. [test] Name the local variable in the C1XX implementation of DoNotOptmize

    Differential Revision: https://reviews.llvm.org/D32510 — caseycarter / ViewSVN

r302161 (#5708) (May 4, 2017 9:44:03 AM)

  1. [clang-tidy] fix readability-implicit-bool-cast false alarm on |=, &= — alexfh / ViewSVN
  2. [clang-tidy] Code cleanup, (almost) NFC (*).

    (*) Printed types of member pointers don't use elaborated type specifiers
    (`int struct S::*` -> `int S::*`). — alexfh / ViewSVN
  3. [Tooling] add a createReplacement overload for StringRef — alexfh / ViewSVN
  4. [test] variant: enable constexpr construction tests on MSVC STL

    * Add a new macro _MSVC_STL_VER to detect when the MSVC STL is being tested
    * Workaround C1XX __is_trivially_copyable bug — caseycarter / ViewSVN
  5. Introduce VirtualUse. NFC.

    If a ScopStmt references a (scalar) value, there are multiple
    possibilities where this value can come. The decision about what kind of
    use it is must be handled consistently at different places, which can be
    error-prone. VirtualUse is meant to centralize the handling of the
    different types of value uses.

    This patch makes ScopBuilder and CodeGeneration use VirtualUse. This
    already helps to show inconsistencies with the value handling. In order
    to keep this patch NFC, exceptions to the general rules are added.
    These might be fixed later if they turn to problems. Overall, this
    should result in fewer post-codegen IR-verification errors, but instead
    assertion failures in `getNewValue` that are closer to the actual error.

    Differential Revision: https://reviews.llvm.org/D32667 — meinersbur / ViewSVN
  6. clang-format: [JS] exponentiation operator

    Summary: While its precedence should be higher than multiplicative, LLVM does not have a level for that, so for the time being just treat it as multiplicative.

    Reviewers: djasper

    Subscribers: cfe-commits, klimek

    Differential Revision: https://reviews.llvm.org/D32864 — mprobst / ViewSVN

r302155 (#5707) (May 4, 2017 8:44:40 AM)

  1. Reduce code duplication. NFC. — rafael / ViewSVN
  2. [globalisel][tablegen] Add several GINodeEquiv's for operators that do not require additional support.

    As of this patch, 350 out of 3938 rules are currently imported.

    Depends on D32229

    Reviewers: qcolombet, kristof.beyls, rovka, t.p.northover, ab, aditya_nandakumar

    Reviewed By: ab

    Subscribers: dberris, llvm-commits, igorb

    Differential Revision: https://reviews.llvm.org/D32275 — dsanders / ViewSVN
  3. [DAGCombine] Transform (fadd A, (fmul B, -2.0)) -> (fsub A, (fadd B, B)).

    Differential Revision: http://reviews.llvm.org/D32596 — mcrosier / ViewSVN

r302152 (#5706) (May 4, 2017 7:54:20 AM)

  1. [ASAN] Add interceptor for __longjmp_chk

    glibc on Linux calls __longjmp_chk instead of longjmp (or _longjmp) when
    _FORTIFY_SOURCE is defined. Ensure that an ASAN-instrumented program
    intercepts this function when a system library calls it, otherwise the
    stack might remain poisoned and result in CHECK failures and false

    Fixes https://github.com/google/sanitizers/issues/721

    Reviewed By: eugenis

    Differential Revision: https://reviews.llvm.org/D32408 — lekensteyn / ViewSVN
  2. DiagnosticsEngine should clear DelayedDiagID before reporting the
    delayed diagnostic

    This fix avoids an infinite recursion that was uncovered in one of our internal
    tests by r301992. The testcase is the most reduced version of that
    auto-generated test.

    This is an improved version of the reverted commit r302037. The previous fix
    actually managed to expose another subtle bug whereby `fatal_too_many_errors`
    error was reported twice, with the second report setting the
    `FatalErrorOccurred` flag. That prevented the notes that followed the diagnostic
    the caused `fatal_too_many_errors` to be emitted. This commit ensures that notes
    that follow `fatal_too_many_errors` but that belong to the diagnostic that
    caused `fatal_too_many_errors` won't be emitted by setting the
    `FatalErrorOccurred` when emitting `fatal_too_many_errors`.

    rdar://31962618 — arphaman / ViewSVN
  3. [X86][AVX512] Fix VPABSD file checks

    Fix capitalization and string matching — rksimon / ViewSVN
  4. [X86][SSE] Add i686 triple tests for partial vector and re-association — rksimon / ViewSVN
  5. Refactoring with range-based for, NFC

    Patch by Wei-Ren Chen.

    Differential Revision: https://reviews.llvm.org/D32682 — kparzysz / ViewSVN
  6. [compiler-rt][mips] Add support for quad precision builtins for mips64

    Match the builtins that GCC provides for IEEE754 quad precision
    on MIPS64. Also, enable building them with clang as PR20098 is resolved.

    Disable tests for xf and xc modes as MIPS doesn't support that mode in
    hardware or software.

    Reviewers: slthakur

    Differential Revision: https://reviews.llvm.org/D32794 — sdardis / ViewSVN
  7. [SystemZ]  Make copyPhysReg() add impl-use operands of super reg.

    When a 128 bit COPY is lowered into two instructions, an impl-use operand of
    the super-reg should be added to each new instruction in case one of the
    sub-regs is undefined.

    Review: Ulrich Weigand — jonpa / ViewSVN

r302145 (#5705) (May 4, 2017 7:03:58 AM)

  1. [X86][SSE] Add i686 triple tests for PBLENDW commutation — rksimon / ViewSVN
  2. [X86][AVX1] Regenerate checks and add i686 triple tests for folded logical ops — rksimon / ViewSVN
  3. Add support of the next Ubuntu (Ubuntu 17.10 - Artful Aardvark) — sylvestre / ViewSVN

    The test subdirectory POLLY_TEST_DIRECTORIES was heavily outdated and
    only used in out-of-LLVM-tree builds
    (to generate polly-test-${subdir} targets). — meinersbur / ViewSVN
  5. Revert "IR: Use pointers instead of GUIDs to represent edges in the module summary. NFCI."

    This reverts commit r302108. — ioeric / ViewSVN
  6. Revert "IR: Use pointers instead of GUIDs to represent edges in the module summary. NFCI."

    This reverts commit r302108. This causes crash in clang bootstrap with LTO.

    Contacted the auther in the original commit. — ioeric / ViewSVN
  7. [LLDB][MIPS] Fix TestStepOverBreakpoint.py failure.

    Reviewers: jingham, labath

    Subscribers: jaydeep, bhushan, lldb-commits, slthakur

    Differential Revision: https://reviews.llvm.org/D32168 — nitesh.jain / ViewSVN

r302138 (#5704) (May 4, 2017 5:42:57 AM)

  1. [mips][XRay] Use the base version of emitXRayTable

    Follow up rL290858 by removing the MIPS specific version of XRayTable
    emission in favour of the basic version.

    This resolves a buildbot failure where the ELF sections were malformed
    causing the linker to reject the object files with xray related sections.

    Reviewers: dberris, slthakur

    Differential Revision: https://reviews.llvm.org/D32808 — sdardis / ViewSVN

r302137 (#5703) (May 4, 2017 4:52:40 AM)

  1. [ArgPromotion] Fix a truncated variable

    This fixes a regression since SVN rev 273808 (which was supposed to
    not change functionality).

    The regression caused miscompilations (noted in the wild when targeting
    AArch64) on platforms with 32 bit long.

    Differential Revision: https://reviews.llvm.org/D32850 — mstorsjo / ViewSVN
  2. [Index] The relation between the declarations in template
    specializations that 'override' declarations in the base template should use
    the 'specializationOf' relation instead of 'specializationOf | overrideOf'.

    The indexer relations are meant to be orthogonal, so 'specializationOf' is
    better than the combined relation. — arphaman / ViewSVN
  3. [LLVM][inline-asm][Altmacor] Altmacro string delimiter '<..>'

    In this patch, I introduce a new altmacro string delimiter.
    This review is the second review in a series of four reviews.
    (one for each altmacro feature: LOCAL, string delimiter, string '!' escape sign and absolute expression as a string '%' ).

    In the alternate macro mode, you can delimit strings with matching angle brackets <..>
    when using it as a part of calling macro arguments.

    As described in the https://sourceware.org/binutils/docs-2.27/as/Altmacro.html
    You can delimit strings with matching angle brackets."


    1. If an argument begins with '<' and ends with '>'. The argument is considered as a string.
    2. Except adding new string mark '<..>', a regular macro behavior is expected.
    3. The altmacro cannot affect the regular less/greater behavior.
    4. If a comma is present inside an angle brackets it considered as a character and not as a separator.

    Differential Revision: https://reviews.llvm.org/D32701 — mzuckerm / ViewSVN

r302134 (#5702) (May 4, 2017 4:01:23 AM)

  1. [ScopDetection] Check for already known required-invariant loads [NFC]

    For certain test cases we spent over 50% of the scop detection time in
    checking if a load is likely invariant. We can avoid most of these checks by
    testing early on if a load is expected to be invariant. Doing this reduces
    scop-detection time on a large benchmark from 52 seconds to just 25 seconds.

    No functional change is expected. — grosser / ViewSVN
  2. MainLoop: Add unit tests

    This adds a couple of unit tests to the MainLoop class. To get the
    kqueue based version of the signal handling passing, I needed to
    modify the implementation a bit to make the queue object persistent.
    Otherwise, only the signals which are send during the Run call would get
    processed, which did not match the ppoll behaviour.

    I also took the opportunity to remove the ForEach template functions and
    replace them with something more reasonable.

    Reviewers: beanz, eugene

    Subscribers: lldb-commits, mgorny

    Differential Revision: https://reviews.llvm.org/D32753 — labath / ViewSVN
  3. Adjust test case to not trigger the SCEV optimization committed in r302096

    This makes sure we still test the case that a PHI-NODE cannot be analyzed by
    scalar evolution and consequently must be code generated explicitly.  As
    Michael's optimization triggers only on a very specific "add %iv, %step"
    pattern, just changing 'add' to 'mul' adds back test coverage. — grosser / ViewSVN

r302131 (#5701) (May 4, 2017 2:33:18 AM)

  1. [ARM] ACLE Chapter 9 intrinsics

    Implemented the remaining integer data processing intrinsics from
    the ARM ACLE v2.1 spec, such as parallel arithemtic and DSP style

    Differential Revision: https://reviews.llvm.org/D32282 — sam_parker / ViewSVN
  2. Dummy commit to trigger CMake reconfiguration and unbreak Sphinx build — ericwf / ViewSVN
  3. Fix incorrect usage of __libcpp_mutex_trylock. Patch from Andrey Khalyavin — ericwf / ViewSVN
  4. Update Appveyor bot link to point to new llvm-mirror Appveyor account — ericwf / ViewSVN
  5. [X86][AVX-512] Allow EVEX encoded instruction selection when available for mul v8i32.

    Differential Revision: https://reviews.llvm.org/D32679 — ibreger / ViewSVN
  6. [ARM] ACLE Chapter 9 intrinsics

    Added the integer data processing intrinsics from ACLE v2.1 Chapter 9
    but I have missed out the saturation_occurred intrinsics for now. For
    the instructions that read and write the GE bits, a chain is included
    and the only instruction that reads these flags (sel) is only
    selectable via the implemented intrinsic.

    Differential Revision: https://reviews.llvm.org/D32281 — sam_parker / ViewSVN
  7. [OpenCL] Add intel_reqd_sub_group_size attribute support

    Add intel_reqd_sub_group_size attribute support as intel extension  cl_intel_required_subgroup_size from

    Reviewers: Anastasia, bader, hfinkel, pxli168

    Reviewed By: Anastasia, bader, pxli168

    Subscribers: cfe-commits, yaxunl

    Differential Revision: https://reviews.llvm.org/D30805 — pxl / ViewSVN
  8. [X86] Disabling PLT in Regcall CC Functions

    According to psABI, PLT stub clobbers XMM8-XMM15.
    In Regcall calling convention those registers are used for passing parameters.
    Thus we need to prevent lazy binding in Regcall.

    Differential Revision: https://reviews.llvm.org/D32430 — orenb / ViewSVN

r302123 (#5700) (May 4, 2017 1:06:35 AM)

  1. [AVX-512VL] Autogenerate checks. Add --show-mc-encoding to check instruction predicate. — ibreger / ViewSVN
  2. test commit — ericwf / ViewSVN
  3. [XRay][compiler-rt][NFC] Update comments to doxygen format; group functions better. — dberris / ViewSVN
  4. test commit — ericwf / ViewSVN
  5. [AVX] Fix vpcmpeqq predicate.

    Fix vpcmpeqq predicate. AVX512 version of vpcmpeqq is not equivalent to AVX one.
    Split from https://reviews.llvm.org/D32679

    Reviewers: craig.topper, zvi, aymanmus

    Reviewed By: craig.topper

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D32786 — ibreger / ViewSVN
  6. [libcxxabi][CMake] Set library dir when built under runtimes/

    This will put libraries into the build root's lib/ directory by default.

    Differential Revision: https://reviews.llvm.org/D32735 — hahnfeld / ViewSVN
  7. [libcxx][CMake] Set library dir when built under runtimes/

    This will put libraries into the build root's lib/ directory by default.

    Differential Revision: https://reviews.llvm.org/D32736 — hahnfeld / ViewSVN
  8. update buildbot doc to link to the new Appveyor builders — ericwf / ViewSVN

r302115 (#5699) (May 3, 2017 11:45:29 PM)

  1. Attempt to enable the LIT progress bar on Appveyor — ericwf / ViewSVN
  2. Use right function in LoopVectorize.

    -    unsigned AS = getMemInstAlignment(I);
    +    unsigned AS = getMemInstAddressSpace(I);

    Review: Hal Finkel — jonpa / ViewSVN
  3. Setup Appveyor bot for MSVC 2017 and MSVC 2015 — ericwf / ViewSVN
  4. [XRay][compiler-rt] Support patching/unpatching specific functions

    This change allows us to patch/unpatch specific functions using the
    function ID. This is useful in cases where implementations might want to
    do coverage-style, or more fine-grained control of which functions to
    patch or un-patch at runtime.

    Depends on D32693.

    Reviewers: dblaikie, echristo, kpw

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D32695 — dberris / ViewSVN
  5. [XRay] Use wordsize-dependent alignment for index

    This makes it simpler for the runtime to consistently handle the entries
    in the function sled index in both 32 and 64 bit platforms where the
    XRay runtime works.

    Follow-up on D32693. — dberris / ViewSVN

r302110 (#5698) (May 3, 2017 10:25:02 PM)

  1. [SelectionDAG] Improve known bits support for CTPOP.

    This is based on the same concept from ValueTracking's version of computeKnownBits. — ctopper / ViewSVN

r302109 (#5697) (May 3, 2017 9:34:43 PM)

  1. [XRay] Create an Index of sleds per function

    This change adds a new section to the xray-instrumented binary that
    stores an index into ranges of the instrumentation map, where sleds
    associated with the same function can be accessed as an array. At
    runtime, we can get access to this index by function ID offset allowing
    for selective patching and unpatching by function ID.

    Each entry in this new section (xray_fn_idx) will include two pointers
    indicating the start and one past the end of the sleds associated with
    the same function. These entries will be 16 bytes long on x86 and
    aarch64. On arm, we align to 16 bytes anyway so the runtime has to take
    that into consideration.

    __{start,stop}_xray_fn_idx will be the symbols that the runtime will
    look for when we implement the selective patching/unpatching by function
    id APIs. Because XRay synthesizes the function id's in a monotonically
    increasing manner at runtime now, implementations (and users) can use
    this table to look up the sleds associated with a specific function.
    This is useful in implementations that want to do things like:

      - Implement coverage mode for functions by patching everything
        pre-main, then as functions are encountered, the installed handler
        can unpatch the function that's been encountered after recording
        that it's been called.
      - Do "learning mode", so that the implementation can figure out some
        statistical information about function calls by function id for a
        time being, and then determine which functions are worth
        uninstrumenting at runtime.
      - Do "selective instrumentation" where an implementation can
        specifically instrument only certain function id's at runtime
        (either based on some external data, or through some other
        heuristics) instead of patching all the instrumented functions at

    Reviewers: dblaikie, echristo, chandlerc, javed.absar

    Subscribers: pelikan, aemerson, kpw, llvm-commits, rengolin

    Differential Revision: https://reviews.llvm.org/D32693 — dberris / ViewSVN
  2. IR: Use pointers instead of GUIDs to represent edges in the module summary. NFCI.

    When profiling a no-op incremental link of Chromium I found that the functions
    computeImportForFunction and computeDeadSymbols were consuming roughly 10% of
    the profile. The goal of this change is to improve the performance of those
    functions by changing the map lookups that they were previously doing into
    pointer dereferences.

    This is achieved by changing the ValueInfo data structure to be a pointer to
    an element of the global value map owned by ModuleSummaryIndex, and changing
    reference lists in the GlobalValueSummary to hold ValueInfos instead of GUIDs.
    This means that a ValueInfo will take a client directly to the summary list
    for a given GUID.

    Differential Revision: https://reviews.llvm.org/D32471 — pcc / ViewSVN

r302107 (#5696) (May 3, 2017 8:39:48 PM)

  1. Fix accounting of tbss.

    We were correctly computing the size contribution of a .tbss input
    section (it is none), but we were incorrectly considering the
    alignment of the output section: it was advancing Dot instead of

    As far as I can tell this was always wrong in our linkerscript
    implementation, but that became more visible now that the code is
    shared with the non linker script case. — rafael / ViewSVN
  2. llvm/IR/Function.h: Prune an obsolete @param in r302060. [-Wdocumentation] — chapuni / ViewSVN
  3. [libcxx] [test] Strip trailing whitespace. NFC. — stl_msft / ViewSVN
  4. [libcxx] [test] In msvc_stdlib_force_include.hpp, use _HAS_CXX17 to set TEST_STD_VER.

    _HAS_CXX17 indicates whether MSVC's STL is in C++17 mode.

    In MSVC there's a distinction between CRT headers like stdlib.h and STL headers
    like cstdlib. Only the STL headers drag in yvals.h, our internal STL-wide header
    that defines internal macros like _HAS_CXX17.

    _HAS_CXX17 is an MSVC STL library macro, unconditionally defined. We centralize
    everything on this, because we have to ask different questions to determine
    whether C1XX, EDG, or Clang is in 14 or 17 mode, and we additionally permit
    users to override the detection in one way (it's okay to ask for 17 from the
    compiler, but only 14 from the libs, at least for the moment; only noexcept
    in the type system will give us a headache).

    As this header is for testing MSVC's STL, we can assume _HAS_CXX17 is defined.

    Fixes D32726. — stl_msft / ViewSVN
  5. [XRay] Detect loops in functions being lowered

    This is an implementation of the loop detection logic that XRay needs to
    determine whether a function might take time at runtime. Without this
    heuristic, XRay will tend to not instrument short functions that have
    loops that might have runtime dependent on inputs or external values.

    While this implementation doesn't do any further analysis than just
    figuring out whether there is a loop in the MachineFunction being
    code-gen'ed, we're paving the way for being able to perform more
    sophisticated analysis of the function in the future (for example to
    determine whether the trip count for the loop might be constant, and
    make a decision on that instead). This enables us to cover more
    functions with the default heuristics, and potentially identify ones
    that have variable runtime latency just by looking for the presence of

    Reviewers: chandlerc, rnk, pelikan

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D32274 — dberris / ViewSVN
  6. Attempt to escape paths correctly — ericwf / ViewSVN
  7. Attempt to setup MSVC 2017 — ericwf / ViewSVN

r302100 (#5695) (May 3, 2017 6:56:56 PM)

  1. Use nullptr instead of the literal 0 — ericwf / ViewSVN
  2. Fix macro redefinition warnings for _LIBCPP_NO_RTTI — ericwf / ViewSVN
  3. Add #pragma clang module begin/end pragmas and generate them when preprocessing a module.

    These pragmas are intended to simulate the effect of entering or leaving a file
    with an associated module. This is not completely implemented yet: declarations
    between the pragmas will not be attributed to the correct module, but macro
    visibility is already functional.

    Modules named by #pragma clang module begin must already be known to clang (in
    some module map that's either loaded or on the search path). — rsmith / ViewSVN
  4. Test commit for Appveyor - Remove incorrect caching logic — ericwf / ViewSVN
  5. [SCEV] createAddRecFromPHI: Optimize for the most common case.

    The existing implementation creates a symbolic SCEV expression every
    time we analyze a phi node and then has to remove it, when the analysis
    is finished. This is very expensive, and in most of the cases it's also
    unnecessary. According to the data I collected, ~60-70% of analyzed phi
    nodes (measured on SPEC) have the following form:
      PN = phi(Start, OP(Self, Constant))
    Handling such cases separately significantly speeds this up.

    Reviewers: sanjoy, pete

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D32663 — Michael Zolotukhin / ViewSVN
  6. CMake: Only add test/ subdirectory when it exists

    r296685 started adding the test/ subdirectory even when
    LIBCXX_INCLUDE_TESTS=OFF.  This is great for testing libcxx standalone,
    but it also breaks the build when the test/ subdirectory is removed
    (and our submission system strips all test/ directories).

    This patch updates the logic to check for test/ before adding it.

    rdar://problem/31931366 — Duncan P. N. Exon Smith / ViewSVN
  7. strlen-1.ll: Fix test

    Change test for `strlen(x) == 0 --> *x == 0` to actually test the
    pattern. — matze / ViewSVN

r302093 (#5694) (May 3, 2017 5:26:29 PM)

  1. [InstCombine][KnownBits] Use KnownBits better to detect nsw adds

    Change checkRippleForAdd from a heuristic to a full check -
    if it is provable that the add does not overflow return true, otherwise false.

    Patch by Yoav Ben-Shalom

    Differential Revision: https://reviews.llvm.org/D32686 — ctopper / ViewSVN
  2. Mark functions as not having CFI once we finalize an x86 stack frame

    We'll set it back to true in emitPrologue if it gets called. It doesn't
    get called for naked functions.

    Fixes PR32912 — rnk / ViewSVN
  3. [KnownBits] Add methods for determining if KnownBits is a constant value

    This patch adds isConstant and getConstant for determining if KnownBits represents a constant value and to retrieve the value. Use them to simplify code.

    Differential Revision: https://reviews.llvm.org/D32785 — ctopper / ViewSVN
  4. Remove a comment that is no longer true. — ruiu / ViewSVN
  5. [ValueTracking] Remove handling for BitWidth being 0 in ComputeSignBit and isKnownNonZero.

    I don't believe its possible to have non-zero values here since DataLayout became required. The APInt constructor inside of the KnownBits object will assert if this ever happens. — ctopper / ViewSVN
  6. [KnownBits] Add zext, sext, and trunc methods to KnownBits

    This patch adds zext, sext, and trunc methods to KnownBits and uses them where possible.

    Differential Revision: https://reviews.llvm.org/D32784 — ctopper / ViewSVN
  7. [TargetLowering] use isSubsetOf in SimplifyDemandedBits; NFCI

    This is the DAG equivalent of https://reviews.llvm.org/D32255 ,
    which will hopefully be committed again. The functionality
    (preferring a 'not' op) is already here in the DAG, so this is
    just intended to be a clean-up and performance improvement. — spatel / ViewSVN
  8. clang-format and restyle DWARFFormValue before working on it. NFC — probinson / ViewSVN
  9. DebugInfo: elide type index entries for synthetic types

    Compiler emitted synthetic types may not have an associated DIFile
    (translation unit).  In such a case, when generating CodeView debug type
    information, we would attempt to compute an absolute filepath which
    would result in a segfault due to a NULL DIFile*.  If there is no source
    file associated with the type, elide the type index entry for the type
    and record the type information.  This actually results in higher
    fidelity debug information than clang/C2 as of this writing.

    Resolves PR32668! — Saleem Abdulrasool / ViewSVN

r302084 (#5693) (May 3, 2017 3:56:45 PM)

  1. Attempt to fix appveyor build — ericwf / ViewSVN
  2. Accept archive files with no symbol table instad of warning on them.

    It seems virtually everyone who tries to do LTO build with Clang and
    LLD was hit by a mistake to forget using llvm-ar command to create
    archive files. I wasn't an exception. Since this is an annoying common
    issue, it is probably better to handle that gracefully rather than
    reporting an error and tell the user to redo build with different

    Differential Revision: https://reviews.llvm.org/D32721 — ruiu / ViewSVN
  3. Qualify calls to __invoke, __apply_fuctor, and __mu — ericwf / ViewSVN
  4. [AArch64] Fix variable name ambiguity in r302078.

    ArchKind is passed to the function, but it's also a type. — Ahmed Bougacha / ViewSVN
  5. [TailCallElim] Remove an unused argument. NFCI — trentxintong / ViewSVN
  6. [Driver] Update AArch64 testcase to match llvm r302078. — Ahmed Bougacha / ViewSVN
  7. [AArch64] Make the TargetParser add CPU exts provided by the arch.

    Otherwise, each CPU has to manually specify the extensions it supports,
    even though they have to be a superset of the base arch extensions.
    And when there's redundant data there's stale data, so most of the CPUs
    lie about the features they support (almost none lists AEK_FP).

    Instead, do the saner thing: add the optional extensions on top of the
    base extensions provided by the architecture.

    The ARM TargetParser has the same behavior.

    Differential Revision: https://reviews.llvm.org/D32780 — Ahmed Bougacha / ViewSVN
  8. [AArch64] armv8-A doesn't have CRC.

    That's only a required extension as of v8.1a.

    Remove it from the "generic" CPU as well: it should only support the
    base ISA (and binutils agrees).

    Also unify the MC tests into crc.s and arm64-crc32.s — Ahmed Bougacha / ViewSVN
  9. [libFuzzer] exit without running atexit handlers in libfuzzer's crash handler

    It's not safe to assume that atexit handlers can be run once the app crashed.

    Patch by Jochen Eisinger.

    Reviewers: kcc, vitalybuka

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D32640 — Vitaly Buka / ViewSVN
  10. Refactored ABITestsuitBuilder to use UnifiedTreeBuilder, so it could track the changes in all dependent projects. — gkistanova / ViewSVN
  11. Remove source code only if clean build has been requested by a property. — gkistanova / ViewSVN
  12. [Hexagon] Use automatically-generated scheduling information for HVX

    Patch by Jyotsna Verma. — kparzysz / ViewSVN
  13. [ScopInfo] Do not use LLVM names to identify statements, arrays, and parameters

    LLVM-IR names are commonly available in debug builds, but often not in release
    builds. Hence, using LLVM-IR names to identify statements or memory reference
    results makes the behavior of Polly depend on the compile mode. This is
    undesirable. Hence, we now just number the statements instead of using LLVM-IR
    names to identify them (this issue has previously been brought up by Zino

    However, as LLVM-IR names help in making test cases more readable, we add an
    option '-polly-use-llvm-names' to still use LLVM-IR names. This flag is by
    default set in the polly tests to make test cases more readable.

    This change reduces the time in ScopInfo from 32 seconds to 2 seconds for the
    following test case provided by Eli Friedman <efriedma@codeaurora.org> (already
    used in one of the previous commits):

      struct X { int x; };
      void a();
      #define SIG (int x, X **y, X **z)
      typedef void (*fn)SIG;
      #define FN { for (int i = 0; i < x; ++i) { (*y)[i].x += (*z)[i].x; } a(); }
      #define FN5 FN FN FN FN FN
      #define FN25 FN5 FN5 FN5 FN5
      #define FN125 FN25 FN25 FN25 FN25 FN25
      #define FN250 FN125 FN125
      #define FN1250 FN250 FN250 FN250 FN250 FN250
      void x SIG { FN1250 }

    For a larger benchmark I have on-hand (10000 loops), this reduces the time for
    running -polly-scops from 5 minutes to 4 minutes, a reduction by 20%.

    The reason for this large speedup is that our previous use of printAsOperand
    had a quadratic cost, as for each printed and unnamed operand the full function
    was scanned to find the instruction number that identifies the operand.

    We do not need to adjust the way memory reference ids are constructured, as
    they do not use LLVM values.

    Reviewed by: efriedma

    Tags: #polly

    Differential Revision: https://reviews.llvm.org/D32789 — grosser / ViewSVN
  14. Merge r296561 - Fix PR32097 - is_abstract doesn't work on class templates. — ericwf / ViewSVN
  15. Merge r300397 - Fix PR32642 - string::insert and string::append don't work with move_iterator. — ericwf / ViewSVN
  16. Remove unused private field. — zturner / ViewSVN

r302068 (#5692) (May 3, 2017 2:13:00 PM)

  1. Avoid warning of unused variable in release builds. NFC — annat / ViewSVN
  2. Revert r301897, "ELF: Set symbol binding to STB_GLOBAL when undefining symbols during LTO."

    It doesn't matter what binding we store in a non-UsedInRegularObj undefined
    symbol because we should reset it when we see a real undefined symbol in
    a combined LTO object. The fact that we weren't doing so before is a bug
    (PR32899) which is now fixed. — pcc / ViewSVN
  3. Tests: strengthen CHECK line to avoid picking up stray path.

    A bot had "-LTO" in its working directory, which matched the regex used in this
    test. Since the arg is quoted, we can exploit that instead. Still broken if
    there's a path with a quote in, but I think that's pretty niche. — Tim Northover / ViewSVN

r302065 (#5691) (May 3, 2017 12:53:56 PM)

  1. Handle mixed strong and weak undefined symbols.

    We were ignoring strong undefined symbols if they followed weak ones.

    Fixes pr32899. — rafael / ViewSVN
  2. [asan] print the 'unexpected format specifier in printf interceptor' warning just once (came up in https://github.com/google/oss-fuzz/pull/562). Not touching a similar scanf warning -- for some reason it does not fire for me. — kcc / ViewSVN
  3. Fix typos in comment — sanjoy / ViewSVN
  4. Break verification down into smaller functions to keep code clean.

    Adrian requested that we break things down to make things clean in the DWARFVerifier. This patch breaks everything down into nice individual functions and cleans up the code quite a bit and prepares us for the next round of verifiers.

    Differential Revision: https://reviews.llvm.org/D32812 — gclayton / ViewSVN
  5. Fix PPC64 warning for missing parantheses. NFC. — annat / ViewSVN

r302060 (#5690) (May 3, 2017 12:03:21 PM)

  1. [IR] Abstract away ArgNo+1 attribute indexing as much as possible

    Do three things to help with that:
    - Add AttributeList::FirstArgIndex, which is an enumerator currently set
      to 1. It allows us to change the indexing scheme with fewer changes.
    - Add addParamAttr/removeParamAttr. This just shortens addAttribute call
      sites that would otherwise need to spell out FirstArgIndex.
    - Remove some attribute-specific getters and setters from Function that
      take attribute list indices.  Most of these were only used from
      BuildLibCalls, and doesNotAlias was only used to test or set if the
      return value is malloc-like.

    I'm happy to split the patch, but I think they are probably easier to
    review when taken together.

    This patch should be NFC, but it sets the stage to change the indexing
    scheme to this, which is more convenient when indexing into an array:
      0: func attrs
      1: retattrs
      2...: arg attrs

    Reviewers: chandlerc, pete, javed.absar

    Subscribers: david2050, llvm-commits

    Differential Revision: https://reviews.llvm.org/D32811 — rnk / ViewSVN
  2. [CodeView] Remove constructor initialization of a removed field.

    I should've staged this with my last commit. — davide / ViewSVN
  3. [RuntimeLoopUnroller] Add assert that we dont unroll non-rotated loops

    Cloning basic blocks in the loop for runtime loop unroller depends on loop being
    in rotated form (i.e. loop latch target is the exit block).
    Assert that this is true, so that callers of runtime loop unroller pass in
    canonical loops.
    The single caller of this function has that check recently added:

    Reviewers: davide

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D32801 — annat / ViewSVN
  4. Delete dead function causing compilation failure. — zturner / ViewSVN
  5. [CodeView] Remove unused private field. NFCI. — davide / ViewSVN
  6. [bpf] add relocation support

      . there should be no runtime relocation inside the bpf function.
      . relocation supported here mostly for debugging.
      . a test case is added.

    Signed-off-by: Yonghong Song <yhs@fb.com>
    Signed-off-by: Alexei Starovoitov <ast@kernel.org> — ast / ViewSVN
  7. Revert "CMake: Move sphinx detection into AddSphinxTarget.cmake"

    This reverts commit r302025.

    clang and lld need to be updated too so they don't break with this patch. — tstellar / ViewSVN

r302053 (#5689) (May 3, 2017 11:15:53 AM)

  1. [CodeView] Use actual strings for dealing with checksums and lines.

    The raw CodeView format references strings by "offsets", but it's
    confusing what table the offset refers to.  In the case of line
    number information, it's an offset into a buffer of records,
    and an indirection is required to get another offset into a
    different table to find the final string.  And in the case of
    checksum information, there is no indirection, and the offset
    refers directly to the location of the string in another buffer.

    This would be less confusing if we always just referred to the
    strings by their value, and have the library be smart enough
    to correctly resolve the offsets on its own from the right

    This patch makes that possible.  When either reading or writing,
    all the user deals with are strings, and the library does the
    appropriate translations behind the scenes. — zturner / ViewSVN
  2. [llvm-readobj] Update readobj to re-use parsing code.

    llvm-readobj hand rolls some CodeView parsing code for string
    tables, so this patch updates it to re-use some of the newly
    introduced parsing code in LLVMDebugInfoCodeView.

    Differential Revision: https://reviews.llvm.org/D32772 — zturner / ViewSVN
  3. ARM: add extra test for addrmode folding.

    I was worried we might replace a mul with a mul+shift even if there were later
    uses. Turns out to be unfounded but I'd just as well add an actual test for it. — Tim Northover / ViewSVN
  4. [tsan] Detect races on modifying accesses in Swift code

    This patch allows the Swift compiler to emit calls to `__tsan_external_write` before starting any modifying access, which will cause TSan to detect races on arrays, dictionaries and other classes defined in non-instrumented modules. Races on collections from the Swift standard library and user-defined structs and a frequent cause of subtle bugs and it's important that TSan detects those on top of existing LLVM IR instrumentation, which already detects races in direct memory accesses.

    Differential Revision: https://reviews.llvm.org/D31630 — kuba.brecka / ViewSVN
  5. [X86][LWP] Add stack folding mappings and tests for LWPINS/LWPVAL instructions — rksimon / ViewSVN
  6. Silence a 'enum and non-enum used in conditional' warning. — rksimon / ViewSVN
  7. [DAGCombine] (addcarry (add|uaddo X, Y), 0, Carry) -> (addcarry X, Y, Carry)

    Summary: Do the transform when the carry isn't used. It's a pattern exposed when legalizing large integers.

    Reviewers: jyknight, nemanjai, mkuper, spatel, RKSimon, zvi, bkramer

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D32755 — deadalnix / ViewSVN

r302046 (#5688) (May 3, 2017 10:25:58 AM)

  1. Revert r302037

    The commit caused the following two buildbot failures:

        Clang :: Misc/error-limit-multiple-notes.cpp
        Clang :: Misc/error-limit.c — arphaman / ViewSVN
  2. Revert my bad winasan coverage test fix and apply one that actually works

    trace-pc doesn't work, but trace-pc-guard does. *shrug* — rnk / ViewSVN
  3. Create DWARFVerifier.cpp and .h and move all DWARF verification code over into it.

    Adrian requested we create a DWARFVerifier.cpp file to contain all of the DWARF verification stuff. This change simply moves the functionality over into DWARFVerifier.h and DWARFVerifier.cpp, renames the DWARFVerifier methods to start with lower case, and switches DWARFContext.cpp over to using the new functionality.

    Differential Revision: https://reviews.llvm.org/D32809 — gclayton / ViewSVN
  4. Speculative fix for WinASan after r301994 — rnk / ViewSVN
  5. Resubmit r301986 and r301987 "Add codeview::StringTable"

    This was reverted due to a "missing" file, but in reality
    what happened was that I renamed a file, and then due to
    a merge conflict both the old file and the new file got
    added to the repository.  This led to an unused cpp file
    being in the repo and not referenced by any CMakeLists.txt
    but #including a .h file that wasn't in the repo.  In an
    even more unfortunate coincidence, CMake didn't report the
    unused cpp file because it was in a subdirectory of the
    folder with the CMakeLists.txt, and not in the same directory
    as any CMakeLists.txt.

    The presence of the unused file was then breaking certain
    tools that determine file lists by globbing rather than
    by what's specified in CMakeLists.txt

    In any case, the fix is to just remove the unused file from
    the patch set. — zturner / ViewSVN
  6. [X86][LWP] Add llvm support for LWP instructions (reapplied).

    This patch adds support for the the LightWeight Profiling (LWP) instructions which are available on all AMD Bulldozer class CPUs (bdver1 to bdver4).

    Reapplied - this time without changing line endings of existing files.

    Differential Revision: https://reviews.llvm.org/D32769 — rksimon / ViewSVN
  7. [APInt] Give the value union a name so we can remove assumptions on VAL being the larger member

    Currently several places assume the VAL member is always at least the same size as pVal. In particular for a memcpy in the move assignment operator. While this is a true assumption, it isn't good practice to assume this.

    This patch gives the union a name so we can write the memcpy in terms of the union itself. This also adds a similar memcpy to the move constructor where we previously just copied using VAL directly.

    This patch is mostly just a mechanical addition of the U in front of VAL and pVAL everywhere. But several constructors had to be modified since we can't directly initializer a field of named union from the initializer list.

    Differential Revision: https://reviews.llvm.org/D30629 — ctopper / ViewSVN
  8. Verify that no compile units share the same line table in "llvm-dwarfdump --verify"

    Check to make sure no compile units have the same DW_AT_stmt_list values. Report a verification error if they do.

    Differential Revision: https://reviews.llvm.org/D32771 — gclayton / ViewSVN
  9. Revert rL302028 due to accidental line ending changes. — rksimon / ViewSVN
  10. DiagnosticsEngine should clear DelayedDiagID before reporting the
    delayed diagnostic

    This avoids an infinite loop that was uncovered in one of our internal tests
    by r301992. The testcase is the most reduced version of that auto-generated

    rdar://31962618 — arphaman / ViewSVN

r302036 (#5687) (May 3, 2017 9:35:48 AM)

  1. [Hexagon] Handle S2_storerf_io in HexagonInstrInfo — kparzysz / ViewSVN
  2. [Hexagon] Misc fixes in HexagonInstrInfo, NFC

    Formatting changes + remove unused function. — kparzysz / ViewSVN
  3. [Hexagon] Adjust latency between allocframe and the first store on stack

    Allocframe and the following stores on the stack have a latency of 2 cycles
    when not in the same packet. This happens because R29 is needed early by the
    store instruction. Since one of such stores can be packetized along with
    allocframe and use old value of R29, we can assign it 0 cycle latency
    while leaving latency of other stores to the default value of 2 cycles.

    Patch by Jyotsna Verma. — kparzysz / ViewSVN
  4. [Hexagon] Handle J2_jumptpt and J2_jumpfpt in HexagonInstrInfo — kparzysz / ViewSVN
  5. [Hexagon] Implement undoing .cur instructions in packetizer

    The packetizer needs to convert .cur instruction to its regular form if
    the use is not in the same packet as the .cur. The code in the packetizer
    handles one type of .cur, which is the vector load case. This patch
    updates the packetizer so that it can undo all the .cur instructions.
    In the test case, the .cur is the 128B version, but there are also the
    post-increment versions.

    Patch by Brendon Cahoon. — kparzysz / ViewSVN
  6. [OpenMP] Extended parse for 'always' map modifier


    This patch allows the map modifier 'always' to be separated by the map type (to, from, tofrom) only by a whitespace, rather than strictly by a comma as in current trunk. — cbertol / ViewSVN
  7. [Hexagon] Add memory operands to a rewritten load — kparzysz / ViewSVN
  8. [Hexagon] Reset spill alignment when variable-sized objects are present — kparzysz / ViewSVN
  9. [X86][LWP] Add llvm support for LWP instructions.

    This patch adds support for the the LightWeight Profiling (LWP) instructions which are available on all AMD Bulldozer class CPUs (bdver1 to bdver4).

    Differential Revision: https://reviews.llvm.org/D32769 — rksimon / ViewSVN
  10. Don't attempt to use mpx registers on unsupported platforms

    The existing cpp-level checks using PR_MPX_ENABLE_MANAGEMENT aren't sufficient,
    as this isn't defined for linux kernel versions below 3.19.

    Reviewers: valentinagiusti, zturner, labath

    Subscribers: lldb-commits

    Differential Revision: https://reviews.llvm.org/D32719 — fjricci / ViewSVN

    When apps or other libraries link against a library with symbol
    versions, the version string is recorded in the import table, and used
    at runtime to resolve the symbol back to a library that provides that
    version (vaguely like how two-level namespaces work in Mach-O).  ld's
    --default-symver flag tags every exported symbol with a symbol version
    string equal to the library's soname.  Using --default-symver means
    multiple versions of libLLVM can coexist within the same process, at
    least to the extent that they don't try to pass data between each
    other's llvms.

    As an example, imagine a language like Rust using llvm for CPU codegen,
    binding to OpenGL, with Mesa as the OpenGL implementation using llvm for
    R600 codegen.  With --default-symver Rust and Mesa will resolve their
    llvm usage to the version each was linked against, which need not match.

    (Other ELF platforms like BSD and Solaris might have similar semantics,
    I've not checked.)

    This is based on an autoconf version of this patch by Adam Jackson.

    This new option can be used to add --default-symver to the linker flags
    for libLLVM.so.

    Reviewers: beanz

    Reviewed By: beanz

    Subscribers: mgorny, llvm-commits

    Differential Revision: https://reviews.llvm.org/D30997 — tstellar / ViewSVN

r302025 (#5686) (May 3, 2017 8:45:31 AM)

  1. CMake: Move sphinx detection into AddSphinxTarget.cmake

    Reviewers: chandlerc, beanz, mgorny

    Reviewed By: beanz

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D31773 — tstellar / ViewSVN
  2. Reusing an existing attribute diagnostic

    In a previous patch, a new generic error diagnostic for inconsistent attributes was added.
    In this commit I reuse this diagnostic for ns_returns_retained attribute check.

    Differential Revision: https://reviews.llvm.org/D32697 — orenb / ViewSVN

r302023 (#5685) (May 3, 2017 7:55:31 AM)

  1. [X86][AVX512] remove unnecessary case. NFC

    VFPCLASS is for vector types and not scalar, so it cannot get here.

    Differential Revision: https://reviews.llvm.org/D32694 — guyblank / ViewSVN
  2. [SystemZ]  Properly check number of operands in getCmpOpsType()

    It is needed to check that the number of operands are 2 when
    finding the case of a logic combination, e.g. 'and' of two compares.

    Review: Ulrich Weigand — jonpa / ViewSVN
  3. [CUDA Managed Memory] Fix regression introduced by Managed Memory

    - Fixes breakage from commit 5536f.
    - Interference with commit 764f3 caused testcase to fail. Reverting
      764f3 allows commit 5536f to succeed.
    - Generated kernel code was slightly different due to 764f3, which
      caused testcase to fail. — bollu / ViewSVN
  4. [X86] Support of no_caller_saved_registers attribute

    This patch implements the LLVM part for no_caller_saved_registers attribute as appears here: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=5ed3cc7b66af4758f7849ed6f65f4365be8223be.
    In order to implement the attribute, we use the dynamic CSR mechanism to remove returned/passed arguments from the function regmask/CSR list.

    Differential Revision: https://reviews.llvm.org/D31876 — orenb / ViewSVN

r302019 (#5684) (May 3, 2017 7:05:30 AM)

  1. Don't crash on the profile/admin page

    ... when there are no profiles on the server.
    Fixes PR32724. — kbeyls / ViewSVN

r302018 (#5683) (May 3, 2017 6:15:27 AM)

  1. Support arbitrary address space pointers in masked gather/scatter intrinsics.

    Fixes PR31789 - When loop-vectorize tries to use these intrinsics for a
    non-default address space pointer we fail with a "Calling a function with a
    bad singature!" assertion. This patch solves this by adding the 'vector of
    pointers' argument as an overloaded type which will determine the address

    Differential revision: https://reviews.llvm.org/D31490 — eladcohen / ViewSVN
  2. [AVR] Reserve the Y register in all functions — dylanmckay / ViewSVN
  3. [analyzer] Fix memory error bug category capitalization.

    It was written as "Memory Error" in most places and as "Memory error" in a few
    other places, however it is the latter that is more consistent with
    other categories (such as "Logic error").


    Differential Revision: https://reviews.llvm.org/D32702 — dergachev / ViewSVN
  4. [Loop Deletion] Delete loops that are never executed

    Currently, loop deletion deletes loop where the only values
    that are used outside the loop are loop-invariant.
    This patch adds logic to delete loops where the loop is proven to be
    never executed (i.e. the only predecessor of the loop preheader has a
    constant conditional branch as terminator, and the preheader is not the
    taken target). This will remove loops that become dead after
    loop-unswitching generates constant conditional branches.

    The next steps are:
    1. moving the loop deletion implementation to LoopUtils.
    2. Add logic in loop-simplifyCFG which will support changing conditional
    constant branches to unconditional branches. If loops become unreachable in this
    process, they can be removed using `deleteDeadLoop` function.

    Reviewers: chandlerc, efriedma, sanjoy, reames

    Reviewed by: sanjoy

    Subscribers: mzolotukhin, llvm-commits

    Differential Revision: https://reviews.llvm.org/D32494 — annat / ViewSVN

r302014 (#5682) (May 3, 2017 5:25:40 AM)

  1. Revert "[AVR] Enable the frame pointer for all functions"

    This reverts commit 358ad02d999e88853d2cfc954bd2f668308a51f7. — dylanmckay / ViewSVN
  2. Windows fix for TestConflictingDefinition makefile

    gnuwin32 rm does not like wildcards that match nothing even if we
    specify -f (probably because the wildcard expansion happens in-process
    there). We could use make $(wildcard) here, but it seems safer to
    explicitly list the files here, just like the normal Makefile.rules
    does. — labath / ViewSVN
  3. Undo turning ExtBehavior into a bitfield.

    This produces warnings that I can't explain in a GCC build:

    In file included from ../tools/clang/include/clang/Lex/LexDiagnostic.h:13:0,
                     from /usr/local/google/home/djasper/llvm/tools/clang/lib/Lex/PTHLexer.cpp:19:
    ../tools/clang/include/clang/Basic/Diagnostic.h:219:34: warning: ‘clang::DiagnosticsEngine::DiagState::ExtBehavior’ is too small to hold all values of ‘enum class clang::diag::Severity’ [enabled by default]
         diag::Severity ExtBehavior : 4;     // Map extensions to warnings or errors?

    While I don't think this warning makes sense, I'd like to get this back to being
    warning-free. This only seems to trigger for "enum class".

    https://godbolt.org/g/P2ekVd — djasper / ViewSVN

r302011 (#5681) (May 3, 2017 4:35:22 AM)

  1. [Triple] Add a "macos" OS type that acts as a synonym for "macosx"

    The "macosx" OS type is still the canonical type. In the future "macos" will
    become the canonical OS type (but we will still support "macosx").


    Differential Revision: https://reviews.llvm.org/D32748 — arphaman / ViewSVN
  2. [X86] Refactored LowerINTRINSIC_W_CHAIN to use a switch statament. NFCI.

    Pre-commit as requested in D32769. — rksimon / ViewSVN
  3. Fix tests after speculatable intrinsics patch

    These were relying on the attribute group numbering — djasper / ViewSVN

r302008 (#5680) (May 3, 2017 3:45:05 AM)

  1. Check for lack of C++ context first when demangling

    Summary: It seems that if we have no context, then it can't possibly be a method.  Check that first.

    Reviewers: clayborg

    Reviewed By: clayborg

    Subscribers: labath, lldb-commits

    Differential Revision: https://reviews.llvm.org/D32708
    Patch by Scott Smith <scott.smith@purestorage.com>. — labath / ViewSVN
  2. [ELF] Fix problems with fabricateDefaultCommands() and --section-start

    The --section-start <name>=<address> needs to be translated into equivalent
    linker script commands. There are a couple of problems with the existing
    - The --section-start with the lowest address is assumed to be at the start
    of the map. This assumption is incorrect, we have to iterate through the
    SectionStartMap to find the lowest address.
    - The addresses in --section-start were being over-aligned when the
    sections were marked as PageAlign. This is inconsistent with the use of
    SectionStartMap in fixHeaders(), and can cause problems when the PageAlign
    causes an "unable to move location counter backward" error when the
    --section-start with PageAlign is aligned to an address higher than the next
    --section-start. The ld.bfd and ld.gold seem to be more consistent with this
    approach but this is not a well specified area.
    This change fixes the problems above and also corrects a typo in which
    fabricateDefaultCommands() is called with the wrong parameter, it should be
    called with AllocateHeader not Config->MaxPageSize.

    Differential Revision: https://reviews.llvm.org/D32749 — psmith / ViewSVN

r302006 (#5679) (May 3, 2017 2:25:12 AM)

  1. [ELF] - Added testcase gdb-index-ranges.s (https://reviews.llvm.org/D32750)

    Before rL301170 was landed, LLD did not produce correct entries in .gdb_index address area.
    Issue was fixed on LLVM DWARF parsers side and was relative to how .debug_ranges
    section was scanned. It was main problem of PR32319.

    It makes sense to have testcase on LLD size too. This checks that we generate proper values
    now, because we do not have any tests for .gdb_index which works with .debug_ranges atm.

    Differential revision: https://reviews.llvm.org/D32750 — grimar / ViewSVN
  2. [ScopInfo] Remove code not needed anymore after r302004 — grosser / ViewSVN
  3. [ScopInfo] Do not add array name into memory reference ids

    Before this change a memory reference identifier had the form:

      <STMT>_<ACCESSTYPE><ID>_<MEMREF>, e.g., Stmt_bb9_Write0_MemRef_tmp11

    After this change, we use the format:

      <STMT>_<ACCESSTYPE><ID>, e.g., Stmt_bb9_Write0

    The name of the array that is accessed through a memory reference is not
    necessary to uniquely identify a memory reference, but was only added to
    provide additional information for debugging. We drop this information now
    for the following two reasons:

      1) This shortens the names and consequently improves readability
      2) This removes a second location where we decide on the name of a scop array,
         leaving us only with the location where the actual scop array is created.

    Having after 2) only a single location to name scop arrays will allow us to
    change the naming convention of scop arrays more easily, which we will do
    in a future commit to reduce compilation time. — grosser / ViewSVN
  4. Silences gcc's -Wnarrowing.

    I think this is a false positive in GCC's warning, but nonetheless, we
    should try to be warning-free. Smaller reproducer (reproduces with GCC
    https://godbolt.org/g/cJuO2z — djasper / ViewSVN
  5. Revert r301986 (and subsequent r301987).

    The patch is failing to add StringTableStreamBuilder.h, but that isn't
    even discovered because the corresponding StringTableStreamBuilder.cpp
    isn't added to any CMakeLists.txt file and thus never built. I think
    this patch is just incomplete. — djasper / ViewSVN

r302001 (#5678) (May 3, 2017 1:04:49 AM)

  1. [sanitizer] Intercept mcheck and mprobe on Linux

    This patch addresses https://github.com/google/sanitizers/issues/804.
    Users can use mcheck and mprobe functions to verify heap state so we should intercept them to avoid breakage of valid code.

    Differential Revision: https://reviews.llvm.org/D32589 — chefmax / ViewSVN

r302000 (#5677) (May 3, 2017 12:13:03 AM)

  1. Revert rL301998: "Fix a bug that -isysroot is completely ignored on Unix"

    This reverts commit because it broke
    sanitizer-x86_64-linux-autoconf bot and
    clang-ppc64be-linux-multistage  bot. — yamaguchi / ViewSVN
  2. Fix use after free in BinaryStream library.

    This was reported by the ASAN bot, and it turned out to be
    a fairly fundamental problem with the design of VarStreamArray
    and the way it passes context information to the extractor.

    The fix was cumbersome, and I'm not entirely pleased with it,
    so I plan to revisit this design in the future when I'm not
    pressed to get the bots green again.  For now, this fixes
    the issue by storing the context information by value instead
    of by reference, and introduces some impossibly-confusing
    template magic to make things "work". — zturner / ViewSVN

r301998 (#5676) (May 2, 2017 11:20:07 PM)

  1. Fix a bug that -isysroot is completely ignored on Unix

    -isysroot is the flag which set the system root directory.
    This bug report https://bugs.llvm.org//show_bug.cgi?id=11503
    shows that -isysroot is not handled at all on Unix, so fixed this bug.

    After this diff, I could get this result https://pastebin.com/TeCmn9mj .

    Differential Revision: https://reviews.llvm.org/D31495 — yamaguchi / ViewSVN

r301997 (#5675) (May 2, 2017 10:29:52 PM)

  1. Add Falcon to Users.html — sanjoy / ViewSVN

r301996 (#5674) (May 2, 2017 8:55:29 PM)

  1. Fix tests after speculatable intrinsics patch

    These were relying on the attribute group numbering — arsenm / ViewSVN

r301995 (#5673) (May 2, 2017 8:05:33 PM)

  1. Replace hardcoded intrinsic list with speculatable attribute.

    No change in which intrinsics should be speculated. — arsenm / ViewSVN
  2. [sanitizer-coverage] add a deprecation warning to the old sanitizer-coverage flag combinations — kcc / ViewSVN

r301993 (#5672) (May 2, 2017 7:15:45 PM)

  1. Fixed a bug where we did not properly use the complete versions of Objective-C classes.
    Also added a test case, thanks to Greg Clayton.

    <rdar://problem/18913551> — Sean Callanan / ViewSVN
  2. [modules] Round-trip -Werror flag through explicit module build.

    The intent for an explicit module build is that the diagnostics produced within
    the module are those that were configured when the module was built, not those
    that are enabled within a user of the module. This includes diagnostics that
    don't actually show up until the module is used (for instance, diagnostics
    produced during template instantiation and weird cases like -Wpadded).

    We serialized and restored the diagnostic state for individual warning groups,
    but previously did not track the state for flags like -Werror and -Weverything,
    which are implemented as separate bits rather than as part of the diagnostics
    mapping information. — rsmith / ViewSVN
  3. Revert r295861, "[ModuleSummaryAnalysis] Don't crash when referencing unnamed globals."

    We should always expect values to be named before running the module summary
    analysis (see NameAnonGlobals pass), so it's fine if we crash in that case. — pcc / ViewSVN

r301990 (#5671) (May 2, 2017 6:25:54 PM)

  1. [PowerPC, DAGCombiner] Fold a << (b % (sizeof(a) * 8)) back to a single instruction

    This is the corresponding llvm change to D28037 to ensure no performance

    Reviewers: bogner, kbarton, hfinkel, iteratee, echristo

    Subscribers: nemanjai, llvm-commits

    Differential Revision: https://reviews.llvm.org/D28329 — timshen / ViewSVN
  2. [ODRHash] Add support for array and decayed types, and parameter names and types. — rtrieu / ViewSVN

r301988 (#5670) (May 2, 2017 5:35:40 PM)

  1. [ubsan] Skip overflow checks on safe arithmetic (fixes PR32874)

    Currently, ubsan emits overflow checks for arithmetic that is known to
    be safe at compile-time, e.g:

      1 + 1 => CheckedAdd(1, 1)

    This leads to breakage when using the __builtin_prefetch intrinsic. LLVM
    expects the arguments to @llvm.prefetch to be constant integers, and
    when ubsan inserts unnecessary checks on the operands to the intrinsic,
    this contract is broken, leading to verifier failures (see PR32874).

    Instead of special-casing __builtin_prefetch for ubsan, this patch fixes
    the underlying problem, i.e that clang currently emits unnecessary
    overflow checks.

    Testing: I ran the check-clang and check-ubsan targets with a stage2,
    ubsan-enabled build of clang. I added a regression test for PR32874, and
    some extra checking to make sure we don't regress runtime checking for
    unsafe arithmetic. The existing ubsan-promoted-arithmetic.cpp test also
    provides coverage for this change. — Vedant Kumar / ViewSVN
  2. Fix type conversion error. — zturner / ViewSVN
  3. Make codeview::StringTable.

    Previously we had knowledge of how to serialize and deserialize
    a string table inside of DebugInfo/PDB, but the string table
    that it serializes contains a piece that is actually considered
    CodeView and can appear outside of a PDB.  We already have logic
    in llvm-readobj and MCCodeView to read and write this format,
    so it doesn't make sense to duplicate the logic in DebugInfoPDB
    as well.

    This patch makes codeview::StringTable (for writing) and
    codeview::StringTableRef (for reading), updates DebugInfoPDB
    to use these classes for its own writing, and updates llvm-readobj
    to additionally use StringTableRef for reading.

    It's a bit more difficult to get MCCodeView to use this for
    writing, but it's a logical next step. — zturner / ViewSVN
  4. Typo in LangRef.rst. NFC — trentxintong / ViewSVN

r301984 (#5669) (May 2, 2017 4:45:27 PM)

  1. Add line table verification to lldb-dwarfdump --verify

    This patch verifies the .debug_line:
    - verify all addresses in a line table sequence have ascending addresses
    - verify that all line table file indexes are valid

    Unit tests added for both cases.

    Differential Revision: https://reviews.llvm.org/D32765 — gclayton / ViewSVN
  2. ARM: avoid handing a deleted node back to TableGen during ISel.

    When we replaced the multiplicand the destination node might already exist.
    When that happens the original gets CSEd and deleted. However, it's actually
    used as the offset so nonsense is produced.

    Should fix PR32726. — Tim Northover / ViewSVN
  3. Remove a dead function declaration. — ruiu / ViewSVN
  4. Re-land r301697 "[IR] Make add/remove Attributes use AttrBuilder instead of AttributeList"

    This time, I fixed, built, and tested clang.

    This reverts r301712. — rnk / ViewSVN

r301980 (#5668) (May 2, 2017 3:55:10 PM)

  1. [AArch64] ILP32 Backend Relocation Support

    Remove "_NC" suffix and semantics from TLSDESC_LD{64,32}_LO12 and
      TLSDESC_ADD_LO12 relocations
    Rearrange ordering in AArch64.def to follow relocation encoding
    Fix name:
      R_AARCH64_P32_LD64_GOT_LO12_NC => R_AARCH64_P32_LD32_GOT_LO12_NC
    Add support for several "TLS", "TLSGD", and "TLSLD" relocations for
    Fix return values from isNonILP32reloc
    Add implementations for
      R_AARCH64_P32_TLSDESC_LD32_LO12, R_AARCH64_LD64_GOT_LO12_NC,
    Modify error messages to give name of equivalent relocation in the
      ABI not being used, along with better checking for non-existent
      requested relocations.
    Added assembler support for "pg_hi21_nc"
    Relocation definitions added without implementations:
    Fix encoding:

    Reviewers: Peter Smith

    Patch by: Joel Jones (jjones@cavium.com)

    Differential Revision: https://reviews.llvm.org/D32072 — joel_k_jones / ViewSVN
  2. Remove _NC suffix from ELF relocations TLSDESC_{LD64,ADD}_LO12 — joel_k_jones / ViewSVN
  3. [DWARFv5] Parse new line-table header format.

    The directory and file tables now have form-based content descriptors.
    Parse these and extract the per-directory/file records based on the
    descriptors.  For now we support only DW_FORM_string (inline) for the
    path names; follow-up work will add support for indirect forms (i.e.,
    DW_FORM_strp, strx<N>, and line_strp).

    Differential Revision: http://reviews.llvm.org/D32713 — probinson / ViewSVN
  4. revert r301766: InstructionSimplify: Canonicalize shuffle operands. NFC-ish

    Turns out this wasn't NFC-ish at all because there's a bug processing shuffles
    that change the size of their input vectors (that case always seems to trip us

    This should fix PR32872 while we investigate how it failed and reduce a testcase:
    https://bugs.llvm.org/show_bug.cgi?id=32872 — spatel / ViewSVN
  5. [asan] Mark some more testcases as unsupported on iOS. — kuba.brecka / ViewSVN
  6. Fix typo. — ruiu / ViewSVN

r301974 (#5667) (May 2, 2017 3:04:00 PM)

  1. [NewGVN] Fix typo and format comment. NFCI. — davide / ViewSVN
  2. [NFC] Add original test that triggered crash post r301735
    - this is added just for completeness sake (though the general case should be represented by the test added in the revision to that patch:  https://reviews.llvm.org/rL301972 ) — faisalv / ViewSVN
  3. Fix PR32831 (Try Again): 'this' capture while instantiating generic lambda call operator specialization

    When computing the appropriate cv-qualifiers for the 'this' capture, we have to examine each enclosing lambda - but when using the FunctionScopeInfo stack we have to ensure that the lambda below (outer) is the decl-context of the closure-class of the current lambda.


    This patch was initially committed here: https://reviews.llvm.org/rL301735
    Then reverted here: https://reviews.llvm.org/rL301916

    The issue with the original patch was a failure to check that the closure type has been created within the LambdaScopeInfo before querying its DeclContext - instead of just assuming it has (silly!).  A reduced example such as this highlights the problem:
      struct X {
         int data;
         auto foo() { return [] { return [] -> decltype(data) { return 0; }; }; }

    When 'data' within decltype(data) tries to determine the type of 'this', none of the LambdaScopeInfo's have their closure types created at that point. — faisalv / ViewSVN
  4. Verify that all references point to actual DIEs in "llvm-dwarfdump --verify"

    LTO and other fancy linking previously led to DWARF that contained invalid references. We already validate that CU relative references fall into the CU, and the DW_FORM_ref_addr references fall inside the .debug_info section, but we didn't validate that the references pointed to correct DIE offsets. This new verification will ensure that all references refer to actual DIEs and not an offset in between.

    This caught a bug in DWARFUnit::getDIEForOffset() where if you gave it any offset, it would match the DIE that mathes the offset _or_ the next DIE. This has been fixed.

    Differential Revision: https://reviews.llvm.org/D32722 — gclayton / ViewSVN
  5. [Sema] Update function doc; NFC — George Burgess IV / ViewSVN
  6. Revert "Fix misnamed #include. Remove _NC suffix from ELF relocations TLSDESC_{LD64,ADD}_LO12"

    This reverts commit r301964. It broke the build. — rafael / ViewSVN
  7. Simplify some va_start checking logic

    Combine the logic doing the ms_abi/sysv_abi checks into one function so
    that each check and its logical opposite are near each other. Now we
    don't need two Sema entry points for MS va_start and regular va_start.

    Refactor the code that checks if the va_start caller is a function,
    block, or obj-c method. We do this in three places, and they are all
    buggy for variadic lambdas (PR32737). After this change, I have one
    place to apply the functional fix.

    NFC — rnk / ViewSVN
  8. [asan] Mark atos-symbolizer-dyld-root-path.cc testcase as unsupported on iOS. — kuba.brecka / ViewSVN

r301966 (#5666) (May 2, 2017 2:12:18 PM)

  1. [asan] Mark a bunch of tests as unsupported on iOS

    This patch marks a few ASan tests as unsupported on iOS. These are mostly tests that use files or paths that are invalid/inaccessible on iOS or the simulator. We currently don't have a good way of propagating/copying secondary files that individual tests need. The same problem exists on Android, so I'm just marking the tests as UNSUPPORTED now.

    Differential Revision: https://reviews.llvm.org/D32632 — kuba.brecka / ViewSVN
  2. [asan] Disable some Darwin tests that don't work on iOS simulator

    Differential Revision: https://reviews.llvm.org/D32633 — kuba.brecka / ViewSVN
  3. Fix misnamed #include. Remove _NC suffix from ELF relocations TLSDESC_{LD64,ADD}_LO12 — joel_k_jones / ViewSVN

r301963 (#5665) (May 2, 2017 1:16:03 PM)

  1. Revert r301822 (and dependent r301825), which tried to improve the
    handling of constexprs with unknown bounds.

    This triggers a corner case of the language where it's not yet clear
    whether this should be an error:

      struct A {
        static void *const a[];
        static void *const b[];
      constexpr void *A::a[] = {&b[0]};
      constexpr void *A::b[] = {&a[0]};

    When discovering the initializer for A::a, the bounds of A::b aren't known yet.
    It is unclear whether warning about errors should be deferred until the end of
    the translation unit, possibly resolving errors that can be resolved. In
    practice, the compiler can know the bounds of all arrays in this example.

    Credits for reproducers and explanation go to Richard Smith. Richard, please
    add more info in case my explanation is wrong. — djasper / ViewSVN
  2. ARM: add arm1176j-f processor

    I doubt anyone actually uses it, and I'm not even entirely convinced it exists
    myself; but it is our default for "clang -arch armv6". Functionally, if it does
    exist it's identical to the arm1176jz-f from LLVM's point of view (the
    difference is apparently in the "Security Extensions"). — Tim Northover / ViewSVN
  3. PEI: Skip dead objects when looking at CSRs

    On AMDGPU if an SGPR is spilled to a VGPR, the frame index
    is deleted. If there were any CSR SGPRs, this woudl
    assert when setting the offset. — arsenm / ViewSVN
  4. Revert "[docs] UBSan: Mention that print_stacktrace=1 is unsupported on Darwin"

    This reverts commit r300295.

    It's no longer true, print_stacktrace=1 is supported on Darwin/Windows
    as of r301839. — Vedant Kumar / ViewSVN
  5. [PartialInlining] Add more early filtering

    This is a follow up to the previous
    inline cost patch for quicker filtering. — davidxl / ViewSVN
  6. AMDGPU: Don't promote alloca to LDS for leaf functions

    LDS use in leaf functions not currently handled. — arsenm / ViewSVN
  7. [Hexagon] Fix uninitialized value caught with valgrind

    Patch by Colin LeMahieu. — kparzysz / ViewSVN
  8. [Hexagon] Change iconst to emit 27bit relocation

    Patch by Colin LeMahieu. — kparzysz / ViewSVN
  9. [Hexagon] Add extenders for GD_PLT_B22_PCREL and LD_PLT_B22_PCREL

    Patch by Sid Manning. — kparzysz / ViewSVN
  10. [Hexagon] Don't ignore mult-cycle latency information

    The compiler was generating code that ends up ignoring a multiple
    latency dependence between two instructions by scheduling the
    intructions in back-to-back packets.

    The packetizer needs to end a packet if the latency of the current
    current insruction and the source in the previous packet is
    greater than 1 cycle. This case occurs when there is still room in
    the current packet, but scheduling the instruction causes a stall.
    Instead, the packetizer should start a new packet. Also, if the
    current packet already contains a stall, then it is okay to add
    another instruction to the packet that also causes a stall. This
    occurs when there are no instructions that can be scheduled in
    between the producer and consumer instructions.

    This patch changes the latency for loads to 2 cycles from 3 cycles.
    This change refects that a load only needs to be separated by
    one extra packet to eliminate the stall.

    Patch by Ikhlas Ajbar. — kparzysz / ViewSVN

r301953 (#5664) (May 2, 2017 12:25:56 PM)

  1. [Hexagon] Formatting changes, NFC — kparzysz / ViewSVN
  2. [Hexagon] Remove unused validSubtarget TSFlags

    Patch by Colin LeMahieu. — kparzysz / ViewSVN
  3. [Hexagon] Make sure duplexed dealloc_returns are checked for double jumps

    Patch by Colin LeMahieu. — kparzysz / ViewSVN
  4. SpeculativeExecution: Stop using whitelist for costs

    Just let TTI's cost do this instead of arbitrarily restricting
    this. — arsenm / ViewSVN
  5. [Hexagon] Move checking AXOK to checker

    Patch by Colin LeMahieu. — kparzysz / ViewSVN
  6. Rename pdb::StringTable -> pdb::PDBStringTable.

    With the forthcoming codeview::StringTable which a pdb::StringTable
    would hold an instance of as one member, this ambiguity becomes
    confusing.  Rename to PDBStringTable to avoid this. — zturner / ViewSVN
  7. [Hexagon] Remove unneeded code from HexagonShuffler

    Patch by Colin LeMahieu. — kparzysz / ViewSVN
  8. [Hexagon] Extract function that checks endloops with other branches

    Change location number to point to conflicting branch instruction.

    Patch by Colin LeMahieu. — kparzysz / ViewSVN
  9. [Hexagon] Add new packet iterator which will iterate through duplexes

    Patch by Colin LeMahieu. — kparzysz / ViewSVN

r301944 (#5663) (May 2, 2017 11:35:47 AM)

  1. Revert "Remove "_NC" suffix and semantics from TLSDESC_LD{64,32}_LO12 and"

    This reverts commit c08155afc5d3230792da2ad30a046a8617735a73.

    This is causing undefined symbol errors with some of the constants. — zturner / ViewSVN
  2. [Hexagon] Check for .cur def without use without using a map data structure

    Patch by Colin LeMahieu. — kparzysz / ViewSVN
  3. Bitcode: Simplify how we enumerate summaries in the index. NFCI.

    Instead of defining a custom iterator class, just use a function with a
    callback, which is much easier to understand and less error prone.

    Differential Revision: https://reviews.llvm.org/D32470 — pcc / ViewSVN
  4. [lit] Try to exit more cleanly

    If all jobs complete successfully, use pool.close() instead of
    pool.terminate() before waiting for the workers. Zach Turner reported
    that he was getting "access denied" exceptions from pool.terminate().

    Make the workers abort immediately without printing to stderr when they
    are interrupted.

    Finally, catch exceptions when attempting to remove our temporary
    testing directory. On abnormal exit, there can often be open handles
    that haven't been cleaned up yet. — rnk / ViewSVN
  5. Make DWARFDebugLine use StringRef for directory/file tables. NFC

    Differential Revision: http://reviews.llvm.org/D32728 — probinson / ViewSVN
  6. Remove "_NC" suffix and semantics from TLSDESC_LD{64,32}_LO12 and
      TLSDESC_ADD_LO12 relocations
    Rearrange ordering in AArch64.def to follow relocation encoding
    Fix name:
      R_AARCH64_P32_LD64_GOT_LO12_NC => R_AARCH64_P32_LD32_GOT_LO12_NC
    Add support for several "TLS", "TLSGD", and "TLSLD" relocations for
    Fix return values from isNonILP32reloc
    Add implementations for
      R_AARCH64_P32_TLSDESC_LD32_LO12, R_AARCH64_LD64_GOT_LO12_NC,
    Modify error messages to give name of equivalent relocation in the
      ABI not being used, along with better checking for non-existent
      requested relocations.
    Added assembler support for "pg_hi21_nc"
    Relocation definitions added without implementations:
    Fix encoding:

    Reviewers: Peter Smith

    Patch by: Joel Jones (jjones@cavium.com)

    Differential Revision: https://reviews.llvm.org/D32072 — joel_k_jones / ViewSVN
  7. AMDGPU: Refactor AsmPrinter

    Avoid analyzing functions multiple times. This allows
    asserting that each function is only analyzed once. — arsenm / ViewSVN
  8. AMDGPU: Make intrinsics speculatable — arsenm / ViewSVN
  9. [PDB/CodeView] Read/write codeview inlinee line information.

    Previously we wrote line information and file checksum
    information, but we did not write information about inlinee
    lines and functions.  This patch adds support for that. — zturner / ViewSVN

r301935 (#5662) (May 2, 2017 10:45:41 AM)

  1. Roll back r301831 to fix broken powerpc64le tests.

    http://lab.llvm.org:8011/builders/clang-ppc64le-linux/builds/5941 — saugustine / ViewSVN
  2. CMake: Silence more stderr when running git.

    It can confuse bots collecting errors. — Tim Northover / ViewSVN

r301933 (#5661) (May 2, 2017 9:55:44 AM)

  1. Fixing a test failure and refactoring the use of the update_svn_checkout function. — sqlbyme / ViewSVN
  2. Add new test case for addcarry. NFC. — deadalnix / ViewSVN
  3. Avoid empty .eh_frame sections.

    Strip on OpenBSD does not correctly handle an empty .eh_frame section
    and produces broken binaries in that case. Currently lld creates such
    an empty .eh_frame section, despite the fact that the OpenBSD crtend.o
    explicitly inserts a terminator. The Linux LSB "standard":


    explicitly says that

        The .eh_frame section shall contain 1 or more Call Frame Information (CFI) records.

    This diff includes a test that specifically tests the issue I'm seeing
    on OpenBSD.

    Patch by Mark Kettenis! — rafael / ViewSVN
  4. AMDGPU: Add AMDGPU_HS calling convention

    Reviewers: arsenm, nhaehnle

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

    Differential Revision: https://reviews.llvm.org/D32644 — mareko / ViewSVN
  5. [InstCombine] don't use DeMorgan's Law on integer constants (2nd try)

    This was originally checked in here:

    And reverted here:

    Because there's a clang test that would fail after this. I fixed/removed the
    offending CHECK lines in:

    So let's try this again. Original commit message:

    This is the fold that causes the infinite loop in BoringSSL
    when we fix instcombine demanded bits to prefer 'not' ops as in https://reviews.llvm.org/D32255.

    There are 2 or 3 problems with dyn_castNotVal, and I don't think we can
    reinstate https://reviews.llvm.org/D32255 until dyn_castNotVal is completely eliminated.

    1. As shown here, it transforms 'not' into random xor. This transform is harmful to SCEV and codegen because 'not' can often be folded while random xor cannot.
    2. It does not transform vector constants. This is actually a good thing, but if you don't believe the above argument, then we shouldn't have excluded vectors.
    3. It tries to avoid transforming not(not(X)). That's nice, but it doesn't match the greedy nature of instcombine. If we DeMorganize a pattern that has an extra 'not' in it: ~(~(~X) & Y) --> (~X | ~Y)

      That's just another case of DeMorgan, so we should trust that we'll fold that pattern too: (~X | ~ Y) --> ~(X & Y)

    Differential Revision: https://reviews.llvm.org/D32665 — spatel / ViewSVN
  6. [CodeGen] remove/fix checks that will fail when r301923 is recommitted

    Don't test the optimizer as part of front-end verification. — spatel / ViewSVN

r301927 (#5660) (May 2, 2017 9:05:28 AM)

  1. tsan: allow fast large MemoryRangeSet on non-Windows Go

    The fast reset for large memory regions is not working
    only on windows. So enable it for Go/linux/darwin/freebsd.

    See https://github.com/golang/go/issues/20139
    for background and motivation.

    Based on idea by Josh Bleecher Snyder. — dvyukov / ViewSVN
  2. [compiler-rt] move tsan's Android __get_tls() to sanitizer_common

    TSan's Android `__get_tls()` and `TLS_SLOT_TSAN` can be used by other sanitizers as well (see D32649), this change moves them to sanitizer_common.
    I picked sanitizer_linux.h as their new home.
    In the process, add the 32-bit versions for ARM, i386 & MIPS.

    Can the address of `__get_tls()[TLS_SLOT_TSAN]` change in between the calls?
    I am not sure if there is a need to repeat the construct as opposed to using a variable. So I left things as they were.

    Testing on my side was restricted to a successful cross-compilation.

    Reviewers: dvyukov, kubamracek

    Reviewed By: dvyukov

    Subscribers: aemerson, rengolin, srhines, dberris, arichardson, llvm-commits

    Differential Revision: https://reviews.llvm.org/D32705 — cryptoad / ViewSVN
  3. [NFC] [IslAST] fix typo: "int the" -> "in the" — bollu / ViewSVN
  4. revert r301923 : [InstCombine] don't use DeMorgan's Law on integer constants

    There's a clang test that is wrongly using -O1 and failing after this commit. — spatel / ViewSVN

r301923 (#5659) (May 2, 2017 8:15:05 AM)

  1. [InstCombine] don't use DeMorgan's Law on integer constants

    This is the fold that causes the infinite loop in BoringSSL
    when we fix instcombine demanded bits to prefer 'not' ops as in D32255.

    There are 2 or 3 problems with dyn_castNotVal, and I don't think we can
    reinstate D32255 until dyn_castNotVal is completely eliminated.
    1. As shown here, it transforms 'not' into random xor. This transform is
       harmful to SCEV and codegen because 'not' can often be folded while
       random xor cannot.
    2. It does not transform vector constants. This is actually a good thing,
       but if you don't believe the above argument, then we shouldn't have
       excluded vectors.
    3. It tries to avoid transforming not(not(X)). That's nice, but it doesn't
       match the greedy nature of instcombine. If we DeMorganize a pattern
       that has an extra 'not' in it:
       ~(~(~X) & Y) --> (~X | ~Y)

       That's just another case of DeMorgan, so we should trust that we'll fold
       that pattern too:
       (~X | ~ Y) --> ~(X & Y)

    Differential Revision: https://reviews.llvm.org/D32665 — spatel / ViewSVN
  2. [DAGCombine] (uaddo X, (addcarry Y, 0, Carry)) -> (addcarry X, Y, Carry)

    Summary: This is a common pattern that arise when legalizing large integers operations. Only do it when Y + 1 cannot overflow as this would change the carry behavior of uaddo .

    Reviewers: jyknight, nemanjai, mkuper, spatel, RKSimon, zvi, bkramer

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D32687 — deadalnix / ViewSVN
  3. Add llvm::object::getELFSectionTypeName().

    This is motivated by https://reviews.llvm.org/D32488 where I am trying
    to add printing of the section type for incompatible sections to LLD
    error messages. This patch allows us to use the same code in
    llvm-readobj and LLD instead of duplicating the function inside LLD.

    Patch by Alexander Richardson! — rafael / ViewSVN
  4. Improvements to TableGen/LangIntro.rst

    Document the 'code' data type, and that value{15-17} is different to

    Patch by @chenwj (Wei-Ren Chen).

    Differential Revision: https://reviews.llvm.org/D32117 — asb / ViewSVN

r301919 (#5658) (May 2, 2017 7:24:56 AM)

  1. [DAGCombine] (add X, (addcarry Y, 0, Carry)) -> (addcarry X, Y, Carry)

    Summary: Common pattern when legalizing large integers operations. Similar to D32687, when the carry isn't used.

    Reviewers: jyknight, nemanjai, mkuper, spatel, RKSimon, zvi, bkramer

    Differential Revision: https://reviews.llvm.org/D32738 — deadalnix / ViewSVN
  2. Android.rules: set "ar" path correctly — labath / ViewSVN

r301917 (#5657) (May 2, 2017 6:34:56 AM)

  1. ObjectFileELF: Fix symbol lookup in bss section

    If we have symbol information in a separate file, we need to be very
    careful about presenting a unified section view of module to the rest of
    the debugger. ObjectFileELF had code to handle that, but it was being
    overly cautious -- the section->GetFileSize()!=0 meant that the
    unification would fail for sections which do not occupy any space in the
    object file (e.g., .bss). In my case, that manifested itself as not
    being able to display the values of .bss variables properly as the
    section associated with the variable did not have it's load address set
    (because it was not present in the unified section list).

    I test this by making sure the unified section list and the variables
    refer to the same section.

    Reviewers: eugene, zturner

    Subscribers: tberghammer, lldb-commits, mgorny

    Differential Revision: https://reviews.llvm.org/D32434 — labath / ViewSVN
  2. Revert r301735 (and subsequent r301786).

    It leads to clang crashing, e.g. on this short code fragment (added to

      class SomeClass {
        void foo() {
          auto l = [this] { auto l = [] EXCLUSIVE_LOCKS_REQUIRED(mu_) {}; };
        Mutex mu_;
      }; — djasper / ViewSVN
  3. [X86][SSE] Add test for PR30264 (combining multiple constants inputs in a shuffle) — rksimon / ViewSVN
  4. [clang-move] Find template class forward declarations more precisely.

    Reviewers: ioeric

    Reviewed By: ioeric

    Subscribers: cfe-commits

    Differential Revision: https://reviews.llvm.org/D32741 — hokein / ViewSVN
  5. [analyzer] Detect bad free of function pointers

    Differential Revision: https://reviews.llvm.org/D31650 — danielmarjamaki / ViewSVN

r301912 (#5656) (May 2, 2017 5:45:02 AM)

  1. [X86] Tidyup subvector insert/extract helpers. NFCI.

    Use getConstantOperandVal where possible. — rksimon / ViewSVN

r301911 (#5655) (May 2, 2017 4:54:57 AM)

  1. Fix typo in comment. NFCI. — rksimon / ViewSVN
  2. [SelectionDAG] Improve support for promotion of <1 x fX> floating point argument types (PR31088)

    PR31088 demonstrated that we were assuming that only integers require promotion from <1 x iX> types, when in fact float types may require it as well - in this case half floats.

    This patch adds support for extension/truncation for both integer and float types.

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

r301909 (#5654) (May 2, 2017 4:04:37 AM)

  1. Revert r301904 causing tsan test failure in x86_64-linux-autoconf — pgousseau / ViewSVN
  2. Change UniqueCStringMap to use ConstString as the key

    UniqueCStringMap "sorts" the entries for fast lookup, but really it only cares about uniqueness.  ConstString can be compared by pointer alone, rather than with strcmp, resulting in much faster comparisons.  Change the interface to take ConstString instead, and propagate use of the type to the callers where appropriate.

    Reviewers: #lldb, clayborg

    Reviewed By: clayborg

    Subscribers: labath, jasonmolenda, lldb-commits

    Differential Revision: https://reviews.llvm.org/D32316
    Patch by Scott Smith <scott.smith@purestorage.com>. — labath / ViewSVN
  3. [DAGCombiner] Improve MatchBswapHword logic (PR31357)

    The existing code only looks at half of the tree when matching bswap + rol patterns ending in an OR tree (as opposed to a cascade).

    Patch originally introduced by Jim Lewis.

    Submitted on the behalf of Dinar Temirbulatov.

    Differential Revision: https://reviews.llvm.org/D32039 — rksimon / ViewSVN
  4. Remove leftover test expectation from rL301902. — emilio / ViewSVN
  5. [ARM] GlobalISel: Use TableGen instruction selector

    Emit and use the TableGen instruction selector for ARM. At the moment,
    this allows us to remove the hand-written code for selecting G_SDIV and

    Future commits will focus on increasing the code coverage for it and
    removing more dead code from the current instruction selector. — rovka / ViewSVN
  6. [asan] Add strndup/__strndup interceptors if targeting linux.

    Differential Revision: https://reviews.llvm.org/D31457 — pgousseau / ViewSVN
  7. Remove unused code related to CPlusPlusLanguage::FindEquivalentNames

    Summary: It is simply unused, and the header for it is private, so there should be no external dependencies.

    Reviewers: #lldb, zturner

    Reviewed By: zturner

    Subscribers: zturner, tberghammer, jingham, lldb-commits

    Differential Revision: https://reviews.llvm.org/D32503
    Patch by Scott Smith <scott.smith@purestorage.com>. — labath / ViewSVN

r301902 (#5653) (May 2, 2017 2:14:35 AM)

  1. [libclang] Revert rL301328 and add tests for the regressions introduced.

    Differential Revision: https://reviews.llvm.org/D32566 — emilio / ViewSVN

r301901 (#5652) (May 2, 2017 12:30:11 AM)

  1. [APInt] Move APInt::getSplat out of line.

    I think this method is probably too complex to be inlined. — ctopper / ViewSVN

r301900 (#5651) (May 1, 2017 11:39:41 PM)

  1. [APInt] Move the setBit and clearBit methods inline.

    This makes setBit/clearBit more consistent with setBits which is already inlined. — ctopper / ViewSVN
  2. Refactor callsite cost computation into a helper function /NFC

    Makes code more readable. The function will also be used
    by the partial inlining's cost analysis. — davidxl / ViewSVN
  3. clang/test/Modules/diag-flags.cpp: Appease targeting *-win32 with explicit triple. Fixes r301846.

    MicrosoftRecordLayoutBuilder doesn't have ability of -Wpadded.

    FIXME: Would other diag be available here? — chapuni / ViewSVN

r301897 (#5650) (May 1, 2017 10:49:41 PM)

  1. ELF: Set symbol binding to STB_GLOBAL when undefining symbols during LTO.

    If there is a bug in the LTO implementation that causes it to fail to provide
    an expected symbol definition, the linker should report an undefined symbol
    error. Unfortunately, we were failing to do so if the symbol definition
    was weak, as the undefine() function was turning the definition into a weak
    undefined symbol, which resolves to zero if the symbol remains undefined. This
    patch causes us to set the binding to STB_GLOBAL when we undefine a symbol.

    I can't see a good way to test this. The behaviour should only be observable
    if there is a bug in the LTO implementation.

    Differential Revision: https://reviews.llvm.org/D32731 — pcc / ViewSVN

r301896 (#5649) (May 1, 2017 9:29:34 PM)

  1. Update commetns. — ruiu / ViewSVN
  2. Make getArchiveMembers function a non-member function.

    It didn't have to be a member function of Driver. This patch makes
    that function a file-scoped non-member function. — ruiu / ViewSVN

r301894 (#5648) (May 1, 2017 8:39:21 PM)

  1. [PartialInlining] Hook up inline cost analysis

    Differential Revision: http://reviews.llvm.org/D32666 — davidxl / ViewSVN
  2. [AVR] Save/restore the frame pointer for all functions

    A recent commit I made made it so that we only did this for signal or
    interrupt handlers. This broke normal functions. — dylanmckay / ViewSVN
  3. [PowerPC] Emit VMX loads/stores for aligned ops to avoid adding swaps on LE

    Fixes PR30730.
    This is a re-commit of a pulled commit. The commit was pulled because some
    software projects contained uses of Altivec vectors that violated alignment
    requirements. Known issues have now been fixed.

    Committing on behalf of Lei Huang.

    Differential Revision: https://reviews.llvm.org/D26861 — nemanjai / ViewSVN

r301891 (#5647) (May 1, 2017 7:16:25 PM)

  1. Revert r301785 (and r301787) because they caused PR32864.

    The fix is that ExprEvaluatorBase::VisitInitListExpr should handle transparent exprs instead of exprs with one element. Fixing that uncovers one testcase failure because the AST for "constexpr _Complex float test2 = {1};" is wrong (the _Complex prvalue should not be const-qualified), and a number of test failures in test/OpenMP where the captured stmt contains an InitListExpr that is in syntactic form. — nicholas / ViewSVN
  2. [AArch64] armv8-A doesn't have LSE.

    r288279 mistakenly added it to all arches, but it's only available
    from v8.1 onwards.

    The testcase is awkward, because (I suspect) of PR32873.

    Spotted by inspection. — Ahmed Bougacha / ViewSVN
  3. [sanitizer-coverage] add a deprecation note for the old sanitizer-coverage; remove a TODO printf — kcc / ViewSVN
  4. [sanitizer-coverage] update the SanitizerCoverage docs to reflect the current state — kcc / ViewSVN

r301887 (#5646) (May 1, 2017 6:24:36 PM)

  1. [AVR] Fix a bug where the frame pointer is clobbered

    Because it was a callee-saved register, we automatically generated code
    to spill and unspill its original value so that it is restored after the
    function returns.

    The problem is that this code was being generated before the epilogue.
    The epilogue itself uses the Y register, which could be prematurely
    restored by the CSR restoration process.

    This removes R29R28 from the CSR list and changes the prologue/epilogue
    code to handle it explicitly. — dylanmckay / ViewSVN

r301886 (#5645) (May 1, 2017 5:34:17 PM)

  1. Fixing an unbound local variable in Jenkins/build.py. — sqlbyme / ViewSVN
  2. Revert r301880

    This change caused buildbot failures, apparently because we're not
    passing around types that InstSimplify is used to seeing. I'm not overly
    familiar with InstSimplify, so I'm reverting this until I can figure out
    what exactly is wrong. — George Burgess IV / ViewSVN
  3. [ZORG] Update Jenkins/build.py to force SVN upgrade of the working directory. — sqlbyme / ViewSVN
  4. Stylistic makeover of DWARFDebugLine before working on it. NFC

    Rename parameters and locals to CamelCase, doxygenize the header, and
    run clang-format on the whole thing. — probinson / ViewSVN
  5. [CodeView] Write CodeView line information.

    Differential Revision: https://reviews.llvm.org/D32716 — zturner / ViewSVN

r301881 (#5644) (May 1, 2017 4:56:03 PM)

  1. [AVR] Enable the frame pointer for all functions

    This is a temporary measure while we figure out a way to get the frame
    pointer working correctly. — dylanmckay / ViewSVN
  2. [InstSimplify] Handle selects of GEPs with 0 offset

    In particular (since it wouldn't fit nicely in the summary):
    (select (icmp eq V 0) P (getelementptr P V)) -> (getelementptr P V)

    Differential Revision: https://reviews.llvm.org/D31435 — George Burgess IV / ViewSVN

r301879 (#5643) (May 1, 2017 4:54:59 PM)

  1. [X86] Reduce code for setting operations actions by merging into loops across multiple types/ops. NFCI. — rksimon / ViewSVN
  2. Empty Space. NFC — trentxintong / ViewSVN
  3. [IR] Garbage collect unused variants. NFCI. — davide / ViewSVN
  4. Creating release candidate rc1 from release_401 branch — tstellar / ViewSVN
  5. Creating release directory for release_401. — tstellar / ViewSVN
  6. Creating release candidate rc1 from release_401 branch — tstellar / ViewSVN
  7. Creating release directory for release_401. — tstellar / ViewSVN
  8. Creating release candidate rc1 from release_401 branch — tstellar / ViewSVN
  9. Creating release directory for release_401. — tstellar / ViewSVN
  10. Creating release candidate rc1 from release_401 branch — tstellar / ViewSVN
  11. Creating release directory for release_401. — tstellar / ViewSVN
  12. Creating release candidate rc1 from release_401 branch — tstellar / ViewSVN
  13. Creating release directory for release_401. — tstellar / ViewSVN
  14. Creating release candidate rc1 from release_401 branch — tstellar / ViewSVN
  15. Creating release directory for release_401. — tstellar / ViewSVN
  16. Creating release candidate rc1 from release_401 branch — tstellar / ViewSVN
  17. Creating release directory for release_401. — tstellar / ViewSVN
  18. Creating release candidate rc1 from release_401 branch — tstellar / ViewSVN
  19. Creating release directory for release_401. — tstellar / ViewSVN
  20. Creating release candidate rc1 from release_401 branch — tstellar / ViewSVN
  21. Creating release directory for release_401. — tstellar / ViewSVN
  22. Creating release candidate rc1 from release_401 branch — tstellar / ViewSVN
  23. Creating release directory for release_401. — tstellar / ViewSVN
  24. Creating release candidate rc1 from release_401 branch — tstellar / ViewSVN
  25. Creating release directory for release_401. — tstellar / ViewSVN
  26. Creating release candidate rc1 from release_401 branch — tstellar / ViewSVN
  27. Creating release directory for release_401. — tstellar / ViewSVN
  28. Fix a pessimising move warning. — pcc / ViewSVN
  29. MachineFrameInfo: Track whether MaxCallFrameSize is computed yet; NFC

    This tracks whether MaxCallFrameSize is computed yet. Ideally we would
    assert and fail when the value is queried before it is computed, however
    this fails various targets that need to be fixed first.

    Differential Revision: https://reviews.llvm.org/D32570 — matze / ViewSVN
  30. llvm-link: Add BitReader to deps corresponding to r301832. — chapuni / ViewSVN
  31. [NewGVN] Don't derive incorrect implications.

    In the testcase attached,  we believe %tmp1 implies %tmp4.
      br i1 %tmp1, label %bb2, label %bb7
      br i1 %tmp4, label %bb5, label %bb7

    because Wwhile looking at PredicateInfo stuffs we end up calling
    isImpliedTrueByMatchingCmp() with the arguments backwards.

    Differential Revision:  https://reviews.llvm.org/D32718 — davide / ViewSVN
  32. [InstCombine] check one-use before applying DeMorgan nor/nand folds

    If we have ~(~X & Y), it only makes sense to transform it to (X | ~Y) when we do not need
    the intermediate (~X & Y) value. In that case, we would need an extra instruction to
    generate ~Y + 'or' (as shown in the test changes).

    It's ok if we have multiple uses of ~X or Y, however. In those cases, we may not reduce the
    instruction count or critical path, but we might improve throughput because we can generate
    ~X and ~Y in parallel. Whether that actually makes perf sense or not for a target is something
    we can't answer in IR.

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

r301847 (#5642) (May 1, 2017 4:16:07 PM)

  1. New file missed from r301846. — rsmith / ViewSVN
  2. Fix initial diagnostic state setup for an explicit module with no diagnostic pragmas.

    If a file has no diagnostic pragmas, we build its diagnostic state lazily, but
    in this case we never set up the root state to be the diagnostic state in which
    the module was originally built, so the diagnostic flags for files in the
    module with no diagnostic pragmas were incorrectly based on the user of the
    module rather than the diagnostic state when the module was built. — rsmith / ViewSVN
  3. [sanitizer-coverage] remove more stale code — kcc / ViewSVN
  4. Adds initial llvm-dwarfdump --verify support with unit tests.

    lldb-dwarfdump gets a new "--verify" option that will verify a single file's DWARF debug info and will print out any errors that it finds. It will return an non-zero exit status if verification fails, and a zero exit status if verification succeeds. Adding the --quiet option will suppress any output the STDOUT or STDERR.

    The first part of the verify does the following:

    - verifies that all CU relative references (DW_FORM_ref1, DW_FORM_ref2, DW_FORM_ref4, DW_FORM_ref8, DW_FORM_ref_udata) have valid CU offsets
    - verifies that all DW_FORM_ref_addr references have valid .debug_info offsets
    - verifies that all DW_AT_ranges attributes have valid .debug_ranges offsets
    - verifies that all DW_AT_stmt_list attributes have valid .debug_line offsets
    - verifies that all DW_FORM_strp attributes have valid .debug_str offsets

    Unit tests were added for each of the above cases.

    Differential Revision: https://reviews.llvm.org/D32707 — gclayton / ViewSVN
  5. Bitcode: Make the summary reader responsible for merging. NFCI.

    This is to prepare for an upcoming change which uses pointers instead of
    GUIDs to represent references.

    Differential Revision: https://reviews.llvm.org/D32469 — pcc / ViewSVN
  6. [APInt] In operator!, handle single word case by comparing VAL to 0 directly and handle multiword case by comparing countLeadingZerosSlowCase() to BitWidth.

    We were using operator=(0) which implicitly calls countLeadingZeros but only to compare with 64 to determine if we can compare VAL or pVal[0] to uint64_t. By handling the multiword case with countLeadingZerosSlowCase==BitWidth we can prevent a load of pVal[0] from being inserted inline at each call site. This saves a little bit of code size. — ctopper / ViewSVN
  7. [AArch64] Move GISel accessor initialization from TargetMachine to Subtarget.

    NFC — qcolombet / ViewSVN
  8. Put back REQUIRES: system-darwin to fix asan bot.

    These tests do not appear to be Darwin-specific, and this REQUIRES: appears to
    be hiding a real bug; this change is just restoring the prior state to get the
    buildbots happy again while we investigate. (The system-darwin requirement is
    covered by PR32851.) — rsmith / ViewSVN
  9. [ubsan] Fall back to the fast unwinder when print_stacktrace=1

    This makes it possible to get stacktrace info when print_stacktrace=1 on
    Darwin (where the slow unwinder is not currently supported [1]). This
    should not regress any other platforms.

    [1] The thread about r300295 has a relatively recent discusion about
    this. We should be able to enable the existing slow unwind functionality
    for Darwin, but this needs more testing.

    Differential Revision: https://reviews.llvm.org/D32517 — Vedant Kumar / ViewSVN
  10. [APInt] Fix copy/paste mistake in comment for isNullValue. NFC — ctopper / ViewSVN

r301837 (#5641) (May 1, 2017 3:26:07 PM)

  1. [asan] speed up small memcpy (> 32 but <= 64 bytes) — kcc / ViewSVN
  2. Reorder release notes, fix missing link and a grammar issue.

    Patch by Réka Nikolett Kovács! — xazax / ViewSVN
  3. IPO: Add missing build dep. — pcc / ViewSVN
  4. [X86][AVX] Rename LowerVectorBroadcast to lowerBuildVectorAsBroadcast. NFCI.

    Since the shuffle refactor, this is only used during BUILD_VECTOR lowering. — rksimon / ViewSVN

r301833 (#5640) (May 1, 2017 2:36:10 PM)

  1. Add comments about how we handle mergeable sections with relocations.

    Also factored out code. — ruiu / ViewSVN
  2. Object: Remove ModuleSummaryIndexObjectFile class.

    Differential Revision: https://reviews.llvm.org/D32195 — pcc / ViewSVN
  3. Add powerpc64 and powerpc64le to build infrastructure.

    From Phab D32031. — saugustine / ViewSVN
  4. Fix pr32816.

    When using linkerscripts we were trying to sort SHF_LINK_ORDER
    sections too early. Instead of always doing two runs of
    assignAddresses, record the section order in processCommands. — rafael / ViewSVN
  5. [Hexagon] Replace CVI_VM_CUR_LD type with CVI_VM_LD

    A .cur instruction can be identified by checking isCVINew() && mayLoad().

    Patch by Colin LeMahieu. — kparzysz / ViewSVN
  6. [Hexagon] Improving error reporting for writing to read only registers

    Patch by Colin LeMahieu. — kparzysz / ViewSVN
  7. [Hexagon] Give better error messages for solo instruction errors

    Patch by Colin LeMahieu. — kparzysz / ViewSVN

r301826 (#5639) (May 1, 2017 1:46:10 PM)

  1. [sanitizer-coverage] disable coverage_direct=1, will remove the code in a few weeks — kcc / ViewSVN
  2. Silence unused variable warning. NFC. — d0k / ViewSVN
  3. [sanitizer-coverage] add a deprecation note to coverage_direct=1 — kcc / ViewSVN
  4. [Hexagon] Improve shuffle error reporting

    Patch by Colin LeMahieu. — kparzysz / ViewSVN

r301822 (#5638) (May 1, 2017 12:56:05 PM)

  1. Improve handling of arrays of unknown bound in constant expressions.

    Do not spuriously reject constexpr functions that access elements of an array
    of unknown bound; this may later become valid once the bound is known. Permit
    array-to-pointer decay on such arrays, but disallow pointer arithmetic (since
    we do not know whether it will have defined behavior).

    The standard is not clear on how this should work, but this seems to be a
    decent answer.

    Patch by Robert Haberlach! — rsmith / ViewSVN
  2. Change an unusual directory permission back to a sane value after test.

    Leaving a directory with a permission 0o100 is inconvenient.
    For example, macOS's rm can't remove such directory. — ruiu / ViewSVN
  3. Cleanup previous test commit. — saugustine / ViewSVN

r301819 (#5637) (May 1, 2017 12:06:04 PM)

  1. X86: initialize a few subtarget variables.

    Otherwise an indeterminate value gets read, causing a bunch of UBSan failures. — Tim Northover / ViewSVN
  2. Add a blank line as a test-commit.

    Per http://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access — saugustine / ViewSVN
  3. Use a 2 bit pointer in ValueHandleBase::PrevPair; NFC

    This was an omission in r301813.  I had made the supporting changes to
    make this happen, but I forgot to actually update the PrevPair
    declaration. — sanjoy / ViewSVN
  4. Take indirect branch into account as well when folding.

    We may not be able to rewrite indirect branch target, but we also want to take it into
    account when folding, i.e. if it and all its successor's predecessors go to the same
    destination, we can fold, i.e. no need to thread. — trentxintong / ViewSVN
  5. Adapt to LLVM's rename of WeakVH to WeakTrackingVH; NFC — sanjoy / ViewSVN
  6. Use WeakVH instead of WeakTrackingVH in AliasSetTracker's UnkownInsts

    In cases where an instruction (a call site, say) is RAUW'ed with some
    other value (this is possible via the `returned` attribute, for
    instance), we want the slot in UnknownInsts to point to the original
    Instruction we wanted to track, not the value it got replaced by.

    Fixes PR32587.

    This relands r301426. — sanjoy / ViewSVN
  7. Add a new WeakVH value handle; NFC

    This relands r301425. — sanjoy / ViewSVN
  8. Rename WeakVH to WeakTrackingVH; NFC

    This relands r301424. — sanjoy / ViewSVN

r301811 (#5636) (May 1, 2017 10:45:17 AM)

  1. [WebAssembly] Fix use of SDNodeFlags after API change in r301803 — dschuff / ViewSVN
  2. [PDB/CodeView] Rename some classes.

    In preparation for introducing writing capabilities for each of
    these classes, I would like to adopt a Foo / FooRef naming
    convention, where Foo indicates that the class can manipulate and
    serialize Foos, and FooRef indicates that it is an immutable view of
    an existing Foo.  In other words, Foo is a writer and FooRef is a
    reader.  This patch names some existing readers to conform to the
    FooRef convention, while offering no functional change. — zturner / ViewSVN
  3. Emulate TrackingVH using WeakVH

    This frees up one slot in the HandleBaseKind enum, which I will use
    later to add a new kind of value handle.  The size of the
    HandleBaseKind enum is important because we store a HandleBaseKind in
    the low two bits of a (in the worst case) 4 byte aligned pointer.

    Reviewers: davide, chandlerc

    Subscribers: mcrosier, llvm-commits

    Differential Revision: https://reviews.llvm.org/D32634 — sanjoy / ViewSVN
  4. [JumpThread] Add some assertions for expected ConstantInt/BlockAddress — trentxintong / ViewSVN
  5. Remove unnecessary conditions as suggested by clang-tidy. NFC

    Patch by: Gergely Angeli!

    Differential Revision: https://reviews.llvm.org/D31936 — xazax / ViewSVN
  6. [SelectionDAG] Use known ones to provide a better bound for the known zeros for CTTZ/CTLZ operations.

    This is the SelectionDAG version of D32521. If know where at least one 1 is located in the input to these intrinsics we can place an upper bound on the number of bits needed to represent the count and thus increase the number of known zeros in the output.

    I think we can also refine this further for CTTZ_UNDEF/CTLZ_UNDEF by assuming that the answer will never be BitWidth. I've left this out for now because it caused other test failures across multiple targets. Usually because of turning ADD into OR based on this new information.

    I'll fix CTPOP in a future patch.

    Differential Revision: https://reviews.llvm.org/D32692 — ctopper / ViewSVN
  7. Relax testcase to fix a PS4 buildbot failure. — Adrian Prantl / ViewSVN

r301804 (#5635) (May 1, 2017 9:25:02 AM)

  1. [JumpThread] Do RAUW in case Cond folds to a constant in the CFG

    Summary: [JumpThread] Do RAUW in case Cond folds to a constant in the CFG

    Reviewers: sanjoy

    Reviewed By: sanjoy

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D32407 — trentxintong / ViewSVN
  2. Generalize the specialized flag-carrying SDNodes by moving flags into SDNode.

    This removes BinaryWithFlagsSDNode, and flags are now all passed by value.

    Differential Revision: https://reviews.llvm.org/D32527 — Amara Emerson / ViewSVN
  3. [InstCombine] add multi-use variants for DeMorgan folds; NFC — spatel / ViewSVN
  4. [InstCombine] use FileCheck and auto-generate checks; NFC — spatel / ViewSVN

r301800 (#5634) (May 1, 2017 8:05:00 AM)

  1. [InstCombine] consolidate more DeMorgan tests; NFC — spatel / ViewSVN
  2. Fix test for altmacro — mzuckerm / ViewSVN
  3. [powerpc] deactivate flakey tests on powerpc64le

    These test cases occassionally fail when run on powerpc64le:


    The failures cause false problem reports to be sent to developers whose
    code had nothing to do with the failures.  Reactivate them when the real
    problems are fixed.

    This could also be related to the same problems as with the tests
    ThreadedOneSizeMallocStressTest, ThreadedMallocStressTest, ManyThreadsTest,
    and several others that do not run reliably on powerpc. — seurer / ViewSVN
  4. [LLVM][inline-asm] Altmacro absolute expression '%' feature

    In this patch, I introduce a new alt macro feature.
    This feature adds meaning for the % when using it as a prefix to the calling macro arguments.

    In the altmacro mode, the percent sign '%' before an absolute expression convert the expression first to a string.
    As described in the https://sourceware.org/binutils/docs-2.27/as/Altmacro.html
    "Expression results as strings
    You can write `%expr' to evaluate the expression expr and use the result as a string."

    expression assumptions:

    1. '%' can only evaluate an absolute expression.
    2. Altmacro '%' must be the first character of the evaluated expression.
    3. If no '%' is located before the expression, a regular module operation is expected.
    4. The result of Absolute Expressions can be only integer.

    Differential Revision: https://reviews.llvm.org/D32526 — mzuckerm / ViewSVN

r301796 (#5633) (May 1, 2017 6:44:34 AM)

  1. The -coverage-file flag was removed in r280306, and this piece was missed; NFC. — aaronballman / ViewSVN

r301795 (#5632) (May 1, 2017 3:51:43 AM)

  1. tsan: support linker init flag in __tsan_mutex_destroy

    For a linker init mutex with lazy flag setup
    (no __tsan_mutex_create call), it is possible that
    no lock/unlock happened before the destroy call.
    Then when destroy runs we still don't know that
    it is a linker init mutex and will emulate a memory write.
    This in turn can lead to false positives as the mutex
    is in fact linker initialized.

    Support linker init flag in destroy annotation to resolve this. — dvyukov / ViewSVN
  2. [AVR] Implement non-constant bit rotations

    This lets us do bit rotations of variable amount. — dylanmckay / ViewSVN

r301793 (#5631) (May 1, 2017 2:31:32 AM)

  1. [GlobalISel][X86] rename test file. NFC. — ibreger / ViewSVN

r301792 (#5630) (May 1, 2017 1:10:37 AM)

  1. [GlobalISel][X86] Prioritize Tablegen-erated instruction selection. NFC

    Prioritizes Tablegen-erated instruction selection over C++ instruction selection.
    Remove G_ADD/G_SUB C++ selection - implemented by Tablegen.

    Reviewers: dsanders, zvi, guyblank

    Reviewed By: guyblank

    Subscribers: rovka, llvm-commits, kristof.beyls

    Differential Revision: https://reviews.llvm.org/D32677 — ibreger / ViewSVN
  2. [X86] Add tests for opportunities to improve known bits for CTTZ and CTLZ. — ctopper / ViewSVN
  3. [GlobalISel][X86] G_SEXT/G_ZEXT support.

    Reviewers: zvi, guyblank

    Reviewed By: zvi

    Subscribers: rovka, llvm-commits, kristof.beyls

    Differential Revision: https://reviews.llvm.org/D32591 — ibreger / ViewSVN
  4. Remove unneeded struct; NFC

    Unless I'm missing something, the DeferredGlobal struct's GV field is
    unused, removing which makes the struct itself trivial.

    Reviewers: rafael, chandlerc

    Subscribers: mcrosier, llvm-commits

    Differential Revision: https://reviews.llvm.org/D32691 — sanjoy / ViewSVN

r301788 (#5629) (Apr 30, 2017 11:49:44 PM)

  1. [GlobalISel][X86] G_LOAD/G_STORE pointer selection support.

    Summary: [GlobalISel][X86] G_LOAD/G_STORE pointer selection support.

    Reviewers: zvi, guyblank

    Reviewed By: zvi, guyblank

    Subscribers: dberris, rovka, kristof.beyls, llvm-commits

    Differential Revision: https://reviews.llvm.org/D32217 — ibreger / ViewSVN

r301787 (#5628) (Apr 30, 2017 8:35:48 PM)

  1. Fix test that was incorrected merged between patches. — nicholas / ViewSVN
  2. Fix line endings (dos -> unix) and clang-format while I'm here — dblaikie / ViewSVN

r301785 (#5627) (Apr 30, 2017 7:45:36 PM)

  1. Handle expressions with non-literal types like ignored expressions if we are supposed to continue evaluating them.

    Also fix a crash casting a derived nullptr to a virtual base. — nicholas / ViewSVN

r301784 (#5626) (Apr 30, 2017 6:55:34 PM)

  1. [XRay][compiler-rt] Document and update the XRay Logging API

    In this patch we document the requirements for implementations that want
    to install handlers for the dynamically-controlled XRay "framework".
    This clarifies what the expectations are for implementations that
    want to install their handlers using this API (similar to how the FDR
    logging implementation does so). It also gives users some guarantees on
    semantics for the APIs.

    If all goes well, users can decide to use the XRay APIs to control the
    tracing/logging at the application level, without having to depend on
    implementation details of the installed logging implementation. This
    lets users choose the implementation that comes with compiler-rt, or
    potentially multiple other implementations that use the same APIs.

    We also add one convenience function (__xray_remove_log_impl()) for
    explicitly removing the currently installed log implementation.

    Reviewers: kpw, pelikan

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D32579 — dberris / ViewSVN

r301783 (#5625) (Apr 30, 2017 6:05:25 PM)

  1. utils: Silence -Wpedantic warning

    llvm/tools/clang/utils/TableGen/ClangAttrEmitter.cpp:1673:67: warning: default argument specified for lambda parameter [-Wpedantic]
                        const Record *Constraint = nullptr) {

    Found by gcc 5.4.0. — Saleem Abdulrasool / ViewSVN

r301782 (#5624) (Apr 30, 2017 5:15:21 PM)

  1. [AVR] Fix a bug so that we now emit R_AVR_16 fixups with the correct offset

    Before this, the LDS/STS instructions would have their opcodes
    overwritten while linking. — dylanmckay / ViewSVN

r301781 (#5623) (Apr 30, 2017 4:25:12 PM)

  1. [DAGCombiner] shrink/widen a vselect to match its condition operand size (PR14657)

    We discussed shrinking/widening of selects in IR in D26556, and I'll try to get back to that
    patch eventually. But I'm hoping that this transform is less iffy in the DAG where we can check
    legality of the select that we want to produce.

    A few things to note:

    1. We can't wait until after legalization and do this generically because (at least in the x86
       tests from PR14657), we'll have PACKSS and bitcasts in the pattern.
    2. This might benefit more of the SSE codegen if we lifted the legal-or-custom requirement, but
       that requires a closer look to make sure we don't end up worse.
    3. There's a 'vblendv' opportunity that we're missing that results in andn/and/or in some cases.
       That should be fixed next.
    4. I'm assuming that AVX1 offers the worst of all worlds wrt uneven ISA support with multiple
       legal vector sizes, but if there are other targets like that, we should add more tests.
    5. There's a codegen miracle in the multi-BB tests from PR14657 (the gcc auto-vectorization tests):
       despite IR that is terrible for the target, this patch allows us to generate the optimal loop
       code because something post-ISEL is hoisting the splat extends above the vector loops.

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

r301780 (#5622) (Apr 30, 2017 3:10:35 PM)

  1. [clang-tidy] Fix naming convention in modernize-use-emplace

    Summary: Conform to the llvm naming convention for local variables in modernize-use-emplace check.

    Reviewers: Prazek, JonasToth, alexfh

    Reviewed By: Prazek, JonasToth, alexfh

    Subscribers: cfe-commits

    Tags: #clang-tools-extra

    Differential Revision: https://reviews.llvm.org/D32678 — kuhar / ViewSVN
  2. [CMake] Move PollyCore to Polly project folder.

    This keeps the artifacts consistently structured in the "Polly"
    folder of Visual Studio solutions. — meinersbur / ViewSVN
  3. Fix comments. — ruiu / ViewSVN

r301777 (#5621) (Apr 30, 2017 2:20:04 PM)

  1. [tsan] Track external tags in thread traces

    To make the TSan external API work with Swift and other use cases, we need to track "tags" for individual memory accesses. Since there is no space to store this information in shadow cells, let's use the thread traces for that. This patch stores the tag as an extra frame in the stack traces (by calling FuncEntry and FuncExit with the address of a registered tag), this extra frame is then stripped before printing the backtrace to stderr.

    Differential Revision: https://reviews.llvm.org/D32382 — kuba.brecka / ViewSVN

r301776 (#5620) (Apr 30, 2017 1:29:43 PM)

  1. Rename isKnownNotFullPoison to programUndefinedIfPoison; NFC

    programUndefinedIfPoison makes more sense, given what the function
    does; and I'm about to add a function with a name similar to
    isKnownNotFullPoison (so do the rename to avoid confusion).

    Reviewers: broune, majnemer, bjarke.roune

    Reviewed By: broune

    Subscribers: mcrosier, llvm-commits, mzolotukhin

    Differential Revision: https://reviews.llvm.org/D30444 — sanjoy / ViewSVN
  2. Do not legalize large add with addc/adde, introduce addcarry and do it with uaddo/addcarry

    Summary: As per discution on how to get better codegen an large int legalization, it became clear that using a glue for the carry was preventing several desirable optimizations. Passing the carry down as a value allow for more flexibility.

    Reviewers: jyknight, nemanjai, mkuper, spatel, RKSimon, zvi, bkramer

    Subscribers: igorb, llvm-commits

    Differential Revision: https://reviews.llvm.org/D29872 — deadalnix / ViewSVN

r301774 (#5619) (Apr 30, 2017 12:39:29 PM)

  1. [InstCombine] consolidate tests for DeMorgan folds; NFC

    I'm proposing to add tests and change behavior in D32665. — spatel / ViewSVN

r301773 (#5618) (Apr 30, 2017 11:04:37 AM)

  1. [docs] Simplify some language for Error/cantFail in the programmer's manual. — Lang Hames / ViewSVN

r301772 (#5617) (Apr 30, 2017 7:50:16 AM)

  1. Ignore -no-keep-memory.

    When the -no-keep-memory option is given, BFD linker tries to save
    memory in their own way. Since our internal architecture is completely
    different from that linker, that option doesn't make sense to us. — ruiu / ViewSVN
  2. Move LTO options above "all options beyond this are ignored" comment — ruiu / ViewSVN

r301770 (#5616) (Apr 30, 2017 6:29:41 AM)

  1. [MVT] fix typo in size of v1i8 MVT.

    Ths issue was found in the review of another patch https://reviews.llvm.org/D32540 — guyblank / ViewSVN

r301769 (#5615) (Apr 30, 2017 1:55:24 AM)

  1. [APInt] Remove support for wrapping from APInt::setBits.

    This features isn't used anywhere in tree. It's existence seems to be preventing selfhost builds from inlining any of the setBits methods including setLowBits, setHighBits, and setBitsFrom. This is because the code makes the method recursive.

    If anyone needs this feature in the future we could consider adding a setBitsWithWrap method. This way only the calls that need it would pay for it. — ctopper / ViewSVN
  2. [APInt] Replace calls to setBits with more specific calls to setBitsFrom and setLowBits where possible. — ctopper / ViewSVN
  3. [X86] Clear KnownBits instead of reconstructing it. NFC — ctopper / ViewSVN

r301766 (#5614) (Apr 30, 2017 1:05:09 AM)

  1. InstructionSimplify: Canonicalize shuffle operands. NFC-ish.

    Apply canonicalization rules:
        1. Input vectors with no elements selected from can be replaced with undef.
        2. If only one input vector is constant it shall be the second one.

    This allows constant-folding to cover more ad-hoc simplifications that
    were in place and avoid duplication for RHS and LHS checks.

    There are more rules we may want to add in the future when we see a
    justification. e.g. mask elements that select undef elements can be
    replaced with undef.

    Reviewers: spatel, RKSimon, andreadb, davide

    Reviewed By: spatel, RKSimon

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D32338 — zvi / ViewSVN
  2. InstructionSimplify: One getShuffleMask() replacing multiple getMaskValue(). NFC.

    Summary: This is a preparatory step for D32338.

    Reviewers: RKSimon, spatel

    Reviewed By: RKSimon, spatel

    Subscribers: spatel, llvm-commits

    Differential Revision: https://reviews.llvm.org/D32388 — zvi / ViewSVN

r301764 (#5613) (Apr 29, 2017 11:44:36 PM)

  1. InstructionSimplify: Simplify a shuffle with a undef mask to undef

    Following the discussion in pr32486, adding the simplification:
    shuffle %x, %y, undef -> undef

    Reviewers: spatel, RKSimon, andreadb, davide

    Reviewed By: spatel

    Subscribers: jroelofs, davide, llvm-commits

    Differential Revision: https://reviews.llvm.org/D32293 — zvi / ViewSVN

r301763 (#5612) (Apr 29, 2017 10:09:27 PM)

  1. [mips] Emit R_MICROMIPS_TLS_GOTTPREL relocation for %gottprel in case of microMIPS

    In case of microMIPS mode %gottprel operator should emit microMIPS

    Differential Revision: http://reviews.llvm.org/D32617 — atanasyan / ViewSVN

r301762 (#5611) (Apr 29, 2017 9:04:49 PM)

  1. clang-tools-extra/test/CMakeLists.txt: Rework r297806 (D29851) to make sure test utils should be built.

    FIXME: This may be moved to llvm's add_lit_target(). — chapuni / ViewSVN

r301761 (#5610) (Apr 29, 2017 7:42:47 PM)

  1. [ConstantRange] Fix a couple cases where we were possibly throwing away an APInt allocation we could reuse. NFC

    This uses setAllBits to replace getMaxValue and operator=(uint64_t) instead of constructing an APInt from uint64_t. — ctopper / ViewSVN

r301760 (#5609) (Apr 29, 2017 6:20:43 PM)

  1. Include <cstdio> in PrettyStackTrace.cpp, since it uses vsnprintf(3). — dim / ViewSVN

r301759 (#5608) (Apr 29, 2017 5:26:10 PM)

  1. Rename RPath Rpath for consistency. NFC.

    For an option -foo-bar-baz, we have Config->FooBarBaz. Since -rpath is
    -rpath and not -r-path, it should be Config->Rpath instead Config->RPath. — ruiu / ViewSVN

r301758 (#5607) (Apr 29, 2017 4:34:53 PM)

  1. Simplify by using getString instead of getLastArg. NFC. — ruiu / ViewSVN
  2. Report an error if --compress-debug-sections is given while zlib is not availble. — ruiu / ViewSVN

r301756 (#5606) (Apr 29, 2017 1:43:09 PM)

  1. [globalisel][tablegen] Fix the test after silencing the unused variable warning in r301755. — dsanders / ViewSVN
  2. [globalisel][tablegen] Silence unused variable warning. — dsanders / ViewSVN
  3. Port recent changes to ELF/MapFile.cpp to COFF. — ruiu / ViewSVN

r301753 (#5605) (Apr 29, 2017 12:11:17 PM)

  1. [ConstantRange] Use APInt::getOneBitSet to shorten some code. NFC — ctopper / ViewSVN
  2. [ConstantRange] Replace getMaxValue+zext with getLowBitsSet. Replace zero-init+setBit with getOneBitSet. NFC — ctopper / ViewSVN
  3. [ConstantRange] Use APInt::operator-= to remove temporary APInts. — ctopper / ViewSVN

r301750 (#5604) (Apr 29, 2017 11:21:04 AM)

  1. [globalisel][tablegen] Compute available feature bits correctly.

    Predicate<> now has a field to indicate how often it must be recomputed.
    Currently, there are two frequencies, per-module (RecomputePerFunction==0)
    and per-function (RecomputePerFunction==1). Per-function predicates are
    currently recomputed more frequently than necessary since the only predicate
    in this category is cheap to test. Per-module predicates are now computed in
    getSubtargetImpl() while per-function predicates are computed in selectImpl().

    Tablegen now manages the PredicateBitset internally. It should only be
    necessary to add the required includes.

    Also fixed a problem revealed by the test case where
    constrainSelectedInstRegOperands() would attempt to tie operands that
    BuildMI had already tied.

    Reviewers: ab, qcolombet, t.p.northover, rovka, aditya_nandakumar

    Reviewed By: rovka

    Subscribers: kristof.beyls, igorb, llvm-commits

    Differential Revision: https://reviews.llvm.org/D32491 — dsanders / ViewSVN
  2. [X86][AVX] Added support for _mm256_zext* helper intrinsics (PR32839) — rksimon / ViewSVN
  3. [X86][AVX] Added codegen tests for _mm256_zext* helper intrinsics (PR32839)

    Not great codegen, especially as VEX moves support implicit zeroing of upper bits.... — rksimon / ViewSVN

r301747 (#5603) (Apr 29, 2017 10:31:15 AM)

  1. [KnownBits] Add methods for determining if the known bits represent a negative/nonnegative number and add methods for changing the negative/nonnegative state

    Summary: This patch adds isNegative, isNonNegative for querying whether the sign bit is known. It also adds makeNegative and makeNonNegative for controlling the sign bit.

    Reviewers: RKSimon, spatel, davide

    Reviewed By: RKSimon

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D32651 — ctopper / ViewSVN
  2. [mips][FastISel] Fix a nullptr deference.

    r301392 introduced a potential nullptr deference causing compilation
    failures. — sdardis / ViewSVN

r301745 (#5602) (Apr 29, 2017 9:30:51 AM)

  1. Bring back r301678.

    This version uses a set to speed up the synchronize method.

    Original message:

        Remove LinkerScript::flush.

        This patch replaces flush with a last ditch attempt at synchronizing
        the section list with the linker script "AST".

        The synchronization is a bit of a hack and should in time be avoided
        by creating the AST earlier so that modifications can be made directly
        to it instead of modifying the section list and synchronizing it back.

        This is the main step for fixing
        https://bugs.llvm.org/show_bug.cgi?id=32816. With this in place I
        think the only missing thing would be to have processCommands assign
        section indexes as dummy offsets so that the sort in
        OutputSection::finalize works.

        With this LinkerScript::assignAddresses becomes much simpler, which
        should help with the thunk work. — rafael / ViewSVN

r301744 (#5601) (Apr 29, 2017 8:09:36 AM)

  1. [X86][SSE] Add initial <2 x half> tests for PR31088

    As discussed on D32391, test X86/X64 SSE2 and X64 F16C. — rksimon / ViewSVN

r301743 (#5600) (Apr 29, 2017 5:44:33 AM)

  1. [clang-tidy] Expand AllowConditional*Casts to binary logical operators — alexfh / ViewSVN

r301742 (#5599) (Apr 29, 2017 3:14:48 AM)

  1. Remove Sema::CheckForIntOverflow, and instead check all full-expressions.

    CheckForIntOverflow used to implement a whitelist of top-level expressions to
    send to the constant expression evaluator, which handled many more expressions
    than the CheckForIntOverflow whitelist did. — nicholas / ViewSVN

r301741 (#5598) (Apr 29, 2017 1:21:02 AM)

  1. [ConstantRange] Use ternary operator instead of 'if' to avoid copying an APInt and then possibly copying over it. — ctopper / ViewSVN
  2. [ConstantRange] Add std::move to a bunch of places that pass local APInts to ConstantRange constructor.

    The ConstantRange constructor takes APInt by value so without these moves we are making copies. — ctopper / ViewSVN

r301739 (#5597) (Apr 29, 2017 12:30:58 AM)

  1. Update sponsor — tbrethou / ViewSVN

r301738 (#5596) (Apr 28, 2017 11:40:04 PM)

  1. Remove unused private field. — zturner / ViewSVN
  2. [ConstantRange] Remove a temporary APInt I meant to delete in r300621. NFC — ctopper / ViewSVN

r301736 (#5595) (Apr 28, 2017 10:49:25 PM)

  1. [ConstantRange] Improve the efficiency of one of the ConstantRange constructors.

    We were default constructing the Lower/Upper APInts. Then creating min or max value, then doing a move assignment to Lower and copy assignment to upper. The copy assignment operator in particular has an out of line function call that has to examine whether or not a previous allocation exists that can be reused which of course it can't in this case.

    The new code creates the min/max value first, move constructs Lower from it then copy constructs Upper from Lower.

    This also seems to have convinced a self host build that this constructor can be inlined more readily into other methods in ConstantRange. — ctopper / ViewSVN

r301735 (#5594) (Apr 28, 2017 9:46:14 PM)

  1. Fix PR32831: 'this capture while instantiating generic lambda call operator specialization

    When computing the appropriate cv-qualifiers for the 'this' capture, we have to examine each enclosing lambda - but when using the FunctionScopeInfo stack we have to ensure that the lambda below (outer) is the decl-context of the closure-class of the current lambda.

    https://bugs.llvm.org/show_bug.cgi?id=32831 — faisalv / ViewSVN
  2. [Polly] Make PollyCore depends on intrinsics_gen — ether / ViewSVN

r301733 (#5593) (Apr 28, 2017 8:54:22 PM)

  1. Remove the source code as well if a clean build is requested by a property; make sure LIT is in the verbose mode by default. — gkistanova / ViewSVN

r301732 (#5592) (Apr 28, 2017 7:51:22 PM)

  1. Remove some apparently-unnecessary 'REQUIRES: system-darwin' from tests.

    Let's see if any buildbots actually have trouble with these. (They at least pass on Linux.) — rsmith / ViewSVN
  2. Fix "REQUIRES: system-darwin" failing tests after r301725.

    Also remove the apparently-unneeded REQUIRES (the tests also pass on at least
    Linux, and don't appear to have anything Darwin-specific in them). — rsmith / ViewSVN
  3. AMDGPU: Fix copies from physical registers in SIFixSGPRCopies

    This would assert when there were multiple defs of
    a physical register.

    We just need to move all of the users of it. — arsenm / ViewSVN
  4. [ELF] When a rel points to a SHF_MERGE section, don't merge the sec.

    Fixes PR32785. Thanks to Piotr Padlewski for the report and
    Rafael for the fix. — davide / ViewSVN

r301728 (#5591) (Apr 28, 2017 7:01:30 PM)

  1. [llvm-pdbdump] Abstract some of the YAML/Raw printing code.

    There is a lot of duplicate code for printing line info between
    YAML and the raw output printer.  This introduces a base class
    that can be shared between the two, and makes some minor
    cleanups in the process. — zturner / ViewSVN
  2. PR26771: don't forget the " 2" (returning from #included file) linemarker after including an empty file with -frewrite-includes. — rsmith / ViewSVN
  3. Remove unused, empty test directories. — rsmith / ViewSVN
  4. Add pragma to perform module import and use it in -E output.

    Many of our supported configurations support modules but do not have any
    first-class syntax to perform a module import. This leaves us with a problem:
    there is no way to represent the expansion of a #include that imports a module
    in the -E output for such languages. (We don't want to just leave it as a
    #include because that requires the consumer of the preprocessed source to have
    the same file system layout and include paths as the creator.)

    This patch adds a new pragma:

      #pragma clang module import MODULE.NAME.HERE

    that imports a module, and changes -E and -frewrite-includes to use it when
    rewriting a #include that maps to a module import. We don't make any attempt
    to use a native language syntax import if one exists, to get more consistent
    output. (If in the future, @import and #include have different semantics in
    some way, the pragma will track the #include semantics.) — rsmith / ViewSVN
  5. [ObjCARC] Do not move a release between a call and a
    retainAutoreleasedReturnValue that retains the returned value.

    This commit fixes a bug in ARC optimizer where it moves a release
    between a call and a retainAutoreleasedReturnValue, causing the returned
    object to be released before the retainAutoreleasedReturnValue can
    retain it.

    This commit accomplishes that by doing a lookahead and checking whether
    the call prevents the release from moving upwards. In the long term, we
    should treat the region between the retainAutoreleasedReturnValue and
    the call as a critical section and disallow moving anything there
    (possibly using operand bundles).

    rdar://problem/20449878 — ahatanak / ViewSVN
  6. [LoopUnswitch] Make DEBUG output more readable (part 2).

    I fixed my miscompile in r301722 and I hope I don't have to take
    a look at this code again now that Chandler has a new LoopUnswitch
    pass, but maybe this could be of use for somebody else in the
    meanwhile. — davide / ViewSVN

r301722 (#5590) (Apr 28, 2017 6:11:50 PM)

  1. [LoopUnswitch] Don't remove instructions with side effects.

    This fixes PR32818.

    Differential Revision:  https://reviews.llvm.org/D32664 — davide / ViewSVN
  2. ObjCBoxedExpr can't be evaluated by the constant expression evaluator.

    A boxed expression evaluates its subexpr and then calls an objc method to transform it into another value with pointer type. The objc method can never be constexpr and therefore this expression can never be evaluated. Fixes a miscompile boxing expressions with side-effects.

    Also make ObjCBoxedExpr handling a normal part of the expression evaluator instead of being the only case besides full-expression where we check for integer overflow. — nicholas / ViewSVN
  3. [llvm-readobj] Fix incorrect printing of CV column info. — zturner / ViewSVN
  4. Fuzzer: Mark test/cxxstring.test UNSUPPORTED: windows

    This has been mysteriously failing since r301593, which cleaned up the
    types of things like size_t and SIZE_MAX for freestanding targets.  Reid
    and Kostya suggested marking it as UNSUPPORTED on windows, given that no
    one has been able to reproduce locally. — Duncan P. N. Exon Smith / ViewSVN
  5. [llvm-readobj] Use LLVMDebugInfoCodeView to parse line tables.

    The llvm-readobj parsing code currently exists in our CodeView
    library, so we use that to parse instead of re-writing the logic
    in the tool. — zturner / ViewSVN
  6. Win snapshot: r301646. — hans / ViewSVN
  7. [Support] Provide unsafe random access for VarStreamArray. — zturner / ViewSVN
  8. Replace PrettyPrinter class in MapFile.cpp with a few non-member functions.

    Since the output format has been simplified, the class to print
    out a map file doesn't seem to be needed anymore. We can replace
    it with a few non-member functions. — ruiu / ViewSVN

r301714 (#5589) (Apr 28, 2017 5:21:34 PM)

  1. [InstCombine] add tests to show potentially bogus application of DeMorgan (NFC) — spatel / ViewSVN
  2. Remove set but unused variable in BitcodeReader.cpp. NFC. — hans / ViewSVN
  3. Revert r301697 "[IR] Make add/remove Attributes use AttrBuilder instead of AttributeList"

    This broke the Clang build. (Clang-side patch missing?)

    Original commit message:

    > [IR] Make add/remove Attributes use AttrBuilder instead of
    > AttributeList
    > This change cleans up call sites and avoids creating temporary
    > AttributeList objects.
    > NFC — hans / ViewSVN
  4. InferAddressSpaces: Search constant expressions for addrspacecasts

    These are pretty common when using local memory, and the 64-bit generic
    addressing is much more expensive to compute. — arsenm / ViewSVN
  5. Eliminate .debug_gnu_pub{names,types} if -gdb-index is given.

    This patch is to ignore .debug_gnu_pub{names,types} sections if the
    -gdb-index option was given.

    Differential Revision: https://reviews.llvm.org/D32662 — ruiu / ViewSVN
  6. Revert r301678: Remove LinkerScript::flush.

    This reverts commit r301678 since that change significantly slowed
    down the linker. Before this patch, LLD could link clang in 8 seconds,
    but with this patch it took 40 seconds. — ruiu / ViewSVN
  7. Added new slave for builder clang-lld-x86_64-2stage. — gkistanova / ViewSVN
  8. Adapt to LLVM API change (DINamespace no longer takes line/file info).

    https://reviews.llvm.org/D32648 — Adrian Prantl / ViewSVN
  9. Remove line and file from DINamespace.

    Fixes the issue highlighted in

    The DW_AT_decl_file and DW_AT_decl_line attributes on namespaces can
    prevent LLVM from uniquing types that are in the same namespace. They
    also don't carry any meaningful information.

    Differential Revision: https://reviews.llvm.org/D32648 — Adrian Prantl / ViewSVN
  10. InferAddressSpaces: Avoid looking up deleted values

    While looking at pure addressing expressions, it's possible
    for the value to appear later in Postorder.

    I haven't been able to come up with a testcase where this
    exhibits an actual issue, but if you insert a dump before
    the value map lookup, a few testcases crash. — arsenm / ViewSVN
  11. InferAddressSpaces: Infer from just addrspacecasts

    Eliminates some more cases where some subset of the addressing
    computation remains flat. Some cases with addrspacecasts
    in nested constant expressions are still left behind however. — arsenm / ViewSVN
  12. [SCEV] Use early exit in createAddRecFromPHI. NFC. — Michael Zolotukhin / ViewSVN
  13. LoopRotate: Fix use after scope bug — dannyb / ViewSVN
  14. [ODRHash] Add testcase with different paramter names.  NFC — rtrieu / ViewSVN
  15. [RDF] Correctly calculate lane masks for defs — kparzysz / ViewSVN
  16. Properly handle PHIs with subregisters in UnreachableBlockElim

    When a PHI operand has a subregister, create a COPY instead of simply
    replacing the PHI output with the input it.

    Differential Revision: https://reviews.llvm.org/D32650 — kparzysz / ViewSVN
  17. [Hexagon] Do not move a block if it is on a fall-through path — kparzysz / ViewSVN
  18. [IR] Make add/remove Attributes use AttrBuilder instead of AttributeList

    This change cleans up call sites and avoids creating temporary
    AttributeList objects.

    NFC — rnk / ViewSVN
  19. [ConstantRange] Use APInt::isNullValue rather than APInt::isMinValue where it would make more sense to thing of 0 as 0 rather than the minimum unsigned value. NFC — ctopper / ViewSVN
  20. [APInt] Add an isNullValue method to check for all bits being zero. Use it in a couple internal methods where it makes more sense than isMinValue or !getBoolValue. NFC

    I used Null rather than Zero to match the getNullValue method name.

    There are some other places outside APInt where isNullValue would be more readable than isMinValue even though they do the same thing. I'll update those in future patches. — ctopper / ViewSVN
  21. [ConstantRange] Use const references to prevent a couple APInt copies. NFC — ctopper / ViewSVN

r301693 (#5588) (Apr 28, 2017 4:29:22 PM)

  1. Flush output in log()

    This change was motivated by output from lld-link.exe and link.exe
    getting intermixed. There's already a flush() call in message(), so
    there's precedence. — hans / ViewSVN
  2. [LoopUnswitch] Make DEBUG output more readable.

    While debugging a miscompile I realized loopunswitch doesn't
    put newlines when printing the instruction being replacement.
    Ending up with a single line with many instruction replaced isn't
    the best for readability and/or mental sanity. — davide / ViewSVN
  3. Rename one of the variables to avoid confusion. — rafael / ViewSVN
  4. [WebAssembly] Add size of section header to data relocation offsets.

    Also, add test for data relocations and fix addend to
    be signed.

    Subscribers: jfb, dschuff

    Differential Revision: https://reviews.llvm.org/D32513 — sbc / ViewSVN

r301689 (#5587) (Apr 28, 2017 3:29:27 PM)

  1. [tests] Ensure all test cases use named variables

    This makes it easier to read and possibly even modify the test cases, as there
    is no need to keep the variable increment in steps of one. More importantly, by
    using explicit variable names we do not need to rely on the implicit numbering
    of statements when dumping the scop information.

    This makes it easier to read and possibly even modify the test cases.
    Furthermore, by using explicit variables we do not need to rely on the implicit
    numbering of statements when dumping the scop information. In a future commit,
    this implicit numbering will likely not be used any more to refer to LLVM-IR
    values as it is very expensive to construct. — grosser / ViewSVN
  2. [ValueTracking] Teach isSafeToSpeculativelyExecute() about the speculatable attribute

    Patch by Tom Stellard — arsenm / ViewSVN
  3. [WebAssembly] Write initial memory in pages not bytes

    Subscribers: jfb, dschuff

    Differential Revision: https://reviews.llvm.org/D32660 — sbc / ViewSVN
  4. Public headers need to be public. — penryu / ViewSVN
  5. TableGen: Add IntrHasSideEffects property for intrinsics

    The IntrNoMem, IntrReadMem, IntrWriteMem, and IntrArgMemOnly intrinsic
    properties differ from their corresponding LLVM IR attributes by specifying
    that the intrinsic, in addition to its memory properties, has no other side

    The IntrHasSideEffects flag used in combination with one of the memory flags
    listed above, makes it possible to define an intrinsic such that its
    properties at the CodeGen layer match its properties at the IR layer.

    Patch by Tom Stellard — arsenm / ViewSVN
  6. Enable -fno-split-dwarf-inlining even when -gsplit-dwarf isn't specified.

    Since -gsplit-dwarf is specified on a backend compile (in ThinLTO
    parlance) it isn't passed during the frontend compile (because no ELF
    object/dwo file is produced then), yet the -fno-split-dwarf-inlining
    value needs to be encoded in the LLVM DebugInfo metadata to have

    So let it be specified & it'll be silently ignored if -gsplit-dwarf
    isn't used in the end, otherwise it'll be used on a per-cu basis
    depending on where it's specified in the frontend compile actions. — dblaikie / ViewSVN
  7. Change the format of the map file.

    Previously, we printed out input sections and input files in
    separate columns as shown below.

      Address          Size             Align Out     In      File    Symbol
      0000000000201000 0000000000000015     4 .text
      0000000000201000 000000000000000e     4         .text
      0000000000201000 000000000000000e     4                 foo.o
      0000000000201000 0000000000000000     0                         _start
      0000000000201005 0000000000000000     0                         f(int)
      000000000020100e 0000000000000000     0                         local
      0000000000201010 0000000000000002     4                 bar.o
      0000000000201010 0000000000000000     0                         foo
      0000000000201011 0000000000000000     0                         bar

    This format doesn't make much sense because for each input section,
    there's always exactly one input file. This patch changes the format
    to this.

      Address          Size             Align Out     In      Symbol
      0000000000201000 0000000000000015     4 .text
      0000000000201000 000000000000000e     4         foo.o:(.text)
      0000000000201000 0000000000000000     0                 _start
      0000000000201005 0000000000000000     0                 f(int)
      000000000020100e 0000000000000000     0                 local
      0000000000201010 0000000000000002     4         bar.o:(.text)
      0000000000201010 0000000000000000     0                 foo
      0000000000201011 0000000000000000     0                 bar

    Differential Revision: https://reviews.llvm.org/D32657 — ruiu / ViewSVN
  8. Make getParamAlignment use argument numbers

    The method is called "get *Param* Alignment", and is only used for
    return values exactly once, so it should take argument indices, not
    attribute indices.

    Avoids confusing code like:
      IsSwiftError = CS->paramHasAttr(ArgIdx, Attribute::SwiftError);
      Alignment  = CS->getParamAlignment(ArgIdx + 1);

    Add getRetAlignment to handle the one case in Value.cpp that wants the
    return value alignment.

    This is a potentially breaking change for out-of-tree backends that do
    their own call lowering. — rnk / ViewSVN
  9. GlobalISel: Followup for r301679 — matze / ViewSVN
  10. Add speculatable function attribute

    This attribute tells the optimizer that the function may be speculated.

    Patch by Tom Stellard — arsenm / ViewSVN
  11. TargetLowering: Add finalizeLowering() function; NFC

    Adds a new method finalizeLowering to TargetLoweringBase. This is in
    preparation for an upcoming commit.

    This function is meant for target specific adjustments to
    MachineFrameInfo or register reservations.

    Move the freezeRegisters() and the hasCopyImplyingStackAdjustment()
    handling into the new function to prove the concept. As an added bonus
    GlobalISel no longer missed the hasCopyImplyingStackAdjustment()
    handling with this.

    Differential Revision: https://reviews.llvm.org/D32621 — matze / ViewSVN
  12. Remove LinkerScript::flush.

    This patch replaces flush with a last ditch attempt at synchronizing
    the section list with the linker script "AST".

    The synchronization is a bit of a hack and should in time be avoided
    by creating the AST earlier so that modifications can be made directly
    to it instead of modifying the section list and synchronizing it back.

    This is the main step for fixing
    https://bugs.llvm.org/show_bug.cgi?id=32816. With this in place I
    think the only missing thing would be to have processCommands assign
    section indexes as dummy offsets so that the sort in
    OutputSection::finalize works.

    With this LinkerScript::assignAddresses becomes much simpler, which
    should help with the thunk work. — rafael / ViewSVN

r301677 (#5586) (Apr 28, 2017 2:36:32 PM)

  1. AMDGPU: Add new amdgcn.init.exec intrinsics

    v2: More tests, bug fixes, cosmetic changes.

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

    Differential Revision: https://reviews.llvm.org/D31762 — mareko / ViewSVN
  2. limit to 2 parallel links when using thinlto

    When using ThinLTO, the linker performs its own parallelism. This
    change limits the number of parallel link jobs that Ninja will issue
    to keep the total number of threads reasonable when linking with

    Reviewers: hans, ruiu

    Subscribers: mgorny, mehdi_amini, Prazek

    Differential Revision: https://reviews.llvm.org/D31990 — inglorion / ViewSVN
  3. Added support for the 'clean' property. — gkistanova / ViewSVN
  4. Use toString(Inputfile*) to format a file object. — ruiu / ViewSVN
  5. Kill off the old SimplifyInstruction API by converting remaining users. — dannyb / ViewSVN
  6. [IPO/MergeFunctions] This function is used only under DEBUG(). — davide / ViewSVN

r301671 (#5585) (Apr 28, 2017 1:39:17 PM)

  1. [RS4GC] Simplify attribute handling code NFC

    Avoids use of AttributeList::getNumSlots, making it easier to change the
    underlying implementation. — rnk / ViewSVN
  2. [Codegen] Disable Polly's codegen verification by default

    As has been reported in the previous commit, codegen verification can result in
    quadratic compile time increases for large functions with many scops. This is
    certainly not something we would like to have in the Polly default
    configuration. Hence, we disable codegen verification by default -- also to see
    if this resolves some of the compilation timeouts we currently see on the AOSP
    buildbots. We still leave this feature in Polly as it has shown _very_ useful
    for debugging. In fact, we may want to have a discussion if we can bring this
    feature back in a way that does not impact compilation time so much.

    Thanks to Eli Friedman <efriedma@codeaurora.org> for reporting this issue and
    for providing the test case in the previous commit (where I forgot to
    acknowledge him). — grosser / ViewSVN
  3. [CodeGen] Skip verify if -polly-codegen-verify is set to false

    Before this change, we always tried to verify the function and printed
    verification errors, but just did not abort in case -polly-codegen-verify=false
    was set and verification failed. As verification can become very cosly -- for
    large functions with many scops we may verify the very same function very often
    -- this can affect compile time very negatively. Hence, we respect the
    -polly-codegen-verify flag with this check, ensuring that no verification is run
    if -polly-codegen-verify=false.

    This reduces code generation time from 26 seconds to 4 seconds on the test
    case below with -polly-codegen-verify=false:

      struct X { int x; };
      void a();
      #define SIG (int x, X **y, X **z)
      typedef void (*fn)SIG;
      #define FN { for (int i = 0; i < x; ++i) { (*y)[i].x += (*z)[i].x; } a(); }
      #define FN5 FN FN FN FN FN
      #define FN25 FN5 FN5 FN5 FN5
      #define FN125 FN25 FN25 FN25 FN25 FN25
      #define FN250 FN125 FN125
      #define FN1250 FN250 FN250 FN250 FN250 FN250
      void x SIG { FN1250 } — grosser / ViewSVN

r301668 (#5584) (Apr 28, 2017 12:41:45 PM)

  1. Remove trailing whitespace from the -Map output.

    If a string is shorter than 7 characters, we used to print out
    trailing whitespace characters. — ruiu / ViewSVN
  2. [CodeGen][ObjC] Don't retain captured Objective-C pointers at block
    creation that are const-qualified.

    When a block captures an ObjC object pointer, clang retains the pointer
    to prevent prematurely destroying the object the pointer points to
    before the block is called or copied.

    When the captured object pointer is const-qualified, we can avoid
    emitting the retain/release pair since the pointer variable cannot be
    modified in the scope in which the block literal is introduced.

    For example:

    void test(const id x) {
        callee(^{ (void)x; });

    This patch implements that optimization.


    Differential Revision: https://reviews.llvm.org/D32601 — ahatanak / ViewSVN
  3. Use Argument::hasAttribute and AttributeList::ReturnIndex more

    This eliminates many extra 'Idx' induction variables in loops over
    arguments in CodeGen/ and Target/. It also reduces the number of places
    where we assume that ReturnIndex is 0 and that we should add one to
    argument numbers to get the corresponding attribute list index.

    NFC — rnk / ViewSVN
  4. Cleanup: Use DIExpression::prepend in buildDbgValueForSpill(). (NFC) — Adrian Prantl / ViewSVN
  5. Add remaining SBTrace headers to LLDB framework — penryu / ViewSVN

r301663 (#5583) (Apr 28, 2017 11:51:08 AM)

  1. [IR] Delete unused Argument::removeAttr overload

    It doesn't make sense to remove an AttributeList from an argument. — rnk / ViewSVN
  2. Clean up DIExpression::prependDIExpr a little. (NFC) — Adrian Prantl / ViewSVN
  3. Remove a redundant local variable. — ruiu / ViewSVN
  4. Bitcode: Do not remove empty summary entries when reading a per-module summary.

    This became no longer necessary after D19462 landed, and will be incompatible
    with an upcoming change to the summary data structures that changes how we
    represent references. — pcc / ViewSVN
  5. Speed up the -Map option.

    We found that some part of code for the -Map option takes O(m*n)
    where m is the number of input sections in some file and n is
    the number of symbols in the same file. If you do LTO, we usually
    have only a few object files as inputs for the -Map option
    feature, so this performance characteristic was worse than I

    This patch rewrites the -Map option feature to speed it up.
    I eliminated the O(m*n) bottleneck and also used multi-threading.

    As a result, clang link time with the -Map option improved from
    18.7 seconds to 11.2 seconds. Without -Map, it takes 7.7 seconds,
    so the -Map option is now about 3x faster than before for this
    test case (from 11.0 seconds to 3.5 seconds.) The generated output
    file size was 223 MiB, and the file contains 1.2M lines.

    Differential Revision: https://reviews.llvm.org/D32631 — ruiu / ViewSVN
  6. IR: fix some doxygen grammar (NFC)

    Fix a bit of the doxygen grammar that was off that I noticed while
    looking at this file for another issue. — Saleem Abdulrasool / ViewSVN
  7. COFF: actually synthesize CONST imports properly

    CONSTANT imports expect both the `_imp_` prefixed and non-prefixed
    symbols should be added to the symbol table.  This allows for linking
    symbols like _NSConcreteGlobalBlock in WinObjC.  The previous change
    would generate the import library properly by handling the option but
    would not consume the generated entry properly. — Saleem Abdulrasool / ViewSVN
  8. [APInt] Add clearSignBit method. Use it and setSignBit in a few places. NFCI — ctopper / ViewSVN
  9. [LazyValueInfo] Fix typo in comment. NFC — ctopper / ViewSVN
  10. [ValueTracking] Use APInt::isSubsetOf and APInt::intersects. NFC — ctopper / ViewSVN
  11. [bpf] add bigendian support to disassembler

    . swap 4-bit register encoding, 16-bit offset and 32-bit imm to support big endian archs
    . add a test

    Reported-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Alexei Starovoitov <ast@kernel.org> — ast / ViewSVN
  12. [DOXYGEN] Minor improvements in doxygen comments.

    - I removed doxygen comments for the intrinsics that "alias" the other existing documented intrinsics and that only sligtly differ in spelling (single underscores vs. double underscores).
    #define _tzcnt_u16(a)     (__tzcnt_u16((a)))

    It will be very hard to keep the documentation for these "aliases" in sync with the documentation for the intrinsics they alias to. Out of sync documentation will be more confusing than no documentation.

    I got an OK from Eric Christopher to commit doxygen comments without prior code
    review upstream. — kromanova / ViewSVN

r301651 (#5582) (Apr 28, 2017 10:31:03 AM)

  1. [clang-tidy] modernize-use-emplace: remove unnecessary make_pair calls

    When there is a push_back with a call to make_pair, turn it into emplace_back and remove the unnecessary make_pair call.


    std::vector<std::pair<int, int>> v;
    v.push_back(std::make_pair(1, 2)); // --> v.emplace_back(1, 2);

    make_pair doesn't get removed when explicit template parameters are provided, because of potential problems with type conversions.

    Reviewers: Prazek, aaron.ballman, hokein, alexfh

    Reviewed By: Prazek, alexfh

    Subscribers: JDevlieghere, JonasToth, cfe-commits

    Tags: #clang-tools-extra

    Differential Revision: https://reviews.llvm.org/D32395 — kuhar / ViewSVN
  2. CMake: ignore git stderr when trying to sort out revision. NFC. — Tim Northover / ViewSVN
  3. [InlineCost] Improve the cost heuristic for Switch

    The motivation example is like below which has 13 cases but only 2 distinct targets

    lor.lhs.false2:                                   ; preds = %if.then
      switch i32 %Status, label %if.then27 [
        i32 -7012, label %if.end35
        i32 -10008, label %if.end35
        i32 -10016, label %if.end35
        i32 15000, label %if.end35
        i32 14013, label %if.end35
        i32 10114, label %if.end35
        i32 10107, label %if.end35
        i32 10105, label %if.end35
        i32 10013, label %if.end35
        i32 10011, label %if.end35
        i32 7008, label %if.end35
        i32 7007, label %if.end35
        i32 5002, label %if.end35
    which is compiled into a balanced binary tree like this on AArch64 (similar on X86)

    .LBB853_9:                              // %lor.lhs.false2
            mov     w8, #10012
            cmp             w19, w8
            b.gt    .LBB853_14
    // BB#10:                               // %lor.lhs.false2
            mov     w8, #5001
            cmp             w19, w8
            b.gt    .LBB853_18
    // BB#11:                               // %lor.lhs.false2
            mov     w8, #-10016
            cmp             w19, w8
            b.eq    .LBB853_23
    // BB#12:                               // %lor.lhs.false2
            mov     w8, #-10008
            cmp             w19, w8
            b.eq    .LBB853_23
    // BB#13:                               // %lor.lhs.false2
            mov     w8, #-7012
            cmp             w19, w8
            b.eq    .LBB853_23
            b       .LBB853_3
    .LBB853_14:                             // %lor.lhs.false2
            mov     w8, #14012
            cmp             w19, w8
            b.gt    .LBB853_21
    // BB#15:                               // %lor.lhs.false2
            mov     w8, #-10105
            add             w8, w19, w8
            cmp             w8, #9          // =9
            b.hi    .LBB853_17
    // BB#16:                               // %lor.lhs.false2
            orr     w9, wzr, #0x1
            lsl     w8, w9, w8
            mov     w9, #517
            and             w8, w8, w9
            cbnz    w8, .LBB853_23
    .LBB853_17:                             // %lor.lhs.false2
            mov     w8, #10013
            cmp             w19, w8
            b.eq    .LBB853_23
            b       .LBB853_3
    .LBB853_18:                             // %lor.lhs.false2
            mov     w8, #-7007
            add             w8, w19, w8
            cmp             w8, #2          // =2
            b.lo    .LBB853_23
    // BB#19:                               // %lor.lhs.false2
            mov     w8, #5002
            cmp             w19, w8
            b.eq    .LBB853_23
    // BB#20:                               // %lor.lhs.false2
            mov     w8, #10011
            cmp             w19, w8
            b.eq    .LBB853_23
            b       .LBB853_3
    .LBB853_21:                             // %lor.lhs.false2
            mov     w8, #14013
            cmp             w19, w8
            b.eq    .LBB853_23
    // BB#22:                               // %lor.lhs.false2
            mov     w8, #15000
            cmp             w19, w8
            b.ne    .LBB853_3
    However, the inline cost model estimates the cost to be linear with the number
    of distinct targets and the cost of the above switch is just 2 InstrCosts.
    The function containing this switch is then inlined about 900 times.

    This change use the general way of switch lowering for the inline heuristic. It
    etimate the number of case clusters with the suitability check for a jump table
    or bit test. Considering the binary search tree built for the clusters, this
    change modifies the model to be linear with the size of the balanced binary
    tree. The model is off by default for now :

    This change was originally proposed by Haicheng in D29870.

    Reviewers: hans, bmakam, chandlerc, eraman, haicheng, mcrosier

    Reviewed By: hans

    Subscribers: joerg, aemerson, llvm-commits, rengolin

    Differential Revision: https://reviews.llvm.org/D31085 — junbuml / ViewSVN
  4. [libclang] Expose some target information via the C API.

    This allows users to query the target triple and target pointer width, which
    would make me able to fix https://github.com/servo/rust-bindgen/issues/593 and
    other related bugs in an elegant way (without having to manually parse the
    target triple in the command line arguments).

    Differential Revision: https://reviews.llvm.org/D32389 — emilio / ViewSVN

r301647 (#5581) (Apr 28, 2017 9:09:48 AM)

  1. Use the -Wunknown-warning-option group for the "unknown warning group"
    diagnostic in #pragma diagnostic

    This matches the warning group that's specified for the unknown warning options
    that are passed-in as command line arguments.

    rdar://29526025 — arphaman / ViewSVN
  2. Move variable local to where ita used. NFCI. — rksimon / ViewSVN

r301645 (#5580) (Apr 28, 2017 8:17:12 AM)

  1. Memory intrinsic value profile optimization: Avoid divide by 0

    Skip memops if the total value profiled count is 0, we can't correctly
    scale up the counts and there is no point anyway.

    Reviewers: davidxl

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D32624 — tejohnson / ViewSVN
  2. [DAGCombiner] Add ComputeNumSignBits vector demanded elements support to ASHR and INSERT_VECTOR_ELT (reapplied)

    Reapplied r299221 after fix for nondeterminism in ThinLTO builder (rL301599), with extra check for implicit truncation of inserted element. — rksimon / ViewSVN

r301643 (#5579) (Apr 28, 2017 7:24:28 AM)

  1. [Sema] Avoid an invalid redefinition error that was presented for
    of a function whose previous definition was typo-corrected


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

r301642 (#5578) (Apr 28, 2017 6:26:53 AM)

  1. Remove lock from ConstString::GetLength

    Summary: ConstStrings are immutable, so there is no need to grab even a reader lock in order to read the length field.

    Reviewers: #lldb, labath

    Reviewed By: labath

    Subscribers: zturner, labath, lldb-commits

    Differential Revision: https://reviews.llvm.org/D32306
    Patch by Scott Smith <scott.smith@purestorage.com> — labath / ViewSVN
  2. [X86][SSE] Added new tests from D32416 to show codegen delta — rksimon / ViewSVN

r301640 (#5577) (Apr 28, 2017 5:36:47 AM)

  1. [Polly] [PPCGCodeGeneration] Add managed memory support to GPU code

    This needs changes to GPURuntime to expose synchronization between host
    and device.

    1. Needs better function naming, I want a better name than

    2. DeviceAllocations is used by both the managed memory and the
    non-managed memory path. This exploits the fact that the two code paths
    are never run together. I'm not sure if this is the best design decision

    Reviewed by: PhilippSchaad

    Tags: #polly

    Differential Revision: https://reviews.llvm.org/D32215 — bollu / ViewSVN
  2. [X86][SSE] Renames all ones test to better match type.

    Added 8f32/4f64 optsize tests discussed on D32416 — rksimon / ViewSVN

r301638 (#5576) (Apr 28, 2017 4:46:34 AM)

  1. [X86][SSE] Add codegen test for _mm_set_pd1 (PR32827) — rksimon / ViewSVN
  2. [X86][SSE] Add _mm_set_pd1 (PR32827)

    Matches _mm_set_ps1 implementation — rksimon / ViewSVN
  3. Resurrect pselect MainLoop implementation

    It turns out that even though ppoll is available on all the android
    devices we support, it does not seem to be working properly on all of
    them -- MainLoop just does a busy loop with ppoll returning EINTR and
    not making any progress.

    This brings back the pselect implementation and makes it available on
    android. I could not do any cmake checks for this as the ppoll symbol is
    actually avaiable -- it just does not work.

    Reviewers: beanz, eugene

    Subscribers: srhines, lldb-commits

    Differential Revision: https://reviews.llvm.org/D32600 — labath / ViewSVN

r301635 (#5575) (Apr 28, 2017 3:55:19 AM)

  1. [index] Handle vector types in USR generator

    rdar://25339187 — arphaman / ViewSVN
  2. [EuroLLVM] Add slides for one more LT

    On behalf of Johannes Doerfert <johannes@jdoerfert.de> (Fri Apr 28 11:40:34 2017 +0200) — streit / ViewSVN
  3. [ARM] GlobalISel: fixup r301632

    Actually remove ARMInstructionSelector.h... Forgot to stage the removal
    in the previous commit. — rovka / ViewSVN
  4. [ARM] GlobalISel: Get rid of ARMInstructionSelector.h. NFC.

    Declare the ARMInstructionSelector in an anonymous namespace, to make it
    more in line with the other targets which were migrated to this in
    r299637 in order to avoid TableGen'erated headers being included in
    non-GlobalISel builds. — rovka / ViewSVN

r301631 (#5574) (Apr 28, 2017 3:03:47 AM)

  1. [DWARF] - Fix mistype in dump output of pub* tables. NFC.

    There was a garbage character in output introduced by myself in
    r290040 "[DWARF] - Introduce DWARFDebugPubTable class for dumping pub* sections." — grimar / ViewSVN
  2. [DebugInfo][X86] Improve X86 Optimize LEAs handling of debug values.

    This is a follow up to the fix in r298360 to improve the handling of debug
    values when redundant LEAs are removed. The fix in r298360 effectively
    discarded the debug values. This patch now attempts to preserve the debug
    values by using the DWARF DW_OP_stack_value operation via prependDIExpr.

    Moved functions appendOffset and prependDIExpr from Local.cpp to
    DebugInfoMetadata.cpp and made them available as static member functions of

    Differential Revision: https://reviews.llvm.org/D31604 — anng / ViewSVN

r301629 (#5573) (Apr 28, 2017 2:06:34 AM)

  1. [WebAssembly] Update calls to computeKnownBits after the changes from r301620.

    I didn't realize WebAssembly wasn't a default build target so I missed that changes were needed. — ctopper / ViewSVN
  2. [X86][NFC] Refactor RepMovsRepeats in preparation for D32481.

    Differential Revision: https://reviews.llvm.org/D32583 — courbet / ViewSVN
  3. [ARM] GlobalISel: Tighten test. NFC

    Explicitly check types and load sizes in the IRTranslator test. — rovka / ViewSVN