Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FunctionAttrs] Volatile operations can access inaccessible memory
Per LangRef, volatile operations are allowed to access the location of their pointer argument, plus inaccessible memory: > Any volatile operation can have side effects, and any volatile > operation can read and/or modify state which is not accessible > via a regular load or store in this module. > [...] > The allowed side-effects for volatile accesses are limited. If > a non-volatile store to a given address would be legal, a volatile > operation may modify the memory at that address. A volatile > operation may not modify any other memory accessible by the > module being compiled. A volatile operation may not call any > code in the current module. FunctionAttrs currently does not model this and ends up marking functions with volatile accesses on arguments as argmemonly, even though they should be inaccessiblemem_or_argmemonly. Differential Revision: https://reviews.llvm.org/D135863
- Loading branch information
Showing
4 changed files
with
14 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters