aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorBenjamin Maxwell <benjamin.maxwell@arm.com>2023-08-09 09:03:00 +0000
committerBenjamin Maxwell <benjamin.maxwell@arm.com>2023-08-09 09:38:05 +0000
commit3875804a0725c6490b4c0e76e1c0e1e0dbccedf4 (patch)
treef531a30a33d97d61f06ca02086f3dc10d63920f7 /clang/lib/Frontend/CompilerInvocation.cpp
parent60e2a849b0a537f96ca12fb032c4a0e32e07b4ae (diff)
downloadllvm-3875804a0725c6490b4c0e76e1c0e1e0dbccedf4.zip
llvm-3875804a0725c6490b4c0e76e1c0e1e0dbccedf4.tar.gz
llvm-3875804a0725c6490b4c0e76e1c0e1e0dbccedf4.tar.bz2
[mlir][VectorOps] Use SCF for vector.print and allow scalable vectors
This patch splits the lowering of vector.print into first converting an n-D print into a loop of scalar prints of the elements, then a second pass that converts those scalar prints into the runtime calls. The former is done in VectorToSCF and the latter in VectorToLLVM. The main reason for this is to allow printing scalable vector types, which are not possible to fully unroll at compile time, though this also avoids fully unrolling very large vectors. To allow VectorToSCF to add the necessary punctuation between vectors and elements, a "punctuation" attribute has been added to vector.print. This abstracts calling the runtime functions such as printNewline(), without leaking the LLVM details into the higher abstraction levels. For example: vector.print <comma> lowers to llvm.call @printComma() : () -> () The output format and runtime functions remain the same, which avoids the need to alter a large number of tests (aside from the pipelines). Reviewed By: awarzynski, c-rhodes, aartbik Differential Revision: https://reviews.llvm.org/D156519
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions