1. Jan 02, 2017
    • Keno Fischer's avatar
      Reapply "[CodeGen] Fix invalid DWARF info on Win64" · f7d84ee6
      Keno Fischer authored
      This reapplies rL289013 (reverted in rL289014) with the fixes identified
      in D21731. Should hopefully pass the buildbots this time.
      
      llvm-svn: 290809
      f7d84ee6
    • Richard Smith's avatar
      DR1391: Check for implicit conversion sequences for non-dependent function · efcfe860
      Richard Smith authored
      template parameters between deduction and substitution. The idea is to accept
      as many cases as possible, on the basis that substitution failure outside
      the immediate context is much more common during substitution than during
      implicit conversion sequence formation.
      
      This does not implement the partial ordering portion of DR1391, which so
      far appears to be misguided.
      
      llvm-svn: 290808
      efcfe860
    • Richard Smith's avatar
      Address post-commit review comments. · aac13a7f
      Richard Smith authored
      llvm-svn: 290807
      aac13a7f
    • Saleem Abdulrasool's avatar
      chrono: address post commit comments from Howard · e91473c3
      Saleem Abdulrasool authored
      Drawing some inspiration from code from Bill O'Neal as pointed out by
      Howard, rework the code to avoid an overflow in the duration.  Adjust
      the style to match libc++ style as well.
      
      Create a local typedef for the FILETIME duration (100-ns units).  Use
      this to define the difference between the NT and the UNIX epochs (which
      previously overflowed due to the representation limits due to the
      bouncing to ns).  Return the FILETIME duration biased by the NT-to-UNIX
      epoch conversion.
      
      Use of the custom duration makes it easier to read and reason about the
      code.
      
      llvm-svn: 290806
      e91473c3
    • Saleem Abdulrasool's avatar
      chrono: address post-commit comments from majnemer · cfc01154
      Saleem Abdulrasool authored
      Correct style to match libc++ style as pointed out by David Majnemer on
      IRC.  NFC.
      
      llvm-svn: 290805
      cfc01154
    • Saleem Abdulrasool's avatar
      chrono: give Windows a steady_clock · 78f51f95
      Saleem Abdulrasool authored
      Provide a definition for a steady monotonic clock by wrapping
      QueryPerformanceCounter.
      
      llvm-svn: 290804
      78f51f95
    • Saleem Abdulrasool's avatar
      chrono: implement a Windows version of system_clock::now · 6e3a0cc4
      Saleem Abdulrasool authored
      system_clock::now is not entirely straight forward on Windows, which
      does not have a clock_gettime function.
      
      GetSystemTimeAsFileTime gives us the value relative to the NT epoch (Jan
      1 1601) rather than the Unix epoch (Jan 1 1970).  However, this function
      has a low resolution (~10ms).  Newer versions of Windows provide
      GetSystemTimePreciseAsFileTime which gives us a much more accurate time
      (<1us).  Unfortunately, the latter is only available on Windows 8+ when
      targeting desktop apps.
      
      llvm-svn: 290803
      6e3a0cc4
    • Saleem Abdulrasool's avatar
      build: further improve flags handling for cl · 581bb5b9
      Saleem Abdulrasool authored
      This allows us to build with cl (or rather clang-cl) by using the
      correct spelling for `-include` (`/FI` for cl).  clang-cl and cl default
      to C++11/C++14 as they support it rather than permitting an explicit
      language standard.
      
      llvm-svn: 290802
      581bb5b9
    • Saleem Abdulrasool's avatar
      build: dont detect libraries for Windows · 9dde9491
      Saleem Abdulrasool authored
      Hard code the defaults for Windows for the time being.  The checks
      really are always going to return the same value.  Technically, the
      pthread linkage is possible, however, it seems better to use the Win32
      threading along with the external threading support that we have added.
      
      llvm-svn: 290801
      9dde9491
    • Saleem Abdulrasool's avatar
      build: differentiate between building for and on Windows · 61bce47e
      Saleem Abdulrasool authored
      This is necessary to support cross-compiling a Windows libc++ from
      Linux.  The CMAKE_SYSTEM_HOST_NAME tells you what, in autotools
      parlance, is known as the build as opposed to WIN32 which maps to, in
      autotools parlance, host.
      
      llvm-svn: 290800
      61bce47e
    • Saleem Abdulrasool's avatar
      CodeGen: update comment about RTTI field · a9e1450b
      Saleem Abdulrasool authored
      The MS ABI RTTI has a reserved field which is used as a cache for the
      demangled name.  It must be zero-initialized, which is used as a hint by
      the runtime to say that the cache has not been populated.  Since this
      field is populated at runtime, the RTTI structures must be placed in the
      .data section rather than .rdata.  NFC
      
      llvm-svn: 290799
      a9e1450b
    • Sanjay Patel's avatar
      [InstCombine] add explanatory comment to test; NFC · 0e3ae439
      Sanjay Patel authored
      The test was added at r290797, and a patch to enable the transform is proposed in D28204.
      
      llvm-svn: 290798
      0e3ae439
    • Sanjay Patel's avatar
      [InstCombine] add test to show potential nonnull attribute propagation; NFC · 07537c2b
      Sanjay Patel authored
      This will change with the current draft of:
      https://reviews.llvm.org/D28204
      
      llvm-svn: 290797
      07537c2b
  2. Jan 01, 2017
    • Florian Hahn's avatar
      [selectiondag] Check PromotedFloats map during expansive checks. · f872d230
      Florian Hahn authored
      Summary:
      `PromotedFloats` needs to be checked in 
      `DAGTypeLegalizer::PerformExpensiveChecks`. This patch fixes a few type
      legalization failures with expansive checks for ARM fp16 tests.
      
      Reviewers: baldrick, bogner, arsenm
      
      Subscribers: arsenm, aemerson, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D28187
      
      llvm-svn: 290796
      f872d230
    • Kelvin Li's avatar
      Fix typo in test case. NFC · 74af88e6
      Kelvin Li authored
      llvm-svn: 290795
      74af88e6
    • Sanjoy Das's avatar
      Fix an issue with isGuaranteedToTransferExecutionToSuccessor · 3bb2dbd6
      Sanjoy Das authored
      I'm not sure if this was intentional, but today
      isGuaranteedToTransferExecutionToSuccessor returns true for readonly and
      argmemonly calls that may throw.  This commit changes the function to
      not implicitly infer nounwind this way.
      
      Even if we eventually specify readonly calls as not throwing,
      isGuaranteedToTransferExecutionToSuccessor is not the best place to
      infer that.  We should instead teach FunctionAttrs or some other such
      pass to tag readonly functions / calls as nounwind instead.
      
      llvm-svn: 290794
      3bb2dbd6
    • Sanjoy Das's avatar
      Avoid const_cast; NFC · 0945530d
      Sanjoy Das authored
      llvm-svn: 290793
      0945530d
    • Richard Smith's avatar
      [c++17] Implement P0522R0 as written. This allows a template template argument · 26b86ea8
      Richard Smith authored
      to be specified for a template template parameter whenever the parameter is at
      least as specialized as the argument (when there's an obvious and correct
      mapping from uses of the parameter to uses of the argument). For example, a
      template with more parameters can be passed to a template template parameter
      with fewer, if those trailing parameters have default arguments.
      
      This is disabled by default, despite being a DR resolution, as it's fairly
      broken in its current state: there are no partial ordering rules to cope with
      template template parameters that have different parameter lists, meaning that
      code that attempts to decompose template-ids based on arity can hit unavoidable
      ambiguity issues.
      
      The diagnostics produced on a non-matching argument are also pretty bad right
      now, but I aim to improve them in a subsequent commit.
      
      llvm-svn: 290792
      26b86ea8
    • Saleem Abdulrasool's avatar
      system_error: use strerror_r only for threaded code · c8bf9618
      Saleem Abdulrasool authored
      When building libc++ without threading, strerror_r is not used.  Define
      the code only when threading is enabled.  This allows us to build
      system_error for Windows, which ATM doesn't build with threading.
      
      llvm-svn: 290791
      c8bf9618
    • Sanjay Patel's avatar
      [ValueTracking] add tests for known-nonnull-at; NFC · 5865d12e
      Sanjay Patel authored
      llvm-svn: 290790
      5865d12e
    • Saleem Abdulrasool's avatar
      clean up some qualifier casting · 2177f3ce
      Saleem Abdulrasool authored
      This cleans up the `-Wqual-cast` warnings from gcc 6 when building
      libc++.  NFC.
      
      llvm-svn: 290789
      2177f3ce
    • Saleem Abdulrasool's avatar
      clean up `-Wmisleading-indentation` warning · 94865f9a
      Saleem Abdulrasool authored
      Clean up the misleading indentation warning from GCC 6.  NFC
      
      llvm-svn: 290788
      94865f9a
    • Sanjay Patel's avatar
      [Inliner] remove unnecessary null checks from AddAlignmentAssumptions(); NFCI · aea60846
      Sanjay Patel authored
      We bail out on the 1st line if the assumption cache is not set, so there's
      no need to check it after that.
      
      llvm-svn: 290787
      aea60846
    • Sanjay Patel's avatar
      [ValueTracking] make dominator tree requirement explicit for... · 7fd779f0
      Sanjay Patel authored
      [ValueTracking] make dominator tree requirement explicit for isKnownNonNullFromDominatingCondition(); NFCI
      
      I don't think this hole is currently exposed, but I crashed regression tests for
      jump-threading and loop-vectorize after I added calls to isKnownNonNullAt() in
      InstSimplify as part of trying to solve PR28430:
      https://llvm.org/bugs/show_bug.cgi?id=28430
      
      That's because they call into value tracking with a context instruction, but no
      other parts of the query structure filled in.
      
      For more background, see the discussion in:
      https://reviews.llvm.org/D27855
      
      llvm-svn: 290786
      7fd779f0
    • Saleem Abdulrasool's avatar
      remove some inherited attributes on exceptions · 21711c45
      Saleem Abdulrasool authored
      These exception types are marked with `_LIBCPP_EXCEPTION_ABI` which
      expands to `__attribute__((__visibility__("default")))` or
      `__declspec(dllexport)`.  When building for Windows, we would hit an
      error:
      
          cannot apply 'dllexport' to a 'dllexport' class
      
      Remove the duplicate annotations as they will be inherited from the
      class.
      
      llvm-svn: 290785
      21711c45
  3. Dec 31, 2016