aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorNicolas Vasilache <ntv@google.com>2020-03-02 09:59:01 -0500
committerNicolas Vasilache <ntv@google.com>2020-03-02 11:03:53 -0500
commit78f9e5d098af95610f4542ee41479d7931261066 (patch)
treec02d1d6a05138a99cf3945d21ab304800240afed /clang/lib/Frontend/CompilerInvocation.cpp
parent8a37b9e61798ad6bb0e268d989c2f8b00a216414 (diff)
downloadllvm-78f9e5d098af95610f4542ee41479d7931261066.zip
llvm-78f9e5d098af95610f4542ee41479d7931261066.tar.gz
llvm-78f9e5d098af95610f4542ee41479d7931261066.tar.bz2
[mlir] Add padding to 1-D Vector in CRunnerUtils.h
Summary: This revision adds padding for 1-D Vector in the common case of x86 execution with a stadard data layout. This supports properly interfacing codegen with arrays of e.g. `vector<9xf32>`. Such vectors are already assumed padded to the next power of 2 by LLVM codegen with the default x86 data layout: ``` define void @test_vector_add_1d_2_3(<3 x float>* nocapture readnone %0, <3 x float>* nocapture readonly %1, i64 %2, i64 %3, i64 %4, <3 x float>* nocapture readnone %5, <3 x float>* nocapture readonly %6, i64 %7, i64 %8, i64 %9, <3 x float>* nocapture readnone %10, <3 x float>* nocapture %11, i64 %12, i64 %13, i64 %14) local_unnamed_addr { %16 = getelementptr <3 x float>, <3 x float>* %6, i64 1 %17 = load <3 x float>, <3 x float>* %16, align 16 %18 = getelementptr <3 x float>, <3 x float>* %1, i64 1 %19 = load <3 x float>, <3 x float>* %18, align 16 %20 = fadd <3 x float> %17, %19 %21 = getelementptr <3 x float>, <3 x float>* %11, i64 1 ``` The pointer addressing a `vector<3xf32>` is assumed aligned `@16`. Similarly, the pointer addressing a `vector<65xf32>` is assumed aligned `@512`. This revision allows using objects such as `vector<3xf32>` properly with the standard x86 data layout used in the JitRunner. Integration testing is done out of tree, at the moment such testing fails without this change. Reviewers: ftynse Subscribers: mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, arpith-jacob, mgester, lucyrfox, liufengdb, Joonsoo, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D75459
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions