Orlando Cazalet-Hyams 07f9c1f2f8 [NFC][KeyInstr] Add Atom Group (re)mapping
Add:
   mapAtomInstance - map the atom group number to a new group.
   RemapSourceAtom - apply the mapped atom group number to this instruction.

Modify:
  CloneBasicBlock - Call mapAtomInstance on cloned instruction's DebugLocs
                    if MapAtoms is true (default). Setting to false could
		    lead to a degraded debugging experience. See code comment.

Optimisations like loop unroll that duplicate instructions need to remap source
atom groups so that each duplicated source construct instance is considered
distinct when determining is_stmt locations.

This commit adds the remapping functionality and a unittest.
2025-03-28 17:07:03 +00:00
..