/** * Constructs an instance. * * @param ssaMeth method to process */ private EscapeAnalysis(SsaMethod ssaMeth) { this.ssaMeth = ssaMeth; this.regCount = ssaMeth.getRegCount(); this.latticeValues = new ArrayList<EscapeSet>(); }
/** {@inheritDoc} */ public FirstFitAllocator( final SsaMethod ssaMeth, final InterferenceGraph interference) { super(ssaMeth, interference); mapped = new BitSet(ssaMeth.getRegCount()); }
/** {@inheritDoc} */ public FirstFitAllocator( final SsaMethod ssaMeth, final InterferenceGraph interference) { super(ssaMeth, interference); mapped = new BitSet(ssaMeth.getRegCount()); }
/** * Constructs an instance. * * @param ssaMeth method to process */ private EscapeAnalysis(SsaMethod ssaMeth) { this.ssaMeth = ssaMeth; this.regCount = ssaMeth.getRegCount(); this.latticeValues = new ArrayList<EscapeSet>(); }
/** {@inheritDoc} */ public FirstFitAllocator( final SsaMethod ssaMeth, final InterferenceGraph interference) { super(ssaMeth, interference); mapped = new BitSet(ssaMeth.getRegCount()); }
/** * Returns the set of live-in registers. Valid after register * interference graph has been generated, otherwise empty. * * @return {@code non-null;} live-in register set. */ public IntSet getLiveInRegs() { if (liveIn == null) { liveIn = SetFactory.makeLivenessSet(parent.getRegCount()); } return liveIn; }
/** * Returns the set of live-in registers. Valid after register * interference graph has been generated, otherwise empty. * * @return {@code non-null;} live-in register set. */ public IntSet getLiveInRegs() { if (liveIn == null) { liveIn = SetFactory.makeLivenessSet(parent.getRegCount()); } return liveIn; }
/** * Constructs an instance. * * @param ssaMethod method to process */ private DeadCodeRemover(SsaMethod ssaMethod) { this.ssaMeth = ssaMethod; regCount = ssaMethod.getRegCount(); worklist = new BitSet(regCount); useList = ssaMeth.getUseListCopy(); }
/** * Returns the set of live-out registers. Valid after register * interference graph has been generated, otherwise empty. * * @return {@code non-null;} live-out register set */ public IntSet getLiveOutRegs() { if (liveOut == null) { liveOut = SetFactory.makeLivenessSet(parent.getRegCount()); } return liveOut; }
/** * Returns the set of live-out registers. Valid after register * interference graph has been generated, otherwise empty. * * @return {@code non-null;} live-out register set */ public IntSet getLiveOutRegs() { if (liveOut == null) { liveOut = SetFactory.makeLivenessSet(parent.getRegCount()); } return liveOut; }
/** * Returns the set of live-in registers. Valid after register * interference graph has been generated, otherwise empty. * * @return {@code non-null;} live-in register set. */ public IntSet getLiveInRegs() { if (liveIn == null) { liveIn = SetFactory.makeLivenessSet(parent.getRegCount()); } return liveIn; }
/** * Returns the set of live-out registers. Valid after register * interference graph has been generated, otherwise empty. * * @return {@code non-null;} live-out register set */ public IntSet getLiveOutRegs() { if (liveOut == null) { liveOut = SetFactory.makeLivenessSet(parent.getRegCount()); } return liveOut; }
/** {@inheritDoc} */ @Override public RegisterMapper allocateRegisters() { int oldRegCount = ssaMeth.getRegCount(); BasicRegisterMapper mapper = new BasicRegisterMapper(oldRegCount); for (int i = 0; i < oldRegCount; i++) { mapper.addMapping(i, i*2, 2); } return mapper; } }
/** * Adds {@code regV} to the live-out list for this block. This is called * by the liveness analyzer. * * @param regV register that is live-out for this block. */ public void addLiveOut (int regV) { if (liveOut == null) { liveOut = SetFactory.makeLivenessSet(parent.getRegCount()); } liveOut.add(regV); }
/** {@inheritDoc} */ @Override public RegisterMapper allocateRegisters() { int oldRegCount = ssaMeth.getRegCount(); BasicRegisterMapper mapper = new BasicRegisterMapper(oldRegCount); for (int i = 0; i < oldRegCount; i++) { mapper.addMapping(i, i*2, 2); } return mapper; } }
/** * Adds {@code regV} to the live-out list for this block. This is called * by the liveness analyzer. * * @param regV register that is live-out for this block. */ public void addLiveOut (int regV) { if (liveOut == null) { liveOut = SetFactory.makeLivenessSet(parent.getRegCount()); } liveOut.add(regV); }
/** * Adds {@code regV} to the live-in list for this block. This is * called by the liveness analyzer. * * @param regV register that is live-in for this block. */ public void addLiveIn (int regV) { if (liveIn == null) { liveIn = SetFactory.makeLivenessSet(parent.getRegCount()); } liveIn.add(regV); }
/** * Adds {@code regV} to the live-in list for this block. This is * called by the liveness analyzer. * * @param regV register that is live-in for this block. */ public void addLiveIn (int regV) { if (liveIn == null) { liveIn = SetFactory.makeLivenessSet(parent.getRegCount()); } liveIn.add(regV); }
/** * Adds {@code regV} to the live-out list for this block. This is called * by the liveness analyzer. * * @param regV register that is live-out for this block. */ public void addLiveOut (int regV) { if (liveOut == null) { liveOut = SetFactory.makeLivenessSet(parent.getRegCount()); } liveOut.add(regV); }
/** * Adds {@code regV} to the live-out list for this block. This is called * by the liveness analyzer. * * @param regV register that is live-out for this block. */ public void addLiveOut (int regV) { if (liveOut == null) { liveOut = SetFactory.makeLivenessSet(parent.getRegCount()); } liveOut.add(regV); }