1. Jul 29, 2016
  2. Jul 28, 2016
    • Daniel Sanders's avatar
      b23005ea
    • Daniel Sanders's avatar
      Revert r276982 and r276984: [mips][fastisel] Handle 0-4 arguments without SelectionDAG · 6e746516
      Daniel Sanders authored
      It seems that the stack offset in callabi.ll varies between machines. I'll look
      into it.
      
      llvm-svn: 276989
      6e746516
    • Samuel Antao's avatar
      [OpenMP] Change name of variable in mappble expression. · 44bcdb37
      Samuel Antao authored
      This attempts to fix a failure in Windows bots pottentially related with a reserved keyword.
      
      llvm-svn: 276988
      44bcdb37
    • Craig Topper's avatar
      [X86] Remove CustomInserter for FMA3 instructions. Looks like since we got... · 7e27885f
      Craig Topper authored
      [X86] Remove CustomInserter for FMA3 instructions. Looks like since we got full commuting support for FMAs after this was added, the coalescer can now get this right on its own.
      
      Differential Revision: https://reviews.llvm.org/D22799
      
      llvm-svn: 276987
      7e27885f
    • Daniel Sanders's avatar
      313755d9
    • Samuel Antao's avatar
      [OpenMP] Fix link command pattern in offloading interoperability test. · e735a21e
      Samuel Antao authored
      It was causing a few bots to fail.
      
      llvm-svn: 276983
      e735a21e
    • Daniel Sanders's avatar
      [mips][fastisel] Handle 0-4 arguments without SelectionDAG. · e0b529f6
      Daniel Sanders authored
      Summary:
      Implements fastLowerArguments() to avoid the need to fall back on
      SelectionDAG for 0-4 argument functions that don't do tricky things like
      passing double in a pair of i32's.
      
      This allows us to move all except one test to -fast-isel-abort=3. The
      remaining one has function prototypes of the form 'i32 (i32, double, double)'
      which requires floats to be passed in GPR's.
      
      Reviewers: sdardis
      
      Subscribers: dsanders, llvm-commits, sdardis
      
      Differential Revision: https://reviews.llvm.org/D22680
      
      llvm-svn: 276982
      e0b529f6
    • Samuel Antao's avatar
      [OpenMP] Do not use default argument in lambda from mappable expressions handlers. · cf3f83e4
      Samuel Antao authored
      Windows bots were complaining about that.
      
      llvm-svn: 276981
      cf3f83e4
    • Tom Stellard's avatar
      AMDGPU/SI: Don't use reserved VGPRs for SGPR spilling · 19f43010
      Tom Stellard authored
      Summary:
      We were using reserved VGPRs for SGPR spilling and this was causing
      some programs with a workgroup size of 1024 to use more than 64
      registers, which is illegal.
      
      Reviewers: arsenm, mareko, nhaehnle
      
      Subscribers: nhaehnle, arsenm, llvm-commits, kzhuravl
      
      Differential Revision: https://reviews.llvm.org/D22032
      
      llvm-svn: 276980
      19f43010
    • Samuel Antao's avatar
      [OpenMP][CUDA] Do not forward OpenMP flags for CUDA device actions. · db5f02b1
      Samuel Antao authored
      Summary:
      This patch prevents OpenMP flags from being forwarded to CUDA device commands. That was causing the CUDA frontend to attempt to emit OpenMP code which is not supported.
      
      This fixes the bug reported in https://llvm.org/bugs/show_bug.cgi?id=28723.
      
      Reviewers: hfinkel, carlo.bertolli, arpith-jacob, kkwli0, tra, ABataev
      
      Subscribers: caomhin, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D22895
      
      llvm-svn: 276979
      db5f02b1
    • Samuel Antao's avatar
      [OpenMP] Code generation for the is_device_ptr clause · 6890b096
      Samuel Antao authored
      Summary: This patch adds support for the is_device_ptr clause. It expands SEMA to use the mappable expression logic that can only be tested with code generation in place and check conflicts with other data sharing related clauses using the mappable expressions infrastructure.
      
      Reviewers: hfinkel, carlo.bertolli, arpith-jacob, kkwli0, ABataev
      
      Subscribers: caomhin, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D22788
      
      llvm-svn: 276978
      6890b096
    • Samuel Antao's avatar
      [OpenMP] Codegen for use_device_ptr clause. · cc10b857
      Samuel Antao authored
      Summary: This patch adds support for the use_device_ptr clause. It includes changes in SEMA that could not be tested without codegen, namely, the use of the first private logic and mappable expressions support.
      
      Reviewers: hfinkel, carlo.bertolli, arpith-jacob, kkwli0, ABataev
      
      Subscribers: caomhin, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D22691
      
      llvm-svn: 276977
      cc10b857
    • Luke Drummond's avatar
      Add IR fixups for RenderScript ABI mismatch between ARMV7 frontend and x86 backend · 19459580
      Luke Drummond authored
      Expression evaluation for function calls to certain public RenderScript
      API functions in libRSCPURef can segfault.
      
      `slang`,
      the compiler frontend for RenderScript embeds an ARM specific triple in
      IR that is shipped in the app, after generating IR that has some
      assumptions that an ARM device is the target.
      As the IR is then compiled on a device of unknown (at time the IR was
      generated at least) architecture, when calling RenderScript API function
      as part of debugger expressions, we have to perform a fixup pass that
      removes those assumptions right before the module is sent to be
      generated by the llvm backend.
      
      This issue is caused by multiple problems with the ARMv7-specific
      assumptions encoded in the LLVM IR. x86 large value returns use a hidden
      first argument (mapping to llvm::Attribute::StructRet), which can't be
      picked up by the JIT due to the mismatch between IR generated by the
      slang frontend and llvm backend. This means that code generated by bcc
      did not necessarily match the default SysV Linux/Android ABI used by the
      LLDB JIT
      
      - Original Authors: Luke Drummond (@ldrumm), Function declarations fixed by Aidan Dodds (@ADodds)
      
      Subscribers: lldb-commits
      
      Differential Revision: https://reviews.llvm.org/D18059
      
      llvm-svn: 276976
      19459580
    • Simon Pilgrim's avatar
      Removed unused variables · b1d31ea6
      Simon Pilgrim authored
      llvm-svn: 276975
      b1d31ea6
    • Simon Pilgrim's avatar
      Fix signed/unsigned warning. · 3080dbcc
      Simon Pilgrim authored
      llvm-svn: 276974
      3080dbcc
    • John Brawn's avatar
      Reapply r276856 "Adjust Registry interface to not require plugins to export a registry" · 778c3c6c
      John Brawn authored
      This version has two fixes compared to the original:
       * In Registry.h the template static members are instantiated before they are
         used, as clang gives an error if you do it the other way around.
       * The use of the Registry template in clang-tidy is updated in the same way as
         has been done everywhere else.
      
      Original commit message:
      
      Currently the Registry class contains the vestiges of a previous attempt to
      allow plugins to be used on Windows without using BUILD_SHARED_LIBS, where a
      plugin would have its own copy of a registry and export it to be imported by
      the tool that's loading the plugin. This only works if the plugin is entirely
      self-contained with the only interface between the plugin and tool being the
      registry, and in particular this conflicts with how IR pass plugins work.
      
      This patch changes things so that instead the add_node function of the registry
      is exported by the tool and then imported by the plugin, which solves this
      problem and also means that instead of every plugin having to export every
      registry they use instead LLVM only has to export the add_node functions. This
      allows plugins that use a registry to work on Windows if
      LLVM_EXPORT_SYMBOLS_FOR_PLUGINS is used.
      
      llvm-svn: 276973
      778c3c6c
    • Nicolai Haehnle's avatar
      AMDGPU: add execfix flag to SI_ELSE · 3b572002
      Nicolai Haehnle authored
      Summary:
      SI_ELSE is lowered into two parts:
      
      s_or_saveexec_b64 dst, src (at the start of the basic block)
      
      s_xor_b64 exec, exec, dst (at the end of the basic block)
      
      The idea is that dst contains the exec mask of the preceding IF block. It can
      happen that SIWholeQuadMode decides to switch from WQM to Exact mode inside
      the basic block that contains SI_ELSE, in which case it introduces an instruction
      
      s_and_b64 exec, exec, s[...]
      
      which masks out bits that can correspond to both the IF and the ELSE paths.
      So the resulting sequence must be:
      
      s_or_savexec_b64 dst, src
      
      s_and_b64 exec, exec, s[...] <-- added by SIWholeQuadMode
      s_and_b64 dst, dst, exec <-- added by SILowerControlFlow
      
      s_xor_b64 exec, exec, dst
      
      Whether to add the additional s_and_b64 dst, dst, exec is currently determined
      via the ExecModified tracking. With this change, it is instead determined by
      an additional flag on SI_ELSE which is set by SIWholeQuadMode.
      
      Finally: It also occured to me that an alternative approach for the long run
      is for SILowerControlFlow to unconditionally emit
      
      s_or_saveexec_b64 dst, src
      
      ...
      
      s_and_b64 dst, dst, exec
      s_xor_b64 exec, exec, dst
      
      and have a pass that detects and cleans up the "redundant AND with exec"
      pattern where possible. This could be useful anyway, because we also add
      instructions
      
      s_and_b64 vcc, exec, vcc
      
      before s_cbranch_scc (in moveToALU), and those are often redundant. I have
      some pending changes to how KILL is lowered that could also benefit from
      such a cleanup pass.
      
      In any case, this current patch could help in the short term with the whole
      ExecModified business.
      
      Reviewers: tstellarAMD, arsenm
      
      Subscribers: arsenm, llvm-commits, kzhuravl
      
      Differential Revision: https://reviews.llvm.org/D22846
      
      llvm-svn: 276972
      3b572002