Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
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
Prev Previous commit
Next Next commit
organize preheaders
  • Loading branch information
kunalspathak committed Jun 7, 2022
commit 65cea974a23337db1bca9e9e8b784e3cc1846e80
8 changes: 5 additions & 3 deletions src/coreclr/jit/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -5971,21 +5971,21 @@ class Compiler
// value numbers in "m_hoistedInParentLoops". This set is not modified by the call.
//
// Returns the list of basic blocks that were added as preheaders as part of hoisting the current loop.
BasicBlockList* optHoistLoopNest(unsigned lnum, LoopHoistContext* hoistCtxt);
void optHoistLoopNest(unsigned lnum, LoopHoistContext* hoistCtxt);

// Do hoisting for a particular loop ("lnum" is an index into the optLoopTable.)
// Assumes that expressions have been hoisted in containing loops if their value numbers are in
// "m_hoistedInParentLoops".
//
// Returns the new preheaders created.
BasicBlockList* optHoistThisLoop(unsigned lnum,
void optHoistThisLoop(unsigned lnum,
LoopHoistContext* hoistCtxt,
BasicBlockList* existingPreHeaders);

// Hoist all expressions in "blocks" that are invariant in loop "loopNum" (an index into the optLoopTable)
// outside of that loop. Exempt expressions whose value number is in "m_hoistedInParentLoops"; add VN's of hoisted
// expressions to "hoistInLoop".
BasicBlockList* optHoistLoopBlocks(unsigned loopNum,
void optHoistLoopBlocks(unsigned loopNum,
ArrayStack<BasicBlock*>* blocks,
LoopHoistContext* hoistContext);

Expand Down Expand Up @@ -6369,6 +6369,8 @@ class Compiler
// A loop contains itself.
bool optLoopContains(unsigned l1, unsigned l2) const;

BasicBlock* optLoopEntry(BasicBlock* preHeader);

// Updates the loop table by changing loop "loopInd", whose head is required
// to be "from", to be "to". Also performs this transformation for any
// loop nested in "loopInd" that shares the same head as "loopInd".
Expand Down
Loading