1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
llvm-mirror/unittests
Duncan P. N. Exon Smith 9829cda628 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).

llvm-svn: 214559
2014-08-01 21:11:34 +00:00
..
ADT [ADT] Add a remarkbly useful little helper routine to ArrayRef for 2014-07-27 01:11:19 +00:00
Analysis AA metadata refactoring (introduce AAMDNodes) 2014-07-24 12:16:19 +00:00
Bitcode BitcodeReader: Fix some BlockAddress forward reference corner cases 2014-08-01 21:11:34 +00:00
CodeGen DIE: Pass ownership of children via std::unique_ptr rather than raw pointer. 2014-04-25 20:00:34 +00:00
DebugInfo [CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt. 2013-12-10 11:13:32 +00:00
ExecutionEngine [CMake] Update libdeps. 2014-07-14 05:01:53 +00:00
IR IR/UseTest.cpp: Avoid std::to_string() to appease mingw32 bot. 2014-07-26 00:45:30 +00:00
LineEditor [CMake] LineEditorTests: Add Support to link_components. 2014-07-24 11:44:33 +00:00
Linker [C++11] Use 'nullptr'. 2014-06-08 22:29:17 +00:00
MC [CMake] Update libdeps. 2014-07-14 05:01:53 +00:00
Option Retire llvm::array_endof in favor of non-member std::end. 2014-04-12 16:15:53 +00:00
Support unittests: Actually test reverse iterators in Path tests 2014-07-16 08:18:58 +00:00
Transforms [Debug Info] add DISubroutineType and its creation takes DITypeArray. 2014-07-28 22:24:06 +00:00
CMakeLists.txt Invert the MC -> Object dependency. 2014-07-03 02:01:39 +00:00
Makefile Invert the MC -> Object dependency. 2014-07-03 02:01:39 +00:00
Makefile.unittest With rpaths being set correctly, SHLIBPATH_VAR is not needed anymore. 2014-02-28 16:16:51 +00:00