• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /openjdk10/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/

Lines Matching defs:to

16  * 2 along with this work; if not, write to the Free Software Foundation,
61 * Adds an interval to a list sorted by {@linkplain FixedInterval#currentFrom() current from}
65 * @param interval the interval to add
77 // add to head of list
88 * Adds an interval to a list sorted by {@linkplain TraceInterval#from() current from}
92 * @param interval the interval to add
104 // add to head of list
115 * Adds an interval to a list sorted by {@linkplain TraceInterval#from() start} positions and
119 * @param interval the interval to add
143 * @param interval the interval to remove
210 // accessors mapped to same functions in class LinearScan
281 assert usePos != 0 : "must use excludeFromUse to set usePos to 0";
306 assert usePos != 0 : "must use excludeFromUse to set usePos to 0";
351 if (current.to() <= interval.from()) {
372 if (current.to() > interval.currentFrom()) {
385 setUsePos(interval, Math.min(interval.nextUsage(registerPriority, currentPosition), interval.to()), false);
445 // Try to split at end of maxBlock. If this would be after
463 assert optimalSplitPos > allocator.maxOpId() || allocator.isBlockBegin(optimalSplitPos) : "algorithm must move split pos to block boundary";
503 // split position cannot be moved to block boundary : so split as late as possible
505 debug.log("cannot move split pos to block boundary because minPos and maxPos are in same block");
512 debug.log("moving split pos to optimal block boundary between block B%d and B%d", minBlock.getId(), maxBlock.getId());
521 // 2) the right part is sorted into to the unhandled-list
530 assert maxSplitPos <= interval.to() : "cannot split after end of interval";
534 if (optimalSplitPos == interval.to() && interval.nextUsage(RegisterPriority.MustHaveRegister, minSplitPos) == Integer.MAX_VALUE) {
543 // moved to odd opId
557 assert optimalSplitPosFinal <= interval.to() : "cannot split after end of interval";
568 // TODO (je) duplicate code. try to fold
569 if (optimalSplitPosFinal == interval.to() && interval.nextUsage(RegisterPriority.MustHaveRegister, minSplitPos) == Integer.MAX_VALUE) {
603 * back to MustHaveRegister priority. This only happens if register priority was
604 * downgraded to MustHaveRegister in #allocLockedRegister.
614 assert maxSplitPos < interval.to() : "cannot split at end end of interval";
615 assert currentPosition < interval.to() : "interval must not end before current position";
618 // the whole interval is never used, so spill it entirely to memory
629 // Also kick parent intervals out of register to memory when they have no use
631 // memory . avoid useless moves from memory to register and back
658 assert optimalSplitPos < interval.to() : "cannot split at end of interval";
677 debug.log("inserting move from interval %s to %s", interval, spilledPart);
682 debug.log("no need to insert move. done by data-flow resolution");
727 // nothing to do
823 // split position cannot be moved to block boundary : so split as late as possible
825 debug.log("cannot move split pos to block boundary because minPos and maxPos are in same block");
832 debug.log("moving split pos to optimal block boundary between block B%d and B%d", minBlock.getId(), maxBlock.getId());
848 * Try to split at end of maxBlock. We use last instruction -2 because we want to insert the
877 assert optimalSplitPos > allocator.maxOpId() || optimalSplitPos == maxSplitPos || allocator.isBlockEnd(optimalSplitPos + 2) : "algorithm must move split pos to block boundary";
883 * This is called for every interval that is assigned to a stack slot.
886 assert interval.location() != null && (interval.canMaterialize() || isStackSlotValue(interval.location())) : "interval not assigned to a stack slot " + interval;
892 int maxSplitPos = Math.min(interval.firstUsage(RegisterPriority.ShouldHaveRegister), interval.to());
906 * position before. The new created part is added to the unhandled list and will get a
912 if (maxSplitPos <= interval.to()) {
915 debug.log("No more usage, no need to split: %s", interval);
918 assert interval.nextUsage(RegisterPriority.MustHaveRegister, currentPos) == Integer.MAX_VALUE : "the remaining part is spilled to stack and therefore has no register";
924 try (Indent indent = debug.logAndIndent("trying to find free register for %s", interval)) {
937 // Enable this logging to see all register states
954 assert interval.location() == null : "register already assigned to interval";
958 int intervalTo = interval.to();
1017 // Split an Interval and spill it to memory so that cur can be placed in a register
1020 try (Indent indent = debug.logAndIndent("alloc locked register: need to split and spill to get register for %s", interval)) {
1026 int intervalTo = interval.to();
1075 debug.log("able to spill current interval. firstUsage(register): %d, usePos: %d", firstUsage, regUsePos);
1082 * try to spill an active interval that has a usage but do not
1091 * assign a reasonable register and do a bailout in product mode to
1114 debug.log("decided to use register %d", reg.number);
1161 if (pos < allocator.maxOpId() && allocator.hasCall(pos + 1) && interval.to() > pos + 1) {
1182 private static boolean isMove(LIRInstruction op, TraceInterval from, TraceInterval to) {
1187 LIRValueUtil.asVariable(move.getResult()).index == to.operandNumber;
1194 // assign same spill slot to non-intersecting intervals
1215 int endPos = interval.to();
1228 if (beginHint == endHint || beginHint.to() != beginPos || endHint.from() != endPos) {
1239 // registerHint is not spilled at beginPos : so it would not be benefitial to
1246 // delete use positions to prevent the intervals to get a register at beginning
1252 // allocate a physical register or memory location to an interval
1280 // assign same spill slot to non-intersecting intervals
1290 // spilled intervals need not be move to active-list
1297 // load spilled values that become active from stack slot to register
1303 debug.log("Inserting move from interval %d to %d because insertMoveWhenActivated is set", interval.currentSplitChild().operandNumber, interval.operandNumber);
1312 return result; // true = interval is moved to active list
1340 * Walks up to {@code from} and updates the state of {@link FixedInterval fixed intervals}.
1343 * {@link State#Inactive} (and eventually to {@link State#Handled} but handled intervals are not
1367 // also handle move from inactive list to active list
1384 // move to handled state (not maintained as a list)
1411 * Walks up to {@code from} and updates the state of {@link TraceInterval intervals}.
1413 * Trace intervals can switch once from {@link State#Unhandled} to {@link State#Active} and then
1414 * to {@link State#Handled} but handled intervals are not managed.
1430 if (cur.to() <= from) {
1472 * Walk up to {@code toOpId}.
1474 * @postcondition {@link #currentPosition} is set to {@code toOpId}, {@link #activeFixedList}
1483 // set currentPosition prior to call of walkTo
1494 try (Indent indent = debug.logAndIndent("walk to op %d", opId)) {
1501 // set currentPosition prior to call of walkTo
1527 private static void intervalMoved(DebugContext debug, IntervalHint interval, State from, State to) {
1528 // intervalMoved() is called whenever an interval moves from one interval list to another.
1529 // In the implementation of this method it is prohibited to move the interval to any list.
1531 debug.log("interval moved from %s to %s: %s", from, to, interval.logString());