Skip to content

Commit

Permalink
JIT: refactor and enhance the redundant branch optimizer (#76207)
Browse files Browse the repository at this point in the history
One more preparatory step before introducing the new phi-based
disambiguation.

* handle some cases of ambiguous preds better
* split out the jump threading pre checks into a helper
* properly support updating switch preds
* generalize retry logic a bit to handle more cases
  • Loading branch information
AndyAyersMS committed Sep 27, 2022
1 parent c10520d commit 80f7234
Show file tree
Hide file tree
Showing 2 changed files with 195 additions and 106 deletions.
1 change: 1 addition & 0 deletions src/coreclr/jit/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -6967,6 +6967,7 @@ class Compiler
bool optRedundantRelop(BasicBlock* const block);
bool optRedundantBranch(BasicBlock* const block);
bool optJumpThread(BasicBlock* const block, BasicBlock* const domBlock, bool domIsSameRelop);
bool optJumpThreadCheck(BasicBlock* const block, BasicBlock* const domBlock);
bool optJumpThreadCore(JumpThreadInfo& jti);
bool optReachable(BasicBlock* const fromBlock, BasicBlock* const toBlock, BasicBlock* const excludedBlock);
BitVecTraits* optReachableBitVecTraits;
Expand Down
Loading

0 comments on commit 80f7234

Please sign in to comment.