-
Notifications
You must be signed in to change notification settings - Fork 5.3k
JIT: Make BB_UNITY_WEIGHT 1.0
#112151
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
base: main
Are you sure you want to change the base?
JIT: Make BB_UNITY_WEIGHT 1.0
#112151
Changes from all commits
c00ed34
d8932db
16abfce
abc2160
156252d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -2406,7 +2406,7 @@ void CSE_HeuristicParameterized::CaptureLocalWeights() | |||||
| } | ||||||
|
|
||||||
| JITDUMP("V%02u," FMT_WT "\n", m_pCompiler->lvaGetLclNum(varDsc), varDsc->lvRefCntWtd()); | ||||||
| m_localWeights->push_back(varDsc->lvRefCntWtd() / BB_UNITY_WEIGHT); | ||||||
| m_localWeights->push_back(varDsc->lvRefCntWtd()); | ||||||
| } | ||||||
| } | ||||||
|
|
||||||
|
|
@@ -4400,7 +4400,7 @@ bool CSE_Heuristic::PromotionCheck(CSE_Candidate* candidate) | |||||
| weight_t no_cse_cost = 0; | ||||||
| weight_t yes_cse_cost = 0; | ||||||
| unsigned extra_yes_cost = 0; | ||||||
| unsigned extra_no_cost = 0; | ||||||
| weight_t extra_no_cost = 0; | ||||||
|
||||||
| weight_t extra_no_cost = 0; | |
| weight_t extra_no_cost = 0.0; |
Copilot
AI
Aug 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This hardcoded division by 100 appears to be a temporary workaround based on the TODO comment. Consider replacing the magic number 100 with a named constant or removing this scaling entirely if it's no longer needed after the BB_UNITY_WEIGHT changes.
| extra_no_cost /= 100; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The threshold has been changed from 99999 to 999.99, but the comment still refers to '6 characters'. With the new threshold, weights like 1000.00 would be 7 characters, making the comment inaccurate. Update the comment to reflect the actual character count logic.