diff options
author | Kiran Kumar T P <kirankumar.tp@amd.com> | 2020-09-29 09:41:46 +0530 |
---|---|---|
committer | Kiran Kumar T P <kirankumar.tp@amd.com> | 2020-09-29 09:41:46 +0530 |
commit | f3ead88e9c6c352edb10cba43e62696fc852c7d6 (patch) | |
tree | 4b5af7ae3a9dc229dbba9dde98c6da7e808d3569 /llvm/lib/Transforms/Utils/LoopUtils.cpp | |
parent | ca1ce397acc39f348f4018e446c84a5746fd5e1e (diff) | |
download | llvm-f3ead88e9c6c352edb10cba43e62696fc852c7d6.zip llvm-f3ead88e9c6c352edb10cba43e62696fc852c7d6.tar.gz llvm-f3ead88e9c6c352edb10cba43e62696fc852c7d6.tar.bz2 |
[MLIR][OpenMP] Removed the ambiguity in flush op assembly syntax
Summary:
========
Bugzilla Ticket No: Bug 46884 [https://bugs.llvm.org/show_bug.cgi?id=46884]
Flush op assembly syntax was ambiguous:
Consider the below test case:
flush operation is not having any arguments.
But the next statement token i.e "%2" is read as the argument for flush operation and then translator issues an error.
***************************************************************
$ cat -n flush.mlir
1 llvm.func @_QQmain(%arg0: !llvm.i32) {
2 %0 = llvm.mlir.constant(1 : i64) : !llvm.i64
3 %1 = llvm.alloca %0 x !llvm.i32 {in_type = i32, name = "a"} : (!llvm.i64) -> !llvm.ptr<i32>
4 omp.flush
5 %2 = llvm.load %1 : !llvm.ptr<i32>
6 llvm.return
7 }
$ mlir-translate -mlir-to-llvmir flush.mlir
flush.mlir:5:6: error: expected ':'
%2 = llvm.load %1 : !llvm.ptr<i32>
^
***************************************************************
Solution:
=========
Introduced begin ( `(` ) and end token ( `)` ) to determince the begin and end of variadic arguments.
The patch includes code changes and testcase modifications.
Reviewed By: Valentin Clement, Mehdi AMINI
Differential Revision: https://reviews.llvm.org/D88376
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUtils.cpp')
0 files changed, 0 insertions, 0 deletions