/** * Constructs an instance. * * @param method {@code non-null;} the method being represented by this instance */ public LocalVariableInfo(RopMethod method) { if (method == null) { throw new NullPointerException("method == null"); } BasicBlockList blocks = method.getBlocks(); int maxLabel = blocks.getMaxLabel(); this.regCount = blocks.getRegCount(); this.emptySet = new RegisterSpecSet(regCount); this.blockStarts = new RegisterSpecSet[maxLabel]; this.insnAssignments = new HashMap<Insn, RegisterSpec>(blocks.getInstructionCount()); emptySet.setImmutable(); }
/** * Constructs an instance. * * @param method {@code non-null;} the method being represented by this instance */ public LocalVariableInfo(RopMethod method) { if (method == null) { throw new NullPointerException("method == null"); } BasicBlockList blocks = method.getBlocks(); int maxLabel = blocks.getMaxLabel(); this.regCount = blocks.getRegCount(); this.emptySet = new RegisterSpecSet(regCount); this.blockStarts = new RegisterSpecSet[maxLabel]; this.insnAssignments = new HashMap<Insn, RegisterSpec>(blocks.getInstructionCount()); emptySet.setImmutable(); }
/** * Constructs an instance. * * @param ropMethod {@code non-null;} the original rop-form method that * this instance is based on * @param paramWidth the total width, in register-units, of the * method's parameters * @param isStatic {@code true} if this method has no {@code this} * pointer argument */ private SsaMethod(RopMethod ropMethod, int paramWidth, boolean isStatic) { this.paramWidth = paramWidth; this.isStatic = isStatic; this.backMode = false; this.maxLabel = ropMethod.getBlocks().getMaxLabel(); this.registerCount = ropMethod.getBlocks().getRegCount(); this.spareRegisterBase = registerCount; }
/** * Constructs an instance. * * @param ropMethod {@code non-null;} the original rop-form method that * this instance is based on * @param paramWidth the total width, in register-units, of the * method's parameters * @param isStatic {@code true} if this method has no {@code this} * pointer argument */ private SsaMethod(RopMethod ropMethod, int paramWidth, boolean isStatic) { this.paramWidth = paramWidth; this.isStatic = isStatic; this.backMode = false; this.maxLabel = ropMethod.getBlocks().getMaxLabel(); this.registerCount = ropMethod.getBlocks().getRegCount(); this.spareRegisterBase = registerCount; }
/** * Constructs an instance. * * @param ropMethod {@code non-null;} the original rop-form method that * this instance is based on * @param paramWidth the total width, in register-units, of the * method's parameters * @param isStatic {@code true} if this method has no {@code this} * pointer argument */ private SsaMethod(RopMethod ropMethod, int paramWidth, boolean isStatic) { this.paramWidth = paramWidth; this.isStatic = isStatic; this.backMode = false; this.maxLabel = ropMethod.getBlocks().getMaxLabel(); this.registerCount = ropMethod.getBlocks().getRegCount(); this.spareRegisterBase = registerCount; }
/** * Constructs an instance. * * @param method {@code non-null;} the method being represented by this instance */ public LocalVariableInfo(RopMethod method) { if (method == null) { throw new NullPointerException("method == null"); } BasicBlockList blocks = method.getBlocks(); int maxLabel = blocks.getMaxLabel(); this.regCount = blocks.getRegCount(); this.emptySet = new RegisterSpecSet(regCount); this.blockStarts = new RegisterSpecSet[maxLabel]; this.insnAssignments = new HashMap<Insn, RegisterSpec>(blocks.getInstructionCount()); emptySet.setImmutable(); }
/** * Constructs an instance. * * @param method {@code non-null;} the method being represented by this instance */ public LocalVariableInfo(RopMethod method) { if (method == null) { throw new NullPointerException("method == null"); } BasicBlockList blocks = method.getBlocks(); int maxLabel = blocks.getMaxLabel(); this.regCount = blocks.getRegCount(); this.emptySet = new RegisterSpecSet(regCount); this.blockStarts = new RegisterSpecSet[maxLabel]; this.insnAssignments = new HashMap<Insn, RegisterSpec>(blocks.getInstructionCount()); emptySet.setImmutable(); }
/** * Constructs an instance. * * @param ropMethod {@code non-null;} the original rop-form method that * this instance is based on * @param paramWidth the total width, in register-units, of the * method's parameters * @param isStatic {@code true} if this method has no {@code this} * pointer argument */ private SsaMethod(RopMethod ropMethod, int paramWidth, boolean isStatic) { this.paramWidth = paramWidth; this.isStatic = isStatic; this.backMode = false; this.maxLabel = ropMethod.getBlocks().getMaxLabel(); this.registerCount = ropMethod.getBlocks().getRegCount(); this.spareRegisterBase = registerCount; }
/** * Constructs an instance. * * @param ropMethod {@code non-null;} the original rop-form method that * this instance is based on * @param paramWidth the total width, in register-units, of the * method's parameters * @param isStatic {@code true} if this method has no {@code this} * pointer argument */ private SsaMethod(RopMethod ropMethod, int paramWidth, boolean isStatic) { this.paramWidth = paramWidth; this.isStatic = isStatic; this.backMode = false; this.maxLabel = ropMethod.getBlocks().getMaxLabel(); this.registerCount = ropMethod.getBlocks().getRegCount(); this.spareRegisterBase = registerCount; }
/** * Constructs an instance. * * @param method {@code non-null;} the method being represented by this instance */ public LocalVariableInfo(RopMethod method) { if (method == null) { throw new NullPointerException("method == null"); } BasicBlockList blocks = method.getBlocks(); int maxLabel = blocks.getMaxLabel(); this.regCount = blocks.getRegCount(); this.emptySet = new RegisterSpecSet(regCount); this.blockStarts = new RegisterSpecSet[maxLabel]; this.insnAssignments = new HashMap<Insn, RegisterSpec>(blocks.getInstructionCount()); emptySet.setImmutable(); }
/** * Constructs an instance. * * @param ropMethod {@code non-null;} the original rop-form method that * this instance is based on * @param paramWidth the total width, in register-units, of the * method's parameters * @param isStatic {@code true} if this method has no {@code this} * pointer argument */ private SsaMethod(RopMethod ropMethod, int paramWidth, boolean isStatic) { this.paramWidth = paramWidth; this.isStatic = isStatic; this.backMode = false; this.maxLabel = ropMethod.getBlocks().getMaxLabel(); this.registerCount = ropMethod.getBlocks().getRegCount(); this.spareRegisterBase = registerCount; }
/** * Constructs an instance. * * @param method {@code non-null;} the method being represented by this instance */ public LocalVariableInfo(RopMethod method) { if (method == null) { throw new NullPointerException("method == null"); } BasicBlockList blocks = method.getBlocks(); int maxLabel = blocks.getMaxLabel(); this.regCount = blocks.getRegCount(); this.emptySet = new RegisterSpecSet(regCount); this.blockStarts = new RegisterSpecSet[maxLabel]; this.insnAssignments = new HashMap<Insn, RegisterSpec>(blocks.getInstructionCount()); emptySet.setImmutable(); }
/** * Constructs an instance. * * @param method {@code non-null;} the method being represented by this instance */ public LocalVariableInfo(RopMethod method) { if (method == null) { throw new NullPointerException("method == null"); } BasicBlockList blocks = method.getBlocks(); int maxLabel = blocks.getMaxLabel(); this.regCount = blocks.getRegCount(); this.emptySet = new RegisterSpecSet(regCount); this.blockStarts = new RegisterSpecSet[maxLabel]; this.insnAssignments = new HashMap<Insn, RegisterSpec>(blocks.getInstructionCount()); emptySet.setImmutable(); }
/** * Constructs an instance. * * @param method {@code non-null;} the method being represented by this instance */ public LocalVariableInfo(RopMethod method) { if (method == null) { throw new NullPointerException("method == null"); } BasicBlockList blocks = method.getBlocks(); int maxLabel = blocks.getMaxLabel(); this.regCount = blocks.getRegCount(); this.emptySet = new RegisterSpecSet(regCount); this.blockStarts = new RegisterSpecSet[maxLabel]; this.insnAssignments = new HashMap<Insn, RegisterSpec>(blocks.getInstructionCount()); emptySet.setImmutable(); }
/** * Constructs an instance. * * @param ropMethod {@code non-null;} the original rop-form method that * this instance is based on * @param paramWidth the total width, in register-units, of the * method's parameters * @param isStatic {@code true} if this method has no {@code this} * pointer argument */ private SsaMethod(RopMethod ropMethod, int paramWidth, boolean isStatic) { this.paramWidth = paramWidth; this.isStatic = isStatic; this.backMode = false; this.maxLabel = ropMethod.getBlocks().getMaxLabel(); this.registerCount = ropMethod.getBlocks().getRegCount(); this.spareRegisterBase = registerCount; }
/** * Constructs an instance. * * @param ropMethod {@code non-null;} the original rop-form method that * this instance is based on * @param paramWidth the total width, in register-units, of the * method's parameters * @param isStatic {@code true} if this method has no {@code this} * pointer argument */ private SsaMethod(RopMethod ropMethod, int paramWidth, boolean isStatic) { this.paramWidth = paramWidth; this.isStatic = isStatic; this.backMode = false; this.maxLabel = ropMethod.getBlocks().getMaxLabel(); this.registerCount = ropMethod.getBlocks().getRegCount(); this.spareRegisterBase = registerCount; }
/** * Updates the ROP statistics. * * @param nonOptRmeth non-optimized method * @param rmeth optimized method */ public void updateRopStatistics(RopMethod nonOptRmeth, RopMethod rmeth) { int oldCountInsns = nonOptRmeth.getBlocks().getEffectiveInstructionCount(); int oldCountRegs = nonOptRmeth.getBlocks().getRegCount(); if (DEBUG) { System.err.println("insns (old/new): " + oldCountInsns + "/" + rmeth.getBlocks().getEffectiveInstructionCount() + " regs (o/n):" + oldCountRegs + "/" + rmeth.getBlocks().getRegCount()); } int newCountInsns = rmeth.getBlocks().getEffectiveInstructionCount(); runningDeltaInsns += (newCountInsns - oldCountInsns); runningDeltaRegisters += (rmeth.getBlocks().getRegCount() - oldCountRegs); runningTotalInsns += newCountInsns; }
/** * Updates the ROP statistics. * * @param nonOptRmeth non-optimized method * @param rmeth optimized method */ public void updateRopStatistics(RopMethod nonOptRmeth, RopMethod rmeth) { int oldCountInsns = nonOptRmeth.getBlocks().getEffectiveInstructionCount(); int oldCountRegs = nonOptRmeth.getBlocks().getRegCount(); if (DEBUG) { System.err.println("insns (old/new): " + oldCountInsns + "/" + rmeth.getBlocks().getEffectiveInstructionCount() + " regs (o/n):" + oldCountRegs + "/" + rmeth.getBlocks().getRegCount()); } int newCountInsns = rmeth.getBlocks().getEffectiveInstructionCount(); runningDeltaInsns += (newCountInsns - oldCountInsns); runningDeltaRegisters += (rmeth.getBlocks().getRegCount() - oldCountRegs); runningTotalInsns += newCountInsns; }
/** * Updates the ROP statistics. * * @param nonOptRmeth non-optimized method * @param rmeth optimized method */ public void updateRopStatistics(RopMethod nonOptRmeth, RopMethod rmeth) { int oldCountInsns = nonOptRmeth.getBlocks().getEffectiveInstructionCount(); int oldCountRegs = nonOptRmeth.getBlocks().getRegCount(); if (DEBUG) { System.err.println("insns (old/new): " + oldCountInsns + "/" + rmeth.getBlocks().getEffectiveInstructionCount() + " regs (o/n):" + oldCountRegs + "/" + rmeth.getBlocks().getRegCount()); } int newCountInsns = rmeth.getBlocks().getEffectiveInstructionCount(); runningDeltaInsns += (newCountInsns - oldCountInsns); runningDeltaRegisters += (rmeth.getBlocks().getRegCount() - oldCountRegs); runningTotalInsns += newCountInsns; }
/** * Updates the ROP statistics. * * @param nonOptRmeth non-optimized method * @param rmeth optimized method */ public static void updateRopStatistics(RopMethod nonOptRmeth, RopMethod rmeth) { int oldCountInsns = nonOptRmeth.getBlocks().getEffectiveInstructionCount(); int oldCountRegs = nonOptRmeth.getBlocks().getRegCount(); if (DEBUG) { System.err.println("insns (old/new): " + oldCountInsns + "/" + rmeth.getBlocks().getEffectiveInstructionCount() + " regs (o/n):" + oldCountRegs + "/" + rmeth.getBlocks().getRegCount()); } int newCountInsns = rmeth.getBlocks().getEffectiveInstructionCount(); runningDeltaInsns += (newCountInsns - oldCountInsns); runningDeltaRegisters += (rmeth.getBlocks().getRegCount() - oldCountRegs); runningTotalInsns += newCountInsns; }