use of jadx.core.dex.instructions.PhiInsn in project jadx by skylot.
the class SSATransform method removePhiList.
private static boolean removePhiList(MethodNode mth, List<PhiInsn> insnToRemove) {
for (BlockNode block : mth.getBasicBlocks()) {
PhiListAttr phiList = block.get(AType.PHI_LIST);
if (phiList == null) {
continue;
}
List<PhiInsn> list = phiList.getList();
for (PhiInsn phiInsn : insnToRemove) {
if (list.remove(phiInsn)) {
for (InsnArg arg : phiInsn.getArguments()) {
if (arg == null) {
continue;
}
SSAVar sVar = ((RegisterArg) arg).getSVar();
if (sVar != null) {
sVar.setUsedInPhi(null);
}
}
InstructionRemover.remove(mth, block, phiInsn);
}
}
if (list.isEmpty()) {
block.remove(AType.PHI_LIST);
}
}
insnToRemove.clear();
return true;
}
Aggregations