#184545 default-enables the IO sandbox in assert-builds. This causes Clang using Polly to crash (#188568). The issue is that `PassBuilder` uses `vfs::getRealFileSystem()` by default which is considered a IO sandbox violation in the Clang process. With this PR store the VFS from the `PassBuilder` from the original `registerPollyPasses` call for creating other `PassBuilder` instances. This PR also adds infrastructure for running Polly in `clang` (in addition in `opt`). `opt` does not enable the sandbox such that we need separate tests using Clang. Closes: #188568
10 lines
265 B
C
10 lines
265 B
C
// Sanity test for Polly in Clang
|
|
// RUN: %clang %s -O2 -c -mllvm -polly -mllvm -polly-process-unprofitable -mllvm -print-pipeline-passes -o %t.o | FileCheck %s
|
|
|
|
// CHECK: ,polly,
|
|
|
|
void foo(int *A, int *B, int n) {
|
|
for (int i = 0; i < n; ++i)
|
|
A[i] += B[i];
|
|
}
|