[llvm] 738abfd - [NFC] Remove checking pointee type for byval/preallocated type

Jorge Gorbe Moya via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 17 12:23:10 PDT 2021


We're seeing a crash caused by this patch. I'll revert and post a test case
ASAP.

On Thu, Jun 3, 2021 at 7:10 PM Arthur Eubanks via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

>
> Author: Arthur Eubanks
> Date: 2021-06-03T19:09:09-07:00
> New Revision: 738abfdbea21acd2597d83ad3390daf5696b6d07
>
> URL:
> https://github.com/llvm/llvm-project/commit/738abfdbea21acd2597d83ad3390daf5696b6d07
> DIFF:
> https://github.com/llvm/llvm-project/commit/738abfdbea21acd2597d83ad3390daf5696b6d07.diff
>
> LOG: [NFC] Remove checking pointee type for byval/preallocated type
>
> These currently always require a type parameter. The bitcode reader
> already upgrades old bitcode without the type parameter to use the
> pointee type.
>
> Added:
>
>
> Modified:
>     llvm/include/llvm/IR/InstrTypes.h
>
> Removed:
>
>
>
>
> ################################################################################
> diff  --git a/llvm/include/llvm/IR/InstrTypes.h
> b/llvm/include/llvm/IR/InstrTypes.h
> index 802b913aa9f4..7fc4602aee49 100644
> --- a/llvm/include/llvm/IR/InstrTypes.h
> +++ b/llvm/include/llvm/IR/InstrTypes.h
> @@ -1729,13 +1729,13 @@ class CallBase : public Instruction {
>    /// Extract the byval type for a call or parameter.
>    Type *getParamByValType(unsigned ArgNo) const {
>      Type *Ty = Attrs.getParamByValType(ArgNo);
> -    return Ty ? Ty :
> getArgOperand(ArgNo)->getType()->getPointerElementType();
> +    return Ty;
>    }
>
>    /// Extract the preallocated type for a call or parameter.
>    Type *getParamPreallocatedType(unsigned ArgNo) const {
>      Type *Ty = Attrs.getParamPreallocatedType(ArgNo);
> -    return Ty ? Ty :
> getArgOperand(ArgNo)->getType()->getPointerElementType();
> +    return Ty;
>    }
>
>    /// Extract the number of dereferenceable bytes for a call or
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210617/b838649d/attachment.html>


More information about the llvm-commits mailing list