llvm-project/llvm/test
Keno Fischer 25916079ff Reapply r257105 "[Verifier] Check that debug values have proper size"
The follow extra changes were made to test cases:

Manually making the variable be the actual type instead of a pointer
to avoid pointer-size differences in generic code:

    LLVM :: DebugInfo/Generic/2010-03-24-MemberFn.ll
    LLVM :: DebugInfo/Generic/2010-04-06-NestedFnDbgInfo.ll
    LLVM :: DebugInfo/Generic/2010-05-03-DisableFramePtr.ll
    LLVM :: DebugInfo/Generic/varargs.ll

Delete sizing information from debug info for the same reason
(but the presence of the pointer was important to the test case):

    LLVM :: DebugInfo/Generic/restrict.ll
    LLVM :: DebugInfo/Generic/tu-composite.ll
    LLVM :: Linker/type-unique-type-array-a.ll
    LLVM :: Linker/type-unique-simple2.ll

Fixing an incorrect DW_OP_deref

    LLVM :: DebugInfo/Generic/2010-05-03-OriginDIE.ll

Fixing a missing DW_OP_deref

    LLVM :: DebugInfo/Generic/incorrect-variable-debugloc.ll

Additionally, clang should no longer complain during bootstrap should no
longer happen after r257534.

The original commit message was:
```
Summary:
Teach the Verifier to make sure that the storage size given to llvm.dbg.declare
or the value size given to llvm.dbg.value agree with what is declared in
DebugInfo. This is implicitly assumed in a number of passes (e.g. in SROA).
Additionally this catches a number of common mistakes, such as passing a
pointer when a value was intended or vice versa.

One complication comes from stack coloring which modifies the original IR when
it merges allocas in order to make sure that if AA falls back to the IR it gets
the correct result. However, given this new invariant, indiscriminately
replacing one alloca by a different (differently sized one) is no longer valid.
Fix this by just undefing out any use of the alloca in a dbg.declare in this
case.

Additionally, I had to fix a number of test cases. Of particular note:
- I regenerated dbg-changes-codegen-branch-folding.ll from the given source as
  it was affected by the bug fixed in r256077
- two-cus-from-same-file.ll was changed to avoid having a variable-typed debug
  variable as that would depend on the target, even though this test is
  supposed to be generic
- I had to manually declared size/align for reference type. See also the
  discussion for D14275/r253186.
- fpstack-debuginstr-kill.ll required changing `double` to `long double`
- most others were just a question of adding OP_deref
```

llvm-svn: 257550
2016-01-13 00:31:44 +00:00
..
Analysis [Vectorization] Actually return from error case in isStridedPtr 2016-01-08 01:55:13 +00:00
Assembler [ConstantFold] Fix bitcast to gep constant folding transform. 2015-12-14 19:30:32 +00:00
Bindings Deprecate a few C APIs. 2015-12-18 23:46:42 +00:00
Bitcode [WinEH] Verify unwind edges against EH pad tree 2016-01-10 04:28:38 +00:00
BugPoint [bugpoint] Add a named metadata (+their operands) reducer 2015-11-06 00:12:50 +00:00
CodeGen Reapply r257105 "[Verifier] Check that debug values have proper size" 2016-01-13 00:31:44 +00:00
DebugInfo Reapply r257105 "[Verifier] Check that debug values have proper size" 2016-01-13 00:31:44 +00:00
Examples
ExecutionEngine [Orc] XFAIL a few remote-jit test cases that I missed in r257391. 2016-01-11 23:57:39 +00:00
Feature [WinEH] Verify unwind edges against EH pad tree 2016-01-10 04:28:38 +00:00
FileCheck
Instrumentation [sanitizer] [msan] Fix origin store of array types 2016-01-11 19:55:27 +00:00
Integer
JitListener Fix several accidental DOS line endings in source files 2016-01-03 17:22:03 +00:00
LTO Add InaccessibleMemOnly and inaccessibleMemOrArgMemOnly attributes 2015-12-16 16:16:19 +00:00
LibDriver
Linker Reapply r257105 "[Verifier] Check that debug values have proper size" 2016-01-13 00:31:44 +00:00
MC [ARM] Fix several state persistence bugs 2016-01-12 13:38:15 +00:00
Object Handle archives with paths in the names. 2015-12-18 16:07:17 +00:00
Other Recommit r256952 "Filtering IR printing for print-after-all/print-before-all" 2016-01-06 22:55:03 +00:00
SymbolRewriter
TableGen Add new vector types for 512-, 1024- and 2048-bit vectors 2015-11-24 13:07:35 +00:00
Transforms Reapply r257105 "[Verifier] Check that debug values have proper size" 2016-01-13 00:31:44 +00:00
Unit
Verifier [WinEH] Fix catchpad pred verification 2016-01-10 04:32:03 +00:00
YAMLParser
tools For llvm-objdump, add the option -private-header (without the trailing ’s’) 2016-01-13 00:25:36 +00:00
.clang-format
CMakeLists.txt [llvm-dwp] Add missing dependency from llvm tests on the llvm-dwp tool 2015-12-01 00:57:05 +00:00
Makefile check-llvm: Tweak the feature "timestamps" for autoconf. 2015-12-21 08:46:12 +00:00
Makefile.tests
TestRunner.sh
lit.cfg [llvm-symbolizer] -print-source-context-lines option to print source code around the line. 2016-01-09 00:14:35 +00:00
lit.site.cfg.in Make WinCOFFObjectWriter.cpp's timestamp writing not use ENABLE_TIMESTAMPS 2016-01-06 19:05:19 +00:00