Changes

Summary

  1. [mlir][linalg][bufferize][NFC] Utilize isWritable for FuncOps (details)
  2. [clang][DebugInfo] Allow function-local statics and types to be scoped within a lexical block (details)
  3. [VE] Support multiple architectures installation (details)
  4. [NFC][LICM] Update the comment in the scalar-promote.ll (details)
  5. [ARM] Add a vrinta.f16.f16 alias (details)
  6. [VE] Change to use R_VE_SREL32 (details)
  7. [ARM] Implement setjmp BTI placement for PACBTI-M (details)
  8. [VE] Support VE specific data directives in MC (details)
  9. [clang][docs][dataflow] Added an introduction to dataflow analysis (details)
  10. [LV] Pass compare predicate to getCmpSelInstrCost. (details)
  11. tsan: disable dlopen_static_tls.cpp test on powerpc64 (details)
  12. [Clang] Ignore CLANG_DEFAULT_LINKER for custom-linker toolchains (details)
  13. [mlir] Avoid needlessly converting LLVM named structs with compatible elements (details)
Commit e761c49a14a8fb84898694d68218dba906aa9272 by springerm
[mlir][linalg][bufferize][NFC] Utilize isWritable for FuncOps

This is a cleanup of ModuleBufferization. Instead of storing information about writable function arguments in BufferizationAliasInfo, we can use isWritable and make the decision there, based on dialect-specifc bufferization state.

Differential Revision: https://reviews.llvm.org/D114930
The file was modifiedmlir/lib/Dialect/Linalg/ComprehensiveBufferize/ModuleBufferization.cpp
The file was modifiedmlir/include/mlir/Dialect/Linalg/ComprehensiveBufferize/BufferizableOpInterface.td
The file was modifiedmlir/lib/Dialect/Linalg/ComprehensiveBufferize/BufferizationInterfaceImpl.cpp
The file was modifiedmlir/lib/Dialect/Linalg/ComprehensiveBufferize/ArithInterfaceImpl.cpp
The file was modifiedmlir/lib/Dialect/Linalg/ComprehensiveBufferize/SCFInterfaceImpl.cpp
The file was modifiedmlir/lib/Dialect/Linalg/ComprehensiveBufferize/LinalgInterfaceImpl.cpp
The file was modifiedmlir/lib/Dialect/Linalg/ComprehensiveBufferize/ComprehensiveBufferize.cpp
The file was modifiedmlir/include/mlir/Dialect/Linalg/ComprehensiveBufferize/BufferizableOpInterface.h
The file was modifiedmlir/lib/Dialect/Linalg/ComprehensiveBufferize/BufferizableOpInterface.cpp
Commit e403f4fdc88322201040f2bee7b328e8a78e2f7f by kbessonova
[clang][DebugInfo] Allow function-local statics and types to be scoped within a lexical block

This is almost a reincarnation of https://reviews.llvm.org/D15977 originally
implemented by Amjad Aboud. It was discussed on llvm-dev [0], committed
with its backend counterpart [1], but finally reverted [2].

This patch makes clang to emit debug info for function-local static variables,
records (classes, structs and unions) and typdefs correctly scoped if
those function-local entites defined within a lexical (bracketed) block.

Before this patch, clang emits all those entities directly scoped in
DISubprogram no matter where they were really defined, causing
debug info loss (reported several times in [3], [4], [5]).

[0] https://lists.llvm.org/pipermail/llvm-dev/2015-November/092551.html
[1] https://reviews.llvm.org/rG30e7a8f694a19553f64b3a3a5de81ce317b9ec2f
[2] https://reviews.llvm.org/rGdc4531e552af6c880a69d226d3666756198fbdc8
[3] https://bugs.llvm.org/show_bug.cgi?id=19238
[4] https://bugs.llvm.org/show_bug.cgi?id=23164
[5] https://bugs.llvm.org/show_bug.cgi?id=44695

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D113743
The file was modifiedclang/lib/CodeGen/CGDecl.cpp
The file was modifiedclang/lib/CodeGen/CGDebugInfo.h
The file was addedclang/test/CodeGenCXX/debug-info-lexcial-block.cpp
The file was modifiedclang/lib/CodeGen/CGDebugInfo.cpp
Commit 83f572527e0fcc1cd0be8ee23bc12abf27027daf by marukawa
[VE] Support multiple architectures installation

Change C++ header files placement to support multiple LLVM_RUNTIME_TARGETS
build.  Also modifies regression test for it.

Reviewed By: simoll

Differential Revision: https://reviews.llvm.org/D114527
The file was modifiedclang/test/Driver/ve-toolchain.cpp
The file was addedclang/test/Driver/Inputs/basic_ve_tree/include/ve-unknown-linux-gnu/c++/v1/.keep
The file was addedclang/test/Driver/Inputs/basic_ve_tree/include/c++/v1/.keep
The file was modifiedclang/lib/Driver/ToolChains/VEToolchain.cpp
The file was modifiedclang/test/Driver/ve-toolchain.c
The file was addedclang/test/Driver/Inputs/basic_ve_tree/bin/.keep
Commit 0b23b80985e417e46d97c95f891f3e601dbfa5f1 by djtodoro
[NFC][LICM] Update the comment in the scalar-promote.ll

The comment was stale after the https://reviews.llvm.org/D113289
was committed.
The file was modifiedllvm/test/Transforms/LICM/scalar-promote.ll
Commit d8495e03529201e8af9abeab05a3f671d0249041 by david.green
[ARM] Add a vrinta.f16.f16 alias

The v8.1-m ARMARM uses the vrinta.f16.f16 names, as opposed to
vrinta.f16. This adds an alias for it in the same way that we have for
f32 and f64.

Differential Revision: https://reviews.llvm.org/D68127
The file was modifiedllvm/test/MC/ARM/fullfp16.s
The file was modifiedllvm/lib/Target/ARM/ARMInstrVFP.td
The file was modifiedllvm/test/MC/ARM/fullfp16-neg.s
Commit 6b41eb7f26d06ce018c0218360f9cdec239f2caa by marukawa
[VE] Change to use R_VE_SREL32

Change to use R_VE_SREL32 for relative branch instructions instead of
R_VE_PC_LO32 in order to check ranges of relative branch isntructions
at link time correctly.

Reviewed By: simoll

Differential Revision: https://reviews.llvm.org/D115097
The file was modifiedllvm/lib/Target/VE/MCTargetDesc/VEAsmBackend.cpp
The file was modifiedllvm/lib/Target/VE/MCTargetDesc/VEFixupKinds.h
The file was modifiedllvm/lib/Target/VE/MCTargetDesc/VEMCCodeEmitter.cpp
The file was modifiedllvm/lib/Target/VE/MCTargetDesc/VEELFObjectWriter.cpp
The file was modifiedllvm/test/MC/VE/sym-br.s
Commit 0fbb17458a01a6b388fc67661ffb92969503e977 by ties.stuij
[ARM] Implement setjmp BTI placement for PACBTI-M

This patch intends to guard indirect branches performed by longjmp
by inserting BTI instructions after calls to setjmp.

Calls with 'returns-twice' are lowered to a new pseudo-instruction
named t2CALL_BTI that is later expanded to a bundle of {tBL,t2BTI}.

This patch is part of a series that adds support for the PACBTI-M extension of
the Armv8.1-M architecture, as detailed here:

https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/armv8-1-m-pointer-authentication-and-branch-target-identification-extension

The PACBTI-M specification can be found in the Armv8-M Architecture Reference
Manual:

https://developer.arm.com/documentation/ddi0553/latest

The following people contributed to this patch:

- Alexandros Lamprineas
- Ties Stuij

Reviewed By: labrinea

Differential Revision: https://reviews.llvm.org/D112427
The file was addedclang/test/Driver/arm-bti-return-twice.c
The file was modifiedllvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp
The file was modifiedllvm/lib/Target/ARM/ARMISelLowering.h
The file was modifiedclang/include/clang/Driver/Options.td
The file was modifiedllvm/lib/Target/ARM/ARMInstrThumb2.td
The file was modifiedllvm/lib/Target/ARM/ARMSubtarget.h
The file was addedllvm/test/CodeGen/ARM/setjmp-bti-outliner.ll
The file was modifiedllvm/lib/Target/ARM/ARMISelLowering.cpp
The file was addedllvm/test/CodeGen/ARM/setjmp-bti-basic.ll
The file was modifiedclang/lib/Driver/ToolChains/Arch/ARM.cpp
The file was modifiedllvm/lib/Target/ARM/ARM.td
The file was modifiedclang/docs/ClangCommandLineReference.rst
Commit 9d20fa09eb806cd210d040e5e1e9b29c6e40e98e by marukawa
[VE] Support VE specific data directives in MC

Support VE specific data directives, .word/.long/.llong, in MC layer.

Reviewed By: simoll

Differential Revision: https://reviews.llvm.org/D115120
The file was addedllvm/test/MC/VE/data.s
The file was modifiedllvm/lib/Target/VE/AsmParser/VEAsmParser.cpp
The file was addedllvm/test/MC/VE/data-size-error.s
Commit ab31d003e16e483bff298ea2f28fec0f23e8eb79 by gribozavr
[clang][docs][dataflow] Added an introduction to dataflow analysis

