-
Notifications
You must be signed in to change notification settings - Fork 15k
[llvm] Add vfs::FileSystem to PassBuilder
#160188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@llvm/pr-subscribers-backend-arm @llvm/pr-subscribers-clang-codegen Author: Jan Svoboda (jansvoboda11) ChangesSome LLVM passes need access to the filesystem to read configuration files and similar. In some places, this is achieved by grabbing the VFS from Patch is 25.70 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/160188.diff 10 Files Affected:
|
c7afccc to
7b36dad
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM in general.
Nit: I will title the commit to be add VFS to PassBuilder so LLVM passes can access file through VFS, and lifting PGO option is just one use case for that.
PGOOptions to PassBuildervfs::FileSystem to PassBuilder
Some LLVM passes need access to the filesystem to read configuration files and similar. In some places, this is achieved by grabbing the VFS from `PGOOptions`, but some passes don't have access to these and resort to just calling `vfs::getRealFileSystem()`. This PR allows setting the VFS directly on `PassBuilder` that's able to pass it down to all passes that need it.
Some LLVM passes need access to the filesystem to read configuration files and similar. In some places, this is achieved by grabbing the VFS from `PGOOptions`, but some passes don't have access to these and resort to just calling `vfs::getRealFileSystem()`. This PR allows setting the VFS directly on `PassBuilder` that's able to pass it down to all passes that need it.
Some LLVM passes need access to the filesystem to read configuration files and similar. In some places, this is achieved by grabbing the VFS from `PGOOptions`, but some passes don't have access to these and resort to just calling `vfs::getRealFileSystem()`. This PR allows setting the VFS directly on `PassBuilder` that's able to pass it down to all passes that need it.
Some LLVM passes need access to the filesystem to read configuration files and similar. In some places, this is achieved by grabbing the VFS from
PGOOptions, but some passes don't have access to these and resort to just callingvfs::getRealFileSystem(). This PR allows setting the VFS directly onPassBuilderthat's able to pass it down to all passes that need it.