mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
SILModule::hasLoweredAddress
This commit is contained in:
@@ -307,6 +307,12 @@ private:
|
||||
/// The stage of processing this module is at.
|
||||
SILStage Stage;
|
||||
|
||||
/// True if SIL conventions force address-only to be passed by address.
|
||||
///
|
||||
/// Used for bootstrapping the AddressLowering pass. This should eventually
|
||||
/// be inferred from the SIL stage to be true only when Stage == Lowered.
|
||||
bool loweredAddresses;
|
||||
|
||||
/// The set of deserialization notification handlers.
|
||||
DeserializationNotificationHandlerSet deserializationNotificationHandlers;
|
||||
|
||||
@@ -796,6 +802,11 @@ public:
|
||||
Stage = s;
|
||||
}
|
||||
|
||||
/// True if SIL conventions force address-only to be passed by address.
|
||||
bool useLoweredAddresses() const { return loweredAddresses; }
|
||||
|
||||
void setLoweredAddresses(bool val) { loweredAddresses = val; }
|
||||
|
||||
llvm::IndexedInstrProfReader *getPGOReader() const { return PGOReader.get(); }
|
||||
|
||||
void setPGOReader(std::unique_ptr<llvm::IndexedInstrProfReader> IPR) {
|
||||
@@ -962,15 +973,13 @@ inline bool SILOptions::supportsLexicalLifetimes(const SILModule &mod) const {
|
||||
// entirely.
|
||||
return LexicalLifetimes != LexicalLifetimesOption::Off;
|
||||
case SILStage::Canonical:
|
||||
case SILStage::Lowered:
|
||||
// In Canonical SIL, lexical markers are used to ensure that object
|
||||
// lifetimes do not get observably shortened from the end of a lexical
|
||||
// scope. That behavior only occurs when lexical lifetimes is (fully)
|
||||
// enabled. (When only diagnostic markers are enabled, the markers are
|
||||
// stripped as part of lowering from raw to canonical SIL.)
|
||||
return LexicalLifetimes == LexicalLifetimesOption::On;
|
||||
case SILStage::Lowered:
|
||||
// We do not support OSSA in Lowered SIL, so this is always false.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user