@Override
	protected void buildGraph() {

		HashMap<Integer, AttributedVertex> vertices = new HashMap<>();

		Iterator<PcodeOpAST> opiter = getPcodeOpIterator();
		HashMap<PcodeOp, AttributedVertex> map = new HashMap<PcodeOp, AttributedVertex>();
		while (opiter.hasNext()) {
			PcodeOpAST op = opiter.next();
			AttributedVertex o = createOpVertex(op);
			map.put(op, o);
			for (int i = 0; i < op.getNumInputs(); ++i) {
				if ((i == 0) &&
					((op.getOpcode() == PcodeOp.LOAD) || (op.getOpcode() == PcodeOp.STORE))) {
					continue;
				}
				if ((i == 1) && (op.getOpcode() == PcodeOp.INDIRECT)) {
					continue;
				}
				VarnodeAST vn = (VarnodeAST) op.getInput(i);
				if (vn != null) {
					AttributedVertex v = getVarnodeVertex(vertices, vn);
					createEdge(v, o);
				}
			}
			VarnodeAST outvn = (VarnodeAST) op.getOutput();
			if (outvn != null) {
				AttributedVertex outv = getVarnodeVertex(vertices, outvn);
				if (outv != null) {
					createEdge(o, outv);
				}
			}
		}
		opiter = getPcodeOpIterator();
		HashSet<PcodeBlockBasic> seenParents = new HashSet<PcodeBlockBasic>();
		HashMap<PcodeBlock, AttributedVertex> first = new HashMap<>();
		HashMap<PcodeBlock, AttributedVertex> last = new HashMap<>();
		while (opiter.hasNext()) {
			PcodeOpAST op = opiter.next();
			PcodeBlockBasic parent = op.getParent();
			if (seenParents.contains(parent)) {
				continue;
			}
			Iterator<PcodeOp> iterator = parent.getIterator();
			PcodeOp prev = null;
			PcodeOp next = null;
			while (iterator.hasNext()) {
				next = iterator.next();
				if (prev == null && map.containsKey(next)) {
					first.put(parent, map.get(next));
				}
				if (prev != null && map.containsKey(prev) && map.containsKey(next)) {
					AttributedEdge edge = createEdge(map.get(prev), map.get(next));
					edge.setEdgeType(PCodeDfgGraphType.WITHIN_BLOCK);
				}
				prev = next;
			}
			if (next != null && map.containsKey(next)) {
				last.put(parent, map.get(next));
			}
			seenParents.add(parent);
		}
		Set<PcodeBlock> keySet = first.keySet();
		for (PcodeBlock block : keySet) {
			for (int i = 0; i < block.getInSize(); i++) {
				PcodeBlock in = block.getIn(i);
				if (last.containsKey(in)) {
					AttributedEdge edge = createEdge(last.get(in), first.get(block));
					edge.setEdgeType(PCodeDfgGraphType.BETWEEN_BLOCKS);
				}
			}
		}
	}
Task to create a combined PCode control flow and data flow graph based on decompiler output
Ghidra/Features/Decompiler/src/main/java/ghidra/app/plugin/core/decompile/actions/PCodeCombinedGraphTask.java