예제 #1
0
 private void visitInstruction(Instruction instr) {
   if (instr instanceof StartingInstruction) {
     StartingInstruction startingInstr = (StartingInstruction) instr;
     Instruction_phi phi = startingInstr.getInstruction();
     EList<BasicBlockRef> labels = phi.getLabels();
     int valueIndex = 0;
     for (BasicBlockRef blockRef : labels) {
       BasicBlock block = blockRef.getRef();
       List<Phi> valueRefs = basicBlockReferences.get(block);
       ValueRef valueRef = phi.getValues().get(valueIndex++);
       valueRefs.add(new Phi(startingInstr.getName(), valueRef, phi.getType(), startingInstr));
     }
   }
 }
예제 #2
0
 private void getStartingInstructionReads(StartingInstruction instr) {
   if (countPhiValues) {
     for (ValueRef value : instr.getInstruction().getValues()) {
       visitValueRef(value);
     }
   }
 }
예제 #3
0
 @Override
 public ResolvedType caseStartingInstruction(StartingInstruction object) {
   return resolve(object.getInstruction());
 }