@Override
	public AddressSetView addInstructionSet(Lifespan lifespan, TracePlatform platform,
			InstructionSet instructionSet, boolean overwrite) {
		InternalTracePlatform dbPlatform = space.manager.platformManager.assertMine(platform);
		// NOTE: Partly derived from CodeManager#addInstructions()
		// Attempted to factor more fluently
		AddressSet result = new AddressSet();
		try (LockHold hold = LockHold.lock(space.lock.writeLock())) {
			long startSnap = lifespan.lmin();
			Set<Address> skipDelaySlots = new HashSet<>();
			if (!overwrite) {
				checkInstructionSet(startSnap, instructionSet, skipDelaySlots);
			}

			// Add blocks
			for (InstructionBlock block : instructionSet) {
				InstructionBlockAdder adder =
					startAddingBlock(lifespan, skipDelaySlots, dbPlatform, block, overwrite);
				if (adder == null) {
					continue;
				}
				Instruction lastInstruction = adder.doAddInstructions();
				block.setInstructionsAddedCount(adder.count);
				if (lastInstruction != null) {
					Address maxAddress = DBTraceCodeManager.instructionMax(lastInstruction, true);
					result.addRange(block.getStartAddress(), maxAddress);
					space.trace.setChanged(new TraceChangeRecord<>(TraceEvents.CODE_ADDED, space,
						new ImmutableTraceAddressSnapRange(block.getStartAddress(), maxAddress,
							lifespan)));
				}
			}
			return result;
		}
		catch (AddressOverflowException e) {
			// Better have skipped any delay-slotted instructions whose delays overflowed
			throw new AssertionError(e);
		}
	}
Checks the intended locations for conflicts with existing units.

<p>
This also clears locations where delay slots will be replacing non-delay slots.
{@code skipDelaySlots} will be populated with any existing delay slot locations which should
not be overwritten

@param instructionSet the instruction set to examine
@param skipDelaySlots an empty mutable set to be populated
Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/database/listing/DBTraceInstructionsView.java