Instead of constructing DebugVariables and looking up the order in the comparison function, compute the order upfront and then sort a vector of (order, instr).
This improves compile-time: http://llvm-compile-time-tracker.com/compare.php?from=0d51b6ab1587a5d5d649cc5c1a9bc9e7e6d8de2c&to=c2d367208d3e1fc4fb0f1281efe3145e22bcc2ad&stat=instructions
nit, "appear"