use of jadx.core.dex.attributes.nodes.PhiListAttr 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.removeUsedInPhi(phiInsn);
}
}
InsnRemover.remove(mth, block, phiInsn);
}
}
if (list.isEmpty()) {
block.remove(AType.PHI_LIST);
}
}
insnToRemove.clear();
return true;
}
Aggregations