MCPcopy Create free account
hub / github.com/ReadyTalk/avian / pickFrameTarget

Function pickFrameTarget

src/codegen/compiler/regalloc.cpp:138–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136}
137
138Target pickFrameTarget(Context* c, Value* v, CostCalculator* costCalculator)
139{
140 Target best;
141
142 Value* p = v;
143 do {
144 if (p->home >= 0) {
145 Target mine(p->home,
146 lir::Operand::Type::Memory,
147 frameCost(c, v, p->home, costCalculator));
148
149 if (mine.cost == Target::MinimumFrameCost) {
150 return mine;
151 } else if (mine.cost < best.cost) {
152 best = mine;
153 }
154 }
155 p = p->buddy;
156 } while (p != v);
157
158 return best;
159}
160
161Target pickAnyFrameTarget(Context* c, Value* v, CostCalculator* costCalculator)
162{

Callers 1

pickTargetFunction · 0.85

Calls 1

frameCostFunction · 0.85

Tested by

no test coverage detected