llvm-6502/include/llvm
Duncan P. N. Exon Smith cf8b959e8d BitcodeReader: Fix some BlockAddress forward reference corner cases
`BlockAddress`es are interesting in that they can reference basic blocks
from *outside* the block's function.  Since basic blocks are not global
values, this presents particular challenges for lazy parsing.

One corner case was found in PR11677 and fixed in r147425.  In that
case, a global variable references a block address.  It's necessary to
load the relevant function to resolve the forward reference before doing
anything with the module.

By inspection, I found (and have fixed here) two other cases:

  - An instruction from one function references a block address from
    another function, and only the first function is lazily loaded.

    I fixed this the same way as PR11677: by eagerly loading the
    referenced function.

  - A function whose block address is taken is dematerialized, leaving
    invalid references to it.

    I fixed this by refusing to dematerialize functions whose block
    addresses are taken (if you have to load it, you can't unload it).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214559 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-01 21:11:34 +00:00
..
ADT Delete dead code. 2014-07-29 00:38:55 +00:00
Analysis Header hygiene: remove using directive and #undef DEBUG_TYPE once we're done. 2014-07-30 00:25:24 +00:00
AsmParser
Bitcode BitcodeReader: Fix some BlockAddress forward reference corner cases 2014-08-01 21:11:34 +00:00
CodeGen Make classof in MemSDNode consistent with MemIntrinsicSDNode 2014-07-31 22:31:33 +00:00
Config Regenerate autoconf, previous updates to the configury haven't 2014-07-28 22:00:44 +00:00
DebugInfo Use a reference instead of a pointer. 2014-07-31 20:19:36 +00:00
ExecutionEngine Move virtual method out of line. 2014-08-01 18:49:24 +00:00
IR Add the missing hasLinkOnceODRLinkage predicate. 2014-07-30 15:57:51 +00:00
IRReader
LineEditor
Linker
LTO
MC Move MCObjectSymbolizer.h to MC/MCAnalysis. 2014-07-31 19:29:23 +00:00
Object A std::unique_ptr case I missed in the previous patch. 2014-07-31 03:36:00 +00:00
Option
ProfileData ProfileData: Don't redundantly default initialize a member 2014-07-29 15:56:06 +00:00
Support [PowerPC] Add JMP_SLOT relocation definitions 2014-07-30 03:20:45 +00:00
TableGen
Target Add TargetInstrInfo interface isAsCheapAsAMove. 2014-07-29 01:55:19 +00:00
Transforms Move -verify-use-list-order into llvm-uselistorder 2014-07-25 17:13:03 +00:00
CMakeLists.txt
InitializePasses.h Move -verify-use-list-order into llvm-uselistorder 2014-07-25 17:13:03 +00:00
LinkAllIR.h
LinkAllPasses.h Move -verify-use-list-order into llvm-uselistorder 2014-07-25 17:13:03 +00:00
module.modulemap [modules] Work around mislayering of MC / Object. 2014-07-26 01:10:32 +00:00
module.modulemap.build
Pass.h
PassAnalysisSupport.h
PassInfo.h
PassManager.h
PassRegistry.h
PassSupport.h