[all-commits] [llvm/llvm-project] 774ab6: Add option to use older clang ABI behavior when pa...

dyung via All-commits all-commits at lists.llvm.org
Mon Oct 19 18:25:56 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 774ab60125eeaeac8bf2470b7aaa6aa428d68453
      https://github.com/llvm/llvm-project/commit/774ab60125eeaeac8bf2470b7aaa6aa428d68453
  Author: Douglas Yung <douglas.yung at sony.com>
  Date:   2020-10-19 (Mon, 19 Oct 2020)

  Changed paths:
    M clang/include/clang/Basic/LangOptions.h
    M clang/lib/CodeGen/TargetInfo.cpp
    M clang/lib/Frontend/CompilerInvocation.cpp
    M clang/test/CodeGen/X86/avx-union.c

  Log Message:
  -----------
  Add option to use older clang ABI behavior when passing certain union types as function arguments

Recently commit D78699 (commit 26cfb6e562f1), fixed clang's behavior with respect
to passing a union type through a register to correctly follow the ABI. However,
this is an ABI breaking change with earlier versions of the clang compiler, so we
should add an -fclang-abi-compat option to address this. Additionally, the PS4 ABI
requires the older behavior, so that is added as well.

This change adds a Ver11 value to the ClangABI enum that when it is set (or the
target is the PS4 triple), we skip the ABI fix introduced in D78699.

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




More information about the All-commits mailing list