removeRedundantDbgLocsUsingBackwardScan removes redundant dbg loc definitions by scanning backwards through contiguous sets of them (a "wedge"), removing earlier (in IR order terms) defs for fragments of variables that are defined later in the wedge.
In this patch we use a Bitvector for each variable to track which bits have definitions to more accurately determine whether a loc def is redundant. This patch increases compile time by itself, but reduces it when combined with the follow-up patch.
Any particular reason for switching from SmallDenseMap to DenseMap -- there's an initial allocation for DenseMaps that's going to mean one additional malloc/free for each block, even if there's little work to be done in it.