[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:
Roman Levenstein
2015-04-29 18:02:12 +00:00
parent 0c6e412116
commit dcd3055360
4 changed files with 253 additions and 4 deletions

View File

@@ -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