Skip to content

JIT: Avoid byref strength reductions in loops with suspension points #115605

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 23 additions & 26 deletions src/coreclr/jit/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,22 +72,22 @@ inline var_types genActualType(T value);
* Forward declarations
*/

struct InfoHdr; // defined in GCInfo.h
struct escapeMapping_t; // defined in fgdiagnostic.cpp
class emitter; // defined in emit.h
struct ShadowParamVarInfo; // defined in GSChecks.cpp
struct InitVarDscInfo; // defined in registerargconvention.h
class FgStack; // defined in fgbasic.cpp
class Instrumentor; // defined in fgprofile.cpp
class SpanningTreeVisitor; // defined in fgprofile.cpp
class CSE_DataFlow; // defined in optcse.cpp
struct CSEdsc; // defined in optcse.h
class CSE_HeuristicCommon; // defined in optcse.h
class OptBoolsDsc; // defined in optimizer.cpp
struct JumpThreadInfo; // defined in redundantbranchopts.cpp
class ProfileSynthesis; // defined in profilesynthesis.h
class LoopLocalOccurrences; // defined in inductionvariableopts.cpp
class RangeCheck; // defined in rangecheck.h
struct InfoHdr; // defined in GCInfo.h
struct escapeMapping_t; // defined in fgdiagnostic.cpp
class emitter; // defined in emit.h
struct ShadowParamVarInfo; // defined in GSChecks.cpp
struct InitVarDscInfo; // defined in registerargconvention.h
class FgStack; // defined in fgbasic.cpp
class Instrumentor; // defined in fgprofile.cpp
class SpanningTreeVisitor; // defined in fgprofile.cpp
class CSE_DataFlow; // defined in optcse.cpp
struct CSEdsc; // defined in optcse.h
class CSE_HeuristicCommon; // defined in optcse.h
class OptBoolsDsc; // defined in optimizer.cpp
struct JumpThreadInfo; // defined in redundantbranchopts.cpp
class ProfileSynthesis; // defined in profilesynthesis.h
class PerLoopInfo; // defined in inductionvariableopts.cpp
class RangeCheck; // defined in rangecheck.h
#ifdef DEBUG
struct IndentStack;
#endif
Expand Down Expand Up @@ -7654,33 +7654,30 @@ class Compiler
void optVisitBoundingExitingCondBlocks(FlowGraphNaturalLoop* loop, TFunctor func);
bool optMakeLoopDownwardsCounted(ScalarEvolutionContext& scevContext,
FlowGraphNaturalLoop* loop,
LoopLocalOccurrences* loopLocals);
PerLoopInfo* loopLocals);
bool optMakeExitTestDownwardsCounted(ScalarEvolutionContext& scevContext,
FlowGraphNaturalLoop* loop,
BasicBlock* exiting,
LoopLocalOccurrences* loopLocals);
PerLoopInfo* loopLocals);
bool optCanAndShouldChangeExitTest(GenTree* cond, bool dump);
bool optLocalHasNonLoopUses(unsigned lclNum, FlowGraphNaturalLoop* loop, LoopLocalOccurrences* loopLocals);
bool optLocalHasNonLoopUses(unsigned lclNum, FlowGraphNaturalLoop* loop, PerLoopInfo* loopLocals);
bool optLocalIsLiveIntoBlock(unsigned lclNum, BasicBlock* block);

bool optWidenIVs(ScalarEvolutionContext& scevContext, FlowGraphNaturalLoop* loop, LoopLocalOccurrences* loopLocals);
bool optWidenPrimaryIV(FlowGraphNaturalLoop* loop,
unsigned lclNum,
ScevAddRec* addRec,
LoopLocalOccurrences* loopLocals);
bool optWidenIVs(ScalarEvolutionContext& scevContext, FlowGraphNaturalLoop* loop, PerLoopInfo* loopLocals);
bool optWidenPrimaryIV(FlowGraphNaturalLoop* loop, unsigned lclNum, ScevAddRec* addRec, PerLoopInfo* loopLocals);

bool optCanSinkWidenedIV(unsigned lclNum, FlowGraphNaturalLoop* loop);
bool optIsIVWideningProfitable(unsigned lclNum,
BasicBlock* initBlock,
bool initedToConstant,
FlowGraphNaturalLoop* loop,
LoopLocalOccurrences* loopLocals);
PerLoopInfo* loopLocals);
void optBestEffortReplaceNarrowIVUses(
unsigned lclNum, unsigned ssaNum, unsigned newLclNum, BasicBlock* block, Statement* firstStmt);
void optReplaceWidenedIV(unsigned lclNum, unsigned ssaNum, unsigned newLclNum, Statement* stmt);
void optSinkWidenedIV(unsigned lclNum, unsigned newLclNum, FlowGraphNaturalLoop* loop);

bool optRemoveUnusedIVs(FlowGraphNaturalLoop* loop, LoopLocalOccurrences* loopLocals);
bool optRemoveUnusedIVs(FlowGraphNaturalLoop* loop, PerLoopInfo* loopLocals);
bool optIsUpdateOfIVWithoutSideEffects(GenTree* tree, unsigned lclNum);

// Redundant branch opts
Expand Down
Loading
Loading