[PATCH] D74094: Reapply: [IRGen] Emit lifetime intrinsics around temporary aggregate argument allocas

Nick Desaulniers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 14 11:16:02 PDT 2023


nickdesaulniers added a comment.

In D74094#4645998 <https://reviews.llvm.org/D74094#4645998>, @dexonsmith wrote:

> In D74094#4645562 <https://reviews.llvm.org/D74094#4645562>, @nickdesaulniers wrote:
>
>> I don't yet fully comprehend yet what's going wrong, and probably need to familiarize myself with the language rules around `auto`'s type deduction.
>
> For reduction purposes, it might be useful to factor out the auto type deduction on the return. I think you can do that with the help of `-Xclang -ast-dump`.

Heh, yeah I tried that, and hit an assertion before we were able to dump the full AST.

  | | |     | `-TypedefDecl 0x7f4a5cf03fb0 <line:72:3, line:73:106> col:106 referenced SegmentWrapper 'std::conditional_t<CanAlign, Ref<const Matrix<Scalar, Dynamic, 1, 0, blockSize, 1>, internal::evaluator<VectorTypeCopyClean>::Alignment>, typename VectorTypeCopyClean::ConstSegmentReturnType>':'clang-18: /android0/llvm-project/clang/lib/AST/NestedNameSpecifier.cpp:309: void clang::NestedNameSpecifier::print(raw_ostream &, const PrintingPolicy &, bool) const: Assertion `!isa<ElaboratedType>(T) && "Elaborated type in nested-name-specifier"' failed.

2.75 hours of cvise later: https://github.com/llvm/llvm-project/issues/43179#issuecomment-1719922669

Can probably either rebuild with assertions disabled, or put a clearly wrong type and have the compiler tell me what it was. Doing the latter:

  const std::conditional_t<internal::is_same<float, CoeffReturnType>::value, TensorConversionOp<int, const TensorCwiseUnaryOp<bind2nd_op<scalar_sum_op<float, float>>, const TensorFixedSize<float, Sizes<2, 2>, 1, long>>>, TensorConversionOp<float, const TensorConversionOp<int, const TensorCwiseUnaryOp<bind2nd_op<scalar_sum_op<float, float>>, const TensorFixedSize<float, Sizes<2, 2>, 1, long>>>>>' (aka 'const Eigen::TensorConversionOp<float, const Eigen::TensorConversionOp<int, const Eigen::TensorCwiseUnaryOp<Eigen::internal::bind2nd_op<Eigen::internal::scalar_sum_op<float>>, const Eigen::TensorFixedSize<float, Eigen::Sizes<2, 2>, 1>>>>


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74094/new/

https://reviews.llvm.org/D74094



More information about the cfe-commits mailing list