Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
5b16f0a
Equals to 0 optimization in Boolean logic
JulieLeeMSFT Feb 17, 2021
bac5938
Limit bool optimization to Integral return type only
JulieLeeMSFT Mar 10, 2021
8d9484c
Use the updated flowList:setEdgeWeights method with the 3rd parameter
JulieLeeMSFT Mar 11, 2021
635e605
Skip bool optimization for cases that require NOT transformation
JulieLeeMSFT Mar 11, 2021
b8858fc
Skip bool optimization when the third block GT_RETURN is not CNT_INT int
JulieLeeMSFT Mar 17, 2021
afbd075
format patch
JulieLeeMSFT Mar 17, 2021
a437514
Added more bool optimization cases
JulieLeeMSFT Mar 22, 2021
3b51938
format patch
JulieLeeMSFT Mar 23, 2021
854b011
Refactored setting fold type and comparison type to fix jitstress error
JulieLeeMSFT Mar 26, 2021
f28e0d6
format patch
JulieLeeMSFT Mar 26, 2021
ef65ee3
Refactored common codes for conditional block and return block boolea…
JulieLeeMSFT Mar 27, 2021
5746b61
format patch
JulieLeeMSFT Mar 27, 2021
7740064
Unit test changed to remove EH handling and add return value checks
ewhapdx Apr 2, 2021
d0c47e8
Unit test: add back test cases for ANDing and NE cases
ewhapdx Apr 3, 2021
f0adde5
Made OptBoolsDsc struct to pass it off to the helper methods.
ewhapdx Apr 23, 2021
29dc719
format patch
ewhapdx Apr 23, 2021
d02d18e
Changed to substructure OptTestInfo within OptBoolsDisc
JulieLeeMSFT Jun 19, 2021
ebf2010
Cleaned up tree variables in OptBoolsDsc struct
JulieLeeMSFT Jun 21, 2021
a7cdf1c
Moved some methods for Boolean Optimization to OptBoolsDsc struct
JulieLeeMSFT Jun 24, 2021
e3a6520
Moved all private methods for Boolean Optimization to OptBoolsDsc struct
JulieLeeMSFT Jun 24, 2021
5f02965
Boolean Optimization: Handled code review feedback
JulieLeeMSFT Jul 2, 2021
d14053e
Optimize bools: hoisted jump destination check to optOptimizeBools() …
JulieLeeMSFT Jul 9, 2021
12c7a8a
format patch
JulieLeeMSFT Jul 9, 2021
0e96608
Moved initialization to OptBoolsDsc constructor
JulieLeeMSFT Jul 13, 2021
1cdcdb8
format patch
JulieLeeMSFT Jul 13, 2021
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
format patch
  • Loading branch information
JulieLeeMSFT committed Jun 24, 2021
commit afbd0756b1404e0f7737cd52081c1f4d8040f2a3
10 changes: 4 additions & 6 deletions src/coreclr/jit/optimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7914,7 +7914,6 @@ void Compiler::optOptimizeBoolsBbjCond(BasicBlock* b1, BasicBlock* b2, bool* cha
printf("\n");
}
#endif

}

/*
Expand Down Expand Up @@ -7963,7 +7962,7 @@ void Compiler::optOptimizeBoolsBbjReturn(BasicBlock* b1, BasicBlock* b2, BasicBl

GenTree* t2 = s2->GetRootNode();
GenTree* t3 = s3->GetRootNode();
if(t2->gtOper != GT_RETURN || t3->gtOper!= GT_RETURN)
if (t2->gtOper != GT_RETURN || t3->gtOper != GT_RETURN)
{
return;
}
Expand Down Expand Up @@ -8145,7 +8144,7 @@ void Compiler::optOptimizeBoolsBbjReturn(BasicBlock* b1, BasicBlock* b2, BasicBl
b1->bbJumpKind = b2->bbJumpKind;
b1->bbJumpSwt = b2->bbJumpSwt;

//fgAddRefPred(b2->bbJumpDest, b1);
// fgAddRefPred(b2->bbJumpDest, b1);

/* Get rid of the second & third block (which is a BBJ_RETURN) */

Expand Down Expand Up @@ -8176,15 +8175,14 @@ void Compiler::optOptimizeBoolsBbjReturn(BasicBlock* b1, BasicBlock* b2, BasicBl
#ifdef DEBUG
if (verbose)
{
printf("Folded %sboolean conditions of " FMT_BB ", " FMT_BB " and " FMT_BB " to :\n", c2->OperIsLeaf() ? "" : "non-leaf ",
b1->bbNum, b2->bbNum, b3->bbNum);
printf("Folded %sboolean conditions of " FMT_BB ", " FMT_BB " and " FMT_BB " to :\n",
c2->OperIsLeaf() ? "" : "non-leaf ", b1->bbNum, b2->bbNum, b3->bbNum);
gtDispStmt(s1);
printf("\n");
}
#endif
}


/******************************************************************************
*
* Replace x==null with (x|x)==0 if x is a GC-type.
Expand Down