Skip to content

Commit

Permalink
Add compiler option -ze-skip-fde to skip emission of FDE for
Browse files Browse the repository at this point in the history
stack call functions

Frame Descriptor Entry (FDE) is emitted by VISA in prolog of each stack
call function. Leaf functions can skip FDE store.
  • Loading branch information
pratikashar authored and igcbot committed Sep 15, 2023
1 parent 8ed5605 commit 48ad0dd
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 2 deletions.
5 changes: 5 additions & 0 deletions IGC/Compiler/CISACodeGen/CISABuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4028,6 +4028,11 @@ namespace IGC
{
SaveOption(vISA_GTPinGetIndirRef, true);
}

if (ClContext->m_Options.SkipFDE)
{
SaveOption(vISA_skipFDE, true);
}
}

bool EnableBarrierInstCounterBits = false;
Expand Down
5 changes: 5 additions & 0 deletions IGC/Compiler/CISACodeGen/OpenCLKernelCodeGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,11 @@ namespace IGC
GTPinIndirRef = true;
}

if (apiOptions.hasArg(OPT_skip_fde_common))
{
SkipFDE = true;
}

if (const opt::Arg* arg = apiOptions.getLastArg(OPT_required_thread_count_common))
{
if (arg->getNumValues() > 0)
Expand Down
3 changes: 2 additions & 1 deletion IGC/Compiler/CISACodeGen/OpenCLKernelCodeGen.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,12 @@ namespace IGC
bool EmitErrorsForLibCompilation = false;
uint32_t requiredEUThreadCount = 0;


bool GTPinReRA = false;
bool GTPinGRFInfo = false;
bool GTPinScratchAreaSize = false;
bool GTPinIndirRef = false;
// Skip emission of Frame Descriptor Entry in VISA.
bool SkipFDE = false;
uint32_t GTPinScratchAreaSizeValue = 0;

std::vector<std::string> LargeGRFKernels;
Expand Down
3 changes: 2 additions & 1 deletion IGC/OCLFE/igd_fcl_mcl/source/clang_tb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1365,7 +1365,8 @@ namespace TC
(strcmp(pParam, "-ze-gtpin-grf-info") == 0) || //used by GTPin
(strcmp(pParam, "-ze-gtpin-scratch-area-size") == 0) || //used by GTPin
(strcmp(pParam, "-ze-opt-enable-auto-large-GRF-mode") == 0) ||
(strcmp(pParam, "-cl-intel-enable-auto-large-GRF-mode") == 0);
(strcmp(pParam, "-cl-intel-enable-auto-large-GRF-mode") == 0) ||
(strcmp(pParam, "-ze-skip-fde") == 0);

if (isCommonOption)
{
Expand Down
2 changes: 2 additions & 0 deletions IGC/Options/include/igc/Options/CommonApiOptions.td
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ defm : CommonJoined<"gtpin-scratch-area-size=">, Alias<gtpin_scratch_area_size_c

defm gtpin_indir_ref : CommonFlag<"gtpin-indir-ref">;

defm skip_fde : CommonFlag<"skip-fde">;

def emit_debug : PlainFlag<"g">,
HelpText<"Enable generation of debug information and enables kernel debug">;
// These are coming from NEO when run under debugger.
Expand Down

0 comments on commit 48ad0dd

Please sign in to comment.