1. Mar 01, 2019
    • Jonathan Peyton's avatar
      [OpenMP] Make use of sched_yield optional in runtime · e47d32f1
      Jonathan Peyton authored
      This patch cleans up the yielding code and makes it optional. An
      environment variable, KMP_USE_YIELD, was added. Yielding is still
      on by default (KMP_USE_YIELD=1), but can be turned off completely
      (KMP_USE_YIELD=0), or turned on only when oversubscription is detected
      (KMP_USE_YIELD=2). Note that oversubscription cannot always be detected
      by the runtime (for example, when the runtime is initialized and the
      process forks, oversubscription cannot be detected currently over
      multiple instances of the runtime).
      
      Because yielding can be controlled by user now, the library mode
      settings (from KMP_LIBRARY) for throughput and turnaround have been
      adjusted by altering blocktime, unless that was also explicitly set.
      
      In the original code, there were a number of places where a double yield
      might have been done under oversubscription. This version checks
      oversubscription and if that's not going to yield, then it does
      the spin check.
      
      Patch by Terry Wilmarth
      
      Differential Revision: https://reviews.llvm.org/D58148
      
      llvm-svn: 355120
      e47d32f1
    • Rong Xu's avatar
      [PGO] Update InstrProfData.inc to sync with llvm · 23452e1c
      Rong Xu authored
      llvm-svn: 355119
      23452e1c
    • Sanjay Patel's avatar
      [InstCombine] fold adds of constants separated by sext/zext · 4a47f5f5
      Sanjay Patel authored
      This is part of a transform that may be done in the backend:
      D13757
      ...but it should always be beneficial to fold this sooner in IR
      for all targets.
      
      https://rise4fun.com/Alive/vaiW
      
        Name: sext add nsw
        %add = add nsw i8 %i, C0
        %ext = sext i8 %add to i32
        %r = add i32 %ext, C1
        =>
        %s = sext i8 %i to i32
        %r = add i32 %s, sext(C0)+C1
      
        Name: zext add nuw
        %add = add nuw i8 %i, C0
        %ext = zext i8 %add to i16
        %r = add i16 %ext, C1
        =>
        %s = zext i8 %i to i16
        %r = add i16 %s, zext(C0)+C1
      
      llvm-svn: 355118
      4a47f5f5
    • Craig Topper's avatar
      [X86] Add test case that was supposed to go with r355116. · 8b1703fc
      Craig Topper authored
      llvm-svn: 355117
      8b1703fc
    • Craig Topper's avatar
      [X86] Don't peek through bitcasts before checking... · 38427c47
      Craig Topper authored
      [X86] Don't peek through bitcasts before checking ISD::isBuildVectorOfConstantSDNodes in combineTruncatedArithmetic
      
      We don't have any combines that can look through a bitcast to truncate a build vector of constants. So the truncate will stick around and give us something like this pattern (binop (trunc X), (trunc (bitcast (build_vector)))) which has two truncates in it. Which will be reversed by hoistLogicOpWithSameOpcodeHands in the generic DAG combiner. Thus causing an infinite loop.
      
      Even if we had a combine for (truncate (bitcast (build_vector))), I think it would need to be implemented in getNode otherwise DAG combiner visit ordering would probably still visit the binop first and reverse it. Or combineTruncatedArithmetic would need to do its own constant folding.
      
      Differential Revision: https://reviews.llvm.org/D58705
      
      llvm-svn: 355116
      38427c47
    • Amara Emerson's avatar
      Revert "[AArch64][GlobalISel] Add support for 64 bit vector shuffle using TBL1." · 8d70e642
      Amara Emerson authored
      Seems to break some neon intrinsics tests.
      
      llvm-svn: 355115
      8d70e642
    • Jonas Devlieghere's avatar
      [dsymutil] Use rfind for paths with parentheses · f9b0b9a5
      Jonas Devlieghere authored
      Dsymutil gets library member information is through the ambiguous
      /path/to/archive.a(member.o). The current logic we use would get
      confused by additional parentheses. Using rfind mitigates this issue.
      
      llvm-svn: 355114
      f9b0b9a5
    • Julian Lettner's avatar
      [NFC][Sanitizer] Weak linkage is not available on Windows · ce65261f
      Julian Lettner authored
      The concept of weak linkage is not available on Windows. The available
      workarounds in LLVM/sanitizer runtimes have their own problems. Define a
      separte symbol ubsan_GetStackTrace to work around the issue now. At lest
      this way it is painfully obvious that we still have to do more cleanup.
      
      Follow-up to revision: https://reviews.llvm.org/D58651
      
      llvm-svn: 355113
      ce65261f
    • Thomas Lively's avatar
      [WebAssembly] Remove uses of ThreadModel · f3b4f990
      Thomas Lively authored
      Summary:
      In the clang UI, replaces -mthread-model posix with -matomics as the
      source of truth on threading. In the backend, replaces
      -thread-model=posix with the atomics target feature, which is now
      collected on the WebAssemblyTargetMachine along with all other used
      features. These collected features will also be used to emit the
      target features section in the future.
      
      The default configuration for the backend is thread-model=posix and no
      atomics, which was previously an invalid configuration. This change
      makes the default valid because the thread model is ignored.
      
      A side effect of this change is that objects are never emitted with
      passive segments. It will instead be up to the linker to decide
      whether sections should be active or passive based on whether atomics
      are used in the final link.
      
      Reviewers: aheejin, sbc100, dschuff
      
      Subscribers: mehdi_amini, jgravelle-google, hiraditya, sunfish, steven_wu, dexonsmith, rupprecht, jfb, jdoerfert, cfe-commits, llvm-commits
      
      Tags: #clang, #llvm
      
      Differential Revision: https://reviews.llvm.org/D58742
      
      llvm-svn: 355112
      f3b4f990
    • Philip Reames's avatar
      [Tests] Strengthen LICM test corpus to show alignment striping. (part 2) · 9915b1fa
      Philip Reames authored
      This should have been part of r355110, but my brain isn't quite awake yet, despite the coffee.  Per the original submit comment... Doing scalar promotion w/o being able to prove the alignment of the hoisted load or sunk store is a bug.  Update tests to actually show the alignment so that impact of the patch which fixes this can be seen.
      
      llvm-svn: 355111
      9915b1fa
    • Philip Reames's avatar
      [Tests] Strengthen LICM test corpus to show alignment striping · 63a67527
      Philip Reames authored
      Doing scalar promotion w/o being able to prove the alignment of the hoisted load or sunk store is a bug.  Update tests to actually show the alignment so that impact of the patch which fixes this can be seen.
      
      llvm-svn: 355110
      63a67527
    • Nikita Popov's avatar
      [ValueTracking] More accurate unsigned sub overflow detection · af2b0bef
      Nikita Popov authored
      Second part of D58593.
      
      Compute precise overflow conditions based on all known bits, rather
      than just the sign bits. Unsigned a - b overflows iff a < b, and we
      can determine whether this always/never happens based on the minimal
      and maximal values achievable for a and b subject to the known bits
      constraint.
      
      llvm-svn: 355109
      af2b0bef
    • Jonas Toth's avatar
      [clang-tidy] fix documentation link in list of clang-tidy checks · ab10947b
      Jonas Toth authored
      llvm-svn: 355108
      ab10947b
    • Tom Stellard's avatar
      llvm-config: Include -stdlib= in --cxxflags · d20073f4
      Tom Stellard authored
      Summary:
      This was removed in r349068, but it is needed when llvm is compiled
      using the non-default c++ standard library on a platform.
      
      Reviewers: sylvestre.ledru, infinity0, mgorny, cuviper
      
      Reviewed By: sylvestre.ledru
      
      Subscribers: jdoerfert, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D57859
      
      llvm-svn: 355107
      d20073f4
    • Yaxun Liu's avatar
      Partial revert of r353952: [HIP] Handle compile -m options and propagate into LLC · fd2c5c05
      Yaxun Liu authored
      Remove comments and tests about passing -mcode-object-v3 to driver since it does
      not work. Other -m options are OK.
      
      Also put back -mattr=-code-object-v3 since HIP is still not ready for code object
      v3.
      
      Differential Revision: https://reviews.llvm.org/D57977
      
      llvm-svn: 355106
      fd2c5c05
    • Chijun Sima's avatar
      Make MergeBlockIntoPredecessor conformant to the precondition of calling DTU.applyUpdates · 58618763
      Chijun Sima authored
      Summary:
      It is mentioned in the document of DTU that "It is illegal to submit any update that has already been submitted, i.e., you are supposed not to insert an existent edge or delete a nonexistent edge." It is dangerous to violet this rule because DomTree and PostDomTree occasionally crash on this scenario.
      
      This patch fixes `MergeBlockIntoPredecessor`, making it conformant to this precondition.
      
      Reviewers: kuhar, brzycki, chandlerc
      
      Reviewed By: brzycki
      
      Subscribers: hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D58444
      
      llvm-svn: 355105
      58618763
    • Amara Emerson's avatar
      [AArch64][GlobalISel] Add support for 64 bit vector shuffle using TBL1. · 85c3afd7
      Amara Emerson authored
      This extends the existing support for shufflevector to handle cases like
      <2 x float>, which we can implement by concating the vectors and using a TBL1.
      
      Differential Revision: https://reviews.llvm.org/D58684
      
      llvm-svn: 355104
      85c3afd7
    • Pavel Labath's avatar
      [cmake] Move LLDB_DISABLE_LIBEDIT handling code into a central place · 5d4d168c
      Pavel Labath authored
      This was previously scattered between the main CMakeLists.txt file and
      LLDBGenerateConfig.cmake and LLDBConfig.cmake. This caused the some of
      the code to be executed in incorrect order. Specifically, the check for
      el_winsertstr was done before libedit_LIBRARIES was computed, and so it
      always failed on the first run.
      
      Moving it the two checks to a central place makes sure this doesn't
      happen again and improves the overall readability.
      
      llvm-svn: 355103
      5d4d168c
  2. Feb 28, 2019