private void graphPcodeBlock(AttributedGraph graph, PcodeBlock pblock, TaskMonitor monitor)
			throws CancelledException {

		if (pblock == null) {
			return;
		}

		AttributedVertex fromVertex = getBlockVertex(graph, pblock, monitor);

		int outCnt = pblock.getOutSize();
		for (int i = 0; i < outCnt; i++) {
			monitor.checkCancelled();
			PcodeBlock outPBlock = pblock.getOut(i);
			AttributedVertex toVertex = getBlockVertex(graph, outPBlock, monitor);
			graph.addEdge(fromVertex, toVertex);
			// TODO: set edge attributes ??
		}
	}
Task to create a PCode control flow graph based on decompiler output
Ghidra/Features/Decompiler/src/main/java/ghidra/app/plugin/core/decompile/actions/PCodeCfgGraphTask.java