Skip to content

Conversation

@AsyaPronina
Copy link
Contributor

DO NOT FILE A PULL REQUEST

This repository does not accept pull requests. Please follow http://llvm.org/docs/Contributing.html#how-to-submit-a-patch for contribution to LLVM.

DO NOT FILE A PULL REQUEST

Vladislav Vinogradov and others added 23 commits July 25, 2022 19:19
* Remove `std::forward` call for `iterator_range` iterator de-reference.
* Use exact type `T` in `has_StreamOperator` instead of constant reference.

It fixes formatting usage for some tricky cases, like special ranges,
which de-reference to value type.

It fixes formatting usage with `mlir::Operation` type,
which is always passed by non-const reference.

Differential Revision: https://reviews.llvm.org/D94769
Remove `std::forward` call for `iterator_range` iterator de-reference.
It fixes formatting usage for some tricky cases, like special ranges,
which de-reference to value type.

Differential Revision: https://reviews.llvm.org/D94769
It is added to callbacks for MLIR -> outer format conversion.
Can be used for the transations that can't work with `raw_ostream`.
Based on the following discussion:
https://llvm.discourse.group/t/declarative-assembly-format-requirement-for-type-presence/4399

Relax checks in `OperationParser` - it allows to skip value type specification,
if the value was already defined in the same block.

Differential Revision: https://reviews.llvm.org/D111650
* - fixed uninitialized array declaration in `mlir-tblgen/OpFormatGen.cpp`
   - fixed creating `void` methods returning value in `mlir-tblgen/OpInterfacesGen.cpp`

* Apply comment on OpInterfacesGen.cpp by nikita-kud
…orce

Do not set CMAKE_CXX_FLAGS_<config> with FORCE
[OS] - Put Apache 2.0 license headers in dependencies
@Maxim-Doronin Maxim-Doronin merged commit 2bfd60b into intel:vpux/release/14.x Feb 16, 2023
Maxim-Doronin pushed a commit that referenced this pull request Jul 13, 2023
[OS] - Put Apache 2.0 license headers in dependencies
StefaniaHergane pushed a commit to StefaniaHergane/vpux-plugin-llvm that referenced this pull request Oct 12, 2023
For the following program,
  $ cat t.c
  struct t {
   int (__attribute__((btf_type_tag("rcu"))) *f)();
   int a;
  };
  int foo(struct t *arg) {
    return arg->a;
  }
Compiling with 'clang -g -O2 -S t.c' will cause a failure like below:
  clang: /home/yhs/work/llvm-project/clang/lib/Sema/SemaType.cpp:6391: void {anonymous}::DeclaratorLocFiller::VisitParenTypeLoc(clang::ParenTypeLoc):
         Assertion `Chunk.Kind == DeclaratorChunk::Paren' failed.
  PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
  Stack dump:
  ......
  intel#5 0x00007f89e4280ea5 abort (/lib64/libc.so.6+0x21ea5)
  intel#6 0x00007f89e4280d79 _nl_load_domain.cold.0 (/lib64/libc.so.6+0x21d79)
  intel#7 0x00007f89e42a6456 (/lib64/libc.so.6+0x47456)
  intel#8 0x00000000045c2596 GetTypeSourceInfoForDeclarator((anonymous namespace)::TypeProcessingState&, clang::QualType, clang::TypeSourceInfo*) SemaType.cpp:0:0
  intel#9 0x00000000045ccfa5 GetFullTypeForDeclarator((anonymous namespace)::TypeProcessingState&, clang::QualType, clang::TypeSourceInfo*) SemaType.cpp:0:0
  ......

The reason of the failure is due to the mismatch of TypeLoc and D.getTypeObject().Kind. For example,
the TypeLoc is
  BTFTagAttributedType 0x88614e0 'int  btf_type_tag(rcu)()' sugar
  |-ParenType 0x8861480 'int ()' sugar
  | `-FunctionNoProtoType 0x8861450 'int ()' cdecl
  |   `-BuiltinType 0x87fd500 'int'
while corresponding D.getTypeObject().Kind points to DeclaratorChunk::Paren, and
this will cause later assertion.

To fix the issue, similar to AttributedTypeLoc, let us skip BTFTagAttributedTypeLoc in
GetTypeSourceInfoForDeclarator().

Differential Revision: https://reviews.llvm.org/D136807
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants