private boolean isPreserved(Register reg) {
		Varnode v = new Varnode(reg.getAddress(), reg.getMinimumByteSize());
		Set<Varnode> returnValues = getReturnValues(v);
		if (returnValues.isEmpty()) {
			// TODO: Register was modified but value appears to be unknown ??
			return false;
		}
		for (Varnode val : returnValues) {
			if (!v.equals(val)) {
				return false;
			}
		}
		return true;
	}
Returns the set of registers which were modified
Ghidra/Features/Base/src/main/java/ghidra/util/state/ResultsState.java