Skip to content

Commit 19e0d6e

Browse files
sys-igcigcbot
authored andcommitted
[Autobackout][FunctionalRegression]Revert of change: 706d81d: Add an OCL option to enable profile-guided trimming
Add the OCL option -ze-opt-profile-guided-trimming to enable profile-guided trimming.
1 parent 34114bc commit 19e0d6e

File tree

8 files changed

+66
-276
lines changed

8 files changed

+66
-276
lines changed

IGC/AdaptorOCL/UnifyIROCL.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -430,10 +430,8 @@ static void CommonOCLBasedPasses(
430430
mpm.add(createSCCPPass());
431431
mpm.add(new ResolveConstExprCalls());
432432

433-
// Estimate maximal function size in the module and disable subroutine
434-
// if not profitable.
435-
mpm.add(createEstimateFunctionSizePass(
436-
pContext->m_Options.StaticProfileGuidedTrimming));
433+
// Estimate maximal function size in the module and disable subroutine if not profitable.
434+
mpm.add(createEstimateFunctionSizePass());
437435
mpm.add(createProcessFuncAttributesPass());
438436
FastMathFlags Mask;
439437
Mask.setFast();

IGC/Compiler/CISACodeGen/EstimateFunctionSize.cpp

Lines changed: 62 additions & 158 deletions
Large diffs are not rendered by default.

IGC/Compiler/CISACodeGen/EstimateFunctionSize.h

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ namespace IGC {
4242
AL_Kernel
4343
};
4444

45-
explicit EstimateFunctionSize(AnalysisLevel = AL_Module, bool = false);
45+
explicit EstimateFunctionSize(AnalysisLevel = AL_Module);
4646
~EstimateFunctionSize();
4747
EstimateFunctionSize(const EstimateFunctionSize&) = delete;
4848
EstimateFunctionSize& operator=(const EstimateFunctionSize&) = delete;
@@ -137,45 +137,9 @@ namespace IGC {
137137
llvm::ScaledNumber<uint64_t> thresholdForTrimming;
138138
std::unordered_map<llvm::Loop *, llvm::ScaledNumber<uint64_t>>
139139
LoopIterCnts;
140-
141-
// Flags for Kernel trimming
142-
bool ControlKernelTotalSize;
143-
bool ControlUnitSize;
144-
unsigned ControlInlineTinySize;
145-
unsigned UnitSizeThreshold;
146-
147-
// Flags for Static Profile-guided trimming
148-
bool StaticProfileGuidedTrimming;
149-
bool UseFrequencyInfoForSPGT;
150-
bool BlockFrequencySampling;
151-
bool EnableLeafCollapsing;
152-
bool EnableSizeContributionOptimization;
153-
bool LoopCountAwareTrimming;
154-
bool EnableGreedyTrimming;
155-
unsigned SizeWeightForSPGT;
156-
unsigned FrequencyWeightForSPGT;
157-
unsigned MetricForKernelSizeReduction;
158-
unsigned ParameterForColdFuncThreshold;
159-
unsigned ControlInlineTinySizeForSPGT;
160-
unsigned MaxUnrollCountForFunctionSizeAnalysis;
161-
unsigned SkipTrimmingOneCopyFunction;
162-
std::string SelectiveTrimming;
163-
164-
// Flags for Partitioning
165-
bool PartitionUnit;
166-
bool StaticProfileGuidedPartitioning;
167-
168-
// Flags for implcit arguments and external functions
169-
bool ForceInlineExternalFunctions;
170-
bool ForceInlineStackCallWithImplArg;
171-
bool ControlInlineImplicitArgs;
172-
unsigned SubroutineThreshold;
173-
unsigned KernelTotalSizeThreshold;
174-
unsigned ExpandedUnitSizeThreshold;
175140
};
176141

177142
llvm::ModulePass* createEstimateFunctionSizePass();
178-
llvm::ModulePass *createEstimateFunctionSizePass(bool);
179143
llvm::ModulePass* createEstimateFunctionSizePass(EstimateFunctionSize::AnalysisLevel);
180144

181145
} // namespace IGC

IGC/Compiler/CISACodeGen/OpenCLOptions.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -603,9 +603,5 @@ void Options::parseOptions(const char* opts)
603603
Xfinalizer = true;
604604
XfinalizerOption = arg->getValue();
605605
}
606-
607-
if (apiOptions.hasArg(OPT_static_profile_guided_trimming_common)) {
608-
StaticProfileGuidedTrimming = true;
609-
}
610606
}
611607
} // namespace IGC

IGC/Compiler/CISACodeGen/OpenCLOptions.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,6 @@ class Options
191191
// This option enables FP64 emulation for conversions
192192
// This applies to platforms that cannot HW support for double operations
193193
bool EnableFP64GenConvEmu = false;
194-
// This option enables static profile-guided trimming
195-
bool StaticProfileGuidedTrimming = false;
196194

197195
private:
198196
void parseOptions(const char* opts);

IGC/OCLFE/igd_fcl_mcl/source/clang_tb.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1374,9 +1374,7 @@ namespace TC
13741374
(strcmp(pParam, "-ze-fp64-gen-emu") == 0) || //used by fp64 emulation
13751375
(strcmp(pParam, "-cl-fp64-gen-conv-emu") == 0) || //used by fp64 conversion emulation
13761376
(strcmp(pParam, "-ze-fp64-gen-conv-emu") == 0) || //used by fp64 conversion emulation
1377-
(strcmp(pParam, "-Xfinalizer") == 0) || // used to pass options to visa finalizer
1378-
(strcmp(pParam, "-cl-intel-static-profile-guided-trimming") == 0) || //used to enable profile-guided trimming
1379-
(strcmp(pParam, "-ze-opt-static-profile-guided-trimming") == 0); //used to enable profile-guided trimming
1377+
(strcmp(pParam, "-Xfinalizer") == 0); // used to pass options to visa finalizer
13801378

13811379
if (isCommonOption)
13821380
{

IGC/Options/include/igc/Options/IGCApiOptions.td

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,6 @@ defm fp64_gen_emu : CommonFlag<"fp64-gen-emu">;
5858
// -cl-fp64-gen-conv-emu -ze-fp64-gen-conv-emu
5959
defm fp64_gen_conv_emu : CommonFlag<"fp64-gen-conv-emu">;
6060

61-
// -cl-intel-profile-guided-trimming, -ze-opt-profile-guided-trimming
62-
defm static_profile_guided_trimming : CommonFlag<"static-profile-guided-trimming">;
63-
6461
// }} Backend API options
6562

6663
// API options from source translation {{

IGC/ocloc_tests/features/static_profile_guided_trimming/static_profile_guided_trimming.cl

Lines changed: 0 additions & 65 deletions
This file was deleted.

0 commit comments

Comments
 (0)