[PATCH] D62345: [MachineScheduler] checkResourceLimit boundary condition update
Jinsong Ji via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 24 06:21:25 PDT 2019
jsji marked 2 inline comments as done.
jsji added a comment.
In D62345#1515781 <https://reviews.llvm.org/D62345#1515781>, @javed.absar wrote:
> Would this end up prioritising 'resourcelimited' too much? Looks like there can be performance differences between before and after this change - any numbers / thoughts on that?
I think we just avoid disregarding 'resourcelimited', shouldn't be prioritising it too much.
I am working on gathering some performance data .
================
Comment at: llvm/lib/CodeGen/MachineScheduler.cpp:1841
+/// If we are checking after scheduling a node, we should return true when
+/// the equations are equal.
static bool checkResourceLimit(unsigned LFactor, unsigned Count,
----------------
javed.absar wrote:
> maybe reword 'equations are equal' to something more contextual ....
Sure. How about "we just reach the resource limit"? Or any suggestion?
================
Comment at: llvm/lib/CodeGen/MachineScheduler.cpp:1845
+ if (AfterSchedNode)
+ return (int)(Count - (Latency * LFactor)) >= (int)LFactor;
+ else
----------------
javed.absar wrote:
> repeated computation
Thought build compiler should be able to optimize it. But yes, I can do it something like:
```
int ResCntFactor = (int)(Count - (Latency * LFactor));
if (AfterSchedNode)
return ResCntFactor >= (int)LFactor;
else
return ResCntFactor > (int)LFactor;
```
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62345/new/
https://reviews.llvm.org/D62345
More information about the llvm-commits
mailing list