[DwarfDebug] Improve validThroughout performance (4/4)

Almost NFC (see end).

The backwards scan in validThroughout significantly contributed to compile time
for a pathological case, causing the 'X86 Assembly Printer' pass to account for
roughly 70% of the run time. This patch guards the loop against running
unnecessarily, bringing the pass contribution down to 4%.

Almost NFC: There is a hack in validThroughout which promotes single constant
value DBG_VALUEs in the prologue to be live throughout the function. We're more
likely to hit this code path with this patch applied. Similarly to the parent
patches there is a small coverage change reported in the order of 10s of bytes.

Reviewed By: aprantl

Differential Revision: https://reviews.llvm.org/D86153
diff --git a/llvm/test/DebugInfo/X86/inlined-formal-parameter.ll b/llvm/test/DebugInfo/X86/inlined-formal-parameter.ll
index 00562df..376505f 100644
--- a/llvm/test/DebugInfo/X86/inlined-formal-parameter.ll
+++ b/llvm/test/DebugInfo/X86/inlined-formal-parameter.ll
@@ -19,8 +19,7 @@
 ; CHECK:       DW_TAG_inlined_subroutine
 ; CHECK-NEXT:    DW_AT_abstract_origin {{.*}} "bar"
 ; CHECK:         DW_TAG_formal_parameter
-; CHECK-NEXT:      DW_AT_location [DW_FORM_data4]	(
-; CHECK-NEXT:        [{{.*}}, {{.*}}): DW_OP_consts +0)
+; CHECK-NEXT:      DW_AT_const_value [DW_FORM_sdata]   (0)
 ; CHECK-NEXT:      DW_AT_abstract_origin {{.*}} "a"
 
 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"