Skip to content

Commit

Permalink
Take advantage of simplifications enabled by folding all indirect acc…
Browse files Browse the repository at this point in the history
…ess to locals (#79722)

* Simplify DefinesLocal

* Delete DefinesLocalAddr from VN

* Simplify fgPerNodeLocalVarLiveness

* Simplify fgRemoveDeadStore

* Simplify gtSetEvalOrder

* Simplify optComputeLoopSideEffectsOfBlock

* Bring back some folding in morph

Forward sub can bring in local address nodes
and not recognizing them pessimizes things

* Delete IsLocalAddrExpr

* Delete DefinesLocalAddr

* Delete IndirTransform::None
  • Loading branch information
SingleAccretion authored Mar 31, 2023
1 parent d0d7154 commit 9744bf9
Show file tree
Hide file tree
Showing 10 changed files with 272 additions and 509 deletions.
2 changes: 1 addition & 1 deletion src/coreclr/jit/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -3058,7 +3058,7 @@ class Compiler
// Check if this tree is a typeof()
bool gtIsTypeof(GenTree* tree, CORINFO_CLASS_HANDLE* handle = nullptr);

GenTree* gtCallGetDefinedRetBufLclAddr(GenTreeCall* call);
GenTreeLclVarCommon* gtCallGetDefinedRetBufLclAddr(GenTreeCall* call);

//-------------------------------------------------------------------------
// Functions to display the trees
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/jit/gcinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ GCInfo::WriteBarrierForm GCInfo::gcIsWriteBarrierCandidate(GenTreeStoreInd* stor
//
GCInfo::WriteBarrierForm GCInfo::gcWriteBarrierFormFromTargetAddress(GenTree* tgtAddr)
{
if (tgtAddr->IsLocalAddrExpr() != nullptr)
if (tgtAddr->OperIsLocalAddr())
{
// No need for a GC barrier when writing to a local variable.
return GCInfo::WBF_NoBarrier;
Expand Down
Loading

0 comments on commit 9744bf9

Please sign in to comment.