This documentation supports the dataflow analysis framework (see "[RFC]
A dataflow analysis framework for Clang AST" on cfe-dev).

Since the implementation of the framework has not been committed yet,
right now the doc describes dataflow analysis in general.

Since this is the first markdown document in clang/docs, I added support
for Markdown to clang/docs/conf.py in the same way as it is done in
llvm/docs.

Reviewed By: xazax.hun

Differential Revision: https://reviews.llvm.org/D114231
The file was addedclang/docs/DataFlowAnalysisIntroImages/OutputParameterIdentificationLattice.svg
The file was addedclang/docs/DataFlowAnalysisIntroImages/IntegerSetsInfiniteLattice.svg
The file was addedclang/docs/DataFlowAnalysisIntroImages/IntegerSetsFiniteLattice.svg
The file was addedclang/docs/DataFlowAnalysisIntroImages/DefinitiveInitializationLattice.svg
The file was modifiedclang/docs/conf.py
The file was addedclang/docs/DataFlowAnalysisIntroImages/CFGJoinRule.svg
The file was addedclang/docs/DataFlowAnalysisIntro.md
The file was addedclang/docs/DataFlowAnalysisIntroImages/CFGExample.svg
The file was addedclang/docs/DataFlowAnalysisIntroImages/UniquePtrLattice.svg
The file was modifiedclang/docs/index.rst
Commit 3d549dddf75b6ff9e0ec8c053677750bde4226ea by sander.desmalen
[LV] Pass compare predicate to getCmpSelInstrCost.

If the condition of a select is a compare, pass its predicate to
TTI::getCmpSelInstrCost to get a more accurate cost value instead
of passing BAD_ICMP_PREDICATE.

I noticed that the commit message from D90070 had a comment about the
vectorized select predicate possibly being composed of other compares with
different predicate values, but I wasn't able to construct an example
where this was an actual issue. If this is an issue, I guess we could
add another check that the block isn't predicated for any reason.

Reviewed By: dmgreen, fhahn

Differential Revision: https://reviews.llvm.org/D114646
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorize.cpp
The file was modifiedllvm/test/Transforms/LoopVectorize/AArch64/select-costs.ll
Commit 954582cdfc23a5dd90cb5bf6e5a0c45db300169e by dvyukov
tsan: disable dlopen_static_tls.cpp test on powerpc64

Reviewed By: melver

Differential Revision: https://reviews.llvm.org/D115142
The file was modifiedcompiler-rt/test/tsan/Linux/dlopen_static_tls.cpp
Commit 34a43f2115af79f896c889433c57f3b400e9f2c6 by simon.moll
[Clang] Ignore CLANG_DEFAULT_LINKER for custom-linker toolchains

Before, the CLANG_DEFAULT_LINKER cmake option was a global override for
the linker that shall be used on all toolchains.  The linker binary
specified that way may not be available on toolchains with custom
linkers. Eg, the only linker for VE is named 'nld' - any other linker
invalidates the toolchain.

This patch removes the hard override and instead lets the generic
toolchain implementation default to CLANG_DEFAULT_LINKER.  Toolchains
can now deviate with a custom linker name or deliberatly default to
CLANG_DEFAULT_LINKER.

Reviewed By: MaskRay, phosek

Differential Revision: https://reviews.llvm.org/D115045
The file was modifiedclang/test/Driver/ve-toolchain.c
The file was modifiedclang/include/clang/Driver/ToolChain.h
The file was modifiedclang/test/Driver/ve-toolchain.cpp
The file was modifiedclang/lib/Driver/ToolChain.cpp
Commit d64b3e47ba6347ef4c68c0666a90eda8f986f525 by zinenko
[mlir] Avoid needlessly converting LLVM named structs with compatible elements

Conversion of LLVM named structs leads to them being renamed since we cannot
modify the body of the struct type once it is set. Previously, this applied to
all named struct types, even if their element types were not affected by the
conversion. Make this behvaior only applicable when element types are changed.
This requires making the LLVM dialect type-compatibility check recursively look
at the element types (arguably, it should have been doing than since the moment
the LLVM dialect type system stopped being closed). In addition, have a more
lax check for outer types only to avoid repeated check when necessary (e.g.,
parser, verifiers that are going to also look at the inner type).

Reviewed By: wsmoses

Differential Revision: https://reviews.llvm.org/D115037
The file was modifiedmlir/test/Conversion/StandardToLLVM/convert-types.mlir
The file was modifiedmlir/lib/Conversion/LLVMCommon/TypeConverter.cpp
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/LLVMTypeSyntax.cpp
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMTypes.h
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/LLVMTypes.cpp