1. Apr 24, 2019
    • Owen Pan's avatar
      [clang-format] Fix bug in reflow of block comments containing CR/LF · 108cbbc2
      Owen Pan authored
      Fix PR36119
      
      Differential Revision: https://reviews.llvm.org/D60996
      
      llvm-svn: 359029
      108cbbc2
    • Frederic Riss's avatar
      Lock accesses to OptionValueFileSpecList objects · acbf0058
      Frederic Riss authored
      Before a Debugger gets a Target, target settings are routed to a global set
      of settings. Even without this, some part of the LLDB which exist independently
      of the Debugger object (the Module cache, the Symbol vendors, ...) access
      directly the global default store for those settings.
      
      Of course, if you modify one of those global settings while they are being read,
      bad things happen. We see this quite a bit with FileSpecList settings. In
      particular, we see many cases where one debug session changes
      target.exec-search-paths while another session starts up and it crashes when
      one of those accesses invalid FileSpecs.
      
      This patch addresses the specific FileSpecList issue by adding locking to
      OptionValueFileSpecList and never returning by reference.
      
      Reviewers: clayborg
      
      Subscribers: lldb-commits
      
      Differential Revision: https://reviews.llvm.org/D60468
      
      llvm-svn: 359028
      acbf0058
    • Akira Hatanaka's avatar
      [ObjC][ARC] Check the basic block size before calling · 5c3117b0
      Akira Hatanaka authored
      DominatorTree::dominate.
      
      ARC contract pass has an optimization that replaces the uses of the
      argument of an ObjC runtime function call with the call result.
      
      For example:
      
      ; Before optimization
      %1 = tail call i8* @foo1()
      %2 = tail call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %1)
      store i8* %1, i8** @g0, align 8
      
      ; After optimization
      %1 = tail call i8* @foo1()
      %2 = tail call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %1)
      store i8* %2, i8** @g0, align 8 // %1 is replaced with %2
      
      Before replacing the argument use, DominatorTree::dominate is called to
      determine whether the user instruction is dominated by the ObjC runtime
      function call instruction. The call to DominatorTree::dominate can be
      expensive if the two instructions belong to the same basic block and the
      size of the basic block is large. This patch checks the basic block size
      and just bails out if the size exceeds the limit set by command line
      option "arc-contract-max-bb-size".
      
      rdar://problem/49477063
      
      Differential Revision: https://reviews.llvm.org/D60900
      
      llvm-svn: 359027
      5c3117b0
    • David Blaikie's avatar
      Reapply: "DebugInfo: Emit only one kind of accelerated access/name table"" · 2f511762
      David Blaikie authored
      Originally committed in r358931
      Reverted in r358997
      
      Seems this change made Apple accelerator tables miss names (because
      names started respecting the CU NameTableKind GNU & assuming that
      shouldn't produce accelerated names too), which is never correct (apple
      accelerator tables don't have separators or CU lists - if present, they
      must describe all names in all CUs).
      
      Original Description:
      Currently to opt in to debug_names in DWARFv5, the IR must contain
      'nameTableKind: Default' which also enables debug_pubnames.
      
      Instead, only allow one of {debug_names, apple_names, debug_pubnames,
      debug_gnu_pubnames}.
      
      nameTableKind: Default gives debug_names in DWARFv5 and greater,
      debug_pubnames in v4 and earlier - and apple_names when tuning for lldb
      on MachO.
      nameTableKind: GNU always gives gnu_pubnames
      
      llvm-svn: 359026
      2f511762
    • Teresa Johnson's avatar
      [ThinLTO] Pass down opt level to LTO backend and handle -O0 LTO in new PM · 867bc395
      Teresa Johnson authored
      Summary:
      The opt level was not being passed down to the ThinLTO backend when
      invoked via clang (for distributed ThinLTO).
      
      This exposed an issue where the new PM was asserting if the Thin or
      regular LTO backend pipelines were invoked with -O0 (not a new issue,
      could be provoked by invoking in-process *LTO backends via linker using
      new PM and -O0). Fix this similar to the old PM where -O0 only does the
      necessary lowering of type metadata (WPD and LowerTypeTest passes) and
      then quits, rather than asserting.
      
      Reviewers: xur
      
      Subscribers: mehdi_amini, inglorion, eraman, hiraditya, steven_wu, dexonsmith, cfe-commits, llvm-commits, pcc
      
      Tags: #clang, #llvm
      
      Differential Revision: https://reviews.llvm.org/D61022
      
      llvm-svn: 359025
      867bc395
    • Nico Weber's avatar
      llvm-cvtres: Split addChild(ID) into two functions · 6967da8f
      Nico Weber authored
      Before, there was an IsData parameter. Now, there are two different
      functions for data nodes and ID nodes. No behavior change, needed for a
      follow-up change to make two data nodes (but not two ID nodes) with the
      same ID an error.
      
      For consistency, rename another addChild() overload to addNameChild().
      
      llvm-svn: 359024
      6967da8f
    • Eric Fiselier's avatar
      Fix namespace name conflict with GCC · 433eecad
      Eric Fiselier authored
      llvm-svn: 359023
      433eecad
    • Jessica Paquette's avatar
      [AArch64][GlobalISel] Teach regbankselect about G_INTRINSIC_TRUNC · ede0b2e6
      Jessica Paquette authored
      Add it to isPreISelGenericFloatingPointOpcode, and add a regbankselect test.
      
      Update arm64-vfloatintrinsics.ll now that we can select it.
      
      llvm-svn: 359022
      ede0b2e6
    • Jessica Paquette's avatar
      [AArch64][GlobalISel] Legalize G_INTRINSIC_TRUNC · 56342642
      Jessica Paquette authored
      Same patch as G_FCEIL etc.
      
      Add the missing switch case in widenScalar, add G_INTRINSIC_TRUNC to the correct
      rule in AArch64LegalizerInfo.cpp, and add a test.
      
      llvm-svn: 359021
      56342642
    • Eric Fiselier's avatar
      Fix implementation of ::abs and std::abs LWG 2192. · 1670772a
      Eric Fiselier authored
      Summary:
      All overloads of `::abs` and `std::abs` must be present in both `<cmath>` and `<cstdlib>`. This is problematic to implement because C defines `fabs` in `math.h` and `labs` in `stdlib.h`. This introduces a circular dependency between the two headers. 
      
      This patch implements that requirement by moving `abs` into `math.h` and making `stdlib.h` include `math.h`. In order to get the underlying C declarations from the "real" `stdlib.h` inside our `math.h` we need some trickery. Specifically we need to make `stdlib.h` include next itself.
      
      Suggestions for a cleaner implementation are welcome.
      
      Reviewers: mclow.lists, ldionne
      
      Reviewed By: ldionne
      
      Subscribers: krytarowski, fedor.sergeev, dexonsmith, jdoerfert, jsji, libcxx-commits
      
      Differential Revision: https://reviews.llvm.org/D60097
      
      llvm-svn: 359020
      1670772a
    • Nikita Popov's avatar
      [ConstantRange] Add urem support · f945429f
      Nikita Popov authored
      Add urem support to ConstantRange, so we can handle in in LVI. This
      is an approximate implementation that tries to capture the most useful
      conditions: If the LHS is always strictly smaller than the RHS, then
      the urem is a no-op and the result is the same as the LHS range.
      Otherwise the lower bound is zero and the upper bound is
      min(LHSMax, RHSMax - 1).
      
      Differential Revision: https://reviews.llvm.org/D60952
      
      llvm-svn: 359019
      f945429f
    • Nikita Popov's avatar
      [ConstantRangeTest] Move helper methods; NFC · 4a523979
      Nikita Popov authored
      Move Test(Unsigned|Signed)BinOpExhaustive() towards the top of the
      file, so they're easier to reuse.
      
      llvm-svn: 359018
      4a523979
    • Stanislav Mekhanoshin's avatar
      [AMDGPU] Fixed addReg() in SIOptimizeExecMaskingPreRA.cpp · c464dddc
      Stanislav Mekhanoshin authored
      The second argument is flags, not subreg.
      
      Differential Revision: https://reviews.llvm.org/D61031
      
      llvm-svn: 359017
      c464dddc
    • Jonas Devlieghere's avatar
      [Reproducers] Limit logging to calls that cross the API boundary. · db41fe16
      Jonas Devlieghere authored
      We recently moved API logging into the instrumentation macros. This made
      that logging is now consistent and abstracted behind a macro for every
      API functions, independent of the reproducers. It also means we have a
      lot more output. While this is a good thing, it also meant a lot more
      noise in the log, from things that aren't always equally interesting,
      such as the copy constructor for example.
      
      To improve usability, we should increase the signal-to-noise ratio. I
      propose to achieve this by only logging API functions that cross the API
      boundary. This is a divergence of what we had before, where a select
      number of functions were logged, irregardless of the API boundary, a
      concept that was introduced for the reproducers. However, I believe this
      is in line with the purpose of the API log.
      
      Differential revision: https://reviews.llvm.org/D60984
      
      llvm-svn: 359016
      db41fe16
    • Jessica Paquette's avatar
      [AArch64][GlobalISel] Legalize G_FMA for more vector types · df5ce782
      Jessica Paquette authored
      Same as G_FCEIL, G_FABS, etc. Just move it into that rule.
      
      Add a legalizer test for G_FMA, which we didn't have before and update
      arm64-vfloatintrinsics.ll.
      
      llvm-svn: 359015
      df5ce782
    • Alina Sbirlea's avatar
      [AliasAnalysis] AAResults preserves AAManager. · a809e8e5
      Alina Sbirlea authored
      Summary:
      AAResults should not invalidate AAManager.
      Update tests.
      
      Reviewers: chandlerc
      
      Subscribers: mehdi_amini, jlebar, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D60914
      
      llvm-svn: 359014
      a809e8e5
    • Jessica Paquette's avatar
      [AArch64][GlobalISel] Add G_FMA to isPreISelGenericFloatingPointOpcode · e50e6d25
      Jessica Paquette authored
      Noticed an unnecessary fallback in arm64-vmul caused by this.
      
      Also add a regbankselect test for G_FMA.
      
      llvm-svn: 359013
      e50e6d25
    • Joel E. Denny's avatar
      [APSInt][OpenMP] Fix isNegative, etc. for unsigned types · 3234887f
      Joel E. Denny authored
      Without this patch, APSInt inherits APInt::isNegative, which merely
      checks the sign bit without regard to whether the type is actually
      signed.  isNonNegative and isStrictlyPositive call isNegative and so
      are also affected.
      
      This patch adjusts APSInt to override isNegative, isNonNegative, and
      isStrictlyPositive with implementations that consider whether the type
      is signed.
      
      A large set of Clang OpenMP tests are affected.  Without this patch,
      these tests assume that `true` is not a valid argument for clauses
      like `collapse`.  Indeed, `true` fails APInt::isStrictlyPositive but
      not APSInt::isStrictlyPositive.  This patch adjusts those tests to
      assume `true` should be accepted.
      
      This patch also adds tests revealing various other similar fixes due
      to APSInt::isNegative calls in Clang's ExprConstant.cpp and
      SemaExpr.cpp: `++` and `--` overflow in `constexpr`, evaluated object
      size based on `alloc_size`, `<<` and `>>` shift count validation, and
      OpenMP arra...
      3234887f
    • Davide Italiano's avatar
      Revert "[EditLineTest] Not always TERM is available, e.g. on some bots." · bdb864a5
      Davide Italiano authored
      This was a speculative fix trying to placate some bots, but it's
      ultimately just a bot configuration problem and not a code problem.
      
      llvm-svn: 359011
      bdb864a5
    • Adrian Prantl's avatar
      [dsymutil] Put Swift interface files into a per-arch subdirectory. · 2351d610
      Adrian Prantl authored
      This was meant to be part of the original commit r358921, but somehow
      got lost.
      
      <rdar://problem/49751748>
      
      llvm-svn: 359010
      2351d610
    • Nico Weber's avatar
      MS ABI: Support mangling op<=> now that MSVC 2019 has a mangling · 27df4092
      Nico Weber authored
      llvm-svn: 359009
      27df4092
    • Sanjay Patel's avatar
      [x86] fix test checks for fdiv combine; NFC · 7c0bd5a2
      Sanjay Patel authored
      Must have picked up some transient code changes when originally generating this.
      
      llvm-svn: 359008
      7c0bd5a2
    • Nico Weber's avatar
      llvm-undname: Support demangling the spaceship operator · e8f21b1a
      Nico Weber authored
      Also add a test for demanling the co_await operator.
      
      llvm-svn: 359007
      e8f21b1a
    • Sanjay Patel's avatar
      [x86] add tests for vector fdiv with splat divisor; NFC · 171b74e3
      Sanjay Patel authored
      llvm-svn: 359006
      171b74e3
    • Jonas Devlieghere's avatar
      [Docs] Add missing leading slash · 3ba5f661
      Jonas Devlieghere authored
      llvm-svn: 359005
      3ba5f661
  2. Apr 23, 2019