Skip to content
  1. May 23, 2018
  2. May 10, 2018
  3. Dec 01, 2017
  4. Oct 29, 2017
    • Philip Pfaffe's avatar
      Fix two testcases. NFC intended. · 9b1d1e6a
      Philip Pfaffe authored
      Add missing %loadPolly directive to support out of tree builds. One of
      the changes is somewhat bigger, because the directive turns on LLVM
      names, and the testcase deosn't use those.
      
      llvm-svn: 316870
      9b1d1e6a
  5. Oct 04, 2017
    • Tobias Grosser's avatar
      [GPGPU] Make sure escaping invariant load hoisted scalars are preserved · c52b71db
      Tobias Grosser authored
      We make sure that the final reload of an invariant scalar memory access uses the
      same stack slot into which the invariant memory access was stored originally.
      Earlier, this was broken as we introduce a new stack slot aside of the preload
      stack slot, which remained uninitialized and caused our escaping loads to
      contain garbage. This happened due to us clearing the pre-populated values
      in EscapeMap after kernel code generation. We address this issue by preserving
      the original host values and restoring them after kernel code generation.
      EscapeMap is not expected to be used during kernel code generation, hence we
      clear it during kernel generation to make sure that any unintended uses are
      noticed.
      
      llvm-svn: 314894
      c52b71db
  6. Oct 01, 2017
    • Tobias Grosser's avatar
      Add missing REQUIRES line · d215e684
      Tobias Grosser authored
      llvm-svn: 314625
      d215e684
    • Tobias Grosser's avatar
      [GPGPU] Set Polly's RTC to false in case invariant load hoisting fails · 2fb847fb
      Tobias Grosser authored
      This matches the behavior we already have in lib/Codegen/CodeGeneration.cpp and
      makes sure that we fall back to the original code. It seems when invariant load
      hoisting was introduced to the GPGPU backend we missed to reset the RTC flag,
      such that kernels where invariant load hoisting failed executed the 'optimized'
      SCoP, which however is set to a simple 'unreachable'. Unsurprisingly, this
      results in hard to debug issues that are a lot of fun to debug.
      
      llvm-svn: 314624
      2fb847fb
  7. Sep 01, 2017
    • Siddharth Bhat's avatar
      [ISLNodeBuilder] Materialize Fortran array sizes of arrays without memory accesses. · 3928e3f5
      Siddharth Bhat authored
       In Polly, we specifically add a paramter to represent the outermost dimension
       size of fortran arrays. We do this because this information is statically
       available from the fortran metadata generated by dragonegg.
       However, we were only materializing these parameters (meaning, creating an
       llvm::Value to back the isl_id) from *memory accesses*. This is wrong,
       we should materialize parameters from *scop array info*.
      
       It is wrong because if there is a case where we detect 2 fortran arrays,
       but only one of them is accessed, we may not materialize the other array's
       dimensions at all.
      
       This is incorrect. We fix this by looping over all
       `polly::ScopArrayInfo` in a scop, rather that just all `polly::MemoryAccess`.
      
       Differential Revision: https://reviews.llvm.org/D37379
      
      llvm-svn: 312350
      3928e3f5
  8. Aug 31, 2017
    • Siddharth Bhat's avatar
      [PPCGCodeGen] Convert intrinsics to libdevice functions whenever possible. · 56572c6a
      Siddharth Bhat authored
      This is useful when we face certain intrinsics such as `llvm.exp.*`
      which cannot be lowered by the NVPTX backend while other intrinsics can.
      
      So, we would need to keep blacklists of intrinsics that cannot be
      handled by the NVPTX backend. It is much simpler to try and promote
      all intrinsics to libdevice versions.
      
      This patch makes function/intrinsic very uniform, and will always try to use
      a libdevice version if it exists.
      
      Differential Revision: https://reviews.llvm.org/D37056
      
      llvm-svn: 312239
      56572c6a
  9. Aug 22, 2017
  10. Aug 21, 2017
  11. Aug 20, 2017
  12. Aug 19, 2017
    • Tobias Grosser's avatar
      [GPGPU] Correctly initialize array order and fixed_element information · ecb94a03
      Tobias Grosser authored
      Summary:
      This information is necessary for PPCG to perform correct life range reordering.
      With these changes applied we can live-range reorder some of the important
      kernels in COSMO.
      
      We also update and rename one test case, which previously could not be optimized
      and now is optimized thanks to live-range reordering. To preserve test coverage
      we add a new test case scalar-writes-in-scop-requires-abort.ll, which exercises
      our automatic abort in case of scalar writes in the kernel.
      
      Reviewers: Meinersbur, bollu, singam-sanjay
      
      Subscribers: nemanjai, pollydev, llvm-commits, kbarton
      
      Tags: #polly
      
      Differential Revision: https://reviews.llvm.org/D36929
      
      llvm-svn: 311259
      ecb94a03
    • Philipp Schaad's avatar
      [PPCG] Only add Kernel argument sizes for OpenCL, not CUDA runtime · 50139f0f
      Philipp Schaad authored
      Kernel argument sizes now only get appended to the kernel launch parameter list if the OpenCL runtime is selected, not if CUDA runtime is chosen.
      
      Differential revision: D36925
      
      llvm-svn: 311248
      50139f0f
    • Tobias Grosser's avatar
      [GPGPU] Collect parameter dimension used in MemoryAccesses · 43df2020
      Tobias Grosser authored
      When using -polly-ignore-integer-wrapping and -polly-acc-codegen-managed-memory
      we add parameter dimensions lazily to the domains, which results in PPCG not
      including parameter dimensions that are only used in memory accesses in the
      kernel space. To make sure these parameters are still passed to the kernel, we
      collect these parameter dimensions and align the kernel's parameter space
      before code-generating it.
      
      llvm-svn: 311239
      43df2020
  13. Aug 18, 2017
    • Tobias Grosser's avatar
      [GPGPU] Simplify PPCGSCop to reduce compile time [NFC] · ec02acfb
      Tobias Grosser authored
      Summary:
      Drop unused parameter dimensions to reduce the size of the sets we are working
      with. Especially the computed dependences tend to accumulate a lot of parameters
      that are present in the input memory accesses, but often not necessary to
      express the actual dependences. As isl represents maps and sets with dense
      matrices, reducing the dimensionality of isl sets commonly reduces code
      generation performance.
      
      This reduces compile time from 17 to 11 seconds for our test case. While this is
      not impressive, this patch helped me to identify the previous two performance
      improvements and additionally also increases readability of the isl data
      structures we use.
      
      Reviewers: Meinersbur, bollu, singam-sanjay
      
      Reviewed By: bollu
      
      Subscribers: nemanjai, pollydev, llvm-commits, kbarton
      
      Tags: #polly
      
      Differential Revision: https://reviews.llvm.org/D36869
      
      llvm-svn: 311161
      ec02acfb
  14. Aug 17, 2017
  15. Aug 16, 2017
  16. Aug 10, 2017
  17. Aug 09, 2017
  18. Aug 08, 2017
  19. Aug 06, 2017
  20. Aug 03, 2017
    • Tobias Grosser's avatar
      Add missing REQUIRES line · c1cfe0a8
      Tobias Grosser authored
      llvm-svn: 309943
      c1cfe0a8
    • Tobias Grosser's avatar
      Make sure that all parameter dimensions are set in schedule · b5563c68
      Tobias Grosser authored
      Summary:
      In case the option -polly-ignore-parameter-bounds is set, not all parameters
      will be added to context and domains. This is useful to keep the size of the
      sets and maps we work with small. Unfortunately, for AST generation it is
      necessary to ensure all parameters are part of the schedule tree. Hence,
      we modify the GPGPU code generation to make sure this is the case.
      
      To obtain the necessary information we expose a new function
      Scop::getFullParamSpace(). We also make a couple of functions const to be
      able to make SCoP::getFullParamSpace() const.
      
      Reviewers: Meinersbur, bollu, gareevroman, efriedma, huihuiz, sebpop, simbuerg
      
      Subscribers: nemanjai, kbarton, pollydev, llvm-commits
      
      Tags: #polly
      
      Differential Revision: https://reviews.llvm.org/D36243
      
      llvm-svn: 309939
      b5563c68
    • Michael Kruse's avatar
      [test] Fix test case without Polly-ACC. · 291fd807
      Michael Kruse authored
      llvm-svn: 309938
      291fd807
    • Siddharth Bhat's avatar
      [PPCGCodeGeneration] Construct `isl_multi_pw_aff` of PPCGArray.bounds even... · eadf76d3
      Siddharth Bhat authored
      [PPCGCodeGeneration] Construct `isl_multi_pw_aff` of PPCGArray.bounds even when polly-ignore-parameter-bounds is turned on.
      
      When we have `-polly-ignore-parameter-bounds`, `Scop::Context` does not contain
      all the paramters present in the program.
      
      The construction of the `isl_multi_pw_aff` requires all the indivisual `pw_aff`
      to have the same parameter dimensions. To achieve this, we used to realign
      every `pw_aff` with `Scop::Context`. However, in conjunction with
      `-polly-ignore-parameter-bounds`, this is now incorrect, since `Scop::Context`
      does not contain all parameters.
      
      We set this up correctly by creating a space that has all the parameters
      used by all the `isl_pw_aff`. Then, we realign all `isl_pw_aff` to this space.
      
      llvm-svn: 309934
      eadf76d3
  21. Aug 02, 2017
    • 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
Loading