Skip to content
  1. Sep 27, 2017
    • Francis Ricci's avatar
      Revert "Add support for custom loaders to symbolizer" · cb15e22b
      Francis Ricci authored
      This broke the windows buildbots, revert for now.
      
      This reverts commit 24050b5ddef42f6f3306aa94d4a1f42a7893a9a7.
      
      llvm-svn: 314347
      cb15e22b
    • Don Hinton's avatar
      Cleanup some problems with LLVM_ENABLE_DUMP in release builds, and · 53eb6371
      Don Hinton authored
      always set LLVM_ENABLE_DUMP=ON for +Asserts builds.
      
      Differential Revision: https://reviews.llvm.org/D38306
      
      llvm-svn: 314346
      53eb6371
    • Rui Ueyama's avatar
      Do not remove a target file in FileOutputBuffer::create(). · 23fa4de2
      Rui Ueyama authored
      FileOutputBuffer::create() attempts to remove a target file if the file
      is a regular one, which results in an unexpected result in a failure
      scenario.
      
      If something goes wrong and the user of FileOutputBuffer decides to not
      call commit(), it leaves nothing. An existing file is removed, and no
      new file is created.
      
      What we should do is to atomically replace an existing file with a new
      file using rename(), so that it wouldn't remove an existing file without
      creating a new one.
      
      Differential Revision: https://reviews.llvm.org/D38283
      
      llvm-svn: 314345
      23fa4de2
    • Kostya Kortchinsky's avatar
      [scudo] Temporary disabling the valloc test on armhf · fa1ae3e8
      Kostya Kortchinsky authored
      Summary:
      Weird failure where `errno != ENOMEM` on valloc failure. The returned pointer
      is null since it passes the previous assert, so this shouldn't happen.
      
      http://lab.llvm.org:8011/builders/clang-cmake-armv7-a15-full/builds/10931
      http://lab.llvm.org:8011/builders/clang-cmake-thumbv7-a15-full-sh/builds/2469
      
      Disabling until we figure out what's going on.
      
      Reviewers: alekseyshl
      
      Reviewed By: alekseyshl
      
      Subscribers: aemerson, srhines, llvm-commits, kristof.beyls
      
      Differential Revision: https://reviews.llvm.org/D38324
      
      llvm-svn: 314344
      fa1ae3e8
    • Jason Molenda's avatar
      Update the Objective-C runtime interface code to handle objc objects · 300fd453
      Jason Molenda authored
      whose isa is an index instead of a pointer.  Currently, this type
      of isa encoding is only used on watchos.
      <rdar://problem/34675497> 
      
      llvm-svn: 314343
      300fd453
    • Francis Ricci's avatar
      Add support for custom loaders to symbolizer · f80c42e5
      Francis Ricci authored
      Change-Id: I5594bd6b216deca2c73cf0a7001f9aec1e803c60
      llvm-svn: 314342
      f80c42e5
    • Jessica Paquette's avatar
      [MachineOutliner] AArch64: Avoid saving + restoring LR if possible · 4cf187b5
      Jessica Paquette authored
      This commit allows the outliner to avoid saving and restoring the link register
      on AArch64 when it is dead within an entire class of candidates.
      
      This introduces changes to the way the outliner interfaces with the target.
      For example, the target now interfaces with the outliner using a
      MachineOutlinerInfo struct rather than by using getOutliningCallOverhead and
      getOutliningFrameOverhead.
      
      This also improves several comments on the outliner's cost model.
      
      https://reviews.llvm.org/D36721
      
      llvm-svn: 314341
      4cf187b5
    • Jonathan Peyton's avatar
      Remove unnecessary semicolons · bd3a7633
      Jonathan Peyton authored
      Removes semicolons after if {} blocks, function definitions, etc.
      I was able to apply the large OMPT patch cleanly on top of this one
      with no conflicts.
      
      llvm-svn: 314340
      bd3a7633
    • Craig Topper's avatar
      Revert r314249 "Recommit r314151 "[X86] Make all the NOREX CodeGenOnly... · c16a4729
      Craig Topper authored
      Revert r314249 "Recommit r314151 "[X86] Make all the NOREX CodeGenOnly instructions into postRA pseudos like the NOREX version of TEST."""
      
      This caused PR34751
      
      llvm-svn: 314339
      c16a4729
    • Craig Topper's avatar
      Revert r314248 "[X86] Don't emit X86::MOV8rr_NOREX from X86InstrInfo::copyPhysReg." · e0d82900
      Craig Topper authored
      This contributed to PR34751
      
      llvm-svn: 314338
      e0d82900
    • Simon Pilgrim's avatar
      [X86][SSE] Pull out variable shuffle mask combine logic. NFCI. · 870007b4
      Simon Pilgrim authored
      Hopefully this will make it easier to vary the combine depth threshold per-target.
      
      llvm-svn: 314337
      870007b4
    • Sean Callanan's avatar
      Add support for remembering origins to ExternalASTMerger · 967d4384
      Sean Callanan authored
      ExternalASTMerger has hitherto relied on being able to look up 
      any Decl through its named DeclContext chain. This works for 
      many cases, but causes problems for function-local structs, 
      which cannot be looked up in their containing FunctionDecl. An
      example case is
      
      void f() {
        { struct S { int a; }; }
        { struct S { bool b; }; }
      }
      
      It is not possible to lookup either of the two Ses individually 
      (or even to provide enough information to disambiguate) after 
      parsing is over; and there is typically no need to, since they 
      are invisible to the outside world.
      
      However, ExternalASTMerger needs to be able to complete either 
      S on demand. This led to an XFAIL on test/Import/local-struct, 
      which this patch removes. The way the patch works is:
      
      It defines a new data structure, ExternalASTMerger::OriginMap,
      which clients are expected to maintain (default-constructing 
      if the origin does not have an ExternalASTMerger servicing it)
      As DeclContexts are imported, if they cannot be looked up by 
      name they are placed in the OriginMap. This allows 
      ExternalASTMerger to complete them later if necessary.
      As DeclContexts are imported from an origin that already has 
      its own OriginMap, the origins are forwarded – but only for 
      those DeclContexts that are actually used. This keeps the 
      amount of stored data minimal.
      
      The patch also applies several improvements from review:
      
      - Thoroughly documents the interface to ExternalASTMerger;
      - Adds optional logging to help track what's going on; and
      - Cleans up a bunch of braces and dangling elses.
      
      Differential Revision: https://reviews.llvm.org/D38208
      
      llvm-svn: 314336
      967d4384
    • Than McIntosh's avatar
      [CodeGen] Emit necessary .note sections for -fsplit-stack · dee2cf67
      Than McIntosh authored
      Summary:
      According to https://gcc.gnu.org/wiki/SplitStacks, the linker expects a zero-sized .note.GNU-split-stack section if split-stack is used (and also .note.GNU-no-split-stack section if it also contains non-split-stack functions), so it can handle the cases where a split-stack function calls non-split-stack function.
      
      This change adds the sections if needed.
      
      Fixes PR #34670.
      
      Reviewers: thanm, rnk, luqmana
      
      Reviewed By: rnk
      
      Subscribers: llvm-commits
      
      Patch by Cherry Zhang <cherryyz@google.com>
      
      Differential Revision: https://reviews.llvm.org/D38051
      
      llvm-svn: 314335
      dee2cf67
    • Artem Belevich's avatar
      [CUDA] Work around conflicting function definitions in CUDA-9 headers. · 93e33f8f
      Artem Belevich authored
      Differential Revision: https://reviews.llvm.org/D38326
      
      llvm-svn: 314334
      93e33f8f
    • Manoj Gupta's avatar
      [builtins] ARM: Revert r314284, r314285 and r314289 · bfa662ae
      Manoj Gupta authored
      Revert r314284, r314285 and r314289 because of a reported
      breakage in armv7k watchos builder.
      
      llvm-svn: 314333
      bfa662ae
    • Craig Topper's avatar
      [X86] Rewrite the zero vector checks in lowerV2X128VectorShuffle to use the Zeroable APInt · 7b1d503d
      Craig Topper authored
      We already have zeroable bits in an APInt. We might as well use that instead of checking for an all zero BUILD_VECTOR.
      
      Differential Revision: https://reviews.llvm.org/D37950
      
      llvm-svn: 314332
      7b1d503d
    • Craig Topper's avatar
      [X86] In combineLoopSADPattern, pad result with zeros and use full size add... · 05f71dd0
      Craig Topper authored
      [X86] In combineLoopSADPattern, pad result with zeros and use full size add instead of using a smaller add and inserting.
      
      In some cases the result psadbw is smaller than the type of the add that started the match. Currently in these cases we are using a smaller add and inserting the result.
      
      If we instead combine the psadbw with zeros and use the full size add we can take advantage of implicit zeroing we get if we emit a narrower move before the add.
      
      In a future patch, I want to make isel aware that the psadbw itself already zeroed the upper bits and remove the move entirely.
      
      Differential Revision: https://reviews.llvm.org/D37453
      
      llvm-svn: 314331
      05f71dd0
    • Jonas Hahnfeld's avatar
      [OpenMP] Fix translation of target args · 102c333d
      Jonas Hahnfeld authored
      ToolChain::TranslateArgs() returns nullptr if no changes are performed.
      This would currently mean that OpenMPArgs are lost. Patch fixes this
      by falling back to simply using OpenMPArgs in that case.
      
      Differential Revision: https://reviews.llvm.org/D38259
      
      llvm-svn: 314330
      102c333d
    • Jonas Hahnfeld's avatar
      [OpenMP] Fix passing of -m arguments to device toolchain · 757e61fa
      Jonas Hahnfeld authored
      AuxTriple is not set if host and device share a toolchain. Also,
      removing an argument modifies the DAL which needs to be returned
      for future use.
      (Move tests back to offload-openmp.c as they are not related to GPUs.)
      
      Differential Revision: https://reviews.llvm.org/D38258
      
      llvm-svn: 314329
      757e61fa
    • Jonas Hahnfeld's avatar
      [OpenMP] Fix memory leak when translating arguments · 85f19958
      Jonas Hahnfeld authored
      Parsing the argument after -Xopenmp-target allocates memory that needs
      to be freed. Associate it with the final DerivedArgList after we know
      which one will be used.
      
      Differential Revision: https://reviews.llvm.org/D38257
      
      llvm-svn: 314328
      85f19958
    • Nico Weber's avatar
      clang-format/java: Unbreak genenrics formatting after r299952. · b9b18675
      Nico Weber authored
      https://reviews.llvm.org/rL299952 merged '>>>' tokens into a single
      JavaRightLogicalShift token. This broke formatting of generics nested more than
      two deep, e.g. Foo<Bar<Baz>>> because the '>>>' now weren't three '>' for
      parseAngle().
      
      Luckily, just deleting JavaRightLogicalShift fixes things without breaking the
      test added in r299952, so do that.
      
      https://reviews.llvm.org/D38291
      
      llvm-svn: 314325
      b9b18675
    • Alexey Bataev's avatar
      [SLP] Fix crash on propagate IR flags for undef operands of min/max · 022cc6c4
      Alexey Bataev authored
      reductions.
      
      If both operands of the newly created SelectInst are Undefs the
      resulting operation is also Undef, not SelectInst. It may cause crashes
      when trying to propagate IR flags because function expects exactly
      SelectInst instruction, nothing else.
      
      llvm-svn: 314323
      022cc6c4
    • Manoj Gupta's avatar
      [ARM] builtins: Replace abort by assert in clear_cache. · a2eacb3b
      Manoj Gupta authored
      Summary:
      __builtion___clear_cache maps to clear_cache function. On Linux,
      clear_cache functions makes a syscall and does an abort if syscall fails.
      Replace the abort by an assert so that non-debug builds do not abort
      if the syscall fails.
      
      Fixes PR34588.
      
      Reviewers: rengolin, compnerd, srhines, peter.smith, joerg
      
      Reviewed By: rengolin
      
      Subscribers: aemerson, kristof.beyls, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D37788
      
      llvm-svn: 314322
      a2eacb3b
    • Roman Lebedev's avatar
      [support] mapped_file_region: and fix the windows code too · 1e053ab0
      Roman Lebedev authored
      Followup for r314312 / r314313
      Sorry, i really failed to fully grep all the codebase :/
      
      llvm-svn: 314321
      1e053ab0
    • Chad Rosier's avatar
      [InstCombine] Gating select arithmetic optimization. · d8b4b06f
      Chad Rosier authored
      These changes faciliate positive behavior for arithmetic based select
      expressions that match its translation criteria, keeping code size gated to
      neutral or improved scenarios.
      
      Patch by Michael Berg <michael_c_berg@apple.com>!
      
      Differential Revision: https://reviews.llvm.org/D38263
      
      llvm-svn: 314320
      d8b4b06f
    • Geoff Berry's avatar
      [AArch64][Falkor] Ignore SP based loads in HW prefetch fixups. · c032b2be
      Geoff Berry authored
      Reviewers: mcrosier
      
      Subscribers: aemerson, rengolin, javed.absar, kristof.beyls
      
      Differential Revision: https://reviews.llvm.org/D38301
      
      llvm-svn: 314319
      c032b2be
    • Alex Shlyapnikov's avatar
      [Sanitizer] Disable compact size class tests on Android · fb238e59
      Alex Shlyapnikov authored
      Fixing test failure on Android introduced in D38245. Compact size class
      maps defined there are not to be used on Android.
      
      llvm-svn: 314318
      fb238e59
    • Anastasia Stulova's avatar
      [OpenCL] Fixed CL version in failing test. · 89a947da
      Anastasia Stulova authored
      llvm-svn: 314317
      89a947da
    • Javed Absar's avatar
      [Misched] : Fix typo in comment. NFC. · 6c5605e7
      Javed Absar authored
      llvm-svn: 314316
      6c5605e7
    • Sanjay Patel's avatar
      [SLP] fix typos/formatting; NFC · fee80d5e
      Sanjay Patel authored
      llvm-svn: 314315
      fee80d5e
    • Sean Eveson's avatar
      Revert "[llvm-cov] Create directory structure when filtering using -name*= options" · 1439fa62
      Sean Eveson authored
      Test failures.
      
      llvm-svn: 314314
      1439fa62
    • Roman Lebedev's avatar
      [Support] mapped_file_region::size() returns size_t · 21b013eb
      Roman Lebedev authored
      Fixup last commit, found by clang-stage1-cmake-RA-incremental bot.
      
      llvm-svn: 314313
      21b013eb
    • Roman Lebedev's avatar
      [Support] mapped_file_region: store size as size_t · 7c983671
      Roman Lebedev authored
      Summary:
      Found when testing stage-2 build with D38101.
      
      ```
      In file included from /build/llvm/lib/Support/Path.cpp:1045:
      /build/llvm/lib/Support/Unix/Path.inc:648:14: error: comparison 'uint64_t' (aka 'unsigned long') > 18446744073709551615 is always false [-Werror,-Wtautological-constant-compare]
        if (length > std::numeric_limits<size_t>::max()) {
            ~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      ```
      
      `size_t` is `uint64_t` here, apparently, thus any `uint64_t` value
      always fits into `size_t`.
      
      Initial patch was to use some preprocessor logic to
      not check if the size is known to fit at compile time.
      But Zachary Turner suggested using this approach.
      
      Reviewers: Bigcheese, rafael, zturner, mehdi_amini
      
      Reviewed by (via email): zturner
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D38132
      
      llvm-svn: 314312
      7c983671
    • Alex Shlyapnikov's avatar
      [Sanitizers] Allocator: new "release memory to OS" implementation · 04ce5ac3
      Alex Shlyapnikov authored
      Summary:
      The current implementation of the allocator returning freed memory
      back to OS (controlled by allocator_release_to_os_interval_ms flag)
      requires sorting of the free chunks list, which has two major issues,
      first, when free list grows to millions of chunks, sorting, even the
      fastest one, is just too slow, and second, sorting chunks in place
      is unacceptable for Scudo allocator as it makes allocations more
      predictable and less secure.
      
      The proposed approach is linear in complexity (altough requires quite
      a bit more temporary memory). The idea is to count the number of free
      chunks on each memory page and release pages containing free chunks
      only. It requires one iteration over the free list of chunks and one
      iteration over the array of page counters. The obvious disadvantage
      is the allocation of the array of the counters, but even in the worst
      case we support (4T allocator space, 64 buckets, 16 bytes bucket size,
      full free list, which leads to 2 bytes per page counter and ~17M page
      counters), requires just about 34Mb of the intermediate buffer (comparing
      to ~64Gb of actually allocated chunks) and usually it stays under 100K
      and released after each use. It is expected to be a relatively rare event,
      releasing memory back to OS, keeping the buffer between those runs
      and added complexity of the bookkeeping seems unnesessary here (it can
      always be improved later, though, never say never).
      
      The most interesting problem here is how to calculate the number of chunks
      falling into each memory page in the bucket. Skipping all the details,
      there are three cases when the number of chunks per page is constant:
        1) P >= C, P % C == 0 --> N = P / C
        2) C > P , C % P == 0 --> N = 1
        3) C <= P, P % C != 0 && C % (P % C) == 0 --> N = P / C + 1
      where P is page size, C is chunk size and N is the number of chunks per
      page and the rest of the cases, where the number of chunks per page is
      calculated on the go, during the page counter array iteration.
      
      Among the rest, there are still cases where N can be deduced from the
      page index, but they require not that much less calculations per page
      than the current "brute force" way and 2/3 of the buckets fall into
      the first three categories anyway, so, for the sake of simplicity,
      it was decided to stick to those two variations. It can always be
      refined and improved later, should we see that brute force way slows
      us down unacceptably.
      
      Reviewers: eugenis, cryptoad, dvyukov
      
      Subscribers: kubamracek, mehdi_amini, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D38245
      
      llvm-svn: 314311
      04ce5ac3
    • Sean Eveson's avatar
      [llvm-cov] Create directory structure when filtering using -name*= options · 51b81747
      Sean Eveson authored
      Before this change using any of the -name*= command line options with an output
      directory would result in a single file (functions.txt/functions.html)
      containing the coverage for those specific functions. Now you get the same
      directory structure as when not using any -name*= options.
      
      Differential Revision: https://reviews.llvm.org/D38280
      
      llvm-svn: 314310
      51b81747
    • Marc-Andre Laperle's avatar
      [clangd] Handle InitializeParams and store rootUri · 37de9718
      Marc-Andre Laperle authored
      Summary:
      The root Uri is the workspace location and will be useful in the context of
      indexing. We could also add more things to InitializeParams in order to
      configure Clangd for C/C++ sepecific extensions.
      
      Reviewers: ilya-biryukov, bkramer, krasimir, Nebiroth
      
      Reviewed By: ilya-biryukov
      
      Subscribers: ilya-biryukov
      
      Tags: #clang-tools-extra
      
      Differential Revision: https://reviews.llvm.org/D38093
      
      llvm-svn: 314309
      37de9718
    • Sanjay Patel's avatar
      [SimplifyCFG] add a struct to house optional folds (PR34603) · 0f9b4773
      Sanjay Patel authored
      This was intended to be no-functional-change, but it's not - there's a test diff.
      
      So I thought I should stop here and post it as-is to see if this looks like what was expected 
      based on the discussion in PR34603:
      https://bugs.llvm.org/show_bug.cgi?id=34603
      
      Notes:
       1. The test improvement occurs because the existing 'LateSimplifyCFG' marker is not carried 
          through the recursive calls to 'SimplifyCFG()->SimplifyCFGOpt().run()->SimplifyCFG()'. 
          The parameter isn't passed down, so we pick up the default value from the function signature 
          after the first level. I assumed that was a bug, so I've passed 'Options' down in all of the 
          'SimplifyCFG' calls.
      
       2. I split 'LateSimplifyCFG' into 2 bits: ConvertSwitchToLookupTable and KeepCanonicalLoops. 
          This would theoretically allow us to differentiate the transforms controlled by those params 
          independently.
      
       3. We could stash the optional AssumptionCache pointer and 'LoopHeaders' pointer in the struct too. 
          I just stopped here to minimize the diffs.
      
       4. Similarly, I stopped short of messing with the pass manager layer. I have another question that 
          could wait for the follow-up: why is the new pass manager creating the pass with LateSimplifyCFG 
          set to true no matter where in the pipeline it's creating SimplifyCFG passes?
      
          // Create an early function pass manager to cleanup the output of the
          // frontend.
          EarlyFPM.addPass(SimplifyCFGPass());
      
          -->
      
          /// \brief Construct a pass with the default thresholds
          /// and switch optimizations.
          SimplifyCFGPass::SimplifyCFGPass()
             : BonusInstThreshold(UserBonusInstThreshold),
               LateSimplifyCFG(true) {}   <-- switches get converted to lookup tables and loops may not be in canonical form
      
          If this is unintended, then it's possible that the current behavior of dropping the 'LateSimplifyCFG' 
          setting via recursion was masking this bug.
      
      Differential Revision: https://reviews.llvm.org/D38138
      
      llvm-svn: 314308
      0f9b4773
    • Haicheng Wu's avatar
      [InlineCost] add visitSelectInst() · 3ec848bc
      Haicheng Wu authored
      InlineCost can understand Select IR now.  This patch finds free Select IRs and
      continue the propagation of SimplifiedValues, ConstantOffsetPtrs, and
      SROAArgValues.
      
      Differential Revision: https://reviews.llvm.org/D37198
      
      llvm-svn: 314307
      3ec848bc
    • Gadi Haber's avatar
      [X86][SKX][KNL] Updated regression tests to use -mattr instead of -mcpu flag.NFC. · 87337a2b
      Gadi Haber authored
      NFC.
       Updated 8 regression tests to use -mattr instead of -mcpu flag as follows:
       -mcpu=knl --> -mattr=+avx512f
       -mcpu=skx --> -mattr=+avx512f,+avx512bw,+avx512vl,+avx512dq
      
      The updates are as part of the preparation of a large commit to add all instruction scheduling for the SKX target.
      
      Reviewers: delena, zvi, RKSimon
      Differential Revision: https://reviews.llvm.org/D38222
      
      Change-Id: I2381c9b5bb75ecacfca017243c22d054f6eddd14
      llvm-svn: 314306
      87337a2b
    • Zvi Rackover's avatar
      X86 Tests: Unsigned saturation subtraction tests. NFC. · eb7a0bf8
      Zvi Rackover authored
      Summary:
      Adding tests for D37534.
      
      Commit on behalf of julia.koval@intel.com
      
      Reviewers: n.bozhenov, zvi, spatel, DavidKreitzer
      
      Reviewed By: zvi
      
      Differential Revision: https://reviews.llvm.org/D37510
      
      llvm-svn: 314305
      eb7a0bf8
Loading