1. Aug 30, 2018
    • Fedor Sergeev's avatar
      [SimpleLoopUnswitch] After unswitch delete dead blocks in parent loops · 7b49aa03
      Fedor Sergeev authored
      Summary:
      Assert from PR38737 happens on the dead block inside the parent loop
      after unswitching nontrivial switch in the inner loop.
      
      deleteDeadBlocksFromLoop now takes extra care to detect/remove dead
      blocks in all the parent loops in addition to the blocks from original
      loop being unswitched.
      
      Reviewers: asbirlea, chandlerc
      
      Reviewed By: asbirlea
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D51415
      
      llvm-svn: 340955
      7b49aa03
    • Matt Morehouse's avatar
      Revert "[libFuzzer] Port to Windows" · cf311cfc
      Matt Morehouse authored
      This reverts r340949 due to bot breakage again.
      
      llvm-svn: 340954
      cf311cfc
    • Alexey Bataev's avatar
      [OPENMP][NVPTX] Add support for lightweight runtime. · 8d8e1235
      Alexey Bataev authored
      If the target construct can be executed in SPMD mode + it is a loop
      based directive with static scheduling, we can use lightweight runtime
      support.
      
      llvm-svn: 340953
      8d8e1235
    • Sanjay Patel's avatar
      [InstCombine] canonicalize fneg with llvm.sin · 0f29e953
      Sanjay Patel authored
      This is a follow-up to rL339604 which did the same transform
      for a sin libcall. The handling of intrinsics vs. libcalls
      is unfortunately scattered, so I'm just adding this next to
      the existing transform for llvm.cos for now.
      
      This should resolve PR38458:
      https://bugs.llvm.org/show_bug.cgi?id=38458
      If the call was already negated, the negates will cancel
      each other out.
      
      llvm-svn: 340952
      0f29e953
    • Alina Sbirlea's avatar
      [MemorySSA] Add expesive check for validating clobber accesses. · f5403d83
      Alina Sbirlea authored
      Summary: Add validation of clobber accesses as expensive check.
      
      Reviewers: george.burgess.iv
      
      Subscribers: sanjoy, jlebar, Prazek, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D51327
      
      llvm-svn: 340951
      f5403d83
    • Sanjay Patel's avatar
      [InstCombine] add tests for llvm.sin(-x); NFC · 12a7ea44
      Sanjay Patel authored
      Also add a corresponding test for llvm.cos with FMF to 
      make sure that was handled correctly.
      
      llvm-svn: 340950
      12a7ea44
    • Matt Morehouse's avatar
      [libFuzzer] Port to Windows · 245ebd71
      Matt Morehouse authored
      Summary:
      Port libFuzzer to windows-msvc.
      This patch allows libFuzzer targets to be built and run on Windows, using -fsanitize=fuzzer and/or fsanitize=fuzzer-no-link. It allows these forms of coverage instrumentation to work on Windows as well.
      It does not fix all issues, such as those with -fsanitize-coverage=stack-depth, which is not usable on Windows as of this patch.
      It also does not fix any libFuzzer integration tests. Nearly all of them fail to compile, fixing them will come in a later patch, so libFuzzer tests are disabled on Windows until them.
      
      Reviewers: morehouse, rnk
      
      Reviewed By: morehouse, rnk
      
      Subscribers: #sanitizers, delcypher, morehouse, kcc, eraman
      
      Differential Revision: https://reviews.llvm.org/D51022
      
      llvm-svn: 340949
      245ebd71
    • Evandro Menezes's avatar
      [InstCombine] Expand the simplification of pow() with nested exp{,2}() · 22e0bdf4
      Evandro Menezes authored
      Expand the simplification of `pow(exp{,2}(x), y)` to all FP types.
      
      This improvement helps some benchmarks in SPEC CPU2000 and CPU2006, such as
      252.eon, 447.dealII, 453.povray.  Otherwise, no significant regressions on
      x86-64 or A64.
      
      Differential revision: https://reviews.llvm.org/D51195
      
      llvm-svn: 340948
      22e0bdf4
    • Evandro Menezes's avatar
      [InstCombine] Expand the simplification of pow() into exp2() · a3a7b535
      Evandro Menezes authored
      Generalize the simplification of `pow(2.0, y)` to `pow(2.0 ** n, y)` for all
      scalar and vector types.
      
      This improvement helps some benchmarks in SPEC CPU2000 and CPU2006, such as
      252.eon, 447.dealII, 453.povray.  Otherwise, no significant regressions on
      x86-64 or A64.
      
      Differential revision: https://reviews.llvm.org/D49273
      
      llvm-svn: 340947
      a3a7b535
    • Andrea Di Biagio's avatar
      [llvm-mca] Add fields "Total uOps" and "uOps Per Cycle" to the report generated by the SummaryView. · a2eee474
      Andrea Di Biagio authored
      This patch adds two new fields to the perf report generated by the SummaryView.
      Fields are now logically organized into two small groups; only the second group
      contains throughput indicators.
      
      Example:
      ```
      Iterations:        100
      Instructions:      300
      Total Cycles:      414
      Total uOps:        700
      
      Dispatch Width:    4
      uOps Per Cycle:    1.69
      IPC:               0.72
      Block RThroughput: 4.0
      ```
      
      This patch also updates the docs for llvm-mca.
      Due to the nature of this change, several tests in the tools/llvm-mca directory
      were affected, and had to be updated using script `update_mca_test_checks.py`.
      
      llvm-svn: 340946
      a2eee474
    • Andrea Di Biagio's avatar
      5221e17f
    • Alexey Bataev's avatar
      [OPENMP][NVPTX] Lightweight runtime support for SPMD mode. · b7a5d38c
      Alexey Bataev authored
      Summary:
      Implemented simple and lightweight runtime support for SPMD mode-based
      constructs. It adds support for L2 sequential parallelism wihtout full
      runtime support. Also, patch fixes some use cases for
      uninitialized|lightweight runtime.
      
      Reviewers: grokos, kkwli0, Hahnfeld, gtbercea
      
      Subscribers: guansong, openmp-commits
      
      Differential Revision: https://reviews.llvm.org/D51222
      
      llvm-svn: 340944
      b7a5d38c
    • Martin Storsjo's avatar
      [CMake] Add an lld-test-depends target · bb0a3c91
      Martin Storsjo authored
      This builds all dependencies of lld-test/check-lld, without running
      the tests. This matches llvm-test-depends and clang-test-depends.
      
      Differential Revision: https://reviews.llvm.org/D51439
      
      llvm-svn: 340943
      bb0a3c91
    • Martin Storsjo's avatar
      [MinGW] [X86] Add stubs for references to data variables that might end up imported from a dll · 489993db
      Martin Storsjo authored
      Variables declared with the dllimport attribute are accessed via a
      stub variable named __imp_<var>. In MinGW configurations, variables that
      aren't declared with a dllimport attribute might still end up imported
      from another DLL with runtime pseudo relocs.
      
      For x86_64, this avoids the risk that the target is out of range
      for a 32 bit PC relative reference, in case the target DLL is loaded
      further than 4 GB from the reference. It also avoids having to make the
      text section writable at runtime when doing the runtime fixups, which
      makes it worthwhile to do for i386 as well.
      
      Add stub variables for all dso local data references where a definition
      of the variable isn't visible within the module, since the DLL data
      autoimporting might make them imported even though they are marked as
      dso local within LLVM.
      
      Don't do this for variables that actually are defined within the same
      module, since we then know for sure that it actually is dso local.
      
      Don't do this for references to functions, since there's no need for
      runtime pseudo relocations for autoimporting them; if a function from
      a different DLL is called without the appropriate dllimport attribute,
      the call just gets routed via a thunk instead.
      
      GCC does something similar since 4.9 (when compiling with -mcmodel=medium
      or large; from that version, medium is the default code model for x86_64
      mingw), but only for x86_64.
      
      Differential Revision: https://reviews.llvm.org/D51288
      
      llvm-svn: 340942
      489993db
    • Martin Storsjo's avatar
      [MinGW] Don't mark external variables as DSO local · 5ff7a8e6
      Martin Storsjo authored
      Since MinGW supports automatically importing external variables from
      DLLs even without the DLLImport attribute, we shouldn't mark them
      as DSO local unless we actually know them to be local for sure.
      
      Keep marking thread local variables as DSO local.
      
      Differential Revision: https://reviews.llvm.org/D51382
      
      llvm-svn: 340941
      5ff7a8e6
    • Martin Storsjo's avatar
      [COFF] Merge the .ctors, .dtors and .CRT sections into .rdata for MinGW · cfbbb707
      Martin Storsjo authored
      There's no point in keeping them as separate sections.
      
      This differs from GNU ld, which places .ctors and .dtors content in
      .text (implemented by a built-in linker script). But since the content
      only is pointers, there's no need to have it executable.
      
      GNU ld also leaves .CRT separate as its own standalone section.
      
      MSVC merges .CRT into .rdata similarly, with a directive embedded in
      an object file in msvcrt.lib or libcmt.lib.
      
      Differential Revision: https://reviews.llvm.org/D51414
      
      llvm-svn: 340940
      cfbbb707
    • Craig Topper's avatar
      [InstCombine] Replace two calls to getNumUses() with !hasNUsesOrMore · 2bcb1eee
      Craig Topper authored
      We were calling getNumUses to check for 1 or 2 uses. But getNumUses is linear in the number of uses. We can instead use !hasNUsesOrMore(3) which will stop the linear scan as soon as it determines there are at least 3 uses even if there are more.
      
      llvm-svn: 340939
      2bcb1eee
    • Zachary Turner's avatar
      Update Visual Studio Integration version number. · 68a46d89
      Zachary Turner authored
      This updates the version number in the manifest file to match
      the SVN revision at which it was committed.
      
      llvm-svn: 340938
      68a46d89
    • Ilya Biryukov's avatar
      [Tooling] Do not restore working dir in ClangTool · 2dbbd910
      Ilya Biryukov authored
      Summary:
      Resolve all relative paths before running the tool instead.
      
      This fixes the usage of ClangTool in AllTUsExecutor. The executor will
      try running multiple ClangTool instances in parallel with compile
      commands that usually have the same working directory.
      
      Changing working directory is a global operation, so we end up
      changing working directory in the middle of running other actions,
      which leads to spurious compile errors.
      
      Reviewers: ioeric, sammccall
      
      Reviewed By: ioeric
      
      Subscribers: cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D51407
      
      llvm-svn: 340937
      2dbbd910
    • Farhana Aleen's avatar
      [AMDGPU] Match udot4 pattern. · 9250c92d
      Farhana Aleen authored
      Summary: D.u32 = S0.u8[0] * S1.u8[0] +
                       S0.u8[1] * S1.u8[1] +
                       S0.u8[2] * S1.u8[2] +
                       S0.u8[3] * S1.u8[3] + S2.u32
      
      Author: FarhanaAleen
      
      Reviewed By: arsenm
      
      Subscribers: llvm-commits, AMDGPU
      
      Differential Revision: https://reviews.llvm.org/D50921
      
      llvm-svn: 340936
      9250c92d
    • Alexandre Ganea's avatar
      [DebugCounters] Fix DebugCounterTest when running all SupportTests · bc2f06c9
      Alexandre Ganea authored
      Previously, the DebugCounterTest was failing because CommandLineTest.GetCommandLineArguments was clearing all the global singletons.
      
      Differential Revision: https://reviews.llvm.org/D51423
      
      llvm-svn: 340935
      bc2f06c9
  2. Aug 29, 2018