Skip to content
  1. Aug 02, 2017
    • Craig Topper's avatar
      80a1c26a
    • Marshall Clow's avatar
      Fix PR33727: std::basic_stringbuf only works with DefaultConstructible... · a054f828
      Marshall Clow authored
      Fix PR33727: std::basic_stringbuf only works with DefaultConstructible allocators. Thanks to Jonathan Wakely for the report and suggested fix
      
      llvm-svn: 309838
      a054f828
    • Keith Wyss's avatar
      Xray docs with description of Flight Data Recorder binary format. · 5a1dd7e9
      Keith Wyss authored
      Summary:
      Adding a new restructuredText file to document the trace format produced with
      an FDR mode handler and read by llvm-xray toolset.
      
      Reviewers: dberris, pelikan
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D36041
      
      llvm-svn: 309836
      5a1dd7e9
    • Philip Pfaffe's avatar
      Fix r309826: Move intantiation and specialization of... · 8f1872fb
      Philip Pfaffe authored
      Fix r309826: Move intantiation and specialization of OwningScopAnalysisManagerFunctionProxy to the polly namespace.
      
      When compiling with clang, explicit instantiation of the
      OwningScopAnalysisManagerFunctionProxy needs to happen within the polly
      namespace. Same goes with the specialization of its run method.
      
      llvm-svn: 309835
      8f1872fb
    • Adrian Prantl's avatar
      Assert that the offset of a DBG_VALUE is always 0. (NFC) · bd6d291c
      Adrian Prantl authored
      llvm-svn: 309834
      bd6d291c
    • Reid Kleckner's avatar
      Revert "[lit] Avoid copying llvm/utils/lit/tests/Inputs with lit site configs" · 7a2274aa
      Reid Kleckner authored
      This reverts r309602, check-lit still leaves Output directories in the
      source directory.
      
      llvm-svn: 309833
      7a2274aa
    • Matt Arsenault's avatar
      AMDGPU: Restore using MRI to find highest used regs · 2738ede6
      Matt Arsenault authored
      If there are no calls, this is a faster path than
      searching the entire program for calls.
      
      This was supposed to be left in r309781.
      Fixes unused variable warning.
      
      llvm-svn: 309832
      2738ede6
    • Adrian Prantl's avatar
      5577363a
    • Nirav Dave's avatar
      [DAG] Improve candidate pruning in store merge failure case. NFCI · e44032f7
      Nirav Dave authored
      During store merge we construct a sorted list of consecutive store
      candidates and consider subsequences for merging into a single
      store. For each subsequence we check if the stored value type is legal
      the merged store would have valid and fast and if the constructed
      value to be stored is valid. The only properties that affect this
      check between subsequences is the size of the subsequence, the
      alignment of the first store, the alignment of the stored load value
      (when merging stores-of-loads), and whether the merged value is a
      constant zero.
      
      If we do not find a viable mergeable subsequence starting from the
      first store of length N, we know that a subsequence starting at a
      later store of length N will also fail unless the new store's
      alignment, the new load's alignment (if we're merging store-of-loads),
      or we've dropped stores of nonzero value and could construct a merged
      stores of zero (for merging constants).
      
      As a result if we fail to find a valid subsequence starting from the
      first store we can safely skip considering subsequences that start
      with subsequent stores unless one of the above properties is
      true. This significantly (2x) improves compile time in some
      pathological cases.
      
      Reviewers: RKSimon, efriedma, zvi, spatel, waltl
      
      Subscribers: grandinj, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D35901
      
      llvm-svn: 309830
      e44032f7
    • Petr Hosek's avatar
      [ELF] When the code segment is the last, align it to the page boundary · edd6c358
      Petr Hosek authored
      When the data segment is the last segment, it is correct to leave
      it unaligned. However, when the code segment is the last segment,
      it should be aligned to the page boundary to avoid loading the
      non-segment parts of the ELF file at the end of the file.
      
      Differential Revision: https://reviews.llvm.org/D33630
      
      llvm-svn: 309829
      edd6c358
    • Philip Pfaffe's avatar
      [Polly][PM][WIP] Polly pass registration · a70e2649
      Philip Pfaffe authored
      Summary:
      This patch is a first attempt at registering Polly passes with the LLVM tools. Tool plugins are still unsupported, but this registration is usable from the tools if Polly is linked into them (albeit requiring minimal patches to those tools). Registration requires a small amount of machinery (the owning analysis proxies), necessary for injecting ScopAnalysisManager objects into the calling tools.
      
      This patch is marked WIP because the registration is incomplete. Parsing manual pipelines is fully supported, but default pass injection into the O3 pipeline is lacking, mostly because there is opportunity for some redesign here, I believe. The first point of order would be insertion points. I think it makes sense to run before the vectorizers. Running Polly Early, however, is weird. Mostly because it actually is the default (which to me is unexpected), and because Polly runs it's own O1 pipeline. Why not instead insert it at an appropriate place somewhere after simplification happend? Running after the loop optimizers seems intuitive, but it also seems wasteful, since multiple consecutive loops might well be a single scop, and we don't need to run for all of them.
      
      My second request for comments would be regarding all those smallish helper passes we have,  like PollyViewer, PollyPrinter, PollyImportJScop. Right now these are controlled by command line options, deciding whether they should be part of the Polly pipeline. What is your opinion on treating them like real passes, and have the user write an appropriate pipeline if they want to use any of them?
      
      Reviewers: grosser, Meinersbur, bollu
      
      Reviewed By: grosser
      
      Subscribers: llvm-commits, pollydev
      
      Tags: #polly
      
      Differential Revision: https://reviews.llvm.org/D35458
      
      llvm-svn: 309826
      a70e2649
    • Evandro Menezes's avatar
      [AArch64] Improve the test of conditional branch fusion · 89a67b83
      Evandro Menezes authored
      Separate the checking of the fused pairings with B.cc and CBcc.
      
      llvm-svn: 309825
      89a67b83
    • Adrian Prantl's avatar
      Remove unused includes of MachineLocation.h (NFC) · 61b39b2a
      Adrian Prantl authored
      llvm-svn: 309824
      61b39b2a
    • Adrian Prantl's avatar
      Remove unreachable code. (NFC) · 2049c0d7
      Adrian Prantl authored
      MachineLocation::getOffset() always returns 0.
      
      rdar://problem/33580047
      
      llvm-svn: 309823
      2049c0d7
    • Singapuram Sanjay Srivallabh's avatar
      Remove debug metadata from copied instruction to prevent GPUModule verification failure · 188053af
      Singapuram Sanjay Srivallabh authored
      Summary:
      **Remove debug metadata from instruction to be copied to prevent the source file's debug metadata being copied into GPUModule and eventually failing Module verification and ASM string codegeneration.**
      
      When copying the instruction onto the Module meant for the GPU, debug metadata attached to an instruction causes all related metadata to be pulled into the Module, including the DICompileUnit, which is not listed in llvm.dbg.cu of the Module. This fails the verification of the Module and generation of the ASM string.
      
      The only debug metadata of the instruction, the DebugLoc, is unset by this patch.
      
      This patch reattempts https://reviews.llvm.org/D35630 by targeting only those instructions that are to end up in a Module meant for the GPU.
      
      Reviewers: grosser, bollu
      
      Reviewed By: grosser
      
      Subscribers: pollydev
      
      Tags: #polly
      
      Differential Revision: https://reviews.llvm.org/D36161
      
      llvm-svn: 309822
      188053af
    • Florian Hahn's avatar
      [AArch64] Simplify AES*Tied pseudo expansion (NFC). · 31f78fd0
      Florian Hahn authored
      Summary:
      Suggested by @t.p.northover in https://bugs.llvm.org/show_bug.cgi?id=34015.
      
      
      Reviewers: javed.absar, t.p.northover, rengolin
      
      Reviewed By: t.p.northover
      
      Subscribers: aemerson, kristof.beyls, llvm-commits, t.p.northover
      
      Differential Revision: https://reviews.llvm.org/D36223
      
      llvm-svn: 309821
      31f78fd0
    • Jan Vesely's avatar
      configure.py: Make python3 friendly · a4a20cd2
      Jan Vesely authored
      
      
      mostly prints and exceptions.
      Few behavioral changes are documented in the text
      Generated Makefile is identical between python2 and python3
      
      Signed-off-by: default avatarJan Vesely <jan.vesely@rutgers.edu>
      Reviewed-by: default avatarAaron Watry <awatry@gmail.com>
      llvm-svn: 309820
      a4a20cd2
    • Chad Rosier's avatar
      [InlineCost] Remove redundant call. NFC. · 5ce28f4f
      Chad Rosier authored
      llvm-svn: 309819
      5ce28f4f
    • Adrian Prantl's avatar
      Assert that the offset in MachineLocation::set() is always 0. (NFC) · 3d1a2147
      Adrian Prantl authored
      llvm-svn: 309818
      3d1a2147
    • Chad Rosier's avatar
      [InlineCost] Simplify more 'and' and 'or' operations. · 2e1c050e
      Chad Rosier authored
      Differential Revision: https://reviews.llvm.org/D35856
      
      llvm-svn: 309817
      2e1c050e
    • Alexey Bataev's avatar
      [SLPVectorizer] Generalize interface of functions, NFC. · 36e6096a
      Alexey Bataev authored
      llvm-svn: 309816
      36e6096a
    • Walter Lee's avatar
      Define _GNU_SOURCE for RTEMS c++ · 4e93a698
      Walter Lee authored
      Summary: This is required by the libc++ locale support.
      
      Reviewers: jyknight
      
      Subscribers: fedor.sergeev
      
      Differential Revision: https://reviews.llvm.org/D36121
      
      llvm-svn: 309815
      4e93a698
    • Alexey Bataev's avatar
      [SLPVectorizer] Test update, NFC. · 65e9dd66
      Alexey Bataev authored
      llvm-svn: 309814
      65e9dd66
    • Alex Lorenz's avatar
      [rename] NFC, extract symbol canonicalization logic into function · 6ad001df
      Alex Lorenz authored
      This function will be used by the clang-refactor's rename actions
      
      llvm-svn: 309813
      6ad001df
    • Alexey Bataev's avatar
      [SLP] Fix for PR31880: shuffle and vectorize repeated scalar ops on extracted elements · fba97e6e
      Alexey Bataev authored
      Summary:
      Currently most of the time vectors of extractelement instructions are
      treated as scalars that must be gathered into vectors. But in some
      cases, like when we have extractelement instructions from single vector
      with different constant indeces or from 2 vectors of the same size, we
      can treat this operations as shuffle of a single vector or blending of 2
      vectors.
      ```
      define <2 x i8> @g(<2 x i8> %x, <2 x i8> %y) {
        %x0 = extractelement <2 x i8> %x, i32 0
        %y1 = extractelement <2 x i8> %y, i32 1
        %x0x0 = mul i8 %x0, %x0
        %y1y1 = mul i8 %y1, %y1
        %ins1 = insertelement <2 x i8> undef, i8 %x0x0, i32 0
        %ins2 = insertelement <2 x i8> %ins1, i8 %y1y1, i32 1
        ret <2 x i8> %ins2
      }
      ```
      can be converted to something like
      ```
      define <2 x i8> @g(<2 x i8> %x, <2 x i8> %y) {
        %1 = shufflevector <2 x i8> %x, <2 x i8> %y, <2 x i32> <i32 0, i32 3>
        %2 = mul <2 x i8> %1, %1
        ret <2 x i8> %2
      }
      ```
      Currently this type of conversion is considered as high cost
      transformation.
      
      Reviewers: mzolotukhin, delena, mkuper, hfinkel, RKSimon
      
      Subscribers: ashahid, RKSimon, spatel, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D30200
      
      llvm-svn: 309812
      fba97e6e
    • Philip Pfaffe's avatar
      [PM] Fix proxy invalidation · f081ec76
      Philip Pfaffe authored
      Summary: I made a mistake in handling transitive invalidation of analysis results. I've updated the list of preserved analyses as well as the correct result dependences.
      
      The Invalidator passed through the invalidate() path can be used to
      transitively invalidate analyses. It frequently happens that analysis
      results depend on other analyses, and thus store references to their
      results. When the dependee now gets invalidated, the depender needs to
      be invalidated as well. This is the purpose of the Invalidator object,
      which can be used to check whether some dependee analysis is in the
      process of being invalidated. I originally was checking the wrong
      dependee analyses, which is an actual error, you can only check analysis
      results that are in the cache (which they are if you've captured their
      reference). The invalidation I'm handling inside the proxy deals with
      the standard analyses the proxy passes into the Scop pipeline, since I'm
      capturing their reference.
      
      This checking allows us to actually preserve a couple of results outside
      of the proxy, since the Scop pipeline shouldn't break those, or
      otherwise should update them accordingly.
      
      Reviewers: grosser, Meinersbur, bollu
      
      Reviewed By: grosser
      
      Subscribers: pollydev, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D36216
      
      llvm-svn: 309811
      f081ec76
    • Manuel Klimek's avatar
      Adapt clang-tidy checks to changing semantics of hasDeclaration. · 7b9c117b
      Manuel Klimek authored
      Differential Revision: https://reviews.llvm.org/D36154
      
      llvm-svn: 309810
      7b9c117b
    • Manuel Klimek's avatar
      Unify and simplify the behavior of the hasDeclaration matcher. · 696e5052
      Manuel Klimek authored
      Originally, we weren't able to match on Type nodes themselves (only QualType),
      so the hasDeclaration matcher was initially written to give what we thought are
      reasonable results for QualType matches.
      
      When we chagned the matchers to allow matching on Type nodes, it turned out
      that the hasDeclaration matcher was by chance written templated enough to now
      allow hasDeclaration to also match on (some) Type nodes.
      
      This patch change the hasDeclaration matcher to:
      a) work the same on Type and QualType nodes,
      b) be completely explicit about what nodes we can match instead of just allowing
         anything with a getDecl() to match,
      c) explicitly control desugaring only one level in very specific instances.
      d) adds hasSpecializedTemplate and tagType matchers to allow migrating
        existing use cases that now need more explicit matchers
      
      Note: This patch breaks clang-tools-extra. The corresponding patch there
      is approved and will land in a subsequent patch.
      
      Differential Revision: https://reviews.llvm.org/D27104
      
      llvm-svn: 309809
      696e5052
    • Siddharth Bhat's avatar
      [GPUJIT] Add GPUJIT APIs for allocating and freeing managed memory. · f23bb4a8
      Siddharth Bhat authored
      We introduce `polly_mallocManaged` and `polly_freeManaged` as
      proxies for `cudaMallocManaged` / `cudaFree`. This is currently not
      used by Polly. It is auxiliary code that is used in `COSMO`.
      
      This is useful because `polly_mallocManaged` matches the signature of `malloc`,
      while `cudaMallocManaged` does not. We introduce `polly_freeManaged` for
      symmetry.
      
      We use this in COSMO to use the unified memory feature of the newer
      CUDA APIs (>= 6).
      
      Differential Revision: https://reviews.llvm.org/D35991
      
      llvm-svn: 309808
      f23bb4a8
    • Philip Pfaffe's avatar
      [SI][NewPM] Collect loop count statistics · ead67dbb
      Philip Pfaffe authored
      llvm-svn: 309807
      ead67dbb
    • Diana Picus's avatar
      [MIR] Print target-specific constant pools · d5a00b0f
      Diana Picus authored
      This should enable us to test the generation of target-specific constant
      pools, e.g. for ARM:
      
      constants:
       - id:              0
         value:           'g(GOT_PREL)-(LPC0+8-.)'
         alignment:       4
         isTargetSpecific: true
      
      I intend to use this to test PIC support in GlobalISel for ARM.
      
      This is difficult to test outside of that context, since the existing
      MIR tests usually rely on parser support as well, and that seems a bit
      trickier to add. We could try to add a unit test, but the setup for that
      seems rather convoluted and overkill.
      
      We do test however that the parser reports a nice error when
      encountering a target-specific constant pool.
      
      Differential Revision: https://reviews.llvm.org/D36092
      
      llvm-svn: 309806
      d5a00b0f
    • Philip Pfaffe's avatar
      [SD] Set PollyUseRuntimeAliasChecks correctly · f5a4394a
      Philip Pfaffe authored
      llvm-svn: 309805
      f5a4394a
    • Daniel Sanders's avatar
      [globalisel][tablegen] Do not merge memoperands from instructions that weren't in the match. · 078572b6
      Daniel Sanders authored
      Summary:
      Fix a bug discovered in an out-of-tree target where memoperands from
      pseudo-instructions that weren't part of the match were being merged into the
      result instructions as part of GIR_MergeMemOperands.
      
      This bug was caused by a change to the handling of State.MIs between rules when
      the state machine tables were fused into a single table. Previously, each rule
      would reset State.MIs using State.MIs.resize(1) but this is no longer done, as a
      result stale data is occasionally left in some elements of State.MIs. Most
      opcodes aren't affected by this but GIR_MergeMemOperands merges all memoperands
      from the intructions recorded in State.MIs into the result instruction.
      
      Suppose for example, we processed but rejected the following pattern:
        (signextend (load x))
      at this point, State.MIs contains the signextend and the load. Now suppose we
      process and accept this pattern:
        (add x, y)
      at this point, State.MIs contains the add as well as the (now irrelevant) load.
      When GIR_MergeMemOperands is processed, the memoperands from that irrelevant
      load will be merged into the result instruction even though it was not part of
      the match.
      
      Bringing back the State.MIs.resize(1) would fix the problem but it would limit
      our ability to optimize the table in the future. Instead, this patch fixes the
      problem by explicitly stating which instructions should be merged into the result.
      
      There's no direct test case in this commit because a test case would be very brittle.
      However, at the time of writing this should fix the failures in
      http://green.lab.llvm.org/green/job/Compiler_Verifiers_GlobalISEL/ as well as a
      failure in test/CodeGen/ARM/GlobalISel/arm-isel.ll when expensive checks are enabled.
      
      Reviewers: ab, t.p.northover, qcolombet, rovka, aditya_nandakumar
      
      Subscribers: fhahn, kristof.beyls, igorb, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D36094
      
      llvm-svn: 309804
      078572b6
    • Vadim Macagon's avatar
      Fix ProcessAPITestCase.test_get_process_info · 59e8ab51
      Vadim Macagon authored
      llvm-svn: 309803
      59e8ab51
    • Siddharth Bhat's avatar
      [GPUJIT] Teach GPUJIT to use a pre-existing CUDA context if available. · b1a52abd
      Siddharth Bhat authored
      On mixing the driver and runtime APIs, it is quite possible that a
      context already exists due to runtime API usage. In this case, Polly should
      try to use the same context.
      
      This patch teaches GPUJIT to detect that a context exists and how to
      pick up this context.
      
      Without this, calling `cudaMallocManaged`, for example, before a
      polly-generated kernel launch causes P100 to *hang*.
      
      This is a part of (https://reviews.llvm.org/D35991) that was extracted
      out.
      
      Differential Revision: https://reviews.llvm.org/D36162
      
      llvm-svn: 309802
      b1a52abd
    • Ilya Biryukov's avatar
      [clangd] Run clang-format on all clangd sources. NFC. · 574b753b
      Ilya Biryukov authored
      llvm-svn: 309801
      574b753b
    • Ilya Biryukov's avatar
      [clangd] Capitalized descriptions of clangd options. NFC. · 4ca7d85d
      Ilya Biryukov authored
      To follow the style of other options shown on `clangd -help`.
      
      llvm-svn: 309800
      4ca7d85d
    • Daniel Marjamaki's avatar
      [StaticAnalyzer] Fix false positives for unreachable code in macros. · fabe840e
      Daniel Marjamaki authored
      Example:
      
      #define MACRO(C)   if (C) { static int x; .. }
      void foo() {
      	MACRO(0);
      }
      
      Differential Revision: https://reviews.llvm.org/D36141
      
      llvm-svn: 309799
      fabe840e
    • Vitaly Buka's avatar
      [asan] Interceptors for Fuchsia · 41153300
      Vitaly Buka authored
      Summary:
      Fuchsia uses the "memintrinsics" interceptors, though not via any
      generalized interception mechanism.  It doesn't use any other interceptors.
      
      Submitted on behalf of Roland McGrath.
      
      Reviewers: vitalybuka, alekseyshl, kcc
      
      Reviewed By: vitalybuka
      
      Subscribers: kubamracek, phosek, filcab, llvm-commits
      
      Tags: #sanitizers
      
      Differential Revision: https://reviews.llvm.org/D36189
      
      llvm-svn: 309798
      41153300
    • Vitaly Buka's avatar
      [sanitizer_common] Fuchsia-specific implementation of SanitizerCoverage · 137c9c2a
      Vitaly Buka authored
      Submitted on behalf of Roland McGrath.
      
      Reviewers: kcc, eugenis, alekseyshl, vitalybuka
      
      Reviewed By: kcc
      
      Subscribers: filcab, vitalybuka, phosek, llvm-commits, kubamracek, mgorny
      
      Tags: #sanitizers
      
      Differential Revision: https://reviews.llvm.org/D35866
      
      llvm-svn: 309797
      137c9c2a
Loading