[llvm] Revert "[GlobalISel] Add support for lowering byref attribute" (PR #96784)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 26 08:35:31 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-globalisel
Author: Thorsten Schütt (tschuett)
<details>
<summary>Changes</summary>
Reverts llvm/llvm-project#<!-- -->96733
---
Full diff: https://github.com/llvm/llvm-project/pull/96784.diff
1 Files Affected:
- (modified) llvm/lib/CodeGen/GlobalISel/CallLowering.cpp (+2-13)
``````````diff
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.
``````````
</details>
https://github.com/llvm/llvm-project/pull/96784
More information about the llvm-commits
mailing list