llvm-6502/lib
Duncan P. N. Exon Smith b0d0a65e1d Verifier: Check that inlined-at locations agree
Check that the `MDLocalVariable::getInlinedAt()` in a debug info
intrinsic's variable always matches the `MDLocation::getInlinedAt()` of
its `!dbg` attachment.

The goal here is to get rid of `MDLocalVariable::getInlinedAt()`
entirely (PR22778), since it's expensive and unnecessary, but I'll let
this verifier check bake for a while (a week maybe?) first.  I've
updated the testcases that had the wrong value for `inlinedAt:`.

This checks that things are sane in the IR, but currently things go out
of whack in a few places in the backend.  I'll follow shortly with
assertions in the backend (with code fixes).

If you have out-of-tree testcases that just started failing, here's how
I updated these ones:

 1. The verifier check gives you the basic block, function, instruction,
    and relevant metadata arguments (metadata numbering doesn't
    necessarily match the source file, unfortunately).
 2. Look at the `@llvm.dbg.*()` instruction, and compare the
    `inlinedAt:` fields of the variable argument (second `metadata`
    argument) and the `!dbg` attachment.
 3. Figure out based on the variable `scope:` chain and the functions in
    the file whether the variable has been inlined (and into what), so
    you can determine which `inlinedAt:` is actually correct.  In all of
    the in-tree testcases, the `!MDLocation()` was correct and the
    `!MDLocalVariable()` was wrong, but YMMV.
 4. Duplicate the metadata that you're going to change, and add/drop the
    `inlinedAt:` field from one of them.  Be careful that the other
    references to the same metadata node point at the correct one.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234021 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-03 16:54:30 +00:00
..
Analysis [opaque pointer type] API migration for GEP constant factories 2015-04-02 18:55:32 +00:00
AsmParser [opaque pointer type] API migration for GEP constant factories 2015-04-02 18:55:32 +00:00
Bitcode [opaque pointer type] API migration for GEP constant factories 2015-04-02 18:55:32 +00:00
CodeGen CodeGen: Fix MachineInstr::print() for DBG_VALUE 2015-04-03 16:23:04 +00:00
DebugInfo Raising minimum required CMake version to 2.8.12.2. 2015-03-23 20:03:57 +00:00
ExecutionEngine [Orc] Fix local-linkage handling in the CompileOnDemand layer. 2015-04-02 05:28:10 +00:00
Fuzzer [fuzzer] document the -tokens flag. Also change the diagnostic output 2015-04-01 21:33:20 +00:00
IR Verifier: Check that inlined-at locations agree 2015-04-03 16:54:30 +00:00
IRReader
LineEditor
Linker Reapply "Linker: Drop function pointers for overridden subprograms" 2015-03-26 18:35:30 +00:00
LTO Remove more superfluous .str() and replace std::string concatenation with Twine. 2015-03-30 15:42:36 +00:00
MC MC: For variable symbols, maintain MCSymbol::Section as a cache. 2015-04-03 01:46:11 +00:00
Object Remove more superfluous .str() and replace std::string concatenation with Twine. 2015-03-30 15:42:36 +00:00
Option Remove more superfluous .str() and replace std::string concatenation with Twine. 2015-03-30 15:42:36 +00:00
Passes
ProfileData Re-sort includes with sort-includes.py and insert raw_ostream.h where it's used. 2015-03-23 19:32:43 +00:00
Support [ARM] Rename v8.1a from "extension" to "architecture": follow-up 2015-04-02 09:32:14 +00:00
TableGen
Target [X86] Added SSE4.2 CRC32 memory folding patterns + tests 2015-04-03 14:24:40 +00:00
Transforms [ASan] Don't use stack malloc for 32-bit functions using inline asm 2015-04-02 21:44:55 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile