collapse
100%
WDescription%
Test Result: 0 tests failing out of a total of 1,119 tests.100
Build stability: No recent builds failed.100
Build History
x
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Changes

#388 (Aug 14, 2017 8:00:45 AM)

  1. [sanitizers] Add a blocking boolean to GetRandom prototype

    Summary:
    On platforms with `getrandom`, the system call defaults to blocking. This
    becomes an issue in the very early stage of the boot for Scudo, when the RNG
    source is not set-up yet: the syscall will block and we'll stall.

    Introduce a parameter to specify that the function should not block, defaulting
    to blocking as the underlying syscall does.

    Update Scudo to use the non-blocking version.

    Reviewers: alekseyshl

    Reviewed By: alekseyshl

    Subscribers: llvm-commits, kubamracek

    Differential Revision: https://reviews.llvm.org/D36399 — cryptoad / detail
  2. [Parse] Fix typo in header docs (NFC)

    Summary:
    Fix typo "delcarations", added in rL310609 and rL310627. — modocache / detail
  3. Fixes a typo in a comment; NFC. — aaronballman / detail

#387 (Aug 14, 2017 5:53:14 AM)

  1. [llvm-cov] Fix compiler-rt tests failing in build bots after rL310827.

    The compiler-rt tests used llvm-cov with -filename-equivelence, which was
    replaced with the new option -path-equivalence in rL310827. — seaneveson / detail
  2. Reland "[mips][mt][6/7] Add support for mftr, mttr instructions."

    This adjusts the tests to hopfully pacify the llvm-clang-x86_64-expensive-checks-win
    buildbot.

    Unlike many other instructions, these instructions have aliases which
    take coprocessor registers, gpr register, accumulator (and dsp accumulator)
    registers, floating point registers, floating point control registers and
    coprocessor 2 data and control operands.

    For the moment, these aliases are treated as pseudo instructions which are
    expanded into the underlying instruction. As a result, disassembling these
    instructions shows the underlying instruction and not the alias.

    Reviewers: slthakur, atanasyan

    Differential Revision: https://reviews.llvm.org/D35253 — sdardis / detail
  3. Another attempt to fix the env issue for the avx512-sde bot — eladcohen / detail

#386 (Aug 14, 2017 4:52:35 AM)

  1. [DAGCombine] Do not try to deduplicate commutative operations if both operand are the same.

    Summary: It is creating useless work as the commuted nodes is the same as the node we are working on in that case.

    Reviewers: jyknight, nemanjai, mkuper, spatel, RKSimon, zvi, bkramer

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D33840 — deadalnix / detail
  2. clang-format: Fix left pointer alignment after delctype/typeof

    Change 272124* introduced a regression in spaceRequiredBetween for left aligned pointers to decltype and typeof expressions. This fix adds logic to fix this. The test added is based on a related test in determineStarAmpUsage. Also add test cases for the regression.

    http://llvm.org/viewvc/llvm-project?view=revision&revision=272124
    LLVM bug tracker: https://bugs.llvm.org/show_bug.cgi?id=30407

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

    Fix contributed by euhlmann! — krasimir / detail
  3. Add braces to silence gcc dangling-else warnings. NFCI. — rksimon / detail
  4. Set the lexical context for dummy tag decl inside createTagFromNewDecl

    This is a follow-up to r310706. This change has been recommended by
    Bruno Cardoso Lopes and Richard Smith. — arphaman / detail
  5. [SelectionDAG] combine vextract (v1iX extract_subvector(vNiX, Idx))
    into vextract(vNiX,Idx) when creating vextract with getNode().
    This case appeared in AVX512 after fixing pr33349 in r310552.

    Differential revision: https://reviews.llvm.org/D36571 — eladcohen / detail

#385 (Aug 14, 2017 3:36:28 AM)

  1. [llvm-cov] Add an option which maps the location of source directories on another machine to your local copies

    Summary:
    This patch adds the -path-equivalence option (example: llvm-cov show -path-equivalence=/origin/path,/local/path) which maps the source code path from one machine to another when using `llvm-cov show`. This is similar to the -filename-equivalence option, but doesn't require you to specify all the source files on the command line.

    This allows you to generate the coverage data on one machine (e.g. in a CI system), and then use llvm-cov on another machine where you have the same code base on a different path.

    Reviewers: vsk

    Reviewed By: vsk

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D36391 — seaneveson / detail
  2. MachineInstr: Reason locally about some memory objects before going to AA.

    This addresses a FIXME in MachineInstr::mayAlias. — bmakam / detail
  3. [LoopUnroll] Enable option to peel remainder loop

    On some targets, the penalty of executing runtime unrolling checks
    and then not the unrolled loop can be significantly detrimental to
    performance. This results in the need to be more conservative with
    the unroll count, keeping a trip count of 2 reduces the overhead as
    well as increasing the chance of the unrolled body being executed. But
    being conservative leaves performance gains on the table.

    This patch enables the unrolling of the remainder loop introduced by
    runtime unrolling. This can help reduce the overhead of misunrolled
    loops because the cost of non-taken branches is much less than the
    cost of the backedge that would normally be executed in the remainder
    loop. This allows larger unroll factors to be used without suffering
    performance loses with smaller iteration counts.

    Differential Revision: https://reviews.llvm.org/D36309 — sam_parker / detail

#384 (Aug 14, 2017 2:20:23 AM)

  1. [AArch64] Remove unused MC function

    An unused function warning was raised in
    https://bugs.llvm.org/show_bug.cgi?id=34178.

    The offending function, in AArch64MCCodeEmitter.cpp, was committed by
    me last week.

    Differential Revision: https://reviews.llvm.org/D36665 — sam_parker / detail
  2. Revert "[DAGCombiner] Extending pattern detection for vector shuffle (REAPPLIED)"

    This reverts commit r310782. — eladcohen / detail
  3. [clangd] Use multiple working threads in clangd.

    Reviewers: bkramer, krasimir, klimek

    Reviewed By: klimek

    Subscribers: arphaman, cfe-commits

    Differential Revision: https://reviews.llvm.org/D36261 — ibiryukov / detail
  4. [analyzer] Rename functions responsible for CFG-based suppress-on-sink.

    Update comments. No functional change intended.

    Addresses Devin's post-commit review comments in https://reviews.llvm.org/D35673
    and https://reviews.llvm.org/D35674. — dergachev / detail
  5. [clangd] Check if CompileCommand has changed on forceReparse.

    Reviewers: krasimir, bkramer, klimek

    Reviewed By: klimek

    Subscribers: cfe-commits

    Differential Revision: https://reviews.llvm.org/D36398 — ibiryukov / detail

#383 (Aug 14, 2017 1:38:25 AM)

  1. [clangd] Fixed a data race.

    Summary:
    Calling addDocument after removeDocument could have resulted in an
    invalid program state (AST and Preamble for the valid document could
    have been incorrectly removed).
    This commit also includes an improved CppFile::cancelRebuild
    implementation that allows to cancel reparse without waiting for
    ongoing rebuild to finish.

    Reviewers: krasimir, bkramer, klimek

    Reviewed By: bkramer

    Subscribers: cfe-commits

    Differential Revision: https://reviews.llvm.org/D36397 — ibiryukov / detail
  2. Fix memory leak in ToolChain::TranslateOpenMPTargetArgs

    rL310433 introduced a code path where DAL is not returned and must be freed.
    This change allows to run openmp-offload.c when Clang is built with ASan. — hahnfeld / detail
  3. [ValueTracking] Revert r310583 which enabled functionality that still is
    causing compile time issues.

    Moreover, the patch *deleted* the flag in addition to changing the
    default, and links to a code review that doesn't even discuss the flag
    and just has an update to a Clang test case.

    I've followed up on the commit thread to ask for numbers on compile time
    at this point, leaving the flag in place until things stabilize, and
    pointing at specific code that seems to exhibit excessive compile time
    with this patch.

    Original commit message for r310583:
    """
    [ValueTracking] Enabling ValueTracking patch by default (recommit). Part 2.

    The original patch was an improvement to IR ValueTracking on
    non-negative integers. It has been checked in to trunk (D18777,
    r284022). But was disabled by default due to performance regressions.
    Perf impact has improved. The patch would be enabled by default.
    """" — chandlerc / detail

#382 (Aug 13, 2017 11:55:43 PM)

  1. [AVX-512] Add hasSideEffects = 0 to the 8-bit and 16-bit register broadcasts. — ctopper / detail
  2. [X86] Remove unused argument from the vextract_for_size multiclass. NFC — ctopper / detail
  3. [AVX512] Remove comment I should have removed in r310808. NFC — ctopper / detail

#380 (Aug 13, 2017 9:23:46 PM)

  1. [opt-viewer] Listify `dict_items` for Py3 indexing

    Summary:
    In Python 2, calling `dict.items()` returns an indexable `list`, whereas
    on Python 3 it returns a set-like `dict_items` object, which cannot be
    indexed. Explicitly onvert the `dict_items` object so that it can be
    indexed when using Python 3.

    In combination with D36622, D36623, and D36624, this change allows
    `opt-viewer.py` to exit successfully when run with Python 3.4.

    Test Plan:
    Run `opt-viewer.py` using Python 3.4 and confirm it does not encounter a
    runtime error when when indexing into `dict.items()`.

    Reviewers: anemet

    Reviewed By: anemet

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D36630 — modocache / detail
  2. [PowerPC] Revert r310346 (and followups r310356 & r310424) which
    introduce a miscompile bug.

    There appears to be a bug where the generated code to extract the sign
    bit doesn't work correctly for 32-bit inputs. I've replied to the
    original commit pointing out the problem. I think I see by inspection
    (and reading the manual for PPC) how to fix this, but I can't be 100%
    confident and I also don't know what the best way to test this is.
    Currently it seems nearly impossible to get the backend to hit this code
    path, but the patch autohr is likely in a better position to craft such
    test cases than I am, and based on where the bug is it should be easily
    done.

    Original commit message for r310346:
    """
    [PowerPC] Eliminate compares - add i32 sext/zext handling for SETLE/SETGE

    Adds handling for SETLE/SETGE comparisons on i32 values. Furthermore, it
    adds the handling for the special case where RHS == 0.

    Differential Revision: https://reviews.llvm.org/D34048
    """ — chandlerc / detail

#378 (Aug 13, 2017 7:37:04 PM)

  1. [AVX512] Simplify the instruction defintion for VEXTRACT. NFCI

    The comment about why we couldn't use avx512_maskable appears to have been incorrect. — ctopper / detail
  2. [ARM] Tidy-up Cortex-A15 DPR-SPR optimizer implementation

    Modernise the code with range-loops etc

    Reviewed by: @fhahn, @rovka
    Differential Revision: https://reviews.llvm.org/D36502 — javed.absar / detail

#376 (Aug 13, 2017 5:30:57 PM)

  1. [InstCombine] Simplify and inline FoldOrWithConstants/FoldXorWithConstants

    Summary:
    These functions were overly complicated. The body of this function was rechecking for an And operation to find the constant, but we already knew we were looking at two Ands ORed together and the pieces are in variables. We already had earlier nearby code that checked for ConstantInts. So just inline the remaining parts into the earlier code.

    Next step is to use m_APInt instead of ConstantInt.

    Reviewers: spatel, efriedma, davide, majnemer

    Reviewed By: spatel

    Subscribers: zzheng, llvm-commits

    Differential Revision: https://reviews.llvm.org/D36439 — ctopper / detail
  2. Rename cxx1z -> cxx17 across all diagnostic IDs. — rsmith / detail

#375 (Aug 13, 2017 4:17:52 PM)

  1. Replace remaining user-visible mentions of C++1z with C++17. — rsmith / detail

#374 (Aug 13, 2017 3:16:13 PM)

  1. [c++2a] Treat 'concept' and 'requires' as keywords, add compat warning for C++17 and before. — rsmith / detail

#373 (Aug 13, 2017 2:04:34 PM)

  1. [X86][BMI] Add BEXTR demanded bits test cases (PR34042) — rksimon / detail
  2. [X86] Fix typo from r310794. Index = 0 should have been Index == 0. — ctopper / detail
  3. Enable profile on NetBSD

    Summary:
    make check-profile:

    Failing Tests (2):
        Profile-i386 :: instrprof-dlopen.test
        Profile-x86_64 :: instrprof-dlopen.test

      Expected Passes    : 64
      Unsupported Tests  : 42
      Unexpected Failures: 2

    Sponsored by <The NetBSD Foundation>

    Reviewers: joerg, vitalybuka, kcc, filcab, fjricci

    Reviewed By: vitalybuka

    Subscribers: vsk, llvm-commits, srhines, mgorny, #sanitizers

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D36603 — kamil / detail

#372 (Aug 13, 2017 1:10:37 PM)

  1. [X86] Remove unused pattern fragment that referenced MVT::i1. NFC — ctopper / detail
  2. [AArch64] Add support for a MinGW AArch64 target

    Differential Revision: https://reviews.llvm.org/D36364 — mstorsjo / detail
  3. [COFF, ARM64] Use '//' as comment character in assembly files in GNU environments

    This allows using semicolons for bundling up more than one
    statement per line. This is used within the mingw-w64 project in some
    assembly files that contain code for multiple architectures.

    Differential Revision: https://reviews.llvm.org/D36366 — mstorsjo / detail
  4. Remove RISCV from LLVM_ALL_TARGETS in CMakeLists.txt

    It was mistakenly added to that list in D23560 (committed in rL285712). RISCV
    is an experimental backend and should never have been in that list, I
    mistakenly interpreted LLVM_ALL_TARGETS as a list of all targets rather than
    targets to build by default. Unfortunately, because of this the RISCV backend
    has been building by default when it shouldn't be.

    This commet adds a description comment, which should help to avoid such
    mistakes in the future.

    See my message to llvm-dev for more information and analysis
    <http://lists.llvm.org/pipermail/llvm-dev/2017-August/116347.html>.

    Differential Revision: https://reviews.llvm.org/D36538 — asb / detail

#371 (Aug 13, 2017 11:20:18 AM)

  1. [AVX512] Correct isExtractSubvectorCheap so that it will return the correct answers for extracting 128-bits from a 512-bit vector and for mask registers.

    Previously it would not return true for extracting either of the upper quarters of a 512-bit registers.

    For mask registers we support extracting anything from index 0. And otherwise we only support extracting the upper half of a register.

    Differential Revision: https://reviews.llvm.org/D36638 — ctopper / detail

#370 (Aug 13, 2017 10:30:58 AM)

  1. [X86][ARM][TargetLowering] Add SrcVT to isExtractSubvectorCheap

    Summary:
    Without the SrcVT its hard to know what is really being asked for. For example if your target has 128, 256, and 512 bit vectors. Maybe extracting 128 from 256 is cheap, but maybe extracting 128 from 512 is not.

    For x86 we do support extracting a quarter of a 512-bit register. But for i1 vectors we don't have isel patterns for extracting arbitrary pieces. So we need this to have a correct implementation of isExtractSubvectorCheap for mask vectors.

    Reviewers: RKSimon, zvi, efriedma

    Reviewed By: RKSimon

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

    Differential Revision: https://reviews.llvm.org/D36649 — ctopper / detail

#367 (Aug 13, 2017 7:53:36 AM)

  1. [X86][SandyBridge] Additional updates to the SNB instructions scheduling information

    This is a continuation patch for commit r307529 which completely replaces the scheduling information for the SandyBridge architecture target by modifying the file X86SchedSandyBridge.td located under the X86 Target (see also https://reviews.llvm.org/D35019).

    In this patch we added the scheduling information of additional SNB instructions that were missing from the patch commit r307529, fixed the scheduling of several resource groups that include only port0 instead of port05 (i.e., port0 OR port5) and fixed several incorrect instructions' scheduling in the r307529 commit.

    The patch also includes the X87 instructions which were missing in previous patch commit r307529 as reported in bugzilla bug 34080.

    Reviewers: zvi, RKSimon, chandlerc, igorb, m_zuckerman, craig.topper, aymanmus, dim

    Differential Revision: https://reviews.llvm.org/D36388 — gadi.haber / detail

#366 (Aug 13, 2017 6:17:01 AM)

  1. [X86][AVX512] Added additional shuffle+trunc test case.

    An existing test should have covered this but a typo caused it to fail. I've kept both as the codegen for the typo case needs addressing as well. — rksimon / detail

#365 (Aug 13, 2017 5:27:29 AM)

  1. [X86][TBM] Add tests showing failure to fold RFLAGS result into TBM instructions.

    And fails to select TBM instructions at all. — rksimon / detail
  2. [X86][AsmParser][AVX512] Error appropriately when K0 is tried as a write-mask

    K0 isn't expected as a write-mask, so provide a detailed error here, instead of the more generic one (invalid op for insn)
    Conforms with gas

    Differential Revision: https://reviews.llvm.org/D36570 — coby / detail
  3. [X86][TBM] Regenerate bextri intrinsics tests. NFCI. — rksimon / detail

#361 (Aug 13, 2017 1:10:56 AM)

  1. [X86][AVX512] Add combine for TESTM

    Add an X86 combine for TESTM when one of the operands is a BUILD_VECTOR(0,0,...).

    TESTM op0, BUILD_VECTOR(0,0,...) -> BUILD_VECTOR(0,0,...)
    TESTM BUILD_VECTOR(0,0,...), op1 -> BUILD_VECTOR(0,0,...)

    Differential Revision:
    https://reviews.llvm.org/D36536 — guyblank / detail

#351 (Aug 12, 2017 4:08:01 PM)

  1. [X86] Early out of combineInsertSubvector for mask vectors.

    The combines here shouldn't be done for mask vectors, but it wasn't clear anything was preventing that. — ctopper / detail
  2. [X86] Fix bad comment. NFC — ctopper / detail

#350 (Aug 12, 2017 2:50:51 PM)

  1. [X86] When handling addcarry intrinsic, create the flag result with the correct type so we don't crash if we use a memory instruction

    Summary:
    Previously we were creating the flag result with MVT::Other which is interpretted as a Chain node. If we used a memory form of the instruction we would end up with a copyToReg that consumed the chain result of the adcx instruction instead of the flag result.

    Pretty sure we should be using MVT::i32 here, that's what we do other places we create these node types.

    We should probably consider this for 5.0 as well.

    Reviewers: RKSimon, zvi, spatel

    Reviewed By: RKSimon

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D36645 — ctopper / detail

#349 (Aug 12, 2017 1:12:14 PM)

  1. Fix Wdocumentation warning - typo in argument list. NFCI. — rksimon / detail

#347 (Aug 12, 2017 11:04:14 AM)

  1. [DAGCombiner] Extending pattern detection for vector shuffle (REAPPLIED)

    If all the operands of a BUILD_VECTOR extract elements from same vector then split the vector efficiently based on the maximum vector access index.

    Reapplied with fix to only work with simple value types.

    Committed on behalf of @jbhateja (Jatin Bhateja)

    Differential Revision: https://reviews.llvm.org/D35788 — rksimon / detail
  2. [Triple] Add isThumb and isARM functions.

    Summary:
    isThumb returns true for Thumb triples (little and big endian), isARM
    returns true for ARM triples (little and big endian).
    There are a few more checks using arm/thumb that are not covered by
    those functions, e.g. that the architecture is either ARM or Thumb
    (little endian) or ARM/Thumb little endian only.

    Reviewers: javed.absar, rengolin, kristof.beyls, t.p.northover

    Reviewed By: rengolin

    Subscribers: llvm-commits, aemerson

    Differential Revision: https://reviews.llvm.org/D34682 — fhahn / detail
  3. [X86] Regenerate merge store tests. NFCI.

    Gives us a much better idea of what is going on than just relying on a few checks. — rksimon / detail
  4. [BDCE] clear poison generators after turning a value into zero (PR33695, PR34037)

    nsw, nuw, and exact carry implicit assumptions about their operands, so we need
    to clear those after trivializing a value. We decided there was no danger for
    llvm.assume or metadata, so there's just a comment about that.

    This fixes miscompiles as shown in:
    https://bugs.llvm.org/show_bug.cgi?id=33695
    https://bugs.llvm.org/show_bug.cgi?id=34037

    Differential Revision: https://reviews.llvm.org/D36592 — spatel / detail

#346 (Aug 12, 2017 9:31:18 AM)

  1. clang-format: add an option -verbose to list the files being processed

    Reviewers: djasper

    Reviewed By: djasper

    Subscribers: klimek, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D34824 — sylvestre / detail

#345 (Aug 12, 2017 8:10:57 AM)

  1. Fix some minor typos in the llvm XRay exemple — sylvestre / detail

#332 (Aug 11, 2017 7:50:53 PM)

  1. PR34163: Don't cache an incorrect key function for a class if queried between
    the class becoming complete and its inline methods being parsed.

    This replaces the hack of using the "late parsed template" flag to track member
    functions with bodies we've not parsed yet; instead we now use the "will have
    body" flag, which carries the desired implication that the function declaration
    *is* a definition, and that we've just not parsed its body yet. — rsmith / detail
  2. Revert "[Modules] Prevent #import to reenter header if not building a module."

    This reverts commit r310605. Richard pointed out a better way to achieve
    this, which I'll post a patch for soon. — Bruno Lopes / detail
  3. Add a Dockerfile for clang-proto-fuzzer

    Summary: Add a Dockerfile for clang-proto-fuzzer

    Reviewers: morehouse, vitalybuka

    Reviewed By: morehouse

    Subscribers: hintonda, cfe-commits

    Differential Revision: https://reviews.llvm.org/D36635 — kcc / detail

#330 (Aug 11, 2017 5:37:07 PM)

  1. D36604: PR34148: Do not assume we can use a copy relocation for an `external_weak` global

    An `external_weak` global may be intended to resolve as a null pointer if it's
    not defined, so it doesn't make sense to use a copy relocation for it.

    Differential Revision: https://reviews.llvm.org/D36604 — rsmith / detail
  2. Disabling openmp-offload.c on linux until it is stabilized on all local configurations.

    Differential revision: https://reviews.llvm.org/D29660 — alekseyshl / detail
  3. [libFuzzer] experimental support for Clang's coverage (fprofile-instr-generate), Linux-only — kcc / detail

#329 (Aug 11, 2017 3:54:06 PM)

  1. [x86] add tests for rotate left/right with masked shifter; NFC

    As noted in the test comment, instcombine now produces the masked
    shift value even when it's not included in the source, so we should
    handle this.

    Although the AMD/Intel docs don't say it explicitly, over-rotating
    the narrow ops produces the same results. An existence proof that
    this works as expected on all x86 comes from gcc 4.9 or later:
    https://godbolt.org/g/K6rc1A — spatel / detail
  2. [compiler-rt] Add SANITIZER_CXX_ABI_LIBNAME=libc++ option.

    Summary: This is to support Android where libc++abi is part of libc++.

    Reviewers: srhines, EricWF

    Subscribers: dberris, mgorny, llvm-commits

    Differential Revision: https://reviews.llvm.org/D36640 — eugenis / detail
  3. [MIPS] Use ABI to determine stack alignment.

    Summary:
    The stack alignment depends on the ABI (16 bytes for N32 and N64 and 8
    bytes for O32), not the CPU type.

    Reviewers: sdardis

    Reviewed By: sdardis

    Subscribers: atanasyan, arichardson, llvm-commits

    Differential Revision: https://reviews.llvm.org/D36326 — jhb / detail
  4. [x86] regenerate test checks, add 64-bit run; NFC — spatel / detail
  5. [Analysis] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). — eugenezelenko / detail
  6. [OpenMP] Move failing flag tests to disabled GPU
    offloading test file. This should prevent further errors
    with the sanitizer.

    Diff: D29660 — gbercea / detail
  7. Fix some broken tests.

    These were pending in a separate patch but I forgot to squash them
    before comitting, and this one didn't go through. — zturner / detail
  8. [OptDiag] Updating Remarks in SampleProfile

    Updating remark API to newer OptimizationDiagnosticInfo API. This
    allows remarks to show up in diagnostic yaml file, and enables use
    of opt-viewer tool.

    Hotness information for remarks (L505 and L751) do not display hotness
    information, most likely due to profile information not being
    propagated yet. Unsure if this is the desired outcome.

    Patch by Tarun Rajendran.

    Differential Revision: https://reviews.llvm.org/D36127 — efriedma / detail

#328 (Aug 11, 2017 2:05:23 PM)

  1. [X86] Don't use fsin/fcos/fsincos instructions ever

    Summary:
    Previously we would use these instructions if sse was disabled and fastmath was enabled.

    As mentioned in D28335, this is a bad idea.

    Reviewers: efriedma, scanon, DavidKreitzer

    Reviewed By: DavidKreitzer

    Subscribers: zvi, llvm-commits

    Differential Revision: https://reviews.llvm.org/D36344 — ctopper / detail
  2. [libcxx] [test] Rename _Up to U, etc. NFCI.

    This improves readability and (theoretically) improves portability,
    as _Ugly names are reserved.

    This performs additional de-uglification, so all of these tests
    follow the example of iterator.traits/empty.pass.cpp. — stl_msft / detail
  3. [libcxx] [test] Rename __x to x. NFCI.

    This improves readability and (theoretically) improves portability,
    as __ugly names are reserved. — stl_msft / detail
  4. [libcxx] [test] Rename __c to ch. NFCI.

    This improves readability and (theoretically) improves portability,
    as __ugly names are reserved. — stl_msft / detail
  5. [libcxx] [test] Rename _Tp to T. NFCI.

    This improves readability and (theoretically) improves portability,
    as _Ugly names are reserved. — stl_msft / detail
  6. Fix access to undefined weak symbols in pic code

    When the access to a weak symbol is not a call, the access has to be
    able to produce the value 0 at runtime.

    We were sometimes producing code sequences where that was not possible
    if the code was leaded more than 4g away from 0. — rafael / detail
  7. Output S_SECTION symbols to the Linker module.

    PDBs need to contain 1 module for each object file/compiland,
    and a special one synthesized by the linker.  This one contains
    a symbol record for each output section in the executable with
    its address information.  This patch adds such symbols to the
    linker module.  Note that we also are supposed to add an
    S_COFFGROUP symbol for what appears to be each input section that
    contributes to each output section, but it's not entirely clear
    how to generate these yet, so I'm leaving that for a separate
    patch. — zturner / detail
  8. AMDGPU: Start adding tail call support

    Handle the sibling call cases. — arsenm / detail
  9. [libFuzzer] recommend Clang Coverage for coverage visualization — kcc / detail
  10. [libFuzzer] Re-enable coverage.test on Darwin. — George Karpenkov / detail
  11. [libFuzzer] test libFuzzer using -fsanitize=fuzzer/fuzzer-no-link — kcc / detail

#327 (Aug 11, 2017 12:26:08 PM)

  1. Revert r310716 (and r310735): [globalisel][tablegen] Support zero-instruction emission.

    Two of the Windows bots are failing test\CodeGen\X86\GlobalISel\select-inc.mir
    which should not have been affected by the change. Reverting while I investigate.

    Also reverted r310735 because it builds on r310716. — dsanders / detail
  2. Add documentation for llvm-pdbutil. — zturner / detail
  3. [LLD/PDB] Write actual records to the globals stream.

    Previously we were writing an empty globals stream.  Windows
    tools interpret this as "private symbols are not present in
    this PDB", even when they are, so we need to fix this.  Regardless,
    without it we don't have information about global variables, so
    we need to fix it anyway.  This patch does that.

    With this patch, the "lm" command in WinDbg correctly reports
    that we have private symbols available, but the "dv" command
    still refuses to display local variables.

    Differential Revision: https://reviews.llvm.org/D36535 — zturner / detail
  4. [mips] clang-format MipsSubtarget.cpp.

    This only fixes a few things and serves as my initial test commit. — jhb / detail
  5. [opt-viewer] Decode HTML bytes for Python 3

    Summary:
    When using Python 3, `pygments.highlight()` returns a `bytes` object, not
    a `str`, causing the call to `str.replace` on the following line to fail
    with a runtime exception:
    `TypeError: 'str' does not support the buffer interface`. Decode the
    bytes into a string in order to fix the exception.

    Test Plan:
    Run `opt-viewer.py` with Python 3.4, and confirm no runtime error occurs
    when calling `str.replace`.

    Reviewers: anemet

    Reviewed By: anemet

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D36624 — modocache / detail

#326 (Aug 11, 2017 11:08:00 AM)

  1. [opt-viewer] Use Python 3-compatible iteritems

    Summary:
    Replace a usage of a Python 2-specific `dict.iteritems()` with the
    Python 3-compatible definition provided at the top of the same file.

    Test Plan:
    Run `opt-viewer.py` using Python 3 and confirm it no longer encounters a
    runtime error when calling `dict.iteritems()`.

    Reviewers: anemet

    Reviewed By: anemet

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D36623 — modocache / detail
  2. [opt-viewer] Use Python 3-compatible `intern()`

    Summary:
    In Python 2, `intern()` is a builtin function available to all programs.
    In Python 3, it was moved into the `sys` module, available as
    `sys.intern`. Import it such that, within `optrecord.py`, `intern()` is
    available whether run using Python 2 or 3.

    Test Plan:
    Run `opt-viewer.py` using Python 3, confirm it no longer
    encounters a runtime error when `intern()` is called.

    Reviewers: anemet

    Reviewed By: anemet

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D36622 — modocache / detail
  3. [AMDGPU] Fix santizer error after last commit

    Removed useless assert. — rampitec / detail
  4. Fix typo /NFC — davidxl / detail
  5. [globalisel][tablegen] Generate TypeObject table. NFC

    Summary:
    Generate the type table from the types used by a target rather than hard-coding
    the union of types used by all targets.

    Depends on D36084

    Reviewers: ab, t.p.northover, qcolombet, rovka, aditya_nandakumar

    Reviewed By: rovka

    Subscribers: kristof.beyls, igorb, llvm-commits

    Differential Revision: https://reviews.llvm.org/D36085 — dsanders / detail
  6. Update libFuzzer documentation for -fsanitize=fuzzer-no-link flag

    Differential Revision: https://reviews.llvm.org/D36602 — George Karpenkov / detail
  7. Add -fsanitize=fuzzer-no-link flag to the driver.

    The flag will perform instrumentation necessary to the fuzzing,
    but will NOT link libLLVMFuzzer.a library.
    Necessary when modifying CFLAGS for projects which may produce
    executables as well as a fuzzable target.

    Differential Revision: https://reviews.llvm.org/D36600 — George Karpenkov / detail
  8. Enable exceptions for this test case to speculatively fix the build bots.

    Hopefully corrects: http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/15666 — aaronballman / detail
  9. [AMDGPU] Ported and adopted AMDLibCalls pass

    The pass does simplifications of well known AMD library calls.
    If given -amdgpu-prelink option it works in a pre-link mode which
    allows to reference new library functions which will be linked in
    later.

    In addition it also used to process traditional AMD option
    -fuse-native which allows to replace some of the functions with
    their fast native implementations from the library.

    The necessary glue to pass the prelink option and translate
    -fuse-native is to be added to the driver.

    Differential Revision: https://reviews.llvm.org/D36436 — rampitec / detail
  10. Orc: PR33769: Don't rely on comparisons with default constructed iterators — dblaikie / detail
  11. Add hicpp-exception-baseclass to the HIC++ module.

    This enforces that throwing an exception in C++ requires that exception to inherit from std::exception.

    Patch by Jonas Toth. — aaronballman / detail
  12. [AVX512] Remove and autoupgrade many of the broadcast intrinsics

    Summary:
    This autoupgrades most of the broadcast intrinsics. They've been unused in clang for some time.

    This leaves the 32x2 intrinsics because they are still used in clang.

    Reviewers: RKSimon, zvi, igorb

    Reviewed By: RKSimon

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D36606 — ctopper / detail
  13. [x86] Enable some support for lowerVectorShuffleWithUndefHalf with AVX-512

    Summary:
    This teaches 512-bit shuffles to detect unused halfs in order to reduce shuffle size.

    We may need to refine the 512-bit exit point. I couldn't remember if we had good cross lane shuffles for 8/16 bit with AVX-512 or not.

    I believe this is step towards being able to handle D36454 without a special case.

    From here we need to improve our ability to combine extract_subvector with insert_subvector and other extract_subvectors. And we need to support narrowing binary operations where we don't demand all elements. This may be improvements to DAGCombiner::narrowExtractedVectorBinOp(by recognizing an insert_subvector in addition to concat) or we may need a target specific combiner.

    Reviewers: RKSimon, zvi, delena, jbhateja

    Reviewed By: RKSimon, jbhateja

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D36601 — ctopper / detail
  14. [OpenMP] Enable previously successful offloading tests.

    Create a separate test file to contain all tests for OpenMP
    offloading to GPUs.

    Make libdevice checking more robust by accounting for
    the case in which no libdevice is found.

    This changes are in connrection with diff: D29660 — gbercea / detail
  15. [x86] use more shift or LEA for select-of-constants (2nd try)

    The previous rev (r310208) failed to account for overflow when subtracting the
    constants to see if they're suitable for shift/lea. This version add a check
    for that and more test were added in r310490.

    We can convert any select-of-constants to math ops:
    http://rise4fun.com/Alive/d7d

    For this patch, I'm enhancing an existing x86 transform that uses fake multiplies
    (they always become shl/lea) to avoid cmov or branching. The current code misses
    cases where we have a negative constant and a positive constant, so this is just
    trying to plug that hole.

    The DAGCombiner diff prevents us from hitting a terrible inefficiency: we can start
    with a select in IR, create a select DAG node, convert it into a sext, convert it
    back into a select, and then lower it to sext machine code.

    Some notes about the test diffs:

    1. 2010-08-04-MaskedSignedCompare.ll - We were creating control flow that didn't exist in the IR.
    2. memcmp.ll - Choose -1 or 1 is the case that got me looking at this again. We could avoid the
       push/pop in some cases if we used 'movzbl %al' instead of an xor on a different reg? That's a
       post-DAG problem though.
    3. mul-constant-result.ll - The trade-off between sbb+not vs. setne+neg could be addressed if
       that's a regression, but those would always be nearly equivalent.
    4. pr22338.ll and sext-i1.ll - These tests have undef operands, so we don't actually care about these diffs.
    5. sbb.ll - This shows a win for what is likely a common case: choose -1 or 0.
    6. select.ll - There's another borderline case here: cmp+sbb+or vs. test+set+lea? Also, sbb+not vs. setae+neg shows up again.
    7. select_const.ll - These are motivating cases for the enhancement; replace cmov with cheaper ops.

    Assembly differences between movzbl and xor to avoid a partial reg stall are caused later by the X86 Fixup SetCC pass.

    Differential Revision: https://reviews.llvm.org/D35340 — spatel / detail
  16. [globalisel][tablegen] Support zero-instruction emission.

    Summary:
    Support the case where an operand of a pattern is also the whole of the
    result pattern. In this case the original result and all its uses must be
    replaced by the operand. However, register class restrictions can require
    a COPY. This patch handles both cases by always emitting the copy and
    leaving it for the register allocator to optimize.

    Depends on D35833

    Reviewers: ab, t.p.northover, qcolombet, rovka, aditya_nandakumar

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

    Differential Revision: https://reviews.llvm.org/D36084 — dsanders / detail
  17. [mips] Add missing mips-registered-target to mips test. — sdardis / detail

#325 (Aug 11, 2017 8:11:02 AM)

  1. [mips] Support implicit gpopt with N64 when using -fno-pic

    As clang defaults to -mno-abicalls when using -fno-pic for N64, implicitly use
    -mgpopt in that case.

    Reviewers: atanasyan

    Differential Revision: https://reviews.llvm.org/D36315 — sdardis / detail
  2. [mips] Lift the assertion on the types that can be used with MipsGPRel

    Post commit review of rL308619 highlighted the need for handling N64
    with -fno-pic. Testing reveale a stale assert when generating a GP
    relative addressing mode.

    This patch removes that assert and adds the necessary patterns for
    MIPS64 to perform gp relative addressing with -fno-pic
    (and the implicit -mno-abicalls + -mgpopt).

    Reviewers: atanasyan, nitesh.jain

    Differential Revision: https://reviews.llvm.org/D36472 — sdardis / detail

#324 (Aug 11, 2017 7:15:24 AM)

  1. [cmake] Expose the dependencies of ExecutionEngine as PUBLIC

    Expose the dependencies of LLVMExecutionEngine library as PUBLIC rather
    than PRIVATE when building a shared library. This is necessary because
    the library is not contained but exposes API of other LLVM libraries via
    its headers.

    This causes other libraries to fail to link if the linker verifies for
    correctness of -l flags (i.e. fails on indirect dependencies). This e.g.
    happens when building LLDB against shared LLVM:

      lib64/liblldbExpression.a(IRExecutionUnit.cpp.o):(.data.rel.ro._ZTIN4llvm18MCJITMemoryManagerE[_ZTIN4llvm18MCJITMemoryManagerE]+0x10): undefined reference to `typeinfo for llvm::RuntimeDyld::MemoryManager'
      lib64/liblldbExpression.a(IRExecutionUnit.cpp.o):(.data.rel.ro._ZTVN4llvm18MCJITMemoryManagerE[_ZTVN4llvm18MCJITMemoryManagerE]+0x60): undefined reference to `llvm::RuntimeDyld::MemoryManager::anchor()'
      lib64/liblldbExpression.a(IRExecutionUnit.cpp.o):(.data.rel.ro._ZTVN12lldb_private15IRExecutionUnit13MemoryManagerE[_ZTVN12lldb_private15IRExecutionUnit13MemoryManagerE]+0x48): undefined reference to `llvm::RTDyldMemoryManager::deregisterEHFrames()'
      lib64/liblldbExpression.a(IRExecutionUnit.cpp.o):(.data.rel.ro._ZTVN12lldb_private15IRExecutionUnit13MemoryManagerE[_ZTVN12lldb_private15IRExecutionUnit13MemoryManagerE]+0x60): undefined reference to `llvm::RuntimeDyld::MemoryManager::anchor()'
      lib64/liblldbExpression.a(IRExecutionUnit.cpp.o):(.data.rel.ro._ZTVN12lldb_private15IRExecutionUnit13MemoryManagerE[_ZTVN12lldb_private15IRExecutionUnit13MemoryManagerE]+0xd0): undefined reference to `llvm::JITSymbolResolver::anchor()'
      collect2: error: ld returned 1 exit status

    Declaring the dependencies as PUBLIC guarantees that any package using
    the ExecutionEngine library will also get explicit -l flags for
    the dependent libraries guaranteeing that the symbols exposed in headers
    could be resolved.

    Patch originally written by NAKAMURA Takumi.

    Differential Revision: https://reviews.llvm.org/D36211 — mgorny / detail
  2. Improve handling of insert_subvector of bitcast values

    Fix insert_subvector / extract_subvector merges of bitcast values.

    Reviewers: efriedma, craig.topper, RKSimon

    Subscribers: RKSimon, llvm-commits

    Differential Revision: https://reviews.llvm.org/D34571 — niravd / detail
  3. [X86][DAG] Switch X86 Target to post-legalized store merge

    Move store merge to happen after intrinsic lowering to allow lowered
    stores to be merged.

    Some regressions due in MergeConsecutiveStores to missing
    insert_subvector that are addressed in follow up patch.

    Reviewers: craig.topper, efriedma, RKSimon

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D34559 — niravd / detail
  4. [AArch64] Enable ARMv8.3-A pointer authentication

    Add assembler and disassembler support for the ARMv8.3-A pointer
    authentication instructions.

    Differential Revision: https://reviews.llvm.org/D36517 — sam_parker / detail
  5. [AArch64] Remove dotprod from base extension list

    Dot product is an optional ARMv8.2a extension; remove it from the ARMv8.2a base
    extension list. This was introduced in commit r310480.

    Differential Revision: https://reviews.llvm.org/D36609 — sjoerdmeijer / detail
  6. Implement hicpp-braces-around-statements as an alias to readability-braces-around-statements.

    Patch by Jonas Toth. — aaronballman / detail
  7. [modules] Set the lexical DC for dummy tag decls that refer to hidden
    declarations that are made visible after the dummy is parsed and ODR verified

    Prior to this commit the
    "(getContainingDC(DC) == CurContext && "The next DeclContext should be lexically contained in the current one."),"
    assertion failure was triggered during semantic analysis of the dummy
    tag declaration that was declared in another tag declaration because its
    lexical context did not point to the outer tag decl.

    rdar://32292196 — arphaman / detail
  8. Revert r302670 for the upcoming 5.0.0 release

    This is causing failures when compiling clang with -O3
    as one of the structures used by clang is passed by
    value and uses the fastcc calling convention.

    Faliures manifest for stage2 mips build. — smaksimovic / detail

#322 (Aug 11, 2017 4:19:40 AM)

  1. Revert r310057

    Bring back changes which r304953 introduced since
    they were in fact not the cause of failures described
    in r310057 commit message. — smaksimovic / detail
  2. [ARM] Assembler support for the ARMv8.2a dot product instructions

    Commit r310480 added the AArch64 ARMv8.2a dot product instructions;
    this adds the AArch32 instructions.

    Differential Revision: https://reviews.llvm.org/D36575 — sjoerdmeijer / detail
  3. [Bash-autocompletion] Add --autocomplete flag to 5.0 release notes

    Summary:
    I thought we should add this information to release notes, because we
    added a new flag to clang driver.

    Reviewers: v.g.vassilev, teemperor, ruiu

    Subscribers: cfe-commits

    Differential Revision: https://reviews.llvm.org/D36567 — yamaguchi / detail

#320 (Aug 11, 2017 2:02:18 AM)

  1. [DAGCombiner] Remove shuffle support from simplifyShuffleMask

    rL310372 enabled simplifyShuffleMask to support undef shuffle mask inputs, but its causing hangs.

    Removing support until I can triage the problem — rksimon / detail
  2. Revert "Thread Safety Analysis: warn on nonsensical attributes."

    This reverts commit rL310403, which caused spurious warnings in libc++,
    because it didn't properly handle templated scoped lockable types. — jmgao / detail

#319 (Aug 11, 2017 12:12:01 AM)

  1. [IfConversion] Maintain the CFG when predicating/merging blocks in IfConvert*

    Summary:
    This fixes PR32721 in IfConvertTriangle and possible similar problems in
    IfConvertSimple, IfConvertDiamond and IfConvertForkedDiamond.

    In PR32721 we had a triangle

       EBB
       | \
       |  |
       | TBB
       |  /
       FBB

    where FBB didn't have any successors at all since it ended with an
    unconditional return. Then TBB and FBB were be merged into EBB, but EBB
    would still keep its successors, and the use of analyzeBranch and
    CorrectExtraCFGEdges wouldn't help to remove them since the return
    instruction is not analyzable (at least not on ARM).

    The edge updating code and branch probability updating code is now pushed
    into MergeBlocks() which allows us to share the same update logic between
    more callsites. This lets us remove several dependencies on analyzeBranch
    and completely eliminate RemoveExtraEdges.

    One thing that showed up with this patch was that IfConversion sometimes
    left a successor with 0% probability even if there was no branch or
    fallthrough to the successor.

    One such example from the test case ifcvt_bad_zero_prob_succ.mir. The
    indirect branch tBRIND can only jump to bb.1, but without the patch we
    got:

      bb.0:
        successors: %bb.1(0x80000000)

      bb.1:
        successors: %bb.1(0x80000000), %bb.2(0x00000000)
        tBRIND %r1, 1, %cpsr
        B %bb.1

      bb.2:

    There is no way to jump from bb.1 to bb2, but still there is a 0% edge
    from bb.1 to bb.2.

    With the patch applied we instead get the expected:

      bb.0:
        successors: %bb.1(0x80000000)

      bb.1:
        successors: %bb.1(0x80000000)
        tBRIND %r1, 1, %cpsr
        B %bb.1

    Since bb.2 had no predecessor at all, it was removed.

    Several testcases had to be updated due to this since the removed
    successor made the "Branch Probability Basic Block Placement" pass
    sometimes place blocks in a different order.

    Finally added a couple of new test cases:

    * PR32721_ifcvt_triangle_unanalyzable.mir:
      Regression test for the original problem dexcribed in PR 32721.

    * ifcvt_triangleWoCvtToNextEdge.mir:
      Regression test for problem that caused a revert of my first attempt
      to solve PR 32721.

    * ifcvt_simple_bad_zero_prob_succ.mir:
      Test case showing the problem where a wrong successor with 0% probability
      was previously left.

    * ifcvt_[diamond|forked_diamond|simple]_unanalyzable.mir
      Very simple test cases for the simple and (forked) diamond cases
      involving unanalyzable branches that can be nice to have as a base if
      wanting to write more complicated tests.

    Reviewers: iteratee, MatzeB, grosser, kparzysz

    Reviewed By: kparzysz

    Subscribers: kbarton, davide, aemerson, nemanjai, javed.absar, kristof.beyls, llvm-commits

    Differential Revision: https://reviews.llvm.org/D34099 — uabelho / detail
  2. [PM] Switch the CGSCC debug messages to use the standard LLVM debug
    printing techniques with a DEBUG_TYPE controlling them.

    It was a mistake to start re-purposing the pass manager `DebugLogging`
    variable for generic debug printing -- those logs are intended to be
    very minimal and primarily used for testing. More detailed and
    comprehensive logging doesn't make sense there (it would only make for
    brittle tests).

    Moreover, we kept forgetting to propagate the `DebugLogging` variable to
    various places making it also ineffective and/or unavailable. Switching
    to `DEBUG_TYPE` makes this a non-issue. — chandlerc / detail

#316 (Aug 10, 2017 8:47:47 PM)

  1. Implement latest feature test macro recommendations, P0096R4. — rsmith / detail
  2. Update cxx_status to mention the upcoming Clang 5 release. — rsmith / detail
  3. PR33850: Update cxx_dr_status for Clang 5 branch. — rsmith / detail

#315 (Aug 10, 2017 7:39:36 PM)

  1. PR33489: A function-style cast to a deduced class template specialization type is type-dependent if it can't be resolved due to a type-dependent argument. — rsmith / detail

#314 (Aug 10, 2017 5:19:53 PM)

  1. [Sema][ObjC] Fix spurious -Wcast-qual warnings.

    We do not meaningfully track object const-ness of Objective-C object
    types. Silence the -Wcast-qual warning that is issued when casting to or
    from Objective-C object types results in losing const qualification.

    rdar://problem/33807915 — ahatanak / detail
  2. [MachineOutliner] Add RegState::Define to LDRXpost in insertOutlinedCall

    This fixes a MachineVerifier failure in machine-outliner.mir. Not explicitly
    adding RegState::Define to the LR argument makes it unhappy because an explicit
    definition is marked as a use.

    Build failure:
    http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-expensive/7496/testReport/junit/LLVM/CodeGen_AArch64/machine_outliner_mir/ — paquette / detail

#313 (Aug 10, 2017 4:04:23 PM)

  1. [clang-tidy] Fix for buildbot.

    Summary:
    Fix an issue for windows.

    Differential Revision: https://reviews.llvm.org/D35372 — yawanng / detail

#312 (Aug 10, 2017 3:04:45 PM)

  1. Revert "[AsmParser] Hash is not a comment on some targets"

    This reverts commit r310457.

    It causes clang-produced IR to fail llvm codegen. — Ahmed Bougacha / detail
  2. Revert "[clang-tidy] Refactor the code and add a close-on-exec check on memfd_create() in Android module."

    This reverts commit r310630.

    The new code broke on Windows and was untested. On Linux, it was
    selecting the "int" overload of operator<<, which definitely does not
    print the right thing when fed a "Mode" char. — rnk / detail
  3. Disable some IR death tests when SEH is available

    They hang for me locally. I suspect that there is a use-after-free when
    attempting to destroy an LLVMContext after asserting from the middle of
    metadata tracking. It doesn't seem worth debugging it further. — rnk / detail
  4. Revert "[DAG] Cleanup unused nodes after store merge. NFCI."

    This reverts commit r310648 which causes an unexpected assertion failure — niravd / detail
  5. [InstCombine] Make (X|C1)^C2 -> X^(C1^C2) iff X&~C1 == 0 work for splat vectors

    This also corrects the description to match what was actually implemented. The old comment said X^(C1|C2), but it implemented X^((C1|C2)&~(C1&C2)). I believe ((C1|C2)&~(C1&C2)) is equivalent to (C1^C2).

    Differential Revision: https://reviews.llvm.org/D36505 — ctopper / detail
  6. [X86] Implement __builtin_cpu_is

    This patch adds support for __builtin_cpu_is. I've tried to match the strings supported to the latest version of gcc.

    Differential Revision: https://reviews.llvm.org/D35449 — ctopper / detail

#311 (Aug 10, 2017 1:17:19 PM)

  1. [DAG]  Relax type restriction for store merge

    Summary: Allow stores of bitcastable types to be merged by peeking through BITCAST nodes and recasting stored values constant and vector extract nodes as necessary.

    Reviewers: jyknight, hfinkel, efriedma, RKSimon, spatel

    Reviewed By: RKSimon

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D34569 — niravd / detail
  2. [CostModel][X86] Add SSE2 two-src shuffle costs — rksimon / detail
  3. [ARM] Clarify legal addressing modes for ARM and Thumb2. NFC

    The existing code is very clever, but not clear, which seems
    like the wrong tradeoff here.

    Differential Revision: https://reviews.llvm.org/D36559 — efriedma / detail
  4. [gold-plugin] Use more StringRef. No functionality change intended. — d0k / detail
  5. Enable ASAN on NetBSD

    Summary:
    This enables also static runtime option.

    Sponsored by <The NetBSD Foundation>

    Reviewers: joerg, vitalybuka, filcab, kcc, fjricci

    Reviewed By: vitalybuka

    Subscribers: mgorny, llvm-commits, #sanitizers

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D36490 — kamil / detail
  6. [CostModel][X86] Add avx1 two-src shuffle costs — rksimon / detail

#310 (Aug 10, 2017 12:03:10 PM)

  1. Enable bunch of sanitizers on NetBSD/X86 and X86_64

    Summary:
    Enable more sanitizers:
    - i386 and amd64:
    * SanitizerKind::Vptr;
    * SanitizerKind::Leak;
    * SanitizerKind::SafeStack;
    * SanitizerKind::Function;

    - amd64 only:
    * SanitizerKind::Thread;

    These sanitizers are in the process of upstreaming to LLVM projects.

    Sponsored by <The NetBSD Foundation>

    Reviewers: joerg, dim, vitalybuka, kcc, filcab, fjricci

    Reviewed By: vitalybuka

    Subscribers: #sanitizers, cfe-commits

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D36482 — kamil / detail
  2. [DAG] Cleanup unused nodes after store merge. NFCI. — niravd / detail
  3. Add NetBSD support in asan_linux.cc

    Summary:
    Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas.

    Sponsored by <The NetBSD Foundation>

    Reviewers: fjricci, vitalybuka, joerg, kcc, filcab

    Reviewed By: vitalybuka

    Subscribers: llvm-commits, kubamracek, #sanitizers

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D36488 — kamil / detail
  4. Enable SafeStack on NetBSD

    Summary:
    make check-safestack:

    -- Testing: 8 tests, 8 threads --
    Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
    Testing Time: 0.44s
      Expected Passes    : 7
      Unsupported Tests  : 1

    Sponsored by <The NetBSD Foundation>

    Reviewers: joerg, vitalybuka, kcc, fjricci, filcab

    Reviewed By: vitalybuka

    Subscribers: mgorny, llvm-commits, #sanitizers

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D36542 — kamil / detail
  5. [CostModel][X86] Add avx2 two-src shuffle costs — rksimon / detail
  6. [clang-tidy] Fix a buildbot.

    Fix format in ReleaseNotes.rst. — yawanng / detail
  7. Make .file directive to have basename only

    Summary:
    Currently LLVM puts directory along with the filename in .file directive, but this behavior doesn't match gcc. There's a no clear description about which one is right (https://sourceware.org/binutils/docs/as/File.html#File), but one document (https://sourceware.org/gdb/current/onlinedocs/stabs/ELF-Linker-Relocation.html) suggests that STT_FILE symbol in elf file is expected to have basename only, which should have a same sting file .file directive according to (https://docs.oracle.com/cd/E26502_01/html/E28388/eoiyg.html).

    This also affects badly on the build system that uses hashing, as the directory info could be differnt from developer to developer even when they're working on same file.

    Reviewers: pcc, mehdi_amini

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D36018 — twoh / detail
  8. [CostModel][X86] Extend two src shuffle cost tests

    Cover most 128/256/512/1024-bit cases for vXf64/vXi64, vXf32/vXi32, vXi16 + vXi8 — rksimon / detail
  9. Disabling openmp-offload.c on linux until it is stabilized on all local configurations. — alekseyshl / detail
  10. [InstCombine] Fix a crash in getSelectCondition if we happen to have two inverse vectors of i1 constants.

    We used to try to truncate the constant vector to vXi1, but if it's already i1 this would fail. Instead we now use IRBuilder::getZExtOrTrunc which should check the type and only create a trunc if needed. I believe this should trigger constant folding in the IRBuilder and ultimately do the same thing just with the additional type check. — ctopper / detail
  11. [InstCombine] Add a DEBUG_COUNTER to InstCombine to limit how many instructions are visited for debug

    Sometimes it would be nice to stop InstCombine mid way through its combining to see the current IR. By using a debug counter we can place an upper limit on how many instructions to process.

    This will also allow skipping the first X combines, but that has the potential to change later combines since earlier canonicalizations might have been skipped.

    Differential Revision: https://reviews.llvm.org/D36553 — ctopper / detail
  12. [DebugCounter] Move the semicolon out of the DEBUG_COUNTER macro and require it to be placed at the end of each use.

    This make it consistent with STATISTIC which it will often appears near.

    While there move one DEBUG_COUNTER instance out of an anonymous namespace. It's already declaring a static variable so the namespace is unnecessary. — ctopper / detail
  13. [gold-plugin] Avoid race condition when creating temporary files.

    This is both a potential security issue and a potential functionality
    issue because we create temporary files from multiple threads. Use
    the safe version of createTemporaryFile instead. — d0k / detail
  14. [CostModel][X86] Add avx512vbmi broadcast/reverse/single-src shuffle cost tests — rksimon / detail
  15. [CostModel][X86] Improve single src shuffle costs

    Add missing SK_PermuteSingleSrc costs for AVX2 targets and earlier, also added some of the simpler SK_PermuteTwoSrc costs to support splitting of SK_PermuteSingleSrc shuffles — rksimon / detail
  16. Fix 'not all control paths return' warning on windows builds. NFCI. — rksimon / detail
  17. [clang-tidy] Refactor the code and add a close-on-exec check on memfd_create() in Android module.

    Summary:
    1. Refactor the structure of the code by adding a base class for all close-on-exec checks, which implements most of the needed functions.
    2. memfd_create() is better to set MFD_CLOEXEC flag to avoid file descriptor leakage.

    Reviewers: alexfh, aaron.ballman, hokein

    Reviewed By: alexfh, hokein

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

    Tags: #clang-tools-extra

    Differential Revision: https://reviews.llvm.org/D35372 — yawanng / detail
  18. [Parse] Document Parser::SkipFunctionBodies

    Reviewers: erikjv, doug.gregor

    Subscribers: cfe-commits

    Differential Revision: https://reviews.llvm.org/D36531 — modocache / detail

#309 (Aug 10, 2017 10:01:54 AM)

  1. [OpenMP] Delete tests in openmp-offload.c which cuase failures
    until a better way to perform these tests is figured out.

    Change connected to diff: D29654 — gbercea / detail
  2. Fixup for r310621: Hint the compilers about unreachable code. — mnbvmar / detail
  3. Add a getName accessor for ModuleMacros.

    Swift would like to be able to access the name of a ModuleMacro.
    There was some discussion of this in
    https://github.com/apple/swift-clang/pull/93, suggesting that it makes
    sense to have this accessor in Clang. — Bob Wilson / detail
  4. Add .rc scripts tokenizer.

    This extends the shell of llvm-rc tool with the ability of tokenization
    of the input files. Currently, ASCII and ASCII-compatible UTF-8 files
    are supported.

    Thanks to Nico Weber (thakis) for his original work in this area.

    Differential Revision: https://reviews.llvm.org/D35957 — mnbvmar / detail
  5. Add "Restored" flag to CalleeSavedInfo

    The liveness-tracking code assumes that the registers that were saved
    in the function's prolog are live outside of the function. Specifically,
    that registers that were saved are also live-on-exit from the function.
    This isn't always the case as illustrated by the LR register on ARM.

    Differential Revision: https://reviews.llvm.org/D36160 — kparzysz / detail
  6. Fixed a race condition in PrecompiledPreamble.

    Summary:
    Two PrecompiledPreambles, used in parallel on separate threads,
    could be writing preamble to the same temporary file.

    Reviewers: bkramer, krasimir, klimek

    Reviewed By: klimek

    Subscribers: cfe-commits

    Differential Revision: https://reviews.llvm.org/D36529 — ibiryukov / detail
  7. Place implictly declared functions at block scope

    Such implicitly declared functions behave as if the enclosing block
    contained the declaration extern int name() (C90, 6.3.3.2 Function calls),
    thus their names should have block scope (C90, 6.1.2.1 Scope of identifiers).

    This patch fixes https://bugs.llvm.org/show_bug.cgi?id=33224

    Differential Revision: https://reviews.llvm.org/D33676 — chill / detail
  8. [mips] Group all `-mabicalls` related checks in the single place. NFC — atanasyan / detail
  9. [mips] Show warning in case of mixing -mlong-calls and -mabicalls options

    While we do not support `-mshared / -mno-shared` properly, show warning
    and ignore `-mlong-calls` option in case of implicitly or explicitly
    provided `-mabicalls` option.

    Differential revision: https://reviews.llvm.org/D36551 — atanasyan / detail
  10. [mips] Notify user that `-mabicalls` is ignored on non-PIC N64 ABI

    The -mabicalls option does not make sense in the case of non position
    independent code for the N64 ABI. After this change the driver shows a
    warning that -mabicalls is ignored in that case.

    Differential revision: https://reviews.llvm.org/D36550 — atanasyan / detail
  11. [InstCombine] add memcpy expansion tests with potential DL dependency; NFC

    Current behavior is to transform these independently of the datalayout.

    There's a proposal to change this in D35035:
    https://reviews.llvm.org/D35035 — spatel / detail
  12. [unittests] Adding a unittest for ChangeTaTargetIndex. NFC

    Differential Revision: https://reviews.llvm.org/D36565 — mggm / detail
  13. [Parse] Document PrintStats, SkipFunctionBodies

    Summary:
    Add documentation for `clang::ParseAST` parameters `PrintStats` and
    `SkipFunctionBodies`. Also, remove a tiny bit of trailing whitespace.

    Reviewers: craig.topper, doug.gregor, erikjv

    Subscribers: cfe-commits

    Differential Revision: https://reviews.llvm.org/D36530 — modocache / detail
  14. [DAG] Rewrite expression. NFC. — niravd / detail
  15. [CostModel][X86] Added v2f64/v2i64 single src shuffle model tests

    Fixed label checks for all prefixes — rksimon / detail
  16. [Modules] Prevent #import to reenter header if not building a module.

    When non-modular headers are imported while not building a module but
    in -fmodules mode, be conservative and preserve the default #import
    semantic: do not reenter headers.

    rdar://problem/33745031 — Bruno Lopes / detail
  17. [X86] Keep dependencies when constructing loads in combineStore

    Summary:
    Preserve chain dependecies between old and new loads constructed to
    prevent loads from reordering below later stores.

    Fixes PR34088.

    Reviewers: craig.topper, spatel, RKSimon, efriedma

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D36528 — niravd / detail
  18. [InstCombine] regenerate test checks; NFC — spatel / detail
  19. [Hexagon] Use isMetaInstruction instead of isDebugValue — kparzysz / detail
  20. [sanitizer-coverage] Change cmp instrumentation to distinguish const operands

    This implementation of SanitizerCoverage instrumentation inserts different
    callbacks depending on constantness of operands:

      1. If both operands are non-const, then a usual
         __sanitizer_cov_trace_cmp[1248] call is inserted.
      2. If exactly one operand is const, then a
         __sanitizer_cov_trace_const_cmp[1248] call is inserted. The first
         argument of the call is always the constant one.
      3. If both operands are const, then no callback is inserted.

    This separation comes useful in fuzzing when tasks like "find one operand
    of the comparison in input arguments and replace it with the other one"
    have to be done. The new instrumentation allows us to not waste time on
    searching the constant operands in the input.

    Patch by Victor Chibotaru. — glider / detail
  21. [InstCombine] regenerate test checks, add comments; NFC — spatel / detail
  22. [sanitizer_common] Update sanitizers w.r.t. the new comparisons instrumentation API

    Added declarations of __sanitizer_cov_trace_const_cmp[1248] callbacks.
    For more details, please see https://reviews.llvm.org/D36465.

    Patch by Victor Chibotaru. — glider / detail
  23. [NewGVN] Add CL option to control the generation of phi-of-ops (disable by default).

    Differential Revision: https://reviews.llvm.org/D36478539 — mcrosier / detail
  24. [SelectionDAG] Allow constant folding for implicitly truncating BUILD_VECTOR nodes.

    In FoldConstantArithmetic, handle BUILD_VECTOR nodes that do implicit truncation on the elements.

    This is similar to what is done in FoldConstantVectorArithmetic.

    Differential Revision:
    https://reviews.llvm.org/D36506 — guyblank / detail
  25. [libFuzzer] Update LibFuzzer w.r.t. the new comparisons instrumentation API

    Added the _sanitizer_cov_trace_const_cmp[1248] callbacks.
    For now they are implemented the same way as _sanitizer_cov_trace_cmp[1248].
    For more details, please see https://reviews.llvm.org/D36465.

    Patch by Victor Chibotaru. — glider / detail
  26. [CMake][LLVM] Remove duplicated library mask. Broken clang linking against clangShared

    Summary:
    The `LLVM${c}Info` mask is listed twice in LLVM-Config.cmake. This results in the libraries such as LLVMARMInfo, LLVMAArch4Info, etc appearing twice in `extract_symbols.py` command line while building `clangShared`. `Extract_symbols.py` does not work well in such a case and completely ignores the symbols from the duplicated libraries. Thus, the LLVM(...)Info symbols do not get exported from `clangShared` and linking clang against it fails with unresolved dependencies.

    Seems to be a mere copy-paste mistake.

    Reviewers: beanz, chapuni

    Reviewed By: chapuni

    Subscribers: chapuni, aemerson, mgorny, kristof.beyls, llvm-commits, asl

    Differential Revision: https://reviews.llvm.org/D36119 — oleg / detail
  27. [clang-tidy] Add integer division check

    Patch by: Reka Nikolett Kovacs

    Differential Revision: https://reviews.llvm.org/D35932 — xazax / detail
  28. [compiler-rt][ARM] Fix filtering of ARM targets

    Summary:
    Similarly to i686, the ARM build target has multiple names, such as armhf, armv7 and so on. Currently we get duplicated symbol definitions for these targets while compiling the library. Each duplicated definition has its generic version from `lib/builtins` and an ARM-specialized version from `lib/builtins/arm`.

    This patch fixes filtering for ARM to ignore the generic definitions if they have their ARM specializations.

    Reviewers: compnerd

    Reviewed By: compnerd

    Subscribers: aemerson, dberris, llvm-commits, mgorny, asl, kristof.beyls

    Differential Revision: https://reviews.llvm.org/D35336 — oleg / detail
  29. [clang-tidy] Updated docs and release notes for r310584 — alexfh / detail
  30. [clang-tidy] Add a test. — alexfh / detail
  31. [clang-tidy] Enable test for http://llvm.org/PR26228 — alexfh / detail
  32. [clang-tidy] Add modernize-use-emplace.IgnoreImplicitConstructors option — alexfh / detail
  33. [ValueTracking] Enabling ValueTracking patch by default (recommit). Part 2.

    The original patch was an improvement to IR ValueTracking on non-negative
    integers. It has been checked in to trunk (D18777, r284022). But was disabled by
    default due to performance regressions.
    Perf impact has improved. The patch would be enabled by default.

    Reviewers: reames, hfinkel

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

    Patch by: Olga Chupina <olga.chupina@intel.com> — n.bozhenov / detail
  34. [ValueTracking] Enabling ValueTracking patch by default (recommit). Part 1.

    The original patch was an improvement to IR ValueTracking on non-negative
    integers. It has been checked in to trunk (D18777, r284022). But was disabled by
    default due to performance regressions.
    Perf impact has improved. The patch would be enabled by default.

    Reviewers: reames, hfinkel

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

    Patch by: Olga Chupina <olga.chupina@intel.com> — n.bozhenov / detail
  35. Revert r310489 and follow-up commits r310505, r310519, r310537 and r310549

    Commit r310489 caused 'openmp-offload.c' test failures on Darwin and other
    platforms:
    http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_check/39230/testReport/junit/Clang/Driver/openmp_offload_c/

    The follow-up commits tried to fix the test, but the test is still failing. — arphaman / detail
  36. [mips][microMIPS] Extending size reduction pass with XOR16
    Author: milena.vujosevic.janicic
    Reviewers: sdardis
    The patch extends size reduction pass for MicroMIPS.
    XOR instruction is transformed into 16-bit instruction XOR16, if possible.
    Differential Revision: https://reviews.llvm.org/D34239 — zjovanovic / detail
  37. [clang-tidy] Fix an error in the doc. — hokein / detail
  38. [clang-tidy] add forwarders in the aliased checks from hicpp module

    Summary: Adds redirections notes and the actual redirections in the documentation for hicpp

    Patch by: Jonas Toth

    Reviewers: aaron.ballman, hokein, alexfh

    Reviewed By: aaron.ballman, hokein

    Subscribers: JDevlieghere, xazax.hun

    Differential Revision: https://reviews.llvm.org/D36355 — hokein / detail
  39. [Lexer] Finding beginning of token with escaped new line

    Summary:
    Lexer::GetBeginningOfToken produced invalid location when
    backtracking across escaped new lines.

    This fixes PR26228

    Reviewers: akyrtzi, alexfh, rsmith, doug.gregor

    Reviewed By: alexfh

    Subscribers: alexfh, cfe-commits

    Patch by Paweł Żukowski!

    Differential Revision: https://reviews.llvm.org/D30748 — alexfh / detail
  40. [AArch64] Assembler support for v8.3 RCpc

    Added assembler and disassembler support for the new Release
    Consistent processor consistent instructions, introduced with ARM
    v8.3-A for AArch64.

    Differential Revision: https://reviews.llvm.org/D36522 — sam_parker / detail
  41. [ARM][AArch64] ARMv8.3-A enablement

    The beta ARMv8.3 ISA specifications have been released for AArch64
    and AArch32, these can be found at:
    https://developer.arm.com/products/architecture/a-profile/exploration-tools

    An introduction to this architecture update can be found at:
    https://community.arm.com/processors/b/blog/posts/armv8-a-architecture-2016-additions

    This patch is the first in a series which will add ARM v8.3-A support
    in LLVM and Clang. It adds the necessary changes that create targets
    for both the ARM and AArch64 backends.

    Differential Revision: https://reviews.llvm.org/D36514 — sam_parker / detail
  42. [clang-tidy] Fix a check-fixes line — xazax / detail
  43. [clang-tidy] Minor documentation improvement

    Patch by: Lilla Barancsuk — xazax / detail
  44. [clang-tidy] Add missing doc in cppcoreguidelines-c-copy-assignment-signature check. — hokein / detail
  45. Enable running 'lnt runtest test-suite' instead of 'lnt runtest nt'.

    A typical configuration for a builder using this to track performance
    of code generated by LLVM could be:

    {
        'name': "builder-name",
        'slavenames': ["slave-name"],
        'builddir': "builder-builddir",
        'factory': ClangBuilder.getClangCMakeBuildFactory(
                      jobs=8,
                      clean=False,
                      checkout_compiler_rt=False,
                      checkout_lld=False,
                      test=False,
                      useTwoStage=False,
                      runTestSuite=True,
                      env={'PATH':'/usr/lib/ccache:/usr/local/sbin:'+
                                  '/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'},
                      testsuite_flags=['--cppflags', '-O3',
                                       '--threads=1',
                                       '--build-threads=8',
                                       '--use-perf=all',
                                       '--run-under', 'taskset -c 1',
                                       '--benchmarking-only',
                                       '--exec-multisample=3',
                                       '--exclude-stat-from-submission=compile'],
                      extra_cmake_args=["-DLLVM_TARGETS_TO_BUILD='AArch64'",
                                        "-DLLVM_PARALLEL_LINK_JOBS=4"],
                      submitURL='http://lnt.llvm.org/submitRun',
                      testerName='LNT-AArch64-O3'),
        'category': 'clang'
    }

    The only difference to using the somewhat deprecated 'lnt runtest nt'
    is that a "testsuite_flags" parameter is defined instead of an
    "nt_flags" parameter.

    Differential Revision: https://reviews.llvm.org/D35402 — kbeyls / detail
  46. [SelectionDAG] When scalarizing vselect, don't assert on
    a legal cond operand.

    When scalarizing the result of a vselect, the legalizer currently expects
    to already have scalarized the operands. While this is true for the true/false
    operands (which have the same type as the result), it is not case for the
    condition operand. On X86 AVX512, v1i1 is legal - this leads to operations such
    as '< N x type> vselect < N x i1> < N x type> < N x type>' where < N x type > is
    illegal to hit an assertion during the scalarization.

    The handling is similar to r205625.
    This also exposes the fact that (v1i1 extract_subvector) should be legal
    and selectable on AVX512 - We do this by custom lowering to vector_extract_elt.
    This still leaves us in some cases with redundant dag nodes which will be
    combined in a separate soon to come patch.

    This fixes pr33349.

    Differential revision: https://reviews.llvm.org/D36511 — eladcohen / detail
  47. Revert part of r310296 to make it really NFC for instrumentation PGO.

    Summary: Part of r310296 will disable PGOIndirectCallPromotion in ThinLTO backend if PGOOpt is None. However, as PGOOpt is not passed down to ThinLTO backend for instrumentation based PGO, that change would actually disable ICP entirely in ThinLTO backend, making it behave differently in instrumentation PGO mode. This change reverts that change, and only disable ICP there when it is SamplePGO.

    Reviewers: davidxl

    Reviewed By: davidxl

    Subscribers: sanjoy, mehdi_amini, eraman, llvm-commits

    Differential Revision: https://reviews.llvm.org/D36566 — dehao / detail
  48. [OpenMP] Provide a default GPU arch that is supported by
    the underlying hardware.

    This fixes a bug triggered by diff: D29660 — gbercea / detail
  49. [Driver] Search compiler-rt paths in -print-file-name=

    This makes it possible to print the name of compiler-rt libraries
    by using simply clang -print-file-name=libclang_rt.${runtime}-${arch}.so
    same as other libraries, without having to know the details of the
    resource directory organization.

    Differential Revision: https://reviews.llvm.org/D35820 — phosek / detail
  50. [LCG] Fix an assert in a on-scope-exit lambda that checked the contents
    of the returned value.

    Checking the returned value from inside of a scoped exit isn't actually
    valid. It happens to work when NRVO fires and the stars align, which
    they reliably do with Clang but don't, for example, on MSVC builds. — chandlerc / detail
  51. [LVI] Fix LVI compile time regression around constantFoldUser()

    Summary:
    Avoid checking each operand and calling getValueFromCondition() before calling
    constantFoldUser() when the instruction type isn't supported by
    constantFoldUser().

    This fixes a large compile time regression in an internal build.

    Reviewers: sanjoy

    Reviewed By: sanjoy

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D36552 — yamauchi / detail
  52. [clang-format] let PointerAlignment dictate spacing of function ref qualifiers

    Summary: The original changes for ref qualifiers in rL272537 and rL272548 allowed function const+ref qualifier spacing to diverge from the spacing used for variables. It seems more consistent for `T const& x;` to match `void foo() const&;`.

    Reviewers: djasper

    Reviewed By: djasper

    Subscribers: klimek, cfe-commits

    Differential Revision: https://reviews.llvm.org/D34324 — jtbandes / detail
  53. Linker: Create a function declaration when moving a non-prevailing alias of function type.

    We were previously creating a global variable of function type,
    which is invalid IR. This issue was exposed by r304690, in which we
    started asserting that global variables were of a valid type.

    Fixes PR33462.

    Differential Revision: https://reviews.llvm.org/D36438 — pcc / detail
  54. [InstSimplify] Add test cases that show that simplifySelectWithICmpCond doesn't work with non-canonical comparisons. — ctopper / detail
  55. [AMDGPU] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). — eugenezelenko / detail
  56. Remove unused function — arsenm / detail
  57. clang-format: Fix bug with ENAS_DontAlign and empty lines

    This fixes a bug in `ENAS_DontAlign` (introduced in D32733) where blank lines had an EscapedNewlineColumn of 0, causing a subtraction to overflow when converted back to unsigned and leading to runaway memory allocation.

    Differential Revision: https://reviews.llvm.org/D36019 — jtbandes / detail
  58. [OpenMP] Remove offending test.

    Diff: D29660 — gbercea / detail
  59. Fix thinlto cache key computation for cfi-icall.

    Summary:
    Fixed PR33966.

    CFI code generation for users (not just callers) of a function depends
    on whether this function has a jumptable entry or not. This
    information needs to be encoded in of thinlto cache key.

    We filter the jumptable list against functions that are actually
    referenced in the current module.

    Subscribers: mehdi_amini, inglorion, eraman, hiraditya

    Differential Revision: https://reviews.llvm.org/D36346 — eugenis / detail
  60. ARM: Fix CMP_SWAP expansion

    Clean up after my misguided attempt in r304267 to "fix" CMP_SWAP
    returning an uninitialized status value.

    - I was always using tMOVi8 to zero the status register which cannot
      encode higher register numbers and llvm would silently miscompile)

    - Nobody was ever looking at that status value outside the expansion.
      ARMDAGToDAGISel::SelectCMP_SWAP() the only place creating CMP_SWAP
      instructions was not mapping anything to it. (The cmpxchg status value
      from llvm IR is lowered to a manual comparison after the CMP_SWAP)

    So this:
    - Renames the register from "status" to "temp" it make it obvious that
      it isn't used outside the expansion.
    - Remove the zeroing status/temp register.
    - Keep the live-in list improvements from r304267

    Fixes http://llvm.org/PR34056 — matze / detail
  61. LangRef: Fix/improve cmpxchg wording — matze / detail

#308 (Aug 9, 2017 3:16:23 PM)

  1. [clang-tidy] Don't compute the edit distance if it's over the threshold.

    No functional change intended. — d0k / detail
  2. [Path] Sink predicate computations to their uses. NFCI. — d0k / detail
  3. [X86][Asm] Allow negative immediate to appear before bracketed expression

    Currently, only non-negative immediate is allowed prior to a brac expression (memory reference).
    MASM / GAS does not have any problem cope with the left side of the real line, so we should be able to as well.

    llvm: D36229

    Differential Revision: https://reviews.llvm.org/D36230 — coby / detail
  4. [X86][Asm] Allow negative immediate to appear before bracketed expression

    Currently, only non-negative immediate is allowed prior to a brac expression (memory reference).
    MASM / GAS does not have any problem cope with the left side of the real line, so we should be able to as well.

    Differntial Revision: https://reviews.llvm.org/D36229 — coby / detail
  5. AMDGPU: Use direct struct returns and arguments

    This is an improvement over always using byval for
    structs.

    This will use registers until ~16 are used, and then
    switch back to byval. This needs more work, since I'm
    not sure it ever really makes sense to use byval. If
    the register limit is exceeded, the arguments still
    end up passed on the stack, but with a different ABI.
    It also may make sense to base this on number of
    registers used for non-struct arguments, rather than
    just arguments that appear first in the argument list. — arsenm / detail
  6. [Hexagon] Ignore DBG_VALUEs when counting instructions in hexagon-early-if — kparzysz / detail
  7. Use unsigned instead of an enum for map keys

    ubsan's enum sanitizer doesn't like the latter, and we had to have
    out-of-bounds values for DenseMapInfo's tombstone/empty keys. — George Burgess IV / detail
  8. [Linker] PR33527 - Linker::LinkOnlyNeeded should import AppendingLinkage globals

    Linker::LinkOnlyNeeded should always import globals with
    AppendingLinkage.

    This resolves PR33527.

    Differential Revision: https://reviews.llvm.org/D34448 — belleyb / detail
  9. [Sema] Assign new flag -Wenum-compare-switch to switch-related parts of -Wenum-compare

    Patch by: Reka Nikolett Kovacs

    Differential Revision: https://reviews.llvm.org/D36526 — xazax / detail
  10. [Docs] Remove a stray period from a code example in the Programmer's Manual. — ctopper / detail
  11. [OpenMP] Fix failing test for D29660.

    Non-functional change. — gbercea / detail
  12. [llvm-cov] Rearrange entries in report index.

    Files which don't contain any functions are likely useless; don't
    include them in the main table. Put the links at the bottom of the
    page, in case someone wants to figure out coverage for code inside
    a macro.

    Not sure if this is the best solution, but it seems like an
    improvement.

    Differential Revision: https://reviews.llvm.org/D36298 — efriedma / detail
  13. [RuntimeDyld][ORC] Add support for Thumb mode to RuntimeDyldMachOARM.

    This patch adds support for thumb relocations to RuntimeDyldMachOARM, and adds
    a target-specific flags field to JITSymbolFlags (so that on ARM we can record
    whether each symbol is Thumb-mode code).

    RuntimeDyldImpl::emitSection is modified to ensure that stubs memory is
    correctly aligned based on the size returned by getStubAlignment(). — Lang Hames / detail
  14. Make -std=c++17 an alias of -std=c++1z

    As suggested on PR33912.

    Trying to keep this small to make it easy to merge to the 5.0 branch. We
    can do a follow-up with more thorough renaming (diagnostic text,
    options, ids, etc.) later.

    (For C++14 this was done in r215982, and I think a smaller patch for the
    3.5 branch:
    http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20140818/113013.html)

    Differential Revision: https://reviews.llvm.org/D36532 — hans / detail
  15. AMDGPU: Fix assert on n inline asm constraint — arsenm / detail
  16. [Hexagon] Tie implicit uses to defs in predicated instructions — kparzysz / detail
  17. [OpenMP] Enable executable lookup into driver directory.

    Summary: Invoking the compiler inside a script causes the clang-offload-bundler executable to not be found. This patch enables the lookup for executables in the driver directory where the clang-offload-bundler resides.

    Reviewers: hfinkel, carlo.bertolli, arpith-jacob, ABataev, caomhin

    Reviewed By: hfinkel

    Subscribers: cfe-commits

    Differential Revision: https://reviews.llvm.org/D36537 — gbercea / detail
  18. [OPENMP] Emit non-debug version of outlined functions with original
    name.

    If the host code is compiled with the debug info, while the target
    without, there is a problem that the compiler is unable to find the
    debug wrapper. Patch fixes this problem by emitting special name for the
    debug version of the code. — abataev / detail
  19. [SimplifyCFG] remove checks for crasher test from r310481

    Not sure why the earlier version would fail, but trying to get the bots
    (and my local machine) to pass again. — spatel / detail
  20. [InstCombine] narrow rotate left/right patterns to eliminate zext/trunc (PR34046)

    I couldn't find any smaller folds to help the cases in:
    https://bugs.llvm.org/show_bug.cgi?id=34046
    after:
    rL310141

    The truncated rotate-by-variable patterns elude all of the existing transforms because
    of multiple uses and knowledge about demanded bits and knownbits that doesn't exist
    without the whole pattern. So we need an unfortunately large pattern match. But by
    simplifying this pattern in IR, the backend is already able to generate
    rolb/rolw/rorb/rorw for x86 using its existing rotate matching logic (although
    there is a likely extraneous 'and' of the rotate amount).

    Note that rotate-by-constant doesn't have this problem - smaller folds should already
    produce the narrow IR ops.

    Differential Revision: https://reviews.llvm.org/D36395 — spatel / detail
  21. PointerLikeTypeTraits: class->struct to match LLVM change — dblaikie / detail
  22. PointerLikeTypeTraits: class->struct & remove the base definition

    This simplifies implementations and removing the base definition paves
    the way for detecting whether a type is 'pointer like'. — dblaikie / detail
  23. Reduce variable scope by moving declaration into if clause — dblaikie / detail
  24. [OpenMP] Make the PTX version tests general enough to work on all toolchains.

    Add explicit test for Darwin and PowerPC. Clean-up tests.

    Non-functional change.

    Original diff: D29660 — gbercea / detail
  25. [asan] Fix instruction emission ordering with dynamic shadow.

    Summary:
    Instrumentation to copy byval arguments is now correctly inserted
    after the dynamic shadow base is loaded.

    Reviewers: vitalybuka, eugenis

    Reviewed By: vitalybuka

    Subscribers: hiraditya, llvm-commits

    Differential Revision: https://reviews.llvm.org/D36533 — morehouse / detail
  26. [COFF, ARM64] Add MS builtins __dmb, __dsb, __isb

    Reviewers: mstorsjo, rnk, ruiu, compnerd, efriedma

    Reviewed By: efriedma

    Subscribers: efriedma, aemerson, javed.absar, kristof.beyls, llvm-commits

    Differential Revision: https://reviews.llvm.org/D36110 — mgrang / detail

#307 (Aug 9, 2017 10:29:01 AM)

  1. [X86][AVX512] Choose correct registers in vpbroadcastb/w

    Fixes the vpbroadcastb/w instructions which use GPRs as source operands, to use the correct registers.
    The full GPR should be used, and not the subregister, as it happens before the patch.

    Fixes pr33795

    Differential Revision:
    https://reviews.llvm.org/D36479 — guyblank / detail
  2. [AMDGPU][MC][GFX9] Added 16-bit renamed and "_legacy" VALU opcodes

    See Bug 33629: https://bugs.llvm.org//show_bug.cgi?id=33629

    Reviewers: vpykhtin, SamWot, arsenm

    Differential Revision: https://reviews.llvm.org/D36322 — dpreobra / detail
  3. [clang-tidy] Fix another crash in make-unique check.

    Summary:
    The crash happens when calling `reset` method without any preceding
    operation like "->" or ".", this could happen in a subclass of the
    "std::unique_ptr".

    Reviewers: alexfh

    Reviewed By: alexfh

    Subscribers: JDevlieghere, xazax.hun, cfe-commits

    Differential Revision: https://reviews.llvm.org/D36452 — hokein / detail
  4. CFLAA: return MustAlias when pointers p, q are equal, i.e.,
    must-alias(p, sz_p, p, sz_q)  irrespective of access sizes sz_p, sz_q

    As discussed a couple of weeks ago on the ML.
    This makes the behavior consistent with that of BasicAA.
    AA clients already check the obj size themselves and may not require the
    obj size to match exactly the access size (e.g., in case of store forwarding) — nlopes / detail
  5. [ValueTracking] Turn a test into an assertion.

    As discussed with Chad, this should never happen, but this
    assertion is basically free, so, keep it around just in case. — davide / detail
  6. [ValueTracking] Update tests to unbreak the bots. — davide / detail
  7. [clang-tidy] Ignore newlines in checks list

    This is a follow up to https://reviews.llvm.org/D30567 where I overlooked that
    LLVM YAML parser doesn't support multiline literal folding. — alexfh / detail
  8. [x86] add more tests for select-of-constants; NFC

    This is to help recommit a fixed version of r310208. As shown in PR34097,
    we could miscompile if subtraction of the constants overflowed. — spatel / detail
  9. [OpenMP] Add flag for overwriting default PTX version for OpenMP targets

    Summary:
    This flag "--fopenmp-ptx=" enables the overwriting of the default PTX version used for GPU offloaded OpenMP target regions: "+ptx42".



    Reviewers: arpith-jacob, caomhin, carlo.bertolli, ABataev, Hahnfeld, jlebar, hfinkel, tstellar

    Reviewed By: ABataev

    Subscribers: rengolin, cfe-commits

    Differential Revision: https://reviews.llvm.org/D29660 — gbercea / detail
  10. Change the way the literal operators are defined - now w/o a seperating space. This should be a NFC, but it will change how the compiler parses it. — marshall / detail
  11. [ARM] Emit error when ARM exec mode is not available.

    Summary:
    A similar error message has been removed from the ARMTargetMachineBase
    constructor in r306939. With this patch, we generate an error message
    for the example below, compiled with -mcpu=cortex-m0, which does not
    have ARM execution mode.

        __attribute__((target("arm"))) int foo(int a, int b)
        {
            return a + b % a;
        }

        __attribute__((target("thumb"))) int bar(int a, int b)
        {
            return a + b % a;
        }

    By adding this error message to ARMBaseTargetMachine::getSubtargetImpl,
    we can deal with functions that set -thumb-mode in target-features.
    At the moment it seems like Clang does not have access to target-feature
    specific information, so adding the error message to the frontend will
    be harder.

    Reviewers: echristo, richard.barton.arm, t.p.northover, rengolin, efriedma

    Reviewed By: echristo, efriedma

    Subscribers: efriedma, aemerson, javed.absar, kristof.beyls

    Differential Revision: https://reviews.llvm.org/D35627 — fhahn / detail
  12. [X86][Asm]Allow far jmp/call to be picked when using explicit FWORD size specifier

    Currently, far jmp/call which utilizes a 48bit memory operand would have been invoked via the 'lcall/ljmp' mnemonic (intel style).
    This patch align those variants to formal intel spec

    Differential Revision: https://reviews.llvm.org/D35846 — coby / detail
  13. [OpenMP] Add flag for disabling the default generation of relocatable OpenMP target code for NVIDIA GPUs.

    Summary: Previously we have added the "-c" flag which gets passed to PTXAS by default to generate relocatable OpenMP target code by default. This set of flags exposes control over this behaviour.

    Reviewers: arpith-jacob, caomhin, carlo.bertolli, ABataev, Hahnfeld, jlebar, hfinkel, tstellar

    Reviewed By: ABataev

    Subscribers: Hahnfeld, rengolin, cfe-commits

    Differential Revision: https://reviews.llvm.org/D29659 — gbercea / detail
  14. Fix broken getAttributeSpellingListIndex for pragma attributes

    We noticed when implementing a new pragma that the TableGen-generated function
    getAttributeSpellingListIndex() did not work for pragma attributes. It relies
    on the values in the enum AttributeList::Syntax and a new value
    AS_ContextSensitiveKeyword was added changing the value for AS_Pragma.
    Apparently no tests failed since no pragmas currently make use of the
    generated function.

    To fix this we can move AS_Pragma back to the value that TableGen code expects.
    Also to prevent changes in the enum from breaking that routine again I added
    calls to getAttributeSpellingListIndex() in the unroll pragma code. That will
    cause some lit test failures if the order is changed. I added a comment to
    remind of this issue in the future.

    This assumes we don’t need/want full TableGen support for
    AS_ContextSensitiveKeyword. It currently only appears in getAttrKind and no
    other TableGen-generated routines.

    Patch by: mikerice

    Differential Revision: https://reviews.llvm.org/D36473 — erichkeane / detail

#306 (Aug 9, 2017 8:26:21 AM)

  1. clang-format: [JS] detect ASI after closing parens.

    Summary: A closing parenthesis followed by a declaration or statement should always terminate the current statement.

    Reviewers: djasper

    Subscribers: klimek, cfe-commits

    Differential Revision: https://reviews.llvm.org/D36491 — mprobst / detail
  2. [ValueTracking] Honour recursion limit.

    The recently improved support for `icmp` in ValueTracking
    (r307304) exposes the fact that `isImplied` condition doesn't
    really bail out if we hit the recursion limit (and calls
    `computeKnownBits` which increases the depth and asserts).

    Differential Revision:  https://reviews.llvm.org/D36512 — davide / detail
  3. [AArch64] Assembler support for the ARMv8.2a dot product instructions

    Dot product is an optional ARMv8.2a extension, see also the public architecture
    specification here:
    https://developer.arm.com/products/architecture/a-profile/exploration-tools.
    This patch adds AArch64 assembler support for these dot product instructions.

    Differential Revision: https://reviews.llvm.org/D36515 — sjoerdmeijer / detail
  4. [OpenMP] Make OpenMP generated code for the NVIDIA device relocatable by default

    Original Diff: D29642

    This patch was previously reverted due to an error with patch D29654
    that this depends on. — gbercea / detail
  5. Reapply Sema: allow imaginary constants via GNU extension if UDL overloads not present.

    C++14 added user-defined literal support for complex numbers so that you
    can write something like "complex<double> val = 2i". However, there is
    an existing GNU extension supporting this syntax and interpreting the
    result as a _Complex type.

    This changes parsing so that such literals are interpreted in terms of
    C++14's operators if an overload is present but otherwise falls back to
    the original GNU extension.

    (We now have more robust diagnostics for implicit conversions so the
    libc++ test that caused the original revert still passes). — Tim Northover / detail
  6. [OpenCL] Minor refactoring to reduce copy/pasted code

    Set the type of TheCall inside SemaBuiltinReserveRWPipe to reduce
    duplicated code. — joey / detail
  7. [ARM] Remove FeatureNoARM implies ModeThumb.

    Summary:
    By removing FeatureNoARM implies ModeThumb, we can detect cases where a
    function's target-features contain -thumb-mode (enables ARM codegen for the
    function), but the architecture does not support ARM mode. Previously, the
    implication caused the FeatureNoARM bit to be cleared for functions with
    -thumb-mode, making the assertion in ARMSubtarget::ARMSubtarget [1]
    pointless for such functions.

    This assertion is the only guard against generating ARM code for
    architectures without ARM codegen support. Is there a place where we
    could easily generate error messages for the user? At the moment, we
    would generate ARM code for Thumb-only architectures. X86 has the same
    behavior as ARM, as in it only has an assertion and no error message,
    but I think for ARM an error message would be helpful. What do you
    think?

    For the example below, `llc -mtriple=armv7m-eabi test.ll -o -` will
    generate ARM assembler (or fail with an assertion error with this patch).
    Note that if we run the resulting assembler through llvm-mc, we get
    an appropriate error message, but not when codegen is handled
    through clang.

    ```
    define void @bar() #0 {
    entry:
      ret void
    }

    attributes #0 = { "target-features"="-thumb-mode" }
    ```

    [1] https://github.com/llvm-mirror/llvm/blob/c1f7b54cef62e9c8aa745d40bea146a167bf844e/lib/Target/ARM/ARMSubtarget.cpp#L147

    Reviewers: t.p.northover, rengolin, peter.smith, aadg, silviu.baranga, richard.barton.arm, echristo

    Reviewed By: rengolin, echristo

    Subscribers: efriedma, aemerson, javed.absar, kristof.beyls, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35569 — fhahn / detail
  8. [Support] PR33388 - Fix formatv_object move constructor

    formatv_object currently uses the implicitly defined move constructor,
    but it is buggy. In typical use-cases, the problem doesn't show-up
    because all calls to the move constructor are elided. Thus, the buggy
    constructors are never invoked.

    The issue especially shows-up when code is compiled using the
    -fno-elide-constructors compiler flag. For instance, this is useful when
    attempting to collect accurate code coverage statistics.

    The exact issue is the following:

    The Parameters data member is correctly moved, thus making the
    parameters occupy a new memory location in the target
    object. Unfortunately, the default copying of the Adapters blindly
    copies the vector of pointers, leaving each of these pointers
    referencing the parameters in the original object instead of the copied
    one. These pointers quickly become dangling when the original object is
    deleted. This quickly leads to crashes.

    The solution is to update the Adapters pointers when performing a move.
    The copy constructor isn't useful for format objects and can thus be
    deleted.

    This resolves PR33388.

    Differential Revision: https://reviews.llvm.org/D34463 — belleyb / detail
  9. [DAG] Explicitly cleanup merged load values during store merge. NFCI. — niravd / detail
  10. [X86][Ms-InlineAsm] Extend MS Dot operator to accept "this" + struct/class pointers aliases

    MS InlineAsm Dot operator accepts "Bases" such as "this" (cpp) and class/struct pointer typedef.
    This patch enhance its implementation with this behavior.

    Differential Revision: https://reviews.llvm.org/D36450 — coby / detail
  11. [clangd] Fixed a bug in make_tagged.

    It accidentally std::move'd from Value parameter if it deduced to an
    l-value ref. — ibiryukov / detail
  12. Fix -Wpessimizing-move warning. — hokein / detail
  13. [Sema] -Wenum-compare no longer warn on anonymous enums in switch statements

    Patch by: Reka Nikolett Kovacs — xazax / detail
  14. [AsmParser][AVX512]Enhance OpMask/Zero/Merge syntax check rubostness

    Adopt a more strict approach regarding what marks should/can appear after a destination register, when operating upon an AVX512 platform.

    Differential Revision: https://reviews.llvm.org/D35785 — coby / detail
  15. Revert "PR19668, PR23034: Fix handling of move constructors and deleted copy constructors when deciding whether classes should be passed indirectly."

    This reverts commit r310401 because it seems to have broken some ARM
    bot(s). — rovka / detail

#305 (Aug 9, 2017 4:58:39 AM)

  1. [LSR / TTI / SystemZ]  Eliminate TargetTransformInfo::isFoldableMemAccess()

    isLegalAddressingMode() has recently gained the extra optional Instruction*
    parameter, and therefore it can now do the job that previously only
    isFoldableMemAccess() could do.

    The SystemZ implementation of isLegalAddressingMode() has gained the
    functionality of checking for offsets, which used to be done with
    isFoldableMemAccess().

    The isFoldableMemAccess() hook has been removed everywhere.

    Review: Quentin Colombet, Ulrich Weigand
    https://reviews.llvm.org/D35933 — jonpa / detail
  2. [LoopStrengthReduce]  Don't neglect the Fixup.Offset in isAMCompletelyFolded().

    In the recursive call to isAMCompletelyFolded(), the passed offset should be
    the sum of F.BaseOffset and Fixup.Offset.

    Review: Quentin Colombet. — jonpa / detail
  3. [mips] PR34083 - Wimplicit-fallthrough warning in MipsAsmParser.cpp

    Assert that a binary expression is actually a binary expression,
    rather than potientially incorrectly attempting to handle it as a
    unary expression.

    This resolves PR34083.

    Thanks to Simonn Pilgrim for reporting the issue! — sdardis / detail
  4. Suppress a warning. NFC. — xazax / detail
  5. [clang-format] Put '/**' and '*/' on own lines in jsdocs ending in comment pragmas

    Summary:
    This handles a case where the trailing '*/' of a multiline jsdoc eding in a
    comment pragma wouldn't be put on a new line.

    Reviewers: mprobst

    Reviewed By: mprobst

    Subscribers: cfe-commits, klimek

    Differential Revision: https://reviews.llvm.org/D36359 — krasimir / detail
  6. [AsmParser] Hash is not a comment on some targets

    The '#' token is not a comment for all targets (on ARM and AArch64 it marks an
    immediate operand), so we shouldn't treat it as such.

    Comments are already converted to AsmToken::EndOfStatement by
    AsmLexer::LexLineComment, so this check was unnecessary.

    Differential Revision: https://reviews.llvm.org/D36405 — olista01 / detail
  7. [LCG] Completely remove the map-based association of post-order numbers
    to Nodes when removing ref edges from a RefSCC.

    This map based association turns out to be pretty expensive for large
    RefSCCs and pointless as we already have embedded data members inside
    nodes that we use to track the DFS state. We can reuse one of those and
    the map becomes unnecessary.

    This also fuses the update of those numbers into the scan across the
    pending stack of nodes so that we don't walk the nodes twice during the
    DFS.

    With this I expect the new PM to be faster than the old PM for the test
    case I have been optimizing. That said, it also seems simpler and more
    direct in many ways. The side storage was always pretty awkward.

    The last remaining hot-spot in the profile of the LCG once this is done
    will be the edge iterator walk in the DFS. I'll take a look at improving
    that next. — chandlerc / detail
  8. [GlobalOpt] Switch an explicit loop to llvm::all_of(). NFCI. — davide / detail
  9. [LCG] Special case when removing a ref edge from a RefSCC leaves
    that RefSCC still connected.

    This is common and can be handled much more efficiently. As soon as we
    know we've covered every node in the RefSCC with the DFS, we can simply
    reset our state and return. This avoids numerous data structure updates
    and other complexity.

    On top of other changes, this appears to get new PM back to parity with
    the old PM for a large protocol buffer message source code. The dense
    map updates are very hot in this function. — chandlerc / detail
  10. [LCG] Switch one of the update methods for the LazyCallGraph to support
    limited batch updates.

    Specifically, allow removing multiple reference edges starting from
    a common source node. There are a few constraints that play into
    supporting this form of batching:

    1) The way updates occur during the CGSCC walk, about the most we can
       functionally batch together are those with a common source node. This
       also makes the batching simpler to implement, so it seems
       a worthwhile restriction.
    2) The far and away hottest function for large C++ files I measured
       (generated code for protocol buffers) showed a huge amount of time
       was spent removing ref edges specifically, so it seems worth focusing
       there.
    3) The algorithm for removing ref edges is very amenable to this
       restricted batching. There are just both API and implementation
       special casing for the non-batch case that gets in the way. Once
       removed, supporting batches is nearly trivial.

    This does modify the API in an interesting way -- now, we only preserve
    the target RefSCC when the RefSCC structure is unchanged. In the face of
    any splits, we create brand new RefSCC objects. However, all of the
    users were OK with it that I could find. Only the unittest needed
    interesting updates here.

    How much does batching these updates help? I instrumented the compiler
    when run over a very large generated source file for a protocol buffer
    and found that the majority of updates are intrinsically updating one
    function at a time. However, nearly 40% of the total ref edges removed
    are removed as part of a batch of removals greater than one, so these
    are the cases batching can help with.

    When compiling the IR for this file with 'opt' and 'O3', this patch
    reduces the total time by 8-9%.

    Differential Revision: https://reviews.llvm.org/D36352 — chandlerc / detail
  11. [Sema] Extend -Wenum-compare to handle mixed enum comparisons in switch statements

    Patch by: Reka Nikolett Kovacs

    Differential Revision: https://reviews.llvm.org/D36407 — xazax / detail

#304 (Aug 9, 2017 1:39:46 AM)

  1. [X86] Add the rest of the ADC and SBB instructions to isDefConvertible.

    I don't know if this really affects anything. Just thought it was weird that we had all of the ADD/SUB/AND/OR/XOR instructions. — ctopper / detail
  2. [InstCombine] Use regular dyn_cast instead of a matcher for a simple case. NFC — ctopper / detail
  3. Attempt #2 to appease buildbots

    "error: unable to create target: 'No available targets are compatible
    with this triple.'" — George Burgess IV / detail
  4. Attempt to appease msc buildbot

    It was timing out on this test, but for reasons unrelated to the
    specific bug it was testing for. Randomly breaking in gdb with `clang
    -target i686-windows -fmsc-version=1700` reveals *many* frames from
    MicrosoftCXXNameMangler. So, it would seem that some caching is needed
    there, as well...

    Fingers crossed that specifying a triple is sufficient to work around
    this. — George Burgess IV / detail
  5. [ImplicitNullCheck] Fix the bug when dependent instruction accesses memory

    It is possible that dependent instruction may access memory.
    In this case we must reject optimization because the memory change will
    be visible in null handler basic block. So we will execute an instruction which
    we must not execute if check fails.

    Reviewers: sanjoy, reames
    Reviewed By: sanjoy
    Subscribers: llvm-commits
    Differential Revision: https://reviews.llvm.org/D36392 — skatkov / detail
  6. Fix broken pdb test.

    For some reason I didn't see this failure the first time.  The
    output format changed slightly, so we just have to update the
    test for the new format. — zturner / detail
  7. [clang-fuzzer] Resolve proto dependencies — Vitaly Buka / detail
  8. Fix -Wreorder-fields warning. — zturner / detail
  9. [PDB] Fix an issue writing the publics stream.

    In the refactor to merge the publics and globals stream, a bug
    was introduced that wrote the wrong value for one of the fields
    of the PublicsStreamHeader.  This caused debugging in WinDbg
    to break.

    We had no way of dumping any of these fields, so in addition to
    fixing the bug I've added dumping support for them along with a
    test that verifies the correct value is written. — zturner / detail
  10. [PDB] Merge Global and Publics Builders.

    The publics stream and globals stream are very similar. They both
    contain a list of hash buckets that refer into a single shared stream,
    the symbol record stream. Because of the need for each builder to manage
    both an independent hash stream as well as a single shared record
    stream, making the two builders be independent entities is not the right
    design. This patch merges them into a single class, of which only a
    single instance is needed to create all 3 streams.  PublicsStreamBuilder
    and GlobalsStreamBuilder are now merged into the single GSIStreamBuilder
    class, which writes all 3 streams at once.

    Note that this patch does not contain any functionality change. So we're
    still not yet writing any records to the globals stream. All we're doing
    is making it so that when we do start writing records to the globals,
    this refactor won't have to be part of that patch.

    Differential Revision: https://reviews.llvm.org/D36489 — zturner / detail
  11. [AST] Cache intermediate visibility/linkage results

    This is a follow-up to r310436 with actual functional changes. Please
    see that commit message for a description of why a cache is appearing
    here.

    Suggestions for less-bad ways of testing this are appreciated. :)

    This fixes PR29160. — George Burgess IV / detail
  12. [AST] Move visibility computations into a class; NFC

    This is patch 1 in a 2 patch series that aims to fix PR29160. Its goal
    is to cache decl visibility/linkage for the duration of each
    visibility+linkage query.

    The simplest way I can see to do this is to put the visibility
    calculation code that needs to (transitively) access this cache into a
    class, which is what this patch does. Actual caching will come in patch
    2. (Another way would be to keep the cache in ASTContext + manually
    invalidate it or something, but that felt way too subtle to me.)

    Caching visibility results across multiple queries seems a bit tricky,
    since the user can add visibility attributes ~whenever they want, and
    these attributes can apparently have far-reaching effects (e.g. class
    visibility extends to its members, ...). Because a cache that's dropped
    at the end of each top-level query seems to work nearly as well and
    doesn't require any eviction logic, I opted for that design. — George Burgess IV / detail

#303 (Aug 8, 2017 8:03:19 PM)

  1. Allow operator delete to be an invalid Decl.

    Do not discard invalid Decl when searching for the operator delete function.
    The lookup for this function always expects to find a result, so sometimes the
    invalid Decl is the only choice possible.  This fixes PR34109. — rtrieu / detail
  2. [InstCombine] Add a test case for a missed opportunity to turn a select into logic ops. — ctopper / detail
  3. [OpenMP] Fix bug regarding cubin integration into host binary
    when a BindArchAction is used.

    This is not a functional change.

    Original Diff: D29654 — gbercea / detail
  4. [asan] Refactor thread creation bookkeeping

    Summary:
    This is a pure refactoring change.  It paves the way for OS-specific
    implementations, such as Fuchsia's, that can do most of the
    per-thread bookkeeping work in the creator thread before the new
    thread actually starts.  This model is simpler and cleaner, avoiding
    some race issues that the interceptor code for thread creation has
    to do for the existing OS-specific implementations.

    Submitted on behalf of Roland McGrath.

    Reviewers: vitalybuka, alekseyshl, kcc

    Reviewed By: alekseyshl

    Subscribers: phosek, filcab, llvm-commits, kubamracek

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D36385 — Vitaly Buka / detail
  5. [asan] Complete the Fuchsia port

    Submitted on behalf of Roland McGrath.

    Reviewers: kcc, eugenis, alekseyshl, vitalybuka

    Reviewed By: vitalybuka

    Subscribers: filcab, vitalybuka, srhines, kubamracek, mgorny, phosek, llvm-commits

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D35865 — Vitaly Buka / detail

#302 (Aug 8, 2017 5:24:14 PM)

  1. [AMDGPU] Revert r310429 changes in AMDKernelCodeT.h which broke some build bots. — eugenezelenko / detail
  2. [AMDGPU] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). — eugenezelenko / detail
  3. Try to appease compiler and break multiline comment. — kamil / detail
  4. Sema: disable implicit conversion from _Complex to real types in C++.

    Converting a _Complex type to a real one simply discards the imaginary part.
    This can easily lead to loss of information so for safety (and GCC
    compatibility) this patch disallows that when the conversion would be implicit.

    The one exception is bool, which actually compares both real and imaginary
    parts and so is safe. — Tim Northover / detail
  5. Revert "Lexer: always allow imaginary constants in GNU mode."

    This reverts r310423. It was committed by mistake, I intended to commit the
    improved diagnostics for implicit conversions instead. — Tim Northover / detail

#301 (Aug 8, 2017 3:28:56 PM)

  1. Revert "[GlobalISel] Remove the GISelAccessor API."

    This reverts commit r310115.

    It causes a linker failure for the one of the unittests of AArch64 on one
    of the linux bot:
    http://lab.llvm.org:8011/builders/clang-ppc64le-linux-multistage/builds/3429

    : && /home/fedora/gcc/install/gcc-7.1.0/bin/g++   -fPIC
    -fvisibility-inlines-hidden -Werror=date-time -std=c++11 -Wall -W
    -Wno-unused-parameter -Wwrite-strings -Wcast-qual
    -Wno-missing-field-initializers -pedantic -Wno-long-long
    -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment
    -ffunction-sections -fdata-sections -O2
    -L/home/fedora/gcc/install/gcc-7.1.0/lib64 -Wl,-allow-shlib-undefined
    -Wl,-O3 -Wl,--gc-sections
    unittests/Target/AArch64/CMakeFiles/AArch64Tests.dir/InstSizes.cpp.o  -o
    unittests/Target/AArch64/AArch64Tests
    lib/libLLVMAArch64CodeGen.so.6.0.0svn lib/libLLVMAArch64Desc.so.6.0.0svn
    lib/libLLVMAArch64Info.so.6.0.0svn lib/libLLVMCodeGen.so.6.0.0svn
    lib/libLLVMCore.so.6.0.0svn lib/libLLVMMC.so.6.0.0svn
    lib/libLLVMMIRParser.so.6.0.0svn lib/libLLVMSelectionDAG.so.6.0.0svn
    lib/libLLVMTarget.so.6.0.0svn lib/libLLVMSupport.so.6.0.0svn -lpthread
    lib/libgtest_main.so.6.0.0svn lib/libgtest.so.6.0.0svn -lpthread
    -Wl,-rpath,/home/buildbots/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1/lib
    && :
    unittests/Target/AArch64/CMakeFiles/AArch64Tests.dir/InstSizes.cpp.o:(.toc+0x0):
    undefined reference to `vtable for llvm::LegalizerInfo'
    unittests/Target/AArch64/CMakeFiles/AArch64Tests.dir/InstSizes.cpp.o:(.toc+0x8):
    undefined reference to `vtable for llvm::RegisterBankInfo'

    The particularity of this bot is that it is built with
    BUILD_SHARED_LIBS=ON

    However, I was not able to reproduce the problem so far.
    Reverting to unblock the bot. — qcolombet / detail
  2. My commit r310346 introduced some valid warnings. This cleans them up. — nemanjai / detail
  3. Lexer: always allow imaginary constants in GNU mode. — Tim Northover / detail
  4. [MachineOutliner] Ensure AArch64 outliner doesn't mess with W30 or LR

    Before, the outliner would mark all instructions that read from/modify LR as
    illegal. This doesn't handle W30, which overlaps with LR. This shouldn't be
    outlined.

    This commit fixes that by making modifiesRegister() and readsRegister() look at
    W30 + take in a TRI argument. This makes sure that modifiesRegister() and
    readsRegister() won't outline either of W30 and LR.

    https://reviews.llvm.org/D36435 — paquette / detail
  5. [GVN] Remove stale entries in phitranslate cache when new phi is generated for PRE

    When a new phi is generated for scalarpre of an expression, the phiTranslate cache
    will become stale: Before PRE, the candidate expression must not be available in a
    predecessor block, and phitranslate will cache the information. After PRE, the
    expression will become available in all predecessor blocks, so the related entries
    in phiTranslate cache becomes stale. The patch will simply remove the stale entries
    so phiTranslate can be recomputed next time.

    The stale entries in phitranslate cache will not affect correctness but will cause
    missing PRE opportunity for later instructions.

    Differential Revision: https://reviews.llvm.org/D36124 — wmi / detail
  6. BasicAA: assert on another case where aliasGEP shouldn't get a PartialAlias response — nlopes / detail
  7. [winasan] Fix hotpatching ntdll!strcpy for Win10 creators edition

    The 9 byte nop is a suffix of the 10 byte nop, and we need at most 6
    bytes.

    ntdll's version of strcpy is written in assembly and is very clever.
    strcat tail calls strcpy but with a slightly different arrangement of
    argument registers at an alternate entry point. It looks like this:

      ntdll!strcpy:
      00007ffd`64e8a7a0 4c8bd9          mov     r11,rcx
      ntdll!__entry_from_strcat_in_strcpy:
      00007ffd`64e8a7a3 482bca          sub     rcx,rdx
      00007ffd`64e8a7a6 f6c207          test    dl,7

    If we overwrite more than two bytes in our interceptor, that label will
    no longer be a valid instruction boundary.

    By recognizing the 9 byte nop, we use the two byte backwards branch to
    start our trampoline, avoiding this issue.

    Fixes https://github.com/google/sanitizers/issues/829

    Patch by David Major — rnk / detail
  8. [mips] Enable `long_call/short_call` attributes on MIPS64

    This change enables `long_call/short_call/far/near` attributes on
    MIPS64 targets.

    Differential revision: https://reviews.llvm.org/D36208 — atanasyan / detail
  9. Make ICP uses PSI to check for hotness.

    Summary: Currently, ICP checks the count against a fixed value to see if it is hot enough to be promoted. This does not work for SamplePGO because sampled count may be much smaller. This patch uses PSI to check if the count is hot enough to be promoted.

    Reviewers: davidxl, tejohnson, eraman

    Reviewed By: davidxl

    Subscribers: sanjoy, llvm-commits, mehdi_amini

    Differential Revision: https://reviews.llvm.org/D36341 — dehao / detail
  10. Add NetBSD support in asan_malloc_linux.cc

    Summary:
    Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas.

    Sponsored by <The NetBSD Foundation>

    Reviewers: joerg, kcc, fjricci, vitalybuka, filcab

    Reviewed By: fjricci

    Subscribers: llvm-commits, kubamracek, #sanitizers

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D36376 — kamil / detail
  11. Add NetBSD support in asan_symbolize.py

    Summary:
    Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas.

    Sponsored by <The NetBSD Foundation>

    Reviewers: joerg, filcab, vitalybuka, kcc, fjricci

    Reviewed By: fjricci

    Subscribers: kubamracek, llvm-commits, #sanitizers

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D36484 — kamil / detail
  12. Enable ubsan on NetBSD

    Summary:
    Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas.

    Sponsored by <The NetBSD Foundation>

    Reviewers: joerg, vitalybuka, kcc, filcab, fjricci

    Reviewed By: fjricci

    Subscribers: srhines, kubamracek, mgorny, llvm-commits, #sanitizers

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D36483 — kamil / detail
  13. Reuse sanitizer_linux for NetBSD

    Summary:
    Follow FreeBSD and reuse sanitizer_linux for NetBSD.

    Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas.

    Sponsored by <The NetBSD Foundation>

    Reviewers: joerg, kcc, filcab, vitalybuka, fjricci, dvyukov

    Reviewed By: fjricci

    Subscribers: dvyukov, emaste, kubamracek, llvm-commits, #sanitizers

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D36325 — kamil / detail
  14. [codeview] Emit nested enums and typedefs from classes

    Previously we limited ourselves to only emitting nested classes, but we
    need other kinds of types as well.

    This fixes the Visual Studio STL visualizers, so that users can
    visualize std::string and other objects. — rnk / detail
  15. [sanitizer-coverage] -fsanitize-coverage=bb,inline-8bit-counters — kcc / detail
  16. Integrate Kostya's clang-proto-fuzzer with LLVM.

    Summary:
    The clang-proto-fuzzer models a subset of C++ as a protobuf and
    uses libprotobuf-mutator to generate interesting mutations of C++
    programs.  Clang-proto-fuzzer has already found several bugs in
    Clang (e.g., https://bugs.llvm.org/show_bug.cgi?id=33747,
    https://bugs.llvm.org/show_bug.cgi?id=33749).

    As with clang-fuzzer, clang-proto-fuzzer requires the following
    cmake flags:
    - CMAKE_C_COMPILER=clang
    - CMAKE_CXX_COMPILER=clang++
    - LLVM_USE_SANITIZE_COVERAGE=YES  // needed for libFuzzer
    - LLVM_USE_SANITIZER=Address  // needed for libFuzzer

    In addition, clang-proto-fuzzer requires:
    - CLANG_ENABLE_PROTO_FUZZER=ON

    clang-proto-fuzzer also requires the following dependencies:
    - binutils  // needed for libprotobuf-mutator
    - liblzma-dev  // needed for libprotobuf-mutator
    - libz-dev  // needed for libprotobuf-mutator
    - docbook2x  // needed for libprotobuf-mutator
    - Recent version of protobuf [3.3.0 is known to work]

    A working version of libprotobuf-mutator will automatically be
    downloaded and built as an external project.

    Implementation of clang-proto-fuzzer provided by Kostya
    Serebryany.

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

    Reviewers: kcc, vitalybuka, bogner

    Reviewed By: kcc, vitalybuka

    Subscribers: thakis, mgorny, cfe-commits

    Differential Revision: https://reviews.llvm.org/D36324 — morehouse / detail
  17. [InstCombine] Support pulling left shifts through a subtract with constant LHS

    We already support pulling through an add with constant RHS. We can do the same for subtract.

    Differential Revision: https://reviews.llvm.org/D36443 — ctopper / detail
  18. [coverage] Special-case calls to noreturn functions.

    The code after a noreturn call doesn't execute.

    The pattern in the testcase is pretty common in LLVM (a switch with
    a default case that calls llvm_unreachable).

    The original version of this patch was reverted in r309995 due to a
    crash. This version includes a fix for that crash (testcase in
    test/CoverageMapping/md.cpp).

    Differential Revision: https://reviews.llvm.org/D36250 — efriedma / detail
  19. [DAG] Introduce peekThroughBitcast function. NFCI. — niravd / detail
  20. [DAG] Update comments. NFC. — niravd / detail
  21. Thread Safety Analysis: warn on nonsensical attributes.

    Add warnings in cases where an implicit `this` argument is expected to
    attributes because either `this` doesn't exist because the attribute is
    on a free function, or because `this` is on a type that doesn't have a
    corresponding capability/lockable/scoped_lockable attribute.

    Reviewers: delesley, aaron.ballman

    Differential Revision: https://reviews.llvm.org/D36237 — jmgao / detail
  22. Reland "Thread Safety Analysis: fix assert_capability."

    Delete the test that was broken by rL309725, and add it back in a
    follow up commit. Also, improve the tests a bit.

    Reviewers: delesley, aaron.ballman

    Differential Revision: https://reviews.llvm.org/D36237 — jmgao / detail

#300 (Aug 8, 2017 12:34:43 PM)

  1. PR19668, PR23034: Fix handling of move constructors and deleted copy
    constructors when deciding whether classes should be passed indirectly.

    This fixes ABI differences between Clang and GCC:

    * Previously, Clang ignored the move constructor when making this
       determination. It now takes the move constructor into account, per
       https://github.com/itanium-cxx-abi/cxx-abi/pull/17 (this change may
       seem recent, but the ABI change was agreed on the Itanium C++ ABI
       list a long time ago).

    * Previously, Clang's behavior when the copy constructor was deleted
       was unstable -- depending on whether the lazy declaration of the
       copy constructor had been triggered, you might get different behavior.
       We now eagerly declare the copy constructor whenever its deletedness
       is unclear, and ignore deleted copy/move constructors when looking for
       a trivial such constructor.

    This also fixes an ABI difference between Clang and MSVC:

    * If the copy constructor would be implicitly deleted (but has not been
       lazily declared yet), for instance because the class has an rvalue
       reference member, we would pass it directly. We now pass such a class
       indirectly, matching MSVC. — rsmith / detail
  2. Add NetBSD support in asan_interceptors.cc

    Summary:
    Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas.

    Sponsored by <The NetBSD Foundation>

    Reviewers: joerg, kcc, vitalybuka, filcab, fjricci

    Reviewed By: vitalybuka

    Subscribers: kubamracek, llvm-commits, #sanitizers

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D36470 — kamil / detail
  3. [AMDGPU] Add llvm.amdgpu.update.dpp intrinsic

    Summary:
    Now that we've made all the necessary backend changes, we can add a new
    intrinsic which exposes the new capabilities to IR producers. Since
    llvm.amdgpu.update.dpp is a strict superset of llvm.amdgpu.mov.dpp, we
    should deprecate the former. We also add tests for all the functionality
    that was added in previous changes, now that we can access it via an IR
    construct.

    Reviewers: tstellar, arsenm

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

    Differential Revision: https://reviews.llvm.org/D34718 — cwabbott / detail
  4. [NewGVN] Use a cast instead of a dyn_cast.

    Differential Revision: https://reviews.llvm.org/D36478 — mcrosier / detail
  5. [PDB] Fix linking of function symbols and local variables.

    The compiler outputs PROC32_ID symbols into the object files
    for functions, and these symbols have an embedded type index
    which, when copied to the PDB, refer to the IPI stream.  However,
    the symbols themselves are also converted into regular symbols
    (e.g. S_GPROC32_ID -> S_GPROC32), and type indices in the regular
    symbol records refer to the TPI stream.  So this patch applies
    two fixes to function records.
      1. It converts ID symbols to the proper non-ID record type.
      2. After remapping the type index from the object file's index
         space to the PDB file/IPI stream's index space, it then
         remaps that index to the TPI stream's index space by.

    Besides functions, during the remapping process we were also
    discarding symbol record types which we did not recognize.
    In particular, we were discarding S_BPREL32 records, which is
    what MSVC uses to describe local variables on the stack.  So
    this patch fixes that as well by copying them to the PDB.

    Differential Revision: https://reviews.llvm.org/D36426 — zturner / detail
  6. dsymutil: support dwarf version mismatches between object and clang module

    This adds a missing call to maybeUpdateMaxDwarfVersion when visitng a
    clang module. Failing to do so will cause a failure when emitting
    DWARF 4 forms into a CU that AsmPrinter believes to be DWARF 2.

    rdar://problem/33666528 — Adrian Prantl / detail
  7. NetBSD compatibility nit in asan_test_utils.h

    Summary:
    Do not include <malloc.h> on NetBSD, as this header
    serves on this OS backward compatibility with K&R alias
    for <stdlib.h>.

    Sponsored by <The NetBSD Foundation>

    Reviewers: vitalybuka, kcc, joerg, filcab, fjricci

    Reviewed By: vitalybuka

    Subscribers: kubamracek, llvm-commits, #sanitizers

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D36469 — kamil / detail
  8. [LoopVectorize] Fix assertion failure in Fcmp vectorization

    Summary:
    When vectorizing fcmps we can trip on incorrect cast assertion when setting the
    FastMathFlags after generating the vectorized FCmp.
    This can happen if the FCmp can be folded to true or false directly. The fix
    here is to set the FastMathFlag using the FastMathFlagBuilder *before* creating
    the FCmp Instruction. This is what's done by other optimizations such as
    InstCombine.
    Added a test case which trips on cast assertion without this patch.

    Reviewers: Ayal, mssimpso, mkuper, gilr

    Reviewed by: Ayal, mssimpso

    Subscribers: llvm-commits, mzolotukhin

    Differential Revision: https://reviews.llvm.org/D36244 — annat / detail
  9. Restore previous structure ABI behavior for bit-fields with the packed attribute for PS4 targets.

    An ABI change was introduced in r254596 that modified structure layouts when the 'packed' attribute was used on one-byte bitfields. Since the PS4 target needs to maintain backwards compatibility for all structure layouts, this change reintroduces the old behavior for PS4 targets only. It also introduces PS4 specific cases to the relevant test.

    Patch by Matthew Voss. — aaronballman / detail
  10. [OPENMP][DEBUG] Set proper address space info if required by target.

    Arguments, passed to the outlined function, must have correct address
    space info for proper Debug info support. Patch sets global address
    space for arguments that are mapped and passed by reference.

    Also, cuda-gdb does not handle reference types correctly, so reference
    arguments are represented as pointers. — abataev / detail
  11. [X86] Support 'avx5124vnniw' and 'avx5124fmaps' for __builtin_cpu_supports.

    They still need to be implemented in the intrinsics, the command line, and the backend. But this change isn't dependent on any of that and resolves a TODO. — ctopper / detail
  12. Revert "[ARM] Fix assembly and disassembly for VMRS/VMSR"

    This reverts r310243. Only MVFR2 is actually restricted to v8 and it'll be a
    little while before we can get a proper fix together. Better that we allow
    incorrect code than reject correct in the meantime. — Tim Northover / detail
  13. [DomTree] Use a non-recursive DFS instead of a recursive one; NFC

    Summary: The recursive DFS can stack overflow in pathological cases.

    Reviewers: kuhar

    Subscribers: mcrosier, llvm-commits

    Differential Revision: https://reviews.llvm.org/D36442 — sanjoy / detail
  14. [Availability] Don't make an availability attribute imply default visibility on macOS

    Fixes PR33796, rdar://33655115

    Differential revision: https://reviews.llvm.org/D36191 — epilk / detail
  15. Revert "[OPENMP][DEBUG] Set proper address space info if required by target."

    This reverts commit r310377. — abataev / detail
  16. [KnownBits][ValueTracking] Move the math for calculating known bits for add/sub into a static method in KnownBits object

    I want to reuse this code in SimplifyDemandedBits handling of Add/Sub. This will make that easier.

    Wonder if we should use it in SelectionDAG's computeKnownBits too.

    Differential Revision: https://reviews.llvm.org/D36433 — ctopper / detail
  17. [OPENMP][DEBUG] Set proper address space info if required by target.

    Arguments, passed to the outlined function, must have correct address
    space info for proper Debug info support. Patch sets global address
    space for arguments that are mapped and passed by reference.

    Also, cuda-gdb does not handle reference types correctly, so reference
    arguments are represented as pointers. — abataev / detail
  18. Use "foo-12345.o.tmp" instead of "foo.o-12345" as temporary file name.

    This helps some tools that do things based on the output's extension.

    For example, we got reports from users on Windows that have a tool that scan a
    build output dir (but skip .obj files). The tool would keep the "foo.obj-12345"
    file open, and then when clang tried to rename the temp file to the final
    output filename, that would fail. By making the tempfile end in ".obj.tmp",
    tools like this could now have a rule to ignore .tmp files.
    This is a less ambitious reland of https://reviews.llvm.org/D36238

    https://reviews.llvm.org/D36413 — nico / detail
  19. [RISCV] Fix warning about unused getSubtargetFeatureName() — asb / detail
  20. BasicAA: aliasGEP shouldn't get a PartialAlias response here
    add an assert() to ensure that's the case (as I'm not convinced it won't happen) — nlopes / detail
  21. [DAGCombiner] simplifyShuffleMask - handle UNDEF inputs from shuffles as well as BUILD_VECTOR

    Minor extension to D36393 — rksimon / detail
  22. [clang-tidy] Add new readability non-idiomatic static access check

    Patch by: Lilla Barancsuk

    Differential Revision: https://reviews.llvm.org/D35937 — xazax / detail
  23. Enable COMPILER_RT_HAS_SANITIZER_COMMON on NetBSD

    Summary:
    Temporarily keep disabled COMPILER_RT_HAS_ASAN on NetBSD.

    Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas.

    Sponsored by <The NetBSD Foundation>

    Reviewers: joerg, filcab, kcc, vitalybuka

    Reviewed By: vitalybuka

    Subscribers: srhines, mgorny, #sanitizers, llvm-commits

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D36312 — kamil / detail
  24. Non-functional change. Fix test for D29654. — gbercea / detail
  25. clang-format: [JS] fix union type spacing in object & array types.

    Summary:
    Previously, clang-format would insert whitespace in union types nested in object
    and array types, as it wouldn't recognize those as a type operator:

        const x: {foo: number | null};
        const x: [number | null];

    While this is correct for actual binary operators, clang-format should not
    insert whitespace into union and intersection types to mark those:

        const x: {foo: number|null};
        const x: [number|null];

    This change propagates that the context is not an expression by inspecting
    the preceding token and marking as non-expression if it was a type colon.

    Reviewers: djasper

    Subscribers: klimek

    Differential Revision: https://reviews.llvm.org/D36136 — mprobst / detail
  26. [clang-tidy] 'implicit cast' -> 'implicit conversion'

    Summary:
    This patch renames checks, check options and changes messages to use correct
    term "implicit conversion" instead of "implicit cast" (which has been in use in
    Clang AST since ~10 years, but it's still technically incorrect w.r.t. C++
    standard).

      * performance-implicit-cast-in-loop -> performance-implicit-conversion-in-loop
      * readability-implicit-bool-cast -> readability-implicit-bool-conversion
        - readability-implicit-bool-cast.AllowConditionalIntegerCasts ->
          readability-implicit-bool-conversion.AllowIntegerConditions
        - readability-implicit-bool-cast.AllowConditionalPointerCasts ->
          readability-implicit-bool-conversion.AllowPointerConditions

    Reviewers: hokein, jdennett

    Reviewed By: hokein

    Subscribers: mgorny, JDevlieghere, xazax.hun, cfe-commits

    Differential Revision: https://reviews.llvm.org/D36456 — alexfh / detail
  27. clang-format: [JS] handle single lines comments ending in `\\`.

    Summary:
    Previously, clang-format would consider the following code line to be part of
    the comment and incorrectly format the rest of the file.

    Reviewers: djasper

    Subscribers: klimek, cfe-commits

    Differential Revision: https://reviews.llvm.org/D36159 — mprobst / detail
  28. Revert "[OPENMP][DEBUG] Set proper address space info if required by target."

    This reverts commit r310360. — abataev / detail
  29. [RISCV] Add basic RISCVAsmParser (missing files)

    This commit adds the files missing from rL310361. Apologies for the noise.

    Differential Revision: https://reviews.llvm.org/D23563 — asb / detail
  30. [OpenMP] OpenMP device offloading code generation produces a cubin file which is then integrated in the host binary using the host linker.
    Diff: D29654 — gbercea / detail
  31. [RISCV] Add basic RISCVAsmParser

    This doesn't yet support parsing things like %pcrel_hi(foo), but will handle
    basic instructions with register or immediate operands.

    Differential Revision: https://reviews.llvm.org/D23563 — asb / detail
  32. [OPENMP][DEBUG] Set proper address space info if required by target.

    Arguments, passed to the outlined function, must have correct address
    space info for proper Debug info support. Patch sets global address
    space for arguments that are mapped and passed by reference.

    Also, cuda-gdb does not handle reference types correctly, so reference
    arguments are represented as pointers. — abataev / detail
  33. [libclang] Fix PR34055 (incompatible update of clang-c/Index.h)

    Fixes a regression introduced by r308218. — n.bozhenov / detail
  34. [PowerPC] Don't crash on larger splats achieved through 1-byte splats

    We've implemented a 1-byte splat using XXSPLTISB on P9. However, LLVM will
    produce a 1-byte splat even for wider element BUILD_VECTOR nodes. This patch
    prevents crashing in that situation.

    Differential Revision: https://reviews.llvm.org/D35650 — nemanjai / detail
  35. [globalisel][tablegen] Remove unnecessary ; to satisfy ubuntu-gcc7.1-werror. — dsanders / detail
  36. Appease compilers that have the -Wcovered-switch-default switch. — nemanjai / detail
  37. Adapt polly buildbots after switch to -polly-position=before-vectorizer — grosser / detail

#299 (Aug 8, 2017 5:24:18 AM)

  1. [X86] Improved X86::CMOV to Branch heuristic.
    Resolved PR33954.
    This patch contains two more constraints that aim to reduce the noise cases where we convert CMOV into branch for small gain, and end up spending more cycles due to overhead.

    Differential Revision: https://reviews.llvm.org/D36081 — aaboud / detail
  2. Reuse interception_linux for NetBSD

    Summary:
    Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas.

    Sponsored by <The NetBSD Foundation>

    Reviewers: joerg, kcc, vitalybuka, filcab

    Reviewed By: vitalybuka

    Subscribers: llvm-commits, #sanitizers

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D36321 — kamil / detail
  3. Define OFF_T as 64-bit integer on NetBSD

    Summary:
    All 32 and 64 bit NetBSD platforms define off_t as 64-bit integer.

    Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas.

    Sponsored by <The NetBSD Foundation>

    Reviewers: joerg, filcab, kcc, vitalybuka

    Reviewed By: vitalybuka

    Subscribers: emaste, kubamracek, llvm-commits

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D35553 — kamil / detail
  4. Darwin's toolchain should be initialized before openmp offloading
    is processed

    This fixes an 'openmp-offload.c' test failure introduced by r310263. — arphaman / detail
  5. [PowerPC] Eliminate compares - add i32 sext/zext handling for SETLE/SETGE

    Adds handling for SETLE/SETGE comparisons on i32 values. Furthermore, it adds
    the handling for the special case where RHS == 0.

    Differential Revision: https://reviews.llvm.org/D34048 — nemanjai / detail
  6. Revert r310291, r310300 and r310332 because of test failure on Darwin

    The commit r310291 introduced the failure. r310332 was a test fix commit and
    r310300 was a followup commit. I reverted these two to avoid merge conflicts
    when reverting.

    The 'openmp-offload.c' test is failing on Darwin because the following
    run lines:
    // RUN:   touch %t1.o
    // RUN:   touch %t2.o
    // RUN:   %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -save-temps -no-canonical-prefixes %t1.o %t2.o 2>&1 \
    // RUN:   | FileCheck -check-prefix=CHK-TWOCUBIN %s

    trigger the following assertion:

    Driver.cpp:3418:
        assert(CachedResults.find(ActionTC) != CachedResults.end() &&
               "Result does not exist??"); — arphaman / detail
  7. [DAGCombiner] Simplify shuffle mask index if the referenced input element is UNDEF

    Fixes one of the cases in PR34041.

    Differential Revision: https://reviews.llvm.org/D36393 — rksimon / detail
  8. [globalisel][tablegen] Add support for importing 'imm' operands.

    Summary:
    This patch enables the import of rules containing 'imm' operands that do not
    constrain the acceptable values using predicates. Support for ImmLeaf will
    arrive in a later patch.

    Depends on D35681

    Reviewers: ab, t.p.northover, qcolombet, rovka, aditya_nandakumar

    Reviewed By: rovka

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

    Differential Revision: https://reviews.llvm.org/D35833 — dsanders / detail
  9. [PM] Fix a likely more critical infloop bug in the CGSCC pass manager.

    This was just a bad oversight on my part. The code in question should
    never have worked without this fix. But it turns out, there are
    relatively few places that involve libfunctions that participate in
    a single SCC, and unless they do, this happens to not matter.

    The effect of not having this correct is that each time through this
    routine, the edge from write_wrapper to write was toggled between a call
    edge and a ref edge. First time through, it becomes a demoted call edge
    and is turned into a ref edge. Next time it is a promoted call edge from
    a ref edge. On, and on it goes forever.

    I've added the asserts which should have always been here to catch silly
    mistakes like this in the future as well as a test case that will
    actually infloop without the fix.

    The other (much scarier) infinite-inlining issue I think didn't actually
    occur in practice, and I simply misdiagnosed this minor issue as that
    much more scary issue. The other issue *is* still a real issue, but I'm
    somewhat relieved that so far it hasn't happened in real-world code
    yet... — chandlerc / detail

#297 (Aug 8, 2017 12:03:53 AM)

  1. [InstCombine] Cast to BinaryOperator earlier in foldSelectIntoOp to simplify the code.

    We no longer need the explicit operand count check or the later dynamic cast. — ctopper / detail
  2. AMDGPU: Fix warnings introduced by r310336 — tstellar / detail

#296 (Aug 7, 2017 10:21:28 PM)

  1. AMDGPU: Move R600 parts of AMDGPUISelDAGToDAG into their own class

    Summary: This refactoring is required in order to split the R600 and GCN tablegen files.

    Reviewers: arsenm

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

    Differential Revision: https://reviews.llvm.org/D36286 — tstellar / detail
  2. AMDGPU: Also remove SI from docs

    Differential Revision: https://reviews.llvm.org/D36424 — kzhuravl / detail

#294 (Aug 7, 2017 8:03:50 PM)

  1. [PM] Relax the spelling of a pass name slightly in this test.

    I forgot that MSVC doesn't preserve this typedef, my bad. — chandlerc / detail
  2. [PM] Fix new LoopUnroll function pass by invalidating loop analysis
    results when a loop is completely removed.

    This is very hard to manifest as a visible bug. You need to arrange for
    there to be a subsequent allocation of a 'Loop' object which gets the
    exact same address as the one which the unroll deleted, and you need the
    LoopAccessAnalysis results to be significant in the way that they're
    stale. And you need a million other things to align.

    But when it does, you get a deeply mysterious crash due to actually
    finding a stale analysis result. This fixes the issue and tests for it
    by directly checking we successfully invalidate things. I have not been
    able to get *any* test case to reliably trigger this. Changes to LLVM
    itself caused the only test case I ever had to cease to crash.

    I've looked pretty extensively at less brittle ways of fixing this and
    they are actually very, very hard to do. This is a somewhat strange and
    unusual case as we have a pass which is deleting an IR unit, but is not
    running within that IR unit's pass framework (which is what handles this
    cleanly for the normal loop unroll). And where there isn't a definitive
    way to clear *all* of the stale cache entries. And where the pass *is*
    updating the core analysis that provides the IR units!

    For example, we don't have any of these problems with Function analyses
    because it is easy to clear out function analyses when the functions
    themselves may have been deleted -- we clear an entire module's worth!
    But that is too heavy of a hammer down here in the LoopAnalysisManager
    layer.

    A better long-term solution IMO is to require that AnalysisManager's
    make their keys durable to this kind of thing. Specifically, when
    caching an analysis for one IR unit that is conceptually "owned" by
    a higher level IR unit, the AnalysisManager should incorporate this into
    its data structures so that we can reliably clear these results without
    having to teach each and every pass to do so manually as we do here. But
    that is a change for another day as it will be a fairly invasive change
    to the AnalysisManager infrastructure. Until then, this fortunately
    seems to be quite rare. — chandlerc / detail

#293 (Aug 7, 2017 6:44:28 PM)

  1. Fix openmp-offload.c test on Windows — rnk / detail
  2. [codeview] Fix class name formatting

    In particular, removes spaces between template arguments of class
    templates to better match VS type visualizers. — rnk / detail
  3. [asan] Restore dead-code-elimination optimization for Fuchsia

    Summary:
    r310244 fixed a bug introduced by r309914 for non-Fuchsia builds.
    In doing so it also reversed the intended effect of the change for
    Fuchsia builds, which was to allow all the AllocateFromLocalPool
    code and its variables to be optimized away entirely.

    This change restores that optimization for Fuchsia builds, but
    doesn't have the original change's bug because the comparison
    arithmetic now takes into account the size of the elements.

    Submitted on behalf of Roland McGrath.

    Reviewers: vitalybuka, alekseyshl

    Reviewed By: alekseyshl

    Subscribers: llvm-commits, kubamracek

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D36430 — Vitaly Buka / detail
  4. [AMDGPU] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). — eugenezelenko / detail
  5. [libFuzzer] simplify code, NFC — kcc / detail
  6. [libFuzzer] remove stale code — kcc / detail
  7. [libFuzzer] simplify the implementation of -print_coverage=1 — kcc / detail
  8. Fix asan_test.cc build on NetBSD

    Summary:
    Include <stdarg.h> for variable argument list macros (va_list, va_start etc).

    Add fallback definition of _LIBCPP_GET_C_LOCALE, this is required for
    GNU libstdc++ compatibility. Define new macro SANITIZER_GET_C_LOCALE.
    This value is currently required for FreeBSD and NetBSD for printf_l(3) tests.

    Sponsored by <The NetBSD Foundation>

    Reviewers: joerg, kcc, vitalybuka, filcab, fjricci

    Reviewed By: vitalybuka

    Subscribers: llvm-commits, emaste, kubamracek, #sanitizers

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D36406 — kamil / detail
  9. Add NetBSD support in asan_stack.h

    Summary:
    Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas.

    Sponsored by <The NetBSD Foundation>

    Reviewers: joerg, kcc, vitalybuka, filcab, fjricci

    Reviewed By: vitalybuka

    Subscribers: davide, kubamracek, llvm-commits, #sanitizers

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D36377 — kamil / detail
  10. [libFuzzer] use custom compile flags for libFuzzer benchmarks — kcc / detail
  11. [KnownBits] Fix copy pasto in comment. NFC — ctopper / detail
  12. This adds the argument --dump-ir to clang-import-test, which allows
    viewing of the final IR. This is useful for confirming that
    structure layout was correct.

    I've added two tests:

    - A test that checks that structs in top-level code are completed
      correctly during struct layout (they are)
    - A test that checks that structs defined in function bodies are
      cpmpleted correctly during struct layout (currently they are not,
      so this is XFAIL).

    The second test fails because LookupSameContext()
    (ExternalASTMerger.cpp) can't find the struct. This is an issue I
    intend to resolve separately.

    Differential Revision: https://reviews.llvm.org/D36429 — Sean Callanan / detail
  13. [X86][AVX] Added test for broadcast shuffle from binary sources with undefs (D36393) — rksimon / detail

#292 (Aug 7, 2017 3:22:52 PM)

  1. AMDGPU: Implement getMinimumNopSize — arsenm / detail
  2. [Object] Initialize LoadConfig member to null

    Executables may not contain a load config, and clients should be able to
    test for nullability. Previously we'd return uninitialized memory. Now
    getLoadConfig32/64 return valid pointers or null.

    Fixes PR34108 — rnk / detail
  3. [OpenMP] Error when trying to offload to an unsupported architecture

    Summary: Throw an error when offloading is unsupported for a particular target architecture.

    Reviewers: sfantao, caomhin, carlo.bertolli, ABataev, Hahnfeld

    Reviewed By: ABataev

    Subscribers: cfe-commits, rengolin

    Differential Revision: https://reviews.llvm.org/D32035 — gbercea / detail
  4. [OpenMP] Prevent emission of exception handling code when using OpenMP to offload to NVIDIA devices.

    Summary: For the OpenMP toolchain which offloads to NVIDIA GPUs make sure that no exception handling code is emitted.

    Reviewers: arpith-jacob, sfantao, caomhin, carlo.bertolli, ABataev, Hahnfeld, hfinkel, tstellar

    Reviewed By: ABataev, Hahnfeld

    Subscribers: rengolin, Hahnfeld, cfe-commits

    Differential Revision: https://reviews.llvm.org/D29904 — gbercea / detail
  5. Do not instrument libFuzzer itself when built with -DLLVM_USE_SANITIZE_COVERAGE

    Fixes regression from https://reviews.llvm.org/D36295

    Differential Revision: https://reviews.llvm.org/D36428 — George Karpenkov / detail
  6. [AArch64] Ignore stdcall and similar on aarch64/windows

    This is similar to what's done on arm and x86_64, where
    these calling conventions are silently ignored, as in
    SVN r245076.

    Differential Revision: https://reviews.llvm.org/D36105 — mstorsjo / detail
  7. Remove steps for building and testing libFuzzer on Windows

    They are broken and nobody is maintaining them. — rnk / detail
  8. [OpenMP] Make OpenMP generated code for the NVIDIA device relocatable by default

    Summary: When device offloading is enabled and the device is an NVIDIA GPU, OpenMP target regions must be compiled with relocation enabled by passing the "-c" flag to the PTXAS invocation.

    Reviewers: arpith-jacob, caomhin, carlo.bertolli, ABataev, Hahnfeld, jlebar, hfinkel, tstellar

    Reviewed By: Hahnfeld

    Subscribers: Hahnfeld, rengolin, mkuron, cfe-commits

    Differential Revision: https://reviews.llvm.org/D29642 — gbercea / detail
  9. Mark static variables static; NFC. — George Burgess IV / detail
  10. [llvm-pdbutil] Don't crash when a section contrib's isect is invalid. — zturner / detail
  11. Move the SampleProfileLoader right after EarlyFPM.

    Summary: SampleProfileLoader pass do need to happen after some early cleanup passes so that inlining can happen correctly inside the SampleProfileLoader pass.

    Reviewers: chandlerc, davidxl, tejohnson

    Reviewed By: chandlerc, tejohnson

    Subscribers: sanjoy, mehdi_amini, eraman, llvm-commits

    Differential Revision: https://reviews.llvm.org/D36333 — dehao / detail
  12. [OpenMP] Pass -v to PTXAS if it was passed to the driver.

    Summary: When compiling code being offloaded by OpenMP to an NVIDIA GPU, pass the -v to PTXAS if it was passed to the CLANG driver.

    Reviewers: arpith-jacob, caomhin, carlo.bertolli, ABataev, jlebar, hfinkel, tstellar

    Reviewed By: jlebar

    Subscribers: Hahnfeld, rengolin, cfe-commits

    Differential Revision: https://reviews.llvm.org/D29644 — gbercea / detail
  13. [OpenMP] Integrate OpenMP target region cubin into host binary

    Summary: OpenMP device offloading code generation produces a cubin file which is then integrated in the host binary using the host linker.

    Reviewers: arpith-jacob, caomhin, carlo.bertolli, ABataev, Hahnfeld, jlebar, rnk, hfinkel, tstellar

    Reviewed By: hfinkel

    Subscribers: sfantao, rnk, rengolin, cfe-commits

    Differential Revision: https://reviews.llvm.org/D29654 — gbercea / detail
  14. [libc++] Don't hardcode namespace in manual mangling

    libc++'s inline namespace can change depending on the ABI version.
    Instead of hardcoding __1 in the manual Microsoft ABI manglings for the
    iostream globals, stringify _LIBCPP_NAMESPACE and use that instead, to
    work across all ABI versions. — smeenai / detail
  15. Reapply fix PR23384 (part 3 of 3) r304824 (was reverted in r305720).
    The root cause of reverting was fixed - PR33514.

    Summary:
    The patch makes instruction count the highest priority for
    LSR solution for X86 (previously registers had highest priority).

    Reviewers: qcolombet

    Differential Revision: http://reviews.llvm.org/D30562

    From: Evgeny Stupachenko <evstupac@gmail.com>
                             <evgeny.v.stupachenko@intel.com> — evstupac / detail

#291 (Aug 7, 2017 12:59:20 PM)

  1. Removing an unused variable that was missed with the refactoring in r310272; NFC. — aaronballman / detail
  2. [AMDGPU] Add pseudo "old" source to all DPP instructions

    Summary:
    All instructions with the DPP modifier may not write to certain lanes of
    the output if bound_ctrl=1 is set or any bits in bank_mask or row_mask
    aren't set, so the destination register may be both defined and modified.
    The right way to handle this is to add a constraint that the destination
    register is the same as one of the inputs. We could tie the destination
    to the first source, but that would be too restrictive for some use-cases
    where we want the destination to be some other value before the
    instruction executes. Instead, add a fake "old" source and tie it to the
    destination. Effectively, the "old" source defines what value unwritten
    lanes will get. We'll expose this functionality to users with a new
    intrinsic later.

    Also, we want to use DPP instructions for computing derivatives, which
    means we need to set WQM for them. We also need to enable the entire
    wavefront when using DPP intrinsics to implement nonuniform subgroup
    reductions, since otherwise we'll get incorrect results in some cases.
    To accomodate this, add a new operand to all DPP instructions which will
    be interpreted by the SI WQM pass. This will be exposed with a new
    intrinsic later. We'll also add support for Whole Wavefront Mode later.

    I also fixed llvm.amdgcn.mov.dpp to overwrite the source and fixed up
    the test. However, I could also keep the old behavior (where lanes that
    aren't written are undefined) if people want it.

    Reviewers: tstellar, arsenm

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

    Differential Revision: https://reviews.llvm.org/D34716 — cwabbott / detail

#290 (Aug 7, 2017 12:04:04 PM)

  1. Non-functional change. Fix previous patch D34784. — gbercea / detail
  2. Add some missing -no-canonical-prefixes. — d0k / detail
  3. AMDGPU: Remove -mcpu=SI

    Leftover from before amdgcn/r600 split. — arsenm / detail
  4. [tsan] Fix format string in WriteMemoryProfile

    The current format string is broken and fails to parse.

    Differential Revision: https://reviews.llvm.org/D36192 — kuba.brecka / detail
  5. AMDGPU: Remove redundant opt level check

    addOptimizedRegAlloc isn't used for -O0 already. — arsenm / detail
  6. AMDGPU: Remove FixControlFlowLiveIntervals pass

    This hasn't done anything in a long time. This was
    running after the the control flow pseudos were expanded,
    so this would never find them. The control flow pseudo
    expansion was moved to solve the problem this pass was
    supposed to solve in the first place, except handling
    it earlier also fixes it for fast regalloc which doesn't
    use LiveIntervals.

    Noticed by checking LCOV reports. — arsenm / detail
  7. [asan] Make dump_registers.cc more stable

    Differential Revision: https://reviews.llvm.org/D36231 — kuba.brecka / detail
  8. [InstCombine] Support (X | C1) & C2 --> (X & C2^(C1&C2)) | (C1&C2) for vector splats

    Note the original code I deleted incorrectly listed this as (X | C1) & C2 --> (X & C2^(C1&C2)) | C1 Which is only valid if C1 is a subset of C2. This relied on SimplifyDemandedBits to remove any extra bits from C1 before we got to that code.

    My new implementation avoids relying on that behavior so that it can be naively verified with alive.

    Differential Revision: https://reviews.llvm.org/D36384 — ctopper / detail
  9. [sanitizer] Remove use of task_for_pid from sanitizer_stoptheworld_mac.cc

    Using task_for_pid to get the "self" task is not necessary, and it can fail (e.g. for sandboxed processes). Let's just use mach_task_self().

    Differential Revision: https://reviews.llvm.org/D36284 — kuba.brecka / detail

#289 (Aug 7, 2017 10:46:42 AM)

  1. AMDGPU: Use a custom areInlineCompatible

    Fixes not inlining OpenCL library functions on AMDGPU,
    which don't have an explicitly set target-cpu. — arsenm / detail
  2. [X86][AVX] Add full test coverage of subvector_broadcasts from registers

    X86SubVBroadcast is for memory subvector broadcasts, but we must test that it handles all cases without the load as well just in case.

    This was noticed while I was triaging the test cases from PR34041. — rksimon / detail
  3. [DebugInfo][DWARF] Address paulr's comment on rL310253. — sdardis / detail
  4. [X86][AVX] Cleanup subvector broadcast tests - remove old prefixes. — rksimon / detail
  5. [x86] revert r310208 to investigate test-suite failures (PR34105 / PR34097) — spatel / detail
  6. [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

    Summary:
    OpenMP has the ability to offload target regions to devices which may have different architectures.

    A new -fopenmp-target-arch flag is introduced to specify the device architecture.

    In this patch I use the new flag to specify the compute capability of the underlying NVIDIA architecture for the OpenMP offloading CUDA tool chain.

    Only a host-offloading test is provided since full device offloading capability will only be available when [[ https://reviews.llvm.org/D29654 | D29654 ]] lands.

    Reviewers: hfinkel, Hahnfeld, carlo.bertolli, caomhin, ABataev

    Reviewed By: hfinkel

    Subscribers: guansong, cfe-commits

    Tags: #openmp

    Differential Revision: https://reviews.llvm.org/D34784 — gbercea / detail
  7. [DebugInfo][DWARF] Correct some usages of PRIx32 to PRIx64

    These lead to tests failing spuriously as the values after being rendered to a
    string were incorrect.

    Reviewers: clayborg

    Differential Revision: https://reviews.llvm.org/D36319 — sdardis / detail
  8. [SLP] General improvements of SLP vectorization process.

    Patch tries to improve two-pass vectorization analysis, existing in SLP vectorizer. What it does:

    1. Defines key nodes, that are the vectorization roots. Previously vectorization started if StoreInst or ReturnInst is found. For now, the vectorization started for all Instructions with no users and void types (Terminators, StoreInst) + CallInsts.
    2. CmpInsts, InsertElementInsts and InsertValueInsts are stored in the
    array. This array is processed only after the vectorization of the
    first-after-these instructions key node is finished. Vectorization goes
    in reverse order to try to vectorize as much code as possible.

    Reviewers: mzolotukhin, Ayal, mkuper, gilr, hfinkel, RKSimon

    Subscribers: ashahid, anemet, RKSimon, mssimpso, llvm-commits

    Differential Revision: https://reviews.llvm.org/D29826 — abataev / detail
  9. Fix typo in comment — arsenm / detail
  10. AMDGPU: Cleanup subtarget features

    Try to avoid mutually exclusive features. Don't use
    a real default GPU, and use a fake "generic". The goal
    is to make it easier to see which set of features are
    incompatible between feature strings.

    Most of the test changes are due to random scheduling changes
    from not having a default fullspeed model. — arsenm / detail
  11. Revert "[SLP] General improvements of SLP vectorization process."

    This reverts commit r310255. — abataev / detail
  12. [DAG] Extend visitSCALAR_TO_VECTOR optimization to truncated vector.

    Relanding after case to insert explicit truncation as necessary.

    Allow SCALAR_TO_VECTOR of EXTRACT_VECTOR_ELT to reduce to
    EXTRACT_SUBVECTOR of vector shuffle when output is smaller. Marginally
    improves vector shuffle computations.

    Reviewers: efriedma, RKSimon, spatel

    Subscribers: javed.absar, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35566 — niravd / detail
  13. [SLP] General improvements of SLP vectorization process.

    Summary:
    Patch tries to improve two-pass vectorization analysis, existing in SLP vectorizer. What it does:
    1. Defines key nodes, that are the vectorization roots. Previously vectorization started if StoreInst or ReturnInst is found. For now, the vectorization started for all Instructions with no users and void types (Terminators, StoreInst) + CallInsts.
    2. CmpInsts, InsertElementInsts and InsertValueInsts are stored in the array. This array is processed only after the vectorization of the first-after-these instructions key node is finished. Vectorization goes in reverse order to try to vectorize as much code as possible.

    Reviewers: mzolotukhin, Ayal, mkuper, gilr, hfinkel, RKSimon

    Subscribers: ashahid, anemet, RKSimon, mssimpso, llvm-commits

    Differential Revision: https://reviews.llvm.org/D29826 — abataev / detail
  14. [TableGen] AsmMatcher: fix OpIdx computation when HasOptionalOperands is true

    Relanding after fixing UB issue with DefaultOffsets.

    Consider the following instruction: "inst.eq $dst, $src" where ".eq"
    is an optional flag operand.  The $src and $dst operands are
    registers.  If we parse the instruction "inst r0, r1", the flag is not
    present and it will be marked in the "OptionalOperandsMask" variable.
    After the matching is complete we call the "convertToMCInst" method.

    The current implementation works only if the optional operands are at
    the end of the array.  The "Operands" array looks like [token:"inst",
    reg:r0, reg:r1].  The first operand that must be added to the MCInst
    is the destination, the r0 register.  The "OpIdx" (in the Operands
    array) for this register is 2.  However, since the flag is not present
    in the Operands, the actual index for r0 should be 1.  The flag is not
    present since we rely on the default value.

    This patch removes the "NumDefaults" variable and replaces it with an
    array (DefaultsOffset).  This array contains an index for each operand
    (excluding the mnemonic).  At each index, the array contains the
    number of optional operands that should be subtracted.  For the
    previous example, this array looks like this: [0, 1, 1].  When we need
    to access the r0 register, we compute its index as 2 -
    DefaultsOffset[1] = 1.

    Patch by Alexandru Guduleasa!

    Reviewers: SamWot, nhaustov, niravd

    Reviewed By: niravd

    Subscribers: vitalybuka, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35998 — niravd / detail
  15. [DebugInfo][DWARF] Use PRIx64 explicitly in output. — sdardis / detail
  16. [X86][LLVM]Expanding Supports lowerInterleavedStore() in X86InterleavedAccess (VF16 stride 4).

    This patch expands the support of lowerInterleavedStore to 16x8i stride 4.

    LLVM creates suboptimal shuffle code-gen for AVX2. In overall, this patch is a specific fix for the pattern (Strid=4 VF=16) and we plan to include more patterns in the future.

    The patch goal is to optimize the following sequence:
    At the end of the computation, we have ymm2, ymm0, ymm12 and ymm3 holding
    each 16 chars:

    c0, c1, , c16
    m0, m1, , m16
    y0, y1, , y16
    k0, k1, ., k16

    And these need to be transposed/interleaved and stored like so:

    c0 m0 y0 k0 c1 m1 y1 k1 c2 m2 y2 k2 c3 m3 y3 k3 ....

    Differential Revision: https://reviews.llvm.org/D35829 — mzuckerm / detail
  17. [AMDGPU][MC] Corrected VOP3 version of v_interp_* instructions for VI

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

    Reviewers: vpykhtin, SamWot, arsenm

    Differential Revision: https://reviews.llvm.org/D35902 — dpreobra / detail

#288 (Aug 7, 2017 5:50:59 AM)

  1. [llvm-objdump] Use PRIx64 for output of ARM64_RELOC_ADDEND — sdardis / detail
  2. [X86][AVX] Added test for broadcast shuffle with undefs (PR34041) — rksimon / detail
  3. Add NetBSD support in sanitizer_test_utils.h

    Summary:
    NetBSD ships with printf_l(3) like FreeBSD.

    NetBSD does not ship with memalign, pvalloc, malloc with "usable size"
    and is the same here as Darwin, Android, FreeBSD and Windows.

    Sponsored by <The NetBSD Foundation>

    Reviewers: joerg, vitalybuka, kcc, fjricci, filcab

    Reviewed By: vitalybuka

    Subscribers: srhines, llvm-commits, emaste, kubamracek, #sanitizers

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D36373 — kamil / detail
  4. Add NetBSD support in asan_errors.cc

    Summary:
    Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas.

    Sponsored by <The NetBSD Foundation>

    Reviewers: joerg, fjricci, vitalybuka, filcab, kcc

    Reviewed By: vitalybuka

    Subscribers: llvm-commits, kubamracek, #sanitizers

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D36374 — kamil / detail
  5. Add NetBSD support in asan_interceptors.h

    Summary:
    Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas.

    Sponsored by <The NetBSD Foundation>

    Reviewers: joerg, filcab, kcc, fjricci, vitalybuka

    Reviewed By: vitalybuka

    Subscribers: kubamracek, llvm-commits, #sanitizers

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D36375 — kamil / detail
  6. Enable LLVM asan support for NetBSD/i386

    Summary:
    Verified to work and useful to run check-asan, as this target tests 32-bit and 64-bit execution.

    Sponsored by <The NetBSD Foundation>

    Reviewers: joerg, filcab, dim, vitalybuka

    Reviewed By: vitalybuka

    Subscribers: #sanitizers, cfe-commits

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D36378 — kamil / detail

#287 (Aug 7, 2017 2:33:22 AM)

  1. [asan] Return sizeof missed by r309914 — Vitaly Buka / detail
  2. [ARM] Fix assembly and disassembly for VMRS/VMSR

    This patch addresses two issues with assembly and disassembly for VMRS/VMSR:

    1.currently VMRS/VMSR instructions accessing fpsid, mvfr{0-2} and fpexc, are
      accepted for non ARMv8-A targets.

    2. all VMRS/VMSR instructions accept writing/reading to PC and SP, when only
       ARMv7-A and ARMv8-A should be allowed to write/read to SP and none to PC.

    This patch addresses those issues and adds tests for these cases.

    Differential Revision: https://reviews.llvm.org/D36306 — avieira / detail
  3. [asan] Fix asan dynamic shadow check before copyArgsPassedByValToAllocas — Vitaly Buka / detail
  4. [asan] Disable checking of arguments passed by value for --asan-force-dynamic-shadow

    Fails with "Instruction does not dominate all uses!" — Vitaly Buka / detail
  5. Add -asan-force-dynamic-shadow test — Vitaly Buka / detail

#286 (Aug 6, 2017 11:37:03 PM)

  1. [SelectionDAG] reset NewNodesMustHaveLegalTypes flag between basic blocks

    The NewNodesMustHaveLegalTypes flag is set to false at the beginning of CodeGenAndEmitDAG, and set to true after legalizing types.
    But before calling CodeGenAndEmitDAG we build the DAG for the basic block.
    So for the first basic block NewNodesMustHaveLegalTypes would be 'false' during the SDAG building, and for all other basic blocks it would be 'true'.

    This patch sets the flag to false before SDAG building each basic block.

    Differential Revision:
    https://reviews.llvm.org/D33435 — guyblank / detail

#284 (Aug 6, 2017 7:35:33 PM)

  1. [Reassociate] Use a range loop for clarity. NFCI.

    While here, rename `i` to `Rank` as the latter is more
    self-explanatory (and this code also uses `I` two lines below to
    identify an Instruction). — davide / detail
  2. [Reassociate] Try to bail out early when canonicalizing.

    This commit rearranges the checks to avoid calls to getRank()
    when not needed (e.g. when RHS == LHS). — davide / detail
  3. [InstCombine] Remove shift handling from OptAndOp.

    Summary: This is all handled by SimplifyDemandedBits.

    Reviewers: spatel, davide

    Reviewed By: davide

    Subscribers: davide, llvm-commits

    Differential Revision: https://reviews.llvm.org/D36382 — ctopper / detail
  4. [InstCombine] Support (X ^ C1) & C2 --> (X & C2) ^ (C1&C2) for vector splats. — ctopper / detail

#283 (Aug 6, 2017 3:27:14 PM)

  1. [InstCombine] Support '(C - X) ^ signmask -> (C + signmask - X)' and '(X + C) ^ signmask -> (X + C + signmask)' for vector splats. — ctopper / detail
  2. [SLPVectorizer][X86] Cleanup test case. NFCI

    Remove excess attributes/metadata — rksimon / detail
  3. [llvm-dlltool] Map the "arm64" machine type

    Differential Revision: https://reviews.llvm.org/D36365 — mstorsjo / detail
  4. [test] Remove an unintentional -x cl flag in an aarch64-windows test

    This test was only intended to test compiling C, not OpenCL.

    Differential Revision: https://reviews.llvm.org/D36363 — mstorsjo / detail

#282 (Aug 6, 2017 12:52:28 PM)

  1. AMDGPU: Fix typo in feature description — arsenm / detail

#281 (Aug 6, 2017 10:06:33 AM)

  1. [x86] use more shift or LEA for select-of-constants

    We can convert any select-of-constants to math ops:
    http://rise4fun.com/Alive/d7d

    For this patch, I'm enhancing an existing x86 transform that uses fake multiplies
    (they always become shl/lea) to avoid cmov or branching. The current code misses
    cases where we have a negative constant and a positive constant, so this is just
    trying to plug that hole.

    The DAGCombiner diff prevents us from hitting a terrible inefficiency: we can start
    with a select in IR, create a select DAG node, convert it into a sext, convert it
    back into a select, and then lower it to sext machine code.

    Some notes about the test diffs:

    1. 2010-08-04-MaskedSignedCompare.ll - We were creating control flow that didn't exist in the IR.
    2. memcmp.ll - Choose -1 or 1 is the case that got me looking at this again. I
       think we could avoid the push/pop in some cases if we used 'movzbl %al' instead of an xor on
       a different reg? That's a post-DAG problem though.
    3. mul-constant-result.ll - The trade-off between sbb+not vs. setne+neg could be addressed if
       that's a regression, but I think those would always be nearly equivalent.
    4. pr22338.ll and sext-i1.ll - These tests have undef operands, so I don't think we actually care about these diffs.
    5. sbb.ll - This shows a win for what I think is a common case: choose -1 or 0.
    6. select.ll - There's another borderline case here: cmp+sbb+or vs. test+set+lea? Also, sbb+not vs. setae+neg shows up again.
    7. select_const.ll - These are motivating cases for the enhancement; replace cmov with cheaper ops.

    Assembly differences between movzbl and xor to avoid a partial reg stall are caused later by the X86 Fixup SetCC pass.

    Differential Revision: https://reviews.llvm.org/D35340 — spatel / detail

#280 (Aug 6, 2017 8:15:18 AM)

  1. [X86] Add comment to match closing Defs = [FPSW]. NFCI. — rksimon / detail
  2. [X86][X87] Regenerate inline-asm tests — rksimon / detail

#279 (Aug 6, 2017 5:12:06 AM)

  1. [AVR] Compute code model if one is not provided

    The patch from r310028 fixed things to work with the new
    `LLVMTargetMachine` constructor that came in on r309911.
    However, the fix was partial since an object of type
    `CodeModel::Model` must be passed to `LLVMTargetMachine`
    (not one of `Optional<CodeModel::Model>`).

    This patch fixes the problem in the same fashion that r309911
    did for other machines: by checking if the passed optional
    code model has a value and using `CodeModel::Small` if not. — meadori / detail
  2. [X86][X87] Add test case for PR34080

    Test with/without the sandybridge (default) model for SSE2, SSE3 and AVX targets.

    pre-SSE3 the issue is the order of the fpsw and fpcw load/stores (with SSE3 trunc-store FIST instructions avoid the sw/cw manipulations). — rksimon / detail

#277 (Aug 6, 2017 12:41:33 AM)

  1. [InstCombine] Support ~(c-X) --> X+(-c-1) and ~(X-c) --> (-c-1)-X for splat vectors. — ctopper / detail

#275 (Aug 5, 2017 7:31:18 PM)

  1. [X86] Enable isel to use the PAUSE instruction even when SSE2 is disabled. Clang part

    Summary:
    On older processors this instruction encoding is treated as a NOP.

    MSVC doesn't disable intrinsics based on features the way clang/gcc does. Because the PAUSE instruction encoding doesn't crash older processors, some software out there uses these intrinsics without checking for SSE2.

    This change also seems to also be consistent with gcc behavior.

    Fixes PR34079

    Reviewers: RKSimon, zvi

    Reviewed By: RKSimon

    Subscribers: cfe-commits

    Differential Revision: https://reviews.llvm.org/D36362 — ctopper / detail
  2. [X86] Enable isel to use the PAUSE instruction even when SSE2 is disabled

    Summary:
    On older processors this instruction encoding is treated as a NOP.

    MSVC doesn't disable intrinsics based on features the way clang/gcc does. Because the PAUSE instruction encoding doesn't crash older processors, some software out there uses these intrinsics without checking for SSE2.

    This change also seems to also be consistent with gcc behavior.

    Fixes PR34079

    Reviewers: RKSimon, zvi

    Reviewed By: RKSimon

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D36361 — ctopper / detail

#274 (Aug 5, 2017 4:33:54 PM)

  1. [ADT] Add a much simpler loop to DenseMap::clear when the types are
    POD-like and we can just splat the empty key across memory.

    Sadly we can't optimize the normal loop well enough because we can't
    turn the conditional store into an unconditional store according to the
    memory model.

    This loop actually showed up in a profile of code that was calling clear
    as a serious source of time. =[ — chandlerc / detail
  2. [InstCombine] Regenerate test28_sub test case in xor.ll that I forgot to commit after fixing a typo in r310186. — ctopper / detail

#273 (Aug 5, 2017 2:04:35 PM)

  1. [InstCombine] Fold (C - X) ^ signmask -> (C + signmask - X). — ctopper / detail
  2. [InstCombine] Teach the code that pulls logical operators through constant shifts to handle vector splats too. — ctopper / detail
  3. [InstCombine] Support vector splats in foldSelectICmpAnd.

    Unfortunately, it looks like there's some other missed optimizations in the generated code for some of these cases. I'll try to look at some of those next. — ctopper / detail

#272 (Aug 5, 2017 12:14:27 PM)

  1. [SLPVectorizer] Add extra parameter to setInsertPointAfterBundle to handle different opcodes, NFCI.

    Differential Revision: https://reviews.llvm.org/D35769 — dinar / detail
  2. Add NetBSD support in sanitizer_errno.h

    Summary:
    NetBSD ships with __errno (value for __errno_location) like Android.

    Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas.

    Sponsored by <The NetBSD Foundation>

    Reviewers: joerg, vitalybuka, fjricci, kcc, filcab

    Reviewed By: vitalybuka

    Subscribers: llvm-commits, srhines, kubamracek, #sanitizers

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D36360 — kamil / detail

#255 (Aug 4, 2017 2:52:31 PM)

  1. [libFuzzer] add -fsanitize-coverage-pc-table to -fsanitize=fuzzer — kcc / detail
  2. Revert "[OPENMP][DEBUG] Set proper address space info if required by target."

    This reverts commit r310104. — abataev / detail
  3. Revert "[OPENMP] Fix for pacify buildbots, NFC."

    This reverts commit r310120. — abataev / detail
  4. [asan] Fix unsupported test on Android

    Summary:
    `pvalloc` appears to not be available on Android. Mark the failing test as
    unsupported on that platform.

    Reviewers: alekseyshl, vitalybuka

    Reviewed By: alekseyshl, vitalybuka

    Subscribers: srhines, kubamracek, llvm-commits

    Differential Revision: https://reviews.llvm.org/D36339 — cryptoad / detail
  5. Reland "CFI: blacklist STL allocate() from unrelated-casts"

    Reland r310097 with a fix for a debug assertion in NamedDecl.getName()

    Differential Revision: https://reviews.llvm.org/D36294 — vlad.tsyrklevich / detail
  6. Fix broken PDB tests. — zturner / detail
  7. BlockPlacement: add a flag to force cold block outlining w/o a profile.

    NFC. — iteratee / detail
  8. [pdbutil] When dumping section contribs, show the section name. — zturner / detail
  9. Reland "[llvm][llvm-objcopy] Added support for outputting to binary in llvm-objcopy"

    This change adds the "-O binary" flag which directs llvm-objcopy to
    output the object file to the same format as GNU objcopy does when given
    the flag "-O binary". This was done by splitting the Object class into
    two subclasses ObjectELF and ObjectBianry which each output a different
    format but relay on the same code to read in the Object in Object.

    Patch by Jake Ehrlich

    Differential Revision: https://reviews.llvm.org/D34480 — phosek / detail
  10. [libFuzzer] re-enable fuzzer-printcovpcs.test — kcc / detail
  11. [libFuzzer] re-enable the bigger libFuzzer tests — kcc / detail
  12. Remove unused include directive and un-break the module build. — Adrian Prantl / detail
  13. Revert r310055, it caused PR34074. — nico / detail
  14. [InstCombine] add vector tests for truncated math; NFC — spatel / detail
  15. Revert "Reland "CFI: blacklist STL allocate() from unrelated-casts""

    This reverts commit r310105. — vlad.tsyrklevich / detail
  16. [OPENMP] Fix for pacify buildbots, NFC. — abataev / detail
  17. [asan] Check for pvalloc overlow

    Summary:
    Last one of the `pvalloc` overflow checks!

    `CheckForPvallocOverflow` was introduced with D35818 to detect when `pvalloc`
    would wrap when rounding up to the next multiple of the page size.

    Add this check to ASan's `pvalloc` implementation.

    Reviewers: alekseyshl

    Reviewed By: alekseyshl

    Subscribers: llvm-commits, kubamracek

    Differential Revision: https://reviews.llvm.org/D36257 — cryptoad / detail
  18. Revert r310058, it caused PR34073. — nico / detail
  19. [SCEV] Preserve NSW information for sext(subtract).

    Pushes the sext onto the operands of a Sub if NSW is present.
    Also adds support for propagating the nowrap flags of the
    llvm.ssub.with.overflow intrinsic during analysis.

    Differential Revision: https://reviews.llvm.org/D35256 — aemerson / detail
  20. Add NetBSD support in sanitizer_procmaps_freebsd.cc

    Summary:
    This adds NetBSD specific:
    - ReadProcMaps()
    - MemoryMappingLayout::Next()

    This code is largely shared with FreeBSD.

    Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas.

    Sponsored by <The NetBSD Foundation>

    Reviewers: kcc, joerg, filcab, vitalybuka, fjricci

    Reviewed By: fjricci

    Subscribers: emaste, kubamracek, mgorny, llvm-commits, #sanitizers

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D35551 — kamil / detail
  21. [GlobalISel] Remove the GISelAccessor API.

    Its sole purpose was to avoid spreading around ifdefs related to
    building global-isel. Since r309990, GlobalISel is not optional anymore,
    thus, we can get rid of this mechanism all together.

    NFC. — qcolombet / detail
  22. [GlobalISel] Remove a stall comment in CMake.

    Thanks to Diana Picus <diana.picus@linaro.org> for noticing.

    NFC — qcolombet / detail
  23. [libFuzzer] make a test more robust — kcc / detail
  24. [libFuzzer] remove the now redundant 'LLVMFuzzer-' prefix from libFuzzer tests — kcc / detail
  25. CFI: Move STL allocator blacklist to clang

    Summary:
    The regular expression to match STL allocators can't easily account for
    C++ mangling compression and fails to match some valid instances of STL
    allocators. Perform this logic in clang instead.

    Motivated by crbug.com/751385.

    Reviewers: pcc, kcc, llvm-commits

    Reviewed By: pcc

    Differential Revision: https://reviews.llvm.org/D36291 — vlad.tsyrklevich / detail
  26. [llvm-pdbutil] Dump image section headers.

    Image section headers are stored in the DBI stream, but we
    had no way to dump them.  This patch adds dumping support,
    along with some tests that LLD actually dumps them correctly.

    Differential Revision: https://reviews.llvm.org/D36332 — zturner / detail
  27. [libFuzzer] split one test into several — kcc / detail
  28. Reland "CFI: blacklist STL allocate() from unrelated-casts"

    Reland r310097 with a unit test fix for MS ABI build bots.

    Differential Revision: https://reviews.llvm.org/D36294 — vlad.tsyrklevich / detail
  29. [OPENMP][DEBUG] Set proper address space info if required by target.

    Arguments, passed to the outlined function, must have correct address
    space info for proper Debug info support. Patch sets global address
    space for arguments that are mapped and passed by reference.

    Also, cuda-gdb does not handle reference types correctly, so reference
    arguments are represented as pointers. — abataev / detail
  30. [libFuzzer] add -DLIBFUZZER_ENABLE_TESTS=ON to libFuzzer bot — kcc / detail
  31. [InstCombine] auto-generate test checks; NFC — spatel / detail
  32. [libFuzzer tests] Only enable libFuzzer tests if
    -DLIBFUZZER_ENABLE_TESTS=ON is set. — George Karpenkov / detail
  33. Revert "CFI: blacklist STL allocate() from unrelated-casts"

    This reverts commit r310097. — vlad.tsyrklevich / detail
  34. [OPENMP] Unify generation of outlined function calls. — abataev / detail
  35. CFI: blacklist STL allocate() from unrelated-casts

    Summary:
    Previously, STL allocators were blacklisted in compiler_rt's
    cfi_blacklist.txt because they mandated a cast from void* to T* before
    object initialization completed. This change moves that logic into the
    front end because C++ name mangling supports a substitution compression
    mechanism for symbols that makes it difficult to blacklist the mangled
    symbol for allocate() using a regular expression.

    Motivated by crbug.com/751385.

    Reviewers: pcc, kcc

    Reviewed By: pcc

    Subscribers: cfe-commits

    Differential Revision: https://reviews.llvm.org/D36294 — vlad.tsyrklevich / detail
  36. [clang-tidy] Added clang-tidy test cases related to rL310095

    Differential Revision: https://reviews.llvm.org/D36308 — fgross / detail
  37. [ASTMatcher] Add handling for DeducedType to HasDeclarationMatcher

    HasDeclarationMatcher did not handle DeducedType, it always returned false for deduced types.

    So with code like this:
    struct X{};
    auto x = X{};

    This did no longer match:
    varDecl(hasType(recordDecl(hasName("X"))))

    Because HasDeclarationMatcher didn't resolve the DeducedType of x.

    Differential Revision: https://reviews.llvm.org/D36308 — fgross / detail
  38. [SystemZ] Add support for 128-bit atomic load/store/cmpxchg

    This adds support for the main 128-bit atomic operations,
    using the SystemZ instructions LPQ, STPQ, and CDSG.

    Generating these instructions is a bit more complex than usual
    since the i128 type is not legal for the back-end.  Therefore,
    we have to hook the LowerOperationWrapper and ReplaceNodeResults
    TargetLowering callbacks. — uweigand / detail
  39. [SystemZ] Eliminate unnecessary serialization operations

    We currently emit a serialization operation (bcr 14, 0) before every
    atomic load and after every atomic store.  This is overly conservative.
    The SystemZ architecture actually does not require any serialization
    for atomic loads, and a serialization after an atomic store only if
    we need to enforce sequential consistency.  This is what other compilers
    for the platform implement as well. — uweigand / detail
  40. Fix PR33514

    Summary:
    The bug was uncovered after fix of  PR23384 (part 3 of 3).
    The patch restricts pointer multiplication in SCEV computaion for ICmpZero.

    Reviewers: qcolombet

    Differential Revision: http://reviews.llvm.org/D36170

    From: Evgeny Stupachenko <evstupac@gmail.com>
                             <evgeny.v.stupachenko@intel.com> — evstupac / detail
  41. [libFuzzer] make trace-pc.test more reliable — kcc / detail
  42. [compiler-rt] Check for empty buffer in Addr2LineProcess::ReadFromSymbolizer

    This fixes a bug in the ReadFromSymbolizer method of the
    Addr2LineProcess class; if the input is too large, the returned buffer
    will be null and will consequently fail the CHECK. The proposed fix is
    to simply check if the buffer consists of only a null-terminator and
    return if so (in effect skipping that frame). I tested by running one of
    the unit tests both before and after my change.

    Submitted on behalf of david-y-lam.

    Reviewers: eugenis, alekseyshl, kcc

    Reviewed By: alekseyshl

    Differential Revision: https://reviews.llvm.org/D36207 — alekseyshl / detail
  43. [AMDGPU] Implement llvm.amdgcn.set.inactive intrinsic

    Summary:
    This intrinsic lets us set inactive lanes to an identity value when
    implementing wavefront reductions. In combination with Whole Wavefront
    Mode, it lets inactive lanes be skipped over as required by GLSL/Vulkan.
    Lowering the intrinsic needs to happen post-RA so that RA knows that the
    destination isn't completely overwritten due to the EXEC shenanigans, so
    we need another pseudo-instruction to represent the un-lowered
    intrinsic.

    Reviewers: tstellar, arsenm

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

    Differential Revision: https://reviews.llvm.org/D34719 — cwabbott / detail
  44. [AMDGPU] Add support for Whole Wavefront Mode

    Summary:
    Whole Wavefront Wode (WWM) is similar to WQM, except that all of the
    lanes are always enabled, regardless of control flow. This is required
    for implementing wavefront reductions in non-uniform control flow, where
    we need to use the inactive lanes to propagate intermediate results, so
    they need to be enabled. We need to propagate WWM to uses (unless
    they're explicitly marked as exact) so that they also propagate
    intermediate results correctly. We do the analysis and exec mask munging
    during the WQM pass, since there are interactions with WQM for things
    that require both WQM and WWM. For simplicity, WWM is entirely
    block-local -- blocks are never WWM on entry or exit of a block, and WWM
    is not propagated to the block level.  This means that computations
    involving WWM cannot involve control flow, but we only ever plan to use
    WWM for a few limited purposes (none of which involve control flow)
    anyways.

    Shaders can ask for WWM using the @llvm.amdgcn.wwm intrinsic. There
    isn't yet a way to turn WWM off -- that will be added in a future
    change.

    Finally, it turns out that turning on inactive lanes causes a number of
    problems with register allocation. While the best long-term solution
    seems like teaching LLVM's register allocator about predication, for now
    we need to add some hacks to prevent ourselves from getting into trouble
    due to constraints that aren't currently expressed in LLVM. For the gory
    details, see the comments at the top of SIFixWWMLiveness.cpp.

    Reviewers: arsenm, nhaehnle, tpr

    Subscribers: kzhuravl, wdng, mgorny, yaxunl, dstuttard, t-tye, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35524 — cwabbott / detail
  45. [AMDGPU] refactor WQM pass in preparation for WWM (NFCI)

    Summary:
    Right now, the WQM pass conflates two different things when tracking the
    Needs of an instruction:

    1. Needs can be StateWQM, which is propagated to other instructions, and
    means that this instruction (and everything it depends on) must be
    calculated in WQM.
    2. Needs can be StateExact, which is not propagated to other
    instructions, and means that this instruction must not be calculated in
    WQM and WQM-ness must not be propagated past this instruction.

    This works now because there are only two different states, but in the
    future we want to be able to express things like "calculate this in WQM,
    but please disable WWM and don't propagate it" (to implement
    @llvm.amdgcn.set.inactive). In order to do this, we need to split the
    per-instruction Needs field in two: a new Needs field, which can only
    contain StateWQM (and in the future, StateWWM) and is propagated to
    sources, and a Disables field, which can also contain just StateWQM or
    nothing for now.

    We keep the per-block tracking the same for now, by translating
    Needs/Disables to the old representation with only StateWQM or
    StateExact. The other place that needs special handling is when we
    emit the state transitions. We could just translate back to the old
    representation there as well, which we almost do, but instead of 0 as a
    placeholder value for "any state," we explicitly or together all the
    states an instruction is allowed to be in. This lets us refactor the
    code in preparation for WWM, where we'll need to be able to handle
    things like "this instruction must be in Exact or WQM, but not WWM."

    Reviewers: arsenm, nhaehnle, tpr

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

    Differential Revision: https://reviews.llvm.org/D35523 — cwabbott / detail
  46. [AMDGPU] Add an llvm.amdgcn.wqm intrinsic for WQM

    Summary:
    Previously, we assumed that certain types of instructions needed WQM in
    pixel shaders, particularly DS instructions and image sampling
    instructions. This was ok because with OpenGL, the assumption was
    correct. But we want to start using DPP instructions for derivatives as
    well as other things, so the assumption that we can infer whether to use
    WQM based on the instruction won't continue to hold. This intrinsic lets
    frontends like Mesa indicate what things need WQM based on their
    knowledge of the API, rather than second-guessing them in the backend.
    We need to keep around the old method of enabling WQM, but eventually we
    should remove it once Mesa catches up. For now, this will let us use DPP
    instructions for computing derivatives correctly.

    Reviewers: arsenm, tpr, nhaehnle

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

    Differential Revision: https://reviews.llvm.org/D35167 — cwabbott / detail
  47. [MachineOperand] Add ChangeToTargetIndex method. NFC

    Differential Revision: https://reviews.llvm.org/D36301 — mggm / detail
  48. Add OpenCL 2.0 atomic builtin functions as Clang builtin

    OpenCL 2.0 atomic builtin functions have a scope argument which is ideally
    represented as synchronization scope argument in LLVM atomic instructions.

    Clang supports translating Clang atomic builtin functions to LLVM atomic
    instructions. However it currently does not support synchronization scope
    of LLVM atomic instructions. Without this, users have to use LLVM assembly
    code to implement OpenCL atomic builtin functions.

    This patch adds OpenCL 2.0 atomic builtin functions as Clang builtin
    functions, which supports generating LLVM atomic instructions with
    synchronization scope operand.

    Currently only constant memory scope argument is supported. Support of
    non-constant memory scope argument will be added later.

    Differential Revision: https://reviews.llvm.org/D28691 — yaxunl / detail
  49. [libFuzzer] simplify the fuzzer bot following r310075 — kcc / detail
  50. [Support] Remove getPathFromOpenFD, it was unused

    Summary:
    It was added to support clang warnings about includes with case
    mismatches, but it ended up not being necessary.

    Reviewers: twoh, rafael

    Subscribers: hiraditya, llvm-commits

    Differential Revision: https://reviews.llvm.org/D36328 — rnk / detail
  51. Fixing buildbots: do not register check-fuzzer if clang or asan are not
    present. — George Karpenkov / detail
  52. Drop Windows support from libFuzzer tests.

    Differential Revision: https://reviews.llvm.org/D36205 — George Karpenkov / detail
  53. Port libFuzzer tests to LIT. Do not require two-stage build for check-fuzzer.

    This revision ports all libFuzzer tests apart from the unittest to LIT.
    The advantages of doing so include:

    - Tests being self-contained
    - Much easier debugging of a single test
    - No need for using a two-stage compilation

    The unit-test is still compiled using CMake, but it does not need a
    freshly built compiler.

    NOTE: The previous two-stage bot configuration will NOT work, as in the
    second stage build LLVM_USE_SANITIZER is set, which disables ASAN from
    being built.
    Thus bots will be reconfigured in the next few commits.

    Differential Revision: https://reviews.llvm.org/D36295 — George Karpenkov / detail
  54. [Inliner] Fix a typo in option description. NFC. — eraman / detail
  55. [ARM] Use searchable-table for banked registers

    This is a continuation of https://reviews.llvm.org/D36219

    This patch uses reverse mapping (encoding->name) in
    ARMInstPrinter::printBankedRegOperand to get rid of
    hard-coded values (as pointed out by @olista01).

    Reviewed by: @fhahn, @rovka, @olista01
    Differential Revision: https://reviews.llvm.org/D36260 — javed.absar / detail

#254 (Aug 4, 2017 10:14:17 AM)

  1. [ArgPromotion] Preserve alignment of byval argument in new alloca

    The frontend may have requested a higher alignment for any reason, and
    downstream optimizations may already have taken advantage of it.  We
    should keep the same alignment when moving the allocation from the
    parameter area to the local variable area.

    Fixes PR34038 — rnk / detail
  2. clang-format: [JS] support fields with case/switch/default labels.

    Summary:
    `case:` and `default:` would normally parse as labels for a `switch` block.
    However in TypeScript, they can be used in field declarations, e.g.:

        interface I {
          case: string;
        }

    This change special cases parsing them in declaration lines to avoid wrapping
    them.

    Reviewers: djasper

    Subscribers: klimek, cfe-commits

    Differential Revision: https://reviews.llvm.org/D36148 — mprobst / detail
  3. [ConstantInt] Use ConstantInt::getValue instead of Constant::getUniqueInteger in a few places where we obviously have a ConstantInt. NFC

    getUniqueInteger will ultimately call ConstantInt::getValue, but calling ConstantInt::getValue should be inlined. — ctopper / detail
  4. [AArch64] Fix an assertion for pre-index generation with unscaled loads/stores.

    Differential Revision: https://reviews.llvm.org/D36248
    PR34035 — mcrosier / detail
  5. Adjust the hotness threshold from 99.9% to 99%.

    Summary: We originally set the hotness threshold as 99.9% to be consistent with gcc FDO. But because the inline heuristic is different between 2 compilers: llvm uses bottom-up algorithm while gcc uses priority based. The LLVM algorithm tends to inline too much early that prevents hot callsites from further inlined into its caller. Due to this restriction, we think it is reasonable to lower the hotness threshold to give priority to those that are really hot. Our experiments show that this change would improve performance on large applications. Note that the inline heuristic has great room for further tuning. Once the inline heuristics are refined, we could adjust this threshold to allow inlining for less hot callsites.

    Reviewers: davidxl, tejohnson, eraman

    Reviewed By: tejohnson

    Subscribers: sanjoy, llvm-commits

    Differential Revision: https://reviews.llvm.org/D36317 — dehao / detail
  6. [InstCombine] Fold single-use variable into assert.

    Avoids unused variable warnings in Release builds. No functional change. — d0k / detail
  7. [InstCombine] Remove the (not (sext)) case from foldBoolSextMaskToSelect and inline the remaining code to match visitOr

    Summary:
    The (not (sext)) case is really (xor (sext), -1) which should have been simplified to (sext (xor, 1)) before we got here. So we shouldn't need to handle it.

    With that taken care of we only need to two cases so don't need the swap anymore. This makes us in sync with the equivalent code in visitOr so inline this to match.

    Reviewers: spatel, eli.friedman, majnemer

    Reviewed By: spatel

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D36240 — ctopper / detail
  8. [InstCombine] Use ConstantInt::getFalse to reduce some code. NFC — ctopper / detail
  9. [ThinLTO] Add FunctionAttrs to ThinLTO index

    Adds function attributes to index: ReadNone, ReadOnly, NoRecurse, NoAlias. This attributes will be used for future ThinLTO optimizations that will propagate function attributes across modules. — ncharlie / detail
  10. [InstCombine] narrow lshr with constant

    Name: narrow_shift
    Pre: C1 < 8
    %zx = zext i8 %x to i32
    %l = lshr i32 %zx, C1
      => 
    %narrowC = trunc i32 C1 to i8
    %ns = lshr i8 %x, %narrowC
    %l = zext i8 %ns to i32

    http://rise4fun.com/Alive/jIV

    This isn't directly applicable to PR34046 as written, but we
    need to have more narrowing folds like this to be sure that
    rotate patterns are recognized. — spatel / detail

#253 (Aug 4, 2017 8:05:33 AM)

  1. [AMDGPU][MC] Enabled expressions as operands

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

    Reviewers: vpykhtin, SamWot, arsenm

    Differential Revision: https://reviews.llvm.org/D36091 — dpreobra / detail
  2. [DAGCombiner] Extending pattern detection for vector shuffle.

    If all the operands of a BUILD_VECTOR extract elements from same vector then split the vector efficiently based on the maximum vector access index.

    Committed on behalf of @jbhateja (Jatin Bhateja)

    Differential Revision: https://reviews.llvm.org/D35788 — rksimon / detail

#252 (Aug 4, 2017 5:45:36 AM)

  1. Revert r304953 for release 5.0.0

    This is causing failures when compiling clang with -O3
    as one of the structures used by clang is passed by
    value and uses the fastcc calling convention.

    Faliures manifest for stage2 mips build. — smaksimovic / detail
  2. [DSE] Merge stores when the later store only writes to memory locations the early store also wrote to.

    Summary:
    This fixes PR31777.

    If both stores' values are ConstantInt, we merge the two stores
    (shifting the smaller store appropriately) and replace the earlier (and
    larger) store with an updated constant.

    In the future we should also support vectors of integers. And maybe
    float/double if we can.

    Reviewers: hfinkel, junbuml, jfb, RKSimon, bkramer

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D30703 — filcab / detail
  3. [InstCombine] Canonicalize clamp of float types to minmax in fast mode.

    Summary:
    This commit allows matchSelectPattern to recognize clamp of float
    arguments in the presence of FMF the same way as already done for
    integers.

    This case is a little different though. With integers, given the
    min/max pattern is recognized, DAGBuilder starts selecting MIN/MAX
    "automatically". That is not the case for float, because for them only
    full FMINNAN/FMINNUM/FMAXNAN/FMAXNUM ISD nodes exist and they do care
    about NaNs. On the other hand, some backends (e.g. X86) have only
    FMIN/FMAX nodes that do not care about NaNS and the former NAN/NUM
    nodes are illegal thus selection is not happening. So I decided to do
    such kind of transformation in IR (InstCombiner) instead of
    complicating the logic in the backend.

    Reviewers: spatel, jmolloy, majnemer, efriedma, craig.topper

    Reviewed By: efriedma

    Subscribers: hiraditya, javed.absar, n.bozhenov, llvm-commits

    Patch by Andrei Elovikov <andrei.elovikov@intel.com>

    Differential Revision: https://reviews.llvm.org/D33186 — n.bozhenov / detail
  4. Add some tests for cast+clamp/min/max before D33186.

    Summary:
    - add more tests
    - pr27236.ll: rename %tmpN -> %N because otherwise a FileCheck
      variable for newly appeared unnamed value would use the same name as
      tmpN (as generated by update_test_checks.py)
    - run update_test_checks.py

    Reviewers: efriedma

    Reviewed By: efriedma

    Subscribers: n.bozhenov, llvm-commits

    Patch by Andrei Elovikov <andrei.elovikov@intel.com>

    Differential Revision: https://reviews.llvm.org/D35002 — n.bozhenov / detail
  5. [clang-tidy] Add missing documents for "IgnoreMacros" option. — hokein / detail
  6. [clang-tidy] Ignore macros in make-unique check.

    Summary:
    The check doesn't fully support smart-ptr usages inside macros, which
    may cause incorrect fixes, or even crashes, ignore them for now.

    Reviewers: alexfh

    Reviewed By: alexfh

    Subscribers: JDevlieghere, xazax.hun, cfe-commits

    Differential Revision: https://reviews.llvm.org/D36264 — hokein / detail
  7. [AMDGPU] Fixed MSVC build break

    Error was:

    field of type 'llvm::ArgDescriptor' has private default constructor
    const AMDGPUFunctionArgInfo AMDGPUArgumentUsageInfo::ExternFunctionInfo{};
                                                                            ^ — fgross / detail
  8. [Driver] Error if ARM mode was selected explicitly for M-profile CPUs.

    Summary:
    M-class profiles do not support ARM execution mode, so providing
    -marm/-mno-thumb does not make sense in combination with -mcpu/-march
    options that support the M-profile.

    This is a follow-up patch to D35569 and it seemed pretty clear that we
    should emit an error in the driver in this case.

    We probably also should warn/error if the provided -mcpu/-march options
    do not match, e.g. -mcpu=cortex-m0 -march=armv8-a is invalid, as
    cortex-m0 does not support armv8-a. But that should be a separate patch
    I think.


    Reviewers: echristo, richard.barton.arm, rengolin, labrinea, charles.baylis

    Reviewed By: rengolin

    Subscribers: aemerson, javed.absar, kristof.beyls, cfe-commits

    Differential Revision: https://reviews.llvm.org/D35826 — fhahn / detail
  9. [mips][microMIPS] Extending size reduction pass with ADDIUSP and ADDIUR1SP
    Author: milena.vujosevic.janicic
    The patch extends size reduction pass for MicroMIPS.
    The following instructions are examined and transformed, if possible:
    ADDIU instruction is transformed into 16-bit instruction ADDIUSP
    ADDIU instruction is transformed into 16-bit instruction ADDIUR1SP
    Usage of u_int64_t replaced by uint64_t to avoid issues because of which previous patch version was reverted:
    Differential Revision: https://reviews.llvm.org/D34511 — zjovanovic / detail

#251 (Aug 4, 2017 2:41:25 AM)

  1. [Polly][PM] Register polly passes with the opt tool for the new-pm path

    Summary: When polly is linked into the tools because of the LLVM_POLLY_LINK_INTO_TOOLS option being set, we need to register its passes with the PassBuilder. Because polly is linked in, we can directly call its callback registration method, which registers the appropriate callbacks with the new PM's PassBuilder. This essentially follows exactly the way it worked with the legacy PM.

    Reviewers: grosser, chandlerc, bollu

    Reviewed By: grosser

    Subscribers: pollydev, llvm-commits

    Differential Revision: https://reviews.llvm.org/D36273 — pfaffe / detail
  2. Fix typo and update documentation.

    The hasDeclaration documentation was outdated after r288366. — klimek / detail
  3. [mips] Fix typo (missed space) in the warning message — atanasyan / detail
  4. [mips] Code formatting fix. NFC — atanasyan / detail
  5. [clang-tidy] Support initializer-list constructor cases in modernize-make-unique.

    Reviewers: alexfh

    Reviewed By: alexfh

    Subscribers: malcolm.parsons, JDevlieghere, xazax.hun, cfe-commits

    Differential Revision: https://reviews.llvm.org/D36016 — hokein / detail
  6. Do not declare a variable which is used only in assert. NFC — mkazantsev / detail
  7. [msan] Switch the pvalloc overflow test to a lit test

    The test was not passing on targets where allocator_may_return_null
    defaults to true. Change the test to a lit test so that we can test both
    situations.

    Patch by Kostya Kortchinsky!

    Differential Revision: https://reviews.llvm.org/D36302 — d0k / detail
  8. [IRCE] Handle loops with step different from 1/-1

    This patch generalizes IRCE to handle IV steps that are not equal to 1 or -1.

    Differential Revision: https://reviews.llvm.org/D35539 — mkazantsev / detail
  9. [AMDGPU] Preserve inverted bit in SI_IF in presence of SI_KILL

    In case if SI_KILL is in between of the SI_IF and SI_END_CF we need
    to preserve the bits actually flipped by if rather then restoring
    the original mask.

    Differential Revision: https://reviews.llvm.org/D36299 — rampitec / detail
  10. Revert r309984, "Use "foo-12345.o" instead of "foo.o-12345" as temporary file name."

    It generates MODULE-XXXXXXXXXXXX-%%%%%%%%.pcm, then GlobalModuleIndex.cpp is confused with the suffix ".pcm" — chapuni / detail
  11. Avoid comparison between signed and unsigned in SCEVExitLimitForget tests — mkazantsev / detail
  12. [AVR] Update target machine to use new constructor parameters

    The required parameters were changed in r309911. — dylanmckay / detail
  13. [IRCE] Recognize loops with unsigned latch conditions

    This patch enables recognition of loops with ult/ugt latch conditions.

    Differential Revision: https://reviews.llvm.org/D35302 — mkazantsev / detail
  14. Revert "[llvm][llvm-objcopy] Added support for outputting to binary in llvm-objcopy"

    This breaks the build on clang-s390x-linux.

    This reverts commit r310018. — phosek / detail
  15. [InstCombine] Move the call to foldSelectICmpAnd into foldSelectInstWithICmp. NFCI — ctopper / detail
  16. [InstCombine] Remove unnecessary casts. NFC

    We're calling an overload of getOpcode that already returns Instruction::CastOps. — ctopper / detail
  17. Fix SCEVExitLimitForget tests to make Sanitizer happy — mkazantsev / detail
  18. Prevent unused warning in non-assert builds (introduced in r310014). — djasper / detail

#250 (Aug 3, 2017 10:08:11 PM)

  1. Un-revert r310014: false revert, it wasn't the cause of build break — vleschuk / detail
  2. Revert r310014 as it breaks build lld-x86_64-darwin13 — vleschuk / detail
  3. Revert "[coverage] Special-case calls to noreturn functions."

    This reverts commit r309995. It looks like it's responsible for breaking
    the stage2 coverage build:

    http://green.lab.llvm.org/green/job/clang-stage2-coverage-R_build/1402

    The cfe-commits discussion re: r309995 has more context. — Vedant Kumar / detail
  4. Reland "[llvm][llvm-objcopy] Added support for outputting to binary in llvm-objcopy"

    This change adds the "-O binary" flag which directs llvm-objcopy to
    output the object file to the same format as GNU objcopy does when given
    the flag "-O binary". This was done by splitting the Object class into
    two subclasses ObjectELF and ObjectBianry which each output a different
    format but relay on the same code to read in the Object in Object.

    Patch by Jake Ehrlich

    Differential Revision: https://reviews.llvm.org/D34480 — phosek / detail

#249 (Aug 3, 2017 7:54:12 PM)

  1. [Driver][Fuchsia] Pass --hash-style=gnu to the linker

    The .gnu_hash format is superior, and all versions of the Fuchsia
    dynamic linker support it.

    Differential Revision: https://reviews.llvm.org/D36254 — phosek / detail
  2. [Support] Update comments about stdout, raw_fd_ostream, and outs()

    The full story is in the comments:

      // Do not attempt to close stdout or stderr. We used to try to maintain the
      // property that tools that support writing file to stdout should not also
      // write informational output to stdout, but in practice we were never able to
      // maintain this invariant. Many features have been added to LLVM and clang
      // (-fdump-record-layouts, optimization remarks, etc) that print to stdout, so
      // users must simply be aware that mixed output and remarks is a possibility.

    NFC, I am just updating comments to reflect reality. — rnk / detail
  3. coverage: Update tests to reflect changes from r310012 — Vedant Kumar / detail
  4. Teach GlobalSRA to update the debug info for split-up globals.

    This is similar to what we are doing in "regular" SROA and creates
    DW_OP_LLVM_fragment operations to describe the resulting variables.

    rdar://problem/33654891 — Adrian Prantl / detail
  5. [AMDGPU] Add missing hazard for DPP-after-EXEC-write

    Summary:
    Following the docs, we need at least 5 wait states between an EXEC write
    and an instruction that uses DPP.

    Reviewers: tstellar, arsenm

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

    Differential Revision: https://reviews.llvm.org/D34849 — cwabbott / detail
  6. [llvm-cov] Ignore unclosed line segments when setting line counts

    This patch makes a slight change to the way llvm-cov determines line
    execution counts. If there are multiple line segments on a line, the
    line count is the max count among the regions which start *and* end on
    the line. This avoids an issue posed by deferred regions which start on
    the same line as a terminated region, e.g:

      if (false)
        return; //< The line count should be 0, even though a new region
                //< starts at the semi-colon.
      foo();

    Another change is that counts from line segments which don't correspond
    to region entries are considered. This enables the first change, and
    corrects an outstanding issue (see the showLineExecutionCounts.cpp test
    change).

    This is related to D35925.

    Testing: check-profile, llvm-cov lit tests

    Differential Revision: https://reviews.llvm.org/D36014 — Vedant Kumar / detail
  7. [llvm-cov] NFC: make_unique-ify two allocations — Vedant Kumar / detail
  8. [Coverage] Precise region termination with deferred regions

    The current coverage implementation doesn't handle region termination
    very precisely. Take for example an `if' statement with a `return':

      void f() {
        if (true) {
          return; // The `if' body's region is terminated here.
        }
        // This line gets the same coverage as the `if' condition.
      }

    If the function `f' is called, the line containing the comment will be
    marked as having executed once, which is not correct.

    The solution here is to create a deferred region after terminating a
    region. The deferred region is completed once the start location of the
    next statement is known, and is then pushed onto the region stack.
    In the cases where it's not possible to complete a deferred region, it
    can safely be dropped.

    Testing: lit test updates, a stage2 coverage-enabled build of clang — Vedant Kumar / detail
  9. Disable libFuzzer tests on Windows

    Differential Revision: https://reviews.llvm.org/D36297 — George Karpenkov / detail
  10. Revert "[TableGen] AsmMatcher: fix OpIdx computation when HasOptionalOperands is true"

    Breaks check-llvm under ubsan.

    This reverts commit r309949. — Vitaly Buka / detail

#248 (Aug 3, 2017 5:25:45 PM)

  1. AMDGPU: Remove pointless asserts — arsenm / detail
  2. [Driver][Darwin] Pass -munwind-table when !UseSjLjExceptions.

    This commit fixes a bug where clang/llvm doesn't emit an unwind table
    for a function when it is marked noexcept. Without this patch, the
    following code terminates with an uncaught exception on ARM64:

    int foo1() noexcept {
      try {
        throw 0;
      } catch (int i) {
        return 0;
      }
      return 1;
    }

    int main() {
      return foo1();
    }

    rdar://problem/32411865

    Differential Revision: https://reviews.llvm.org/D35693 — ahatanak / detail
  3. Use profile summary to disable peeling for huge working sets

    Summary:
    Detect when the working set size of a profiled application is huge,
    by comparing the number of counts required to reach the hot percentile
    in the profile summary to a large threshold*.

    When the working set size is determined to be huge, disable peeling
    to avoid bloating the working set further.

    *Note that the selected threshold (15K) is significantly larger than the
    largest working set value in SPEC cpu2006 (which is gcc at around 11K).

    Reviewers: davidxl

    Subscribers: mehdi_amini, mzolotukhin, eraman, llvm-commits

    Differential Revision: https://reviews.llvm.org/D36288 — tejohnson / detail
  4. AMDGPU: Don't use report_fatal_error for unsupported call types — arsenm / detail
  5. AMDGPU: Remove error on calls for amdgcn

    Repurpose the -amdgpu-function-calls flag. Rather
    than require it to emit a call, only use it to
    run the always inline path or not. — arsenm / detail
  6. AMDGPU: Fix implicitarg.ptr handling special inputs — arsenm / detail
  7. Support: WOA64 and WOA Signals

    Reviewers: rnk

    Differential Revision: https://reviews.llvm.org/D21813 — martell / detail
  8. [llvm-pdbutil] Add an option to only dump specific module indices.

    Often something interesting (like a symbol) is in a particular
    module, and you don't want to dump symbols from all other 300
    modules to see the one you want.  This adds a -modi option so that
    we only dump the specified module. — zturner / detail
  9. Enable AddressSanitizer for Fuchsia targets

    Patch by Roland McGrath

    Differential Revision: https://reviews.llvm.org/D35922 — phosek / detail
  10. AMDGPU: Pass special input registers to functions — arsenm / detail
  11. Fix typo. — echristo / detail
  12. AMDGPU: Add analysis pass for function argument info

    This will allow only adding necessary inputs to callee functions
    that need special inputs forwarded from the kernel. — arsenm / detail
  13. [coverage] Special-case calls to noreturn functions.

    The code after a noreturn call doesn't execute.

    The pattern in the testcase is pretty common in LLVM (a switch with
    a default case that calls llvm_unreachable).

    Differential Revision: https://reviews.llvm.org/D36250 — efriedma / detail
  14. [Inliner] Increase threshold for hot callsites without PGO.

    Summary:
    This increases the inlining threshold for hot callsites. Hotness is
    defined in terms of block frequency of the callsite relative to the
    caller's entry block's frequency. Since this requires BFI in the
    inliner, this only affects the new PM pipeline. This is enabled by
    default at -O3.

    This improves the performance of some internal benchmarks. Notably, an
    internal benchmark for Gipfeli compression
    (https://github.com/google/gipfeli) improves by ~7%. Povray in SPEC2006
    improves by ~2.5%. I am running more experiments and will update the
    thread if other benchmarks show improvement/regression.

    In terms of text size, LLVM test-suite shows an 1.22% text size
    increase. Diving into the results, 13 of the benchmarks in the
    test-suite increases by > 10%. Most of these are small, but
    Adobe-C++/loop_unroll (17.6% increases) and tramp3d(20.7% size increase)
    have >250K text size. On a large application, the text size increases by
    2%

    Reviewers: chandlerc, davidxl

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D36199 — eraman / detail
  15. [Mips] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). — eugenezelenko / detail
  16. DAG: Provide access to Pass instance from SelectionDAG

    This allows accessing an analysis pass during lowering. — arsenm / detail
  17. [GlobalISel] Make GlobalISel a non-optional library.

    With this change, the GlobalISel library gets always built. In
    particular, this is not possible to opt GlobalISel out of the build
    using the LLVM_BUILD_GLOBAL_ISEL variable any more. — qcolombet / detail
  18. [NewGVN] Fix the case where we have a phi-of-ops which goes away.

    Patch by Daniel Berlin, fixes PR33196 (and probably something else). — davide / detail
  19. [PDB] Fix section contributions

    Summary:
    PDB section contributions are supposed to use output section indices and
    offsets, not input section indices and offsets.

    This allows the debugger to look up the index of the module that it
    should look up in the modules stream for symbol information. With this
    change, windbg can now find line tables, but it still cannot print local
    variables.

    Fixes PR34048

    Reviewers: zturner

    Subscribers: hiraditya, ruiu, llvm-commits

    Differential Revision: https://reviews.llvm.org/D36285 — rnk / detail
  20. [LVI] Constant-propagate a zero extension of the switch condition value through case edges

    Summary:
    (This is a second attempt as https://reviews.llvm.org/D34822 was reverted.)

    LazyValueInfo currently computes the constant value of the switch condition through case edges, which allows the constant value to be propagated through the case edges.

    But we have seen a case where a zero-extended value of the switch condition is used past case edges for which the constant propagation doesn't occur.

    This patch adds a small logic to handle such a case in getEdgeValueLocal().

    This is motivated by the Python 2.7 eval loop in PyEval_EvalFrameEx() where the lack of the constant propagation causes longer live ranges and more spill code than necessary.

    With this patch, we see that the code size of PyEval_EvalFrameEx() decreases by ~5.4% and a performance test improves by ~4.6%.

    Reviewers: sanjoy

    Reviewed By: sanjoy

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D36247 — yamauchi / detail
  21. Move unit test to the proper location

    Summary: Move test/CodeGen/AArch64/reg-bank-128bit.mir to test/CodeGen/AArch64/GlobalISel/reg-bank-128bit.mir so that the test is executed only when global-isel is enabled. lit.local.cfg under test/CodeGen/AArch64/GlobalISel checks if 'global-isel' is in the available_features while the same file under test/CodeGen/AArch64 doesn't.

    Reviewers: qcolombet, davide

    Reviewed By: davide

    Subscribers: davide, aemerson, javed.absar, igorb, kristof.beyls, llvm-commits

    Differential Revision: https://reviews.llvm.org/D36282 — twoh / detail
  22. Use "foo-12345.o" instead of "foo.o-12345" as temporary file name.

    This helps some tools that do things based on the output's extension.

    For example, we got reports from users on Windows that have a tool that scan a
    build output dir (but skip .obj files). The tool would keep the "foo.obj-12345"
    file open, and then when clang tried to rename the temp file to the final
    output filename, that would fail. By making the tempfile end in ".obj", tools
    like this will now skip the temp files as well.

    https://reviews.llvm.org/D36238 — nico / detail

#247 (Aug 3, 2017 1:44:43 PM)

  1. [llvm-pdbutil] Allow diff to force module equivalencies.

    Sometimes the normal module equivalence detection algorithm doesn't
    quite work.  For example, you might build the same program with
    MSVC and clang-cl, outputting to different object files, exes, and
    PDBs, then compare them.  If the object files have different names
    though, then they won't be treated as equivalent.  This way we
    can force specific module indices to be treated as equivalent. — zturner / detail
  2. [libFuzzer] Un-reverting change in tests after fixing the failure on Linux.

    Differential Revision: https://reviews.llvm.org/D36242 — George Karpenkov / detail
  3. test commit — cwabbott / detail
  4. Fix llvm-for-windows-on-linux build after LLVM r272701.

    The file is called "intrin.h". When building targeting Windows on a Linux
    system, with the SDK mounted in a case-insensitive file system, "Intrin.h" will
    miss clang's intrin.h header (because that's not in a case-insensitive file
    system) but then find intrin.h in the Microsoft SDK. clang can't handle the
    SDK's intrin.h.

    https://reviews.llvm.org/D36281 — nico / detail
  5. [test] Fix clang library dir in LD_LIBRARY_PATH For stand-alone build

    Prepend the clang library directory (determined using SHLIBDIR, alike
    in clang) to the LD_LIBRARY_PATH to ensure that just-built clang
    libraries will be used instead of a previous installed version.

    When a stand-alone build is performed, LLVM_LIBS_DIR contains the path
    to installed LLVM library directory. The same directory frequently
    contains a previously installed version of clang. SHLIBDIR, on the other
    hand, is always the build-tree directory, and therefore contains
    the freshly built clang libraries.

    In a non-stand-alone build, both paths will be the same and therefore
    including them both will not cause any issues.

    Differential Revision: https://reviews.llvm.org/D30155 — mgorny / detail
  6. [mips] Revert r309942 & r309940

    This reverts commit r309942 & commit r309940.

    A revert was requested following post commit review. — sdardis / detail
  7. Revert accidentally-committed files. — rsmith / detail
  8. Don't emit undefined-internal warnings for CXXDeductionGuideDecls.

    Patch by ~paul (cynecx on phabricator)! Some test massaging by me. — rsmith / detail
  9. [builtins] Use Interlocked* intrinsics for atomics on MSVC

    Tested on MSVC 2013, 2015 and 2017 targeting X86, X64 and ARM.

    This fixes building emutls.c for Windows for ARM (both with clang
    which don't need these atomics fallbacks at all, but just failed
    due to the immintrin.h include before, and with MSVC).

    Differential Revision: https://reviews.llvm.org/D36071 — mstorsjo / detail
  10. These tests use 80-bit long doubles, which are x86 only. Mark them so.

    This avoids having each new target need to mark them as unsupported. — saugustine / detail
  11. [zorg] Add buildbot with reverse iteration enabled

    Summary:
    This reverse iteration buildbot builds LLVM, Clang and Polly with
    LLVM_REVERSE_ITERATION enabled, and subsequently runs "make check-all". With
    LLVM_REVERSE_ITERATION enabled, all supported unordered llvm containers would be
    iterated in reverse order.

    Reviewers: mgrang, grosser, bollu, gkistanova, zinob, vleschuk

    Reviewed By: mgrang, grosser

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D36203 — pzheng / detail
  12. [zorg] Add optional checkAll step to Polly buildbot

    Summary:
    This step does "make check-all" and can be enabled by checkAll (defaults to
    false in which case only "make check-polly" is run).

    Reviewers: mgrang, zinob, gkistanova, vleschuk, grosser, bollu

    Reviewed By: grosser

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D36277 — pzheng / detail
  13. [zorg] Remove test_polly_format step from Polly buildbot

    Summary:
    The test_polly_format does "make polly-check-format" which is already covered by
    the "make check-polly" step.

    Reviewers: mgrang, zinob, grosser, gkistanova, vleschuk, bollu

    Reviewed By: grosser

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D36276 — pzheng / detail
  14. [Analyzer] Add support for displaying cross-file diagnostic paths in HTML output

    This change adds support for cross-file diagnostic paths in html output. If the
    diagnostic path is not cross-file, there is no change in the output.

    Patch by Vlad Tsyrklevich!

    Differential Revision: https://reviews.llvm.org/D30406 — Devin Coughlin / detail
  15. Fix check-lit compatibility with multi-config CMake generators

    Multi-configuration CMake generators such as those for Visual Studio or Xcode do not
    specify a build config at configure time, but let the user choose at build
    time.  In these cases binaries go into build/${Configuration}/bin rather than
    build/bin.  Prior to this commit, check-lit would fail when using multi-configuration
    generators as it did not know how to resolve ${Configuration} in order
    to find tools such as FileCheck.  This commit teaches it to resolve
    llvm_tools_dir within lit using the value specified with --param
    build_mode.

    Differential Revision: https://reviews.llvm.org/D36263 — gbedwell / detail
  16. Disable loop peeling during full unrolling pass.

    Summary:
    Peeling should not occur during the full unrolling invocation early
    in the pipeline, but rather later with partial and runtime loop
    unrolling. The later loop unrolling invocation will also eventually
    utilize profile summary and branch frequency information, which
    we would like to use to control peeling. And for ThinLTO we want
    to delay peeling until the backend (post thin link) phase, just as
    we do for most types of unrolling.

    Ensure peeling doesn't occur during the full unrolling invocation
    by adding a parameter to the shared implementation function, similar
    to the way partial and runtime loop unrolling are disabled.

    Performance results for ThinLTO suggest this has a neutral to positive
    effect on some internal benchmarks.

    Reviewers: chandlerc, davidxl

    Subscribers: mzolotukhin, llvm-commits, mehdi_amini

    Differential Revision: https://reviews.llvm.org/D36258 — tejohnson / detail
  17. Do not want to use BFI to get profile count for sample pgo

    Summary: For SamplePGO, we already record the callsite count in the call instruction itself. So we do not want to use BFI to get profile count as it is less accurate.

    Reviewers: tejohnson, davidxl, eraman

    Reviewed By: eraman

    Subscribers: sanjoy, llvm-commits, mehdi_amini

    Differential Revision: https://reviews.llvm.org/D36025 — dehao / detail

#246 (Aug 3, 2017 10:13:43 AM)

  1. [X86] Adding a test for vector shuffle extractions.

    When both the vector inputs of the shuffle vector is comprising of same vector or shuffle mask is accessing elements from only one operand vector (like in PR33758 test already present).

    Committed on behalf of @jbhateja (Jatin Bhateja)

    Differential Revision: https://reviews.llvm.org/D36271 — rksimon / detail
  2. Revert "[AArch64] Simplify AES*Tied pseudo expansion (NFC)."

    This reverts commit r309821.

    My suggestion was wrong because it left the MachineOperands tied which
    confused the verifier. Since there's no easy way to untie operands, the
    original BuildMI solution is probably best. — Tim Northover / detail
  3. [X86][AVX512] Tidied up v64i8 vector shuffle tests with triple — rksimon / detail
  4. Revert r304836.

    See discussion in https://reviews.llvm.org/D33900#824172 — nico / detail
  5. AMDGPU/SI: Don't fix a PHI under uniform branch in SIFixSGPRCopies only when sources and destination are all sgprs

    Summary:
      If a PHI has at lease one VGPR operand, we have to fix the PHI
    in SIFixSGPRCopies.

    Reviewer:
      Matt

    Differential Revision:
      http://reviews.llvm.org/D34727 — chfang / detail
  6. [diagtool] Add ability to pass in the id and return the name for a
    particular diagnostic.

    Differential Revision: https://reviews.llvm.org/D36252 — dhinton / detail
  7. Fix use after free in unit test. — d0k / detail
  8. [DAG]  Allow merging of stores of vector loads

    Remove restriction disallowing merging of stores vector loads into
    larger store of larger vector load.

    Reviewers: RKSimon, efriedma, spatel

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D36158 — niravd / detail
  9. Revert r309923, it caused PR34045. — nico / detail
  10. [TableGen] AsmMatcher: fix OpIdx computation when HasOptionalOperands is true

    Consider the following instruction: "inst.eq $dst, $src" where ".eq"
    is an optional flag operand.  The $src and $dst operands are
    registers.  If we parse the instruction "inst r0, r1", the flag is not
    present and it will be marked in the "OptionalOperandsMask" variable.
    After the matching is complete we call the "convertToMCInst" method.

    The current implementation works only if the optional operands are at
    the end of the array.  The "Operands" array looks like [token:"inst",
    reg:r0, reg:r1].  The first operand that must be added to the MCInst
    is the destination, the r0 register.  The "OpIdx" (in the Operands
    array) for this register is 2.  However, since the flag is not present
    in the Operands, the actual index for r0 should be 1.  The flag is not
    present since we rely on the default value.

    This patch removes the "NumDefaults" variable and replaces it with an
    array (DefaultsOffset).  This array contains an index for each operand
    (excluding the mnemonic).  At each index, the array contains the
    number of optional operands that should be subtracted.  For the
    previous example, this array looks like this: [0, 1, 1].  When we need
    to access the r0 register, we compute its index as 2 -
    DefaultsOffset[1] = 1.

    Patch by Alexandru Guduleasa!

    Reviewers: SamWot, nhaustov, niravd

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D35998 — niravd / detail
  11. Fix some typos in the documentation.

    Patch by: Reka Nikolett Kovacs — xazax / detail
  12. [NewGVN] fix typos; NFC — spatel / detail
  13. [BDCE] add tests to show invalid/incomplete transforms — spatel / detail

#245 (Aug 3, 2017 8:03:43 AM)

  1. [GlobalISel] Only merge memory ops for mayLoad or mayStore instrs.

    Summary:
    We only need to merge memory operands for instructions that access
    memory. This slightly reduces the number of actions executed.

    Reviewers: MatzeB, rovka, dsanders

    Reviewed By: dsanders

    Subscribers: aemerson, igorb, kristof.beyls, llvm-commits

    Differential Revision: https://reviews.llvm.org/D36151 — fhahn / detail
  2. [mips] Fixup r309940.

    Needed a // REQUIRES: mips-registered-target — sdardis / detail
  3. [clang-format] Fix indent of 'key <...>' and 'key {...}' in text protos

    Summary:
    This patch fixes the indentation of the code pattern `key <...>`and `key {...}` in text protos.
    Previously, such line would be alinged depending on the column of the previous
    colon, which usually indents too much.

    I'm gonna go ahead and commit this since it's a straightforward bugfix.

    Reviewers: djasper, klimek

    Subscribers: klimek, cfe-commits

    Differential Revision: https://reviews.llvm.org/D36143 — krasimir / detail
  4. [mips] Implement -muninit-const-in-rodata

    This option when combined with -mgpopt and -membedded-data places all
    uninitialized constant variables in the read-only section.

    Reviewers: atanasyan, nitesh.jain

    Differential Revision: https://reviews.llvm.org/D35917 — sdardis / detail
  5. [clang-format] Fix parsing of <>-style proto options

    Summary:
    This patch fixes the parsing of proto option fields like `option op = <...>`.
    Previously the parser did not enter the right code path inside the angle braces,
    causing the contents to be split into several unwrapped lines inside.

    I'll just go ahead and commit this since it's a straightforward bugfix.

    Reviewers: djasper, klimek

    Subscribers: cfe-commits

    Differential Revision: https://reviews.llvm.org/D36217 — krasimir / detail
  6. ClangdTests: Try to unbreak the case CLANG_DEFAULT_CXX_STDLIB=libc++. — chapuni / detail
  7. [mips] Add support -m(no-)embedded-data option

    Add support for the -membedded-data option which places constant data in
    the .rodata section, rather than the .sdata section.

    Reviewers: atanasyan, nitesh.jain

    Differential Revision: https://reviews.llvm.org/D35914 — sdardis / detail

#244 (Aug 3, 2017 5:20:18 AM)

  1. [LiveDebugVariables] Use lexical scope to trim debug value live intervals

    The debug value live intervals computed by Live Debug Variables may extend
    beyond the range of the debug location's lexical scope. In this case,
    splitting of an interval can result in an interval outside of the scope being
    created, causing extra unnecessary DBG_VALUEs to be emitted. To prevent this,
    trim the intervals to the lexical scope.

    This resolves PR33730.

    Reviewers: aprantl

    Differential Revision: https://reviews.llvm.org/D35953 — rlougher / detail
  2. Prune linefeed at eof. — chapuni / detail
  3. llvm/Support/CodeGenCWrappers.h: Add missing "llvm/ADT/Optional.h", to fix modules build. — chapuni / detail

#243 (Aug 3, 2017 2:41:33 AM)

  1. [SelectionDAG] Resolve PR33978.

    rL306209 taught SelectionDAG how to add the dereferenceable flag when
    expanding memcpy and memmove. The fix however contained a nit where
    the offset + size was constructed as an APInt of PointerSize rather
    than PointerSizeInBits.

    This lead to isDereferenceableAndAlignedPointer() get truncated values or
    values which would be sign extended within that function leading to
    incorrect results.

    Thanks to Alex Crichton for reporting the issue!

    This resolves PR33978.

    Reviewers: inouehrs

    Differential Revision: https://reviews.llvm.org/D36236 — sdardis / detail
  2. Removed unused variabled from unit test — mkazantsev / detail
  3. [Cloning] Move distinct GlobalVariable debug info metadata in CloneModule

    Duplicating the distinct Subprogram and CU metadata nodes seems like the incorrect thing to do in CloneModule for GlobalVariable debug info. As it results in the scope of the GlobalVariable DI no longer being consistent with the rest of the module, and the new CU is absent from llvm.dbg.cu.

    Fixed by adding RF_MoveDistinctMDs to MapMetadata flags for GlobalVariables.

    Current unit test IR after clone:
    ```
    @gv = global i32 1, comdat($comdat), !dbg !0, !type !5

    define private void @f() comdat($comdat) personality void ()* @persfn !dbg !14 {

    !llvm.dbg.cu = !{!10}

    !0 = !DIGlobalVariableExpression(var: !1)
    !1 = distinct !DIGlobalVariable(name: "gv", linkageName: "gv", scope: !2, file: !3, line: 1, type: !9, isLocal: false, isDefinition: true)
    !2 = distinct !DISubprogram(name: "f", linkageName: "f", scope: null, file: !3, line: 4, type: !4, isLocal: true, isDefinition: true, scopeLine: 3, isOptimized: false, unit: !6, variables: !5)
    !3 = !DIFile(filename: "filename.c", directory: "/file/dir/")
    !4 = !DISubroutineType(types: !5)
    !5 = !{}
    !6 = distinct !DICompileUnit(language: DW_LANG_C99, file: !7, producer: "CloneModule", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !5, globals: !8)
    !7 = !DIFile(filename: "filename.c", directory: "/file/dir")
    !8 = !{!0}
    !9 = !DIBasicType(tag: DW_TAG_unspecified_type, name: "decltype(nullptr)")
    !10 = distinct !DICompileUnit(language: DW_LANG_C99, file: !7, producer: "CloneModule", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !5, globals: !11)
    !11 = !{!12}
    !12 = !DIGlobalVariableExpression(var: !13)
    !13 = distinct !DIGlobalVariable(name: "gv", linkageName: "gv", scope: !14, file: !3, line: 1, type: !9, isLocal: false, isDefinition: true)
    !14 = distinct !DISubprogram(name: "f", linkageName: "f", scope: null, file: !3, line: 4, type: !4, isLocal: true, isDefinition: true, scopeLine: 3, isOptimized: false, unit: !10, variables: !5)
    ```

    Patched IR after clone:
    ```
    @gv = global i32 1, comdat($comdat), !dbg !0, !type !5

    define private void @f() comdat($comdat) personality void ()* @persfn !dbg !2 {

    !llvm.dbg.cu = !{!6}

    !0 = !DIGlobalVariableExpression(var: !1)
    !1 = distinct !DIGlobalVariable(name: "gv", linkageName: "gv", scope: !2, file: !3, line: 1, type: !9, isLocal: false, isDefinition: true)
    !2 = distinct !DISubprogram(name: "f", linkageName: "f", scope: null, file: !3, line: 4, type: !4, isLocal: true, isDefinition: true, scopeLine: 3, isOptimized: false, unit: !6, variables: !5)
    !3 = !DIFile(filename: "filename.c", directory: "/file/dir/")
    !4 = !DISubroutineType(types: !5)
    !5 = !{}
    !6 = distinct !DICompileUnit(language: DW_LANG_C99, file: !7, producer: "CloneModule", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !5, globals: !8)
    !7 = !DIFile(filename: "filename.c", directory: "/file/dir")
    !8 = !{!0}
    !9 = !DIBasicType(tag: DW_TAG_unspecified_type, name: "decltype(nullptr)")
    ```

    Reviewers: aprantl, probinson, dblaikie, echristo, loladiro
    Reviewed By: aprantl
    Subscribers: llvm-commits
    Differential Revision: https://reviews.llvm.org/D36082 — ewancrawford / detail
  4. [ARM] GlobalISel: Select simple G_GLOBAL_VALUE instructions

    Add support in the instruction selector for G_GLOBAL_VALUE for ELF and
    MachO for the static relocation model. We don't handle Windows yet
    because that's Thumb-only, and we don't handle Thumb in general at the
    moment.

    Support for PIC, ROPI, RWPI and TLS will be added in subsequent commits.

    Differential Revision: https://reviews.llvm.org/D35883 — rovka / detail
  5. [X86] SET0 to use XMM registers where possible PR26018 PR32862

    Differential Revision: https://reviews.llvm.org/D35965 — dinar / detail
  6. [SCEV] Re-enable "Cache results of computeExitLimit"

    The patch rL309080 was reverted because it did not clean up the cache on "forgetValue"
    method call. This patch re-enables this change, adds the missing check and introduces
    two new unit tests that make sure that the cache is cleaned properly.

    Differential Revision: https://reviews.llvm.org/D36087 — mkazantsev / detail
  7. [globalisel][tablegen] Update a comment to use the name of the constant rather than the value. — dsanders / detail

#242 (Aug 3, 2017 1:26:11 AM)

  1. [ARM] Use ADDCARRY / SUBCARRY

    This patch:

    - makes nodes ISD::ADDCARRY and ISD::SUBCARRY legal for i32
    - lowering is done by first converting the boolean value into the carry flag
      using (_, C) <- (ARMISD::ADDC R, -1) and converted back to an integer value
      using (R, _) <- (ARMISD::ADDE 0, 0, C). An ARMISD::ADDE between the two
      operations does the actual addition.
    - for subtraction, given that ISD::SUBCARRY second result is actually a
      borrow, we need to invert the value of the second operand and result before
      and after using ARMISD::SUBE. We need to invert the carry result of
      ARMISD::SUBE to preserve the semantics.
    - given that the generic combiner may lower ISD::ADDCARRY and
      ISD::SUBCARRY into ISD::UADDO and ISD::USUBO we need to update their lowering
      as well otherwise i64 operations now would require branches. This implies
      updating the corresponding test for unsigned.
    - add new combiner to remove the redundant conversions from/to carry flags
      to/from boolean values (ARMISD::ADDC (ARMISD::ADDE 0, 0, C), -1) -> C

    Differential Revision: https://reviews.llvm.org/D35192 — rogfer01 / detail

#240 (Aug 2, 2017 10:29:14 PM)

  1. Fix WebAssembly target after r309911. — djasper / detail
  2. Fix the ppc jit tests. — rafael / detail
  3. Fix libcxx build with glibc 2.26+ by removing xlocale.h include.

    Patch by Khem Raj. Reviewed as D35697. Also see PR33729. — ericwf / detail
  4. [unittest] Remove TODO comment which caused concern

    Remove the second part of the TODO comment that highlighted an issue with
    possibly connecting all nodes to the exit of the CFG. This caused concerns
    with Jakub Kuderski regarding its feasability, hence we remove it. Such
    points are better discussed outside of CFG. If connecting all nodes makes
    sense and what the impact is is currently part of an active review discussion. — grosser / detail
  5. Add LLVM_FALLTHROUGH. — rafael / detail

#239 (Aug 2, 2017 8:27:30 PM)

  1. Add system header pragma to BSD locale fallback headers.

    This prevent leaking warnings to the user about use of C++11
    extensions in C++03. — ericwf / detail
  2. [RegisterCoalescer] Add wrapper for Erasing Instructions

    Summary:
          To delete an instruction the coalescer needs to call eraseFromParent()
          on the MachineInstr, insert it in the ErasedInstrs list and update the
          Live Ranges structure. This patch re-factors the code to do all that in
          one function. This will also fix cases where previous code wasn't
          inserting deleted instructions in the ErasedList.

    Reviewers: qcolombet, kparzysz

    Reviewed By: qcolombet

    Subscribers: MatzeB, llvm-commits, qcolombet

    Differential Revision: https://reviews.llvm.org/D36204 — sabuasal / detail
  3. [asan] Allocator support for Fuchsia

    Submitted on behalf of Roland McGrath.

    Reviewers: vitalybuka, alekseyshl, kcc

    Reviewed By: alekseyshl

    Subscribers: srhines, cryptoad, kubamracek, phosek, filcab, llvm-commits

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D36190 — Vitaly Buka / detail
  4. Update for llvm change. — rafael / detail
  5. Delete Default and JITDefault code models

    IMHO it is an antipattern to have a enum value that is Default.

    At any given piece of code it is not clear if we have to handle
    Default or if has already been mapped to a concrete value. In this
    case in particular, only the target can do the mapping and it is nice
    to make sure it is always done.

    This deletes the two default enum values of CodeModel and uses an
    explicit Optional<CodeModel> when it is possible that it is
    unspecified. — rafael / detail

#238 (Aug 2, 2017 6:58:13 PM)

  1. [ARM] Tidy up banked registers encoding

    Moves encoding (SYSm) information of banked registers to ARMSystemRegister.td,
    where it rightly belongs and forms a single point of reference in the code.

    Reviewed by: @fhahn, @rovka, @olista01
    Differential Revision: https://reviews.llvm.org/D36219 — javed.absar / detail
  2. [XRay][compiler-rt] Allow for building the XRay runtime without PREINIT initialization.

    Summary:
    Define a build-time configuration option for the XRay runtime to
    determine whether the archive will add an entry to the `.preinit_array`
    section of the binary. We also allow for initializing the XRay data
    structures with an explicit call to __xray_init(). This allows us to
    give users the capability to initialize the XRay data structures on
    demand.

    This can allow us to start porting XRay to platforms where
    `.preinit_array` isn't a supported section. It also allows us to limit
    the effects of XRay in the initialization sequence for applications that
    are sensitive to this kind of interference (i.e. large binaries) or
    those that want to package XRay control in libraries.

    Future changes should allow us to build two different library archives
    for the XRay runtime, and allow clang users to determine which version
    to link.

    Reviewers: dblaikie, kpw, pelikan

    Subscribers: mgorny, llvm-commits

    Differential Revision: https://reviews.llvm.org/D36080 — dberris / detail
  3. [Sema] Add a comment on an identified bug on default arguments.

    Summary:
    The mis-compile is triggered by internal code, but I haven't reduced it to a small piece of code. Add a FIXME here, since a decent fix doesn't seem to be trivial.

    The decent fix can be changing Decl::Init to PointerUnion<Stmt *, EvaluatedStmt *, ParamVarDecl *>, and make setUninstantiatedDefaultArg take a ParamVarDecl *, which contains the Expr * as the default argument. This way, getTemplateInstantiationArgs can take that ParamVarDecl and do the right thing.

    Reviewers: rsmith

    Subscribers: sanjoy, cfe-commits

    Differential Revision: https://reviews.llvm.org/D36253 — timshen / detail

#237 (Aug 2, 2017 5:11:44 PM)

  1. Fix the bug when SampleProfileWriter writes out number of callsites.

    Summary: As we support multiple callsites for the same location, we need to traverse all locations to get the number of callsites.

    Reviewers: davidxl

    Reviewed By: davidxl

    Subscribers: sanjoy, llvm-commits

    Differential Revision: https://reviews.llvm.org/D36246 — dehao / detail
  2. Move two functions to a nicer spot. NFC. — Vedant Kumar / detail
  3. Rely on autobrief, remove \briefs from a header. NFC. — Vedant Kumar / detail
  4. [Coverage] Add an API to retrive all instantiations of a function (NFC)

    The CoverageMapping::getInstantiations() API retrieved all function
    records corresponding to functions with more than one instantiation (e.g
    template functions with multiple specializations). However, there was no
    simple way to determine *which* function a given record was an
    instantiation of. This was an oversight, since it's useful to aggregate
    coverage information over all instantiations of a function.

    llvm-cov works around this by building a mapping of source locations to
    instantiation sets, but this duplicates logic that libCoverage already
    has (see FunctionInstantiationSetCollector).

    This change adds a new API, CoverageMapping::getInstantiationGroups(),
    which returns a list of InstantiationGroups. A group contains records
    for each instantiation of some particular function, and also provides
    utilities to get the total execution count within the group, the source
    location of the common definition, etc.

    This lets removes some hacky logic in llvm-cov by reusing
    FunctionInstantiationSetCollector and makes the CoverageMapping API
    friendlier for other clients. — Vedant Kumar / detail
  5. [llvm-cov] Respect the value of the -show-instantiations option

    Make `-show-instantiations=false` actually skip displaying instantiation
    sub-views, instead of simply ignoring the option. — Vedant Kumar / detail
  6. [coverage] Make smaller regions for the first case of a switch.

    We never overwrite the end location of a region, so we would end up with
    an overly large region when we reused the switch's region.

    It's possible this code will be substantially rewritten in the near
    future to deal with fallthrough more accurately, but this seems like
    an improvement on its own for now.

    Differential Revision: https://reviews.llvm.org/D34801 — efriedma / detail
  7. Revert "[libFuzzer tests] Use substring comparison in libFuzzer tests"

    This reverts commit 3592d8049660dcdd07f7c2e797f2de9790f93111.

    Breaks the bots, reverting for now. — George Karpenkov / detail
  8. AMDGPU/GlobalISel: Mark 32-bit G_FMUL as legal

    Reviewers: arsenm

    Reviewed By: arsenm

    Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, rovka, kristof.beyls, igorb, dstuttard, tpr, llvm-commits, t-tye

    Differential Revision: https://reviews.llvm.org/D36218 — tstellar / detail
  9. [tsan] Check for pvalloc overlow

    Summary:
    `CheckForPvallocOverflow` was introduced with D35818 to detect when pvalloc
    would wrap when rounding up to the next multiple of the page size.

    Add this check to TSan's pvalloc implementation.

    Reviewers: alekseyshl

    Reviewed By: alekseyshl

    Subscribers: llvm-commits, kubamracek

    Differential Revision: https://reviews.llvm.org/D36245 — cryptoad / detail
  10. [pdb/lld] Write a valid FPM.

    The PDB reserves certain blocks for the FPM that describe which
    blocks in the file are allocated and which are free.  We weren't
    filling that out at all, and in some cases we were even stomping
    it with incorrect data.  This patch writes a correct FPM.

    Differential Revision: https://reviews.llvm.org/D36235 — zturner / detail
  11. [MSF] Move MSF unit tests to their own unittest target. — zturner / detail
  12. [pdbutil] Add a command to dump the FPM.

    Recently problems have been discovered in the way we write the FPM
    (free page map).  In order to fix this, we first need to establish
    a baseline about what a correct FPM looks like using an MSVC
    generated PDB, so that we can then make our own generated PDBs
    match.  And in order to do this, the dumper needs a mode where it
    can dump an FPM so that we can write tests for it.

    This patch adds a command to dump the FPM, as well as a test against
    a known-good PDB. — zturner / detail
  13. AMDGPU/R600: Initialize more passes

    Reviewers: arsenm

    Reviewed By: arsenm

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

    Differential Revision: https://reviews.llvm.org/D36128 — tstellar / detail
  14. Use a more standard method to mark these tests as unsupported on powerpc64. — saugustine / detail
  15. Xray docs with description of Flight Data Recorder binary format.

    Summary:
    Adding a new restructuredText file to document the trace format produced with
    an FDR mode handler and read by llvm-xray toolset.

    Fixed two problems in the documentation from differential review. One bad table
    and a missing link in the toc.

    Original commit was e97c5836a77db803fe53319c53f3bf8e8b26d2b7.

    Reviewers: dberris, pelikan

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D36041 — kpw / detail
  16. LV: Don't insert runtime ptr checks on divergent targets — arsenm / detail
  17. [libFuzzer tests] Use substring comparison in libFuzzer tests

    LIT launches executables with absolute, and not relative, path.
    strncmp would try to do exact comparison and fail.

    Differential Revision: https://reviews.llvm.org/D36242 — George Karpenkov / detail
  18. Remove unused diagnostic. NFC. — d0k / detail

#229 (Aug 2, 2017 3:39:08 AM)

  1. [clangd] Run clang-format on all clangd sources. NFC. — ibiryukov / detail
  2. [clangd] Capitalized descriptions of clangd options. NFC.

    To follow the style of other options shown on `clangd -help`. — ibiryukov / detail
  3. [StaticAnalyzer] Fix false positives for unreachable code in macros.

    Example:

    #define MACRO(C)   if (C) { static int x; .. }
    void foo() {
    MACRO(0);
    }

    Differential Revision: https://reviews.llvm.org/D36141 — danielmarjamaki / detail
  4. [asan] Interceptors for Fuchsia

    Summary:
    Fuchsia uses the "memintrinsics" interceptors, though not via any
    generalized interception mechanism.  It doesn't use any other interceptors.

    Submitted on behalf of Roland McGrath.

    Reviewers: vitalybuka, alekseyshl, kcc

    Reviewed By: vitalybuka

    Subscribers: kubamracek, phosek, filcab, llvm-commits

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D36189 — Vitaly Buka / detail
  5. [sanitizer_common] Fuchsia-specific implementation of SanitizerCoverage

    Submitted on behalf of Roland McGrath.

    Reviewers: kcc, eugenis, alekseyshl, vitalybuka

    Reviewed By: kcc

    Subscribers: filcab, vitalybuka, phosek, llvm-commits, kubamracek, mgorny

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D35866 — Vitaly Buka / detail

#228 (Aug 2, 2017 12:39:20 AM)

  1. Use VFS operations in FileManager::makeAbsolutePath.

    Summary: It used to call into llvm::sys::fs::make_absolute.

    Reviewers: akyrtzi, erikjv, bkramer, krasimir, klimek

    Reviewed By: klimek

    Subscribers: cfe-commits

    Differential Revision: https://reviews.llvm.org/D36155 — ibiryukov / detail
  2. [Bash-autocompletion] Add comment to test so that it is easier to fix

    Summary:
    clang/test/Driver/autocomplete.c is a test for --autocomplete, and this
    test might break if people add/modify flags or HelpText. So I've add
    comment for future developers so that they can fix this file according
    to the change they had made.

    Reviewers: v.g.vassilev, teemperor, ruiu

    Subscribers: cfe-commits

    Differential Revision: https://reviews.llvm.org/D36209 — yamaguchi / detail
  3. [InstCombine] Add test cases for 'or' and 'xor' to match the vector 'and' of 'sext' of 'cmp' test.

    When the 'and' test was originally added it was intended to make sure we didn't change it to a sext of and of cmp. But since then the test was changed to expect it to be turned into 'select cmp1, sext cmp2, 0'. Then another optimization was added to turn the select into 'sext (and cmp1, cmp2)' which is exactly the transformation that was being blocked when the test case started.

    Looks like 'or' gets optimized in a similar way, but not 'xor'. — ctopper / detail

#227 (Aug 1, 2017 9:57:22 PM)

  1. [XRay][compiler-rt] Remove use of std::mutex and std::shared_ptr from global scope.

    Summary:
    This change attempts to remove all the dependencies we have on
    std::mutex and any std::shared_ptr construction in global variables. We
    instead use raw pointers to these objects, and construct them on the
    heap. In cases where it's possible, we lazily initialize these pointers.

    While we do not have a replacement for std::shared_ptr yet in
    compiler-rt, we use this work-around to avoid having to statically
    initialize the objects as globals. Subsequent changes should allow us to
    completely remove our dependency on std::shared_ptr and instead have our
    own implementation of the std::shared_ptr and std::weak_ptr semantics
    (or completely rewrite the implementaton to not need these
    standard-library provided abstractions).

    Reviewers: dblaikie, kpw, pelikan

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D36078 — dberris / detail
  2. [NewGVN] Fold single-use variables. NFCI. — davide / detail
  3. [NewGVN] Remove a (now stale) comment. NFCI. — davide / detail
  4. Fix the bug that parseAAPipeline is not invoked in runNewPMPasses in release compiler.

    Summary: The logic is guarded by "assert".

    Reviewers: davidxl, davide, chandlerc

    Reviewed By: davide, chandlerc

    Subscribers: sanjoy, llvm-commits, mehdi_amini

    Differential Revision: https://reviews.llvm.org/D36195 — dehao / detail
  5. [CMake] Include llvm-objcopy tool in Fuchsia toolchain

    Differential Revision: https://reviews.llvm.org/D36194 — phosek / detail
  6. [SimplifyCFG] Fix typo in comment. NFC — ctopper / detail

#226 (Aug 1, 2017 7:34:30 PM)

  1. [PM] Fix a bug where through CGSCC iteration we can get
    infinite-inlining across multiple runs of the inliner by keeping a tiny
    history of internal-to-SCC inlining decisions.

    This is still a bit gross, but I don't yet have any fundamentally better
    ideas and numerous people are blocked on this to use new PM and ThinLTO
    together.

    The core of the idea is to detect when we are about to do an inline that
    has a chance of re-splitting an SCC which we have split before with
    a similar inlining step. That is a critical component in the inlining
    forming a cycle and so far detects all of the various cyclic patterns
    I can come up with as well as the original real-world test case (which
    comes from a ThinLTO build of libunwind).

    I've added some tests that I think really demonstrate what is going on
    here. They are essentially state machines that march the inliner through
    various steps of a cycle and check that we stop when the cycle is closed
    and that we actually did do inlining to form that cycle.

    A lot of thanks go to Eric Christopher and Sanjoy Das for the help
    understanding this issue and improving the test cases.

    The biggest "yuck" here is the layering issue -- the CGSCC pass manager
    is providing somewhat magical state to the inliner for it to use to make
    itself converge. This isn't great, but I don't honestly have a lot of
    better ideas yet and at least seems nicely isolated.

    I have tested this patch, and it doesn't block *any* inlining on the
    entire LLVM test suite and SPEC, so it seems sufficiently narrowly
    targeted to the issue at hand.

    We have come up with hypothetical issues that this patch doesn't cover,
    but so far none of them are practical and we don't have a viable
    solution yet that covers the hypothetical stuff, so proceeding here in
    the interim. Definitely an area that we will be back and revisiting in
    the future.

    Differential Revision: https://reviews.llvm.org/D36188 — chandlerc / detail
  2. AMDGPU: Fix clobbering CSR VGPRs when spilling SGPR to it — arsenm / detail
  3. AMDGPU: Fix emitting encoded calls

    This was failing on out of bounds access to the extra operands
    on the s_swappc_b64 beyond those in the instruction definition.

    This was working, but somehow regressed within the past few weeks,
    although I don't see any obvious commit. — arsenm / detail
  4. AMDGPU: Analyze callee resource usage in AsmPrinter — arsenm / detail
  5. Update the new PM pipeline to make ICP aware if it is SamplePGO build.

    Summary: In ThinLTO backend compile, OPTOptions are not set so that the ICP in ThinLTO backend does not know if it is a SamplePGO build, in which profile count needs to be annotated directly on call instructions. This patch cleaned up the PGOOptions handling logic and passes down PGOOptions to ThinLTO backend.

    Reviewers: chandlerc, tejohnson, davidxl

    Reviewed By: chandlerc

    Subscribers: sanjoy, llvm-commits, mehdi_amini

    Differential Revision: https://reviews.llvm.org/D36052 — dehao / detail
  6. [AMDGPU] Fix asan error after last commit

    Previous change "Turn s_and_saveexec_b64 into s_and_b64 if
    result is unused" introduced asan use-after-poison error.
    Instruction was analyzed after eraseFromParent() calls.

    Move analysys higher than erase. — rampitec / detail
  7. [Driver] Disable static C++ library support on Fuchsia

    Don't support or build static C++ libraries for Fuchsia.

    Differential Revision: https://reviews.llvm.org/D36202 — phosek / detail
  8. [DAG] Refactor store merge subexpressions. NFC.

    Distribute various expressions across ifs. — niravd / detail
  9. AMDGPU: Don't place arguments in emergency stack slot

    When finding the fixed offsets for function arguments,
    this needs to skip over the 4 bytes reserved for the
    emergency stack slot. — arsenm / detail
  10. DAG: Undo and->or combine with FrameIndexes

    This pattern shows up when lowering byval copies on AMDGPU.

    The byval object access is split into 4-byte chunks, adding a
    constant offset to the FixedStack base. When some of the offsets
    turn into ors, this prevents combining the constant offsets.

    This makes it not apparent that the object is there when matching
    addressing modes, so it ends up using a scratch wave offset
    relative access and the lengthy frame index expansion for that. — arsenm / detail
  11. X86: Do not use llc -march in tests.

    `llc -march` is problematic because it only switches the target
    architecture, but leaves the operating system unchanged. This
    occasionally leads to indeterministic tests because the OS from
    LLVM_DEFAULT_TARGET_TRIPLE is used.

    However we can simply always use `llc -mtriple` instead. This changes
    all the tests to do this to avoid people using -march when they copy and
    paste parts of tests.

    See also the discussion in https://reviews.llvm.org/D35287 — matze / detail
  12. Update LiveDebugValues to generate DIExpressions for spill offsets
    instead of using the deprecated offset field of DBG_VALUE.

    This has no observable effect on the generated DWARF, but the
    assembler comments will look different.

    rdar://problem/33580047 — Adrian Prantl / detail
  13. Revert "Reland "[llvm][llvm-objcopy] Added support for outputting to binary in llvm-objcopy""

    This is failing to compile on 32-bit ARM bots.

    This reverts commit r309768. — phosek / detail
  14. Update MIR testcase to reflect change in r309751.

    rdar://problem/33580047 — Adrian Prantl / detail
  15. Reland "[llvm][llvm-objcopy] Added support for outputting to binary in llvm-objcopy"

    This change adds the "-O binary" flag which directs llvm-objcopy to
    output the object file to the same format as GNU objcopy does when given
    the flag "-O binary". This was done by splitting the Object class into
    two subclasses ObjectELF and ObjectBianry which each output a different
    format but relay on the same code to read in the Object in Object.

    Patch by Jake Ehrlich

    Differential Revision: https://reviews.llvm.org/D34480 — phosek / detail
  16. [AMDGPU] Turn s_and_saveexec_b64 into s_and_b64 if result is unused

    With SI_END_CF elimination for some nested control flow we can now
    eliminate saved exec register completely by turning a saveexec version
    of instruction into just a logical instruction.

    Differential Revision: https://reviews.llvm.org/D36007 — rampitec / detail
  17. Remove unused accessor (NFC)

    rdar://problem/33580047 — Adrian Prantl / detail
  18. [AMDGPU] Collapse adjacent SI_END_CF

    Add a pass to remove redundant S_OR_B64 instructions enabling lanes in
    the exec. If two SI_END_CF (lowered as S_OR_B64) come together without any
    vector instructions between them we can only keep outer SI_END_CF, given
    that CFG is structured and exec bits of the outer end statement are always
    not less than exec bit of the inner one.

    This needs to be done before the RA to eliminate saved exec bits registers
    but after register coalescer to have no vector registers copies in between
    of different end cf statements.

    Differential Revision: https://reviews.llvm.org/D35967 — rampitec / detail
  19. Assert that the offset of a MachineLocation is always 0.
    This is to convince me that it may safely be removed in a follow-up commit.

    rdar://problem/33580047 — Adrian Prantl / detail
  20. [sanitizer_common] Fuchsia-specific symbolizer

    Summary:
    Fuchsia doesn't support built-in symbolization per se at all.
    Instead, it always emits a Fuchsia-standard "symbolizer markup"
    format that makes it possible for a post-processing filter to
    massage the logs into symbolized format.  Hence, it does not
    support user-specified formatting options for backtraces or other
    symbolization.

    Reviewers: vitalybuka, alekseyshl, kcc

    Subscribers: kubamracek, mgorny, phosek, filcab, llvm-commits

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D36032 — Vitaly Buka / detail
  21. [SCEV/IndVars] Always compute loop exiting values if the backedge count is 0

    If SCEV can prove that the backedge taken count for a loop is zero, it does not
    need to "understand" a recursive PHI to compute its exiting value.

    This should fix PR33885. — sanjoy / detail
  22. Use helper function instead of manually constructing DBG_VALUEs (NFC)

    rdar://problem/33580047 — Adrian Prantl / detail

#225 (Aug 1, 2017 3:28:06 PM)

  1. [sanitizer_common] Fuchsia OS support code

    Submitted on behalf of Roland McGrath.

    Reviewers: vitalybuka, alekseyshl, kcc

    Reviewed By: vitalybuka

    Subscribers: cryptoad, srhines, kubamracek, mgorny, phosek, filcab, llvm-commits

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D36031 — Vitaly Buka / detail
  2. ARM: Do not use llc -march in tests.

    `llc -march` is problematic because it only switches the target
    architecture, but leaves the operating system unchanged. This
    occasionally leads to indeterministic tests because the OS from
    LLVM_DEFAULT_TARGET_TRIPLE is used.

    However we can simply always use `llc -mtriple` instead. This changes
    all the tests to do this to avoid people using -march when they copy and
    paste parts of tests.

    See also the discussion in https://reviews.llvm.org/D35287 — matze / detail
  3. PowerPC: Do not use llc -march in tests.

    `llc -march` is problematic because it only switches the target
    architecture, but leaves the operating system unchanged. This
    occasionally leads to indeterministic tests because the OS from
    LLVM_DEFAULT_TARGET_TRIPLE is used.

    However we can simply always use `llc -mtriple` instead. This changes
    all the tests to do this to avoid people using -march when they copy and
    paste parts of tests.

    This patch:
    - Removes -march if the .ll file already has a matching `target triple`
      directive or -mtriple argument.
    - In all other cases changes -march=ppc32/-march=ppc64 to
      -mtriple=ppc32--/-mtriple=ppc64--

    See also the discussion in https://reviews.llvm.org/D35287 — matze / detail
  4. [Headers][Darwin] Allow #include_next<float.h> to work on Darwin prior to 10.7

    This fixes PR31504 and it's a follow up from adding #include_next<float.h>
    for Darwin in r289018.

    rdar://problem/29856682 — Bruno Lopes / detail
  5. Remove PrologEpilogInserter's usage of DBG_VALUE's offset field

    In the last half-dozen commits to LLVM I removed code that became dead
    after removing the offset parameter from llvm.dbg.value gradually
    proceeding from IR towards the backend. Before I can move on to
    DwarfDebug and friends there is one last side-called offset I need to
    remove:  This patch modifies PrologEpilogInserter's use of the
    DBG_VALUE's offset argument to use a DIExpression instead. Because the
    PrologEpilogInserter runs at the Machine level I had to play a little
    trick with a named llvm.dbg.mir node to get the DIExpressions to print
    in MIR dumps (which print the llvm::Module followed by the
    MachineFunction dump).

    I also had to add rudimentary DwarfExpression support to CodeView and
    as a side-effect also fixed a bug (CodeViewDebug::collectVariableInfo
    was supposed to give up on variables with complex DIExpressions, but
    would fail to do so for fragments, which are also modeled as
    DIExpressions).

    With this last holdover removed we will have only one canonical way of
    representing offsets to debug locations which will simplify the code
    in DwarfDebug (and future versions of CodeViewDebug once it starts
    handling more complex expressions) and make it easier to reason about.

    This patch is NFC-ish: All test case changes are for assembler
    comments and the binary output does not change.

    rdar://problem/33580047
    Differential Revision: https://reviews.llvm.org/D36125 — Adrian Prantl / detail
  6. [clang] Change the condition of unnecessary packed warning

    Summary:
    Change the condition of this unnecessary packed warning. The packed is unnecessary when
    1. the alignment of the struct/class won't alter.
    2. the size is unchanged.
    3. the offset of each field is the same.

    Remove all field-level warning.

    Reviewers: chh, akyrtzi, rtrieu

    Reviewed By: chh

    Subscribers: rsmith, srhines, cfe-commits, xazax.hun

    Differential Revision: https://reviews.llvm.org/D34114 — yawanng / detail
  7. [sanitizer_common] Disable filesystem-related code for Fuchsia

    Summary:
    Fuchsia doesn't support filesystem access per se at low level.
    So it won't use any of the filesystem-oriented code in sanitizer_common.

    Submitted on behalf of Roland McGrath.

    Reviewers: vitalybuka, alekseyshl, kcc

    Reviewed By: vitalybuka

    Subscribers: kubamracek, phosek, filcab, llvm-commits

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D36029 — Vitaly Buka / detail
  8. [AArch64] Fix a typo in isExtFreeImpl()

    next => not

    Differential Revision: https://reviews.llvm.org/D36104 — haicheng / detail
  9. [llvm-cov] Allow specifying distinct architectures for each loaded binary

    The coverage tool needs to know which slice to look at when it's handed
    a universal binary. Some projects need to look at aggregate coverage
    reports for a variety of slices in different binaries: this patch adds
    support for these kinds of projects to llvm-cov.

    rdar://problem/33579007 — Vedant Kumar / detail
  10. [Hexagon] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). — eugenezelenko / detail
  11. [sanitizer_common] Fuchsia support for interceptors

    Summary:
    Actually Fuchsia non-support for interceptors.  Fuchsia doesn't use
    interceptors in the common sense at all.  Almost all system library
    functions don't need interception at all, because the system
    libraries are just themselves compiled with sanitizers enabled and
    have specific hook interfaces where needed to inform the sanitizer
    runtime about thread lifetimes and the like.  For the few functions
    that do get intercepted, they don't use a generic mechanism like
    dlsym with RTLD_NEXT to find the underlying system library function.
    Instead, they use specific extra symbol names published by the
    system library (e.g. __unsanitized_memcpy).

    Submitted on behalf of Roland McGrath.

    Reviewers: vitalybuka, alekseyshl, kcc, filcab

    Reviewed By: filcab

    Subscribers: kubamracek, phosek, filcab, llvm-commits

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D36028 — Vitaly Buka / detail
  12. [AArch64] Rewrite stack frame handling for win64 vararg functions

    The previous attempt, which made do with a single offset in
    computeCalleeSaveRegisterPairs, wasn't quite enough. The previous
    attempt only worked as long as CombineSPBump == true (since the
    offset would be adjusted later in fixupCalleeSaveRestoreStackOffset).

    Instead include the size for the fixed stack area used for win64
    varargs in calculations in emitPrologue/emitEpilogue. The stack
    consists of mainly three parts;
    - AFI->getLocalStackSize()
    - AFI->getCalleeSavedStackSize()
    - FixedObject

    Most of the places in the code which previously used the CSStackSize
    now use PrologueSaveSize instead, which is the sum of the latter
    two, while some cases which need exactly the middle one use
    AFI->getCalleeSavedStackSize() explicitly instead of a local variable.

    In addition to moving the offsetting into emitPrologue/emitEpilogue
    (which fixes functions with CombineSPBump == false), also set the
    frame pointer to point to the right location, where the frame pointer
    and link register actually are stored. In addition to the prologue/epilogue,
    this also requires changes to resolveFrameIndexReference.

    Add tests for a function that keeps a frame pointer and another one
    that uses a VLA.

    Differential Revision: https://reviews.llvm.org/D35919 — mstorsjo / detail
  13. AMDGPU: Fix handling of div_scale with undef inputs

    The src0 register must match src1 or src2, but if these
    were undefined they could end up using different implicit_defed
    virtual registers. Force these to use one undef vreg or pick the
    defined other register.

    Also fixes producing invalid nodes without the right number of
    inputs when src2 is undef. — arsenm / detail
  14. [ubsan] Enable UBSan build for Fuchsia

    Submitted on behalf of Roland McGrath.

    Reviewers: vitalybuka, alekseyshl, kcc

    Reviewed By: vitalybuka

    Subscribers: srhines, kubamracek, mgorny, phosek, filcab, llvm-commits

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D36033 — Vitaly Buka / detail
  15. Fix creating bitcasts with wrong address space

    In a future commit AMDGPU will start passing
    aggregates directly to more functions, triggering
    asserts in test/CodeGenOpenCL/addr-space-struct-arg.cl — arsenm / detail
  16. [DAG] Factor out common expressions. NFC. — niravd / detail
  17. [Value Tracking] Default argument to true and rename accordingly. NFC.

    IMHO this is a bit more readable. — mcrosier / detail
  18. [clang-diff] Renames, NFC — krobelus / detail
  19. [clang-diff] Move data declarations to the public header — krobelus / detail
  20. AMDGPU: Add test for r308774 — arsenm / detail
  21. AMDGPU: Initial implementation of calls

    Includes a hack to fix the type selected for
    the GlobalAddress of the function, which will be
    fixed by changing the default datalayout to use
    generic pointers for 0. — arsenm / detail
  22. Revert "Thread Safety Analysis: fix assert_capability."

    This reverts commit rL309725.

    Broke test/Sema/attr-capabilities.c. — jmgao / detail
  23. [DebugInfo] Don't turn dbg.declare into DBG_VALUE for static allocas

    Summary:
    We already have information about static alloca stack locations in our
    side table. Emitting instructions for them is inefficient, and it only
    happens when the address of the alloca has been materialized within the
    current block, which isn't often.

    Reviewers: aprantl, probinson, dblaikie

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

    Differential Revision: https://reviews.llvm.org/D36117 — rnk / detail
  24. [Value Tracking] Refactor and/or logic into helper. NFC. — mcrosier / detail
  25. Thread Safety Analysis: fix assert_capability.

    Summary:
    Previously, the assert_capability attribute was completely ignored by
    thread safety analysis.

    Reviewers: delesley, rnk

    Reviewed By: delesley

    Subscribers: cfe-commits

    Differential Revision: https://reviews.llvm.org/D36122 — jmgao / detail
  26. [CMake] Include sancov tool in Fuchsia toolchain

    Differential Revision: https://reviews.llvm.org/D35930 — phosek / detail
  27. [AMDGPU] Put a function used only inside assert() under NDEBUG. — davide / detail
  28. [Sema] Fix lax conversion between non ext vectors

    r282968 introduced a regression due to the lack of proper testing.
    Re-add lax conversion support between non ext vectors for compound
    assignments and add a test for that.

    rdar://problem/28639467 — Bruno Lopes / detail
  29. [lanai] Add getIntImmCost in LanaiTargetTransformInfo.

    Add simple int immediate cost function. — jpienaar / detail
  30. [clangd] Fix more MSVC compilation failures.

    It turns out MSVC does not allow non-copyable classes in std::future
    and std::promise template arguments. — ibiryukov / detail
  31. Pull out VectorNumElements value. NFC. — niravd / detail
  32. [X86][SSE3] Add scheduler tests for MONITOR/MWAIT — rksimon / detail
  33. Revert "[DAG] Extend visitSCALAR_TO_VECTOR optimization to truncated vector."

    This reverts commit r309680 which appears to be raising an assertion
    in the test-suite. — niravd / detail
  34. [libFuzzer] temporarty remove pc-tables and disable test/fuzzer-printcovpcs.test until this can be fixed on Windows — kcc / detail

#224 (Aug 1, 2017 10:57:28 AM)

  1. [X86][SSE] Added missing vector logic intrinsic schedules

    Improves atom scheduler test coverage (to make it easier to upgrade them for PR32431).

    Merged SSE_VEC_BIT_ITINS_P + SSE_BIT_ITINS_P as we were interchanging between them. — rksimon / detail
  2. clang-format: [JS] no whitespace between typeof operator and l_paren. — mprobst / detail
  3. clang-format: [JS] prefer wrapping chains over empty literals.

    Summary:
    E.g. don't wrap like this:

        (foo.bar.baz).and.bam(Blah.of({
        }))

    But rather:

        (foo.bar.baz)
            .and.bam(Blah.of({}))

    Reviewers: djasper

    Subscribers: klimek, cfe-commits

    Differential Revision: https://reviews.llvm.org/D36139 — mprobst / detail
  4. [CGP] use narrower types in memcmp expansion when possible

    This only affects very small memcmp on x86 for now, but it
    will become more important if we allow vector-sized load and
    compares. — spatel / detail
  5. clang-format: [JS] whitespace between keywords and parenthesized expressions.

    Summary: `throw (...)` should have a whitespace following it, as do await and void.

    Reviewers: djasper

    Subscribers: klimek, cfe-commits

    Differential Revision: https://reviews.llvm.org/D36146 — mprobst / detail
  6. [DAG] Convert extload check to equivalent type check. NFC.

    Replace check with check that consuming store has the same type. — niravd / detail
  7. clang-format: [JS] handle union types in arrow functions.

    Summary: clang-format would previously fail to detect that an arrow functions parameter block is not an expression, and thus insert whitespace around the `|` and `&` type operators in it.

    Reviewers: djasper

    Subscribers: klimek, cfe-commits

    Differential Revision: https://reviews.llvm.org/D36147 — mprobst / detail
  8. [X86] Use BEXTR/BEXTRI for 64-bit 'and' with a large mask

    Summary: The 64-bit 'and' with immediate instruction only supports a 32-bit immediate. So for larger constants we have to load the constant into a register first. If the immediate happens to be a mask we can use the BEXTRI instruction to perform the masking. We already do something similar using the BZHI instruction from the BMI2 instruction set.

    Reviewers: RKSimon, spatel

    Reviewed By: RKSimon

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D36129 — ctopper / detail
  9. [clangd] Fixed MSVC compilation failures. — ibiryukov / detail
  10. Revert rL309634 until upstream buildbots have upgraded libc. — saugustine / detail
  11. clang-format: [JS] consistenly format enums.

    Summary: Previously, const enums would get formatted differently because the modifier was not recognized.

    Reviewers: djasper

    Subscribers: klimek, cfe-commits

    Differential Revision: https://reviews.llvm.org/D36144 — mprobst / detail
  12. [X86][SSE] Added missing PACKSS/PACKUS intrinsic schedules

    Improves atom scheduler test coverage (to make it easier to upgrade them for PR32431).

    Checked on Agner that these actually match the UNPACK schedules, but better to include a separate class — rksimon / detail
  13. [X86] Split bmi.ll into a bmi test and a bmi2 test.

    This moves all the bmi2 specific intrinsics to a separate test file and adds a bmi1 only command line to the existing bmi test.

    This will allow us to see the missed opportunity to use bextr to handle 64-bit 'and' with a large mask. This will be improved in an upcoming patch. — ctopper / detail
  14. [X86][SSSE3] Added missing PHADDS/PHSUBS/PSIGN intrinsic schedules — rksimon / detail
  15. [DAG] Move extload check in store merge. NFC.

    Move candidate check from later check to initial candidate check. — niravd / detail
  16. clang-format: [JS] support default imports.

    Summary: Formerly, `import {default as X} from y;` would not be recognized as an import.

    Reviewers: djasper

    Subscribers: klimek, cfe-commits

    Differential Revision: https://reviews.llvm.org/D36132 — mprobst / detail
  17. [clangd] Rewrote AST and Preamble management.

    Summary: The new implementation allows code completion that never waits for AST.

    Reviewers: bkramer, krasimir, klimek

    Reviewed By: bkramer

    Subscribers: cfe-commits

    Differential Revision: https://reviews.llvm.org/D36133 — ibiryukov / detail
  18. clang-format: [JS] handle object types in extends positions.

    Summary:
    clang-format would previously drop the whitespace after `extends` in code such as:

        class Foo extends {} {}

    Where the first set of curly braces is an inline object literal type.

    Reviewers: djasper

    Subscribers: klimek, cfe-commits

    Differential Revision: https://reviews.llvm.org/D36131 — mprobst / detail
  19. [X86] Fix a crash in FEntryInserter Pass.

    Summary:
    FEntryInserter pass unconditionally derefs the first Instruction
    in the first Basic Block. The pass crashes when the first
    BasicBlock is empty. Fix the crash by not dereferencing the basic
    Block iterator. This fixes an issue observed when building Linux kernel
    4.4 with clang.

    Fixes PR33971.

    Reviewers: hfinkel, niravd, dblaikie

    Reviewed By: niravd

    Subscribers: davide, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35979 — manojgupta / detail
  20. [AVX-512] Don't use unmasked VMOVDQU8/16 for 8-bit or 16-bit element stores even when BWI instructions are supported. Always use VMOVDQA32/VMOVDQU32.

    We were already using the 32 bit element opcode if BWI isn't enabled, but there's no reason to change opcode if we have BWI. We will still use the 8/16 opcodes for masked stores though.

    This allows us to use the aligned opcode when we can which makes our test output more consistent between different modes. It also reduces the number of isel patterns we need.

    This is a slight inconsistency with loads which default to 64 bit element opcodes. I'll probably rectify that in a future patch.

    Differential Revision: https://reviews.llvm.org/D35978 — ctopper / detail
  21. [X86][SSSE3] Fix typos in pabsw/pmulhrsw tests for load folding scheduling. — rksimon / detail

#223 (Aug 1, 2017 8:29:05 AM)

  1. [X86] Added missing cpu to fix generic scheduling model tests — rksimon / detail
  2. [InstCombine] Remove explicit check for impossible condition. Replace with assert

    Summary:
    As far as I can tell the earlier call getLimitedValue will guaranteed ShiftAmt is saturated to BitWidth-1 preventing it from ever being equal or greater than BitWidth.

    At one point in the past the getLimitedValue call was only passed BitWidth not BitWidth - 1. This would have allowed the equality case to get here. And in fact this check was initially added as just BitWidth == ShiftAmt, but was changed shortly after to include > which should have never been possible.

    Reviewers: spatel, majnemer, davide

    Reviewed By: davide

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D36123 — ctopper / detail
  3. [Tooling] Add LLVM_NODISCARD to Replacements::merge

    Summary:
    This patch adds LLVM_NODISCARD to Replacements::merge. I've hit this
    several times already.

    Reviewers: ioeric

    Reviewed By: ioeric

    Subscribers: klimek, cfe-commits

    Differential Revision: https://reviews.llvm.org/D36149 — krasimir / detail
  4. [globalisel][tablegen] Removed unnecessary typedef pointed out in post-commit review for r308599. NFC — dsanders / detail
  5. DebugInfo: Update flag description that'd been copypasted from another

    Post-commit review feedback from Paul Robinson on r309630. Thanks Paul! — dblaikie / detail
  6. [PostDom] document the current handling of infinite loops and unreachables

    Summary:
    As we are in the process of changing the behavior of how the post-dominator tree
    is computed, make sure we have some more test coverage in this area.

    Current inconsistencies:

      - Newly unreachable nodes are not added as new roots, in case the PDT is updated
        but not rebuilt.

      - Newly unreachable loops are not added to the CFG at all (neither when
        building from scratch nor when updating the CFG). This is inconsistent with
        the fact that unreachables are added to the PDT, but unreachable loops not.
        On the other side, PDT relationships are not loosened at the moment in
        cases where new unreachable loops are built.

    This commit is providing additional test coverage for
    https://reviews.llvm.org/D35851

    Reviewers: dberlin, kuhar

    Reviewed By: kuhar

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D36107 — grosser / detail
  7. [DebugInfo] Use shrink_to_fit to simplify code. NFCI. — d0k / detail
  8. [DAG] Extend visitSCALAR_TO_VECTOR optimization to truncated vector.

    Summary:
    Allow SCALAR_TO_VECTOR of EXTRACT_VECTOR_ELT to reduce to
    EXTRACT_SUBVECTOR of vector shuffle when output is smaller. Marginally
    improves vector shuffle computations.

    Reviewers: efriedma, RKSimon, spatel

    Subscribers: javed.absar, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35566 — niravd / detail
  9. [Mips] Fix for BBIT octeon instruction

    This patch enables control flow optimization for
    variations of BBIT instruction. In this case
    optimization removes unnecessary branch after
    BBIT instruction.

    Differential Revision: https://reviews.llvm.org/D35359 — spetrovic / detail
  10. [OpenCL] Add missing subgroup builtins

    This adds get_kernel_max_sub_group_size_for_ndrange and
    get_kernel_sub_group_count_for_ndrange. — joey / detail
  11. [Hexagon] Convert HVX vector constants of i1 to i8

    Certain operations require vector of i1 values. However, for Hexagon
    architecture compatibility, they need to be represented as vector of i8.

    Patch by Suyog Sarda. — kparzysz / detail
  12. [X86] Regenerate big structure return test and check on x86_64 as well. — rksimon / detail
  13. AMDGPU/GlobalISel: Add support for amdgpu_vs calling convention

    Reviewers: arsenm

    Reviewed By: arsenm

    Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, rovka, kristof.beyls, igorb, dstuttard, tpr, llvm-commits, t-tye

    Differential Revision: https://reviews.llvm.org/D35916 — tstellar / detail

#222 (Aug 1, 2017 4:13:33 AM)

  1. [PostDom] Fix typo in comment [NFC] — grosser / detail
  2. [x86][inline-asm]Allow a pack of Control Debug to be properly picked

    Allows the incorporation of legit (x86) Debug Regs within inline asm stataements

    Differential Revision: https://reviews.llvm.org/D36074 — coby / detail
  3. [NFC] Remove obsolete profiling data from eq_ne test — mkazantsev / detail
  4. [clang-tidy] Handle anonymous structs/unions in member init checks.

    Use getAnyMember() instead of getMember() to avoid crash on anonymous
    structs/unions.
    Don't warn about initializing members of an anonymous union.

    Fixes PR32966.

    Reviewed by alexfh. — malcolm.parsons / detail
  5. [ASTMatchers] Allow forField to match indirect fields.

    This is needed for PR32966.

    Reviewed by alexfh. — malcolm.parsons / detail
  6. Support itineraries in TargetSubtargetInfo::getSchedInfoStr - Now if the given instr does not have sched model then we try to calculate the latecy/throughput with help of itineraries.
    Differential Revision https://reviews.llvm.org/D35997 — avt77 / detail
  7. [sanitizer-coverage] Fix Windows build broken by r309655 — Vitaly Buka / detail
  8. [IRCE][NFC] Add another assert that AddRecExpr's step is not zero

    One more assertion of this kind. It is a preparation step for generalizing
    to the case of stride not equal to +1/-1. — mkazantsev / detail
  9. [PM] Add a comment clarifying what a particular predicate is doing.

    This came up as a point of confusion while working on a fundamental
    problem with the combination of CGSCC iteration and the inliner. — chandlerc / detail
  10. [IRCE][NFC] Add assert that AddRecExpr's step is not zero

    We should never return zero steps, ensure this fact by adding
    a sanity check when we are analyzing the induction variable. — mkazantsev / detail

#221 (Jul 31, 2017 10:55:31 PM)

  1. Revert "[llvm][llvm-objcopy] Added support for outputting to binary in llvm-objcopy"

    The change seems to be failing on bots which are using gcc and bfd.ld
    as a host compiler and linker.

    This reverts commit r309658. — phosek / detail
  2. Revert r309415: "[LVI] Constant-propagate a zero extension of the switch condition value through case edges"

    This causes assertion failures in (a somewhat old version of) SpiderMonkey.
    I have already forwarded reproduction instructions to the patch author. — djasper / detail
  3. [llvm][llvm-objcopy] Added support for outputting to binary in llvm-objcopy

    This change adds the "-O binary" flag which directs llvm-objcopy to
    output the object file to the same format as GNU objcopy does when given
    the flag "-O binary". This was done by splitting the Object class into
    two subclasses ObjectELF and ObjectBianry which each output a different
    format but relay on the same code to read in the Object in Object.

    Patch by Jake Ehrlich

    Differential Revision: https://reviews.llvm.org/D34480 — phosek / detail
  4. [MetaRenamer] Leave `@main` alone.

    To the best of my knowledge -metarenamer is used in two cases:
    1) obfuscate names, when e.g. they contain informations that
    can't be shared.
    2) Improve clarity of the textual IR for testcases.

    One of the usecases if getting the output of `opt` and passing it
    to the lli interpreter to run the test. If metarenamer renames
    @main, lli can't find an entry point. — davide / detail
  5. [sanitizer-coverage] dummy definitions for __sanitizer_cov_8bit_counters_init and __sanitizer_cov_pcs_init — kcc / detail

#220 (Jul 31, 2017 9:21:22 PM)

  1. [MathExtras] Remove unnecessary cast of a constant 1 in a subtract.

    Pretty sure this will automatically promoted to match the type of the other operand of the subtract. There's plenty of other similar code around here without this cast. — ctopper / detail
  2. [StackColoring] Update AliasAnalysis information in stack coloring pass

    Stack coloring pass need to maintain AliasAnalysis information when merging stack slots of different types.
    Actually, there is a FIXME comment in StackColoring.cpp

    // FIXME: In order to enable the use of TBAA when using AA in CodeGen,
    // we'll also need to update the TBAA nodes in MMOs with values
    // derived from the merged allocas.

    But, TBAA has been already enabled in CodeGen without fixing this pass.
    The incorrect TBAA metadata results in recent failures in bootstrap test on ppc64le (PR33928) by allowing unsafe instruction scheduling.
    Although we observed the problem on ppc64le, this is a platform neutral issue.

    This patch makes the stack coloring pass maintains AliasAnalysis information when merging multiple stack slots. — inouehrs / detail
  3. [libFuzzer] implement more correct way of computing feature index for Inline8bitCounters — kcc / detail

#219 (Jul 31, 2017 6:08:42 PM)

  1. [libFuzzer] enable -fsanitize-coverage=pc-table for all tests — kcc / detail
  2. Default MemoryLocation passed to getModRefInfo should be None (D35441) — asbirlea / detail
  3. [sanitizer-coverage] relax an assertion — kcc / detail
  4. Reland "[LLVM][llvm-objcopy] Added basic plumbing to get things started"

    As discussed on llvm-dev I've implemented the first basic steps towards
    llvm-objcopy/llvm-objtool (name pending).

    This change adds the ability to copy (without modification) 64-bit
    little endian ELF executables that have SHT_PROGBITS, SHT_NOBITS,
    SHT_NULL and SHT_STRTAB sections.

    Patch by Jake Ehrlich

    Differential Revision: https://reviews.llvm.org/D33964 — phosek / detail
  5. [ScheduleDAG] Don't schedule node with physical register interference

    https://reviews.llvm.org/D31536 didn't really solve the problem it was
    trying to solve; it got rid of the assertion failure, but we were still
    scheduling the DAG incorrectly (mixing together instructions from
    different calls), leading to a MachineVerifier failure.

    In order to schedule the DAG correctly, we have to make sure we don't
    schedule a node which should be blocked by an interference. Fix
    ScheduleDAGRRList::PickNodeToScheduleBottomUp so it doesn't pick a node
    like that.

    The added call to FindAvailableNode() is the key change here; this makes
    sure we don't try to schedule a call while we're in the middle of
    scheduling a different call. I'm not sure this is the right approach; in
    particular, I'm not sure how to prove we don't end up with an infinite
    loop of repeatedly backtracking.

    This also reverts the code change from D31536. It doesn't do anything
    useful: we should never schedule an ADJCALLSTACKDOWN unless we've
    already scheduled the corresponding ADJCALLSTACKUP.

    Differential Revision: https://reviews.llvm.org/D33818 — efriedma / detail
  6. Allow None as a MemoryLocation to getModRefInfo

    Summary:
    Adding part of the changes in D30369 (needed to make progress):
    Current patch updates AliasAnalysis and MemoryLocation, but does _not_ clean up MemorySSA.

    Original summary from D30369, by dberlin:
    Currently, we have instructions which affect memory but have no memory
    location. If you call, for example, MemoryLocation::get on a fence,
    it asserts. This means things specifically have to avoid that. It
    also means we end up with a copy of each API, one taking a memory
    location, one not.

    This starts to fix that.

    We add MemoryLocation::getOrNone as a new call, and reimplement the
    old asserting version in terms of it.

    We make MemoryLocation optional in the (Instruction, MemoryLocation)
    version of getModRefInfo, and kill the old one argument version in
    favor of passing None (it had one caller). Now both can handle fences
    because you can just use MemoryLocation::getOrNone on an instruction
    and it will return a correct answer.

    We use all this to clean up part of MemorySSA that had to handle this difference.

    Note that literally every actual getModRefInfo interface we have could be made private and replaced with:

    getModRefInfo(Instruction, Optional<MemoryLocation>)
    and
    getModRefInfo(Instruction, Optional<MemoryLocation>, Instruction, Optional<MemoryLocation>)

    and delegating to the right ones, if we wanted to.

    I have not attempted to do this yet.

    Reviewers: dberlin, davide, dblaikie

    Subscribers: sanjoy, hfinkel, chandlerc, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35441 — asbirlea / detail
  7. Use -target instead of -arch in test case. — ahatanak / detail
  8. [sancov] Fix coverage-reset test on Android/i686.

    DSO coverage may be dumped in any order. — eugenis / detail
  9. [sanitizer] Fix the sanitizer build on Android

    Android uses libgcc name even for shared library unlike other platforms
    which use libgcc_s. Furthemore, Android libstdc++ has a dependency on
    libdl. These need to be handled while performing CMake checks.

    Differential Revision: https://reviews.llvm.org/D36035 — phosek / detail
  10. [msan] Reverting D36093

    Summary:
    Reverting D36093 until I can figure out how to launch the correct tests :/
    My apologies.

    Reviewers: alekseyshl

    Reviewed By: alekseyshl

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D36120 — cryptoad / detail
  11. Silence warning -Wmissing-sysroot. — ahatanak / detail
  12. Re-apply r309622 with a fix for MSVC.

    Patch by Vlad Tsyrklevich! — pcc / detail
  13. Add powerpc64 to compiler-rt build infrastructure.

    Summary: Add powerpc64 to compiler-rt build infrastructure.

    Reviewers: timshen

    Reviewed By: timshen

    Subscribers: nemanjai, dberris, mgorny, aheejin, cfe-commits

    Differential Revision: https://reviews.llvm.org/D36108 — saugustine / detail
  14. [Driver] Make sure the deployment target is earlier than iOS 11 when
    it is inferred from -isysroot.

    This fixes a change that was inadvertently introduced in r309607.

    rdar://problem/32230613 — ahatanak / detail
  15. [AVX-512] Add unmasked subvector inserts and extract to the execution domain tables. — ctopper / detail

#218 (Jul 31, 2017 2:52:13 PM)

  1. DebugInfo: Put range base specifier entry functionality behind a flag

    Chromium's gold build seems to have trouble with this (gold produces
    errors) - not sure if it's gold that's not coping with the valid
    representation, or a bug in the implementation in LLVM, etc. — dblaikie / detail
  2. [AVX512] Add a common prefix to avx512-insert-extract.ll so we can reduce the number of check lines on some test cases.

    This was pointed out during the review for D313804. — ctopper / detail
  3. [codeview] Ignore DBG_VALUEs when choosing a BB start source loc

    When the first instruction of a basic block has no location (consider a
    LEA materializing the address of an alloca for a call), we want to start
    the line table for the block with the first valid source location in the
    block.  We need to ignore DBG_VALUE instructions during this scan to get
    decent line tables. — rnk / detail
  4. [InstCombine] allow mask hoisting transform for vector types — spatel / detail
  5. Move RTEMS to OSTargets.h

    Differential Revision: https://reviews.llvm.org/D36106 — waltl / detail
  6. [AVX-512] Use AVX512 as test check prefix instead of AVX3. NFC — ctopper / detail
  7. Revert r309622, "Fix logic for generating llvm.type.test()s"

    Caused a bot test failure:
    http://bb.pgr.jp/builders/test-clang-msc-x64-on-i686-linux-RA/builds/5325 — pcc / detail
  8. Debug Info: Also check the DWARF output in assembler-only test cases

    This will prevent me from introducing a regression in my next commit. — Adrian Prantl / detail
  9. Fix logic for generating llvm.type.test()s

    CodeGenFunction::EmitTypeMetadataCodeForVCall() could output an
    llvm.assume(llvm.type.test())when CFI was enabled, optimizing out the
    vcall check. This case was only reached when: 1) CFI-vcall was enabled,
    2) -fwhole-program-tables was specified, and 3)
    -fno-sanitize-trap=cfi-vcall was specified.

    Patch by Vlad Tsyrklevich!

    Differential Revision: https://reviews.llvm.org/D36013 — pcc / detail
  10. Update phi nodes in LowerTypeTests control flow simplification

    D33925 added a control flow simplification for -O2 --lto-O0 builds that
    manually splits blocks and reassigns conditional branches but does not
    correctly update phi nodes. If the else case being branched to had
    incoming phi nodes the control-flow simplification would leave phi nodes
    in that BB with an unhandled predecessor.

    Patch by Vlad Tsyrklevich!

    Differential Revision: https://reviews.llvm.org/D36012 — pcc / detail
  11. [Attr] Make TargetWindows and TargetMicrosoftCXXABI match on aarch64 as well

    Differential Revision: https://reviews.llvm.org/D36100 — mstorsjo / detail
  12. [AArch64] Don't define __LP64__ when targeting Windows

    Windows/ARM64 is a LLP64 environment, so don't set this default
    define.

    Differential Revision: https://reviews.llvm.org/D36098 — mstorsjo / detail
  13. [test] Fix mistagged CHECK-NOT-lines for AARCH64-DARWIN in Preprocessor/init.c

    Differential Revision: https://reviews.llvm.org/D36099 — mstorsjo / detail
  14. Remove STL/microsoft-specific CFI blacklist entries

    Patch by Vlad Tsyrklevich!

    Differential Revision: https://reviews.llvm.org/D35855 — pcc / detail
  15. [X86] Remove -O3 from tbm-builtins.c test file.

    A change to InstCombine broke this test, but we generally frown on running optimizations clang tests anyway. So I've updated the checks to not depend on optimizations anymore. — ctopper / detail
  16. [libFuzzer] implement __sanitizer_cov_pcs_init and add pc-table to build flags for one test (for now) — kcc / detail
  17. [X86][MMX] Added custom lowering action for MMX SELECT (PR30418)
    Fix for pr30418 - error in backend: Cannot select: t17: x86mmx = select_cc t2, Constant:i64<0>, t7, t8, seteq:ch
    Differential Revision: https://reviews.llvm.org/D34661 — kbelochapka / detail
  18. [InstCombine] add tests for mask hoisting; NFC

    The scalar transforms exist with no test coverage. The vector equivalents are missing. — spatel / detail
  19. [sanitizer-coverage] don't instrument available_externally functions — kcc / detail
  20. [sanitizer-coverage] ensure minimal alignment for coverage counters and guards — kcc / detail
  21. [lld/pdb] Add an empty globals stream.

    We don't write any actual symbols to this stream yet, but for
    now we just create the stream and hook it up to the appropriate
    places and give it a valid header.

    Differential Revision: https://reviews.llvm.org/D35290 — zturner / detail
  22. [Driver] Allow users to silence the warning that is issued when the
    deployment target is earlier than iOS 11 and the target is 32-bit.

    This is a follow-up to r306922.

    rdar://problem/32230613 — ahatanak / detail
  23. [SLPVectorizer] Unbreak the build with -Werror.

    GCC was complaining about `&&` within `||` without explicit
    parentheses. NFCI. — davide / detail
  24. [X86][InstCombine] Add some simplifications for BZHI intrinsics

    This intrinsic clears the upper bits starting at a specified index. If the index is a constant we can do some simplifications.

    This could be in InstSimplify, but we don't handle any target specific intrinsics there today.

    Differential Revision: https://reviews.llvm.org/D36069 — ctopper / detail
  25. [X86][InstCombine] Add basic simplification support for BEXTR/BEXTRI intrinsics.

    This patch adds simplification support for the BEXTR/BEXTRI intrinsics to match gcc. This only supports cases that fold to 0 or can be fully constant folded. Theoretically we could support converting to AND if the shift part is unused or to only a shift if the mask doesn't modify any bits after an equivalent shl. gcc doesn't do these transformations either.

    I put this in InstCombine, but it could be done in InstSimplify. It would be the first target specific intrinsic in InstSimplify.

    Differential Revision: https://reviews.llvm.org/D36063 — ctopper / detail
  26. [lit] Avoid copying llvm/utils/lit/tests/Inputs with lit site configs

    Summary:
    This is an alternative solution to running the lit test suite on bots
    without polluting the source directory. Each input test suite gets an
    auto-generated site config in the build directory that points back to
    the test input source directory.

    This adds some cmake comlexity, but now we don't need to remove and
    re-copy the test input directory before every test.

    Reviewers: delcypher, modocache

    Subscribers: mgorny, llvm-commits

    Differential Revision: https://reviews.llvm.org/D36026 — rnk / detail
  27. [msan] Check for pvalloc overflow

    Summary:
    `CheckForPvallocOverflow` was introduced with D35818 to detect when pvalloc
    would wrap when rounding up to the next multiple of the page size.

    Add this check to MSan's pvalloc implementation.

    Reviewers: alekseyshl

    Reviewed By: alekseyshl

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D36093 — cryptoad / detail
  28. [llc][NFC] Update message in assert. — qcolombet / detail
  29. [TargetPassConfig] Feature generic options to setup start/stop-after/before

    This patch refactors the code used in llc such that all the users of the
    addPassesToEmitFile API have access to a homogeneous way of handling
    start/stop-after/before options right out of the box.

    In particular, just invoking addPassesToEmitFile will set the proper
    pipeline without additional effort (modulo parsing a .mir file if the
    start-before/after options are used.

    NFC.

    Differential Revision: https://reviews.llvm.org/D30913 — qcolombet / detail
  30. [Targets] Move addCygMingDefines into the arch-independent Targets.cpp (NFC)

    This fixes a dependency inconsistency, where addMinGWDefines in Targets.cpp
    (used from other architectures than X86) called the addCygMingDefines function
    in X86.h.

    This was inconsistently split in SVN r308791 (D35701).

    Differential Revision: https://reviews.llvm.org/D36072 — mstorsjo / detail
  31. [CGP] use subtract or subtract-of-cmps for result of memcmp expansion

    As noted in the code comment, transforming this in the other direction might require
    a separate transform here in CGP given the block-at-a-time DAG constraint.

    Besides that theoretical motivation, there are 2 practical motivations for the
    subtract-of-cmps form:

    1. The codegen for both x86 and PPC is better for this IR (though PPC could be better still).
       There is discussion about canonicalizing IR to the select form
       ( http://lists.llvm.org/pipermail/llvm-dev/2017-July/114885.html ),
       so we probably need to add DAG transforms for those patterns anyway, but this improves the
       memcmp output without waiting for that step.

    2. If we allow vector-sized chunks for the load and compare, x86 is better prepared to convert
       that to optimal code when using subtract-of-cmps, so another prerequisite patch is avoided
       if we choose to enable that.

    Differential Revision: https://reviews.llvm.org/D34904 — spatel / detail
  32. [DWARF] Added verification check for tags in accelerator tables. This patch verifies that the atom tag is actually the same with the tag of the DIE that we retrieve from the table.

    Differential Revision: https://reviews.llvm.org/D35963 — sgravani / detail

#217 (Jul 31, 2017 10:54:26 AM)

  1. [IPSCCP] Guard a user of getInitializer with hasDefinitiveInitializer

    We are not allowed to reason about an initializer value without first
    consulting hasDefinitiveInitializer. — majnemer / detail
  2. [AVX-512] Remove patterns that select vmovdqu8/16 for unmasked loads. Prefer vmovdqa64/vmovdqu64 instead.

    These were taking priority over the aligned load instructions since there is no vmovda8/16. I don't think there is really a difference between aligned and unaligned on newer cpus so I don't think it matters which instructions we use.

    But with this change we reduce the size of the isel table a little and we allow the aligned information to pass through to the evex->vec pass and produce the same output has avx/avx2 in some cases.

    I also generally dislike patterns rooted in a bitcast which these were.

    Differential Revision: https://reviews.llvm.org/D35977 — ctopper / detail
  3. [clangd] Allow to get vfs::FileSystem used inside codeComplete.

    Summary: This is useful for managing lifetime of VFS-based caches.

    Reviewers: bkramer, krasimir

    Reviewed By: bkramer

    Subscribers: klimek, cfe-commits

    Differential Revision: https://reviews.llvm.org/D36095 — ibiryukov / detail
  4. Strip trailing whitespace. NFCI. — rksimon / detail
  5. Fix typo in comment. — rksimon / detail
  6. [GISel]: Support Widening G_ICMP's destination operand.

    Updated AArch64 to widen destination to s32.
    https://reviews.llvm.org/D35737

    Reviewed by Tim — aditya_nandakumar / detail
  7. Do not recombine FMA when that is not needed.

    Summary: As per title. This creates useless recombines.

    Reviewers: jyknight, nemanjai, mkuper, spatel, RKSimon, zvi, bkramer

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D33848 — deadalnix / detail
  8. Exclude more unused functions from release build. — fhahn / detail
  9. [OPENMP] Change the name of outer non-debug function in debug mode, NFC. — abataev / detail
  10. Extend ifndef to printDebugLoc.

    GCC7 did not warn about that, but Clang does. — fhahn / detail
  11. Extend ifdefs to more unused helper functions.

    This fixes a buildbot failure with -Werror introduced by r309553 — fhahn / detail
  12. [OpenCL] Enable subgroup extension in tests

    This fixes the test, so that it can be run on different hosts that may have
    different OpenCL extensions enabled. — joey / detail
  13. [DebugInfo] Don't overwrite DWARFUnit fields if the CU DIE doesn't have them.

    DIEs are lazily deserialized so it's possible that the DWO CU is created
    before the DIE is parsed. DWO shares .debug_addr and .debug_ranges with the
    object file so overwriting the offset with 0 will make the CU unusable.

    No test case because I couldn't get clang to emit a non-zero range base. — d0k / detail
  14. Fix -Wshadow false positives with function-local classes.

    Summary:
    Fixes http://llvm.org/PR33947.

    https://godbolt.org/g/54XRMT

    void f(int a) {
      struct A {
        void g(int a) {}
        A() { int a; }
      };
    }

    3 : <source>:3:16: warning: declaration shadows a local variable [-Wshadow]
        void g(int a) {}
                   ^
    1 : <source>:1:12: note: previous declaration is here
    void f(int a) {
               ^
    4 : <source>:4:15: warning: declaration shadows a local variable [-Wshadow]
        A() { int a; }
                  ^
    1 : <source>:1:12: note: previous declaration is here
    void f(int a) {
               ^
    2 warnings generated.

    The local variable `a` of the function `f` can't be accessed from a method of
    the function-local class A, thus no shadowing occurs and no diagnostic is
    needed.

    Reviewers: rnk, rsmith, arphaman, Quuxplusone

    Reviewed By: rnk, Quuxplusone

    Subscribers: Quuxplusone, cfe-commits

    Differential Revision: https://reviews.llvm.org/D35941 — alexfh / detail
  15. [docker] Fix unmatched quote problem in here-document on older versions of bash

    Summary:
    When outputing usage, emit here-document directly instead of
    saving in a variable first -- avoids problem with bash 3.2.57 where an
    unmatched ' in the here-document results in the following error:

    ./build_docker_image.sh: line 135: unexpected EOF while looking for matching `''

    bash --version
    GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin16)

    Differential Revision: https://reviews.llvm.org/D36064 — dhinton / detail
  16. [OpenCL] Add extension Sema check for subgroup builtins

    Check the subgroup extension is enabled, before doing other Sema checks. — joey / detail
  17. [SLP] Initial rework for min/max horizontal reduction vectorization, NFC.

    Summary: All getReductionCost() functions are renamed to getArithmeticReductionCost() + added basic infrastructure to handle non-binary reduction operations.

    Reviewers: spatel, mzolotukhin, Ayal, mkuper, gilr, hfinkel

    Subscribers: RKSimon, llvm-commits

    Differential Revision: https://reviews.llvm.org/D29402 — abataev / detail

#216 (Jul 31, 2017 7:29:57 AM)

  1. [X86] Extending a test cases for LEA factorization.

    Submitted on the behalf of Jatin Bhateja

    Differential Revision: https://reviews.llvm.org/D36048 — rksimon / detail
  2. Fix release notes indentation from r309562

    The additions in r309562 triggered a docs buildbot failure. — arphaman / detail
  3. [Cost] Rename getReductionCost() to getArithmeticReductionCost(), NFC. — abataev / detail
  4. Document '-Wpragma-pack' in the release notes — arphaman / detail
  5. [SelectionDAG][mips] Fix PR33883

    PR33883 shows that calls to intrinsic functions should not have their vector
    arguments or returns subject to ABI changes required by the target.

    This resolves PR33883.

    Thanks to Alex Crichton for reporting the issue!

    Reviewers: zoran.jovanovic, atanasyan

    Differential Revision: https://reviews.llvm.org/D35765 — sdardis / detail
  6. -Wpragma-pack: add an additional note and fixit when warning
    about unterminated push directives that are followed by a reset
    ('#pragma pack()')

    This has been suggested by Hans Wennborg. — arphaman / detail
  7. [LV] Avoid redundant operations manipulating masks

    The Loop Vectorizer generates redundant operations when manipulating masks:
    AND with true, OR with false, compare equal to true. Instead of relying on
    a subsequent pass to clean them up, this patch avoids generating them.

    Use null (no-mask) to represent all-one full masks, instead of a constant
    all-one vector, following the convention of masked gathers and scatters.

    Preparing for a follow-up VPlan patch in which these mask manipulating
    operations are modeled using recipes.

    Differential Revision: https://reviews.llvm.org/D35725 — ayalz / detail
  8. [CMake][Modules] libclang: Ignore _CINDEX_LIB_ and CLANG_TOOL_EXTRA_BUILD for -fmodules.

    CLANG_TOOL_EXTRA_BUILD doesn't affect headers.

    _CINDEX_LIB_ is defined when the target is SHARED.
    On Win32, it affects clang-c/Platform.h and it shouldn't be ignored.

    This is part of https://reviews.llvm.org/D35559 — chapuni / detail
  9. [llvm-dlltool] Write correct weak externals

    Previously, the created object files for the import library were broken.
    Write the symbol table before the string table. Simplify the code by
    using a separate variable Prefix instead of duplicating a few lines.

    Also update the coff-weak-exports to actually check that the generated
    weak symbols can be found as intended.

    Differential Revision: https://reviews.llvm.org/D36065 — mstorsjo / detail
  10. Guard print() functions only used by dump() functions.

    Summary:
    Since  r293359, most dump() function are only defined when
    `!defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)` holds. print() functions
    only used by dump() functions are now unused in release builds,
    generating lots of warnings. This patch only defines some print()
    functions if they are used.

    Reviewers: MatzeB

    Reviewed By: MatzeB

    Subscribers: arsenm, mzolotukhin, nhaehnle, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35949 — fhahn / detail
  11. [Modules] llvm-config: Exclude CMAKE_CFG_INTDIR. It isn't used in headers.

    This is part of https://reviews.llvm.org/D35559 — chapuni / detail

#215 (Jul 31, 2017 3:06:37 AM)

  1. [clangd] Add ':' to completion trigger characters.

    Summary:
    Without it we don't get completion requests from VSCode after
    nested name qualifiers (e.g. after 'std::').

    Reviewers: krasimir, bkramer

    Reviewed By: krasimir

    Subscribers: klimek, cfe-commits

    Differential Revision: https://reviews.llvm.org/D35986 — ibiryukov / detail
  2. [Support/GlobPattern] - Do not crash when pattern has characters with int value < 0.

    Found it during work on LLD, it would crash on following
    linker script:

    SECTIONS { .foo : { *("*®") } }
    That happens because ® has int value -82. And chars are used as
    array index in code, and are signed by default.

    Differential revision: https://reviews.llvm.org/D35891 — grimar / detail
  3. Added `applyAtomicChanges` function.

    This re-commits r298913.
    o See thread http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20170327/189084.html
    o Tested with -DLLVM_ENABLE_LOCAL_SUBMODULE_VISIBILITY=0.

    Summary: ... which applies a set of `AtomicChange`s on code.

    Reviewers: klimek, djasper

    Reviewed By: djasper

    Subscribers: arphaman, mgorny, chapuni, cfe-commits

    Differential Revision: https://reviews.llvm.org/D30777 — ioeric / detail
  4. [LoopInterchange] Do not interchange loops with function calls.

    Summary:
    Without any information about the called function, we cannot be sure
    that it is safe to interchange loops which contain function calls. For
    example there could be dependences that prevent interchanging between
    accesses in the called function and the loops. Even functions without any
    parameters could cause problems, as they could access memory using
    global pointers.

    For now, I think it is only safe to interchange loops with calls marked
    as readnone.

    With this patch, the LLVM test suite passes with `-O3 -mllvm
    -enable-loopinterchange` and LoopInterchangeProfitability::isProfitable
    returning true for all loops. check-llvm and check-clang also pass when
    bootstrapped in a similar fashion, although only 3 loops got
    interchanged.

    Reviewers: karthikthecool, blitz.opensource, hfinkel, mcrosier, mkuper

    Reviewed By: mcrosier

    Subscribers: mzolotukhin, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35489 — fhahn / detail
  5. [X86][AVX512] Add masked MOVS[S|D] patterns

    Added patterns to recognize AND 1 on the mask of a scalar masked
    move is not needed since only the lower bit is relevant for the
    instruction.

    Differential Revision:
    https://reviews.llvm.org/D35897 — guyblank / detail
  6. [coroutines] Evaluate the operand of void `co_return` expressions.

    Summary:
    Previously Clang incorrectly ignored the expression of a void `co_return`. This patch addresses that bug.

    I'm not quite sure if I got the code-gen right, but this patch is at least a start.

    Reviewers: rsmith, GorNishanov

    Reviewed By: rsmith, GorNishanov

    Subscribers: cfe-commits

    Differential Revision: https://reviews.llvm.org/D36070 — ericwf / detail
  7. [SLP]: Add test to resurrect the jumbled load patch. This test has multiple uses
    of memory loads by different user

    Change-Id: I40b5ba8b810265440f3e55efca77c4b41ca98fa4 — ashahid / detail

#214 (Jul 31, 2017 12:30:22 AM)

  1. [XRay][compiler-rt] Fix test to not be too strict with output order.

    Follow-up to D35789. — dberris / detail
  2. [asan] Move shadow memory setup into its own file

    Submitted on behalf of Roland McGrath.

    Reviewers: vitalybuka, alekseyshl, kcc

    Subscribers: kubamracek, mgorny, phosek, filcab, llvm-commits

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D36037 — Vitaly Buka / detail
  3. [PowerPC] Change method names; NFC

    Changed method names based on the discussion in https://reviews.llvm.org/D34986:
    getInt64 -> selectI64Imm,
    getInt64Count -> selectI64ImmInstrCount. — inouehrs / detail
  4. [XRay][compiler-rt] Fix typo for REQUIRES.

    Follow-up on D35789. — dberris / detail
  5. [sanitizer_common] Add SANITIZER_FUCHSIA

    Summary: More changes to follow will add the Fuchsia port.

    Submitted on behalf of Roland McGrath.

    Reviewers: vitalybuka, alekseyshl, kcc

    Reviewed By: vitalybuka

    Subscribers: kubamracek, llvm-commits, phosek, filcab

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D36027 — Vitaly Buka / detail
  6. [XRay][compiler-rt] Require build-in-tree and x86_64-linux.

    The quiet-start.cc test currently fails for arm (and potentially other
    platforms). This change limits it to x86_64-linux.

    Follow-up to D35789. — dberris / detail
  7. [builtins] Fix mingw-w64 cross compilation

    Lowercase the Windows.h include in enable_execute_stack.c, just as in
    emutls.c in SVN r302340.

    Differential Revision: https://reviews.llvm.org/D36066 — mstorsjo / detail
  8. [sanitizer_common] Rename SI_NOT_WINDOWS to SI_POSIX

    Summary:
    New systems might be neither Windows nor POSIX.  The SI_NOT_WINDOWS
    macro in sanitizer_platform_interceptors.h was already effectively
    the same as SI_POSIX, so just use SI_POSIX instead.

    Submitted on behalf of Roland McGrath.

    Reviewers: vitalybuka, alekseyshl, kcc

    Reviewed By: vitalybuka

    Subscribers: phosek, filcab, llvm-commits, kubamracek

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D36038 — Vitaly Buka / detail
  9. [X86] Add pattern to use bzhi for 64-bit 'and' with a mask when there is a load involved.

    We already had a pattern without load, but with a load we were falling back to a regular 'and' due to pattern complexity priority. — ctopper / detail
  10. [XRay][compiler-rt] Do not print the warning when the binary is not XRay instrumented.

    Summary:
    Currently when the XRay runtime is linked into a binary that doesn't
    have the instrumentation map, we print a warning unconditionally. This
    change attempts to make this behaviour more quiet.

    Reviewers: kpw, pelikan

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D35789 — dberris / detail

#212 (Jul 30, 2017 6:11:07 PM)

  1. gold/CMakeLists.txt: Prune (-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64).

    They are handled in HandleLLVMOptions.cmake for -m32.
    They are not required for -m64. — chapuni / detail
  2. Prune trailing linefeed at eof. — chapuni / detail
  3. [Sema] Fix operator lookup to consider local extern declarations.

    Summary:
    Previously Clang was not considering operator declarations that occur at function scope. This is incorrect according to [over.match.oper]p3
    > The set of non-member candidates is the result of the unqualified lookup of operator@ in the context of the expression according to the usual rules for name lookup in unqualified function calls.

    This patch changes operator name lookup to consider block scope declarations.
    This patch fixes PR27027.




    Reviewers: rsmith

    Reviewed By: rsmith

    Subscribers: cfe-commits

    Differential Revision: https://reviews.llvm.org/D35297 — ericwf / detail
  4. DebugInfo: Fix r309526, ensure resetting base address selection entries are used

    Missed the resetting base address selections when going from a base
    address version to zero base address for non-base-addressed entries. — dblaikie / detail
  5. Mark LWG 2942 as complete — ericwf / detail
  6. Mark LWG 2961 as complete — ericwf / detail
  7. DebugInfo: Use base address selection entries in debug_ranges to reduce relocations

    (from comments in the test)
    Group ranges in a range list that apply to the same section and use a base
    address selection entry to reduce the number of relocations to one reloc per
    section per range list. DWARF5 debug_rnglist will be more efficient than this
    in terms of relocations, but it's still better than one reloc per entry in a
    range list.

    This is an object/executable size tradeoff - shrinking objects, but growing
    the linked executable. In one large binary tested, total object size (not just
    debug info) shrank by 16%, entirely relocation entries. Linked executable
    grew by 4%. This was with compressed debug info in the objects, uncompressed
    in the linked executable. Without compression in the objects, the win would be
    smaller (the growth of debug_ranges itself would be more significant). — dblaikie / detail
  8. test: add an additional cfi_return_column test

    Ensure that we still coalesce identical CIEs across FDEs even with
    cfi_return_column alterations. — Saleem Abdulrasool / detail
  9. test: make the test clearer (NFC)

    Use `llvm-objdump -dwarf=frames` to dump the .eh_frame to validate the
    output textually rather than compare the binary output.  This makes it
    easier to see what is being checked.  NFC. — Saleem Abdulrasool / detail
  10. Also pass -pie back to the linker when linking on OpenBSD. — brad / detail
  11. Fix a typo. — brad / detail
  12. NFC: spell correction.

    On behalf of jbhateja

    Differential Revision: https://reviews.llvm.org/D35885 — lsaba / detail

#211 (Jul 30, 2017 11:26:58 AM)

  1. Fix typo in comment — grosser / detail
  2. llvm-symbolizer/print_context.c test: Make debug info path independent — dblaikie / detail
  3. llvm-symbolizer: Make test portable using an explicit object file rather than the host compiler — dblaikie / detail
  4. Make test robust to changes in prefix/avoid hardcoded line numbers — dblaikie / detail

#210 (Jul 30, 2017 9:00:52 AM)

  1. Revert "[AVR] Mark a failing symbolizer test as XFAIL"

    This reverts commit 83a0e876349adb646ba858eb177b22b0b4bfc59a. — dylanmckay / detail
  2. DebugInfo: Fix for CU index usage in 309507

    Not sure quite how I failed so clearly to test this, but anyway. — dblaikie / detail
  3. [AVR] Mark a failing symbolizer test as XFAIL — dylanmckay / detail

#208 (Jul 30, 2017 6:02:28 AM)

  1. Expanding the test case for vf8 for stride 4 interleaved. — mzuckerm / detail
  2. [x86][inline-asm][ms-compat] legalize the use of "jc/jz short <op>"

    MS ignores the keyword "short" when used after a jc/jz instruction, LLVM ought to do the same.
    llvm: D35892

    Differential Revision: https://reviews.llvm.org/D35893 — coby / detail
  3. [x86][inline-asm][ms-compat] legalize the use of "jc/jz short <op>"

    MS ignores the keyword "short" when used after a jc/jz instruction, LLVM ought to do the same.
    Test: D35893

    Differential Revision: https://reviews.llvm.org/D35892 — coby / detail

#207 (Jul 30, 2017 4:03:57 AM)

  1. [x86][inline-asm]Allow a pack of Control Regs to be properly picked

    Allows the incorporation of legit (x86) Control Regs within inline asm stataements

    Differential Revision: https://reviews.llvm.org/D35903 — coby / detail
  2. DebugInfo: Use DWP cu_index to speed up symbolizing (as intended)

    I was a bit lazy when I first implemented this & skipped the index
    lookup - obviously for large files this becomes pretty crucial, so here
    we go, do the index lookup. Speeds up large DWP symbolizing by... lots.
    (20m -> 20s, actually, maybe more in a release build (that was a release
    build without index lookup, compared to a debug/non-release build with
    the index usage)) — dblaikie / detail
  3. DebugInfo: Group member variable along with the rest

    Committed in r309498 I didn't spot where the rest of the private members
    were in DWARFContext at the time - group them up again. — dblaikie / detail

#206 (Jul 30, 2017 1:02:18 AM)

  1. [clang-reorder-fields] Emit warning when reordering breaks member init list dependencies

    This diff adds a warning emitted by clang-reorder-fields
    when reordering breaks dependencies in the initializer list.

    Patch by Sam Conrad!

    Differential revision: https://reviews.llvm.org/D35972 — alexshap / detail
  2. CodeGenModule.cpp: [PR33810][Modules] Remove an assertion that confirms MangledDeclNames[CanonicalGD] might be still empty.

    FIXME: It is accepted that MangledDeclNames[CanonicalGD] is overwritten here? — chapuni / detail
  3. PR33902: Invalidate line number cache when adding more text to existing buffer.

    This led to crashes as the line number cache would report a bogus line number
    for a line of code, and we'd try to find a nonexistent column within the line
    when printing diagnostics. — rsmith / detail
  4. [X86] Add addsub intrinsics to the intrinsic lowering table so we have a single set of isel patterns. — ctopper / detail
  5. CodeGenModule.cpp: [PR33810][Modules] Avoid reusing FoundStr to try to fix crash.

    MangledDeclNames might grow up and be reallocated when it were reused by reentering CodeGenModule::getMangledName(). — chapuni / detail

#205 (Jul 29, 2017 10:01:24 PM)

  1. Refactor the build{Module|Function}SimplificationPipeline to expose optimization phase.

    Summary: This is in preparation of https://reviews.llvm.org/D36052

    Reviewers: chandlerc, davidxl, tejohnson

    Reviewed By: chandlerc

    Subscribers: sanjoy, llvm-commits

    Differential Revision: https://reviews.llvm.org/D36053 — dehao / detail
  2. CodeGenModule.cpp: [PR33810][Modules] Make sure actual memory corruption before random crash with -fmodules. — chapuni / detail

#204 (Jul 29, 2017 7:27:59 PM)

  1. DebugInfo: Provide option for explicitly specifying the name of the DWP file

    If you've archived the DWP file somewhere it's probably useful to be
    able to just tell llvm-symbolizer where it is when you're symbolizing
    stack traces from the binary.

    This only provides a mechanism for specifying a single DWP file, good if
    you're symbolizing a program with a single DWP file, but it's likely if
    the program is dynamically linked that you might have a DWP for each
    dynamic library - in which case this feature won't help (at least as
    it's surfaced in llvm-symbolizer for now) - in theory it could be
    extended to specify a collection of DWP files that could all be
    consulted for split CU hash resolution. — dblaikie / detail

#203 (Jul 29, 2017 5:58:43 PM)

  1. Migrate PGOMemOptSizeOpt to use new OptimizationRemarkEmitter Pass

    Summary:
    Fixes PR33790.

    This patch still needs a yaml-style test, which I shall write tomorrow

    Reviewers: anemet

    Reviewed By: anemet

    Subscribers: anemet, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35981 — lenary / detail

#202 (Jul 29, 2017 2:56:15 PM)

  1. Improve readability of CXX method overrides list

    Summary:
    Separate CXX method overrides list entries with commas.

    Reviewers: lhames

    Reviewed By: lhames

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D35800 — lll / detail
  2. [AArch64] Tie source and destination operands for AESMC/AESIMC.

    Summary:
    Most CPUs implementing AES fusion require instruction pairs of the form
        AESE Vn, _
        AESMC Vn, Vn
    and
        AESD Vn, _
        AESIMC Vn, Vn

    The constraint is added to AES(I)MC instructions which use the result of
    an AES(E|D) instruction by using AES(I)MCTrr pseudo instructions, which
    constraint source and destination registers to be the same.

    A nice side effect of this change is that now all possible pairs are
    scheduled back-to-back on the exynos-m1 for the misched-fusion-aes.ll
    test case.

    I had to update aes_load_store. The version I added initially was very
    reduced and with the new constraint, AESE/AESMC could not be scheduled
    back-to-back. I updated the test to be more realistic and still expose
    the same scheduling problem as the initial test case.

    Reviewers: t.p.northover, rengolin, evandro, kristof.beyls, silviu.baranga

    Reviewed By: t.p.northover, evandro

    Subscribers: aemerson, javed.absar, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35299 — fhahn / detail
  3. [AArch64] Use 8 bytes as preferred function alignment on Cortex-A53.

    Summary:
    This change gives a 0.25% speedup on execution time, a 0.82% improvement
    in benchmark scores and a 0.20% increase in binary size on a Cortex-A53.
    These numbers are the geomean results on a wide range of benchmarks from
    the test-suite and a range of proprietary suites.

    Reviewers: t.p.northover, aadg, silviu.baranga, mcrosier, rengolin

    Reviewed By: rengolin

    Subscribers: grimar, davide, aemerson, rengolin, javed.absar, kristof.beyls, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35568 — fhahn / detail
  4. MC: simplify internal function call parameter

    Rather than passing along most of the parameters, pass a reference to
    the MCDWARFrameInfo instead.  This makes it easier to pass additional
    information about the frame to the checks.  We need to keep the extra
    constructor for the Key around to allow the construction of the null and
    tombstone keys.  NFC. — Saleem Abdulrasool / detail
  5. MC: account for the return column in the CIE key

    If the return column is different, we cannot coalesce the CIE across the
    FDEs.  Add that to the key calculation.  This ensures that we emit a
    separate CIE. — Saleem Abdulrasool / detail

#201 (Jul 29, 2017 11:15:01 AM)

  1. Fix the env PATH var for the avx512-sde bot — eladcohen / detail
  2. [X86][AVX] Ensure vector non-temporal load/store intrinsics force pointer alignment (PR33830)

    Clang specifies a max type alignment of 16 bytes on darwin targets (annoyingly in the driver not via cc1), meaning that the builtin nontemporal stores don't correctly align the loads/stores to 32 or 64 bytes when required, resulting in lowering to temporal unaligned loads/stores.

    This patch casts the vectors to explicitly aligned types prior to the load/store to ensure that the require alignment is respected.

    Differential Revision: https://reviews.llvm.org/D35996 — rksimon / detail

#200 (Jul 29, 2017 8:10:55 AM)

  1. Fix test failure without X86 backend

    move test/Transforms/SimplifyCFG/disable-lookup-table.ll into test/Transforms/SimplifyCFG/X86/disable-lookup-table.ll to avoid test failure when X86 backend is not enabled — inouehrs / detail
  2. [SelectionDAG][X86] CombineBT - more aggressively determine demanded bits

    This patch is in 2 parts:

    1 - replace combineBT's use of SimplifyDemandedBits (hasOneUse only) with SelectionDAG::GetDemandedBits to more aggressively determine the lower bits used by BT.

    2 - update SelectionDAG::GetDemandedBits to support ANY_EXTEND - if the demanded bits are only in the non-extended portion, then peek through and demand from the source value and then ANY_EXTEND that if we found a match.

    Differential Revision: https://reviews.llvm.org/D35896 — rksimon / detail

#198 (Jul 29, 2017 4:04:19 AM)

  1. [tests] Do not emity binary bitcode to stdout in RegionInfo tests — grosser / detail
  2. Fix incorrect assertion condition. — vleschuk / detail
  3. [OCaml] Pass -D/-UNDEBUG through to ocamlc

    Detect [/-][DU]NDEBUG in CMAKE_C_FLAGS* and pass them through to ocamlc.
    This is necessary because their value might affect visibility of dump
    functions in LLVM and ocamlc uses its own compiler and flags by default.

    Differential Revision: https://reviews.llvm.org/D35898 — mgorny / detail
  4. Update the test to make windows bot pass. — dehao / detail
  5. [OCaml] Install dynamic libraries in 'stubdirs' directory

    Install the OCaml dynamic libraries in the 'stubdirs' directory rather
    than the llvm subdirectory in order to fix running executables created
    by ocamlc. Otherwise, the executables fail to run being unable to locate
    the libraries (unless the LLVM directory is explicitly added to
    LD_LIBRARY_PATH).

    The staging directories are not altered since they work for our
    development setup anyway, and installing into two directories would
    unnecessarily make the code more complex.

    Differential Revision: https://reviews.llvm.org/D35995 — mgorny / detail

#197 (Jul 28, 2017 11:08:25 PM)

  1. [SCEV] Change an early exit to an assert; NFC — sanjoy / detail
  2. update the test file that was omitted in r309478. — dehao / detail
  3. Refine the PGOOpt and SamplePGOSupport handling.

    Summary:
    Now that SamplePGOSupport is part of PGOOpt, there are several places that need tweaking:
    1. AddDiscriminator pass should *not* be invoked at ThinLTOBackend (as it's already invoked in the PreLink phase)
    2. addPGOInstrPasses should only be invoked when either ProfileGenFile or ProfileUseFile is non-empty.
    3. SampleProfileLoaderPass should only be invoked when SampleProfileFile is non-empty.
    4. PGOIndirectCallPromotion should only be invoked in ProfileUse phase, or in ThinLTOBackend of SamplePGO.

    Reviewers: chandlerc, tejohnson, davidxl

    Reviewed By: chandlerc

    Subscribers: sanjoy, mehdi_amini, eraman, llvm-commits

    Differential Revision: https://reviews.llvm.org/D36040 — dehao / detail
  4. AMDGPU: Remove deadcode from AMDGPUInstPrinter

    Reviewers: arsenm

    Reviewed By: arsenm

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

    Differential Revision: https://reviews.llvm.org/D36034 — tstellar / detail
  5. AMDGPU: Move INDIRECT_BASE_ADDR definition out of common files

    Summary: This is only used by R600.

    Reviewers: arsenm

    Reviewed By: arsenm

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

    Differential Revision: https://reviews.llvm.org/D35926 — tstellar / detail
  6. [MachineOutliner] NFC: Change IsTailCall to a call class + frame class

    This commit

    - Removes IsTailCall and replaces it with a target-defined unsigned
    - Refactors getOutliningCallOverhead and getOutliningFrameOverhead so that they don't use IsTailCall
    - Adds a call class + frame class classification to OutlinedFunction and Candidate respectively

    This accomplishes a couple things.

    Firstly, we don't need the notion of *tail call* in the general outlining algorithm.

    Secondly, we now can have different "outlining classes" for each candidate within a set of candidates.
    This will make it easy to add new ways to outline sequences for certain targets and dynamically choose
    an appropriate cost model for a sequence depending on the context that that sequence lives in.

    Ultimately, this should get us closer to being able to do something like, say avoid saving the link
    register when outlining AArch64 instructions. — paquette / detail
  7. [libc++] Hoist extern template above first use

    This function template is referenced inside class basic_string as a
    friend function. The extern template declaration needs to be above that
    friend declaration to actually take effect.

    This is important because this function was marked as exported in
    r307966, so without the extern template taking effect, it can leak into
    other DSOs as a visible symbol. — smeenai / detail
  8. lit::shtest-format.py: Make write-bad-encoding.py py3-aware.

      Traceback (most recent call last):
        File "llvm/utils/lit/tests/Inputs/shtest-format/external_shell/write-bad-encoding.py", line 5, in <module>
          sys.stdout.write(b"a line with bad encoding: \xc2.")

    sys.stdout.write doesn't accept bytes but sys.stdout.buffer.write accepts. — chapuni / detail

#196 (Jul 28, 2017 7:06:01 PM)

  1. AMDGPU: Make areMemAccessesTriviallyDisjoint more aware of segment flat

    Checking the encoding is insufficient since now there can
    be global or scratch instructions. — arsenm / detail
  2. AMDGPU: Teach isLegalAddressingMode about global_* instructions

    Also refine the flat check to respect flat-for-global feature,
    and constant fallback should check global handling, not
    specifically MUBUF. — arsenm / detail
  3. AMDGPU: Start selecting global instructions — arsenm / detail
  4. [Hexagon] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). — eugenezelenko / detail
  5. [libcxx] [test] Change comments to say C++ instead of c++. NFC.

    This makes them consistent (many comments already used uppercase).

    The special REQUIRES, UNSUPPORTED, and XFAIL comments are excluded from this change. — stl_msft / detail
  6. [libcxx] [test] The entire file futures.shared_future/wait_until.pass.cpp was indented by 1 space. NFC. — stl_msft / detail
  7. [libcxx] [test] In func.wrap.func.con/alloc_F.pass.cpp, fix REQUIRES whitespace. NFC. — stl_msft / detail
  8. [libcxx] [test] Make files consistently end with newlines, NFC. — stl_msft / detail
  9. [libcxx] [test] Untabify, NFC. — stl_msft / detail
  10. [libcxx] [test] Strip trailing whitespace, NFC. — stl_msft / detail
  11. [llvm] Update MachOObjectFile::exports interface

    This diff removes the second argument of the method MachOObjectFile::exports.
    In all in-tree uses this argument is equal to "this" and
    without this argument the interface seems to be cleaner.

    Test plan: make check-all — alexshap / detail
  12. [ubsan] Diagnose invalid uses of builtins (compiler-rt)

    Differential Revision: https://reviews.llvm.org/D34591 — Vedant Kumar / detail
  13. [test] FileCheck-ify a test to avoid a spurious failure, NFC

    The path to one of my source trees contains 'builtin' as a substring, so
    this test failed. Fix it with FileCheck. — Vedant Kumar / detail
  14. [ubsan] Diagnose invalid uses of builtins (clang)

    On some targets, passing zero to the clz() or ctz() builtins has undefined
    behavior. I ran into this issue while debugging UB in __hash_table from libcxx:
    the bug I was seeing manifested itself differently under -O0 vs -Os, due to a
    UB call to clz() (see: libcxx/r304617).

    This patch introduces a check which can detect UB calls to builtins.

    llvm.org/PR26979

    Differential Revision: https://reviews.llvm.org/D34590 — Vedant Kumar / detail
  15. Fix update_llc_test_checks.py ARM parsing

    When I tried running the script, the ARM regex parser could not parse
    my code. It failed because the .Lfunc_end line has a comment at the
    end of it, so this commit removes the newline at the end of the regex.

    Patch by Joel Galenson!

    Differential Revision: https://reviews.llvm.org/D35641 — efriedma / detail
  16. [LTO] llvm-lto2: Add option to load sample profile

    Summary:
    This exposes LTO's Conf.SampleProfile as a command line option
    (-lto-sample-profile-file) for testing via the llvm-lto2 utility.

    Reviewers: pcc, danielcdh

    Subscribers: mehdi_amini, inglorion, llvm-commits

    Differential Revision: https://reviews.llvm.org/D36030 — tobiasvk / detail
  17. Remove the unused offset field from LiveDebugValues (NFC)

    Followup to r309426.
    rdar://problem/33580047 — Adrian Prantl / detail
  18. Clean up shard logs on sanitizer-android bot.

    Differential revision: https://reviews.llvm.org/D36015 — eugenis / detail
  19. Remove the unused offset field from LiveDebugVariables (NFC)

    Followup to r309426.
    rdar://problem/33580047 — Adrian Prantl / detail
  20. Remove the unused offset from DBG_VALUE (NFC)

    Followup to r309426.
    rdar://problem/33580047 — Adrian Prantl / detail
  21. Remove the unused DBG_VALUE offset parameter from GlobalISel (NFC)

    Followup to r309426.
    rdar://problem/33580047 — Adrian Prantl / detail
  22. Update the Go bindings for r309426 (remove offset from llvm.dbg.value) — Adrian Prantl / detail
  23. Added tests for i8 interleaved-load-pattern of stride=4, VF=(8, 16, 32). — faaleen / detail
  24. Remove the unused DBG_VALUE offset parameter from RegAllocFast (NFC)

    Followup to r309426.
    rdar://problem/33580047 — Adrian Prantl / detail
  25. Add documentation for the attribute "no-jump-tables" — sgundapa / detail
  26. [SimplifyCFG] Make the no-jump-tables attribute also disable switch lookup tables

    Differential Revision: https://reviews.llvm.org/D35579 — sgundapa / detail
  27. [libFuzzer] improve support for inline-8bit-counters (make it more correct and faster) — kcc / detail
  28. [Hexagon] Formatting changes, NFC — kparzysz / detail
  29. [Inliner] Do not apply any bonus for cold callsites.

    Summary:
    Inlining threshold is increased by application of bonuses when the
    callee has a single reachable basic block or is rich in vector
    instructions. Similarly, inlining cost is reduced by applying a large
    bonus when the last call to a static function is considered for
    inlining. This patch disables the application of these bonuses when the
    callsite or the callee is cold. The intention here is to prevent a large
    cold callsite from being inlined to a non-cold caller that could prevent
    the caller from being inlined. This is especially important when the
    cold callsite is a last call to a static since the associated bonus is
    very high.

    Reviewers: chandlerc, davidxl

    Subscribers: danielcdh, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35823 — eraman / detail
  30. Try to fix asan test on sanitizer-windows — rnk / detail
  31. Remove the unused dbg.value offset from SelectionDAG (NFC)

    Followup to r309426.
    rdar://problem/33580047 — Adrian Prantl / detail
  32. [lit] Use a %{python} substitution to avoid relying on python being on PATH — rnk / detail
  33. [lit] Remove stale test inputs before running check-lit

    This should fix googletest-format test failures on the clang modules
    buildbots, which have a stale copy of the OneTest script in the build
    directory. — rnk / detail
  34. Reword sentence in LangRef — Adrian Prantl / detail

#195 (Jul 28, 2017 1:40:01 PM)

  1. [compiler-rt] Add missing quotation marks to msan_compile invocation — kparzysz / detail
  2. Adopt to LLVM API change (llvm.dbg.value no longer has an offset) — Adrian Prantl / detail
  3. Remove the obsolete offset parameter from @llvm.dbg.value

    There is no situation where this rarely-used argument cannot be
    substituted with a DIExpression and removing it allows us to simplify
    the DWARF backend. Note that this patch does not yet remove any of
    the newly dead code.

    rdar://problem/33580047
    Differential Revision: https://reviews.llvm.org/D35951 — Adrian Prantl / detail
  4. [SLP] Allow vectorization of the instruction from the same basic blocks only, NFC.

    Summary:
    After some changes in SLP vectorizer we missed some additional checks to
    limit the instructions for vectorization. We should not perform analysis
    of the instructions if the parent of instruction is not the same as the
    parent of the first instruction in the tree or it was analyzed already.

    Subscribers: mzolotukhin

    Differential Revision: https://reviews.llvm.org/D34881 — abataev / detail
  5. Add end-to-end tests for overflows of byval arguments.

    Summary:
    Included is one test for passing structs by value and one test for
    passing C++
    objects by value.

    Reviewers: eugenis, vitalybuka

    Reviewed By: eugenis

    Subscribers: srhines, kubamracek, llvm-commits

    Differential Revision: https://reviews.llvm.org/D34827 — morehouse / detail
  6. Add clear_cache implementation for ppc64. Fix buffer to meet ppc64 alignment. — saugustine / detail
  7. Fix conditional tail call branch folding when both edges are the same

    The conditional tail call logic did the wrong thing when both
    destinations of a conditional branch were the same:

    BB#1: derived from LLVM BB %entry
        Live Ins: %EFLAGS
        Predecessors according to CFG: BB#0
            JE_1 <BB#5>, %EFLAGS<imp-use,kill>
            JMP_1 <BB#5>

    BB#5: derived from LLVM BB %sw.epilog
        Predecessors according to CFG: BB#1
            TCRETURNdi64 <ga:@mergeable_conditional_tailcall>, 0, ...

    We would fold the JE_1 to a TCRETURNdi64cc, and then remove our BB#5
    successor. Then BB#5 would be deleted as it had no predecessors, leaving
    a dangling "JMP_1 <BB#5>" reference behind to cause assertions later.

    This patch checks that both conditional branch destinations are
    different before doing the transform. The standard branch folding logic
    is able to remove both the JMP_1 and the JE_1, and for my test case we
    end up forming a better conditional tail call later.

    Fixes PR33980 — rnk / detail
  8. Revert r308677.

    Incorrect directories were created by the patch. — morehouse / detail
  9. AMDGPU: Look through a bitcast user of an out argument

    This allows handling of a lot more of the interesting
    cases in Blender. Most of the large functions unlikely
    to be inlined have this pattern.

    This is a special case for what clang emits for OpenCL 3
    element vectors. Annoyingly, these are emitted as
    <3 x elt>* pointers, but accessed as <4 x elt>* operations.
    This also needs to handle cases where a struct containing
    a single vector is used. — arsenm / detail
  10. [Value Tracking] Refactor icmp comparison logic into helper. NFC. — mcrosier / detail
  11. AMDGPU: Add pass to replace out arguments

    It is better to return arguments directly in registers
    if we are making a call rather than introducing expensive
    stack usage. In one of sample compile from one of
    Blender's many kernel variants, this fires on about
    ~20 different functions. Future improvements may be to
    recognize simple cases where the pointer is indexing a small
    array. This also fails when the store to the out argument
    is in a separate block from the return, which happens in
    a few of the Blender functions. This should also probably
    be using MemorySSA which might help with that.

    I'm not sure this is correct as a FunctionPass, but
    MemoryDependenceAnalysis seems to not work with
    a ModulePass.

    I'm also not sure where it should run.I think it should
    run  before DeadArgumentElimination, so maybe either
    EP_CGSCCOptimizerLate or EP_ScalarOptimizerLate. — arsenm / detail
  12. [LVI] Constant-propagate a zero extension of the switch condition value through case edges

    Summary:
    LazyValueInfo currently computes the constant value of the switch condition through case edges, which allows the constant value to be propagated through the case edges.

    But we have seen a case where a zero-extended value of the switch condition is used past case edges for which the constant propagation doesn't occur.

    This patch adds a small logic to handle such a case in getEdgeValueLocal().

    This is motivated by the Python 2.7 eval loop in PyEval_EvalFrameEx() where the lack of the constant propagation causes longer live ranges and more spill code than necessary.

    With this patch, we see that the code size of PyEval_EvalFrameEx() decreases by ~5.4% and a performance test improves by ~4.6%.




    Reviewers: wmi, dberlin, sanjoy

    Reviewed By: sanjoy

    Subscribers: davide, davidxl, llvm-commits

    Differential Revision: https://reviews.llvm.org/D34822 — yamauchi / detail
  13. [CMake] Add Android toolchain CMake cache files.

    Summary: Thoes files are used to build Android toolchain. D32816 makes it possible to build runtimes for targets.

    Reviewers: beanz, srhines

    Reviewed By: srhines

    Subscribers: pirama, jroelofs, srhines, cfe-commits, mgorny

    Differential Revision: https://reviews.llvm.org/D33561 — aoli / detail
  14. [sanitizers test CMake] further refactor testing CMake for tsan

    TSan tests on Darwin first link all libraries into a static archive file.
    With this change, the linking is done once per all architecture,
    and previously the linking step was repeated per each architecture per
    each add_tsan_test call.
    Furthermore, the code is cleared up.

    Differential Revision: https://reviews.llvm.org/D35913 — George Karpenkov / detail
  15. [sanitizer tests CMake] Factor out CMake logic for compiling sanitizer tests

    Currently there's a large amount of CMake logic duplication for
    compiling sanitizer tests.
    If we add more sanitizers, the duplication will get even worse.

    This change factors out common compilation commands into a macro
    available to all sanitizers. — George Karpenkov / detail

#194 (Jul 28, 2017 10:34:03 AM)

  1. GlobalISel: map 128-bit values to an FPR by default.

    Eventually we may want to allow a pair of GPRs but absolutely nothing in the
    entire world is ready for that yet. — Tim Northover / detail
  2. [lit] Dump some FileCheck inputs to try to debug some failing tests — rnk / detail
  3. [lit] Fix shtest-format external_shell failures

    When using win32 cmd.exe, turn off command echoing at the beginning of
    the script (@echo off).

    Replace a bash shell script with a python script for the
    fail_with_bad_encoding test. — rnk / detail
  4. AMDGPU: Annotate implicitarg.ptr usage

    We need to pass something to functions for this to work.
    It isn't derivable just from the kernarg segment pointer
    because the implicit arguments are placed after the
    kernel arguments.

    Also fixes missing test for the intrinsic. — arsenm / detail
  5. [GVN] Recommit the patch "Add phi-translate support in scalarpre"

    Recommit after workaround the bug PR31652.

    Three bugs fixed in previous recommits: The first one is to use CurrentBlock
    instead of PREInstr's Parent as param of performScalarPREInsertion because
    the Parent of a clone instruction may be uninitialized. The second one is stop
    PRE when CurrentBlock to its predecessor is a backedge and an operand of CurInst
    is defined inside of CurrentBlock. The same value defined inside of loop in last
    iteration can not be regarded as available. The third one is an out-of-bound
    array access in a flipped if guard.

    Right now scalarpre doesn't have phi-translate support, so it will miss some
    simple pre opportunities. Like the following testcase, current scalarpre cannot
    recognize the last "a * b" is fully redundent because a and b used by the last
    "a * b" expr are both defined by phis.

    long a[100], b[100], g1, g2, g3;
    __attribute__((pure)) long goo();

    void foo(long a, long b, long c, long d) {

      g1 = a * b;
      if (__builtin_expect(g2 > 3, 0)) {
        a = c;
        b = d;
        g2 = a * b;
      }
      g3 = a * b;      // fully redundant.

    }

    The patch adds phi-translate support in scalarpre. This is only a temporary
    solution before the newpre based on newgvn is available.

    Differential Revision: https://reviews.llvm.org/D32252 — wmi / detail
  6. [CMake]  NFC. Add clang-tablegen-targets utility target

    By creating this target other projects that depend on clang-generated headers (like LLDB) will no longer be order-dependent on Clang being processed by CMake first.

    Also, by creating a dummy of this target in ClangConfig.cmake, projects that can build against out-of-tree clang can freely depend on the target without needing to have conditionals for if clang is in-tree or out-of-tree. — cbieneman / detail
  7. [CMake]  NFC. Add intrinsics_gen target to CMake Exports

    By creating a dummy of this target in LLVMConfig.cmake, projects that can build against out-of-tree LLVM can freely depend on the target without needing to have conditionals for if LLVM is in-tree or out-of-tree. — cbieneman / detail
  8. Change INSTR_PROF_DEFAULT_NUM_VAL_PER_SITE from 8 to 16.

    Summary: In the current implementation, the defaul number of values per site tracked by value profiler is 8, which is too small and could introduce inaccuracies to profile. Changing it to 16 will be able to gain more accurate value profiler.

    Reviewers: davidxl, tejohnson

    Reviewed By: tejohnson

    Subscribers: sanjoy, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35964 — dehao / detail
  9. Recommit r308327 3rd time: Add a warning for missing
    '#pragma pack (pop)' and suspicious uses of '#pragma pack' in included files

    The second recommit (r309106) was reverted because the "non-default #pragma
    pack value chages the alignment of struct or union members in the included file"
    warning proved to be too aggressive for external projects like Chromium
    (https://bugs.chromium.org/p/chromium/issues/detail?id=749197). This recommit
    makes the problematic warning a non-default one, and gives it the
    -Wpragma-pack-suspicious-include warning option.

    The first recommit (r308441) caused a "non-default #pragma pack value might
    change the alignment of struct or union members in the included file" warning
    in LLVM itself. This recommit tweaks the added warning to avoid warnings for
    #includes that don't have any records that are affected by the non-default
    alignment. This tweak avoids the previously emitted warning in LLVM.

    Original message:

    This commit adds a new -Wpragma-pack warning. It warns in the following cases:

    - When a translation unit is missing terminating #pragma pack (pop) directives.
    - When entering an included file if the current alignment value as determined
      by '#pragma pack' directives is different from the default alignment value.
    - When leaving an included file that changed the state of the current alignment
      value.

    rdar://10184173

    Differential Revision: https://reviews.llvm.org/D35484 — arphaman / detail
  10. [ValueTracking] Remove a number of unused arguments. NFC. — mcrosier / detail
  11. [AArch64] Standardize suffixes for LSE Atomics mnemonics (NFCI)

    This NFC changeset standardizes the suffixes used for LSE Atomics
    instructions.

    It changes the existing suffixes - 'b', 'h', 's', 'd' - to the existing
    standard 'B', 'H', 'W' and 'X'.

    This changeset is the result of the code review discussion for D35319.

    Patch by: steleman

    Differential Revision: https://reviews.llvm.org/D35927 — joel_k_jones / detail
  12. Strip trailing whitespace. NFCI. — rksimon / detail
  13. [X86] Add tests showing inability of vector non-temporal load/store intrinsic to force pointer alignment (PR33830)

    Clang specifies a max type alignment of 16 bytes on darwin targets, meaning that the builtin nontemporal stores don't correctly align the loads/stores to 32 or 64 bytes when required, resulting in lowering to temporal unaligned loads/stores. — rksimon / detail
  14. [ARM] Add the option to directly access TLS pointer

    This patch enables choice for accessing thread local
    storage pointer (like '-mtp' in gcc).

    Differential Revision: https://reviews.llvm.org/D34408 — spetrovic / detail
  15. [clang-tidy] Expand readability-redundant-function-ptr-dereference test — alexfh / detail
  16. [clang-tidy] readability-redundant-declaration: ignore friends and macros — alexfh / detail
  17. [clangd] Workaround for a test failure on Windows.

    Previous workaround (r308959) didn't account for a case when system drive
    letter is not 'C:'. — ibiryukov / detail

#192 (Jul 28, 2017 2:51:07 AM)

  1. [X86] Add test case for PR33290 — rksimon / detail
  2. [X86][AVX] Cleanup shuffle combine tests - remove old prefixes. — rksimon / detail
  3. [ARM] Add test to check pcs of ARM ABI runtime floating point helpers

    The ARM Runtime ABI document (IHI0043) defines the AEABI floating point
    helper functions in section 4.1.2 The floating-point helper functions.
    The functions listed in this section must always use the base AAPCS calling
    convention.

    This test generates calls to all the helper functions that llvm supports
    and checks that the base AAPCS calling convention has been used. We test
    the equivalent of -mfloat-abi=soft, -mfloat-abi=softfp, -mfloat-abi=hardfp
    with an FPU that supports single and double precision, and one that only
    supports double precision.

    Differential Revision: https://reviews.llvm.org/D35904 — psmith / detail
  4. clang-format: merge short case labels with trailing comments

    Summary:
    Allow merging short case labels when they actually end with a comment
    (like a comment after the ``break``) and when followed by switch-level
    comments (e.g. aligned with next case):

      switch(a) {
      case 0: break; // comment at end of case
      case 1: return value;
      // comment related to next case
      // comment related to next case
      case 2:
      }

    Reviewers: krasimir, djasper

    Reviewed By: krasimir

    Subscribers: klimek, cfe-commits

    Differential Revision: https://reviews.llvm.org/D35557 — typz / detail
  5. clang-format: fix block OpeningLineIndex around preprocessor

    Summary:
    The current code would return an incorrect value when a preprocessor
    directive is present immediately after the opening brace: this causes
    the nanespace end comment fixer to break in some places, for exemple it
    would not add the comment in this case:

      namespace a {
      #define FOO
      }

    Fixing the computation is simple enough, but it was breaking a feature,
    as it would cause comments to be added also when the namespace
    declaration was dependant on conditional compilation.

    To fix this, a hash of the current preprocessor stack/branches is
    computed at the beginning of parseBlock(), so that we explicitely do not
    store the OpeningLineIndex when the beginning and end of the block are
    not in the same preprocessor conditions.

    Tthe hash is computed based on the line, but this could propbably be
    improved by using the actual condition, so that clang-format would be
    able to match multiple identical #ifdef blocks.

    Reviewers: krasimir, djasper

    Reviewed By: krasimir

    Subscribers: klimek, cfe-commits

    Differential Revision: https://reviews.llvm.org/D35483 — typz / detail
  6. [SCEV] Do not visit nodes twice in containsConstantSomewhere

    This patch reworks the function that searches constants in Add and Mul SCEV expression
    chains so that now it does not visit a node more than once, and also renames this function
    for better correspondence between its implementation and semantics.

    Differential Revision: https://reviews.llvm.org/D35931 — mkazantsev / detail
  7. [MachineOutliner] NFC: Comment tidying

    The comment on describing the suffix tree had some pruning
    stuff that was out of date in it.

    Also fixed some typos. — paquette / detail

#191 (Jul 27, 2017 9:53:48 PM)

  1. Revert rL309320 - "[OCaml] Respect CMAKE_C_FLAGS for OCaml C files"

    This causes buildbot breakage for systems where OCaml files are built
    with a different compiler. — mgorny / detail
  2. test: require x86 backend

    Ensure that the target is registered before using it.  Should fix the
    hexagon Bots. — Saleem Abdulrasool / detail
  3. Support libc++abi in addition to libstdc++

    This change adds sanitizer support for LLVM's libunwind and libc++abi
    as an alternative to libstdc++. This allows using the in tree version
    of libunwind and libc++abi which is useful when building a toolchain
    for different target.

    Differential Revision: https://reviews.llvm.org/D34501 — phosek / detail
  4. Support compiler-rt builtins

    This change adds support for compiler-rt builtins as an alternative
    compiler runtime to libgcc.

    Differential Revision: https://reviews.llvm.org/D35165 — phosek / detail
  5. MC: add support for cfi_return_column

    This adds support for the CFI pseudo-op return_column.  This specifies
    the frame table column which contains the return address.

    Addresses PR33953! — Saleem Abdulrasool / detail
  6. MC: clang-format enumeration (NFC)

    This was hard to insert elements into.  clang-format it so that it is
    easier.  NFC. — Saleem Abdulrasool / detail
  7. Revert "[SCEV] Cache results of computeExitLimit"

    This reverts commit r309080.  The patch needs to clear out the
    ScalarEvolution::ExitLimits cache in forgetMemoizedResults.

    I've replied on the commit thread for the patch with more details. — sanjoy / detail
  8. [MachineOutliner] NFC: Split up getOutliningBenefit

    This is some more cleanup in preparation for some actual
    functional changes. This splits getOutliningBenefit into
    two cost functions: getOutliningCallOverhead and
    getOutliningFrameOverhead. These functions return the
    number of instructions that would be required to call
    a specific function and the number of instructions
    that would be required to construct a frame for a
    specific funtion. The actual outlining benefit logic
    is moved into the outliner, which calls these functions.

    The goal of refactoring getOutliningBenefit is to:

    - Get us closer to getting rid of the IsTailCall flag

    - Further split up "target-specific" things and
    "general algorithm" things — paquette / detail
  9. [JumpThreading] Stop falsely preserving LazyValueInfo.

    JumpThreading claims to preserve LVI, but it doesn't preserve
    the analyses which LVI holds a reference to (e.g. the Dominator).
    In the current pass manager infrastructure, after JT runs, the
    PM frees these analyses (including DominatorTree) but preserves
    LVI.

    CorrelatedValuePropagation runs immediately after and queries
    a corrupted domtree, causing weird miscompiles.

    This commit disables the preservation of LVI for the time being.
    Eventually, we should either move LVI to a proper dependency
    tracking mechanism (i.e. an analyses shouldn't hold references
    to other analyses and compute them on demand if needed), or
    we should teach all the passes preserving LVI to preserve the
    analyses LVI depends on.

    The new pass manager has a mechanism to invalidate LVI in case
    one of the analyses it depends on becomes invalid, so this problem
    shouldn't exist (at least not in this immediate form), but handling
    of analyses holding references is still a very delicate subject.

    Fixes PR33917 (and rustc). — davide / detail
  10. DebugInfo: Consider a CU containing only local imported entities to be 'empty'

    This can come up in ThinLTO & wastes space & makes degenerate IR.

    As per the added FIXME, ultimately, local imported entities should hang
    off the function and that way the imported entity list on the CU can be
    tested for emptiness like all the other CU lists.

    (function-attached local imported entities are probably also the best
    path forward for fixing how imported entities are handled both in
    cross-module use (currently, while ThinLTO preserves the imported
    entities, they would not get used at the imported inlined location -
    only in the abstract origin that appears in the partial CU created by
    the import (which isn't emitted under Fission due to cross-CU
    limitations there)) and to reduce the number of points where imported
    entities are emitted (they're currently emitted into every inlined
    instance, concrete instance, and abstract origin - they should only go
    in teh abstract origin if there is one, otherwise in the concrete
    instance - but this requires lots of delayed handling and wiring up,
    same as abstract variables & subprograms)) — dblaikie / detail
  11. [JumpThreading] Add an option to dump LazyValueInfo after the run.

    Differential Revision:  https://reviews.llvm.org/D35973 — davide / detail
  12. Update comment in test case after r309308. — ahatanak / detail
  13. [sanitizer-coverage] add a run-time test for  -fsanitize-coverage=inline-8bit-counters,pc-table — kcc / detail
  14. ARMFrameLowering: Only set ExtraCSSpill for actually unused registers.

    The code assumed that unclobbered/unspilled callee saved registers are
    unused in the function. This is not true for callee saved registers that are
    also used to pass parameters such as swiftself.

    rdar://33401922 — matze / detail

#190 (Jul 27, 2017 6:31:29 PM)

  1. [lit] Port googletest lit tests to Windows

    Summary:
    The technique of directly calling subprocess.Popen on a python script
    doesn't work on Windows. The executable path of the command must refer
    to a valid win32 executable.

    Instead, rename all the python scripts masquerading as gtest executables
    to have .py extensions, so we can easily detect then and call the python
    executable for them. Do this on Linux as well as Windows for
    consistency.

    The test suite directory names also come out in lower-case on Windows.
    We can consider removing that in a later patch. This change just updates
    the FileCheck lines to match on Windows.

    Fixes PR33933

    Reviewers: modocache, mgorny

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D35909 — rnk / detail
  2. Changing the default MaxNumPromotions from 2 to 3.

    Summary: In performance tuning, we see performance benefits when enlarge the maximum num promotion targets to 3. This is safe as soon as we have total percentage threshold properly setup (https://reviews.llvm.org/D35962)

    Reviewers: davidxl, tejohnson

    Reviewed By: tejohnson

    Subscribers: llvm-commits, sanjoy

    Differential Revision: https://reviews.llvm.org/D35966 — dehao / detail
  3. Separate the ICP total threshold and remaining threshold.

    Summary: In the current implementation, isPromotionProfitable only checks if the call count to a direct target is no less than a certain percentage threshold of the remaining call counts that have not been promoted. This causes code size problems when the target count is small but greater than a large portion of remaining counts. E.g. target1 takes 99.9%, while target2 takes 0.1%. Both targets will be promoted and inlined, makes the function size too large, which potentially prevents it from further inlining into its callers. This patch adds another percentage threshold against the total indirect call count. If the target count needs to be no less than both thresholds in order to be promoted speculatively.

    Reviewers: davidxl, tejohnson

    Reviewed By: tejohnson

    Subscribers: sanjoy, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35962 — dehao / detail
  4. Increase the ImportHotMultiplier to 10.0

    Summary: The original 3.0 hot mupltiplier is too small, and would prevent hot callsites from being inline. This patch increases the hot multilier to 10.0

    Reviewers: davidxl, tejohnson

    Reviewed By: tejohnson

    Subscribers: llvm-commits, sanjoy

    Differential Revision: https://reviews.llvm.org/D35969 — dehao / detail
  5. [X86] Fix latent bug in sibcall eligibility logic

    The X86 tail call eligibility logic was correct when it was written, but
    the addition of inalloca and argument copy elision broke its
    assumptions. It was assuming that fixed stack objects were immutable.

    Currently, we aim to emit a tail call if no arguments have to be
    re-arranged in memory. This code would trace the outgoing argument
    values back to check if they are loads from an incoming stack object.
    If the stack argument is immutable, then we won't need to store it back
    to the stack when we tail call.

    Fortunately, stack objects track their mutability, so we can just make
    the obvious check to fix the bug.

    This was http://crbug.com/749826 — rnk / detail
  6. [sanitizers] Sanitizer tests CMake clean up: try #2

    This patch addresses two issues:

    Most of the time, hacks with `if/else` in order to get support for
    multi-configuration builds are superfluous.
    The variable `CMAKE_CFG_INTDIR` was created precisely for this purpose: it
    expands to `.`  on all single-configuration builds, and to a configuration
    name otherwise.
    The `if/else` hacks for the library name generation should also not be
    done, as CMake has `TARGET_FILE` generator expression precisely for this
    purpose, as it expands to the exact filename of the resulting target.

    Differential Revision: https://reviews.llvm.org/D35952 — George Karpenkov / detail
  7. [sancov] Add missing line breaks in test. NFC. — eugenis / detail
  8. [sanitizer-coverage] clang flags pumbing for -fsanitize-coverage=pc-table — kcc / detail
  9. [sanitizer-coverage] rename sanitizer-coverage-create-pc-table into sanitizer-coverage-pc-table and add plumbing for a clang flag — kcc / detail
  10. Remove unused function from AArch64 backend (NFC) — Adrian Prantl / detail
  11. [sanitizer-coverage] add a feature sanitizer-coverage-create-pc-table=1 (works with trace-pc-guard and inline-8bit-counters) that adds a static table of instrumented PCs to be used at run-time — kcc / detail
  12. [MachineOutliner] Cleanup: move findCandidates out of suffix tree

    Doing some cleanup in preparation for some functional changes.
    This commit moves findCandidates out of the suffix tree and into the
    MachineOutliner class. This is much easier to follow, and removes
    the burden of candidate choice from the suffix tree.

    It also adds a couple FIXMEs and simplifies building outlined function
    names. — paquette / detail
  13. [sancov] Implement __sanitizer_cov_reset.

    Summary: Clears all collected coverage.

    Reviewers: kcc

    Subscribers: srhines, kubamracek, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35958 — eugenis / detail
  14. [llvm-pdbutil] Clean up ExitOnError usage to add ": " to our errors

    The banner parameter is supposed to end in a separator, like ": ".
    Otherwise, we get ugly errors like:

    Error while reading publics streamNative error: blah blah — rnk / detail
  15. [PDB] Initialize the std::array<ulittle32_t> used for the gsi bitmap

    With ASan, we would write about 512 bytes of malloc fill value to the
    PDB, with some random bits ORed in here and there. Dumping the PDB would
    always fail reliably. — rnk / detail
  16. [ConstantFolder] Don't try to fold gep when the idx is a vector.

    The code in ConstantFoldGetElementPtr() assumes integers, and
    therefore it crashes trying to get the integer bidwith of a vector
    type (in this case <4 x i32>. I just changed the code to prevent
    the folding in case of vectors and I didn't bother to generalize
    as this doesn't seem to me something that really happens in
    practice, but I'm willing to change the patch if you think
    it's worth it.
    This is hard to trigger from -instsimplify or -instcombine
    only as the second instruction is dead, so the test uses loop-unroll.

    Differential Revision:  https://reviews.llvm.org/D35956 — davide / detail

#189 (Jul 27, 2017 3:02:32 PM)

  1. Headers: fix _Unwind_{G,S}etGR for non-EHABI targets

    The EHABI definition was being inlined into the users even when EHABI
    was not in use.  Adjust the condition to ensure that the right version
    is defined. — Saleem Abdulrasool / detail
  2. [X86] Don't lie about legality to TLI's demanded bits.

    Like r309323, X86 had a typo where it passed the wrong flags to TLO.

    Found by inspection; I haven't been able to tickle this into having
    observable behavior.  I don't think it does, given that X86 doesn't have
    custom demanded bits logic, and the generic logic doesn't have a lot of
    exposure to illegal constructs. — Ahmed Bougacha / detail
  3. [AArch64] Remove outdated comment. NFC.

    There hasn't been a ternary since r231987. — Ahmed Bougacha / detail
  4. [AArch64] Fix legality info passed to demanded bits for TBI opt.

    The (seldom-used) TBI-aware optimization had a typo lying dormant since
    it was first introduced, in r252573:  when asking for demanded bits, it
    told TLI that it was running after legalize, where the opposite was
    true.

    This is an important piece of information, that the demanded bits
    analysis uses to make assumptions about the node.  r301019 added such an
    assumption, which was broken by the TBI combine.

    Instead, pass the correct flags to TLO. — Ahmed Bougacha / detail
  5. [libcxx] [test] Remove an unused local typedef in enable_shared_from_this.pass.cpp.

    Trivial change, committed without review. — stl_msft / detail
  6. [OCaml] Fix undefined reference to LLVMDumpType() with NDEBUG

    Account for the possibility of LLVMDumpType() not being available with
    NDEBUG in the OCaml bindings. If it is not built into LLVM, make
    the dump function raise an exception.

    Since rL293359, the dump functions are built only if either NDEBUG is
    not defined, or LLVM_ENABLE_DUMP is defined. As a result, if the dump
    functions are not built in LLVM, the dynamic OCaml libraries fail to
    load due to undefined LLVMDumpType symbol.

    Differential Revision: https://reviews.llvm.org/D35899 — mgorny / detail
  7. [OCaml] Respect CMAKE_C_FLAGS for OCaml C files

    Pass the values of CMAKE_C_FLAGS and CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE}
    as -ccopt to ocamlc. This enforces the specific flags used for the LLVM
    build to be used for OCaml bindings as well, notably -O and -march
    flags.

    This also solves the issue of the user being unable to force specific
    flags for OCaml bindings builds. Gentoo needs this to enforce -DNDEBUG
    consistently between the LLVM build and the split OCaml bindings build.

    Differential Revision: https://reviews.llvm.org/D35898 — mgorny / detail
  8. Revert "[sanitizers] Sanitizer tests CMake clean up"

    This reverts commit 0ab44db2aa1cd3710355ad79b04f954ce68c0b3a.

    Fails on some bots, reverting until I can fix it. — George Karpenkov / detail
  9. Add test to reject merging of empty manifest.

    Reviewers: ruiu, rnk

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D35954 — ecbeckmann / detail
  10. [ARM] Add use-misched feature, to enable the MachineScheduler.

    Summary:
    This change makes it easier to experiment with the MachineScheduler in
    the ARM backend and also makes it very explicit which CPUs use the
    MachineScheduler (currently only swift and cyclone).



    Reviewers: MatzeB, t.p.northover, javed.absar

    Reviewed By: MatzeB

    Subscribers: aemerson, kristof.beyls, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35935 — fhahn / detail
  11. Change prefix in vector-shuffle-combining-avx.patch to reduce test size. — dinar / detail
  12. [Headers] Add a test for arm64intr.h

    This tests the ARM64 specific constants added in SVN r309081,
    similar to the one added in r277928 for armintr.h.

    Differential Revision: https://reviews.llvm.org/D35934 — mstorsjo / detail
  13. [MergeFunctions] Remove alias support.

    The alias support was dead code since 2011. It was last touched
    in r124182, where it was reintroduced after being removed
    in r110434, and since then it was gated behind a HasGlobalAliases
    flag that was permanently stuck as `false`.

    It is also broken. I'm not sure if it bitrotted or was just broken
    in the first place because it appears to have never been tested,
    but the following IR results in a crash:

        define internal i32 @a(i32 %a, i32 %b) unnamed_addr {
          %c = add i32 %a, %b
          %d = xor i32 %a, %c
          ret i32 %c
        }

        define internal i32 @b(i32 %a, i32 %b) unnamed_addr {
          %c = add i32 %a, %b
          %d = xor i32 %a, %c
          ret i32 %c
        }

    It seems safe to remove buggy untested code that no one cared about
    for seven years.

    Differential Revision: https://reviews.llvm.org/D34802 — whitequark / detail
  14. [lit] Fix TestRunner unit test on Windows

    Summary:
    Normally Python converts all newline characters, Windows or Unix,
    to Unix newlines when opening a file. However, lit opens files in
    binary mode, which does not perform this conversion. As a result,
    trailing Windows newlines are not stripped from test input, which
    caused a failure in the TestRunner unit test:

    ```
    FAIL: test_custom (__main__.TestIntegratedTestKeywordParser)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "C:\Users\bgesiak\src\llvm\llvm\utils\lit\tests\unit\TestRunner.py", line 109, in test_custom
        self.assertItemsEqual(value, ['a', 'b', 'c'])
    AssertionError: Element counts were not equal:
    First has 1, Second has 0: 'c\r'
    First has 0, Second has 1:  'c'
    ```

    Fix the discrepancy in behavior across the two platforms by
    manually stripping Windows newlines before yielding each line in
    the test file.

    Reviewers: echristo, beanz, ddunbar, delcypher, rnk

    Reviewed By: rnk

    Subscribers: mehdi_amini, llvm-commits

    Differential Revision: https://reviews.llvm.org/D27746 — modocache / detail
  15. Un-revert "Teach the CMake build system to run lit's test suite. These can be run"

    Summary:
    Depends on https://reviews.llvm.org/D35879.

    This reverts rL257268, which in turn was a revert of rL257221.
    https://reviews.llvm.org/D35879 marks the tests in the lit test suite
    that fail on Windows as XFAIL, which should allow these tests to pass
    on Windows-based buildbots.

    Reviewers: delcypher, beanz, mgorny, jroelofs, rnk

    Reviewed By: mgorny

    Subscribers: rnk, ddunbar, george.karpenkov, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35880 — modocache / detail
  16. [OPENMP] Allow all lvalues in 'depend' clause.

    According to upcoming OpenMP 5.0 all addressable lvalue expressions are
    allowed in deoend clause. — abataev / detail
  17. Revert r264998 and r265035.

    r303175 made changes to have __cxa_allocate_exception return a 16-byte
    aligned pointer, so it's no longer necessary to specify a lower
    alignment (8-bytes) for exception objects on Darwin.

    rdar://problem/32363695 — ahatanak / detail
  18. Disable the deduction guide test I added in 309296 for the moment, while I figure out which compilers don't support deduction guides — marshall / detail
  19. [sanitizers] Sanitizer tests CMake clean up

    This patch addresses two issues:

    Most of the time, hacks with `if/else` in order to get support for
    multi-configuration builds are superfluous.
    The variable `CMAKE_CFG_INTDIR` was created precisely for this purpose: it
    expands to `.`  on all single-configuration builds, and to a configuration
    name otherwise.
    The `if/else` hacks for the library name generation should also not be
    done, as CMake has `TARGET_FILE` generator expression precisely for this
    purpose, as it expands to the exact filename of the resulting target.

    Differential Revision: https://reviews.llvm.org/D35952 — George Karpenkov / detail
  20. [FunctionImport] Prefer isa<> to dyn_cast<> as the value is not used.

    This change makes GCC7 happy again. — davide / detail
  21. [InstCombine] Simplify pointer difference subtractions (GEP-GEP) where GEPs have other uses and one non-constant index

    Summary:
    Pointer difference simplifications currently happen only if input GEPs don't have other uses or their indexes are all constants, to avoid duplicating indexing arithmetic.

    This patch enables cases with exactly one non-constant index among input GEPs to happen where there is no duplicated arithmetic or code size increase even if input GEPs have other uses.

    For example, this patch allows "(&A[42][i]-&A[42][0])" --> "i", which didn't happen previously, if the input GEP(s) have other uses.

    Reviewers: sanjoy, bkramer

    Reviewed By: sanjoy

    Subscribers: mcrosier, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35499 — yamauchi / detail
  22. [PDB] Write public symbol records and the publics hash table

    Summary:
    MSVC link.exe records all external symbol names in the publics stream.
    It provides similar functionality to an ELF .symtab.

    Reviewers: zturner, ruiu

    Subscribers: hiraditya, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35871 — rnk / detail
  23. [SelectionDAG] Improve DAGTypeLegalizer::convertMask assertion (PR33960)

    Improve DAGTypeLegalizer::convertMask's isSETCCorConvertedSETCC assertion to properly check for any mixture of SETCC or BUILD_VECTOR of constants, or a logical mask op of them. — rksimon / detail
  24. [X86] SET0 to use XMM registers where possible PR26018 PR32862

    Differential Revision: https://reviews.llvm.org/D35839 — dinar / detail
  25. Relax the matching in these tests

    Looks like the template arguments are displayed differently depending on the
    host compiler(?).  E.g.:

    InnerAnalysisManagerProxy<CGSCCAnalysisManager
    InnerAnalysisManagerProxy<llvm::AnalysisManager<llvm::LazyCallGraph::SCC, ...

    Fix fallout after r309294 — anemet / detail
  26. Implement P0739R0: 'Some improvements to class template argument deduction integration into the standard library' This is an API change (not ABI change) due to a late change in the c++17 standard — marshall / detail
  27. [clangd] Don't reverse priorities of completion items.

    Summary: Current algorithm incorrectly provides completion results in a reverse order.

    Reviewers: krasimir, bkramer

    Reviewed By: krasimir

    Subscribers: cfe-commits, klimek

    Differential Revision: https://reviews.llvm.org/D35950 — ibiryukov / detail
  28. [ICP] Migrate to OptimizationRemarkEmitter

    This is a module pass so for the old PM, we can't use ORE, the function
    analysis pass.  Instead ORE is created on the fly.

    A few notes:

    - isPromotionLegal is folded in the caller since we want to emit the Function
    in the remark but we can only do that if the symbol table look-up succeeded.

    - There was good test coverage for remarks in this pass.

    - promoteIndirectCall uses ORE conditionally since it's also used from
    SampleProfile which does not use ORE yet.

    Fixes PR33792.

    Differential Revision: https://reviews.llvm.org/D35929 — anemet / detail
  29. [OptRemark] Allow streaming of 64-bit integers — anemet / detail
  30. [lit] Fix order of checks in shtest-shell.py test

    Summary:
    An expectation in `utils/lit/tests/Inputs/shtest-shell/redirects.txt`
    expects that first a string printed to stdout is seen, and then a
    string printed to stderr. Add `flush()` calls to ensure that stdout is
    printed before stderr, as expected.

    Reviewers: rnk, mgorny, jroelofs

    Reviewed By: rnk

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D35947 — modocache / detail
  31. All libcalls should be considered to be GC-leaf functions.

    Summary:
    It is possible for some passes to materialize a call to a libcall (ex: ldexp, exp2, etc),
    but these passes will not mark the call as a gc-leaf-function. All libcalls are
    actually gc-leaf-functions, so we change llvm::callsGCLeafFunction() to tell us that
    available libcalls are equivalent to gc-leaf-function calls.

    Reviewers: sanjoy, anna, reames

    Reviewed By: anna

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D35840 — dneilson / detail
  32. Update to use enum classes for various ARM *Kind enums

    Summary: This updates the relevant Clang parts for the LLVM change D35882.

    Reviewers: rengolin, chandlerc, javed.absar, rovka

    Reviewed By: rovka

    Subscribers: aemerson, cfe-commits, kristof.beyls

    Differential Revision: https://reviews.llvm.org/D35884 — fhahn / detail
  33. Fix double destruction of objects when OpenMP construct is canceled

    When an omp for loop is canceled the constructed objects are being destructed
    twice.

    It looks like the desired code is:

    {

      Obj o;
      If (cancelled) branch-through-cleanups to cancel.exit.

    }
    [cleanups]
    cancel.exit:

    __kmpc_for_static_fini
    br cancel.cont (*)

    cancel.cont:

    __kmpc_barrier
    return

    The problem seems to be the branch to cancel.cont is currently also going
    through the cleanups calling them again. This change just does a direct branch
    instead.

    Patch By: michael.p.rice@intel.com

    Differential Revision: https://reviews.llvm.org/D35854 — erichkeane / detail
  34. [TargetParser] Use enum classes for various ARM kind enums.

    Summary:
    Using c++11 enum classes ensures that only valid enum values are used
    for ArchKind, ProfileKind, VersionKind and ISAKind. This removes the
    need for checks that the provided values map to a proper enum value,
    allows us to get rid of AK_LAST and prevents comparing values from
    different enums. It also removes a bunch of static_cast
    from unsigned to enum values and vice versa, at the cost of introducing
    static casts to access AArch64ARCHNames and ARMARCHNames by ArchKind.

    FPUKind and ArchExtKind are the only remaining old-style enum in
    TargetParser.h. I think it's beneficial to keep ArchExtKind as old-style
    enum, but FPUKind can be converted too, but this patch is quite big, so
    could do this in a follow-up patch. I could also split this patch up a
    bit, if people would prefer that.

    Reviewers: rengolin, javed.absar, chandlerc, rovka

    Reviewed By: rovka

    Subscribers: aemerson, kristof.beyls, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35882 — fhahn / detail
  35. [SLP] Outline code for the check that instruction users are part of
    vectorization tree, NFC. — abataev / detail

#188 (Jul 27, 2017 8:49:03 AM)

  1. [SelectionDAG] Avoid repeated calls to getNumOperands in for loop. NFCI. — rksimon / detail
  2. Make new PM honor -fdebug-info-for-profiling (clang side)

    Summary: The new PM needs to invoke add-discriminator pass when building with -fdebug-info-for-profiling.

    Reviewers: chandlerc, davidxl

    Reviewed By: chandlerc

    Subscribers: sanjoy, cfe-commits

    Differential Revision: https://reviews.llvm.org/D35746 — dehao / detail
  3. Fix assert from r309278 — dblaikie / detail
  4. remove redundant check — Adrian Prantl / detail
  5. [Polly bot] Add -polly-enable-optree -polly-enable-simplify to before-vectorizer buildbots.

    This is intended to become the new default configuration.
    Make the buildbots test it. — meinersbur / detail
  6. ThinLTO: Don't import aliases of any kind (even linkonce_odr)

    Summary:
    Until a more advanced version of importing can be implemented for
    aliases (one that imports an alias as an available_externally definition
    of the aliasee), skip the narrow subset of cases that was possible but
    came at a cost: aliases of linkonce_odr functions could be imported
    because the linkonce_odr function could be safely duplicated from the
    source module. This came/comes at the cost of not being able to 'home'
    imported linkonce functions (they had to be emitted linkonce_odr in all
    the destination modules (even if they weren't used by an alias) rather
    than as available_externally - causing extra object size).

    Tangentially, this also was the only reason ThinLTO would emit multiple
    CUs in to the resulting DWARF - which happens to be a problem for
    Fission (there's a fix for this in GDB but not released yet, etc).
    (actually it's not the only reason - but I'm sending a patch to fix the
    other reason shortly)

    There's no reason to believe this particularly narrow alias importing
    was especially/meaningfully important, only that it was /possible/ to
    implement in this way. When a more general solution is done, it should
    still satisfy the DWARF concerns above, since the import will still be
    available_externally, and thus not create extra CUs.

    Since now all aliases are treated the same, I removed/simplified some
    test cases since they were testing corner cases where there are no
    longer any corners.

    Reviewers: tejohnson, mehdi_amini

    Differential Revision: https://reviews.llvm.org/D35875 — dblaikie / detail
  7. [SelectionDAG] Tidyup mask creation. NFCI.

    Assign all concat elements to UNDEF and then just replace the first element, instead of copying everything individually. — rksimon / detail
  8. [clang-diff] Rename, NFC — krobelus / detail
  9. Add an X86-64 AVX2 LNT perf builder.
    This builder should run the llvm test-suite in benchmarking mode
    and submit results to http://lnt.llvm.org

    Differential revision: https://reviews.llvm.org/D35939 — eladcohen / detail
  10. [ARM] Mark labels in skipAlignedDPRCS2Spills as fallthrough (NFC).

    The comment at the top of the switch statement indicates that the
    fall-through behavior is intentional. By using LLVM_FALLTHROUGH,
    -Wimplicit-fallthrough are silenced, which is enabled by default in GCC
    7. — fhahn / detail
  11. [OPENMP] Codegen for 'in_reduction' clause.

    Added codegen for task-based directive with in_reduction clause.
    ```
    <body>
    ```
    The next code is emitted:
    ```
    void *td;
    ...
    td = call i8* @__kmpc_task_reduction_init();
    ...
    <type> *priv = (<type> *)call i8* @__kmpc_task_reduction_get_th_data(i32
    GTID, i8* td, i8* <orig>)
    ``` — abataev / detail
  12. Added cost of ZEROALL and ZEROUPPER instrs in btver2 cpu.
    Differential Revision https://reviews.llvm.org/D35834 — avt77 / detail
  13. [InlineCost, NFC] Change CallAnalyzer::isGEPFree to use TTI::getUserCost instead of TTI::getGEPCost

    Currently CallAnalyzer::isGEPFree uses TTI::getGEPCost to check if GEP is free.
    TTI::getGEPCost cannot handle cases when GEPs participate in Def-Use dependencies
    (see https://reviews.llvm.org/D31186 for example).
    There is TTI::getUserCost which can calculate the cost more accurately by
    taking dependencies into account.

    Differential Revision: https://reviews.llvm.org/D33685 — eastig / detail
  14. [globalisel][tablegen] Ensure MatchTable's are compile-time constants with constexpr. NFC.

    This should prevent any re-occurence of the problem where the table was
    initialized at run-time. — dsanders / detail
  15. [X86][AVX] Regenerate shuffle tests with broadcast comments. — rksimon / detail

#187 (Jul 27, 2017 4:48:24 AM)

  1. Re-commit: r309094 [globalisel][tablegen] Fuse the generated tables together.

    Summary:
    Now that we have control flow in place, fuse the per-rule tables into a
    single table. This is a compile-time saving at this point. However, this will
    also enable the optimization of a table so that similar instructions can be
    tested together, reducing the time spent on the matching the code.

    This is NFC in terms of externally visible behaviour but some internals have
    changed slightly. State.MIs is no longer reset between each rule that is
    attempted because it's not necessary to do so. As a consequence of this the
    restriction on the order that instructions are added to State.MIs has been
    relaxed to only affect recorded instructions that require new elements to be
    added to the vector. GIM_RecordInsn can now write to any element from 1 to
    State.MIs.size() instead of just State.MIs.size().

    The compile-time regressions from the last commit were caused by the ARM target
    including a non-const variable (zero_reg) in the table and therefore generating
    an initializer for it. That variable is now const.

    Reviewers: ab, t.p.northover, qcolombet, rovka, aditya_nandakumar

    Reviewed By: rovka

    Subscribers: kristof.beyls, igorb, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35681 — dsanders / detail
  2. [CodeGen][ARM] ARM runtime helper functions are not always soft-fp

    Re-commit r309257 with less precise register checks in arm-float-helpers.c
    test. — psmith / detail
  3. [X86] Adding test cases for LEA factorization (PR32755 / D35014)

    Differential Revision: https://reviews.llvm.org/D35886 — rksimon / detail
  4. [X86] Tidyup MaskedLoad/Store mask creation. NFCI.

    Assign all concat elements to zero and then just replace the first element, instead of setting them all to null and copying everything in. — rksimon / detail
  5. [TTI] fixing a bug in the isLegalMaskedScatter API

    isLegalMaskedScatter called the Gather version which is a bug.
    use test case is provided within the patch of AVX2 gathers at: https://reviews.llvm.org/D35772

    Differential Revision: https://reviews.llvm.org/D35786 — magabari / detail
  6. [CodeGen][ARM] Revert r309257

    The test arm-float-helpers.c appears to be failing on some builders and
    needs some work to make it more robust. — psmith / detail

#186 (Jul 27, 2017 2:49:23 AM)

  1. [CodeGen][ARM] ARM runtime helper functions are not always soft-fp

    The ARM Runtime ABI document (IHI0043) defines the AEABI floating point
    helper functions in 4.1.2 The floating-point helper functions. These
    functions always use the base PCS (soft-fp). However helper functions
    defined outside of this document such as the complex-number multiply and
    divide helpers are not covered by this requirement and should use
    hard-float PCS if the target is hard-float as both compiler-rt and libgcc
    for a hard-float sysroot implement these functions with a hard-float PCS.
       
    All of the floating point helper functions that are explicitly soft float
    are expanded in the llvm ARM backend. This change makes clang not force the
    BuiltinCC to AAPCS for AAPCS_VFP. With this change the ARM compiler-rt
    tests involving _Complex pass with both hard-fp and soft-fp targets.

    Differential Revision: https://reviews.llvm.org/D35538 — psmith / detail
  2. [PowerPC] Pass CPU to assembler with -no-integrated-as

    This just adds the CPU to a list of commands passed to GAS when not using the
    integrated assembler.

    Differential Revision: https://reviews.llvm.org/D33820 — nemanjai / detail
  3. [PowerPC] enable optimizeCompareInstr for branch with static branch hint

    In optimizeCompareInstr, a compare instruction is eliminated by using a record form instruction if possible.
    If the branch instruction that uses the result of the compare has a static branch hint, the optimization does not happen.
    This patch makes this optimization happen regardless of the branch hint by splitting branch hint and branch condition before checking the predicate to identify the possible optimizations.

    Differential Revision: https://reviews.llvm.org/D35801 — inouehrs / detail

#185 (Jul 26, 2017 11:51:28 PM)

  1. Revert "Reland "[LLVM][llvm-objcopy] Added basic plumbing to get things started""

    This change is failing tests on Windows bots due to permissions.

    This reverts commit r309249. — phosek / detail
  2. Reland "[LLVM][llvm-objcopy] Added basic plumbing to get things started"

    As discussed on llvm-dev I've implemented the first basic steps towards
    llvm-objcopy/llvm-objtool (name pending).

    This change adds the ability to copy (without modification) 64-bit
    little endian ELF executables that have SHT_PROGBITS, SHT_NOBITS,
    SHT_NULL and SHT_STRTAB sections.

    Patch by Jake Ehrlich

    Differential Revision: https://reviews.llvm.org/D33964 — phosek / detail
  3. [X86] Improve the unknown stepping support for Intel CPUs in getHostCPUName

    This patch improves our guessing of unknown Intel CPUs to support Goldmont and skylake-avx512.

    Differential Revision: https://reviews.llvm.org/D35161 — ctopper / detail

#184 (Jul 26, 2017 7:51:17 PM)

  1. [Coverage] NFC: Simplify sanity checks with a SpellingRange utility

    This should simplify D35925. — Vedant Kumar / detail
  2. [Coverage] NFC: Save a pair of calls to get{Start,End} — Vedant Kumar / detail
  3. [GISel]: Missed passing in a parameter to addUsesFromArgs — aditya_nandakumar / detail
  4. Remove check for i686.

    libxml2 is supported for 32 bit, so our build system should be checking
    the target rather than native os when choosing shared libs. — ecbeckmann / detail
  5. Re-enable libxml2 tests. — ecbeckmann / detail
  6. [DWARF] Minor code style modification, no functionality change. — sgravani / detail

#183 (Jul 26, 2017 6:03:59 PM)

  1. DebugInfo: Ensure imported entities at the top level of an inlined function don't cause degenerate concrete definitions

    Local imported entities at the top level of a subprogram were being
    handled differently from those in nested scopes - that different
    handling would cause pseudo concrete out-of-line definitions to be
    created (but without any of their attributes, nor an abstract_origin) in
    the case where there was no real concrete definition.

    These local imported entities also only appeared in the concrete
    definition where those imported entities in nested scopes appear in all
    cases (abstract, concrete, and inlined). This change at least makes top
    level case handle the same as the others - though there's a FIXME to
    improve this to /only/ emit them into the abstract origin (though this
    requires more plumbing - like the abstract subprogram and variable
    handling that must defer population until the end of the unit to
    discover if there is an abstract origin, or only a standalone concrete
    definition). — dblaikie / detail
  2. [Hexagon] Fix expensive checks build bot broken in r309230. — eugenezelenko / detail
  3. [CMake] Disable -Werror for CMake checks

    -Werror may cause some of the CMake checks to fail, so we disable
    it even if it's enabled for the build itself.

    Differential Revision: https://reviews.llvm.org/D35924 — phosek / detail
  4. [Hexagon] Partially revert r309230 which caused some build bots failures. — eugenezelenko / detail
  5. [Hexagon] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). — eugenezelenko / detail
  6. See if disabling libxml tests will pass the i686 bot. — ecbeckmann / detail
  7. [lit] Fix race between shtest-shell and max-failures tests

    Previously these tests would use the same Output directory leading to
    flaky non-deterministic failures. — rnk / detail
  8. Headers: improve ARM EHABI coverage of unwind.h

    Ensure that we define the `_Unwind_Control_Block` structure used on ARM
    EHABI targets.  This is needed for building libc++abi with the unwind.h
    from the resource dir.  A minor fallout of this is that we needed to
    create a typedef for _Unwind_Exception to work across ARM EHABI and
    non-EHABI targets.  The structure definitions here are based originally
    on the documentation from ARM under the "Exception Handling ABI for the
    ARM® Architecture" Section 7.2.  They are then adjusted to more closely
    reflect the definition in libunwind from LLVM.  Those changes are
    compatible in layout but permit easier use in libc++abi and help
    maintain compatibility between libunwind and the compiler provided
    definition. — Saleem Abdulrasool / detail
  9. [lit] Fix shtest-shell and max-failures lit tests on Windows

    Rewrite the write-to-stderr.sh and write-to-stdout-and-stderr.sh shell
    scripts as python scripts and call python on them.

    Fixes PR33940 — rnk / detail
  10. [lit] Fix shtest-output-printing.py on Windows by matching either / or \\

    Fixes PR33938 — rnk / detail
  11. Add branch weights to branches for static initializers.

    The initializer for a static local variable cannot be hot, because it runs at
    most once per program. That's not quite the same thing as having a low branch
    probability, but under the assumption that the function is invoked many times,
    modeling this as a branch probability seems reasonable.

    For TLS variables, the situation is less clear, since the initialization side
    of the branch can run multiple times in a program execution, but we still
    expect initialization to be rare relative to non-initialization uses. It would
    seem worthwhile to add a PGO counter along this path to make this estimation
    more accurate in future.

    For globals with guarded initialization, we don't yet apply any branch weights.
    Due to our use of COMDATs, the guard will be reached exactly once per DSO, but
    we have no idea how many DSOs will define the variable. — rsmith / detail
  12. [lit] Fix discovery.py on Windows by matching backslashes when necessary

    Fixes PR33932 — rnk / detail
  13. Convert mac file format to unix

    Differential Revision: https://reviews.llvm.org/D35900 — kzhuravl / detail
  14. Fix a comment (test commit). — yamauchi / detail
  15. [lit] Un-XFAIL selecting.py test on Windows

    This passes locally for me, which fails the overall lit test suite. I
    can't debug a passing test, but I will try to help debug the test when
    we get some failing logs. — rnk / detail
  16. Clang and LLVM search for different versions of libxml2, reset found
    variable before each search so that they don't conflict. — ecbeckmann / detail
  17. Revert r309106 "Recommit r308327 2nd time: Add a warning for missing"

    The warning fires on non-suspicious code in Chromium. Reverting until a
    solution is figured out.

    > Recommit r308327 2nd time: Add a warning for missing
    > '#pragma pack (pop)' and suspicious uses of '#pragma pack' in included files
    >
    > The first recommit (r308441) caused a "non-default #pragma pack value might
    > change the alignment of struct or union members in the included file" warning
    > in LLVM itself. This recommit tweaks the added warning to avoid warnings for
    > #includes that don't have any records that are affected by the non-default
    > alignment. This tweak avoids the previously emitted warning in LLVM.
    >
    > Original message:
    >
    > This commit adds a new -Wpragma-pack warning. It warns in the following cases:
    >
    > - When a translation unit is missing terminating #pragma pack (pop) directives.
    > - When entering an included file if the current alignment value as determined
    >   by '#pragma pack' directives is different from the default alignment value.
    > - When leaving an included file that changed the state of the current alignment
    >   value.
    >
    > rdar://10184173
    >
    > Differential Revision: https://reviews.llvm.org/D35484 — hans / detail
  18. [AMDGPU] Optimize SI_IF lowering for simple if regions

    Currently SI_IF results in a s_and_saveexec_b64 followed by s_xor_b64.
    The xor is used to extract only the changed bits. In case of a simple
    if region where the only use of that value is in the SI_END_CF to
    restore the old exec mask, we can omit the xor and perform an or of
    the exec mask with the original exec value saved by the
    s_and_saveexec_b64.

    Differential Revision: https://reviews.llvm.org/D35861 — rampitec / detail
  19. [ARM] Minor cosmetic edits (NFC)

    Change the order of a case and the description for Exynos Mx processors. — evandro / detail
  20. [AArch64] Adjust the cost model for Exynos M1 and M2

    Add the information for the scalar reciprocal square root approximation. — evandro / detail
  21. Close if statement in config-ix.cmake while checking for i686 arch.

    Reapply "Set a different var for checking I686, because LLVM_NATIVE_ARCH is"

    This reverts commit e7400d7cbc2b7539de3aa7a20adc8f4ee0cb7bef. — ecbeckmann / detail
  22. Add liblog to ubsan `UBSAN_DYNAMIC_LIBS`

    Summary: liblog is still required to create ubsan runtimes on Android when __ANDROID_API__ < 21.

    Reviewers: eugenis, vsk

    Subscribers: kubamracek, mgorny, pirama, srhines, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35915 — aoli / detail
  23. Revert "Set a different var for checking I686, because LLVM_NATIVE_ARCH is"

    This reverts commit 38a6db6397364ee91b04afea2cdcb1b5b4d252bf. — ecbeckmann / detail
  24. AMDGPU : Widen extending scalar loads to 32-bits.

    Differential Revision: http://reviews.llvm.org/D35146 — wdng / detail
  25. Set a different var for checking I686, because LLVM_NATIVE_ARCH is
    overwritten. — ecbeckmann / detail
  26. [gold] Relax this tests a little more.

    Thanks to Peter for the report! — davide / detail
  27. [gold] Relax tests to account for difference in layout across versions. — davide / detail
  28. [sanitizer-coverage] remove stale code — kcc / detail
  29. AMDGPU: Fix using SMRD instructions for argument loads in functions

    These are not actually uniform values except in kernels. — arsenm / detail
  30. [Dominators] Fix typos. NFC. — kuhar / detail
  31. Disable libxml on i686, because it is a 32 bit architecture and
    libxml2.so is for 64 bit. — ecbeckmann / detail
  32. AMDGPU/GlobalISel: Mark 32-bit G_OR as legal

    Reviewers: arsenm

    Reviewed By: arsenm

    Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, rovka, kristof.beyls, igorb, dstuttard, tpr, t-tye, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35127 — tstellar / detail
  33. [GISel]: Avoid zero length array when building Instrs that don't have
    uses.

    Also splitting the buildSources part allows more overloads such as
    adding MachineOperands directly in the arguments for buildInstr. — aditya_nandakumar / detail

#182 (Jul 26, 2017 12:34:22 PM)

  1. Change CallLoweringInfo::CS to be an ImmutableCallSite instead of a pointer. NFCI.

    This was a use-after-free waiting to happen. — pcc / detail
  2. Migrate SimplifyLibCalls to new OptimizationRemarkEmitter

    Summary:
    This changes SimplifyLibCalls to use the new OptimizationRemarkEmitter
    API.

    In fact, as SimplifyLibCalls is only ever called via InstCombine,
    (as far as I can tell) the OptimizationRemarkEmitter is added there,
    and then passed through to SimplifyLibCalls later.

    I have avoided changing any remark text.

    This closes PR33787

    Patch by Sam Elliott!

    Reviewers: anemet, davide

    Reviewed By: anemet

    Subscribers: davide, mehdi_amini, eraman, fhahn, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35608 — anemet / detail
  3. This patch returns proper value to indicate the case when instruction throughput can't be calculated.
    Differential revision https://reviews.llvm.org/D35831 — avt77 / detail
  4. [OpenCL] Fix access qualifiers metadata for kernel arguments with typedef

    Subscribers: cfe-commits, yaxunl, Anastasia

    Differential Revision: https://reviews.llvm.org/D35420 — AlexeySotkin / detail
  5. Do a better job at emitting prefrabricated skeleton CUs.

    This is a better fix than r308708 for the problem introduced in
    r304020. It restores the skeleton CU testcases modified by that commit
    to their original form and most importantly ensures that
    frontend-generated skeleton CUs (such as used to point to Clang
    modules) come after the regular CUs. This broke for DICompileUnit
    nodes that don't have any immediate children because they are now
    constructed lazily instead of the order in which they are listed in
    !llvm.dbg.cu. After this commit we still don't guarantee that order,
    but we do guarantee that empty skeletons come last.

    Shipping versions of LLDB are very sensitive to the ordering of
    CUs. I'll track a fix for LLDB to be more permissive separately.
    This fixes a test failure in the LLDB testsuite.

    rdar://problem/33357252 — Adrian Prantl / detail
  6. Unlink nodes instead of copying, to avoid memory problems. — ecbeckmann / detail
  7. [Dominators] Change Roots type to SmallVector

    Summary: We can use the template parameter `IsPostDom` to pick an appropriate SmallVector size to store DomTree roots for dominators and postdominators. Before, the code would always allocate memory with `std::vector`.

    Reviewers: dberlin, davide, sanjoy, grosser

    Reviewed By: grosser

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D35636 — kuhar / detail
  8. [Dominators] Move root-finding out of DomTreeBase and simplify it

    Summary:
    This patch moves root-finding logic from DominatorTreeBase to GenericDomTreeConstruction.h.
    It makes the behavior simpler and more consistent by always adding a virtual root to PostDominatorTrees.

    Reviewers: dberlin, davide, grosser, sanjoy

    Reviewed By: dberlin

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D35597 — kuhar / detail
  9. Add bitrig removal to release notes — erichkeane / detail
  10. Un-XFAIL some internal lit tests on Windows, they pass for me locally — rnk / detail

#181 (Jul 26, 2017 10:58:24 AM)

  1. Diffing against a file that is itself used in the test seems to be a bad
    idea, because it might get locked down and rendered unopenable. — ecbeckmann / detail
  2. Simplify. NFC. — rafael / detail
  3. Fix LIT test breakage

    Differential Revision: https://reviews.llvm.org/D35867 — George Karpenkov / detail
  4. [X86][AVX512] Regenerated and cleaned up extension tests. — rksimon / detail
  5. [X86] Regenerate setcc tests — rksimon / detail
  6. [X86][AVX512] Regenerate shuffle tests with broadcast comments. — rksimon / detail
  7. [X86] Regenerate memset tests — rksimon / detail
  8. Correctly enable the llvm-mt tests, now that build flags changed. — ecbeckmann / detail
  9. Quote '?' in llvm-rc test

    Summary:
    Bash interperets the '?' character as matching an arbitrary character.
    On systems that have a file or directory with exactly one character in
    their root directory, '/?' gets reinterpreted into that pathname, which
    fails to match the expected Help text for llvm-rc.
    This patch quotes the '/?' to avoid that edge case.

    Reviewers: mnbvmar, ecbeckmann, rnk

    Reviewed By: rnk

    Subscribers: dyung, ruiu, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35852 — rnk / detail
  10. [Hexagon] Mark raise_relocation_error as NORETURN.

    Summary:
    This silences a couple of implicit fallthrough warnings with GCC 7.1 in
    this file.

    Reviewers: colinl, kparzysz

    Reviewed By: kparzysz

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D35889 — fhahn / detail
  11. Update the assertion to meet with the changes in r309121. (NFC) — dehao / detail
  12. [X86] Add combineBT test failure because bits have multiple uses. — rksimon / detail
  13. [lit] Mark several of lit's tests XFAIL on Windows

    Summary:
    rL257221 attempted to run lit's own test suite continuously, but that
    commit was reverted because lit's test suite does not pass on Windows.
    Because lit's tests do not run continuously, they often regress.

    In order to un-revert rL257221, mark lit tests that fail as XFAIL for
    Windows platforms.

    Test Plan:
    On a Windows development environment, follow the instructions in
    utils/lit/README.txt to run lit's test suite:

    ```
    utils/lit/lit.py \
        --path /path/to/your/llvm/build/bin \
        utils/lit/tests
    ```

    Verify that the test suite is run and a successful exit code is
    returned.

    Reviewers: mgorny, rnk, delcypher, beanz

    Reviewed By: rnk

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D35879 — modocache / detail
  14. [lit] Fix type error for parallelism groups

    Summary:
    Whereas rL299560 and rL309071 call `parallelism_groups.items()`, under the
    assumption that `parallelism_groups` is a `dict` type, the default
    parameter for that attribute is a `list`. Change the default to a
    `dict` for type correctness.

    This regression in the unit tests would have been caught if the
    unit tests were being run continously. It also would have been caught
    if the lit project used a Python type checker such as `mypy`.

    Test Plan:
    As per the instructions in `utils/lit/README.txt`, run the lit unit
    test suite:

    ```
    utils/lit/lit.py \
        --path /path/to/your/llvm/build/bin \
        utils/lit/tests
    ```

    Verify that the test `lit :: unit/TestRunner.py` fails before applying this
    patch, but passes once this patch is applied.

    Reviewers: mgorny, rnk, rafael

    Reviewed By: mgorny

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D35878 — modocache / detail
  15. Make new PM honor -fdebug-info-for-profiling

    Summary: The new PM needs to invoke add-discriminator pass when building with -fdebug-info-for-profiling.

    Reviewers: chandlerc, davidxl

    Reviewed By: chandlerc

    Subscribers: sanjoy, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35744 — dehao / detail
  16. Revert "[lit] Remove dead code not referenced in the LLVM SVN repo."

    Summary:
    This reverts rL306623, which removed `FileBasedTest`, an abstract base class,
    but did not also remove the usages of that class in the lit unit tests.
    The revert fixes four test failures in the lit unit test suite.

    Test plan:
    As per the instructions in `utils/lit/README.txt`, run the lit unit
    test suite:

    ```
    utils/lit/lit.py \
        --path /path/to/your/llvm/build/bin \
        utils/lit/tests
    ```

    Verify that the following tests fail before applying this patch, and
    pass once the patch is applied:

    ```
    lit :: test-data.py
    lit :: test-output.py
    lit :: xunit-output.py
    ```

    In addition, run `check-llvm` to make sure the existing LLVM test suite
    executes normally.

    Reviewers: george.karpenkov, mgorny, dlj

    Reviewed By: mgorny

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D35877 — modocache / detail
  17. Regression test for PR10856 — sepavloff / detail
  18. [docs] change a few code-blocks to llvm from text — nlopes / detail
  19. unguarded availability: add a fixit for the "annotate '...'
    with an availability attribute to silence" note

    rdar://33539233

    Differential Revision: https://reviews.llvm.org/D35726 — arphaman / detail
  20. [NFC] test commit.

    Added a comment to explain how to add a PPCISD node. — stefanp / detail
  21. [Bash-autocompletion] Show HelpText with possible flags

    Summary:
    `clang --autocomplete=-std` will show
    ```
    -std:   Language standard to compile for
    -std=   Language standard to compile for
    -stdlib=        C++ standard library to use
    ```
    after this change.

    However, showing HelpText with completion in bash seems super tricky, so
    this feature will be used in other shells (fish, zsh...).

    Reviewers: v.g.vassilev, teemperor, ruiu

    Subscribers: cfe-commits, hiraditya

    Differential Revision: https://reviews.llvm.org/D35759 — yamaguchi / detail
  22. [Bash-completion] Fixed a bug that file doesn't autocompleted after =

    Summary:
    File path wasn't autocompleted after `-fmodule-cache-path=[tab]`, so
    fixed this bug by checking if $flags contains only a newline or not.

    Differential Revision: https://reviews.llvm.org/D35763 — yamaguchi / detail
  23. Revert r309094: [globalisel][tablegen] Fuse the generated tables together.

    The ARM bots have started failing and while this patch should be an improvement
    for these bots, it's also the only suspect in the blamelist. Reverting while
    Diana and I investigate the problem. — dsanders / detail
  24. DAGCombiner: Extend reduceBuildVecToTrunc to handle non-zero offset

    Summary:
    Adding support for combining power2-strided build_vector's where the
    first build_vectori's operand is extracted from a non-zero index.

    Example:

    v4i32 build_vector((extract_elt V, 1),
                        (extract_elt V, 3),
                        (extract_elt V, 5),
                        (extract_elt V, 7))
    -->
    v4i32 truncate (bitcast (shuffle<1,u,3,u,5,u,7,u> V, u) to v4i64)

    Reviewers: delena, RKSimon, guyblank

    Reviewed By: RKSimon

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D35700 — zvi / detail
  25. [X86] Regenerated BT tests

    Test on 32/64 bit targets where appropriate — rksimon / detail
  26. Recommit r308327 2nd time: Add a warning for missing
    '#pragma pack (pop)' and suspicious uses of '#pragma pack' in included files

    The first recommit (r308441) caused a "non-default #pragma pack value might
    change the alignment of struct or union members in the included file" warning
    in LLVM itself. This recommit tweaks the added warning to avoid warnings for
    #includes that don't have any records that are affected by the non-default
    alignment. This tweak avoids the previously emitted warning in LLVM.

    Original message:

    This commit adds a new -Wpragma-pack warning. It warns in the following cases:

    - When a translation unit is missing terminating #pragma pack (pop) directives.
    - When entering an included file if the current alignment value as determined
      by '#pragma pack' directives is different from the default alignment value.
    - When leaving an included file that changed the state of the current alignment
      value.

    rdar://10184173

    Differential Revision: https://reviews.llvm.org/D35484 — arphaman / detail

#180 (Jul 26, 2017 4:28:18 AM)

  1. [COFF, ARM64] Fix symbol offsets in ADRP/ADD/LDR/STR relocations

    In COFF, a symbol offset can't be stored in the relocation (as is
    done in ELF or MachO), but is stored as the immediate in the
    instruction itself. The immediate in the ADRP thus is the symbol
    offset in bytes, not in pages. For the PAGEOFFSET_12A/L relocations,
    ignore any offset outside of the lowest 12 bits; they won't have any
    effect on the ADD/LDR/STR instruction itself but only on the associated
    ADRP.

    This is similar to how the same issue is handled for MOVW/MOVT
    instructions in ELF (see e.g. SVN r307713, and r307728 in lld).

    This fixes "fixup out of range" errors while building larger object
    files, where temporary symbols end up as a plain section symbol and
    an offset, and fixes any cases where the symbol offset mean that
    the actual target ended up on a different page than the symbol
    itself.

    Differential Revision: https://reviews.llvm.org/D35791 — mstorsjo / detail
  2. [X86] Add urem vector test for non-uniform pow2 constants — rksimon / detail
  3. [X86] Regenerated urem pow2 tests on 32/64 bit targets — rksimon / detail
  4. [X86] Regenerated umul overflow tests on 32/64 bit targets — rksimon / detail
  5. [ARM] GlobalISel: Map G_GLOBAL_VALUE to GPR

    A G_GLOBAL_VALUE is basically a pointer, so it should live in the GPR. — rovka / detail
  6. [X86][AVX] Regenerated and cleaned up AVX1 intrinsic tests.

    Cleaned up triple settings, added 32-bit/64-bit targets where useful, added broadcast comments — rksimon / detail
  7. [X86][AVX2] Regenerated and cleaned up broadcast tests. — rksimon / detail
  8. [X86][AVX512] Regenerated and added 32-bit targets to select tests — rksimon / detail
  9. [X86][AVX] Regenerated and cleaned up masked gather/scatter tests.

    Remove unused KNL checks and triple settings, added broadcast comments — rksimon / detail
  10. [X86][AVX] Regenerate lzcnt test.

    Tidied up triples and checks. — rksimon / detail
  11. [globalisel][tablegen] Fuse the generated tables together.

    Summary:
    Now that we have control flow in place, fuse the per-rule tables into a
    single table. This is a compile-time saving at this point. However, this will
    also enable the optimization of a table so that similar instructions can be
    tested together, reducing the time spent on the matching the code.

    This is NFC in terms of externally visible behaviour but some internals have
    changed slightly. State.MIs is no longer reset between each rule that is
    attempted because it's not necessary to do so. As a consequence of this the
    restriction on the order that instructions are added to State.MIs has been
    relaxed to only affect recorded instructions that require new elements to be
    added to the vector. GIM_RecordInsn can now write to any element from 1 to
    State.MIs.size() instead of just State.MIs.size().

    Reviewers: ab, t.p.northover, qcolombet, rovka, aditya_nandakumar

    Reviewed By: rovka

    Subscribers: kristof.beyls, igorb, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35681 — dsanders / detail
  12. [X86][FMA] Regenerate test with broadcast comments. — rksimon / detail
  13. Follow up for r307085: a better fix for a dangling StringRef. — alexfh / detail
  14. [ARM] GlobalISel: Mark G_GLOBAL_VALUE as legal — rovka / detail
  15. Update after LLVM change r309087 — grimar / detail
  16. [libOption] - Add flag allowing to print options aliases in help text.

    By default, we display only options that are not
    hidden and have help texts. This patch adds flag
    allowing to display aliases that have no help text.
    In this case help text of aliased option used instead.

    Differential revision: https://reviews.llvm.org/D35476 — grimar / detail
  17. [X86][LLVM]Expanding Supports lowerInterleavedStore() in X86InterleavedAccess.

    This patch expands the support of lowerInterleavedStore to 32x8i stride 4.

    LLVM creates suboptimal shuffle code-gen for AVX2. In overall, this patch is a specific fix for the pattern (Strid=4 VF=32) and we plan to include more patterns in the future. To reach our goal of "more patterns". We include two mask creators. The first function creates shuffle's mask equivalent to unpacklo/unpackhi instructions. The other creator creates mask equivalent to a concat of two half vectors(high/low).

    The patch goal is to optimize the following sequence:
    At the end of the computation, we have ymm2, ymm0, ymm12 and ymm3 holding
    each 32 chars:

    c0, c1, , c31
    m0, m1, , m31
    y0, y1, , y31
    k0, k1, ., k31

    And these need to be transposed/interleaved and stored like so:

    c0 m0 y0 k0 c1 m1 y1 k1 c2 m2 y2 k2 c3 m3 y3 k3 ....

    Reviewers:
    dorit
    Farhana
    RKSimon
    guyblank
    DavidKreitzer

    Differential Revision: https://reviews.llvm.org/D34601 — mzuckerm / detail
  18. TargetLowering: Change isShuffleMaskLegal's mask argument type to ArrayRef<int>. NFCI.

    Changing mask argument type from const SmallVectorImpl<int>& to
    ArrayRef<int>.

    This came up in D35700 where a mask is received as an ArrayRef<int> and
    we want to pass it to TargetLowering::isShuffleMaskLegal().
    Also saves a few lines of code. — zvi / detail
  19. [X86][LLVM]Expanding Supports lowerInterleavedStore() in X86InterleavedAccess part1.

    splitting patch D34601 into two part. This part changes the location of two functions.
    The second part will be based on that patch. This was requested by @RKSimon.

    Reviewers:
    1. dorit
    2. Farhana
    3. RKSimon
    4. guyblank
    5. DavidKreitzer — mzuckerm / detail

#179 (Jul 26, 2017 12:23:00 AM)

  1. Revert "[sanitizer] Support compiler-rt builtins"

    This reverts commit fd63314d6770e0da62572a3fea2c41c4cc0fc58a. — phosek / detail
  2. Revert "[sanitizer] Support libc++abi in addition to libstdc++"

    This reverts commit d1997bff31cf6b484eb59c2ee1fc3155442e338c. — phosek / detail
  3. [clang] Add ARM64 support to armintr.h for MSVC compatibility

    Summary: This fixes compiling with headers from the Windows SDK for ARM64.

    Reviewers: compnerd, ruiu, mstorsjo

    Reviewed By: compnerd, mstorsjo

    Subscribers: mgorny, aemerson, javed.absar, kristof.beyls, llvm-commits, cfe-commits

    Differential Revision: https://reviews.llvm.org/D35862 — mgrang / detail

#178 (Jul 25, 2017 10:09:21 PM)

  1. [SCEV] Cache results of computeExitLimit

    This patch adds a cache for computeExitLimit to save compilation time. A lot of examples of
    tests that take extensive time to compile are attached to the bug 33494.

    Differential Revision: https://reviews.llvm.org/D35827 — mkazantsev / detail
  2. [X86] Prevent selecting masked aligned load instructions if the load should be non-temporal

    Summary: The aligned load predicates don't  suppress themselves if the load is non-temporal the way the unaligned predicates do. For the most part this isn't a problem because the aligned predicates are mostly used for instructions that only load the the non-temporal loads have priority over those. The exception are masked loads.

    Reviewers: RKSimon, zvi

    Reviewed By: RKSimon

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D35712 — ctopper / detail
  3. Add test coverage for new PM PGOOpt handling.

    Summary: This patch adds flags and tests to cover the PGOOpt handling logic in new PM.

    Reviewers: chandlerc, davide

    Reviewed By: chandlerc

    Subscribers: sanjoy, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35807 — dehao / detail
  4. [gold] Enable data-sections by default for the gold-plugin.

    Follow up to r309056. — davide / detail
  5. [sanitizer] Support libc++abi in addition to libstdc++

    This change adds sanitizer support for LLVM's libunwind and libc++abi
    as an alternative to libstdc++. This allows using the in tree version
    of libunwind and libc++abi which is useful when building a toolchain
    for different target.

    Differential Revision: https://reviews.llvm.org/D34501 — phosek / detail
  6. Add "REQUIRES: asserts" for test unswitch-equality-undef.ll. — wmi / detail
  7. [SCEV] Remove unnecessary call to forgetMemoizedResults

    `SCEVUnknown::allUsesReplacedWith` does not need to call `forgetMemoizedResults`
    since RAUW does a value-equivalent replacement by assumption.  If this
    assumption was false then the later setValPtr(New) call would be incorrect too.

    This is a non-trivial performance optimization for functions with a large number
    of loops since `forgetMemoizedResults` walks all loop backedge taken counts to
    see if any of them use the SCEVUnknown being RAUWed.  However, this improvement
    is difficult to demonstrate without checking in an excessively large IR file. — sanjoy / detail
  8. [lit] Attempt to fix Python unittest adaptor logic — rnk / detail

#177 (Jul 25, 2017 6:29:11 PM)

  1. Move manifest utils into separate lib, to reduce libxml2 deps.

    Summary:
    Previously were in support.  Since many many things depend on support,
    were all forced to also depend on libxml2, which we only want in a few cases.
    This puts all the libxml2 deps in a separate lib to be used only in a few
    places.

    Reviewers: ruiu, thakis, rnk

    Subscribers: mgorny, hiraditya, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35819 — ecbeckmann / detail
  2. [PDB] Remove stale GSI.h header that I intended to remove in the previous commit — rnk / detail
  3. [DWARF] Generalized verification of .apple_names accelerator table to be applicable to any acceleration table. Added verification for .apple_types, .apple_namespaces and .apple_objc sections.

    Differential Revision: https://reviews.llvm.org/D35853 — sgravani / detail
  4. [clang-tidy] Do not issue fixit for explicit template specializations

    Summary:

    Do not issue fixit in UnnecessaryValueParamCheck if the function is an explicit template specialization as this could cause build breakages.

    Reviewers: alexfh

    Subscribers: JDevlieghere, xazax.hun, cfe-commits

    Differential Revision: https://reviews.llvm.org/D35718 — flx / detail
  5. [PDB] Improve GSI hash table dumping for publics and globals

    The PDB "symbol stream" actually contains symbol records for the publics
    and the globals stream. The globals and publics streams are essentially
    hash tables that point into a single stream of records. In order to
    match cvdump's behavior, we need to only dump symbol records referenced
    from the hash table. This patch implements that, and then implements
    global stream dumping, since it's just a subset of public stream
    dumping.

    Now we shouldn't see S_PROCREF or S_GDATA32 records when dumping
    publics, and instead we should see those record in the globals stream. — rnk / detail
  6. Reapply "llvm-mt: implement simple merging of manifests, not factoring namespaces.

    This time with correct #if.

    This reverts commit 9cf4eca0e0383040c1ff1416815c7f649650c2a0. — ecbeckmann / detail
  7. [AArch64] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). — eugenezelenko / detail
  8. [StaticAnalyzer] LoopUnrolling - Attempt #2 to fix a crash in r309006. — szepet / detail
  9. [sanitizer] Support compiler-rt builtins

    This change adds support for compiler-rt builtins as an alternative
    compiler runtime to libgcc.

    Differential Revision: https://reviews.llvm.org/D35165 — phosek / detail
  10. Disable loop unswitching for some patterns containing equality comparison with undef.

    This is a workaround for the bug described in PR31652 and
    http://lists.llvm.org/pipermail/llvm-dev/2017-July/115497.html. The temporary
    solution is to add a function EqualityPropUnSafe. In EqualityPropUnSafe, for
    some simple patterns we can know the equality comparison may contains undef,
    so we regard such comparison as unsafe and will not do loop-unswitching for
    them. We also need to disable the select simplification when one of select
    operand is undef and its result feeds into equality comparison.

    The patch cannot clear the safety issue caused by the bug, but it can suppress
    the issue from happening to some extent.

    Differential Revision: https://reviews.llvm.org/D35811 — wmi / detail
  11. [CodeGen] Correctly model std::byte's aliasing properties

    std::byte, when defined as an enum, needs to be given special treatment
    with regards to its aliasing properties. An array of std::byte is
    allowed to be used as storage for other types.

    This fixes PR33916.

    Differential Revision: https://reviews.llvm.org/D35824 — majnemer / detail
  12. Debug Info: Support fragmented variables in the MMI side table

    This reapplies commit r309034 with a bugfix+test for inlined variables. — Adrian Prantl / detail
  13. [gold] Enable function-sections by default.

    This is needed, among others, to respect --section-ordering-file
    with LTO. I'll follow up with a similar change for data sections.

    I hope every version of gold available on the bots has support for
    --section-ordering file. — davide / detail
  14. Reorder tests to match latest SD-6 draft. — rsmith / detail
  15. clang/StaticAnalyzer/Core/PathSensitive/LoopUnrolling.h: Add a forward decl AnalysisManager, to unbreak modules build. — chapuni / detail
  16. Revert "llvm-mt: implement simple merging of manifests, not factoring namespaces."

    This reverts commit 813308e240792ca70ed2f998f21df24a5061ada0. — ecbeckmann / detail
  17. [clang] Add abi-breaking-checks support to clang

    Summary: You can now use REQUIRES:abi-breaking-checks in clang too

    Reviewers: chapuni, probinson, ddunbar, jroelofs

    Reviewed By: jroelofs

    Subscribers: jroelofs, cfe-commits

    Differential Revision: https://reviews.llvm.org/D35426 — mgrang / detail
  18. llvm-mt: implement simple merging of manifests, not factoring namespaces.

    Summary:
    Does a simple merge, where mergeable elements are combined, all others
    are appended.  Does not apply trickly namespace rules.

    Subscribers: llvm-commits, hiraditya

    Differential Revision: https://reviews.llvm.org/D35753 — ecbeckmann / detail
  19. Revert "Reland "[LLVM][llvm-objcopy] Added basic plumbing to get things started""

    This reverts commit 0d9d9250483761eb2f50236830161b0e2137d483. — phosek / detail
  20. [lit] Fix UnboundLocalError for invalid shtest redirects

    Replace the incorrect variable reference when invalid redirect is used.
    This fixes the following issue:

      File "/usr/src/llvm/utils/lit/lit/TestRunner.py", line 316, in processRedirects
        raise InternalShellError(cmd, "Unsupported redirect: %r" % (r,))
    UnboundLocalError: local variable 'r' referenced before assignment

    which in turn broke shtest-shell.py and max-failures.py lit tests.

    The breakage was introduced during refactoring in rL307310.

    Differential Revision: https://reviews.llvm.org/D35857 — mgorny / detail
  21. Reland "[LLVM][llvm-objcopy] Added basic plumbing to get things started"

    As discussed on llvm-dev I've implemented the first basic steps towards
    llvm-objcopy/llvm-objtool (name pending).

    This change adds the ability to copy (without modification) 64-bit
    little endian ELF executables that have SHT_PROGBITS, SHT_NOBITS,
    SHT_NULL and SHT_STRTAB sections.

    Patch by Jake Ehrlich

    Differential Revision: https://reviews.llvm.org/D33964 — phosek / detail
  22. [ubsan] Update a test missed in r309008, NFC — Vedant Kumar / detail

#176 (Jul 25, 2017 3:30:31 PM)

  1. Update the comments on default subtargets based on feedback. — echristo / detail
  2. [libFuzzer] don't disable msan for TracePC::CollectFeatures: this started to cause false positives in msan. No tests for libFuzzer+msan yet -- tests will need to wait until we move libFuzzer to compiler-rt — kcc / detail
  3. Revert "Reland "[LLVM][llvm-objcopy] Added basic plumbing to get things started""

    This reverts commit 960873b10dd071298c817ba74ef2228f94ead7a1. — phosek / detail
  4. [StaticAnalyzer] LoopUnrolling - Attempt to fix a crash in r309006. — szepet / detail
  5. Revert "Debug Info: Support fragmented variables in the MMI side table"

    This reverts commit r309034 because of a sanitizer issue. — Adrian Prantl / detail
  6. Debug Info: Support fragmented variables in the MMI side table

    <rdar://problem/17816343> — Adrian Prantl / detail
  7. [scudo] Check for pvalloc overflow

    Summary:
    Previously we were rounding up the size passed to `pvalloc` to the next
    multiple of page size no matter what. There is an overflow possibility that
    wasn't accounted for. So now, return null in the event of an overflow. The man
    page doesn't seem to indicate the errno to set in this particular situation,
    but the glibc unit tests go for ENOMEM (https://code.woboq.org/userspace/glibc/malloc/tst-pvalloc.c.html#54)
    so we'll do the same.
    Update the aligned allocation funtions tests to check for properly aligned
    returned pointers, and the `pvalloc` corner cases.

    @alekseyshl: do you want me to do the same in the other Sanitizers?

    Reviewers: alekseyshl

    Reviewed By: alekseyshl

    Subscribers: kubamracek, alekseyshl, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35818 — cryptoad / detail
  8. Reland "[LLVM][llvm-objcopy] Added basic plumbing to get things started"

    As discussed on llvm-dev I've implemented the first basic steps towards
    llvm-objcopy/llvm-objtool (name pending).

    This change adds the ability to copy (without modification) 64-bit
    little endian ELF executables that have SHT_PROGBITS, SHT_NOBITS,
    SHT_NULL and SHT_STRTAB sections.

    Patch by Jake Ehrlich

    Differential Revision: https://reviews.llvm.org/D33964 — phosek / detail
  9. [CMAKE] Speedup developer builds when passing LLVM_APPEND_VC_REV = OFF

    Make sure multiple targets don't get rebuilt unnecessarily when LLVM_APPEND_VC_REV = OFF.

    Differential Revision: https://reviews.llvm.org/D35377 — dhinton / detail
  10. [CMake] Fix broken builds from r309029

    Fixing the mismatched beginning if and endif contents. — cbieneman / detail
  11. [CMake] Allow TableGen.cmake to be included multiple times

    This patch allows TableGen.cmake to be safely included multiple times in sub-projects. — cbieneman / detail
  12. AMDGPU/SI: Fix Depth and Height computation for SI scheduler

    Patch by: Axel Davy

    Differential Revision: https://reviews.llvm.org/D34967 — mareko / detail
  13. AMDGPU/SI: Force exports at the end for SI scheduler

    Patch by: Axel Davy

    Differential Revision: https://reviews.llvm.org/D34965 — mareko / detail
  14. Fix a bot by linking clang-import-test against libclangDriver — Sean Callanan / detail

#175 (Jul 25, 2017 1:03:13 PM)

  1. [AArch64] Update a comment in a test

    The comment ended up outdated when the test was rewritten in SVN r192281.

    Differential Revision: https://reviews.llvm.org/D35543 — mstorsjo / detail
  2. [AArch64] Add a test for float argument passing to win64 vararg functions

    The existing tests only tested how a va_start is lowered.

    Differential Revision: https://reviews.llvm.org/D35540 — mstorsjo / detail
  3. [ExternalASTMerger] Import Objective-C classes

    This patch adds functionality and a test for importing Objective-C classes
    and their methods.

    It also adds a flag to clang-import-test to set the language used for
    parsing. This takes the same argument format as the -x option to the
    driver.

    Differential Revision: https://reviews.llvm.org/D35274 — Sean Callanan / detail
  4. [Frontend] Mark some ASTUnit methods as const. NFC.

    Patch by Hamza Sood!

    Differential Revision: https://reviews.llvm.org/D35729 — Vedant Kumar / detail
  5. [LTO] Prevent dead stripping and internalization of symbols with sections

    Summary:
    ELF linkers generate __start_<secname> and __stop_<secname> symbols
    when there is a value in a section <secname> where the name is a valid
    C identifier.  If dead stripping determines that the values declared
    in section <secname> are dead, and we then internalize (and delete)
    such a symbol, programs that reference the corresponding start and end
    section symbols will get undefined reference linking errors.

    To fix this, add the section name to the IRSymtab entry when a symbol is
    defined in a specific section. Then use this in the gold-plugin to mark
    the symbol as external and visible from outside the summary when the
    section name is a valid C identifier.

    Reviewers: pcc

    Subscribers: mehdi_amini, inglorion, eraman, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35639 — tejohnson / detail
  6. [ubsan] -fsanitize=vptr now requires -fsanitize=null, update tests

    See: https://bugs.llvm.org/show_bug.cgi?id=33881 — Vedant Kumar / detail
  7. [ubsan] Null-check pointers in -fsanitize=vptr (PR33881)

    The instrumentation generated by -fsanitize=vptr does not null check a
    user pointer before loading from it. This causes crashes in the face of
    UB member calls (this=nullptr), i.e it's causing user programs to crash
    only after UBSan is turned on.

    The fix is to make run-time null checking a prerequisite for enabling
    -fsanitize=vptr, and to then teach UBSan to reuse these run-time null
    checks to make -fsanitize=vptr safe.

    Testing: check-clang, check-ubsan, a stage2 ubsan-enabled build

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

    https://bugs.llvm.org/show_bug.cgi?id=33881 — Vedant Kumar / detail
  8. [StaticAnalyzer] Completely unrolling specific loops with known bound option

    This feature allows the analyzer to consider loops to completely unroll.
    New requirements/rules (for unrolling) can be added easily via ASTMatchers.

    Right now it is hidden behind a flag, the aim is to find the correct heuristic
    and create a solution which results higher coverage % and more precise
    analysis, thus can be enabled by default.

    Right now the blocks which belong to an unrolled loop are marked by the
    LoopVisitor which adds them to the ProgramState.
    Then whenever we encounter a CFGBlock in the processCFGBlockEntrance which is
    marked then we skip its investigating. That means, it won't be considered to
    be visited more than the maximal bound for visiting since it won't be checked. — szepet / detail
  9. Revert "This patch enables the usage of constant Enum identifiers within Microsoft style inline assembly statements."

    This reverts commit r308966. — echristo / detail
  10. Revert "This patch enables the usage of constant Enum identifiers within Microsoft style inline assembly statements." as it is causing msan failures.

    This reverts commits r308985 and r308965 — echristo / detail
  11. [PowerPC] Pretty-print CR bits the way the binutils disassembler does

    This patch just adds printing of CR bit registers in a more human-readable
    form akin to that used by the GNU binutils.

    Differential Revision: https://reviews.llvm.org/D31494 — nemanjai / detail
  12. Only scan global sections containing data in LSan on darwin

    Summary:
    __DATA segments on Darwin contain a large number of separate sections,
    many of which cannot actually contain pointers, and contain const values or
    objc metadata. Not scanning sections which cannot contain pointers significantly
    improves performance.

    On a medium-sized (~4000 files) internal project, I saw a speedup of about 30%
    in standalone LSan's execution time (30% improvement in the time spent running
    LSan, not the total program time).

    Reviewers: kcc, kubamracek, alekseyshl

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D35432 — fjricci / detail
  13. Introduce -nostdlib++ flag to disable linking the C++ standard library.

    Projects that want to statically link their own C++ standard library currently
    need to pass -nostdlib or -nodefaultlibs, which also disables linking of the
    builtins library, -lm, and so on. Alternatively, they could use `clang` instead
    of `clang++`, but that already disables implicit addition of -lm on some
    toolchains.

    Add a dedicated flag -nostdlib++ that disables just linking of libc++ /
    libstdc++. This is analogous to -nostdinc++.

    https://reviews.llvm.org/D35780 — nico / detail
  14. [coroutines] Add serialization/deserialization of coroutines

    Reviewers: rsmith

    Reviewed By: rsmith

    Subscribers: EricWF, cfe-commits

    Differential Revision: https://reviews.llvm.org/D35383 — gornishanov / detail

#174 (Jul 25, 2017 11:02:14 AM)

  1. [PowerPC] - Recommit r304907 now that the issue has been fixed

    This is just a recommit since the issue that the commit exposed is now
    resolved. — nemanjai / detail
  2. [docs] Fix a typo: iteratation -> iteration

    Reviewers: dgross

    Reviewed By: dgross

    Subscribers: dgross, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35822 — srhines / detail
  3. Fix unused variable warning with MemoryMappedSegment private data — fjricci / detail
  4. [analyzer] Add diagnostic text for generalized refcount annotations.

    Add a 'Generalized' object kind to the retain-count checker and suitable
    generic diagnostic text for retain-count diagnostics involving those objects.

    For now the object kind is introduced in summaries by 'annotate' attributes.
    Once we have more experience with these annotations we will propose explicit
    attributes.

    Patch by Malhar Thakkar!

    Differential Revision: https://reviews.llvm.org/D35613 — Devin Coughlin / detail
  5. [X86][CGP] Reduce memcmp() expansion to 2 load pairs (PR33914)

    D35067/rL308322 attempted to support up to 4 load pairs for memcmp inlining which resulted in regressions for some optimized libc memcmp implementations (PR33914).

    Until we can match these more optimal cases, this patch reduces the memcmp expansion to a maximum of 2 load pairs (which matches what we do for -Os).

    This patch should be considered for the 5.0.0 release branch as well

    Differential Revision: https://reviews.llvm.org/D35830 — rksimon / detail
  6. This test case is causing all PPC and SystemZ bots to remain red.

    Notifying the author via Diffusion did not yield any answer. Therefore, I'm
    adding the missing triple. I have no idea if this is the intended triple, but
    it seems to fit the bill and should turn the bots back to green.
    If the intended triple is a different one, please feel free to change it but I
    need make this change to turn the bots back to green now. — nemanjai / detail
  7. Revert "[compiler-rt] Include thread ID into sanitizers logs"

    This improvement introduce additional dependencies on sandboxed environments.

    This reverts commit r308637. — Vitaly Buka / detail
  8. [DAG] Move DAGCombiner::GetDemandedBits to SelectionDAG

    This patch moves the DAGCombiner::GetDemandedBits function to SelectionDAG::GetDemandedBits as a first step towards making it easier for targets to get to the source of any demanded bits without the limitations of SimplifyDemandedBits.

    Differential Revision: https://reviews.llvm.org/D35841 — rksimon / detail
  9. [X86] Regenerate test. — rksimon / detail
  10. [X86] Regenerate test with broadcast comments. — rksimon / detail

#173 (Jul 25, 2017 8:55:57 AM)

  1. [OPENMP] Codegen for 'task_reduction' clause.

    Added codegen for taskgroup directive with task_reduction clause.
    ```
    <body>
    ```
    The next code is emitted:
    ```
    %struct.kmp_task_red_input_t red_init[n];
    void *td;
    call void @__kmpc_taskgroup(%ident_t id, i32 gtid)
    ...
    red_init[i].shar = &<item>;
    red_init[i].size = sizeof(<item>);
    red_init[i].init = (void*)initializer_function;
    red_init[i].fini = (void*)destructor_function;
    red_init[i].comb = (void*)combiner_function;
    red_init[i].flags = flags;
    ...
    td = call i8* @__kmpc_task_reduction_init(i32 gtid, i32 n, i8*
    (void*)red_init);
    call void @__kmpc_end_taskgroup(%ident_t id, i32 gtid)

    void initializer_function(i8* priv) {
      *(<type>*)priv = <red_init>;
      ret void;
    }

    void destructor_function(i8* priv) {
      (<type>*)priv->~();
      ret void;
    }

    void combiner_function(i8* inout, i8* in) {
      *(<type>*)inout = *(<type>*)inout <red_id> *(<type>*)in;
      ret void;
    }
    ``` — abataev / detail
  2. [Sparc] invalid adjustments in TLS_LE/TLS_LDO relocations removed

    Summary:
    Some SPARC TLS relocations were applying nontrivial adjustments
    to zero value, leading to unexpected non-zero values in ELF and then
    Solaris linker failures.

    Getting rid of these adjustments.

    Fixes PR33825.

    Reviewers: rafael, asb, jyknight

    Subscribers: joerg, jyknight, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35567 — fedor.sergeev / detail
  3. Add address ranges for individual macho sections on darwin

    Summary:
    This is a re-upload of the reverted commit r308644. It has changed quite
    a bit to reflect post-commit comments by kcc, so I'm re-uploading as
    a new review.

    Reviewers: kubamracek, alekseyshl, kcc

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D35799 — fjricci / detail
  4. [clang-tidy] Fixup clang-apply-replacements/invalid-files test — kfunk / detail
  5. [clang-tidy] clang-apply-replacements: Don't insert null entry

    Summary:
    [clang-tidy] clang-apply-replacements: Don't insert null entry

    Fix crash when running clang-apply-replacements on YML files which
    contain an invalid file path. Make sure we never add a nullptr into the
    map. The previous code started adding nullptr to the map after the first
    warnings via errs() has been emitted.

    Backtrace:
    ```
    Starting program:
    /home/kfunk/devel/build/llvm/bin/clang-apply-replacements /tmp/tmpIqtp7m
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library
    "/lib/x86_64-linux-gnu/libthread_db.so.1".
    Described file '.moc/../../../../../../src/qt5.8/qtremoteobjects/src/remoteobjects/qremoteobjectregistrysource_p.h' doesn't exist. Ignoring...
    ...

    Program received signal SIGSEGV, Segmentation fault.
    main (argc=<optimized out>, argv=<optimized out>) at /home/kfunk/devel/src/llvm/tools/clang/tools/extra/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp:262
    (gdb) p FileAndReplacements.first
    $1 = (const clang::FileEntry *) 0x0
    (gdb)
    ```

    Added tests.

    Before patch:

    ```
    ******************** TEST 'Clang Tools :: clang-apply-replacements/invalid-files.cpp' FAILED ********************
    Script:
    --
    mkdir -p /home/kfunk/devel/build/llvm/tools/clang/tools/extra/test/clang-apply-replacements/Output/Inputs/invalid-files
    clang-apply-replacements /home/kfunk/devel/build/llvm/tools/clang/tools/extra/test/clang-apply-replacements/Output/Inputs/invalid-files
    ls -1 /home/kfunk/devel/build/llvm/tools/clang/tools/extra/test/clang-apply-replacements/Output/Inputs/invalid-files | FileCheck /home/kfunk/devel/src/llvm/tools/clang/tools/extra/test/clang-apply-replacements/invalid-files.cpp --check-prefix=YAML
    --
    Exit Code: 139

    Command Output (stderr):
    --
    Described file 'idonotexist.h' doesn't exist. Ignoring...
    /home/kfunk/devel/build/llvm/tools/clang/tools/extra/test/clang-apply-replacements/Output/invalid-files.cpp.script: line 4:  9919 Segmentation fault      clang-apply-replacements /home/kfunk/devel/build/llvm/tools/clang/tools/extra/test/clang-apply-   replacements/Output/Inputs/invalid-files

    --
    ```

    After Patch:

    ```
    PASS: Clang Tools :: clang-apply-replacements/invalid-files.cpp (5 of 6)
    ```

    Reviewers: alexfh, yawanng

    Reviewed By: alexfh

    Subscribers: cfe-commits, klimek, JDevlieghere, xazax.hun

    Tags: #clang-tools-extra

    Differential Revision: https://reviews.llvm.org/D35194 — kfunk / detail
  6. X86 Asm uses assertions instead of proper diagnostic. This patch fixes that.

    Differential Revision: https://reviews.llvm.org/D35115 — avt77 / detail

#172 (Jul 25, 2017 4:48:04 AM)

  1. [clangd] Reuse compile commands during reparse

    Summary:
    Previously we always queried the compilation database and discarded the results
    if the file was already opened.

    Reviewers: ilya-biryukov

    Reviewed By: ilya-biryukov

    Subscribers: cfe-commits

    Differential Revision: https://reviews.llvm.org/D35825 — krasimir / detail
  2. Fix spelling of FileCheck in test. — klimek / detail
  3. [LIR] Teach LIR to avoid extending the BE count prior to adding one to
    it when safe.

    Very often the BE count is the trip count minus one, and the plus one
    here should fold with that minus one. But because the BE count might in
    theory be UINT_MAX or some such, adding one before we extend could in
    some cases wrap to zero and break when we scale things.

    This patch checks to see if it would be safe to add one because the
    specific case that would cause this is guarded for prior to entering the
    preheader. This should handle essentially all of the common loop idioms
    coming out of C/C++ code once canonicalized by LLVM.

    Before this patch, both forms of loop in the added test cases ended up
    subtracting one from the size, extending it, scaling it up by 8 and then
    adding 8 back onto it. This is really silly, and it turns out made it
    all the way into generated code very often, so this is a surprisingly
    important cleanup to do.

    Many thanks to Sanjoy for showing me how to do this with SCEV.

    Differential Revision: https://reviews.llvm.org/D35758 — chandlerc / detail
  4. [PM] Setup TargetLibraryInfo correctly for the new pass manager.

    Without this, -fno-builtin and friends doesn't work. Added the obvious
    RUN lines to the test for -fno-builtin and they pass now. — chandlerc / detail
  5. This patch enables the usage of constant Enum identifiers within Microsoft style inline assembly statements.

    Differential Revision:
    https://reviews.llvm.org/D33277
    https://reviews.llvm.org/D33278 — mharoush / detail
  6. This patch enables the usage of constant Enum identifiers within Microsoft style inline assembly statements.

    Differential Revision:
    https://reviews.llvm.org/D33277
    https://reviews.llvm.org/D33278 — mharoush / detail
  7. [tests] Cleanup vect.omp.persistence.ll test. — Michael Zolotukhin / detail
  8. [X86] Add 24-byte memcmp tests (PR33914) — rksimon / detail
  9. Fix incorrect use of current directory to find moved paths in ASTReader.

    CurrentDir was set as the path of the current module, but that can change as
    part of a chain of loaded modules.

    When we try to locate a file mentioned in a module that does not exist, we use
    a heuristic to look at the relative path between the original location of the
    module and the file we look for, and use that relatively to the CurrentDir.

    This only works if CurrentDir is the same as the (current) path of the module
    file the file was mentioned in; if it is not, we look at the path relatively to
    the wrong directory, and can end up reading random unrelated files that happen
    to have the same name.

    This patch fixes this by using the BaseDirectory of the module file the file
    we look for was mentioned in instead of the CurrentDir heuristic.

    Differential Revision: https://reviews.llvm.org/D35828 — klimek / detail
  10. [analyzer] Treat throws as sinks for suppress-on-sink purposes.

    Because since r308957 the suppress-on-sink feature contains its own
    mini-analysis, it also needs to become aware that C++ unhandled exceptions
    cause sinks. Unfortunately, for now we treat all exceptions as unhandled in
    the analyzer, so suppress-on-sink needs to do the same.

    rdar://problem/28157554

    Differential Revision: https://reviews.llvm.org/D35674 — dergachev / detail
  11. Fix endianness bug in DAGCombiner::visitTRUNCATE and visitEXTRACT_VECTOR_ELT

    Summary:
    Do not assume little endian architecture in DAGCombiner::visitTRUNCATE and DAGCombiner::visitEXTRACT_VECTOR_ELT.
    PR33682

    Reviewers: hfinkel, sdardis, RKSimon

    Reviewed By: sdardis, RKSimon

    Subscribers: uabelho, RKSimon, sdardis, llvm-commits

    Differential Revision: https://reviews.llvm.org/D34990 — fpichet / detail
  12. [clangd] Workaround Windows test failures.

    To properly fix this, Unix-specific paths should not be used when
    running tests on Windows. — ibiryukov / detail
  13. [analyzer] Further improve suppress-on-sink behavior in incomplete analyses.

    If a certain memory leak (or other similar bug) found by the analyzer is known
    to be happening only before abnormal termination of the program ("sink", eg.
    assertion failure in the code under analysis, or another bug that introduces
    undefined behavior), such leak warning is discarded. However, if the analysis
    has never reaches completion (due to complexity of the code), it may be
    failing to notice the sink.

    This commit further extends the partial solution introduced in r290341 to cover
    cases when a complicated control flow occurs before encountering a no-return
    statement (which anyway inevitably leads to such statement(s)) by traversing
    the respective section of the CFG in a depth-first manner. A complete solution
    still seems elusive.

    rdar://problem/28157554

    Differential Revision: https://reviews.llvm.org/D35673 — dergachev / detail

#171 (Jul 25, 2017 2:25:52 AM)

  1. [ARM] Enable partial and runtime unrolling

    Enable runtime and partial loop unrolling of simple loops without
    calls on M-class cores. The thresholds are calculated based on
    whether the target is Thumb or Thumb-2.

    Differential Revision: https://reviews.llvm.org/D34619 — sam_parker / detail
  2. [clang-tidy] Handle incomplete types in bugprone-undefined-memory-manipulation
    check

    Patch by: Reka Nikolett Kovacs

    Differential Revision: https://reviews.llvm.org/D35790 — xazax / detail
  3. [COFF] ARM64 support for COFFImportFile

    A test will be committed separately in the lld repo.

    Differential Revision: https://reviews.llvm.org/D35766 — mstorsjo / detail

#170 (Jul 24, 2017 10:41:03 PM)

  1. [AArch64] Reserve a 16 byte aligned amount of fixed stack for win64 varargs

    Create a dummy 8 byte fixed object for the unused slot below the first
    stored vararg.

    Alternative ideas tested but skipped: One could try to align the whole
    fixed object to 16, but I haven't found how to add an offset to the stack
    frame used in LowerWin64_VASTART.

    If only the size of the fixed stack object size is padded but not the offset, via
    MFI.CreateFixedObject(alignTo(GPRSaveSize, 16), -(int)GPRSaveSize, false),
    PrologEpilogInserter crashes due to "Attempted to reset backwards range!".

    This fixes misconceptions about where registers are spilled, since
    AArch64FrameLowering.cpp assumes the offset from fixed objects is
    aligned to 16 bytes (and the Win64 case there already manually aligns
    the offset to 16 bytes).

    This fixes cases where local stack allocations could overwrite callee
    saved registers on the stack.

    Differential Revision: https://reviews.llvm.org/D35720 — mstorsjo / detail
  2. DWARFVerifier.cpp: Fix -m32 in r308928. Use PRIx64. — chapuni / detail

#169 (Jul 24, 2017 8:27:10 PM)

  1. [NFC] Use RAII to un-poison and then re-poison __VA_ARGS__
      - This will also be used for the forthcoming __VA_OPT__ feature approved for C++2a.
      - recommended by rsmith during his review of the __VA_OPT__ patch (https://reviews.llvm.org/D35782) — faisalv / detail
  2. [libFuzzer] make one test faster, fix compiler warnings in tests — kcc / detail
  3. [sanitizer-coverage] simplify the code, NFC — kcc / detail
  4. [DWARF] Modified test for die ranges verification so that it doesn't fail on windows hosts. — sgravani / detail
  5. llvm/test/CMakeLists.txt: Add llvm-rc to LLVM_TEST_DEPENDS. — chapuni / detail

#168 (Jul 24, 2017 6:15:15 PM)

  1. llvm-rc: Fixup for r308940. This should use LLVMSupport. — chapuni / detail
  2. Add an empty shell of llvm-rc.

    This starts the development on one of MS Visual Studio binutils,
    Resource Converter. The tool compiles resource scripts (.rc)
    into binary resource files (.res).

    The current implementation does nothing but parse the command
    line arguments. It is going to be extended in the future.

    Differential Revision: https://reviews.llvm.org/D35810 — mnbvmar / detail
  3. Debug Info: Avoid completing class types when a definition is in a module.

    This patch adds an early exit to CGDebugInfo::completeClassData() when
    compiling with -gmodules and the to-be-completed type is available in
    a clang module.

    rdar://problem/23599990 — Adrian Prantl / detail
  4. [Analysis] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). — eugenezelenko / detail
  5. Remove addtional parameters in function std::next() and std::prev()

    Creating a function pointer with proper parameters pointing to std::next() or std::prev() should work.
    This change moves the invented paramater for enable_if over to the return type to resolve this QoI issue.

    Patch by Jason Liu.

    Differential Revision: https://reviews.llvm.org/D34649 — rcraik / detail

#167 (Jul 24, 2017 3:01:34 PM)

  1. Add .pyc files to .gitignore to compiler-rt

    During testing .pyc temporary files appear, which may be annoying.
    Did not change SVN ignore, as it was heavily out of sync with GIT one.

    Differential Revision: D35815 — George Karpenkov / detail
  2. [Sanitizers] TSan allocator set errno on failure.

    Summary:
    Set proper errno code on allocation failures and change realloc, pvalloc,
    aligned_alloc, memalign and posix_memalign implementation to satisfy
    their man-specified requirements.

    Modify allocator API implementation to bring it closer to other
    sanitizers allocators.

    Reviewers: dvyukov

    Subscribers: llvm-commits, kubamracek

    Differential Revision: https://reviews.llvm.org/D35690 — alekseyshl / detail
  3. [DWARF] Added verification check for die ranges. If highPC is an address, then it should be greater than lowPC for each range.

    Differential Revision: https://reviews.llvm.org/D35733 — sgravani / detail
  4. Revert "[X86][InlineAsm][Ms Compatibility]Prefer variable name over a register when the two collides"

    This reverts r308867 and r308866.

    It broke the sanitizer-windows buildbot on C++ code similar to the
    following:

      namespace cl { }
      void f() {
        __asm {
          mov al, cl
        }
      }

    t.cpp(4,13):  error: unexpected namespace name 'cl': expected expression
        mov al, cl
                ^

    In this case, MSVC parses 'cl' as a register, not a namespace. — rnk / detail
  5. Splitting out test for Darwin for print-stack-trace:

    New default symbolizer can not symbolize inlined function which appear
    under -O3. — George Karpenkov / detail
  6. Small tweak to one check in error handling to the dyld compact export
    entries in libObject (done in r308690).  In the case when the last node
    has no children setting State.Current = Children + 1; where that would be past
    Trie.end() is actually ok since the pointer is not used with zero children.

    rdar://33490512 — enderby / detail
  7. [mips] Switch asm to __asm__ for non-GNU compiles.

    Summary:
    Using asm works fine for gnu11, but fails if the compiler uses C11.
    Switch to the more consistent __asm__, since that is what the rest of
    the source is using.

    Reviewers: petarj

    Reviewed By: petarj

    Subscribers: llvm-commits, sdardis, arichardson, pirama

    Differential Revision: https://reviews.llvm.org/D35756 — srhines / detail
  8. [clang-format] Reorder assignments, NFC — krasimir / detail

#166 (Jul 24, 2017 12:50:49 PM)

  1. Followup to r308890: don't assert the llvm llvm version number. — jyknight / detail
  2. [Hexagon] Recognize C4_cmpneqi, C4_cmpltei and C4_cmplteui in NewValueJump — kparzysz / detail
  3. Move DWARFSectionMap to a .cpp file.

    Thanks to Paul Robinson for the suggestion. — rafael / detail
  4. test-release.sh: Fix phase2 and phase3 binary comparision

    Summary:
    scudo_utils.cpp.o from compiler-rt has one of the host compiler's builtin
    include paths stored in the .debug_line section.  So we need to do
    sed 's,Phase1,Phase2,g` on the Phase2 object file so it matches Phase3.

    Reviewers: hans

    Reviewed By: hans

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D34989 — tstellar / detail
  5. Revert "Revert "[libFuzzer] Add a dependency on symbolizer from libFuzzer tests""

    This reverts commit 15425f2bc6eac6249ee957a2a280511306c07547.

    Should work now that atos is a default symbolizer on Darwin. — George Karpenkov / detail
  6. Adding base test for interleave store VF16 and expand the test for AVX512
    This patch doesn't modifay any non test file. — mzuckerm / detail
  7. Prefer atos to llvm-symbolizer on Darwin

    atos is the default symbolizer on Apple's compiler for quite a few years now.
    llvm-symbolizer is quite fragile on Darwin: for example, unless a .dSYM
    file was explicitly generated symbolication would not work.
    It is also very convenient when the behavior of LLVM open source
    compiler matches to that of Apple's compiler on Apple's platform.
    Furthermore, llvm-symbolizer is not installed on Apple's platform by
    default, which leads to strange behavior during debugging: the test
    might fail under lit (where it has llvm-symbolizer) but would run
    properly when launched on the command line (where it does not, and atos
    would be used).

    Indeed, there's a downside: atos does not work properly with inlined
    functions, hence the test change.
    We do not think that this is a major problem, as users would often
    compile with -O0 when debugging, and in any case it is preferable to
    symbolizer not being able to symbolize.

    Differential Revision: https://reviews.llvm.org/D35745 — George Karpenkov / detail
  8. [scudo] Fix QuarantineChunksUpToSize failing test on AArch64

    Summary:
    Warm-up the other 2 sizes used by the tests, which should get rid of a failure
    on AArch64.

    Reviewers: alekseyshl

    Reviewed By: alekseyshl

    Subscribers: aemerson, rengolin, llvm-commits, kristof.beyls

    Differential Revision: https://reviews.llvm.org/D35806 — cryptoad / detail
  9. RA: Replace asserts related to empty live intervals

    These don't exactly assert the same thing anymore, and
    allow empty live intervals with non-empty uses.

    Removed in r308808 and r308813. — arsenm / detail
  10. [AArch64] Adjust the cost model for Exynos M1 and M2

    Fine tune the resources in a couple of ASIMD loads. — evandro / detail
  11. AMDGPU: Fix allocating pseudo-registers

    There's no need for these to be part of a class since
    they are immediately replaced. New unreachable hit in
    existing tests.' — arsenm / detail
  12. Revert "Debug: handle dumping the D language."

    Reid beat me to it. — Tim Northover / detail
  13. Debug: handle dumping the D language.

    Mostly just to silence a warning about an unhandled case. There don't seem to
    be any tests for this operator (at least that I could find). — Tim Northover / detail
  14. [CMake] Remove redundant logic in runtimes/CMakeList.txt

    Summary:
    `SUB_CHECK_TARGETS` contains all test targets in `SUB_COMPONENTS` when
    we load `Components.cmake`. We don't need to add those targets
    again and having duplicate targets will break the cmake policy CMP0002.

    Reviewers: phosek

    Subscribers: mgorny, llvm-commits, srhines, pirama

    Differential Revision: https://reviews.llvm.org/D35692 — aoli / detail
  15. [CodeGen] Propagate dllexport to thunks

    Under Windows Itanium, we need to export virtual and non-virtual thunks
    if the functions being thunked are exported. These thunks would
    previously inherit their dllexport attribute from the declaration, but
    r298330 changed declarations to not have dllexport attributes. We
    therefore need to add the dllexport attribute to the definition
    ourselves now. This is consistent with MinGW GCC's behavior.

    This redoes r306770 but limits the logic to Itanium. MicrosoftCXXABI's
    setThunkLinkage ensures that thunks aren't exported under that ABI, so
    I'm handling this in ItaniumCXXABI's setThunkLinkage for symmetry.

    We need to export these thunks because they can be referenced outside
    the library they're defined in. For example, if a child class without a
    key function inherits from a parent class with a key function, the
    parent's thunks will only be defined in the library with the key
    function, but the construction vtable for the parent in the child might
    be emitted outside the library (since the child doesn't have a key
    function), and it needs to reference the parent's thunks.

    We don't need to mark these thunks as imported since any references to
    them will occur in data, so the compiler can't generate the IAT load
    sequence anyway. Instead, we rely on the linker generating import thunks
    for the thunks.

    Differential Revision: https://reviews.llvm.org/D34972 — smeenai / detail
  16. AArch64 & ARM: move TargetInfo functions from .h to .cpp file. NFC.

    Most of them are virtual anyway, and the few remaining ones can move to the
    .cpp for consistency. — Tim Northover / detail
  17. Work around an MSVC2017 update 3 codegen bug.

    C2017 update 3 produces a clang that crashes when compiling clang. Disabling
    optimizations for StmtProfiler::VisitCXXOperatorCallExpr() makes the crash go
    away.

    Patch from Bruce Dawson <brucedawson@chromium.org>!
    https://reviews.llvm.org/D35757 — nico / detail
  18. Add missing case to switch — rnk / detail
  19. [CodeGenPrepare] Cut off FindAllMemoryUses if there are too many uses.

    This avoids excessive compile time. The case I'm looking at is
    Function.cpp from an old version of LLVM that still had the giant memcmp
    string matcher in it. Before r308322 this compiled in about 2 minutes,
    after it, clang takes infinite* time to compile it. With this patch
    we're at 5 min, which is still bad but this is a pathological case.

    The cut off at 20 uses was chosen by looking at other cut-offs in LLVM
    for user scanning. It's probably too high, but does the job and is very
    unlikely to regress anything.

    Fixes PR33900.

    * I'm impatient and aborted after 15 minutes, on the bug report it was
      killed after 2h. — d0k / detail
  20. [codeview] Emit 'D' as the cv source language for D code

    This matches DMD:
    https://github.com/dlang/dmd/blob/522263965cf3a27ed16b31f3c3562db86cdeabec/src/ddmd/backend/cv8.c#L199

    Fixes PR33899. — rnk / detail
  21. Format some case labels and shrink an anonymous namespace NFC — rnk / detail
  22. NFC. Fixed typos in the comments. — ibiryukov / detail
  23. [scudo] Quarantine overhaul

    Summary:
    First, some context.

    The main feedback we get about the quarantine is that it's too memory hungry.
    A single MB of quarantine will have an impact of 3 to 4MB of PSS/RSS, and
    things quickly get out of hand in terms of memory usage, and the quarantine
    ends up disabled.

    The main objective of the quarantine is to protect from use-after-free
    exploitation by making it harder for an attacker to reallocate a controlled
    chunk in place of the targeted freed chunk. This is achieved by not making it
    available to the backend right away for reuse, but holding it a little while.

    Historically, what has usually been the target of such attacks was objects,
    where vtable pointers or other function pointers could constitute a valuable
    targeti to replace. Those are usually on the smaller side. There is barely any
    advantage in putting the quarantine several megabytes of RGB data or the like.

    Now for the patch.

    This patch introduces a new way the Quarantine behaves in Scudo. First of all,
    the size of the Quarantine will be defined in KB instead of MB, then we
    introduce a new option: the size up to which (lower than or equal to) a chunk
    will be quarantined. This way, we only quarantine smaller chunks, and the size
    of the quarantine remains manageable. It also prevents someone from triggering
    a recycle by allocating something huge. We default to 512 bytes on 32-bit and
    2048 bytes on 64-bit platforms.

    In details, the patches includes the following:
    - introduce `QuarantineSizeKb`, but honor `QuarantineSizeMb` if set to fall
      back to the old behavior (meaning no threshold in that case);
      `QuarantineSizeMb` is described as deprecated in the options descriptios;
      documentation update will follow;
    - introduce `QuarantineChunksUpToSize`, the new threshold value;
    - update the `quarantine.cpp` test, and other tests using `QuarantineSizeMb`;
    - remove `AllocatorOptions::copyTo`, it wasn't used;
    - slightly change the logic around `quarantineOrDeallocateChunk` to accomodate
      for the new logic; rename a couple of variables there as well;

    Rewriting the tests, I found a somewhat annoying bug where non-default aligned
    chunks would account for more than needed when placed in the quarantine due to
    `<< MinAlignment` instead of `<< MinAlignmentLog`. This is fixed and tested for
    now.

    Reviewers: alekseyshl, kcc

    Reviewed By: alekseyshl

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D35694 — cryptoad / detail
  24. [OPENMP] Fix the restrictions for in_reduction clause.

    This patch allows to use in_reduction clause even if the innermost
    directive is not taskgroup. — abataev / detail
  25. [clang-format] Fix comment levels between '} else {' and PPDirective.

    Summary:
    This fixes a regression exposed by r307795 and rL308725 in which the level of a
    comment line between '} else {' and a preprocessor directive is incorrectly set
    as the level of the '} else {' line. For example, this :
    ```
    int f(int i) {
      if (i) {
        ++i;
      } else {
        // comment
    #ifdef A
        --i;
    #endif
      }
    }
    ```
    was formatted as:
    ```
    int f(int i) {
      if (i) {
        ++i;
      } else {
      // comment
    #ifdef A
        --i;
    #endif
      }
    }
    ```

    Reviewers: djasper, klimek

    Reviewed By: klimek

    Subscribers: klimek, cfe-commits

    Differential Revision: https://reviews.llvm.org/D35794 — krasimir / detail

#165 (Jul 24, 2017 7:47:36 AM)

  1. [compiler-rt] Add missing const specifier to MemoryMappedSegment functions — fjricci / detail
  2. make sure that we don't call basic_streambuf::gbump with a value bigger than INT_MAX, since it only takes an int. Related to, but not quite the same as PR33725 — marshall / detail
  3. [mips] Add support for -m(no-)extern-data.

    Add support for -m(no-)extern-data when using -mgpopt in the driver. It is
    enabled by default in the backend.

    Reviewers: atanasyan, slthakur

    Differential Revision: https://reviews.llvm.org/D35550 — sdardis / detail
  4. [DOTGraphTraits] Propagate Graph template argument, NFC

    Propagates the GraphT template argument to the default value of
    the AnalysisGraphTraitsT template argument. This allows to specialize
    the DefaultAnalysisGraphTraits<AnalysisT,GraphT> for analysis with a
    graph type different from the analysis type and it will automatically
    get picked-up.

    Note: This was probably the intended purpose and should not result in any
          functional change. — aisoard / detail
  5. Fix spelling in comments. NFCI. — rksimon / detail

#164 (Jul 24, 2017 5:42:28 AM)

  1. [LoopInterchange] Update code to use range-based for loops (NFC).

    Summary:
    The remaining non range-based for loops do not iterate over full ranges,
    so leave them as they are.

    Reviewers: karthikthecool, blitz.opensource, mcrosier, mkuper, aemerson

    Reviewed By: aemerson

    Subscribers: aemerson, mzolotukhin, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35777 — fhahn / detail

#163 (Jul 24, 2017 2:03:24 AM)

  1. [X86][AVX512] Add patterns for masked AVX512 floating point compare instructions that were missing.

    patterns were missed by D33188. Adding for completion.
    +Updating test.

    Differential Revesion: https://reviews.llvm.org/D35179 — aymanmus / detail
  2. [X86][InlineAsm][Ms Compatibility]Prefer variable name over a register when the two collides

    On MS-style, the following snippet:

    int eax;
    __asm mov eax, ebx

    should yield loading of ebx, into the location pointed by the variable eax

    This patch sees to it.

    Currently, a reg-to-reg move would have been invoked.

    llvm: D34739

    Differential Revision: https://reviews.llvm.org/D34740 — coby / detail
  3. [X86][InlineAsm][Ms Compatibility]Prefer variable name over a register when the two collides

    On MS-style, the following snippet:

    int eax;
    __asm mov eax, ebx

    should yield loading of ebx, into the location pointed by the variable eax

    This patch sees to it.

    Currently, a reg-to-reg move would have been invoked.

    clang: D34740

    Differential Revision: https://reviews.llvm.org/D34739 — coby / detail

#160 (Jul 23, 2017 6:18:13 PM)

  1. [AVR] Remove the instrumentation pass

    I have a much better way of running integration tests now.

    https://github.com/dylanmckay/avr-test-suite — dylanmckay / detail
  2. [AVR] Improve the 'icall-func-pointer-correct-addr-space.ll' test

    Patch by Carl Peto. — dylanmckay / detail

#159 (Jul 23, 2017 3:45:31 PM)

  1. [Driver] Fuchsia defaults to -fno-math-errno

    Patch by Roland McGrath

    Differential Revision: https://reviews.llvm.org/D35747 — phosek / detail
  2. [CodeGen][X86] Fuchsia supports sincos* libcalls and sin+cos->sincos optimization

    Patch by Roland McGrath

    Differential Revision: https://reviews.llvm.org/D35748 — phosek / detail
  3. Fix typo: GETTER to SETTER (NFC)

    Use the CALLSITE_DELEGATE_SETTER macro in CallSiteBase::setCannotDuplicate.
    Comitted as obvious. — chill / detail
  4. [AArch64] Add test for function alignment for a optsize function (NFC).

    Reviewers: dblaikie, t.p.northover, rengolin

    Reviewed By: rengolin

    Subscribers: aemerson, rengolin, javed.absar, llvm-commits, kristof.beyls

    Differential Revision: https://reviews.llvm.org/D35620 — fhahn / detail

#156 (Jul 23, 2017 9:57:52 AM)

  1. [AArch64] Redundant Copy Elimination - remove more zero copies.

    This patch removes unnecessary zero copies in BBs that are targets of b.eq/b.ne
    and we know the result of the compare instruction is zero.  For example,

    BB#0:
      subs w0, w1, w2
      str w0, [x1]
      b.ne .LBB0_2
    BB#1:
      mov w0, wzr  ; <-- redundant
      str w0, [x2]
    .LBB0_2

    Differential Revision: https://reviews.llvm.org/D35075 — mcrosier / detail
  2. Remove Driver::UseStdLib.

    All but one place are checking options::OPT_nostdlib instead of looking at
    this field, so convert that one other place to doing that as well.

    No behavior change. — nico / detail
  3. [SCEV] Limit max size of AddRecExpr during evolving

    When SCEV calculates product of two SCEVAddRecs from the same loop, it
    tries to combine them into one big AddRecExpr. If the sizes of the initial
    SCEVs were `S1` and `S2`, the size of their product is `S1 + S2 - 1`, and every
    operand of the resulting SCEV is combined from operands of initial SCEV and
    has much higher complexity than they have.

    As result, if we try to calculate something like:
      %x1 = {a,+,b}
      %x2 = mul i32 %x1, %x1
      %x3 = mul i32 %x2, %x1
      %x4 = mul i32 %x3, %x2
      ...
    The size of such SCEVs grows as `2^N`, and the arguments
    become more and more complex as we go forth. This leads
    to long compilation and huge memory consumption.

    This patch sets a limit after which we don't try to combine two
    `SCEVAddRecExpr`s into one. By default, max allowed size of the
    resulting AddRecExpr is set to 16.

    Differential Revision: https://reviews.llvm.org/D35664 — mkazantsev / detail

#154 (Jul 23, 2017 5:56:44 AM)

  1. RuntimeDyldELF.cpp: Prune unused "TargetRegistry.h" — chapuni / detail

#150 (Jul 22, 2017 11:07:58 PM)

  1. [Modules] Rework r274270. Let Clang targets depend on intrinsics_gen.

    This gets rid of almost LLVM targets unconditionally depending on intrinsic_gen.

    Clang's modules still have weird dependencies and hard to remove intrinsics_gen in better way.
    Then, it'd be better to give whole clang targets depend on intrinsic_gen. — chapuni / detail

#149 (Jul 22, 2017 9:38:29 PM)

  1. [X86] Add some hasSideEffects=0 flags. — ctopper / detail
  2. [X86] Add patterns for memory forms of SARX/SHLX/SHRX with careful complexity adjustment to keep shift by immediate using the legacy instructions.

    These patterns were only missing to favor using the legacy instructions when the shift was a constant. With careful adjustment of the pattern complexity we can make sure the immediate instructions still have priority over these patterns. — ctopper / detail

#147 (Jul 22, 2017 7:16:47 PM)

  1. [DAG] Fix typo preventing some stores merges to truncated stores.

    Check the actual memory type stored and not the extended value size
    when considering if truncated store merge is worthwhile.

    Reviewers: efriedma, RKSimon, spatel, jyknight

    Reviewed By: efriedma

    Subscribers: llvm-commits, nhaehnle

    Differential Revision: https://reviews.llvm.org/D35623 — niravd / detail
  2. clang/module.modulemap: Split out Clang_ToolingCore from Clang_Tooling.

    It cuts clangFormat's dependencies out of;

      Clang_Analysis
      Clang_C
      Clang_Diagnostics
      Clang_Driver
      Clang_Frontend
      Clang_Sema
      Clang_Serialization
      Clang_StaticAnalyzer_Core
      Clang_Tooling -> Clang_ToolingCore

    Now, the module Clang_Format depends on;

      Clang_AST
      Clang_Basic
      Clang_ToolingCore — chapuni / detail

#141 (Jul 22, 2017 1:10:00 PM)

  1. Fix X86-64 SDE builder config.
    Replace double quotes with single quotes for the
    nt flag RUNUNDER.

    Differential revision: https://reviews.llvm.org/D35660 — eladcohen / detail

#138 (Jul 22, 2017 8:37:01 AM)

  1. Fix grammar-o in comment. — nico / detail

#136 (Jul 22, 2017 6:19:46 AM)

  1. [Bash-autocompletion] Fixed typo and add '-' after -Wno

    Summary: -Wno-<warning> was autocompleted as -Wno<warning>, so fixed this typo.

    Differential Revision: https://reviews.llvm.org/D35762 — yamaguchi / detail

#135 (Jul 22, 2017 5:10:03 AM)

  1. [NFC, documentation] Prefer the term expansion instead of macro instantiation

    ... in the few remaining places where this was not corrected. — faisalv / detail

#130 (Jul 21, 2017 11:44:16 PM)

  1. Revert "Reland "[LLVM][llvm-objcopy] Added basic plumbing to get things started""

    This reverts commit 2b52298eb28ba4d3eca113353a348c02a6ef1f93. — phosek / detail
  2. Reland "[LLVM][llvm-objcopy] Added basic plumbing to get things started"

    As discussed on llvm-dev I've implemented the first basic steps towards
    llvm-objcopy/llvm-objtool (name pending).

    This change adds the ability to copy (without modification) 64-bit
    little endian ELF executables that have SHT_PROGBITS, SHT_NOBITS,
    SHT_NULL and SHT_STRTAB sections.

    Patch by Jake Ehrlich

    Differential Revision: https://reviews.llvm.org/D33964 — phosek / detail

#129 (Jul 21, 2017 7:29:12 PM)

  1. [libFuzzer bot] ensure that no process runs for more than 1 hour — kcc / detail
  2. [sanitizer_common] Move filesystem-related code out of sanitizer_common.cc

    Summary:
    This is a pure refactoring change.  It just moves code that is
    related to filesystem operations from sanitizer_common.{cc,h} to
    sanitizer_file.{cc,h}.  This makes it cleaner to disable the
    filesystem-related code for a new port that doesn't want it.

    Submitted on behalf of Roland McGrath.

    Reviewers: kcc, eugenis, alekseyshl

    Reviewed By: alekseyshl

    Subscribers: vitalybuka, llvm-commits, kubamracek, mgorny, phosek

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D35591 — Vitaly Buka / detail
  3. [X86] Add nopq instruction which is a rex encoded version of nopl for gas compatibility. — ctopper / detail
  4. [X86] Add register form of NOPL and NOPW for assembler/disassembler.

    Fixes PR32805. — ctopper / detail
  5. [libFuzzer bot] add one more benchmark — kcc / detail
  6. AMDGPU: Remove leftover td file

    All of the instructions were moved out of this a while ago,
    so it's just a useless comment now. — arsenm / detail
  7. Commit missing/empty test file from r308789 — dblaikie / detail
  8. RA: Remove another assert on empty intervals

    This case is similar to the one fixed in r308808,
    except when rematerializing.

    Fixes bug 33884. — arsenm / detail
  9. [libFuzzer] reimplement experimental_len_control=1: bump the temporary max_len every time we failed to find new coverage during the last 1000 runs and 1 second. Also fix FileToVector to not load unfinished files — kcc / detail
  10. RA: Remove assert on empty live intervals

    This is possible if there is an undef use when
    splitting the vreg during spilling.

    Fixes bug 33620. — arsenm / detail
  11. clangDaemon: Update libdeps in r308738. — chapuni / detail

#128 (Jul 21, 2017 4:49:31 PM)

  1. Revert "[LLVM][llvm-objcopy] Added basic plumbing to get things started"

    This reverts commit 2f423248e140b94b8377660d4d2fe9364f30febe. — phosek / detail
  2. Reland "[LLVM][llvm-objcopy] Added basic plumbing to get things started"

    As discussed on llvm-dev I've implemented the first basic steps towards
    llvm-objcopy/llvm-objtool (name pending).

    This change adds the ability to copy (without modification) 64-bit
    little endian ELF executables that have SHT_PROGBITS, SHT_NOBITS,
    SHT_NULL and SHT_STRTAB sections.

    Patch by Jake Ehrlich

    Differential Revision: https://reviews.llvm.org/D33964 — phosek / detail
  3. [libFuzzer bot] remove stale code, promote to tests from warning to error — kcc / detail
  4. [index] Set SymbolSubKind::Accessor[GS]etter on class methods

    We have the same relation between class properties and getter/setters
    that we have for instance properties, so set the same symbol sub-kind.

    rdar://problem/32376404 — benlangmuir / detail
  5. Remove Bitrig: LLVM Changes

    Bitrig code has been merged back to OpenBSD, thus the OS has been abandoned.

    Differential Revision: https://reviews.llvm.org/D35707 — erichkeane / detail
  6. Remove Bitrig: CompilerRT Changes

    Bitrig code has been merged back to OpenBSD, thus the OS has been abandoned.

    Differential Revision: https://reviews.llvm.org/D35709 — erichkeane / detail
  7. Remove Bitrig: Clang Changes

    Bitrig code has been merged back to OpenBSD, thus the OS has been abandoned.

    Differential Revision: https://reviews.llvm.org/D35708 — erichkeane / detail
  8. Break up Targets.cpp into a header/impl pair per target type[NFCI]

    Targets.cpp is getting unwieldy, and even minor changes cause the entire thing
    to cause recompilation for everyone. This patch bites the bullet and breaks
    it up into a number of files.

    I tended to keep function definitions in the class declaration unless it
    caused additional includes to be necessary. In those cases, I pulled it
    over into the .cpp file. Content is copy/paste for the most part,
    besides includes/format/etc.


    Differential Revision: https://reviews.llvm.org/D35701 — erichkeane / detail
  9. [ProfData] Detect if zlib is available

    As discussed on [1], if the profile is compressed and llvm-profdata is not built with zlib support, the error message is not informative. Give a better error message if zlib is not available.

    [1] http://lists.llvm.org/pipermail/llvm-dev/2017-July/115571.html

    Reviewers: davidxl, dblaikie

    Differential Revision: https://reviews.llvm.org/D35586 — dblaikie / detail
  10. [Analysis] Fix some Clang-tidy modernize and  Include What You Use warnings; other minor fixes (NFC). — eugenezelenko / detail
  11. [PGOInstr] Add a debug print — davidxl / detail
  12. X86InterleaveAccess: A fix for bug33826

    Reviewers: DavidKreitzer

    Differential Revision: https://reviews.llvm.org/D35638 — faaleen / detail
  13. Inline variable into assert to fix unused warning. — rtrieu / detail

#121 (Jul 21, 2017 5:51:37 AM)

  1. [clang-diff] Add initial implementation

    This is the first commit for the "Clang-based C/C++ diff tool" GSoC project.

    ASTDiff is a new library that computes a structural AST diff between two ASTs
    using the gumtree algorithm. Clang-diff is a new Clang tool that will show
    the structural code changes between different ASTs.

    Patch by Johannes Altmanninger!

    Differential Revision: https://reviews.llvm.org/D34329 — arphaman / detail
  2. [SystemZ, LoopStrengthReduce]

    This patch makes LSR generate better code for SystemZ in the cases of memory
    intrinsics, Load->Store pairs or comparison of immediate with memory.

    In order to achieve this, the following common code changes were made:

    * New TTI hook: LSRWithInstrQueries(), which defaults to false. Controls if
    LSR should do instruction-based addressing evaluations by calling
    isLegalAddressingMode() with the Instruction pointers.
    * In LoopStrengthReduce: handle address operands of memset, memmove and memcpy
    as address uses, and call isFoldableMemAccessOffset() for any LSRUse::Address,
    not just loads or stores.

    SystemZ changes:

    * isLSRCostLess() implemented with Insns first, and without ImmCost.
    * New function supportedAddressingMode() that is a helper for TTI methods
    looking at Instructions passed via pointers.

    Review: Ulrich Weigand, Quentin Colombet
    https://reviews.llvm.org/D35262
    https://reviews.llvm.org/D35049 — jonpa / detail
  3. [clang-tidy] Add option to export fixes to run-clang-tidy.py

    This patch adds the option to keep the list of proposed fixes even though they
    should not be applied.

    This allows to detect possible fixes using the parallelised run-clang-tidy.py
    and apply them using clang-apply-replacements at a later time.
    Essentially the patch causes the individual temporary yaml files by the parallel
    clang-tidy instances to be merged into one user-defined file.

    Patch by Michael F. Herbst!
    Differential revision: https://reviews.llvm.org/D31326 — alexfh / detail
  4. [clang-format] Fix comment levels between '}' and PPDirective

    Summary:
    This fixes a regression exposed by r307795 in which the level of a comment line
    between '}' and a preprocessor directive is incorrectly set as the level of the
    line before the '}'. In effect, this:
    ```
    int f(int i) {
      int j = i;
      return i + j;
    }
    // comment

    #ifdef A
    #endif
    ```
    was formatted as:
    ```
    int f(int i) {
      int j = i;
      return i + j;
    }
      // comment

    #ifdef A
    #endif
    ```

    Reviewers: djasper

    Reviewed By: djasper

    Subscribers: cfe-commits, klimek

    Differential Revision: https://reviews.llvm.org/D35485 — krasimir / detail
  5. [X86][SSE] Add extra (sra (sra x, c1), c2) -> (sra x, (add c1, c2)) test case

    We should be able to handle the case where some c1+c2 elements exceed max shift and some don't by performing a clamp after the sum — rksimon / detail
  6. [X86][SSE] Add pre-AVX2 support for (i32 bitcast(v32i1)) -> 2xMOVMSK

    Currently we only support (i32 bitcast(v32i1)) using the AVX2 VPMOVMSKB ymm instruction.

    This patch adds support for splitting pre-AVX2 targets into 2 x (V)PMOVMSKB xmm instructions and merging the integer results.

    In future we could probably generalize this to handle more cases.

    Differential Revision: https://reviews.llvm.org/D35303 — rksimon / detail
  7. Fixed failing assert in code completion.

    Summary:
    The code was accessing uninstantiated default argument.
    This resulted in failing assertion at ParmVarDecl::getDefaultArg().

    Reviewers: erikjv, klimek, bkramer, krasimir

    Reviewed By: krasimir

    Subscribers: cfe-commits

    Differential Revision: https://reviews.llvm.org/D35682 — ibiryukov / detail

#120 (Jul 21, 2017 2:22:49 AM)

  1. [clangd] Specified --gcc-toolchain explicitly in VFS test.

    In order to avoid platform-specific configuration quirks.
    (Possible fix for https://bugs.llvm.org/show_bug.cgi?id=33842) — ibiryukov / detail
  2. [mips] Add `short_call` to the set of `long_call/far/near` attributes

    MIPS gcc supports `long_call/far/near` attributes only, but other
    targets have the `short_call` attribut, so let's support it for MIPS
    for consistency. — atanasyan / detail

#119 (Jul 20, 2017 10:11:26 PM)

  1. Fix tblgen error.

    tblgen couldn't determing a unique name between "long_call" and "far", so it
    errored out when generating documentation.  Copy the documentation, and give
    an explicit header for "long_call". — rtrieu / detail
  2. [compiler-rt] Disable LIBXML2 as Android do not need to parse manifest files. — Vitaly Buka / detail
  3. Commit access test — phschaad / detail
  4. Only use xml if iconv is found, which is a prerequisite. — ecbeckmann / detail
  5. dsymutil: strip unused types from imported DW_TAG_modules

    This patch teaches dsymutil to strip types from the imported
    DW_TAG_module inside of an object file (not inside the PCM) if they
    can be resolved to the full definition inside the PCM. This reduces
    the size of the .dSYM from WebCore from webkit.org by almost 2/3.

    <rdar://problem/33047213> — Adrian Prantl / detail
  6. Debug Info: Don't strip clang module skeleton CUs.

    This corrects a (hopefully :-) accidental side-effect of r304020.

    rdar://problem/33442618 — Adrian Prantl / detail
  7. [Driver] Consider -fno-sanitize=... state when filtering out -fsanitize-coverage=...

    The driver ignores -fsanitize-coverage=... flags when also given
    -fsanitize=... flags for sanitizer flavors that don't support the
    coverage runtime. This logic failed to account for subsequent
    -fno-sanitize=... flags that disable the sanitizer flavors that
    conflict with -fsanitize-coverage=... flags.

    Patch by Roland McGrath

    Differential Revision: https://reviews.llvm.org/D35603 — phosek / detail
  8. [CMake] Use ABI version 2 for C++ library in Fuchsia

    Fuchsia has always been using ABI version 2 but I forgot this option
    when setting up the cache file for runtimes build.

    Differential Revision: https://reviews.llvm.org/D35705 — phosek / detail
  9. [DWARF] Generalized verification of .debug_abbrev to be applicable to both .debug_abbrev and .debug_abbrev.dwo sections.

    Differential Revision: https://reviews.llvm.org/D35698 — sgravani / detail
  10. [AVX-512] Fix a bug that prevented some non-temporal loads from using the movntdqa instruction.

    The bitconverts here had an input type of 128-bits and an output type of 256 bits. The input type should also have been 256 bits. — ctopper / detail
  11. [XRay][compiler-rt] Update test to account for change in logging format.

    Fixes build breakage for some bots after we've started logging both the
    process id and the thread id. — dberris / detail

#118 (Jul 20, 2017 5:15:01 PM)

  1. Explicitly disable libxml2 on android. — ecbeckmann / detail
  2. Generate a compile_commands.json DB for external projects.

    compile_commands.json file is very useful both for tooling and for
    reproducible builds.
    For files generated from recursive CMake invocation this information was
    not previously generated.

    Differential Review: https://reviews.llvm.org/D35219 — George Karpenkov / detail
  3. [AArch64] Adjust the cost model for Exynos M1 and M2

    Add the cost for the EXT instructions and explicitly add the cost for a few
    instructions that were implied by the coarse model. — evandro / detail
  4. Only defined CombinedRoot if libxml2 is used. — ecbeckmann / detail
  5. Add error handling to the dyld compact export entries in libObject.

    lld needs a matching change for this will be my next commit.
    Expect it to fail build until that matching commit is picked up by the bots.

    Like the changes in r296527 for dyld bind entires and the changes in
    r298883 for lazy bind, weak bind and rebase entries the export
    entries are the last of the dyld compact info to have error handling added.

    This follows the model of iterators that can fail that Lang Hanes
    designed when fixing the problem for bad archives r275316 (or r275361).

    So that iterating through the exports now terminates if there is an error
    and returns an llvm::Error with an error message in all cases for malformed
    input.

    This change provides the plumbing for the error handling, all the needed
    testing of error conditions and test cases for all of the unique error messages. — enderby / detail
  6. Only enable libxml2 on linux, because systems like android lack libiconv — ecbeckmann / detail
  7. Recommit: GlobalISel: select G_EXTRACT and G_INSERT instructions on AArch64.

    It revealed a bug in the Localizer pass which has now been fixed.

    This includes the fix for SUBREG_TO_REG committed separately last time. — Tim Northover / detail
  8. GlobalISel: stop localizer putting constants before EH_LABELs

    If the localizer pass puts one of its constants before the label that tells the
    unwinder "jump here to handle your exception" then control-flow will skip it,
    leaving uninitialized registers at runtime. That's bad. — Tim Northover / detail
  9. Make a file end with n and remove trailing whitespace. — ruiu / detail

#117 (Jul 20, 2017 3:37:08 PM)

  1. [clang-format] Put '/**' and '*/' on own lines in multiline jsdocs

    Reviewers: mprobst

    Reviewed By: mprobst

    Subscribers: cfe-commits, klimek

    Differential Revision: https://reviews.llvm.org/D35683 — krasimir / detail
  2. [mips] Add support for -m(no-)local-sdata

    Teach the driver to support -mlocal-sdata. The backend already matches GCC's
    default behaviour.

    Reviewers: atanasyan, slthakur

    Differential Revision: https://reviews.llvm.org/D35549 — sdardis / detail
  3. Make tests always depend on llvm-mt, because some tests are run even w/o
    xml2. — ecbeckmann / detail
  4. Implement parsing and writing of a single xml manifest file.

    Summary: Implement parsing and writing of a single xml manifest file.

    Subscribers: mgorny, llvm-commits, hiraditya

    Differential Revision: https://reviews.llvm.org/D35425 — ecbeckmann / detail
  5. [clang-tools-extra] Add support for plain C structs in clang-reorder-fields

    This diff updates the tool clang-reorder-fields
    to enable reordering of fields of plain C structs.

    Test plan: make check-all

    Differential revision: https://reviews.llvm.org/D35329 — alexshap / detail
  6. Add end-to-end tests for overflows of byval arguments.

    Summary:
    Included is one test for passing structs by value and one test for passing C++
    objects by value.

    Submitted on behalf of Matt Morehouse.

    Reviewers: eugenis, vitalybuka

    Reviewed By: eugenis

    Subscribers: srhines, kubamracek, llvm-commits

    Differential Revision: https://reviews.llvm.org/D34827 — Vitaly Buka / detail
  7. Revert "Add MemoryMappedSection struct for two-level memory map iteration"

    This probably broke lib0 tsan unit test on 10.11 buildbots

    This reverts commit 35ad307c385e384f47a7fb348c14b3602d3a33c4. — fjricci / detail
  8. [NVPTX] Add lowering of i128 params.

    The patch adds support of i128 params lowering. The changes are quite trivial to
    support i128 as a "special case" of integer type. With this patch, we lower i128
    params the same way as aggregates of size 16 bytes: .param .b8 _ [16].

    Currently, NVPTX can't deal with the 128 bit integers:
    * in some cases because of failed assertions like
      ValVTs.size() == OutVals.size() && "Bad return value decomposition"
    * in other cases emitting PTX with .i128 or .u128 types (which are not valid [1])
      [1] http://docs.nvidia.com/cuda/parallel-thread-execution/index.html#fundamental-types

    Differential Revision: https://reviews.llvm.org/D34555
    Patch by: Denys Zariaiev (denys.zariaiev@gmail.com) — tra / detail
  9. AMDGPU: Rename _RTN atomic instructions

    Move the _RTN to the end of the name. It reads
    better if the other addressing mode components
    line up with the non-RTN version. It is also
    more convenient to define saddr variants of
    FLAT atomics to have the RTN last, and it is
    good to have a consistent naming scheme. — arsenm / detail
  10. Add an ID field to StackObjects

    On AMDGPU SGPR spills are really spilled to another register.
    The spiller creates the spills to new frame index objects,
    which is used as a placeholder.

    This will eventually be replaced with a reference to a position
    in a VGPR to write to and the frame index deleted. It is
    most likely not a real stack location that can be shared
    with another stack object.

    This is a problem when StackSlotColoring decides it should
    combine a frame index used for a normal VGPR spill with
    a real stack location and a frame index used for an SGPR.

    Add an ID field so that StackSlotColoring has a way
    of knowing the different frame index types are
    incompatible. — arsenm / detail
  11. [X86] Adding ISel tests for strided-shuffles with non-zero offset. NFC. — zvi / detail
  12. Changed EOL back to LF. NFC. — tra / detail
  13. Generate error reports when a fuzz target exits.

    Summary:
    Implements https://github.com/google/sanitizers/issues/835.

    Flush stdout before exiting in test cases.

    Since the atexit hook is used for exit reports, pending prints to
    stdout can be lost if they aren't flushed before calling exit().

    Expect tests to have non-zero exit code if exit() is called.

    Reviewers: vitalybuka, kcc

    Reviewed By: kcc

    Subscribers: eraman, llvm-commits, hiraditya

    Differential Revision: https://reviews.llvm.org/D35602 — morehouse / detail
  14. [PGO] Move the PGOInstrumentation pass to new OptRemark API.

    This fixes PR33791. — davide / detail
  15. [CodeGen][mips] Support `long_call/far/near` attributes

    This patch adds support for the `long_call`, `far`, and `near` attributes
    for MIPS targets. The `long_call` and `far` attributes are synonyms. All
    these attributes override `-mlong-calls` / `-mno-long-calls` command
    line options for particular function.

    Differential revision: https://reviews.llvm.org/D35479 — atanasyan / detail
  16. [PEI] Fix refactoring from r308664 — thegameg / detail
  17. [COFF, ARM64, CodeView] Add support to emit CodeView debug info for ARM64 COFF

    Reviewers: compnerd, ruiu, rnk, zturner

    Reviewed By: rnk

    Subscribers: majnemer, aemerson, aprantl, javed.absar, kristof.beyls, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35518 — mgrang / detail
  18. [PEI] Separate saving and restoring CSRs into different functions. NFC

    Split insertCSRSpillsAndRestores into insertCSRSaves + insertCSRRestores.

    This is mostly useful for future shrink-wrapping improvements where we
    want to save / restore a specific part of the CSRs in a specific block.

    Differential Revision: https://reviews.llvm.org/D35644 — thegameg / detail
  19. [libFuzzer] delete stale code — kcc / detail
  20. [clang] Fix handling of "%zd" in scanf

    This diff addresses FIXMEs in lib/Analysis/ScanfFormatString.cpp
    for the case of ssize_t format specifier and adds tests.
    In particular, this change enables Clang to emit a warning
    on incorrect using of "%zd"/"%zn".

    Test plan: make check-all

    Differential revision: https://reviews.llvm.org/D35652 — alexshap / detail
  21. [SPARC] Clean up the support for disabling fsmuld and fmuls instructions.

    Summary:
    Also enable no-fsmuld for sparcv7 (which doesn't have the
    instruction).

    The previous code which used a post-processing pass to do this was
    unnecessary; disabling the instruction is entirely sufficient.

    Reviewers: jacob_hansen, ekedaigle

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D35576 — jyknight / detail
  22. [tsan] Update unittest for logging changes of r308637 — Vitaly Buka / detail
  23. Implement LaneBitmask::getNumLanes and LaneBitmask::getHighestLane

    This should eliminate most uses of countPopulation and Log2_32 on
    the lane mask values. — kparzysz / detail
  24. [X86] Allow masks with more than 6 bits set on the x << (y & mask) optimization for the 64-bit memory shifts. — ctopper / detail
  25. [X86] Add test case to demonstrate that we don't allow masks wider than 6 bits in the (shift x, (and y, mask)) patterns for the 64-bit memory form.

    We allow wider than 5 bits in the 16 and 32 bit store forms. And we allow wider than 6 bits on the 64-bit regsiter form.:w

    I'm assuming this was a mistake made back in r148024. — ctopper / detail
  26. Use LaneBitmask::getLane in a few more places — kparzysz / detail

#116 (Jul 20, 2017 12:14:58 PM)

  1. [compiler-rt] Use NOINLE to shrink stack frames — Vitaly Buka / detail
  2. [libFuzzer] make sure CheckExitOnSrcPosOrItem is called after the new input is saved to the corpus — kcc / detail
  3. [compiler-rt] Reorder functions to shrink stack frames — Vitaly Buka / detail
  4. Revert "[compiler-rt] Reorder functions to have smaller stack frames"

    Does not compile.

    This reverts commit r308650. — Vitaly Buka / detail
  5. [compiler-rt] Reorder functions to have smaller stack frames — Vitaly Buka / detail
  6. Revert "[sanitizer_common] Move filesystem-related code out of sanitizer_common.cc"

    Breaks Windows build.

    This reverts commit r308640. — Vitaly Buka / detail
  7. [asan] Update unittest for changes in logging r308637 — Vitaly Buka / detail
  8. [DAG] Commit missed nit cleanup from r308617. NFC. — niravd / detail
  9. Add MemoryMappedSection struct for two-level memory map iteration

    Summary: This will allow sanitizer_procmaps on mac to expose section information.

    Reviewers: kubamracek, alekseyshl, kcc

    Subscribers: llvm-commits, emaste

    Differential Revision: https://reviews.llvm.org/D35422 — fjricci / detail
  10. LowerTypeTests: Drop function type metadata only if we're going to replace it.

    Previously we were (mis)handling jump table members with a prevailing
    definition in a full LTO module and a non-prevailing definition in a
    ThinLTO module by dropping type metadata on those functions entirely,
    which would cause type tests involving such functions to fail.

    This patch causes us to drop metadata only if we are about to replace
    it with metadata from cfi.functions.

    We also want to replace metadata for available_externally functions,
    which can arise in the opposite scenario (prevailing ThinLTO
    definition, non-prevailing full LTO definition). The simplest way
    to handle that is to remove the definition; there's little value in
    keeping it around at this point (i.e. after most optimization passes
    have already run) and later code will try to use the function's linkage
    to create an alias, which would result in invalid IR if the function
    is available_externally.

    Fixes PR33832.

    Differential Revision: https://reviews.llvm.org/D35604 — pcc / detail
  11. [Docs] Regenerate the command line option reference. — ctopper / detail
  12. [sanitizer_common] Move filesystem-related code out of sanitizer_common.cc

    This is a pure refactoring change. It just moves code that is
    related to filesystem operations from sanitizer_common.{cc,h} to
    sanitizer_file.{cc,h}. This makes it cleaner to disable the
    filesystem-related code for a new port that doesn't want it.

    Commiting for mcgrathr.

    Reviewers: alekseyshl

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D35591 — alekseyshl / detail
  13. AMDGPU: Add encoding for carryless add/sub instructions — arsenm / detail
  14. AMDGPU: Add encodings for global atomics — arsenm / detail
  15. [compiler-rt] Include thread ID into sanitizers logs

    Reviewers: kcc, alekseyshl

    Subscribers: kubamracek, llvm-commits, dberris

    Differential Revision: https://reviews.llvm.org/D35654 — Vitaly Buka / detail
  16. Remove unnecessary prefix from comment lines in a .test file. — dblaikie / detail
  17. [OPENMP] Fix DSA processing for member declaration.

    If the member declaration is captured in the OMPCapturedExprDecl, we may
    loose data-sharing attribute info for this declaration. Patch fixes this
    bug. — abataev / detail

#115 (Jul 20, 2017 9:37:02 AM)

  1. revert: [llvm] r308609 - This patch added some test cases to demonsrate the issues described in Bug 33848 - X86 Asm does not support symbolic names inside address calculation. — rksimon / detail
  2. [clang-tidy] s/1/true/, NFC — alexfh / detail
  3. Honour 80-character line limit — kamil / detail

#114 (Jul 20, 2017 7:10:12 AM)

  1. Reland "[mips] Teach the driver to accept -m(no-)gpopt."

    This patch teaches the driver to pass -mgpopt by default to the backend when it
    is supported, i.e. we are using -mno-abicalls.

    Reviewers: atanasyan, slthakur

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

    This version fixes a logic error that generated warnings incorrectly and
    gets rid of spurious arguments to the backend when -mgpopt is not used. — sdardis / detail
  2. [DAG] Handle missing transform in fold of value extension case.

    Summary:
    When pushing an extension of a constant bitwise operator on a load
    into the load, change other uses of the load value if they exist to
    prevent the old load from persisting.

    Reviewers: spatel, RKSimon, efriedma

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D35030 — niravd / detail
  3. [DAG] Optimize away degenerate INSERT_VECTOR_ELT nodes.

    Summary:
    Add missing vector write of vector read reduction, i.e.:

    (insert_vector_elt x (extract_vector_elt x idx) idx) to x

    Reviewers: spatel, RKSimon, efriedma

    Reviewed By: RKSimon

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D35563 — niravd / detail
  4. Add NetBSD support in sanitizer_libignore.cc

    Summary:
    Reuse Linux, FreeBSD and Apple code - no NetBSD specific changes.

    Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas.
       
    Sponsored by <The NetBSD Foundation>

    Reviewers: joerg, vitalybuka, filcab, kcc

    Reviewed By: filcab

    Subscribers: emaste, kubamracek, llvm-commits

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D35628 — kamil / detail
  5. Add NetBSD support in sanitizer_procmaps.h

    Summary:
    Reuse Linux and FreeBSD - no NetBSD specific changes.

    Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas.

    Sponsored by <The NetBSD Foundation>

    Reviewers: joerg, filcab, kcc, vitalybuka

    Reviewed By: filcab

    Subscribers: llvm-commits, emaste, kubamracek, #sanitizers

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D35629 — kamil / detail
  6. Add NetBSD support in sanitizer_procmaps_common.cc

    Summary:
    Reuse Linux and FreeBSD code - no NetBSD specific changes.

    Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas.

    Sponsored by <The NetBSD Foundation>

    Reviewers: joerg, kcc, vitalybuka, filcab

    Reviewed By: filcab

    Subscribers: emaste, kubamracek, llvm-commits, #sanitizers

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D35632 — kamil / detail
  7. [globalisel][tablegen] Fix an unintended fallthrough that is currently unreachable. NFC — dsanders / detail

#113 (Jul 20, 2017 6:10:08 AM)

  1. Reland r308585

    Builder clang-x86_64-linux-abi-test apparently failed due
    to a spurious error unrelated to the changes r308585
    introduced. — smaksimovic / detail
  2. [X86][AVX512] Improve vector rotation constant folding tests

    Test constant folding both on node creation (which already works) and once the input nodes have been folded themselves (not working yet). — rksimon / detail
  3. This patch added some test cases to demonsrate the issues described in Bug 33848 - X86 Asm does not support symbolic names inside address calculation. — avt77 / detail
  4. [ARM] Simplify ExpandPseudoInst. NFC.

    Remove headers not required and convert to range-loop

    Reviewed by: @mcrosier
    Differential Revision: https://reviews.llvm.org/D35626 — javed.absar / detail
  5. [mips] Support `long_call/far/near` attributes passed by front-end

    This patch adds handling of the `long_call`, `far`, and `near`
    attributes passed by front-end. The patch depends on D35479.

    Differential revision: https://reviews.llvm.org/D35480. — atanasyan / detail

#112 (Jul 20, 2017 5:10:11 AM)

  1. [clang-tidy] Unify the way IncludeStyle and HeaderFileExtesions options are used — alexfh / detail
  2. [vfs] Assert that the status is known in equivalent().

    Otherwise we'd silently compare uninitialized data. — d0k / detail
  3. Revert "GlobalISel: select G_EXTRACT and G_INSERT instructions on AArch64."

    This reverts commit 36c6a2ea9669bc3bb695928529a85d12d1d3e3f9 because it
    broke the test-suite on the GlobalISel bot. — rovka / detail
  4. [DAGCombiner] Match ISD::SRL non-uniform constant vectors patterns using predicates.

    Use predicate matchers introduced in D35492 to match more ISD::SRL constant folds — rksimon / detail
  5. Remove trailing whitespace. NFCI. — rksimon / detail
  6. [DAGCombiner] Match ISD::SRA non-uniform constant vectors patterns using predicates.

    Use predicate matchers introduced in D35492 to match more ISD::SRA constant folds — rksimon / detail
  7. [globalisel][tablegen] Fix an issue with lambdas when compiling with older GCC's

    It seems that G++ 4.8 doesn't accept the 'enum A' in code of the form:
      enum A { ... };
      const auto &F = []() -> enum A { ... };
    However, it does accept:
      typedef enum { ... } A;
      const auto &F = []() -> A { ... }; — dsanders / detail

#111 (Jul 20, 2017 3:22:02 AM)

  1. [DAGCombiner] Match non-uniform constant vectors using predicates.

    Most combines currently recognise scalar and splat-vector constants, but not non-uniform vector constants.

    This patch introduces a matching mechanism that uses predicates to check against BUILD_VECTOR of ConstantSDNode, as well as scalar ConstantSDNode cases.

    I've changed a couple of predicates to demonstrate - the combine-shl changes add currently unsupported cases, while the MatchRotate replaces an existing mechanism.

    Differential Revision: https://reviews.llvm.org/D35492 — rksimon / detail
  2. Revert r308585

    Builder clang-x86_64-linux-abi-test seems to fail after this change — smaksimovic / detail
  3. [globalisel][tablegen] Add control-flow to the MatchTable.

    Summary:
    This will allow us to merge the various sub-tables into a single table. This is a
    compile-time saving at this point. However, this will also enable the optimization
    of a table so that similar instructions can be tested together, reducing the time
    spent on the matching the code.

    The bulk of this patch is a mechanical conversion to the new MatchTable object
    which is responsible for tracking label definitions and filling in the index of
    the jump targets. It is also responsible for nicely formatting the table.

    This was necessary to support the new GIM_Try opcode which takes the index to
    jump to if the match should fail. This value is unknown during table
    construction and is filled in during emission. To support nesting try-blocks
    (although we currently don't emit tables with nested try-blocks), GIM_Reject
    has been re-introduced to explicitly exit a try-block or fail the overall match
    if there are no active try-blocks.

    Reviewers: ab, t.p.northover, qcolombet, rovka, aditya_nandakumar

    Reviewed By: rovka

    Subscribers: kristof.beyls, igorb, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35117 — dsanders / detail
  4. [mips] Fix fp select machine verifier errors

    Introduced FSELECT node necesary when lowering ISD::SELECT
    which has i32, f64, f64 as its operands.
    SEL_D instruction required that its output and first operand
    of a SELECT node, which it used, have matching types.
    MTC1_D64 node introduced to aid FSELECT lowering.

    This fixes machine verifier errors on following tests:
    CodeGen/Mips/llvm-ir/select-dbl.ll
    CodeGen/Mips/llvm-ir/select-flt.ll
    CodeGen/Mips/select.ll

    Differential Revision: https://reviews.llvm.org/D35408 — smaksimovic / detail

#110 (Jul 20, 2017 2:10:11 AM)

  1. Handle clang-tools-extra project in docker scripts.

    Reviewers: klimek, mehdi_amini

    Reviewed By: mehdi_amini

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D35418 — ibiryukov / detail

#109 (Jul 20, 2017 1:10:12 AM)

  1. clang/module.modulemap: Clang_Diagnostics: Activate "Sema/SemaDiagnostic.h".

    It seems issues were resolved. — chapuni / detail
  2. Revert "[StaticAnalyzer] Completely unrolling specific loops with known bound option"

    Revert r308561 and r308558.

    Clang-ppc64be-linux seems to crash while running the test cases. — szepet / detail
  3. [X86] Use SARX/SHLX/SHLX instructions for (shift x (and y, (BitWidth-1)))

    Fixes PR33841. — ctopper / detail
  4. [X86] Add test cases for (shift x (and y, (BitWidth-1))) to the BMI2 shift test.

    We should use SHLX and similar instructions for these patterns, but we currently don't. — ctopper / detail
  5. [X86] Regenerate shift-and.ll and shift-bmi2.ll using update_llc_test_checks.py.

    I've stripped the checks for 64-bit types in 32-bit mode to match the existing tests. — ctopper / detail
  6. [X86] Remove outdated bug comment from a test.

    The test issue was fixed and the test was updated in r244577, but the comment wasn't removed. — ctopper / detail
  7. clang/module.modulemap: Split out Clang_RewriteFrontend from Clang_Rewrite.

    FIXME: Both Rewrite(Core) and RewriteFrontend don't cover just under clang/Rewrite. There's no file, though. — chapuni / detail
  8. [AArch64] Produce correct defaultlib directives for windows in MSVC style

    Differential Revision: https://reviews.llvm.org/D35546 — mstorsjo / detail
  9. AMDGPU: Correct encoding for global instructions

    The soffset field needs to be be set to 0x7f to disable it,
    not 0. 0 is interpreted as an SGPR offset.

    This should be enough to get basic usage of the global instructions
    working. Technically it is possible to use an SGPR_32 offset,
    but I'm not sure if it's correct with 64-bit pointers, but
    that is not handled now. This should also be cleaned up
    to be more similar to how different MUBUF modes are handled,
    and to have InstrMappings between the different types. — arsenm / detail

#108 (Jul 19, 2017 10:15:36 PM)

  1. [LICM] Make sinkRegion and hoistRegion non-recursive

    Large CFGs can cause us to blow up the stack because we would have a
    recursive step for each basic block in a region.

    Instead, create a worklist and iterate it. This limits the stack usage
    to something more manageable.

    Differential Revision: https://reviews.llvm.org/D35609 — majnemer / detail
  2. Revert "[PEI] Simplify handling of targets with no phys regs. NFC"

    This reverts commit ce30ab6e5598f3c24f59ad016dc9526bc9a1d450.

    sanitizer-ppc64le-linux seems to segfault when testing the sanitizers. — thegameg / detail
  3. Revert "[PEI] Separate saving and restoring CSRs into different functions. NFC"

    This reverts commit 540f6a26ae932469804a379ce9a8cbe715d59c23.

    sanitizer-ppc64le-linux seems to segfault when testing the sanitizers. — thegameg / detail
  4. [DWARF] Added check that verifies that no abbreviation declaration has more than one attribute with the same name.

    SUMMARY

    This patch adds a verification check on the abbreviation declarations in the .debug_abbrev section.
    The check makes sure that no abbreviation declaration has more than one attributes with the same name.

    Differential Revision: https://reviews.llvm.org/D35643 — sgravani / detail
  5. [compiler-rt] Replace VPrintf with VReport in sanitizer_tls_get_addr.cc

    Summary:
    Thread id will be added to VRerort. Having thread here is useful.
    This is also common place for logging for all sanitizers, so I can use this in
    common test.

    Reviewers: kcc, alekseyshl

    Subscribers: kubamracek, llvm-commits, dberris

    Differential Revision: https://reviews.llvm.org/D35655 — Vitaly Buka / detail
  6. [libFuzzer] prototype implementation of recursion-depth coverage features (commented out; real implementation needs to use inlined instrumentation) — kcc / detail
  7. Support, IR, ADT: Check nullptr after allocation with malloc/realloc or calloc

    As a follow up of the bad alloc handler patch, this patch introduces nullptr checks on pointers returned from the
    malloc/realloc/calloc functions.  In addition some memory size assignments  are moved behind the allocation
    of the corresponding memory to fulfill exception safe memory management (RAII).

    patch by Klaus Kretzschmar

    Differential Revision: https://reviews.llvm.org/D35414 — matze / detail
  8. [asan] Move memcpy, memmove, memset code out of asan_interceptors.cc

    This is a pure refactoring change. It simply moves all the code and
    macros related to defining the ASan interceptor versions of memcpy,
    memmove, and memset into a separate file. This makes it cleaner to
    disable all the other interceptor code while still using these three,
    for a port that defines these but not the other common interceptors.

    Reviewers: alekseyshl

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D35590 — alekseyshl / detail
  9. [NFC] Update local variable names to upper-case as per LLVM Coding Standards. — faisalv / detail
  10. [PEI] Separate saving and restoring CSRs into different functions. NFC

    Split insertCSRSpillsAndRestores into insertCSRSaves + insertCSRRestores.

    This is mostly useful for future shrink-wrapping improvements where we
    want to save / restore a specific part of the CSRs in a specific block.

    Differential Revision: https://reviews.llvm.org/D35644 — thegameg / detail
  11. Replace -print-whole-regmask with a threshold.

    The previous flag/default of printing everything is
    not helpful when there are thousands of registers
    in the mask. — arsenm / detail
  12. [libFuzzer] add DeepRecursionTest, inspired by https://guidovranken.wordpress.com/2017/07/08/libfuzzer-gv-new-techniques-for-dramatically-faster-fuzzing/ (Stack-depth-guided fuzzing). libFuzzer does not solve it yet. — kcc / detail
  13. Revert "[LLVM][llvm-objcopy] Added basic plumbing to get things started"

    This reverts commit 98f9792e7ca5bbd9eb43bda72bf497957cfb6eb8. — phosek / detail
  14. Try to deflake fuzzer-oom.test on Windows — rnk / detail
  15. Revert "[PEI] Separate saving and restoring CSRs into different functions. NFC"

    This reverts commit a84d1fa6847e70ebf63594d41a00b473c941bd72. — thegameg / detail
  16. [StaticAnalyzer] Completely unrolling specific loops with known bound option

    Missing files added to rL308558. — szepet / detail

#107 (Jul 19, 2017 5:05:50 PM)

  1. [libFuzzer] simplify two more tests — kcc / detail
  2. [LLVM][llvm-objcopy] Added basic plumbing to get things started

    As discussed on llvm-dev I've implemented the first basic steps towards
    llvm-objcopy/llvm-objtool (name pending).

    This change adds the ability to copy (without modification) 64-bit
    little endian ELF executables that have SHT_PROGBITS, SHT_NOBITS,
    SHT_NULL and SHT_STRTAB sections.

    Patch by Jake Ehrlich

    Differential Revision: https://reviews.llvm.org/D33964 — phosek / detail
  3. This feature allows the analyzer to consider loops to completely unroll. New
    requirements/rules (for unrolling) can be added easily via ASTMatchers.

    The current implementation is hidden behind a flag.

    Right now the blocks which belong to an unrolled loop are marked by the
    LoopVisitor which adds them to the ProgramState. Then whenever we encounter a
    CFGBlock in the processCFGBlockEntrance which is marked then we skip its
    investigating. That means, it won't be considered to be visited more than the
    maximal bound for visiting since it won't be checked.

    Differential Revision: https://reviews.llvm.org/D34260 — szepet / detail
  4. [AsmPrinter] Constify needsCFIMoves. NFC — thegameg / detail
  5. [PEI] Add basic opt-remarks support

    Add optimization remarks support to the PrologueEpilogueInserter. For
    now, emit the stack size as an analysis remark, but more additions wrt
    shrink-wrapping may be added.

    https://reviews.llvm.org/D35645 — thegameg / detail
  6. [PEI] Simplify handling of targets with no phys regs. NFC

    Make doSpillCalleeSavedRegs a member function, instead of passing most
    of the members of PEI as arguments.

    Differential Revision: https://reviews.llvm.org/D35642 — thegameg / detail
  7. [PEI] Separate saving and restoring CSRs into different functions. NFC

    Split insertCSRSpillsAndRestores into insertCSRSaves + insertCSRRestores.

    This is mostly useful for future shrink-wrapping improvements where we
    want to save / restore a specific part of the CSRs in a specific block.

    Differential Revision: https://reviews.llvm.org/D35644 — thegameg / detail
  8. [libFuzzer] change several tests to not limit the max len: with reduce_inputs=1 they are now fast enough even w/o this — kcc / detail
  9. Use llvm::make_unique once more to avoid ADL ambiguity with std::make_unique — rnk / detail
  10. Use llvm::make_unique to try to fix the windows build. — rafael / detail
  11. Remove some leftover DWARFContextInMemory.

    Not sure how I missed these on the previous commit. — rafael / detail
  12. Fix fuzzer-flags.test on Windows

    The optional external function callbacks have to be exported in order
    for them to be called. The test was failing because libFuzzer wasn't
    calling LLVMFuzzerInitialize.

    We can reconsider if this is the best way to mark these optional
    callbacks exported later. — rnk / detail
  13. Update module map for RuntimeLibcalls

    The def file was created in r308531 — dschuff / detail
  14. [X86] Put avx512vpopcntdq in the right spot in the validateCpuSupports string switch.

    The validateCpuSupports switch is in the order of the enum defined in CGBuiltin.cpp and libgcc/compiler-rt. — ctopper / detail
  15. [NFC] Fix typo in comment — thegameg / detail
  16. Use delegation instead of inheritance.

    This changes DwarfContext to delegate to DwarfObject instead of having
    pure virtual methods.

    With this DwarfContextInMemory is replaced with an implementation of
    DwarfObject that is local to a .cpp file. — rafael / detail
  17. GlobalISel: partially revert r308540.

    An unfinished and untested implementation of ISel for G_UNMERGE_VALUES crept in
    by mistake. — Tim Northover / detail
  18. [libFuzzer] enable reduce_inputs=1 by default (seems to be a big win usually) — kcc / detail
  19. GlobalISel: fix SUBREG_TO_REG implementation.

    The first argument needs to be an immediate rather than a register. Should fix
    some crashes in the verifier bot. — Tim Northover / detail
  20. Improve SEMA for attribute-target

    Add more diagnosis for the non-multiversioning case.

    Differential Revision: https://reviews.llvm.org/D35573 — erichkeane / detail
  21. [opt-viewer] Reduce memory consumption by another 20-25%

    The Args field of the remark which consists of a list of mappings in YAML is
    translated into a list of (small) dicts on Python.  An empty dict is 280 bytes
    on my system so we can save memory by using a tuple of tuples instead.

    Making a tuple of tuples rather than a list of tuples allows Args to be shared
    with the key of the remark.  This is actually an even greater saving. (Keys
    are alive throughout the entire run in all_remarks.)

    Here are a few opt-stats runs with different input sizes while measuring heap
    usage with heapy.  Avg remark size is simply estimated as
    heap-size / # of remarks:

      | # of files             |   60 |  114 |  308 |  605 | 1370 |
      | # of remarks           |  20K |  37K | 146K | 180K | 640K |
      | total file size (MB)   |   22 |   51 |  219 |  202 | 1034 |
      |------------------------+------+------+------+------+------|
      | Avg remark size before | 4339 | 4792 | 4761 | 4096 | 4607 |
      | Avg remark size after  | 3446 | 3641 | 3567 | 3146 | 3347 |
      | Rate                   | 0.79 | 0.76 | 0.75 | 0.77 | 0.73 |

    Differential Revision: https://reviews.llvm.org/D35611 — anemet / detail
  22. [opt-viewer] Print allocated memory per remark in opt-stats.py

    If heapy is installed print the "average" in-memory remark size.  This is
    estimated by dividing the total heap size by the number of unique remarks. — anemet / detail
  23. [opt-viewer] Reduce memory consumption

    The observation is that we have a lot of similar remarks with lots of
    identical strings (e.g. file paths, text from the remark).  Storing a copy of
    each of those strings in memory is wasteful.  This makes all the strings in
    the remark interned which maintains a single immutable instance that is
    referenced everywhere.

    I get an average 20% heap size reduction with this but it's possible that this
    varies with the typical length of the file paths used.  (I used heapy to
    report the heap size.)  Runtime is same or a tiny bit better.

      | # of files            |   60 |  114 |  308 |  605 | 1370 |
      | # of remarks          |  20K |  37K | 146K | 180K | 640K |
      | total file size (MB)  |   22 |   51 |  219 |  202 | 1034 |
      |-----------------------+------+------+------+------+------|
      | Heap size before (MB) |  106 |  226 |  894 |  934 | 3573 |
      | Heap size after       |   86 |  179 |  694 |  739 | 2798 |
      | Rate                  | 0.81 | 0.79 | 0.78 | 0.79 | 0.78 |
      |-----------------------+------+------+------+------+------|
      | Average remark size   | 4.30 | 4.84 | 4.75 | 4.11 | 4.37 |
      | Mem2disk ratio        | 3.91 | 3.51 | 3.17 | 3.66 | 2.71 |

    Differential Revision: https://reviews.llvm.org/D35534 — anemet / detail
  24. [libcxx] [test] Update msvc_stdlib_force_include.hpp.

    MSVC's STL is replacing _HAS_FUNCTION_ASSIGN with _HAS_FUNCTION_ALLOCATOR_SUPPORT,
    and is adding _HAS_UNEXPECTED. — stl_msft / detail
  25. [libcxx] [test] Fix Clang -Wunused-local-typedef warnings.

    Fix D34536. — stl_msft / detail
  26. [libcxx] [test] Fix MSVC warning C4067 "unexpected tokens following preprocessor directive - expected a newline".

    Also fixes Clang/LLVM 4.0 (for Windows) error "function-like macro 'TEST_GLIBC_PREREQ' is not defined".

    Fixes D34535. — stl_msft / detail
  27. [libcxx] [test] Fix MSVC warning C4242 "conversion from 'int' to 'const char', possible loss of data".

    Fixes D34534. — stl_msft / detail

#106 (Jul 19, 2017 2:59:30 PM)

  1. Move Runtime libcall definitions to a .def file

    This will allow eliminating the duplication of the names, and allow adding
    extra information such as signatures in a future commit.

    Differential Revision: https://reviews.llvm.org/D35522 — dschuff / detail
  2. Add isValidCPUName and isValidFeature to TargetInfo

    These two functions are really useful for implementations of attributes
    (including attribute-target), so add the functionality. — erichkeane / detail
  3. Rework libcxx strerror_r handling.

    The set of #ifdefs used to handle the two incompatible variants of
    strerror_r were not complete (they didn't handle newlib appropriately).

    Rather than attempting to make the ifdefs more complex, make them
    unnecessary by choosing which behavior to use dependent upon the
    return type.

    Reviewers: waltl

    Differential Revision: https://reviews.llvm.org/D34294 — jyknight / detail
  4. Forgot to add triple to test in r308513. — wolfgangp / detail
  5. [TRE] Add another test for OptRemark.

    This shows we emit a remark for tail recursion -> loop. — davide / detail
  6. [TRE] Move to the new OptRemark API.

    Fixes PR33788.

    Differential Revision:  https://reviews.llvm.org/D35570 — davide / detail
  7. make LLDB test archs configurable in the environment — penryu / detail
  8. [yaml2obj][ELF] Add support for program headers

    This change adds basic support for program headers.

    I need to do some testing which requires generating program headers but
    I can't use ld.lld or clang to produce programs that have headers. I'd
    also like to test some strange things that those programs may never
    produce.

    Patch by Jake Ehrlich

    Differential Revision: https://reviews.llvm.org/D35276 — phosek / detail
  9. [AArch64] Force relocations for all ADRP instructions

    This generalizes an existing fix from ELF to MachO and COFF.

    Test that an ADRP to a local symbol whose offset is known at assembly
    time still produces relocations, both for MachO and COFF. Test that
    an ADRP without a @page modifier on MachO fails (previously it
    didn't).

    Differential Revision: https://reviews.llvm.org/D35544 — mstorsjo / detail
  10. [AArch64, COFF] Interpret .align as power of two for COFF as well

    Differential Revision: https://reviews.llvm.org/D35545 — mstorsjo / detail
  11. Add an X86-64 with SDE clang builder and slave

    Differential revision: https://reviews.llvm.org/D35580 — eladcohen / detail
  12. Fixing an issue with the initialization of LexicalScopes objects when mixing debug
    and non-debug units.

    Patch by Andrea DiBiagio.

    Differential Revision:  https://reviews.llvm.org/D35637 — wolfgangp / detail
  13. Added new admin to buildbot homepage. — gkistanova / detail

#105 (Jul 19, 2017 12:20:21 PM)

  1. [Hexagon] Fix a bug in r308502: post-inc offset is always 0 — kparzysz / detail
  2. Added new machine for builder clang-lld-x86_64-2stage. — gkistanova / detail
  3. [cmake] GetSVN.cmake takes a list of arguments

    Summary:
    GetSVN.cmake currently takes one or two pairs of <source directory path,
    name>, then attempts to get the remote repository URL and source control
    revision of the repositories at those one or two paths.

    It takes two pairs in order for Clang to get the revision of both
    itself, and its dependency LLVM.

    For projects that rely upon both LLVM and Clang (Apple's Swift is one
    example, but there are others), GetSVN.cmake is used to fetch *three*
    revisions: Swift, Clang, and LLVM.

    To support this use case, change GetSVN.cmake: instead of taking one or
    two pairs (specified via `FIRST_SOURCE_DIR`/`FIRST_NAME`, have it take a list
    of pairs (`SOURCE_DIRS`/`NAMES`).

    In order to allow Clang to migrate, have GetSVN.cmake support both sets
    of arguments for now. The old arguments can be removed once Clang begins
    using the new arguments, and Swift can follow when it updates its
    copy of LLVM.

    Test Plan:
    1. Perform a clean build of Clang, verify that `clang --version` still
       prints the correct LLVM and Clang revision information.
    2. Modify Clang's CMake to use the new arguments, then perform another
       clean build. `clang --version` should still print the correct
       revision information.

    Reviewers: jordan_rose, beanz, probinson

    Subscribers: echristo, chapuni, llvm-commits, mgorny

    Differential Revision: https://reviews.llvm.org/D35132 — modocache / detail
  4. LTO: Export functions referenced by the CFI jump table.

    If the LowerTypeTests pass decides to add a function to a jump
    table for CFI, it will add its name to the set cfiFunctionDefs,
    which among other things will cause the function to be renamed in
    the ThinLTO backend.

    One other thing that we must do with such functions is to not
    internalize them, because the jump table in the full LTO object will
    contain a reference to the actual function body in the ThinLTO object.

    This patch handles that by ensuring that we export any functions
    whose names appear in the cfiFunctionDefs set.

    Fixes PR33831.

    Differential Revision: https://reviews.llvm.org/D35605 — pcc / detail
  5. [X86] Don't try to scale down if that exceeds the bitwidth.

    Fixes the crash reported in PR33844. — davide / detail
  6. [Hexagon] Handle subregisters in areMemAccessesTriviallyDisjoint — kparzysz / detail
  7. ThinLTOBitcodeWriter: Do not rewrite intrinsic functions when splitting modules.

    Changing the type of an intrinsic may invalidate the IR.

    Differential Revision: https://reviews.llvm.org/D35593 — pcc / detail
  8. Add AlignedAllocation.h.

    I forgot to "git add" it in r308496. — ahatanak / detail
  9. [Sema] Improve diagnostic message for unavailable C++17 aligned
    allocation functions.

    This changes the error message Sema prints when an unavailable C++17
    aligned allocation function is selected.

    Original message: "... possibly unavailable on x86_64-apple-macos10.12"
    New message: "... only available on macOS 10.13 or newer"

    This is a follow-up to r306722.

    rdar://problem/32664169

    Differential Revision: https://reviews.llvm.org/D35520 — ahatanak / detail

#104 (Jul 19, 2017 9:58:04 AM)

  1. GlobalISel: select G_EXTRACT and G_INSERT instructions on AArch64. — Tim Northover / detail
  2. [Solaris] enable --whole-archive for shared-library build, disable --version-script for Solaris-ld
    Shared-library build on Solaris requires --whole-archive to be specified (option accepted by all available linkers).

    At the same time, --version-script can not be handled by Solaris-ld, so it should be skipped.
    -M is of no use here, since there is no syntax in Solaris-ld mapfiles that allows to version all global symbols,
    not just the named ones (at least this is my impression from digging deep into the docs).

    Patch by Fedor Sergeev <fedor.sergeev@oracle.com> — sylvestre / detail
  3. [clangd] Allow specifying -resource-dir

    Summary: This patch allows clangd to specify its -resource-dir.

    Reviewers: bkramer, klimek

    Reviewed By: bkramer

    Subscribers: cfe-commits

    Tags: #clang-tools-extra

    Differential Revision: https://reviews.llvm.org/D35617 — krasimir / detail
  4. [Hexagon] Handle subregisters and non-immediates in getBaseAndOffset — kparzysz / detail

#103 (Jul 19, 2017 8:10:10 AM)

  1. Defeat another -Wunused-but-set-variable warning — hans / detail
  2. Defeat a GCC -Wunused-result warning

    It was warning like:

    ../llvm-project/llvm/lib/Support/ErrorHandling.cpp:172:51: warning:
    ignoring return value of ‘ssize_t write(int, const void*, size_t)’,
             declared with attribute warn_unused_result [-Wunused-result]
                (void)::write(2, OOMMessage, strlen(OOMMessage));

    Work around the warning by storing the return value in a variable and
    casting that to void instead. We already did this for the other write()
    call in this file. — hans / detail
  3. Clear release notes for 6.0.0 — hans / detail
  4. Clear release notes for 6.0.0 — hans / detail
  5. [docs] Document how to debug instruction scheduling model generation

    Describe:

    + Exact tablegen command and how to get it
    + tablegen command debug option for subtarget generation
    + Use of schedcover.py on the debug output to determine coverage

    Differential Revision: https://reviews.llvm.org/D35058 — joel_k_jones / detail

#102 (Jul 19, 2017 7:10:11 AM)

  1. Clear release notes for 6.0.0 — hans / detail
  2. Update _LIBCPP_VERSION and the version in CMakeLists to 6.0 — hans / detail
  3. Bump docs version to 6.0 — hans / detail
  4. Bump docs version to 6.0 — hans / detail
  5. Bump docs version to 6.0 — hans / detail
  6. {DAGCombine] Convert (Val & Mask) == Mask to Mask.isSubsetof(Val). NFCI. — rksimon / detail
  7. Revert "Reland "[mips] Teach the driver to accept -m(no-)gpopt.""

    This reverts r308458. Investigating further buildbot breakage. — sdardis / detail
  8. Reland "[mips] Teach the driver to accept -m(no-)gpopt."

    This patch teaches the driver to pass -mgpopt by default to the backend when it
    is supported, i.e. we are using -mno-abicalls.

    Reviewers: atanasyan, slthakur

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

    This version fixes a logic error that generated warnings incorrectly. — sdardis / detail

#101 (Jul 19, 2017 6:10:11 AM)

  1. [ARM] Unify handling of M-Class system registers

    This patch cleans up and fixes issues in the M-Class system register handling:

    1. It defines the system registers and the encoding (SYSm values) in one place:
       a new ARMSystemRegister.td using SearchableTable, thereby removing the
       hand-coded values which existed in multiple places.

    2. Some system registers e.g. BASEPRI_MAX_NS which do not exist were being allowed!
       Ref: ARMv6/7/8M architecture reference manual.

    Reviewed by: @t.p.northover, @olist01, @john.brawn
    Differential Revision: https://reviews.llvm.org/D35209 — javed.absar / detail
  2. Revert r308441 "Recommit r308327: Add a warning for missing '#pragma pack (pop)' and suspicious uses of '#pragma pack' in included files"

    This seems to have broken the sanitizer-x86_64-linux buildbot. Reverting until
    it's fixed, especially since this landed just before the 5.0 branch.

    > This commit adds a new -Wpragma-pack warning. It warns in the following cases:
    >
    > - When a translation unit is missing terminating #pragma pack (pop) directives.
    > - When entering an included file if the current alignment value as determined
    >   by '#pragma pack' directives is different from the default alignment value.
    > - When leaving an included file that changed the state of the current alignment
    >   value.
    >
    > rdar://10184173
    >
    > Differential Revision: https://reviews.llvm.org/D35484 — hans / detail
  3. Update trunk version to 6.0.0svn — hans / detail
  4. Recommit r308327: Add a warning for missing '#pragma pack (pop)'
    and suspicious uses of '#pragma pack' in included files

    This commit adds a new -Wpragma-pack warning. It warns in the following cases:

    - When a translation unit is missing terminating #pragma pack (pop) directives.
    - When entering an included file if the current alignment value as determined
      by '#pragma pack' directives is different from the default alignment value.
    - When leaving an included file that changed the state of the current alignment
      value.

    rdar://10184173

    Differential Revision: https://reviews.llvm.org/D35484 — arphaman / detail
  5. Recommit r274270, [CMake] Module builds depend on target intrinsics_gen to be built first.

    The builder clang-x86_64-linux-selfhost-modules-2 complains. Investigating. — chapuni / detail
  6. Fix compilation problem introduced in r308433 — erikjv / detail
  7. Revert "[mips] Teach the driver to accept -m(no-)gpopt."

    Revert r308431 and r308432, these caused broke some buildbots. — sdardis / detail
  8. Revert r274270, "[CMake] Module builds depend on target intrinsics_gen to be built first."

    I think modulemap is sufficient for intrinsics_gen in trunk. I won't find any issues around that. — chapuni / detail
  9. Add default values for function parameter chunks

    Append optional chunks with their default values. For example:
    before - "int i", after - "int i = 10"

    Patch by Ivan Donchevskii!
       
    Differential Revision: https://reviews.llvm.org/D33644 — erikjv / detail
  10. [mips] Add warning test for -mgpopt option. — sdardis / detail
  11. [mips] Teach the driver to accept -m(no-)gpopt.

    This patch teaches the driver to pass -mgpopt by default to the backend when it
    is supported, i.e. we are using -mno-abicalls.

    Reviewers: atanasyan, slthakur

    Differential Revision: https://reviews.llvm.org/D35548 — sdardis / detail

#100 (Jul 19, 2017 3:37:38 AM)

  1. [X86][XOP] Use default AVX2 lowering for v4i64 ashr by splat constants

    XOP shifts only support 128-bit vectors, so we were ending up with less optimal codegen requiring constants — rksimon / detail
  2. [SystemZ]  Minor fixing in SystemZScheduleZ14.td

    Some minor corrections for recently added instructions.

    Review: Ulrich Weigand — jonpa / detail
  3. [LoopUtils] Add an extra parameter OpValue to propagateIRFlags function,
    If OpValue is non-null, we only consider operations similar to OpValue
    when intersecting.

    Differential Revision: https://reviews.llvm.org/D35292 — dinar / detail
  4. Update clang-cl options in the users manual — hans / detail
  5. [globalisel][tablegen] 80-col corrections. — dsanders / detail

#99 (Jul 19, 2017 2:10:11 AM)

  1. [SimplifyCFG] Defer folding unconditional branches to LateSimplifyCFG if it can destroy canonical loop structure.

    Summary:
    When simplifying unconditional branches from empty blocks, we pre-test if the
    BB belongs to a set of loop headers and keep the block to prevent passes from
    destroying canonical loop structure. However, the current algorithm fails if
    the destination of the branch is a loop header. Especially when such a loop's
    latch block is folded into loop header it results in additional backedges and
    LoopSimplify turns it into a nested loop which prevent later optimizations
    from being applied (e.g., loop  unrolling and loop interleaving).

    This patch augments the existing algorithm by further checking if the
    destination of the branch belongs to a set of loop headers and defer
    eliminating it if yes to LateSimplifyCFG.

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

    Reviewers: efriedma, mcrosier, pacxx, hsung, davidxl

    Reviewed By: efriedma

    Subscribers: ashutosh.nema, gberry, javed.absar, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35411 — bmakam / detail

#95 (Jul 18, 2017 10:26:50 PM)

  1. [LV] Test once if vector trip count is zero, instead of twice

    Generate a single test to decide if there are enough iterations to jump to the
    vectorized loop, or else go to the scalar remainder loop. This test compares the
    Scalar Trip Count: if STC < VF * UF go to the scalar loop. If
    requiresScalarEpilogue() holds, at-least one iteration must remain scalar; the
    rest can be used to form vector iterations. So in this case the test checks
    instead if (STC - 1) < VF * UF by comparing STC <= VF * UF, and going to the
    scalar loop if so. Otherwise the vector loop is entered for at-least one vector
    iteration.

    This test covers the case where incrementing the backedge-taken count will
    overflow leading to an incorrect trip count of zero. In this (rare) case we will
    also avoid the vector loop and jump to the scalar loop.

    This patch simplifies the existing tests and effectively removes the basic-block
    originally named "min.iters.checked", leaving the single test in block
    "vector.ph".

    Original observation and initial patch by Evgeny Stupachenko.

    Differential Revision: https://reviews.llvm.org/D34150 — ayalz / detail
  2. [X86][builtins] Sync getX86CpuIDAndInfoEx with llvm's Host.cpp again.

    We now use __cpuidex intrinsics intead of inline asm on 32-bit Windows. We already used it on 64-bit. — ctopper / detail
  3. [CGP] Allow cycles during Phi traversal in OptimizaMemoryInst

    Allowing cycles in Phi traversal increases the scope of optimize memory instruction
    in case we are in loop.

    The added test shows an example of enabling optimization inside a loop.

    Reviewers: loladiro, spatel, efriedma
    Reviewed By: efriedma
    Subscribers: llvm-commits
    Differential Revision: https://reviews.llvm.org/D35294 — skatkov / detail
  4. Revert r308273 to reinstate part of r308100.

    That part was reverted because the underlying change necessitating it
    (r308025) was reverted in r308271.

    Nirav re-landed r308025 again in r308350, so re-landing this fix. — chandlerc / detail
  5. [PM/LCG] Follow-up fix to r308088 to handle deletion of library
    functions.

    In the prior commit, we provide ordering to the LCG between functions
    and library function definitions that they might begin to call through
    transformations. But we still would delete these library functions from
    the call graph if they became dead during inlining.

    While this immediately crashed, it also exposed a loss of information.
    We shouldn't remove definitions of library functions that can still
    usefully participate in the LCG-powered CGSCC optimization process. If
    new call edges are formed, we want to have definitions to be called.

    We can still remove these functions if truly dead using global-dce, etc,
    but removing them during the CGSCC walk is premature.

    This fixes a crash in the new PM when optimizing some unusual libraries
    that end up with "internal" lib functions such as the code in the "R"
    language's libraries. — chandlerc / detail
  6. [analyzer] Add annotation attribute to trust retain count implementation

    Add support to the retain-count checker for an annotation indicating that a
    function's implementation should be trusted by the retain count checker.
    Functions with these attributes will not be inlined and the arguments will
    be treating as escaping.

    Adding this annotation avoids spurious diagnostics when the implementation of
    a reference counting operation is visible but the analyzer can't reason
    precisely about the ref count.

    Patch by Malhar Thakkar!

    Differential Revision: https://reviews.llvm.org/D34937 — Devin Coughlin / detail
  7. [SPARC] Add missing variable initialization after r308343. — jyknight / detail
  8. [CMake] Build runtimes for Fuchsia targets

    This relies on the multi-target runtimes build support.

    Differential Revision: https://reviews.llvm.org/D32817 — phosek / detail
  9. AMD znver1 Initial Scheduler model

    Summary:
    This patch adds the following
    1. Adds a skeleton scheduler model for AMD Znver1.
    2. Introduces the znver1 execution units and pipes.
    3. Caters the instructions based on the generic scheduler classes.
    4. Further additions to the scheduler model with instruction itineraries will be carried out incrementally based on
            a. Instructions types
            b. Registers used
    5. Since itineraries are not added based on instructions, throughput information are bound to change when incremental changes are added.
    6. Scheduler testcases are modified accordingly to suit the new model.

    Patch by Ganesh Gopalasubramanian. With minor formatting tweaks from me.

    Reviewers: craig.topper, RKSimon

    Subscribers: javed.absar, shivaram, ddibyend, vprasad

    Differential Revision: https://reviews.llvm.org/D35293 — ctopper / detail

#94 (Jul 18, 2017 7:46:58 PM)

  1. [llvm-readobj] Install llvm-readelf alias

    Install an llvm-readelf symlink to llvm-readobj.
    When invoked as *readelf*, default to -elf-output-style=GNU.

    Patch by Roland McGrath

    Differential Revision: https://reviews.llvm.org/D33869 — phosek / detail
  2. Object: preserve more information about DEF file

    Preserve the actual library name as provided by the user.  This is
    required to properly replicate link's behaviour about the module import
    name handling.  This requires an associated change to lld for updating
    the tests for the proper behaviour for the import library module name
    handling in various cases.

    Associated tests will be part of the lld change. — Saleem Abdulrasool / detail
  3. Fix DebugLoc propagation for unreachable LoadInst

    Summary: Currently, when GVN creates a load and when InstCombine creates a new store for unreachable Load, the DebugLoc info gets lost.

    Reviewers: dberlin, davide, aprantl

    Reviewed By: aprantl

    Subscribers: davide, llvm-commits

    Differential Revision: https://reviews.llvm.org/D34639 — weimingz / detail
  4. [scan-build-py] Patch to fix "-analyzer-config" option

    I noticed that when I use "-analyze-config" option in scan-build-py, it
    behaves differently from original perl based scan-build.

    For example, command:

    $ scan-build -analyzer-config ipa=basic-inlining make

    Will work without any issues on perl version of scan-build. But on
    scan-build-py it will throw an error message "error reading
    'ipa=basic-inlining'".

    After debugging, it turns out that the scan-build-py does not put
    "-analyzer-config" flag in front of the analyzer config flags (in this
    case is the "ipa=basic-inlining") in the final clang command line. This
    patch fixes this issue.

    Patch by Haowei Wu

    Differential Revision: https://reviews.llvm.org/D34489 — phosek / detail
  5. Update for LLVM IR metadata changes (DIImportedEntity now needs a DIFile).

    <rdar://problem/33357889>
    https://bugs.llvm.org/show_bug.cgi?id=33822

    Differential Revision: https://reviews.llvm.org/D35583 — Adrian Prantl / detail
  6. Debug Info: Add a file: field to DIImportedEntity.

    DIImportedEntity has a line number, but not a file field. To determine
    the decl_line/decl_file we combine the line number from the
    DIImportedEntity with the file from the DIImportedEntity's scope. This
    does not work correctly when the parent scope is a DINamespace or a
    DIModule, both of which do not have a source file.

    This patch adds a file field to DIImportedEntity to unambiguously
    identify the source location of the using/import declaration.  Most
    testcase updates are mechanical, the interesting one is the removal of
    the FIXME in test/DebugInfo/Generic/namespace.ll.

    This fixes PR33822. See https://bugs.llvm.org/show_bug.cgi?id=33822
    for more context.

    <rdar://problem/33357889>
    https://bugs.llvm.org/show_bug.cgi?id=33822

    Differential Revision: https://reviews.llvm.org/D35583 — Adrian Prantl / detail
  7. Debug Info: Set the MainFileName when generating -gmodules debug info for PCM.

    Previously it was uninitialized and thus always defaulted to "<stdin>".
    This is mostly a cosmetic change that helps making the debug info more readable. — Adrian Prantl / detail
  8. [llvm-readobj] Accept (and ignore) --wide (-W) command-line switch

    Accept and ignore --wide/-W. In GNU readelf this switch is
    necessary to get the output format that's consistent between
    32-bit and 64-bit targets. llvm-readobj always produces that
    output format.

    Patch by Roland McGrath

    Differential Revision: https://reviews.llvm.org/D33873 — phosek / detail
  9. Revert "Add MemoryMappedSection struct for two-level memory map iteration"

    This reverts commit c8095ce74118dee8544b0f1ffaba8f46aa10215c.

    Reverted due to some buildbot timeouts, perhaps due to 10.11 issues. — fjricci / detail
  10. Revert "Only scan global sections containing data in LSan on darwin"

    This reverts commit 7e46d78d47832f03ce42adcf56417fbfd47cbaad. — fjricci / detail
  11. [llvm-readobj] Accept -S as an alias for --sections

    In GNU readelf, the short option for --sections is upper-case -S.

    Note that GNU uses lower-case -s to mean --symbols, while LLVM
    uses -s to mean --sections and -t to mean --symbols (-t has yet a
    different meaning in GNU). So command-line uses with -S can now
    be compatible, but uses with -s or -t are still incompatible.

    Patch by Roland McGrath

    Differential Revision: https://reviews.llvm.org/D33872 — phosek / detail
  12. [Driver] Always use -z rodynamic for Fuchsia

    Fuchsia uses read-only .dynamic section.

    Differential Revision: https://reviews.llvm.org/D35582 — phosek / detail

#93 (Jul 18, 2017 4:10:49 PM)

  1. [AArch64] Adjust the feature set for Exynos M2

    Add fusion of AES operations. — evandro / detail
  2. [asan] Copy arguments passed by value into explicit allocas for ASan

      Summary:
      ASan determines the stack layout from alloca instructions. Since
    arguments marked as "byval" do not have an explicit alloca instruction, ASan
    does not produce red zones for them. This commit produces an explicit alloca
    instruction and copies the byval argument into the allocated memory so that red
    zones are produced.

      Submitted on behalf of @morehouse (Matt Morehouse)

      Reviewers: eugenis, vitalybuka

      Reviewed By: eugenis

      Subscribers: hiraditya, llvm-commits

      Differential Revision: https://reviews.llvm.org/D34789 — Vitaly Buka / detail
  3. Object: rename parameter from DLLName to ImportName

    When I originally wrote this code, I neglected the fact that the import
    library may be created for executables.  This name is not the name of
    the DLL, but rather the name for the imported module.  It will be
    embedded into the IAT/ILT reference.  Rename it to make it more obvious.
    NFC. — Saleem Abdulrasool / detail
  4. Object: handle extensions properly in def files

    When given an extension as part of the `library` directive in a def
    file, the extension is preserved/honoured by link/lib.  Behave similarly
    when parsing the def file.  This requires checking if a native extension
    is provided as a keyword parameter.  If no extension is present, append
    a standard `.dll` or `.exe` extension.

    This is best tested via lld, and I will add tests there as a follow up. — Saleem Abdulrasool / detail
  5. Display arguments passed to dotest.py — penryu / detail
  6. llvm: add llvm-dlltool support to the archiver

    A PE COFF spec compliant import library generator.
    Intended to be used with mingw-w64.

    Supports:
    PE COFF spec (section 8, Import Library Format)
    PE COFF spec (Aux Format 3: Weak Externals)

    Reviewed By: ruiu
    Differential Revision: https://reviews.llvm.org/D29892

    This reapplies rL308329, which was reverted in rL308374 — martell / detail
  7. [RuntimeDyld][MachO/ARM] Don't add a redundant relocation entry.

    We only need to add this entry once for it to be fixed up. — Lang Hames / detail
  8. Revert r308329: llvm: add llvm-dlltool support to the archiver

    This reverts commit r308329 because it broke buildbots. — ruiu / detail
  9. llvm: fix -Wcast gcc warn error from rL308329 — martell / detail
  10. [CMake] Set toolchain tools in cross-target runtimes build

    This is needed for runtimes build to work on Darwin.

    Differential Revision: https://reviews.llvm.org/D35343 — phosek / detail
  11. [COFF, ARM64] Reserve X18 register by default

    Reviewers: compnerd, rnk, ruiu, mstorsjo

    Reviewed By: mstorsjo

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

    Differential Revision: https://reviews.llvm.org/D35531 — mgrang / detail
  12. Convert attribute 'target' parsing from a 'pair' to a 'struct' to make further improvements easier


    Convert attribute 'target' parsing from a 'pair' to a 'struct' to make further
    improvements easier

    The attribute 'target' parse function previously returned a pair. Convert
    this to a 'pair' in order to add more functionality, and improve usability.

    Differential Revision: https://reviews.llvm.org/D35574 — erichkeane / detail
  13. [Sema] NFC: Move all availability checking code to SemaDeclAttr.cpp

    Previously, this was awkwardly split up between SemaExpr.cpp. — epilk / detail
  14. [Dominators] Improve error checking in deleteEdge

    Summary: This patch improves error detection in deleteEdge. It asserts that the edge doesn't exist in the CFG and that DomTree knew about this edge before.

    Reviewers: dberlin, grosser, brzycki, sanjoy

    Reviewed By: dberlin

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D35571 — kuhar / detail
  15. Don't call exit() from atexit handlers on Darwin

    Summary:
    Calling exit() from an atexit handler is undefined behavior.
    On Linux, it's unavoidable, since we cannot intercept exit (_exit isn't called
    if a user program uses return instead of exit()), and I haven't
    seen it cause issues regardless.

    However, on Darwin, I have a fairly complex internal test that hangs roughly
    once in every 300 runs after leak reporting finishes, which is resolved with
    this patch, and is presumably due to the undefined behavior (since the Die() is
    the only thing that happens after the end of leak reporting).

    In addition, this is the way TSan works as well, where an atexit handler+Die()
    is used on Linux, and an _exit() interceptor is used on Darwin. I'm not sure if it's
    intentionally structured that way in TSan, since TSan sets up the atexit handler and the
    _exit() interceptor on both platforms, but I have observed that on Darwin, only the
    _exit() interceptor is used, and on Linux the atexit handler is used.

    There is some additional related discussion here: https://reviews.llvm.org/D35085

    Reviewers: alekseyshl, kubamracek

    Subscribers: eugenis, vsk, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35513 — fjricci / detail
  16. [OPENMP] Initial support for 'task_reduction' clause.

    Parsing/sema analysis of the 'task_reduction' clause. — abataev / detail
  17. [DAG] Improve Aliasing of operations to static alloca

    Re-recommiting after landing DAG extension-crash fix.

    Recommiting after adding check to avoid miscomputing alias information
    on addresses of the same base but different subindices.

    Memory accesses offset from frame indices may alias, e.g., we
    may merge write from function arguments passed on the stack when they
    are contiguous. As a result, when checking aliasing, we consider the
    underlying frame index's offset from the stack pointer.

    Static allocs are realized as stack objects in SelectionDAG, but its
    offset is not set until post-DAG causing DAGCombiner's alias check to
    consider access to static allocas to frequently alias. Modify isAlias
    to consider access between static allocas and access from other frame
    objects to be considered aliasing.

    Many test changes are included here. Most are fixes for tests which
    indirectly relied on our aliasing ability and needed to be modified to
    preserve their original intent.

    The remaining tests have minor improvements due to relaxed
    ordering. The exception is CodeGen/X86/2011-10-19-widen_vselect.ll
    which has a minor degradation dispite though the pre-legalized DAG is
    improved.

    Reviewers: rnk, mkuper, jonpa, hfinkel, uweigand

    Reviewed By: rnk

    Subscribers: sdardis, nemanjai, javed.absar, llvm-commits

    Differential Revision: https://reviews.llvm.org/D33345 — niravd / detail

#92 (Jul 18, 2017 12:54:49 PM)

  1. [DAG] Reverse node replacement in extension operation.  NFCI.

    Reorder replacements to be user first in preparation for multi-level
    folding to premptively avoid inadvertantly deleting later nodes from
    sharing found from replacement. — niravd / detail
  2. [CMake] Use MATCHES for regular expression.

    Subscribers: mgorny

    Differential Revision: https://reviews.llvm.org/D35514 — aoli / detail
  3. [opt-viewer] Handle file names that contain '#'

    Summary:
    When using opt-viewer.py with files with '#' in their name, such as
    'foo#bar.cpp', opt-viewer.py would generate links such as
    '/path/to/foo#bar.cpp.opt.yaml#L42'. In this case, the link is
    interpreted by browsers as a link to the file '/path/to/foo', and to the
    section within that file with ID 'bar.cpp.opt.yaml#L42'.

    To work around this issue, replace '#' with '_' in file names and links
    in opt-viewer.py.

    Reviewers: anemet, davidxl

    Reviewed By: davidxl

    Subscribers: llvm-commits, fhahn

    Differential Revision: https://reviews.llvm.org/D34646 — modocache / detail
  4. [Sanitizers] ASan/MSan/LSan allocators set errno on failure.

    Summary:
    ASan/MSan/LSan allocators set errno on allocation failures according to
    malloc/calloc/etc. expected behavior.

    MSan allocator was refactored a bit to make its structure more similar
    with other allocators.

    Also switch Scudo allocator to the internal errno definitions.

    TSan allocator changes will follow.

    Reviewers: eugenis

    Subscribers: llvm-commits, kubamracek

    Differential Revision: https://reviews.llvm.org/D35275 — alekseyshl / detail
  5. [Sparc] Added software multiplication/division feature

    Added a feature to the Sparc back-end that replaces the integer multiply and
    divide instructions with calls to .mul/.sdiv/.udiv. This is a step towards
    having full v7 support.

    Patch by: Eric Kedaigle
    Differential Revision: https://reviews.llvm.org/D35500 — jyknight / detail
  6. Add GCC's noexcept-type alias for c++1z-compat-mangling

    Summary: GCC has named this `-Wnoexcept-type`, so let's add an alias to stay compatible with the GCC flags.

    Reviewers: rsmith, dexonsmith

    Reviewed By: dexonsmith

    Subscribers: cfe-commits, karies, v.g.vassilev, ahatanak

    Differential Revision: https://reviews.llvm.org/D34439 — Raphael Isemann / detail
  7. [libFuzzer] when adding a reduced input print REDUCED instead of NEW — kcc / detail
  8. Don't set TUScope to null when generating a module in incremental processing mode.

    Summary: When in incremental processing mode, we should never set `TUScope` to a nullptr otherwise any future lookups fail. We already have similar checks in the rest of the code, but we never hit this one because so far we didn't try to generate a module from the AST that Cling generates.

    Reviewers: rsmith, v.g.vassilev

    Reviewed By: v.g.vassilev

    Subscribers: cfe-commits, v.g.vassilev

    Differential Revision: https://reviews.llvm.org/D35536 — Raphael Isemann / detail
  9. fix typos in a document; NFC — inouehrs / detail
  10. [DAG] Avoid deleting nodes before combining them.

    When replacing a node and it's operand, replacing the operand node may
    cause the deletion of the original node leading to an assertion
    failure. Case around these replacements to avoid this without relying
    on inspecting the DELETED_NODE opcode in various extend
    dagcombiner cases.

    Fixes PR32515.

    Reviewers: dbabokin, RKSimon, davide, chandlerc

    Subscribers: chandlerc, llvm-commits

    Differential Revision: https://reviews.llvm.org/D34095 — niravd / detail
  11. llvm: add llvm-dlltool support to the archiver

    A PE COFF spec compliant import library generator.
    Intended to be used with mingw-w64.

    Supports:
    PE COFF spec (section 8, Import Library Format)
    PE COFF spec (Aux Format 3: Weak Externals)

    Reviewed By: ruiu

    Differential Revision: https://reviews.llvm.org/D29892 — martell / detail
  12. Revert r308327

    I forgot to test clang-tools-extra which is now failing. — arphaman / detail
  13. Add a warning for missing '#pragma pack (pop)' and suspicious uses
    of '#pragma pack' in included files

    This commit adds a new -Wpragma-pack warning. It warns in the following cases:

    - When a translation unit is missing terminating #pragma pack (pop) directives.
    - When entering an included file if the current alignment value as determined
      by '#pragma pack' directives is different from the default alignment value.
    - When leaving an included file that changed the state of the current alignment
      value.

    rdar://10184173

    Differential Revision: https://reviews.llvm.org/D35484 — arphaman / detail
  14. AMDGPU: Annotate necessity of flat-scratch-init

    As an approximation of the existing handling to avoid
    regressions. Fixes using too many registers with calls
    on subtargets with the SGPR allocation bug. — arsenm / detail
  15. AMDGPU: Figure out private memory regs after lowering

    Introduce pseudo-registers for registers needed for stack
    access, which are replaced during finalizeLowering.
    Note these pseudo-registers are currently only used for the
    used register location, and not for determining their
    input argument register.

    This is better because it avoids the need to try to predict
    whether a call will be emitted from the IR, and also
    detects stack objects introduced by legalization.

    Test changes are from the HasStackObjects check being more
    accurate since stack objects introduced during legalization
    are now known. — arsenm / detail
  16. [AArch64][Falkor] Avoid HW prefetcher tag collisions (step 2)

    Summary:
    Avoid HW prefetcher instruction tag collisions in loops by inserting
    MOVs to change the base address register of strided loads.

    Reviewers: t.p.northover, mcrosier

    Subscribers: aemerson, rengolin, javed.absar, kristof.beyls, hfinkel, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35366 — gberry / detail

#91 (Jul 18, 2017 9:12:58 AM)

  1. [X86][AVX] Regenerate shift test to show constant broadcast comment — rksimon / detail
  2. [x86, CGP] increase memcmp() expansion up to 4 load pairs

    It should be a win to avoid going out to the system lib for all small memcmp() calls using scalar ops. For x86 32-bit, this means most everything up to 16 bytes. For 64-bit, that doubles because we can do 8-byte loads.

    Notes:

        Reduced from 4 to 2 loads for -Os behavior, which might not be optimal in all cases. It's effectively a question of how much do we trust the system implementation. Linux and macOS (and Windows I assume, but did not test) have optimized memcmp() code for x86, so it's probably not bad either way? PPC is using 8/4 for defaults on these. We do not expand at all for -Oz.

        There are still potential improvements to make for the CGP expansion IR and/or lowering such as avoiding select-of-constants (D34904) and not doing zexts to the max load type before doing a compare.

        We have special-case SSE/AVX codegen for (memcmp(x, y, 16/32) == 0) that will no longer be produced after this patch. I've shown the experimental justification for that change in PR33329:

    https://bugs.llvm.org/show_bug.cgi?id=33329#c12
    TLDR: While the vector code is a likely winner, we can't guarantee that it's a winner in all cases on all CPUs, so I'm willing to sacrifice it for the greater good of expanding all small memcmp(). If we want to resurrect that codegen, it can be done by adjusting the CGP params or poking a hole to let those fall-through the CGP expansion.

    Committed on behalf of Sanjay Patel

    Differential Revision: https://reviews.llvm.org/D35067 — rksimon / detail
  3. Make EHFrames available to sub-classes of RTDyldMemoryManager.

    Summary: This information can be useful; and in the case of Win64, necessary for getting exceptions to work in the JIT.

    Reviewers: lhames

    Reviewed By: lhames

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D35102 — marsupial / detail
  4. Fix: Invalid value for "--commit": --sandbox is not a valid integer

    The LNT buildbots started to report the above error a couple of days
    ago. It is not really clear what has changed, but I have some hopes
    that explicitly splitting the "1" into a separate string might fix this
    issue. Let's see if this works or further investigations is needed. — grosser / detail
  5. [TRE] Simplify canTRE() a bit using all_of(). NFCI.

    This has a ~11 years old FIXME, which may not be true today.
    We might consider removing this code altogether. — davide / detail
  6. [OPENMP] Generalization of sema analysis of reduction-based clauses,
    NFC. — abataev / detail
  7. [Hexagon] Emit lookup tables in text section based on a flag

    The flag "-hexagon-emit-lut-text" (defaulted to false) is added to decide
    on where to keep the switch generated lookup table.
    Differential Revision: https://reviews.llvm.org/D34818 — sgundapa / detail
  8. AMDGPU: Fix crash when folding immediates into multiple uses

    Summary:
    When an immediate is folded by constant folding, we re-scan the entire
    use list for two reasons:

    1. The constant folding may have created a new use of the same reg.
    2. The constant folding may have removed an additional use in the list
       we're currently traversing (e.g., constant folding an S_ADD_I32 c, c).

    However, this could previously lead to a crash when an unrelated use was
    added twice into the FoldList. Since we re-scan the whole list anyway, we
    might as well just clear the FoldList again before we do so.

    Using a MIR test to show this because real code seems to trigger the issue
    only in connection with some really subtle control flow structures.

    Fixes GL45-CTS.shading_language_420pack.binding_images on gfx9.

    Reviewers: arsenm

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

    Differential Revision: https://reviews.llvm.org/D35416 — nha / detail
  9. CodeGen: Insert addr space cast for automatic/temp var at right position

    The uses of alloca may be in different blocks other than the block containing the alloca.
    Therefore if the alloca addr space is non-zero and it needs to be casted to default
    address space, the cast needs to be inserted in the same BB as the alloca insted of
    the current builder insert point since the current insert point may be in a different BB.

    Differential Revision: https://reviews.llvm.org/D35438 — yaxunl / detail
  10. [DAG] Allow base element type of store merge type to also be a vector.

    Correctly calculate merged vector size if MemVT is already a vector. — niravd / detail
  11. [X86] Add optsize and minsize memcmp tests (D35067) — rksimon / detail
  12. [AMDGPU] resubmit r308179: CodeGen: check dst operand type to determine if omod is supported for VOP3 instructions — skolton / detail
  13. [X86] Added cmov target to memcmp test

    As discussed by @spatel on D35067:

    "I added the cmov attribute to the 32-bit codegen test because it removes some noise for that file. I think the intent for the SSE vs no-SSE runs is to show the potential difference for the 16 and 32 byte cases rather than the lack of cmov (which has been available for all CPUs since SSE1, so that's why it shows up automatically with -mattr=sse2)." — rksimon / detail
  14. [globalisel][tablegen] Enable the import of rules involving fma.

    Summary:
    G_FMA was recently added to GlobalISel which enables the import of rules
    involving fma. Add the mapping to allow it.

    Reviewers: ab, t.p.northover, qcolombet, rovka, aditya_nandakumar

    Reviewed By: rovka

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

    Differential Revision: https://reviews.llvm.org/D35130 — dsanders / detail
  15. clang-format: [JS] Correctly format JavaScript imports with long module paths

    Currently the `UnwrappedLineParser` fails to correctly unwrap JavaScript
    imports where the module path is not on the same line as the `from` keyword.
    For example:

        import {A} from
        'some/path/longer/than/column/limit/module.js';```

    This causes issues when in the middle a list of imports because the formatter
    thinks it has reached the end of the imports, and therefore will not sort any
    imports lower in the list.

    The formatter will, however, split the `from` keyword and the module path if
    the path exceeds the column limit, which triggers the issue the next time the
    file is formatted.

    Patch originally by Jared Neil - thanks!

    Differential Revision: https://reviews.llvm.org/D34920 — mprobst / detail
  16. fix formatting issue; NFC — inouehrs / detail
  17. [AMDGPU][MC] Corrected disassembler for proper decoding of v_mqsad_u32_u8

    See Bug 33639: https://bugs.llvm.org//show_bug.cgi?id=33639

    Reviewers: vpykhtin, artem.tamazov

    Differential Revision: https://reviews.llvm.org/D34892 — dpreobra / detail

#90 (Jul 18, 2017 6:14:53 AM)

  1. [DAGCombine] Fix issue with out of bound constant rotation (PR33828)

    Take the modulo of rotations by a constant greater than or equal to the bit-width — rksimon / detail
  2. [mips] Alter register classes for MSA pseudo f16 instructions

    This change introduces additional machine instructions in functions
    dealing with the expansion of msa pseudo f16 instructions due to
    register classes being inappropriate when checked with machine
    verifier.

    Differential Revision: https://reviews.llvm.org/D34276 — smaksimovic / detail
  3. PSCEV] Create AddRec for Phis in cases of possible integer overflow,
    using runtime checks

    Extend the SCEVPredicateRewriter to work a bit harder when it encounters an
    UnknownSCEV for a Phi node; Try to build an AddRecurrence also for Phi nodes
    whose update chain involves casts that can be ignored under the proper runtime
    overflow test. This is one step towards addressing PR30654.

    Differential revision: http://reviews.llvm.org/D30041 — dorit / detail
  4. [sancov] Fix PR33732

    Coverage hooks that take less-than-64-bit-integers as parameters need the
    zeroext parameter attribute (http://llvm.org/docs/LangRef.html#paramattrs)
    to make sure they are properly extended by the x86_64 ABI. — glider / detail
  5. [X86][AVX512] Add ISD::ROTL/ISD::ROTR constant folding tests — rksimon / detail
  6. [AMDGPU][MC] Optimized IsRegIntersect function

    Optimized IsRegIntersect by using MCRegAliasIterator

    See Bug 33800: https://bugs.llvm.org//show_bug.cgi?id=33800

    Reviewers: arsenm, artem.tamazov

    Differential Revision: https://reviews.llvm.org/D35452 — dpreobra / detail
  7. [libOption] - Replace std::pair with helper struct. NFC.

    Splitted from D35476. — grimar / detail
  8. [ARM|CodeGen] Improve the code in FastISel

    Cleaned up the code in FastISel a bit.
    Had to add make_range to MCInstrDesc as that was needed and seems missing.

    Reviewed by: @t.p.northover
    Differential Revision: https://reviews.llvm.org/D35494 — javed.absar / detail
  9. Add autoload cookies for clang-include-fixer lisp functions.

    Annotate all public functions with the autoload magic cookie so that
    update-directory-autoloads will find them.

    Patch by Brendan O'Dea. — klimek / detail

#89 (Jul 18, 2017 3:18:00 AM)

  1. [X86] Add test case for PR32282 — rksimon / detail
  2. [ARM] GlobalISel: Support G_(S|U)REM for s8 and s16

    Widen to s32, and then do whatever Lowering/Custom/Libcall action the
    subtarget wants. — rovka / detail
  3. [LoopInterchange] Split up interchange.ll test case (NFC).

    Summary:
    Currently most tests for the loop interchange pass are in
    test/Transforms/LoopInterchange/interchange.ll. This patch splits up the
    large test file in smaller pieces, which makes debugging test failures
    easier.

    Reviewers: karthikthecool, blitz.opensource, hfinkel

    Reviewed By: hfinkel

    Subscribers: hfinkel, mcrosier, mkuper, mzolotukhin, mssimpso, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35488 — fhahn / detail
  4. [AArch64] Use 16 bytes as preferred function alignment on Cortex-A73.

    Summary:
    Using 16 byte alignment is beneficial on Cortex-A73, similar to
    Cortex-A72 (added in D34961).

    Reviewers: mcrosier, t.p.northover, aadg, silviu.baranga

    Reviewed By: t.p.northover

    Subscribers: aemerson, rengolin, javed.absar, kristof.beyls, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35493 — fhahn / detail
  5. [AMDGPU][MC] Added missing VOP3P opcodes

    Added support of the following opcodes:
      v_pk_sub_u16
      v_pk_mad_i16
      v_pk_mad_u16

    See Bug 33593: https://bugs.llvm.org//show_bug.cgi?id=33593

    Reviewers: vpykhtin, artem.tamazov, arsenm

    Differential Revision: https://reviews.llvm.org/D34890 — dpreobra / detail
  6. [SystemZ, AsmParser]  Enable the mnemonic spell corrector.

    This enables the suggestions of other mnemonics when invalid ones are
    specified.

    Review: Ulrich Weigand — jonpa / detail
  7. GlobalISel: Support G_(S|U)REM widening in LegalizerHelper

    Treat widening G_SREM and G_UREM the same as G_SDIV and G_UDIV. This is
    going to be used in the ARM backend (and that's when the test will come
    too). — rovka / detail
  8. [CMake] Move CLANG_ENABLE_(ARCMT|OBJC_REWRITER|STATIC_ANALYZER) into clang/Config/config.h.

    LLVM_ENABLE_MODULES is sensitive of -D. Move them into config.h.

    FIXME: It'd be better that they are #cmakedefine01 rather than #cmakedefine.
    (#if FOO rather than #if defined(FOO))
    Then we can find missing #include "clang/Config/config.h" in the future.

    Differential Revision: https://reviews.llvm.org/D35527 — chapuni / detail
  9. llvm/DebugInfo/CodeView/TypeStreamMerger.h: Prune a couple of \param(s), removed in r308212. [-Wdocumentation] — chapuni / detail
  10. Normalize constructor call syntax, NFCI. — serge_sans_paille / detail
  11. Revert part of r308100 since the cause (r308025) was also reverted.

    The commit r308100 updated WebAssembly tests for r308025. In one case it
    merely made the test more resilient but in another case it made
    a substantive update. Because r308025 was reverted in r308271, these
    changes to the test also need to be reverted. They should be folded into
    the recommit of r308025 when it is ready. — chandlerc / detail
  12. [x86] Add a missing triple, without which the CPU won't parse.

    Notably, this is failing on our PPC build bots:
    http://lab.llvm.org:8011/builders/clang-ppc64le-linux/builds/8338/steps/ninja%20check%201/logs/FAIL%3A%20LLVM%3A%3Apr33772.ll — chandlerc / detail
  13. Revert r308025 due to uncovering a crash in SelectionDAG. This is filed
    with a minimal test case in http://llvm.org/PR33833.

    Original commit message:
      Improve Aliasing of operations to static alloca — chandlerc / detail
  14. Revert r308179 which causes tablegen to spam stderr on every build.

    Original commit log:
    [AMDGPU] CodeGen: check dst operand type to determine if omod is supported for VOP3 instructions — chandlerc / detail
  15. [Index] Prevent canonical decl becoming nullptr

    Summary:
    This patch prevents getCanonicalDecl returning nullptr in case it finds
    a canonical TemplateDeclaration with no attached TemplatedDecl.
    Found by running the indexer over a version of the standard library deep inside
    a template metaprogramming mess.

    Reviewers: klimek, vsk

    Reviewed By: vsk

    Subscribers: vsk, arphaman, cfe-commits

    Differential Revision: https://reviews.llvm.org/D35212 — krasimir / detail
  16. Also add the option -no-pie (like -nopie)

    Summary:
    For example, this option is expected by ghc (haskell compiler). Currently, building with ghc will fail with:

    ```
    clang: error: unknown argument: '-no-pie'
    `gcc' failed in phase `Linker'. (Exit code: 1)
    . /usr/share/haskell-devscripts/Dh_Haskell.sh && \
    configure_recipe
    ```

    This won't do anything (but won't fail with an error)


    Reviewers: rafael, joerg

    Reviewed By: joerg

    Subscribers: joerg, cfe-commits

    Differential Revision: https://reviews.llvm.org/D35462 — sylvestre / detail

#88 (Jul 17, 2017 11:51:34 PM)

  1. [X86] Prevent an assertion failure if a gather intrinsic is passed a non-constant scale value.

    This isn't legal code, but we shouldn't crash on it. Now we just don't convert the gather intrinsic if the scale isn't constant and let it go through to isel where we'll report an isel failure.

    Fixes PR33772. — ctopper / detail
  2. [OpenCL] Added extended tests on metadata generation for half data type and arrays.

    Reviewers: Anastasia

    Reviewed By: Anastasia

    Subscribers: bader, cfe-commits, yaxunl

    Differential Revision: https://reviews.llvm.org/D35000 — echuraev / detail
  3. [CGP] Cleanup - remove redundant code in OptimizeMemoryInst. NFC

    optimizeMemoryInst contains a vector AddrModeInsts.
    The only use of this vector is to check that all instructions are in the same
    block as memory instruction. This check is guarded by PhiSeen flag,
    so if we traversed through phi node then we do not need to keep information
    in AddrModeInsts. AddModeInsts is set first time we found some addressing mode
    and updated if we found new one later.
    We can find next addressing mode only if we traverse phi node so all code
    related to update of AddModeInsts can be safely removed.

    Reviewers: loladiro, spatel, efriedma
    Reviewed By: efriedma
    Subscribers: llvm-commits
    Differential Revision: https://reviews.llvm.org/D35291 — skatkov / detail
  4. [IRCE] Recognize loops with ne/eq latch conditions

    In some particular cases eq/ne conditions can be turned into equivalent
    slt/sgt conditions. This patch teaches parseLoopStructure to handle some
    of these cases.

    Differential Revision: https://reviews.llvm.org/D35010 — mkazantsev / detail
  5. Revert "Adding temporary debugging info to llvm-mt to solve fedora failure."

    This reverts commit 223ef99f839f6b056272bcf4390841fcb26dda3c. — ecbeckmann / detail
  6. Revert "Adding yet more debug info to fix fedora issue."

    This reverts commit f3aaaac609f801df6c12655ec203455be7094627. — ecbeckmann / detail
  7. Revert "Adding extra test info for llvm-mt."

    This reverts commit 66093fd60b848572f676023b8387bff69b151511. — ecbeckmann / detail

#87 (Jul 17, 2017 8:38:36 PM)

  1. [Analysis] RemoveTotalMemInst counting in InstCount to avoid reading back other Statistic variables

    Summary:
    Previously, we counted TotalMemInst by reading certain instruction counters before and after calling visit and then finding the difference. But that wouldn't be thread safe if this same pass was being ran on multiple threads.

    This list of "memory instructions" doesn't make sense to me as it includes call/invoke and is missing atomics.

    This patch removes the counter all together.

    Reviewers: hfinkel, chandlerc, davide

    Reviewed By: davide

    Subscribers: davide, llvm-commits

    Differential Revision: https://reviews.llvm.org/D33608 — ctopper / detail
  2. Change '?' to 'h' in llvm-mt test.

    Some shells seem to have trouble parsing non-alphanumeric symbols. — ecbeckmann / detail
  3. [asan] Remove recent asan tests which expect death in allocator

    These tests assume allocator_may_return_null=false
    If allocator_may_return_null=true, gtest would not be able to switch it.
    Tests needs to be re-implemented as lit tests. — Vitaly Buka / detail
  4. [libFuzzer] improve -reduce_inputs=1: now only consider the unique features of very input (seems to work much better) — kcc / detail
  5. Adding extra test info for llvm-mt. — ecbeckmann / detail
  6. Add element-atomic mem intrinsic canary tests for Memory Sanitizer.

    Summary:
    Add canary tests to verify that MSAN currently does nothing with the element atomic memory intrinsics for memcpy, memmove, and memset.

    Placeholder tests that will fail once element atomic @llvm.mem[cpy|move|set] instrinsics have been added to the MemIntrinsic class hierarchy. These will act as a reminder to verify that MSAN handles these intrinsics properly once they have been added to that class hierarchy.

    Reviewers: reames

    Reviewed By: reames

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D35510 — dneilson / detail
  7. Add element-atomic mem intrinsic canary tests for Efficiency Sanitizer.

    Summary:
    Add canary tests to verify that ESAN currently does nothing with the element atomic memory intrinsics for memcpy, memmove, and memset.

    Placeholder tests that will fail once element atomic @llvm.mem[cpy|move|set] instrinsics have been added to the MemIntrinsic class hierarchy. These will act as a reminder to verify that ESAN handles these intrinsics properly once they have been added to that class hierarchy.

    Reviewers: reames

    Reviewed By: reames

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D35508 — dneilson / detail
  8. Add element-atomic mem intrinsic canary tests for Dataflow Sanitizer.

    Summary:
    Add canary tests to verify that DFSAN currently does nothing with the element atomic memory intrinsics for memcpy, memmove, and memset.

    Placeholder tests that will fail once @llvm.mem[cpy|move|set] instrinsics have been added to the MemIntrinsic class hierarchy. These will act as a reminder to verify that DFSAN handles these intrinsics properly once they have been added to that class hierarchy.

    Note that there could be some trickiness with these element-atomic intrinsics for the dataflow sanitizer in racy multithreaded programs. The data flow sanitizer inserts additional lib calls to mirror the memory intrinsic's action, so it is possible (very likely, even) that the dfsan buffers will not be in sync with the original buffers. Furthermore, implementation of the dfsan buffer updates for the element atomic intrinsics will have to also use unordered atomic instructions. If we can assume that dfsan is never run on racy multithreaded programs, then the element atomic memory intrinsics can pretty much be treated the same as the regular memory intrinsics.

    Reviewers: reames

    Reviewed By: reames

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D35507 — dneilson / detail
  9. Add element-atomic mem intrinsic canary tests for Address Sanitizer.

    Summary:
    Add canary tests to verify that ASAN currently does nothing with the element atomic memory intrinsics for memcpy, memmove, and memset.

    Placeholder tests that will fail once element atomic @llvm.mem[cpy|move|set] instrinsics have been added to the MemIntrinsic class hierarchy. These will act as a reminder to verify that ASAN handles these intrinsics properly once they have been added to that class hierarchy.

    Reviewers: reames

    Reviewed By: reames

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D35505 — dneilson / detail
  10. Add element-atomic mem intrinsic canary tests for InstCombine.

    Summary:
    Add canary tests to verify that InstCombine currently does nothing with the element atomic memory intrinsics for memmove and memset.

    Placeholder tests that will fail once element atomic @llvm.mem[move|set] instrinsics have been added to the MemIntrinsic class hierarchy. These will act as a reminder to verify that inst combine handles these intrinsics properly once they have been added to that class hierarchy.

    Reviewers: reames

    Reviewed By: reames

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D35502 — dneilson / detail
  11. [libFuzzer] disable fuzzer-flags.test on windows to fix the bots — kcc / detail
  12. [DWARF] Modification of code for the verification of .debug_info section.

    Summary:
    This patch modifies the handleDebugInfo() function so that we verify the contents of each unit
    in the .debug_info section only if its header has been successfully verified.

    This change will allow for more/different verification checks depending on the type of the unit since from
    dwarf5, the .debug_info section may consist of different types of units.

    Subscribers: aprantl

    Differential Revision: https://reviews.llvm.org/D35521 — sgravani / detail
  13. Fix pdbdump-headers.test after TPI hash changes — rnk / detail
  14. [OPENMP] Pacify windows buildbots, NFC. — abataev / detail
  15. [analyzer] Add missing documentation for static analyzer checkers

    Some checks did not have documentation in the www/analyzer/ folder and also
    some alpha checks became non-alpha.

    Patch by Dominik Szabó!

    Differential Revision: https://reviews.llvm.org/D33645 — Devin Coughlin / detail
  16. [PDB] Finish and simplify TPI hashing

    Summary:
    This removes the CVTypeVisitor updater and verifier classes. They were
    made dead by the minimal type dumping refactoring. Replace them with a
    single function that takes a type record and produces a hash. Call this
    from the minimal type dumper and compare the hash.

    I also noticed that the microsoft-pdb reference repository uses a basic
    CRC32 for records that aren't special. We already have an implementation
    of that CRC ready to use, because it's used in COFF for ICF.

    I'll make LLD call this hashing utility in a follow-up change. We might
    also consider using this same hash in type stream merging, so that we
    don't have to hash our records twice.

    Reviewers: inglorion, ruiu

    Subscribers: llvm-commits, hiraditya

    Differential Revision: https://reviews.llvm.org/D35515 — rnk / detail
  17. [PDB] Merge in types and items from type servers (/Zi)

    Summary:
    Object files compiled with /Zi emit type information into a type server
    PDB. The .debug$S section will contain a single TypeServer2Record with
    the absolute path and GUID of the type server. LLD needs to load the
    type server PDB and merge all types and items it finds in it into the
    destination PDB.

    Depends on D35495

    Reviewers: ruiu, inglorion

    Subscribers: zturner, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35504 — rnk / detail
  18. [codeview] Fix YAML for LF_TYPESERVER2 by hoisting PDB_UniqueId

    Summary:
    We were treating the GUIDs in TypeServer2Record as strings, and the
    non-ASCII bytes in the GUID would not round-trip through YAML.

    We already had the PDB_UniqueId type portably represent a Windows GUID,
    but we need to hoist that up to the DebugInfo/CodeView library so that
    we can use it in the TypeServer2Record as well as in PDB parsing code.

    Reviewers: inglorion, amccarth

    Subscribers: llvm-commits, hiraditya

    Differential Revision: https://reviews.llvm.org/D35495 — rnk / detail

#86 (Jul 17, 2017 4:57:19 PM)

  1. Adding yet more debug info to fix fedora issue. — ecbeckmann / detail
  2. Only scan global sections containing data in LSan on darwin

    Summary:
    __DATA segments on Darwin contain a large number of separate sections,
    most of which cannot actually contain pointers, and contain const values or
    objc metadata. Only scanning sections which can contain pointers greatly improves
    performance.

    On a medium-sized (~4000 files) internal project, I saw a speedup of about 50%
    in standalone LSan's execution time (50% improvement in the time spent running
    LSan, not the total program time).

    Reviewers: kcc, kubamracek, alekseyshl

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D35432 — fjricci / detail
  3. [sanitizers] Make sure that all complex macros uses parenthesis

    Summary:
    Without them expressions like this may have different values.
    (SANITIZER_INTERCEPT_MEMRCHR && SANITIZER_INTERCEPT_PREADV)

    Reviewers: alekseyshl

    Subscribers: srhines, kubamracek, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35512 — Vitaly Buka / detail
  4. Adding temporary debugging info to llvm-mt to solve fedora failure. — ecbeckmann / detail
  5. AMDGPU: Annotate features from x work item/group IDs.

    This wasn't necessary before since they are always enabled
    for kernels, but this is necessary if they need to be
    forwarded to a callable function. — arsenm / detail
  6. Check for _MSC_VER before defining _LIBCPP_MSVCRT

    Some targets (e.g. Darwin) might have the Win32 API available, but they
    do not use MSVC CRT. Assume _LIBCPP_MSVCRT only when _MSC_VER is available
    and __MINGW32__ isn't defined.

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

    rdar://problem/32628786 — Bruno Lopes / detail
  7. Create empty shell of llvm-mt.

    Summary:
    This is the first patch towards creating the llvm-mt tool for merging
    Windows manifests.  This is a reimplementation of mt.exe.

    Reviewers: zturner, ruiu, rnk

    Subscribers: llvm-commits, mgorny

    Differential Revision: https://reviews.llvm.org/D35333 — ecbeckmann / detail
  8. [COFF, ARM64] Correct the data layout string for COFF ARM64 target — mgrang / detail
  9. [COFF, ARM64] Set the data type widths and the data layout string

    Summary: COFF ARM64 is LLP64 platform. So int is 4 bytes, long is 4 bytes and long long is 8 bytes.

    Reviewers: compnerd, ruiu, rnk, efriedma

    Reviewed By: compnerd, efriedma

    Subscribers: efriedma, javed.absar, cfe-commits, aemerson, llvm-commits, kristof.beyls

    Differential Revision: https://reviews.llvm.org/D34859 — mgrang / detail
  10. Add missing && to fix syntax. — kamil / detail

#85 (Jul 17, 2017 1:56:16 PM)

  1. [AArch64] Add support for __builtin_ms_va_list on aarch64

    Move builtins from the x86 specific scope into the global
    scope. Their use is still limited to x86_64 and aarch64 though.

    This allows wine on aarch64 to properly handle variadic functions.

    Differential Revision: https://reviews.llvm.org/D34475 — mstorsjo / detail
  2. Add NetBSD support in platform_interceptors.h

    Summary:
    Introduce SI_NETBSD for NetBSD.

    Add NetBSD support for appropriate `SANITIZER_INTERCEPT_*`.

    Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas.

    Sponsored by <The NetBSD Foundation>

    Reviewers: joerg, dim, kcc, alekseyshl, filcab, eugenis, vitalybuka

    Reviewed By: vitalybuka

    Subscribers: srhines, kubamracek, #sanitizers

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D35468 — kamil / detail
  3. Introduce SANITIZER_NETBSD in sanitizer_platform.h

    Summary:
    Add defines for new NetBSD: SANITIZER_NETBSD,
    it will be used across the codebase for sanitizers.

    NetBSD is a POSIX-like platform, add it to SANITIZER_POSIX.

    Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas.

    Sponsored by <The NetBSD Foundation>

    Reviewers: joerg, kcc, dim, alekseyshl, filcab, eugenis, vitalybuka

    Reviewed By: kcc

    Subscribers: kubamracek, #sanitizers

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D35467 — kamil / detail
  4. [codeview] Don't use the type visitor to merge types

    Summary:
    This didn't do much to speed things up, but it implements a FIXME, and I
    think it's a nice simplification. We don't need the record kind switch.
    We're doing that ourselves.

    Reviewers: ruiu, inglorion

    Subscribers: llvm-commits, hiraditya

    Differential Revision: https://reviews.llvm.org/D35496 — rnk / detail
  5. [codeview] Remove TypeServerHandler and PDBTypeServerHandler

    Summary:
    Instead of wiring these through the CVTypeVisitor interface, clients
    should inspect the CVTypeArray before visiting it and potentially load
    up the type server's TPI stream if they need it.

    No tests relied on this functionality because LLD was the only client.

    Reviewers: ruiu

    Subscribers: mgorny, hiraditya, zturner, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35394 — rnk / detail
  6. [AArch64][Falkor] Address some stylistic review comments. NFC. — gberry / detail
  7. Add MemoryMappedSection struct for two-level memory map iteration

    Summary: This will allow sanitizer_procmaps on mac to expose section information.

    Reviewers: kubamracek, alekseyshl, kcc

    Subscribers: llvm-commits, emaste

    Differential Revision: https://reviews.llvm.org/D35422 — fjricci / detail
  8. Update use of llvm::CallingConv:X86_64_Win64 after LLVM commit r308208 — mstorsjo / detail
  9. [AArch64] Extend CallingConv::X86_64_Win64 to AArch64 as well

    Rename the enum value from X86_64_Win64 to plain Win64.

    The symbol exposed in the textual IR is changed from 'x86_64_win64cc'
    to 'win64cc', but the numeric value is kept, keeping support for
    old bitcode.

    Differential Revision: https://reviews.llvm.org/D34474 — mstorsjo / detail
  10. Revert "Restore with fix "[ThinLTO] Ensure we always select the same function copy to import""

    This reverts commit r308114 (and follow on fixes to test).

    There is a linking failure in a ThinLTO bot:
    http://green.lab.llvm.org/green/job/clang-stage2-configure-Rthinlto_build/3663/

    (and undefined reference). It seems like it must be a second order
    effect of the heuristic change I made, and may take some time to try
    to reproduce locally and track down. Therefore, reverting for now. — tejohnson / detail
  11. [Basic] Detect Git submodule version in CMake

    Summary:
    When searching for Git version control information, libBasic's CMake
    checks for the path '.git/logs/HEAD'. However, when LLVM is included as
    a Git submodule, this path does not exist. Instead, it contains a '.git'
    file with the following:

    ```
    gitdir: ../../.git/modules/external/llvm
    ```

    Where '../..' is the relative path to the root repository that contains
    the LLVM Git submodule.

    Because of this discrepancy, `clang --version` does not output source
    control information if built from a Git submodule.

    To fix, check whether '.git' is a directory or a file. If it's a
    directory, simply use the '.git/logs/HEAD' path. If it's a file, read it
    and check for the tell-tale sign of a Git submodule: the text "gitdir:".
    If it exists, follow that path and use the 'logs/HEAD' at that location
    instead. This allows not only the correct revision information to be
    retrieved, but also uses a file that will change with each source
    control revision.

    Test Plan:
    1. Before applying this change, build Clang as a Git submodule in a repository
       that places it in external/clang, and confirm no revision information
       is output when `clang --version` is invoked (just "clang 5.0.0" is
       output, no Git hashes).
    2. Apply these changes and build Clang as a Git repository nested under
       llvm/tools/clang, and confirm that `clang --version` displays correct
       version information.
    3. Apply these changes and build Clang as a Git submodule using the
       structure described in (1), and confirm version control information
       is output as in (2).

    Reviewers: jordan_rose, beanz, probinson

    Reviewed By: jordan_rose

    Subscribers: chapuni, mgorny, cfe-commits

    Differential Revision: https://reviews.llvm.org/D34955 — modocache / detail
  12. [ORC] Remove extraneous else.

    As suggested by Dave Blaikie in review on r307952. Thanks Dave! — Lang Hames / detail
  13. Revert "[libFuzzer] Add a dependency on symbolizer from libFuzzer tests"

    This reverts commit 546e006a023cccd0fd32afd442ab992d3515d4b8.

    Reverting until I can figure out llvm-symbolizer breakages on mac os. — George Karpenkov / detail

#84 (Jul 17, 2017 11:08:09 AM)

  1. [opt-viewer] Accept directories that are searched for opt.yaml files

    This allows to pass the build directory where all the opt.yaml files are
    rather than find | xargs which may invoke opt-viewer multiple times producing
    incomplete html output.

    The patch generalizes the same functionality from opt-diff.

    Differential Revision: https://reviews.llvm.org/D35491 — anemet / detail
  2. [SystemZ] Add support for IBM z14 processor (3/3)

    This patch updates the vecintrin.h header file to provide the new
    set of high-level vector built-in functions.  This matches the
    updated definition implemented by other compilers for the platform,
    indicated by the pre-defined macro __VEC__ == 10302.

    Note that some of the new functions (notably those involving the
    vector float data type) are only available with -march=z14
    (indicated by __ARCH__ == 12). — uweigand / detail
  3. [SystemZ] Add support for IBM z14 processor (2/3)

    This patch extends the -fzvector language feature to enable the new
    "vector float" data type when compiling at -march=z14.  This matches
    the updated extension definition implemented by other compilers for
    the platform, which is indicated to applications by pre-defining
    __VEC__ to 10302 (instead of 10301). — uweigand / detail
  4. [SystemZ] Add support for IBM z14 processor (1/3)

    This patch series adds support for the IBM z14 processor.  This part includes:
    - Basic support for the new processor and its features.
    - Support for low-level builtins mapped to new LLVM intrinsics.

    Support for the -fzvector extension to vector float and the new
    high-level vector intrinsics is provided by separate patches. — uweigand / detail
  5. [SystemZ] Add support for IBM z14 processor (3/3)

    This adds support for the new 128-bit vector float instructions of z14.
    Note that these instructions actually only operate on the f128 type,
    since only each 128-bit vector register can hold only one 128-bit
    float value.  However, this is still preferable to the legacy 128-bit
    float instructions, since those operate on pairs of floating-point
    registers (so we can hold at most 8 values in registers), while the
    new instructions use single vector registers (so we hold up to 32
    value in registers).

    Adding support includes:
    - Enabling the instructions for the assembler/disassembler.
    - CodeGen for the instructions.  This includes allocating the f128
      type now to the VR128BitRegClass instead of FP128BitRegClass.
    - Scheduler description support for the instructions.

    Note that for a small number of operations, we have no new vector
    instructions (like integer <-> 128-bit float conversions), and so
    we use the legacy instruction and then reformat the operand
    (i.e. copy between a pair of floating-point registers and a
    vector register). — uweigand / detail
  6. [SystemZ] Add support for IBM z14 processor (2/3)

    This adds support for the new 32-bit vector float instructions of z14.
    This includes:
    - Enabling the instructions for the assembler/disassembler.
    - CodeGen for the instructions, including new LLVM intrinsics.
    - Scheduler description support for the instructions.
    - Update to the vector cost function calculations.

    In general, CodeGen support for the new v4f32 instructions closely
    matches support for the existing v2f64 instructions. — uweigand / detail
  7. [SystemZ] Add support for IBM z14 processor (1/3)

    This patch series adds support for the IBM z14 processor.  This part includes:
    - Basic support for the new processor and its features.
    - Support for new instructions (except vector 32-bit float and 128-bit float).
    - CodeGen for new instructions, including new LLVM intrinsics.
    - Scheduler description for the new processor.
    - Detection of z14 as host processor.

    Support for the new 32-bit vector float and 128-bit vector float
    instructions is provided by separate patches. — uweigand / detail
  8. [llvm] Remove redundant check-prefix=CHECK from tests. NFC.

    Reviewers: t.p.northover, oren_ben_simhon, niravd, mcrosier

    Reviewed By: oren_ben_simhon, mcrosier

    Subscribers: nhaehnle, javed.absar, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35466 — mgrang / detail
  9. [clang] Remove redundant check-prefix=CHECK from tests. NFC.

    Reviewers: t.p.northover, mstorsjo, rsmith, mcrosier

    Reviewed By: mstorsjo, mcrosier

    Subscribers: mcrosier, javed.absar, cfe-commits

    Differential Revision: https://reviews.llvm.org/D35465 — mgrang / detail
  10. [NFC] Update function call names as changed in MacroInfo that should refer to Parameters (as opposed to Arguments).

    This syncs them up with clang commit r308190

    Thanks! — faisalv / detail
  11. [NFC] Refactor the Preprocessor function that handles Macro definitions and rename Arguments to Parameters in Macro Definitions.
      - Extracted the reading of the tokens out into a separate function.
      - Replace 'Argument' with 'Parameter' when referring to the identifiers of the macro definition (as opposed to the supplied arguments - MacroArgs - during the macro invocation).

    This is in preparation for submitting patches for review to implement __VA_OPT__ which will otherwise just keep lengthening the HandleDefineDirective function and making it less comprehensible.

    I will also directly update some extra clang tooling that is broken by the change from Argument to Parameter.

    Hopefully the bots will stay appeased.

    Thanks! — faisalv / detail
  12. [Hexagon] Remove custom lowering of loads of v4i16

    The target-independent lowering works fine, except concatenating 32-bit
    words. Add a pattern to generate A2_combinew instead of 64-bit asl/or. — kparzysz / detail
  13. Fix dereference of pointers in throw statements.

    Before:
      throw * x;

    After:
      throw *x;

    Patch by Erik Uhlmann. — klimek / detail
  14. Avoid store merge to f128 in context of noimpiccitfloat NFCI.

    Prevent store merge from merging stores into an invalid 128-bit store
    (realized as a f128 value in the context of the noimplicitfloat
    attribute). Previously, such stores are immediately split back into
    valid stores. — niravd / detail
  15. [OPENMP] Fix reduction combiner test — abataev / detail
  16. [OPENMP] Further fixes of the reduction codegen tests — abataev / detail
  17. [clang-tidy] Add modernize-use-bool-literals.IgnoreMacros option — alexfh / detail

#83 (Jul 17, 2017 7:41:34 AM)

  1. [X86] Add LEA scheduling tests — rksimon / detail
  2. [AMDGPU] CodeGen: check dst operand type to determine if omod is supported for VOP3 instructions

    Summary:
    Previously, CodeGen checked first src operand type to determine if omod is supported by instruction. This isn't correct for some instructions: e.g. V_CMP_EQ_F32 has floating-point src operands but desn't support omod.
    Changed .td files to check if dst operand instead of src operand.

    Reviewers: arsenm, vpykhtin

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

    Differential Revision: https://reviews.llvm.org/D35350 — skolton / detail
  3. [OPENMP] Further test fixes. — abataev / detail
  4. [X86][AVX512] Add lowering of vXi32/vXi64 ISD::ROTL/ISD::ROTR

    Add support for lowering to ISD::ROTL/ISD::ROTR, including rotate by immediate

    Differential Revision: https://reviews.llvm.org/D35463 — rksimon / detail
  5. [OPENMP] Rework tests to pacify buildbots. — abataev / detail
  6. Fixed line endings. NFCI. — rksimon / detail
  7. [OPENMP] Codegen for reduction clauses in 'taskloop' directives.

    Adds codegen for taskloop-based directives. — abataev / detail
  8. [CodeGen] Add begin-end iterators to MachineInstr

    Convert iteration over operands to range-loop.

    Reviewed by: @rovka, @echristo
    Differential Revision: https://reviews.llvm.org/D35419 — javed.absar / detail
  9. [YAMLTraits] Add filename support to yaml::Input

    Summary:
    The current yaml::Input constructor takes a StringRef of data as its
    first parameter, discarding any filename information that may have been
    present when a YAML file was opened. Add an alterate yaml::Input
    constructor that takes a MemoryBufferRef, which can have a filename
    associated with it. This leads to clearer diagnostic messages.

    Sponsored By: DARPA, AFRL

    Reviewed By: arphaman

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

    Patch by: Jonathan Anderson (trombonehero) — asb / detail

#82 (Jul 17, 2017 4:28:57 AM)

  1. [X86][AVX] Fix typo in vector rotate tests

    Was preventing rotate matching — rksimon / detail
  2. [X86][AVX512] Add constant splat vector rotate tests for D35463 — rksimon / detail
  3. [X86][AVX512] Regenerate shift tests — rksimon / detail
  4. Remove unnecessary cast. NFCI. — rksimon / detail

#81 (Jul 17, 2017 1:41:38 AM)

  1. [X86] Use MSVC's __cpuidex intrinsic instead of inline assembly in getHostCPUName/getHostCPUFeatures for 32-bit builds too.

    We're already using it in 64-bit builds because 64-bit MSVC doesn't support inline assembly.

    As far as I know we were using inline assembly because at the time the code was added we had to support MSVC 2008 pre-SP1 while the intrinsic was added to MSVC in SP1. Now that we don't have to support that we should be able to just use the intrinsic. — ctopper / detail

#80 (Jul 16, 2017 9:54:07 PM)

  1. Analysis/MemorySSA.cpp: Prune unused "llvm/Transforms/Scalar.h". — chapuni / detail
  2. IR/Core.cpp: Prune unused "llvm/Bitcode/BitcodeReader.h". — chapuni / detail
  3. Support/Path.cpp: Prune unused "llvm/BinaryFormat". — chapuni / detail
  4. Add case for c++2a to libc++ and test macros — marshall / detail

#79 (Jul 16, 2017 7:05:47 PM)

  1. Revert changes from my previous refactoring - will need to fix dependencies in clang's extra tooling (such as clang-tidy etc.).

    Sorry about that. — faisalv / detail
  2. [NFC] Refactor the Preprocessor function that handles Macro definitions and rename Arguments to Parameters in Macro Definitions.
      - Extracted the reading of the tokens out into a separate function.
      - Replace 'Argument' with 'Parameter' when referring to the identifiers of the macro definition (as opposed to the supplied arguments - MacroArgs - during the macro invocation).

    This is in preparation for submitting patches for review to implement __VA_OPT__ which will otherwise just keep lengthening the HandleDefineDirective function and making it less comprehensible.


    Thanks! — faisalv / detail
  3. Enable TLS support on OpenBSD. — brad / detail
  4. Enable TLS support on OpenBSD, but default to the emulatated TLS model. — brad / detail
  5. [COFF, ARM64] Add initial relocation types

    Reviewers: compnerd, ruiu, rnk

    Reviewed By: compnerd

    Subscribers: mstorsjo, aemerson, javed.absar, kristof.beyls, llvm-commits

    Differential Revision: https://reviews.llvm.org/D34857 — mgrang / detail
  6. Update libc++ status pages with results of the Toronto Meeting - and for C++2a — marshall / detail
  7. [AVR] Add/remove XFAILs to get the backend passing Generic CodeGen tests

    A few tests have since been fixed, and a few since now fail. — dylanmckay / detail
  8. [DAGCombiner] Recognise vector rotations with non-splat constants

    Fixes PR33691.

    Differential revision: https://reviews.llvm.org/D35381 — andrew.zhogin / detail

#78 (Jul 16, 2017 3:40:24 PM)

  1. [AVR] Fix a typo in the tests — dylanmckay / detail
  2. AMDGPU: Fix amdgpu-flat-work-group-size/amdgpu-waves-per-eu check

    Differential Revision: https://reviews.llvm.org/D35433 — kzhuravl / detail
  3. [X86][AVX512] Add 512-bit vector rotate tests — rksimon / detail
  4. AMDGPU: Remove duplicate print outs from .AMDGPU.csdata

    Differential Revision: https://reviews.llvm.org/D35428 — kzhuravl / detail
  5. [InstCombine] Don't violate dominance when replacing instructions.

    Differential Revision:  https://reviews.llvm.org/D35376 — davide / detail
  6. Strip trailing whitespace. NFCI — rksimon / detail

#77 (Jul 16, 2017 11:31:28 AM)

  1. [X86] X86::CMOV to Branch heuristic based optimization.

    LLVM compiler recognizes opportunities to transform a branch into IR select instruction(s) - later it will be lowered into X86::CMOV instruction, assuming no other optimization eliminated the SelectInst.
    However, it is not always profitable to emit X86::CMOV instruction. For example, branch is preferable over an X86::CMOV instruction when:
    1. Branch is well predicted
    2. Condition operand is expensive, compared to True-value and the False-value operands

    In CodeGenPrepare pass there is a shallow optimization that tries to convert SelectInst into branch, but it is not enough.
    This commit, implements machine optimization pass that converts X86::CMOV instruction(s) into branch, based on a conservative heuristic.

    Differential Revision: https://reviews.llvm.org/D34769 — aaboud / detail
  2. Apply explicit instantiation workaround to DominanceFrontier

    This is a workaround for the same explicit instantiation bug
    as in DominatorTreeBase. — kuhar / detail
  3. [Dominators] Workaround explicit instantiation bug.

    Some platforms have problems with emmiting constructors when class
    templates get explicitly instantiated.
    This patch fixes the bug reported in D35315 by replacing `= default`
    with an empty constructor body. — kuhar / detail

#76 (Jul 16, 2017 8:49:25 AM)

  1. [Bash-autocompletion] Add support for -W<warning> and -Wno<warning>

    Summary:
    `-W[tab]` will autocomplete warnings defined in this link:
    https://clang.llvm.org/docs/DiagnosticsReference.html#wweak-vtables

    Differential Revision: https://reviews.llvm.org/D35447 — yamaguchi / detail
  2. [X86] Add F16C scheduling tests — rksimon / detail
  3. [X86] Add POPCNT scheduling tests — rksimon / detail
  4. [X86] Add BMI2 scheduling tests — rksimon / detail
  5. [X86] Add BMI1 scheduling tests — rksimon / detail
  6. [X86] Add LZCNT scheduling tests — rksimon / detail

#75 (Jul 16, 2017 6:16:40 AM)

  1. [X86][SSE4A] Add EXTRQ/INSERTQ values to BTVER2 scheduling model — rksimon / detail

#74 (Jul 16, 2017 5:06:51 AM)

  1. [X86][AVX] Regenerate tests with constant broadcast comments — rksimon / detail
  2. [X86][AVX] Regenerate vector tzcnt tests with constant broadcast comments — rksimon / detail
  3. [X86][AVX] Regenerate vector idiv tests with constant broadcast comments — rksimon / detail
  4. [X86][AVX] Regenerate combine tests with constant broadcast comments — rksimon / detail

#72 (Jul 16, 2017 1:32:48 AM)

  1. fix typos in comments; NFC — inouehrs / detail
  2. fix typos in comments; NFC — inouehrs / detail
  3. [InstSimplify] Use commutable matchers to simplify some code. NFC — ctopper / detail
  4. [InstCombine] Move (0 - x) & 1 --> x & 1 to SimplifyDemandedUseBits.

    This removes a dedicated matcher and allows us to support more than just an AND masking the lower bit. — ctopper / detail

#70 (Jul 15, 2017 8:55:52 PM)

  1. [asan] Disable not working new test on Windows — Vitaly Buka / detail
  2. [msan] Add missing include for fix test on Windows — Vitaly Buka / detail
  3. [tsan] Disable test with debug runtime

    Test expects at least -O1 compiled runtime. — Vitaly Buka / detail
  4. [asan] Attempt to fix test in Windows after r308064 — Vitaly Buka / detail
  5. Fix bot failures from r308114

    Finally figured out that some bots were failing from r308114
    with the message:
      llvm-lto2: LTO::run failed: No available targets are compatible with this triple.
    after adding in some other checking that finally caused this to show up
    in the FileCheck output.

    Added "REQUIRES: x86-registered-target" which should fix it. — tejohnson / detail
  6. [c++2a] Add option -std=c++2a to enable support for potential/transitional C++2a features

    - as usual C++2a implies all the C++'s that came before it.

    Thank you Aaron for the feedback here: https://reviews.llvm.org/D35454 — faisalv / detail
  7. [compiler-rt] Fix fix format specifies type in test — Vitaly Buka / detail
  8. Attempt 2 to debug bot failures

    Modify checks from r308114 even more, to see if I can narrow down
    why some bots are still failing. — tejohnson / detail

#69 (Jul 15, 2017 4:59:41 PM)

  1. Attempt to debug bot failures

    Simplifying checks from r308114, to see if I can narrow down why some
    bots are still failing. — tejohnson / detail
  2. Restore with fix "[ThinLTO] Ensure we always select the same function copy to import"

    This restores r308078/r308079 with a fix for bot non-determinisim (make
    sure we run llvm-lto in single threaded mode so the debug output doesn't get
    interleaved). — tejohnson / detail
  3. [IR] Implement Constant::isNegativeZeroValue/isZeroValue/isAllOnesValue/isOneValue/isMinSignedValue for ConstantDataVector without going through getElementAsConstant

    Summary:
    Currently these methods call ConstantDataVector::getSplatValue which uses getElementsAsConstant to create a Constant object representing the element value. This method incurs a map lookup to see if we already have created such a Constant before and if not allocates a new Constant object.

    This patch changes these methods to use getElementAsAPFloat and getElementAsInteger so we can just examine the data values directly.

    Reviewers: spatel, pcc, dexonsmith, bogner, craig.topper

    Reviewed By: craig.topper

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D35040 — ctopper / detail

#68 (Jul 15, 2017 2:59:39 PM)

  1. [InstCombine] Improve the expansion in SimplifyUsingDistributiveLaws to handle cases where one side doesn't simplify, but the other side resolves to an identity value

    Summary:
    If one side simplifies to the identity value for inner opcode, we can replace the value with just the operation that can't be simplified.

    I've removed a couple now unneeded special cases in visitAnd and visitOr. There are probably other cases I missed.

    Reviewers: spatel, majnemer, hfinkel, dberlin

    Reviewed By: spatel

    Subscribers: grandinj, llvm-commits, spatel

    Differential Revision: https://reviews.llvm.org/D35451 — ctopper / detail
  2. [X86][AVX] Regenerate tests with constant broadcast comments — rksimon / detail
  3. [X86][AVX] Regenerate tests with constant broadcast comments — rksimon / detail
  4. Strip trailing whitespace. NFCI — rksimon / detail

#67 (Jul 15, 2017 11:50:01 AM)

  1. [CodeView] Dump BuildInfoSym and ProcSym type indices

    I need to print the type index in hex so that I can match it in
    FileCheck for a test I'm writing. — rnk / detail
  2. Fix mis-use of std::lower_bound

    Binary search in C++ is such a PITA. =/ — rnk / detail
  3. [InstCombine] improve (1 << x) & 1 --> zext(x == 0) folding

    1. Add a one-use check to prevent increasing instruction count.
    2. Generalize the pattern matching to include vector types. — spatel / detail
  4. [InstCombine] Add test cases for (X & (Y | ~X)) -> (X & Y) where the not is an inverted compare. NFC

    Do the same for (X | (Y & ~X)) -> (X | Y) — ctopper / detail
  5. [InstCombine] Move 4 test cases from a test that didn't use FileCheck and merge them into a existing test file. NFC — ctopper / detail
  6. [InstCombine] add tests for (1 << x) & 1 --> zext(x == 0) ; NFC

    This fold hit the trifecta:
    1. It was untested.
    2. It oversteps (multiuse is not checked, so increases instruction count).
    3. It is incomplete (doesn't work for vectors). — spatel / detail

#66 (Jul 15, 2017 8:52:19 AM)

  1. [cxx_status] Fix typos. — rsmith / detail
  2. [wasm] Update two tests for r308025 which causes scheduling changes due
    to the newly improved AA information. — chandlerc / detail
  3. [cxx_status] Add approved Toronto WG21 motions. — rsmith / detail
  4. [InstCombine] allow (0 - x) & 1 --> x & 1 for vectors — spatel / detail
  5. Update issues moved in Toronto — marshall / detail
  6. [InstCombine] remove dead code/tests; NFCI

    These patterns and tests were added to InstSimplify with:
    https://reviews.llvm.org/rL303004 — spatel / detail

#65 (Jul 15, 2017 7:16:00 AM)

  1. Revert r308078 (and subsequent tweak in r308079) which introduces a test
    that appears to exhibit non-determinism and is flaking on the bots
    pretty consistently.

    r308078: [ThinLTO] Ensure we always select the same function copy to import
    r308079: Require asserts in new test that uses debug flag — chandlerc / detail
  2. [LoopInterchange] Add some optimization remarks.

    Reviewers: anemet, karthikthecool, blitz.opensource

    Reviewed By: anemet

    Subscribers: mzolotukhin, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35122 — fhahn / detail

#64 (Jul 15, 2017 4:38:16 AM)

  1. Use ARC parsing rules for ns_returns_retained in MRC so that code can
    be shared without warnings.  Build AttributedTypes to leave breadcrumbs
    for tools like the static analyzer.  Warn about attempting to use the
    attribute with incompatible return types. — rjmccall / detail

#63 (Jul 15, 2017 2:54:51 AM)

  1. [Bash-autocompletion] Fixed a bug on bash

    Summary: Maybe I mismerged when merging previous commits by hand.

    Differential Revision: https://reviews.llvm.org/D35448 — yamaguchi / detail
  2. [docs] AliasAnalysis: clarify that PartialAlias doesn't enforce
    objects to start at the same address

    As discussed on the ML, there's consensus that this is what the implementations
    do and it seems sensible. — nlopes / detail

#61 (Jul 15, 2017 1:07:30 AM)

  1. [mips] Handle the `long-calls` feature flags in the MIPS backend

    If the `long-calls` feature flags is enabled, disable use of the `jal`
    instruction. Instead of that call a function by by first loading its
    address into a register, and then using the contents of that register.

    Differential revision: https://reviews.llvm.org/D35168 — atanasyan / detail
  2. SystemZCodeGen: Update libdeps. r308024 introduced LoopDataPrefetchPass. — chapuni / detail
  3. ClangApplyReplacementsTests: Add clangBasic in libdeps.

    r308015 introduced clangBasic to instantiate Diagnostics &c, — chapuni / detail
  4. clang/test/FixIt/format.m: Tweak for i686, where ssize_t is int. (r308067) — chapuni / detail
  5. bpf: fix a compilation bug due to unused variable for release build

    Signed-off-by: Yonghong Song <yhs@fb.com> — yhs / detail
  6. AMDGPU: Return correct type during argument lowering

    The type needs to be casted back to the original argument type.
    Fixes an assert that for some reason is only run when
    using -debug.

    Includes an additional combine to avoid test regressions
    from having conversions mixed with multiple Assert[SZ]ext
    nodes. On subtargets where i16 is legal, this was producing an i32
    register with an i16 AssertZExt, truncated to i16 with another i8
    AssertZExt.

    t2: i32,ch = CopyFromReg t0, Register:i32 %vreg0
    t3: i16 = truncate t2
    t5: i16 = AssertZext t3, ValueType:ch:i8
    t6: i8 = truncate t5
    t7: i32 = zero_extend t6 — arsenm / detail
  7. [SLPVectorizer] Add an extra parameter to tryScheduleBundle function, NFCI. — dinar / detail
  8. bpf: generate better lowering code for certain select/setcc instructions

    Currently, for code like below,
    ===
      inner_map = bpf_map_lookup_elem(outer_map, &port_key);
      if (!inner_map) {
        inner_map = &fallback_map;
      }
    ===
    the compiler generates (pseudo) code like the below:
    ===
      I1: r1 = bpf_map_lookup_elem(outer_map, &port_key);
      I2: r2 = 0
      I3: if (r1 == r2)
      I4:   r6 = &fallback_map
      I5: ...
    ===

    During kernel verification process, After I1, r1 holds a state
    map_ptr_or_null. If I3 condition is not taken
    (path [I1, I2, I3, I5]), supposedly r1 should become map_ptr.
    Unfortunately, kernel does not recognize this pattern
    and r1 remains map_ptr_or_null at insn I5. This will cause
    verificaiton failure later on.

    Kernel, however, is able to recognize pattern "if (r1 == 0)"
    properly and give a map_ptr state to r1 in the above case.

    LLVM here generates suboptimal code which causes kernel verification
    failure. This patch fixes the issue by changing BPF insn pattern
    matching and lowering to generate proper codes if the righthand
    parameter of the above condition is a constant. A test case
    is also added.

    Signed-off-by: Yonghong Song <yhs@fb.com> — yhs / detail
  9. Require asserts in new test that uses debug flag

    This should fix bot failures from r308078. — tejohnson / detail
  10. [ThinLTO] Ensure we always select the same function copy to import

    Summary:
    Check if the first eligible callee is under the instruction threshold.
    Checking this on the first eligible callee ensures that we don't end
    up selecting different callees to import when we invoke this routine
    with different thresholds due to reaching the callee via paths that
    are shallower or hotter (when there are multiple copies, i.e. with
    weak or linkonce linkage). We don't want to leave the decision of which
    copy to import up to the backend.

    Reviewers: mehdi_amini

    Subscribers: inglorion, fhahn, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35436 — tejohnson / detail

#60 (Jul 14, 2017 9:06:25 PM)

  1. [ODRHash] Revert r307743 which reverted r307720

    Reapply r307720 to allow processing of constructors and destructors.  Reuse
    the diagnostics for CXXMethodDecl for them. — rtrieu / detail
  2. [TTI] Refine the cost of EXT in getUserCost()

    Now, getUserCost() only checks the src and dst types of EXT to decide it is free
    or not. This change first checks the types, then calls isExtFreeImpl(), and
    check if EXT can form ExtLoad at last. Currently, only AArch64 has customized
    implementation of isExtFreeImpl() to check if EXT can be folded into its use.

    Differential Revision: https://reviews.llvm.org/D34458 — haicheng / detail

#59 (Jul 14, 2017 6:57:48 PM)

  1. [libFuzzer] remove stale code — kcc / detail
  2. [Dominators] Fix reachable visitation and reenable a unit test

    This fixes a minor bug in insertion to a reachable node that caused
    DominatorTree.InsertDeleteExhaustive flakiness. The patch also adds
    a new testcase for this exact failure. — kuhar / detail
  3. [clang] Fix format test

    This diff makes the test FixIt/format.m more robust.
    The issue was caught by the build bot clang-cmake-thumbv7-a15.

    Test plan: make check-all — alexshap / detail
  4. [compiler-rt] [CMake] Build compiler-rt with no optimizations if the flag says so

    Differential Revision: https://reviews.llvm.org/D35400 — George Karpenkov / detail
  5. Try to fix modules build

    Module builds somehow report an ambiguity between clang::Diagnostic and
    clang::Tooling::Diagnostic. It seems as if one of the additional headers
    brought in by the module brings the clang namespace to the toplevel. I
    could not find out the reason for that, so for now I go with the simple
    fix to bring the build back to green.

    rdar://33321397 — matze / detail
  6. [Dominators] Temporarily disable a flaky unit test

    The DominatorTree.InsertDeleteExhaustive uses a RNG with a
    constant seed to generate different sequences of updates. The test
    fails on some buildbots and this patch disables it for now. — kuhar / detail
  7. [libFuzzer] Allow non-fuzzer args after -ignore_remaining_args=1

    With this change, libFuzzer will ignore any arguments after a sigil
    argument, but it will preserve these arguments at the end of the
    command line when launching subprocesses. Using this, its possible to
    handle positional and single-dash arguments to the program under test
    by discarding everything up to -ignore_remaining_args=1 in
    LLVMFuzzerInitialize. — Justin Bogner / detail
  8. Add missing space to comment — Adrian Prantl / detail
  9. [clang] Fix handling of "%zd" format specifier

    This diff addresses FIXME in lib/Analysis/PrintfFormatString.cpp
    and makes PrintfSpecifier::getArgType return the correct type.
    In particular, this change enables Clang to emit a warning on
    incorrect using of "%zd"/"%zn" format specifiers.

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

    Test plan: make check-all — alexshap / detail
  10. [Dominators] Remove an extra semicolon and add a missing include. — kuhar / detail
  11. [Sanitizers] ASan and LSan allocator set errno on failure.

    Summary:
    Set proper errno code on alloction failures and change some
    implementations to satisfy their man-specified requirements:

    LSan: valloc and memalign
    ASan: pvalloc, memalign and posix_memalign

    Changing both allocators in one patch since LSan depends on ASan allocator in some configurations.

    Reviewers: vitalybuka

    Subscribers: kubamracek, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35440 — alekseyshl / detail
  12. [Sanitizers] LSan allocator set errno on failure.

    Set proper errno code on alloction failures and change valloc and
    memalign implementations to satisfy their man-specified requirements. — alekseyshl / detail
  13. [Dominators] Implement incremental deletions

    Summary:
    This patch implements incremental edge deletions.

    It also makes DominatorTreeBase store a pointer to the parent function. The parent function is needed to perform full rebuilts during some deletions, but it is also used to verify that inserted and deleted edges come from the same function.

    Reviewers: dberlin, davide, grosser, sanjoy, brzycki

    Reviewed By: dberlin

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D35342 — kuhar / detail
  14. [libFuzzer] fix stats during merge — kcc / detail
  15. [AArch64] Avoid selecting XZR inline ASM memory operand

    Restricting register class to PointerRegClass for memory operands.

    Also fix the PointerRegClass for AArch64 from GPR64 to GPR64sp, since
    XZR cannot hold a memory pointer while SP is.

    Fixes PR33134.

    Differential Revision: https://reviews.llvm.org/D34999 — kongyi / detail
  16. [AArch64][Falkor] Avoid HW prefetcher tag collisions (step 1)

    Summary:
    This patch is the first step in reducing HW prefetcher instruction tag
    collisions in inner loops for Falkor.  It adds a pass that annotates IR
    loads with metadata to indicate that they are known to be strided loads,
    and adds a target lowering hook that translates this metadata to a
    target-specific MachineMemOperand flag.

    A follow on change will use this MachineMemOperand flag to re-write
    instructions to reduce tag collisions.

    Reviewers: mcrosier, t.p.northover

    Subscribers: aemerson, rengolin, mgorny, javed.absar, kristof.beyls, llvm-commits

    Differential Revision: https://reviews.llvm.org/D34963 — gberry / detail
  17. [Dominators] Add a missing include — kuhar / detail
  18. [AMDGPU] Throw away more dead code. NFCI. — davide / detail
  19. [Dominators] Implement incremental insertions

    Summary:
    This patch introduces incremental edge insertions based on the Depth Based Search algorithm.

    Insertions should work for both dominators and postdominators.

    Reviewers: dberlin, grosser, davide, sanjoy, brzycki

    Reviewed By: dberlin

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D35341 — kuhar / detail
  20. [Sanitizers] Scudo allocator set errno on failure.

    Summary:
    Set proper errno code on alloction failure and change pvalloc and
    posix_memalign implementation to satisfy their man-specified
    requirements.

    Reviewers: cryptoad

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D35429 — alekseyshl / detail
  21. Fix mixed line terminators. NFC. — dim / detail

#58 (Jul 14, 2017 1:54:48 PM)

  1. [EarlyCSE] Handle calls with no MemorySSA info.

    Summary:
    When checking for memory dependencies between calls using MemorySSA,
    handle cases where the calls have no MemoryAccess associated with them
    because the AA analysis being used has determined that the call does not
    read/write memory.

    Fixes PR33756

    Reviewers: dberlin, davide

    Subscribers: mcrosier, llvm-commits, Prazek

    Differential Revision: https://reviews.llvm.org/D35317 — gberry / detail
  2. [JumpThreading] Add a pattern to TryToUnfoldSelectInCurrBB()

    Add the following pattern to TryToUnfoldSelectInCurrBB()

    bb:
       %p = phi [0, %bb1], [1, %bb2], [0, %bb3], [1, %bb4], ...
       %c = cmp %p, 0
       %s = select %c, trueval, falseval

    The Select in the above pattern will be unfolded and then jump-threaded. The
    current implementation does not allow CMP in the middle of PHI and Select.

    Differential Revision: https://reviews.llvm.org/D34762 — haicheng / detail

#57 (Jul 14, 2017 12:09:57 PM)

  1. [Hexagon] Replace ISD opcode VPACK with VPACKE/VPACKO, NFC

    This breaks up pack-even and pack-odd into two separate operations. — kparzysz / detail
  2. Fix flag names in @available docs. — nico / detail
  3. [AMDGPU] Garbage collect dead code. NFCI.

    Unbreaks the build with GCC7. — davide / detail
  4. Fix link in docs. — nico / detail
  5. do more processing in clang-fuzzer (use EmitAssemblyAction)

    Summary: use EmitAssemblyAction in clang-fuzzer

    Reviewers: klimek, rsmith

    Reviewed By: klimek

    Subscribers: cfe-commits, mgorny

    Differential Revision: https://reviews.llvm.org/D34267 — kcc / detail
  6. Add documentation for @available

    https://reviews.llvm.org/D35379 — nico / detail
  7. Prevent ClangTools from generating dependency files.

    D34304 created a way for ToolInvocations to conditionally generate
    dependency files, and updated call sites to preserve the old behavior
    of not generating them by default. CompilerInvocations...

    Summary:
    ...are yet another
    call-path that needs updating to preserve the old behavior.

    Reviewers: klimek, echristo

    Reviewed By: echristo

    Subscribers: echristo, cfe-commits

    Differential Revision: https://reviews.llvm.org/D35131 — saugustine / detail
  8. [TableGen][MC] Fix a few places where we didn't hide the underlying type of LaneBitmask very well.

    One place compared with 32, which I've replaced with LaneBitmask::BitWidth.

    The other places are shifts of a constant 1 by a lane number. But if LaneBitmask were to be a larger type than 32-bits like 64-bits, the 1 would need to be 1ULL to do a 64-bit shift. To hide this I've added a LanebitMask::getLane that hides the shift and make sures the 1 is casted to correct type first. — ctopper / detail
  9. [Dominators] Update Clang's DominatorTree to use the new template argument

    Summary: This patch makes the Clang's DominatorTree use the new IsPostDom template argument for DominatorTreeBase.

    Reviewers: dberlin, sanjoy, davide, grosser

    Reviewed By: dberlin

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D35316 — kuhar / detail
  10. [Dominators] Make IsPostDominator a template parameter

    Summary:
    DominatorTreeBase used to have IsPostDominators (bool) member to indicate if the tree is a dominator or a postdominator tree. This made it possible to switch between the two 'modes' at runtime, but it isn't used in practice anywhere.

    This patch makes IsPostDominator a template argument. This way, it is easier to switch between different algorithms at compile-time based on this argument and design external utilities around it. It also makes it impossible to incidentally assign a postdominator tree to a dominator tree (and vice versa), and to further simplify template code in GenericDominatorTreeConstruction.

    Reviewers: dberlin, sanjoy, davide, grosser

    Reviewed By: dberlin

    Subscribers: mzolotukhin, llvm-commits

    Differential Revision: https://reviews.llvm.org/D35315 — kuhar / detail
  11. [AMDGPU] Do not insert an instruction into worklist twice in movetovalu

    In moveToVALU(), move to vector ALU is performed, all instrs in
    the use chain will be visited. We do not want the same node to be
    pushed to the visit worklist more than once.

    Differential Revision: https://reviews.llvm.org/D34726 — ajhuang / detail
  12. Unconditionally use .init_array instead of .ctors on Solaris.

    Patch by Fedor Sergeev — aaronballman / detail
  13. [clang] Add getSignedSizeType method

    C11 standard refers to the signed counterpart of the type size_t in
    the paragraph 7.21.6.1 where it defines d, i, o, u, x, or x conversion specifiers
    (in printf format string).
    In Clang there is a FIXME (in lib/Analysis/PrintfFormatString.cpp) for this case
    (which is not handled correctly at the moment).
    This diff adds getSignedSizeType method to TargetInfo and exposes it
    in ASTContext similarly to how it is done for getSizeType.
    lib/Analysis/PrintfFormatString.cpp will be changed in a separate commit.

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

    Test plan: make check-all — alexshap / detail
  14. [Dominators] Simplify block and node printing

    Summary:
    This patch adds `BlockPrinter`-- a small wrapper for printing CFG nodes and DomTree nodes to `raw_ostream`. It is meant to be only used internally, for debugging and printing errors.

    Reviewers: dberlin, sanjoy, grosser, davide

    Reviewed By: grosser, davide

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D35286 — kuhar / detail
  15. [Hexagon] Add intrinsics for data cache operations

    This is the clang part, adding support for
      void __builtin_HEXAGON_Y2_dccleana(void*);
      void __builtin_HEXAGON_Y2_dccleaninva(void*);
      void __builtin_HEXAGON_Y2_dcinva(void*);
      void __builtin_HEXAGON_Y2_dczeroa(void*);
      void __builtin_HEXAGON_Y4_l2fetch(void*, unsigned);
      void __builtin_HEXAGON_Y5_l2fetch(void*, unsigned long long);
    Requires r308032. — kparzysz / detail
  16. [llvm-readobj] - Teach readobj to print DT_FILTER dynamic tag in human readable form.

    Nothing special here, output format is similar to the format
    used by binutils readelf and ELF Tool Chain readelf.

    Differential revision: https://reviews.llvm.org/D35351 — grimar / detail
  17. [Hexagon] Add intrinsics for data cache operations

    This is the LLVM part, adding definitions for
      void @llvm.hexagon.Y2.dccleana(i8*)
      void @llvm.hexagon.Y2.dccleaninva(i8*)
      void @llvm.hexagon.Y2.dcinva(i8*)
      void @llvm.hexagon.Y2.dczeroa(i8*)
      void @llvm.hexagon.Y4.l2fetch(i8*, i32)
      void @llvm.hexagon.Y5.l2fetch(i8*, i64)
    The clang part will follow. — kparzysz / detail
  18. [InstCombine] convert bitwise (in)equality checks to logical ops (PR32401)

    As discussed in:
    https://bugs.llvm.org/show_bug.cgi?id=32401

    we have a backend transform to undo this:
    https://reviews.llvm.org/rL299542

    when it's likely that the xor version leads to better codegen, but we want
    this form in IR for better analysis and simplification potential. — spatel / detail
  19. Revert "Reland "[mips][mt][6/7] Add support for mftr, mttr instructions.""

    FileCheck is crashing on in the input file, so reverting again while
    I investigate.

    This reverts r308023. — sdardis / detail
  20. [InstCombine] add tests for PR32401; NFC

    Also, add comments to a couple of tests that could be moved out of instcombine. — spatel / detail
  21. [SystemZ]  Minor fixing in SystemZScheduleZ196.td

    Some minor corrections for the recently added instructions.

    Review: Ulrich Weigand — jonpa / detail
  22. [InstCombine] auto-generate complete test checks; NFC — spatel / detail
  23. Improve Aliasing of operations to static alloca

    Recommiting after adding check to avoid miscomputing alias information
    on addresses of the same base but different subindices.

    Memory accesses offset from frame indices may alias, e.g., we
    may merge write from function arguments passed on the stack when they
    are contiguous. As a result, when checking aliasing, we consider the
    underlying frame index's offset from the stack pointer.

    Static allocs are realized as stack objects in SelectionDAG, but its
    offset is not set until post-DAG causing DAGCombiner's alias check to
    consider access to static allocas to frequently alias. Modify isAlias
    to consider access between static allocas and access from other frame
    objects to be considered aliasing.

    Many test changes are included here. Most are fixes for tests which
    indirectly relied on our aliasing ability and needed to be modified to
    preserve their original intent.

    The remaining tests have minor improvements due to relaxed
    ordering. The exception is CodeGen/X86/2011-10-19-widen_vselect.ll
    which has a minor degradation dispite though the pre-legalized DAG is
    improved.

    Reviewers: rnk, mkuper, jonpa, hfinkel, uweigand

    Reviewed By: rnk

    Subscribers: sdardis, nemanjai, javed.absar, llvm-commits

    Differential Revision: https://reviews.llvm.org/D33345 — niravd / detail

#56 (Jul 14, 2017 6:58:24 AM)

    <