llvm-project/polly/lib/Support/PollyPasses.def
Michael Kruse 458f1aae8d
[Polly] Forward VFS from PassBuilder for IO sandboxing (#188657)
#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
2026-03-28 23:55:05 +01:00

20 lines
722 B
Modula-2

#ifndef MODULE_PASS
#define MODULE_PASS(NAME, CREATE_PASS, PARSER)
#endif
MODULE_PASS("polly", createModuleToFunctionPassAdaptor(PollyFunctionPass(Opts)), parsePollyDefaultOptions)
MODULE_PASS("polly-custom", createModuleToFunctionPassAdaptor(PollyFunctionPass(Opts)), parsePollyCustomOptions)
#undef MODULE_PASS
#ifndef CGSCC_PASS
#define CGSCC_PASS(NAME, CREATE_PASS, PARSER)
#endif
CGSCC_PASS("polly-inline", ScopInlinerPass(FS), parseNoOptions)
#undef CGSCC_PASS
#ifndef FUNCTION_PASS
#define FUNCTION_PASS(NAME, CREATE_PASS, PARSER)
#endif
FUNCTION_PASS("polly", PollyFunctionPass(Opts), parsePollyDefaultOptions)
FUNCTION_PASS("polly-custom", PollyFunctionPass(Opts), parsePollyCustomOptions)
#undef FUNCTION_PASS