Skip to content
  1. Feb 11, 2019
    • Jonathan Peyton's avatar
      [OpenMP] Remove accidental commit to config-ix.cmake in r353747 · 2f744592
      Jonathan Peyton authored
      llvm-svn: 353748
      2f744592
    • Jonathan Peyton's avatar
      [OpenMP] Fix thread_limits to work properly for teams construct · 65ebfeec
      Jonathan Peyton authored
      The thread-limit-var and omp_get_thread_limit API was not perfectly handled for
      teams construct. Now, when modified by thread_limit clause, omp_get_thread_limit
      reports the correct value. In addition, the value is restored when leaving the
      teams construct to what it was in the encountering context.
      
      This is done partly by creating the notion of a Contention Group root (CG root)
      that keeps track of the thread at the root of each separate CG, the
      thread-limit-var associated with the CG, and associated counter of active
      threads within the contention group.
      
      thread-limits are passed from master to worker threads via an entry in the ICV
      data structure. When a "contention group switch" occurs, a new CG root record is
      made and passed from master to worker. A thread could potentially have several
      CG root records if it encounters multiple nested teams constructs (but at the
      moment the spec doesn't allow for nested teams, so the most one could have
      currently is 2). The master of the teams masters gets the thread-limit clause
      value stored to its local ICV structure, and the other teams masters copy it
      from the master. The thread-limit is set from that ICV copy and restored to the
      ICV copy when entering and leaving the teams construct.
      
      This change also fixes a bug when the top-level teams construct team gets
      reused, and OMP_DYNAMIC was true, which can cause the expected size of this team
      to be smaller than what was actually allocated. The fix updates the size of the
      team after its threads were reserved.
      
      Patch by Terry Wilmarth
      
      Differential Revision: https://reviews.llvm.org/D56804
      
      llvm-svn: 353747
      65ebfeec
    • Daniel Sanders's avatar
      [globalisel] Correct string emitted by GISelChangeObserver::erasingInstr() · 24e0af69
      Daniel Sanders authored
      The API indicates that the MI is about to be erased rather than it has been erased.
      
      llvm-svn: 353746
      24e0af69
    • Craig Topper's avatar
      [X86] Correct the memory operand for the FLD emitted in FP_TO_INTHelper for 32-bit SSE targets. · 75eb0af8
      Craig Topper authored
      We were using DstTy, but that represents the integer type we are converting to which is i64 in this
      case. The FLD is part of an intermediate step to get from the SSE registers to the x87 registers.
      If the floating point type is f32, the memory operand should reflect a 4 byte access not an 8 byte
      access. The store we used to get from SSE to the stack is using the corect size.
      
      While there, consistenly use TheVT in place of Op.getOperand(0).getValueType() throughout the function.
      
      llvm-svn: 353745
      75eb0af8
    • Nico Weber's avatar
      Fix a few tests that were missing ':' on CHECK lines and weren't testing anything. · 346f1e97
      Nico Weber authored
      Found by `git grep '\/\/ CHECK-[^: ]* ' clang/test/ | grep -v RUN:`.
      
      Also tweak CodeGenCXX/arm-swiftcall.cpp to still pass now that it checks more.
      
      Differential Revision: https://reviews.llvm.org/D58061
      
      llvm-svn: 353744
      346f1e97
    • Matt Davis's avatar
      [llvm-cxxfilt] Split and demangle stdin input · 22c21934
      Matt Davis authored
      Summary:
      Originally, llvm-cxxfilt would treat a line as a single mangled item to be demangled.
      If a mangled name appears in the middle of that string, that name would not be demangled.
      
      GNU c++filt  splits and demangles every word  in a  string that is piped to it via stdin.
      Prior to this patch llvm-cxxfilt would never split strings  piped to it.
      This patch replicates the GNU behavior and splits strings that are piped to it via stdin.
      
      This fixes PR39990
      
      Reviewers: compnerd, jhenderson, davide
      
      Reviewed By: compnerd, jhenderson
      
      Subscribers: erik.pilkington, jhenderson, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D57350
      
      llvm-svn: 353743
      22c21934
    • Petr Hosek's avatar
      [CodeGen] Set construction vtable visibility after creating initializer · 7c895219
      Petr Hosek authored
      We must only set the construction vtable visibility after we create the
      vtable initializer, otherwise the global value will be treated as
      declaration rather than definition and the visibility won't be set.
      
      Differential Revision: https://reviews.llvm.org/D58010
      
      llvm-svn: 353742
      7c895219
    • Daniel Sanders's avatar
    • Tom Tan's avatar
      [COFF, ARM64] Remove definitions for _byteswap library functions · 42b2424e
      Tom Tan authored
      _byteswap_* functions are are implemented in below file as normal function
      from libucrt.lib and declared in stdlib.h. Define them in intrin.h triggers
      lld error "conflicting comdat type" and "duplicate symbols" which was just
      added to LLD (https://reviews.llvm.org/D57324).
      
      C:\Program Files (x86)\Windows Kits\10\Source\10.0.17763.0\ucrt\stdlib\byteswap.cpp
      
      Differential Revision: https://reviews.llvm.org/D57915
      
      llvm-svn: 353740
      42b2424e
    • Alina Sbirlea's avatar
      [MemorySSA] Remove verifyClobberSanity. · d77edc00
      Alina Sbirlea authored
      Summary:
      This verification may fail after certain transformations due to
      BasicAA's fragility. Added a small explanation and a testcase that
      triggers the assert in checkClobberSanity (before its removal).
      Addresses PR40509.
      
      Reviewers: george.burgess.iv
      
      Subscribers: sanjoy, jlebar, llvm-commits, Prazek
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D57973
      
      llvm-svn: 353739
      d77edc00
    • Michael Kruse's avatar
      Refactor setAlreadyUnrolled() and setAlreadyVectorized(). · 77a614a6
      Michael Kruse authored
      Loop::setAlreadyUnrolled() and
      LoopVectorizeHints::setLoopAlreadyUnrolled() both add loop metadata that
      stops the same loop from being transformed multiple times. This patch
      merges both implementations.
      
      In doing so we fix 3 potential issues:
      
       * setLoopAlreadyUnrolled() kept the llvm.loop.vectorize/interleave.*
         metadata even though it will not be used anymore. This already caused
         problems such as http://llvm.org/PR40546. Change the behavior to the
         one of setAlreadyUnrolled which deletes this loop metadata.
      
       * setAlreadyUnrolled() used to create a new LoopID by calling
         MDNode::get with nullptr as the first operand, then replacing it by
         the returned references using replaceOperandWith. It is possible
         that MDNode::get would instead return an existing node (due to
         de-duplication) that then gets modified. To avoid, use a fresh
         TempMDNode that does not get uniqued with anything else before
         replacing it with replaceOperandWith.
      
       * LoopVectorizeHints::matchesHintMetadataName() only compares the
         suffix of the attribute to set the new value for. That is, when
         called with "enable", would erase attributes such as
         "llvm.loop.unroll.enable", "llvm.loop.vectorize.enable" and
         "llvm.loop.distribute.enable" instead of the one to replace.
         Fortunately, function was only called with "isvectorized".
      
      Differential Revision: https://reviews.llvm.org/D57566
      
      llvm-svn: 353738
      77a614a6
    • Julian Lettner's avatar
      [NFC] Re-enable XFAILed fuzzer test on iOS · 6142bf2c
      Julian Lettner authored
      llvm-svn: 353737
      6142bf2c
    • Sanjay Patel's avatar
      [InstCombine] Fix matchRotate bug when one operand is a ConstantExpr shift · 587fd849
      Sanjay Patel authored
      This bug seems to be harmless in release builds, but will cause an error in UBSAN
      builds or an assertion failure in debug builds.
      
      When it gets to this opcode comparison, it assumes both of the operands are BinaryOperators,
      but the prior m_LogicalShift will also match a ConstantExpr. The cast<BinaryOperator> will
      assert in a debug build, or reading an invalid value for BinaryOp from memory with
      ((BinaryOperator*)constantExpr)->getOpcode() will cause an error in a UBSAN build.
      
      The test I added will fail without this change in debug/UBSAN builds, but not in release.
      
      Patch by: @AndrewScheidecker (Andrew Scheidecker)
      
      Differential Revision: https://reviews.llvm.org/D58049
      
      llvm-svn: 353736
      587fd849
    • Bjorn Pettersson's avatar
      [SelectionDAGBuilder] Add restrictions to EmitFuncArgumentDbgValue · 4892f06e
      Bjorn Pettersson authored
      Summary:
      This patch fixes PR40587.
      
      When a dbg.value instrinsic is emitted to the DAG
      by using EmitFuncArgumentDbgValue the resulting
      DBG_VALUE is hoisted to the beginning of the entry
      block. I think the idea is to be able to locate
      a formal argument already from the start of the
      function.
      However, EmitFuncArgumentDbgValue only checked that
      the value that was used to describe a variable was
      originating from a function parameter, not that the
      variable itself actually was an argument to the
      function. So when for example assigning a local
      variable "local" the value from an argument "a",
      the assocated DBG_VALUE instruction would be hoisted
      to the beginning of the function, even if the scope
      for "local" started somewhere else (or if "local"
      was mapped to other values earlier in the function).
      
      This patch adds some logic to EmitFuncArgumentDbgValue
      to check that the variable being described actually
      is an argument to the function. And that the dbg.value
      being lowered already is in the entry block. Otherwise
      we bail out, and the dbg.value will be handled as an
      ordinary dbg.value (not as a "FuncArgumentDbgValue").
      
      A tricky situation is when both the variable and
      the value is related to function arguments, but not
      neccessarily the same argument. We make sure that we
      do not describe the same argument more than once as
      a "FuncArgumentDbgValue". This solution works as long
      as opt has injected a "first" dbg.value that corresponds
      to the formal argument at the function entry.
      
      Reviewers: jmorse, aprantl
      
      Subscribers: jyknight, hiraditya, fedor.sergeev, dstenb, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D57702
      
      llvm-svn: 353735
      4892f06e
    • Alina Sbirlea's avatar
      [LICM&MSSA] Limit store hoisting. · 605b2173
      Alina Sbirlea authored
      Summary:
      If there is no clobbering access for a store inside the loop, that store
      can only be hoisted if there are no interfearing loads.
      A more general verification introduced here: there are no loads that are
      not optimized to an access outside the loop.
      Addresses PR40586.
      
      Reviewers: george.burgess.iv
      
      Subscribers: sanjoy, jlebar, Prazek, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D57967
      
      llvm-svn: 353734
      605b2173
    • Evandro Menezes's avatar
      [TargetLibraryInfo] Update run time support for Windows · 4b86c474
      Evandro Menezes authored
      It seems that the run time for Windows has changed and supports more math
      functions than it used to, especially on AArch64, ARM, and AMD64.
      
      Fixes PR40541.
      
      Differential revision: https://reviews.llvm.org/D57625
      
      llvm-svn: 353733
      4b86c474
    • Jessica Paquette's avatar
      [AArch64][GlobalISel] Add isel support for a couple vector exts/truncs · e57fe23f
      Jessica Paquette authored
      Add support for
      
      - v4s16 <-> v4s32
      - v2s64 <-> v2s32
      
      And update tests that use them to show that we generate the correct
      instructions.
      
      Differential Revision: https://reviews.llvm.org/D57832
      
      llvm-svn: 353732
      e57fe23f
    • Jessica Paquette's avatar
      [GlobalISel][AArch64] NFC: Remove unnecessary IR from select-fp-casts.mir · 828de9fc
      Jessica Paquette authored
      The IR section in this test doesn't do anything, so there's no point in it
      being there. Since it's redundant, just remove it.
      
      llvm-svn: 353731
      828de9fc
    • Jordan Rupprecht's avatar
      [DebugInfo] Fix /usr/lib/debug llvm-symbolizer lookup with relative paths · 5b7ad427
      Jordan Rupprecht authored
      Summary:
      rL189250 added a realpath call, and rL352916 because realpath breaks assumptions with some build systems. However, the /usr/lib/debug case has been clarified, falling back to /usr/lib/debug is currently broken if the obj passed in is a relative path. Adding a call to use absolute paths when falling back to /usr/lib/debug fixes that while still not making any realpath assumptions.
      
      This also adds a --fallback-debug-path command line flag for testing (since we probably can't write to /usr/lib/debug from buildbot environments), but was also verified manually:
      
      ```
      $ rm -f path/to/dwarfdump-test.elf-x86-64
      $ strace llvm-symbolizer --obj=relative/path/to/dwarfdump-test.elf-x86-64.debuglink 0x40113f |& grep dwarfdump
      ```
      
      Lookups went to relative/path/to/dwarfdump-test.elf-x86-64, relative/path/to/.debug/dwarfdump-test.elf-x86-64, and then finally /usr/lib/debug/absolute/path/to/dwarfdump-test.elf-x86-64.
      
      Reviewers: dblaikie, samsonov
      
      Reviewed By: dblaikie
      
      Subscribers: krytarowski, aprantl, hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D57916
      
      llvm-svn: 353730
      5b7ad427
    • Nico Weber's avatar
      Attempt to pacify bots more after r353718 and r353725 · 2e12dce4
      Nico Weber authored
      llvm-svn: 353729
      2e12dce4
    • Andrea Di Biagio's avatar
      [MCA][Scheduler] Track resources that were found busy when issuing an instruction. · 23ff2aa4
      Andrea Di Biagio authored
      This is a follow up of r353706. When the scheduler fails to issue a ready
      instruction to the underlying pipelines, it now updates a mask of 'busy resource
      units'. That information will be used in future to obtain the set of
      "problematic" resources in the case of bottlenecks caused by resource pressure.
      No functional change intended.
      
      llvm-svn: 353728
      23ff2aa4
    • Louis Dionne's avatar
      [NFC] Fix typo in PSTL test · 41cc52d5
      Louis Dionne authored
      Reviewed as https://reviews.llvm.org/D57887.
      Thanks to jwakely for the patch.
      
      llvm-svn: 353727
      41cc52d5
    • Nico Weber's avatar
      Attempt to pacify bots after r353718 · d7cc3b39
      Nico Weber authored
      llvm-svn: 353725
      d7cc3b39
    • Roland Froese's avatar
      [PowerPC] Avoid scalarization of vector truncate · 732fe224
      Roland Froese authored
      The PowerPC code generator currently scalarizes vector truncates that would fit in a vector register, resulting in vector extracts, scalar operations, and vector merges. This patch custom lowers a vector truncate that would fit in a register to a vector shuffle instead.
      
      Differential Revision: https://reviews.llvm.org/D56507
      
      llvm-svn: 353724
      732fe224
    • Jessica Paquette's avatar
      [GlobalISel][AArch64] Select G_FFLOOR · ebdb0210
      Jessica Paquette authored
      This teaches the legalizer about G_FFLOOR, and lets us select G_FFLOOR in
      AArch64.
      
      It updates the existing floating point tests, and adds a select-floor.mir test.
      
      Differential Revision: https://reviews.llvm.org/D57486
      
      llvm-svn: 353722
      ebdb0210
    • Jonas Devlieghere's avatar
      Update SymbolVendorMacOSX for new GetUUID interface · cc2a1678
      Jonas Devlieghere authored
      The interface changed in r353714.
      
      llvm-svn: 353721
      cc2a1678
    • Jessica Paquette's avatar
      Recommit "[GlobalISel] Add IRTranslator support for G_FFLOOR" · f472f318
      Jessica Paquette authored
      After the changes introduced in r353586, this instruction doesn't cause any
      issues for any backend.
      
      Original review: https://reviews.llvm.org/D57485
      
      llvm-svn: 353720
      f472f318
    • Matt Arsenault's avatar
      GlobalISel: Add G_FCANONICALIZE instruction · 9dba67f4
      Matt Arsenault authored
      llvm-svn: 353719
      9dba67f4
    • Nico Weber's avatar
      Make test actually test something (colons were missing) · 9bbb721e
      Nico Weber authored
      llvm-svn: 353718
      9bbb721e
    • Valery Pykhtin's avatar
      [AMDGPU] fix atomic_optimizations_buffer.ll test after DPP combiner was enabled by default. · e1c338e5
      Valery Pykhtin authored
      Related commits: rL353691, rL353703.
      
      llvm-svn: 353717
      e1c338e5
    • Simon Pilgrim's avatar
      [X86] Regenerate insertelement tests · 9ea8f49a
      Simon Pilgrim authored
      Add common X86/X64 prefixes (and use X86 instead of X32)
      
      llvm-svn: 353716
      9ea8f49a
    • Jonas Hahnfeld's avatar
      [OMPT] Remove test output from source tree · f26d3e71
      Jonas Hahnfeld authored
      %s refers to the test file in the source tree. This was accidentally added in
      r351197 / 2b46d30f ("[OMPT] Second chunk of final OMPT 5.0 interface updates").
      
      Differential Revision: https://reviews.llvm.org/D58002
      
      llvm-svn: 353715
      f26d3e71
    • Pavel Labath's avatar
      Simplify ObjectFile::GetUUID · bd334efd
      Pavel Labath authored
      instead of returning the UUID through by-ref argument and a boolean
      value indicating success, we can just return it directly. Since the UUID
      class already has an invalid state, it can be used to denote the failure
      without the additional bool.
      
      llvm-svn: 353714
      bd334efd
    • David Greene's avatar
      Add recipes for migrating downstream branches of git mirrors · 5caa5506
      David Greene authored
      Add some common recipes for downstream users developing on top of the
      existing git mirrors. These instructions show how to migrate local
      branches to the monorepo.
      
      Differential Revision: https://reviews.llvm.org/D56550
      
      llvm-svn: 353713
      5caa5506
    • Haojian Wu's avatar
      Revamp the "[clangd] Format tweak's replacements" · e64ee7c6
      Haojian Wu authored
      Summary:
      This patch contains two parts:
      
      1) reverts commit r353306.
      2) move the format logic out from tweaks, keep tweaks API unchanged.
      
      Reviewers: sammccall, ilya-biryukov
      
      Reviewed By: ilya-biryukov
      
      Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D58051
      
      llvm-svn: 353712
      e64ee7c6
    • Alexander Kornienko's avatar
      Fixed header underline in docs. · 9a857d20
      Alexander Kornienko authored
      + Removed trailing whitespace.
      
      llvm-svn: 353711
      9a857d20
    • Benjamin Kramer's avatar
      Move some classes into anonymous namespaces. NFC. · 711950c1
      Benjamin Kramer authored
      llvm-svn: 353710
      711950c1
    • Aleksandr Urakov's avatar
      [build.py] Add `-fms-compatibility-version=19` to `build.py` · eac19858
      Aleksandr Urakov authored
      Summary:
      `clang-cl` can't compile tests containing `char16_t` and `char32_t` types
      without the MSVC compatibility option passed. This patch adds the option to the
      `clang-cl` call in the `build.py` script by default.
      
      Reviewers: zturner, labath, stella.stamenova, serge-sans-paille
      
      Reviewed By: labath
      
      Subscribers: lldb-commits, leonid.mashinskiy
      
      Tags: #lldb
      
      Differential Revision: https://reviews.llvm.org/D57809
      
      llvm-svn: 353709
      eac19858
    • Eric Liu's avatar
      [clangd] Prefer location from codegen files when merging symbols. · d11fbf52
      Eric Liu authored
      Summary:
      For example, if an index symbol has location in a .proto file and an AST symbol
      has location in a generated .proto.h file, then we prefer location in .proto
      which is more meaningful to users.
      
      Also use `mergeSymbols` to get the preferred location between AST location and index location in go-to-def.
      
      Reviewers: sammccall
      
      Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D58037
      
      llvm-svn: 353708
      d11fbf52
    • Serge Guelton's avatar
      [tools] Fix python DeprecationWarning: invalid escape sequence · 3331b6ea
      Serge Guelton authored
      The python documentation says "it’s highly recommended that you use raw strings for all but the simplest expressions." (https://docs.python.org/3/library/re.html)
      
      So do that with the attached patch generated by
      
          sed -i -e "s/re.search('/re.search(r'/g" $(git grep -l 're.search(')
      
      The warning can be seen in e.g. python3.7:
      
          $ python3.7 -Wd
          >>> import re; re.search('\s', '')
          <stdin>:1: DeprecationWarning: invalid escape sequence \s
      
      Commited on behalf of Marco Falke.
      Differential Revision: https://reviews.llvm.org/D57528
      
      llvm-svn: 353707
      3331b6ea
Loading