diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2019-08-20 20:50:12 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2019-08-20 20:50:12 +0000 |
commit | e6d1592492a3a379186bfb02bd0f4eda0669c0d5 (patch) | |
tree | 599ab169a01f1c86eda9adc774edaedde2f2db5b /include/llvm/CodeGen/TargetCallingConv.h | |
parent | 1a56a5ead7a2e84bee8240f5f6b033b5f1707154 (diff) |
Diffstat (limited to 'include/llvm/CodeGen/TargetCallingConv.h')
-rw-r--r-- | include/llvm/CodeGen/TargetCallingConv.h | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/include/llvm/CodeGen/TargetCallingConv.h b/include/llvm/CodeGen/TargetCallingConv.h index 7d138f585171..aebeeecbe506 100644 --- a/include/llvm/CodeGen/TargetCallingConv.h +++ b/include/llvm/CodeGen/TargetCallingConv.h @@ -1,9 +1,8 @@ //===-- llvm/CodeGen/TargetCallingConv.h - Calling Convention ---*- C++ -*-===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // @@ -46,9 +45,12 @@ namespace ISD { unsigned IsInConsecutiveRegsLast : 1; unsigned IsInConsecutiveRegs : 1; unsigned IsCopyElisionCandidate : 1; ///< Argument copy elision candidate + unsigned IsPointer : 1; unsigned ByValSize; ///< Byval struct size + unsigned PointerAddrSpace; ///< Address space of pointer argument + public: ArgFlagsTy() : IsZExt(0), IsSExt(0), IsInReg(0), IsSRet(0), IsByVal(0), IsNest(0), @@ -56,8 +58,9 @@ namespace ISD { IsSwiftSelf(0), IsSwiftError(0), IsHva(0), IsHvaStart(0), IsSecArgPass(0), ByValAlign(0), OrigAlign(0), IsInConsecutiveRegsLast(0), IsInConsecutiveRegs(0), - IsCopyElisionCandidate(0), ByValSize(0) { - static_assert(sizeof(*this) == 2 * sizeof(unsigned), "flags are too big"); + IsCopyElisionCandidate(0), IsPointer(0), ByValSize(0), + PointerAddrSpace(0) { + static_assert(sizeof(*this) == 3 * sizeof(unsigned), "flags are too big"); } bool isZExt() const { return IsZExt; } @@ -114,6 +117,9 @@ namespace ISD { bool isCopyElisionCandidate() const { return IsCopyElisionCandidate; } void setCopyElisionCandidate() { IsCopyElisionCandidate = 1; } + bool isPointer() const { return IsPointer; } + void setPointer() { IsPointer = 1; } + unsigned getByValAlign() const { return (1U << ByValAlign) / 2; } void setByValAlign(unsigned A) { ByValAlign = Log2_32(A) + 1; @@ -128,7 +134,10 @@ namespace ISD { unsigned getByValSize() const { return ByValSize; } void setByValSize(unsigned S) { ByValSize = S; } - }; + + unsigned getPointerAddrSpace() const { return PointerAddrSpace; } + void setPointerAddrSpace(unsigned AS) { PointerAddrSpace = AS; } +}; /// InputArg - This struct carries flags and type information about a /// single incoming (formal) argument or incoming (from the perspective |