Skip to content

[FR] Enable LLVM Polly #1096

@a1batross

Description

@a1batross

In our app, we don't write vectorized code by hand, instead we're relying on compiler autovectorization. In legacy NDK we used GCC's Graphite and now when we switched to latest NDK r20, I've noticed that Polly, LLVM's alternative to GCC Graphite, isn't enabled in NDK toolchains.

Simple way to check if it's enabled:

$ ./aarch64-linux-android21-clang -mllvm -polly -xc -c - -o test.o < /dev/null
clang (LLVM option parsing): Unknown command line argument '-polly'.  Try: 'clang (LLVM option parsing) -help'
clang (LLVM option parsing): Did you mean '-color'?
$ echo $?
1

When on Clang 8 from LLVM's APT repository it doesn't show an error:

$ clang-8 -target aarch64-linux-android21 -mllvm -polly -xc -c - -o test.o < /dev/null
$ echo $?
0

Our app is crossplatform, so testing Polly on Linux ARM machine is resulted performance boost around 10%. Is there any bugs on Android so it's not available?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions