@Override
	public VariableStorage getJoinStorage(Varnode[] pieces) throws InvalidInputException {
		VariableStorage storage;
		try {
			storage = new VariableStorage(datatypeManager.getProgram(), pieces);
		}
		catch (InvalidInputException e) {
			storage = null;
		}
		if (storage == null) {
			// TODO: VariableStorage probably needs to support more piece combinations
			// The decompiler can generate joins that can't be stored.
			// We fill in an emergency storage location in the unique space in these cases
			// because generally we only need a placeholder in the syntax tree.
			// Using a unique allows renaming to work using DynamicHash
			// These awkward joins in many cases are a symptom of other problems, like
			// bad prototypes causing the decompiler to produce weird stuff
			// TODO: We should emit some kind of warning
			int sz = 0;
			for (Varnode piece : pieces) {
				sz += piece.getSize();
			}
			Address uniqaddr = addrFactory.getUniqueSpace().getAddress(0x20000000);
			storage = new VariableStorage(datatypeManager.getProgram(), uniqaddr, sz);
		}
		if (joinToStorage == null) {
			joinToStorage = new HashMap<>();
		}
		if (storageToJoin == null) {
			storageToJoin = new HashMap<>();
		}
		Integer offObject = storageToJoin.get(storage);
		if (offObject != null) {					// Same storage was previously registered
			return joinToStorage.get(offObject);	// Use the old version
		}

		int roundsize = (storage.size() + 15) & 0xfffffff0;
		offObject = Integer.valueOf(joinAllocate);
		joinAllocate += roundsize;
		joinToStorage.put(offObject, storage);
		storageToJoin.put(storage, offObject);
		return storage;
	}
Varnodes and PcodeOps in a coherent graph structure
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/pcode/PcodeSyntaxTree.java