[ThinLTO] Always import constants
This patch imports constant variables even when they can't be internalized (which results in promotion). This offers some extra constant folding opportunities. Differential revision: https://reviews.llvm.org/D70404
This commit is contained in:
@@ -1028,7 +1028,8 @@ static uint64_t getEncodedGVSummaryFlags(GlobalValueSummary::GVFlags Flags) {
|
||||
}
|
||||
|
||||
static uint64_t getEncodedGVarFlags(GlobalVarSummary::GVarFlags Flags) {
|
||||
uint64_t RawFlags = Flags.MaybeReadOnly | (Flags.MaybeWriteOnly << 1);
|
||||
uint64_t RawFlags =
|
||||
Flags.MaybeReadOnly | (Flags.MaybeWriteOnly << 1) | (Flags.Constant << 2);
|
||||
return RawFlags;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user