mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[load-store-opts] Avoid re-loading values of "let"-variables
Teach LoadStoreOpts to handle "let" variables properly. Such variables should be loaded only once and their loaded values can be reused. This is safe, because once assigned these variables cannot change their value. Swift SVN r27915
This commit is contained in:
@@ -142,6 +142,9 @@ llvm::raw_ostream &operator<<(llvm::raw_ostream &OS,
|
||||
/// "true" type of the instruction.
|
||||
SILType findTypedAccessType(SILValue V);
|
||||
|
||||
/// Check if V points to a let-variable.
|
||||
bool isLetPointer(SILValue V);
|
||||
|
||||
} // end namespace swift
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user