private void setBlockVertexAttributes(AttributedVertex vertex, PcodeBlockBasic basicBlk) {

		// Build Pcode representation
		StringBuffer buf = new StringBuffer();
		int cnt = 0;
		Iterator<PcodeOp> opIter = basicBlk.getIterator();
		while (opIter.hasNext()) {
			PcodeOp op = opIter.next();
			if (buf.length() != 0) {
				buf.append('\n');
			}
			formatOp(op, buf);
			if (++cnt == codeLimitPerBlock) {
				buf.append("\n...");
				break;
			}
		}
		vertex.setAttribute(CODE_ATTRIBUTE, buf.toString());

		// Establish vertex type
		String vertexType = BODY;
		if (basicBlk.getInSize() == 0) {
			vertexType = ENTRY;
		}
		else {
			switch (basicBlk.getOutSize()) {
				case 0:
					vertexType = EXIT;
					break;
				case 1:
					vertexType = BODY;
					break;
				default:
					vertexType = SWITCH;
			}
		}
		vertex.setVertexType(vertexType);
	}
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