| 136 | } |
| 137 | |
| 138 | Target 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 | |
| 161 | Target pickAnyFrameTarget(Context* c, Value* v, CostCalculator* costCalculator) |
| 162 | { |
no test coverage detected