[PATCH] D130466: [LICM] - Add option to allow data races

Aditya Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 10 11:29:16 PDT 2022


hiraditya added a comment.



In D130466#3709163 <https://reviews.llvm.org/D130466#3709163>, @gsocshubham wrote:

> I have compiled below testcase with options -
>
>   ../install-aarch64/bin/clang -mthread-model single thread.cpp -S -Ofast
>   clang-15: error: invalid thread model 'single' in '-mthread-model single' for this target
>
> -------thread.cpp----------
>
>   int u, v, restrict, i;
>   
>   void f(int a[restrict], int b[restrict], int n) {
>       for (i = 0; i < n; ++i) {
>           if (a[i]) {
>               ++u;
>               break;
>           }
>           ++u;
>           if (b[i])
>               ++v;
>       }
>   }
>
> ------------------------------
>
> Also, I tried with SPARC -
>
>   ../install-sparc/bin/clang -mthread-model single thread.cpp -S -Ofast
>   clang-15: error: invalid thread model 'single' in '-mthread-model single' for this target
>
> while for thread model posix, above commands works fine.

Check for examples here: test/Driver/thread-model.c

And list of architectures supporting single thread model in https://clang.llvm.org/doxygen/ToolChain_8cpp_source.html#l00729


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130466/new/

https://reviews.llvm.org/D130466



More information about the llvm-commits mailing list