Skip to content

Commit b4426c8

Browse files
azabaznoigcbot
authored andcommitted
Use env variable for accumulator localization if it is only set to true
1 parent dfed487 commit b4426c8

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

IGC/VectorCompiler/igcdeps/src/TranslationInterface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ static void adjustBinaryFormat(vc::BinaryKind &Binary) {
172172

173173
static void adjustTransformationsAndOptimizations(vc::CompileOptions &Opts) {
174174
if (IGC_IS_FLAG_ENABLED(VCLocalizeAccUsage))
175-
Opts.LocalizeLiveRangesForAccUsage = true;
175+
Opts.ForceLiveRangesLocalizationForAccUsage = true;
176176
}
177177

178178
static void adjustDumpOptions(vc::CompileOptions &Opts) {

IGC/VectorCompiler/include/vc/GenXCodeGen/GenXWrapper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ struct CompileOptions {
8282

8383
OptimizerLevel OptLevel = OptimizerLevel::Full;
8484
llvm::Optional<unsigned> StackMemSize;
85-
bool LocalizeLiveRangesForAccUsage = false;
85+
bool ForceLiveRangesLocalizationForAccUsage = false;
8686

8787
// Internal options.
8888
std::string FeaturesString; // format is: [+-]<feature1>,[+-]<feature2>,...

IGC/VectorCompiler/lib/GenXCodeGen/GenXWrapper.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,8 @@ static GenXBackendOptions createBackendOptions(const vc::CompileOptions &Opts) {
229229
? GlobalsLocalizationConfig::CreateLocalizationWithLimit()
230230
: GlobalsLocalizationConfig::CreateForcedLocalization();
231231
BackendOpts.ForceArrayPromotion = (Opts.Binary == vc::BinaryKind::CM);
232-
BackendOpts.LocalizeLRsForAccUsage = Opts.LocalizeLiveRangesForAccUsage;
232+
if (Opts.ForceLiveRangesLocalizationForAccUsage)
233+
BackendOpts.LocalizeLRsForAccUsage = true;
233234
return BackendOpts;
234235
}
235236

0 commit comments

Comments
 (0)