[llvm-branch-commits] [llvm] ce1e4ad - Revert "[GlobalISel] Add support for lowering byref attribute"
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Jun 26 08:34:35 PDT 2024
Author: Thorsten Schütt
Date: 2024-06-26T17:34:33+02:00
New Revision: ce1e4ade530a75921dada55f1211c85343c98d42
URL: https://github.com/llvm/llvm-project/commit/ce1e4ade530a75921dada55f1211c85343c98d42
DIFF: https://github.com/llvm/llvm-project/commit/ce1e4ade530a75921dada55f1211c85343c98d42.diff
LOG: Revert "[GlobalISel] Add support for lowering byref attribute"
This reverts commit 3e1ebd77e4e9a772e4f06f12d19c64860fb1f070.
Added:
Modified:
llvm/lib/CodeGen/GlobalISel/CallLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/GlobalISel/CallLowering.cpp b/llvm/lib/CodeGen/GlobalISel/CallLowering.cpp
index 5efb3be0e53ae..2ee035790eff1 100644
--- a/llvm/lib/CodeGen/GlobalISel/CallLowering.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/CallLowering.cpp
@@ -49,8 +49,6 @@ addFlagsUsingAttrFn(ISD::ArgFlagsTy &Flags,
Flags.setNest();
if (AttrFn(Attribute::ByVal))
Flags.setByVal();
- if (AttrFn(Attribute::ByRef))
- Flags.setByRef();
if (AttrFn(Attribute::Preallocated))
Flags.setPreallocated();
if (AttrFn(Attribute::InAlloca))
@@ -223,26 +221,17 @@ void CallLowering::setArgFlags(CallLowering::ArgInfo &Arg, unsigned OpIdx,
}
Align MemAlign = DL.getABITypeAlign(Arg.Ty);
- if (Flags.isByVal() || Flags.isInAlloca() || Flags.isPreallocated() ||
- Flags.isByRef()) {
+ if (Flags.isByVal() || Flags.isInAlloca() || Flags.isPreallocated()) {
assert(OpIdx >= AttributeList::FirstArgIndex);
unsigned ParamIdx = OpIdx - AttributeList::FirstArgIndex;
Type *ElementTy = FuncInfo.getParamByValType(ParamIdx);
- if (!ElementTy)
- ElementTy = FuncInfo.getParamByRefType(ParamIdx);
if (!ElementTy)
ElementTy = FuncInfo.getParamInAllocaType(ParamIdx);
if (!ElementTy)
ElementTy = FuncInfo.getParamPreallocatedType(ParamIdx);
-
assert(ElementTy && "Must have byval, inalloca or preallocated type");
-
- uint64_t MemSize = DL.getTypeAllocSize(ElementTy);
- if (Flags.isByRef())
- Flags.setByRefSize(MemSize);
- else
- Flags.setByValSize(MemSize);
+ Flags.setByValSize(DL.getTypeAllocSize(ElementTy));
// For ByVal, alignment should be passed from FE. BE will guess if
// this info is not there but there are cases it cannot get right.
More information about the llvm-branch-commits
mailing list