[all-commits] [llvm/llvm-project] 320af6: Create SPIRABIInfo to enable SPIR_FUNC calling con...

Melanie Blower via All-commits all-commits at lists.llvm.org
Sat Dec 12 05:49:06 PST 2020


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 320af6b138391d289fe70db39c51da92e8d3d9df
      https://github.com/llvm/llvm-project/commit/320af6b138391d289fe70db39c51da92e8d3d9df
  Author: Melanie Blower <melanie.blower at intel.com>
  Date:   2020-12-12 (Sat, 12 Dec 2020)

  Changed paths:
    M clang/lib/CodeGen/CGBuiltin.cpp
    M clang/lib/CodeGen/TargetInfo.cpp
    M clang/test/CodeGen/complex-math.c
    M clang/test/CodeGenOpenCL/builtins.cl
    M clang/test/CodeGenOpenCL/cl20-device-side-enqueue.cl
    M clang/test/CodeGenOpenCL/to_addr_builtin.cl
    M clang/test/CodeGenOpenCLCXX/atexit.cl

  Log Message:
  -----------
  Create SPIRABIInfo to enable SPIR_FUNC calling convention.

Background: Call to library arithmetic functions for div is emitted by the
compiler and it set wrong “C” calling convention for calls to these functions,
whereas library functions are declared with `spir_function` calling convention.
InstCombine optimization replaces such calls with “unreachable” instruction.
It looks like clang lacks SPIRABIInfo class which should specify default
calling conventions for “system” function calls. SPIR supports only
SPIR_FUNC and SPIR_KERNEL calling convention.

Reviewers: Erich Keane, Anastasia

Differential Revision: https://reviews.llvm.org/D92721




More information about the All-commits mailing list