llvm-project/llvm/lib
Chandler Carruth 6acdca78a0 [PH] Replace uses of AssertingVH from members of analysis results with
a lazy-asserting PoisoningVH.

AssertVH is fundamentally incompatible with cache-invalidation of
analysis results. The invaliadtion happens after the AssertingVH has
already fired. Instead, use a PoisoningVH that will assert if the
dangling handle is ever used rather than merely be assigned or
destroyed.

This patch also removes all of the (numerous) doomed attempts to work
around this fundamental incompatibility. It is a pretty significant
simplification IMO.

The most interesting change is in the Inliner where we still do some
clearing because we don't want to rely on the coarse grained
invalidation strategy of the containing pass manager. However, I prefer
the approach that contains this logic to the cleanup phase of the
Inliner, and I think we could enhance the CGSCC analysis management
layer to make this even better in the future if desired.

The rest is straight cleanup.

I've also added a test for one of the harder cases to work around: when
a *module analysis* contains many AssertingVHes pointing at functions.

Differential Revision: https://reviews.llvm.org/D29006

llvm-svn: 292928
2017-01-24 12:55:57 +00:00
..
Analysis [PH] Replace uses of AssertingVH from members of analysis results with 2017-01-24 12:55:57 +00:00
AsmParser ASMParser: use range-based for loops (NFC) 2016-12-27 18:35:22 +00:00
Bitcode [ThinLTO] Fix lazy-loading of MDString instruction attachments 2017-01-20 20:29:16 +00:00
CodeGen [SelectionDAG] Teach getNode to simplify a couple easy cases of EXTRACT_SUBVECTOR 2017-01-24 02:36:59 +00:00
DebugInfo [pdb] Write the Named Stream mapping to Yaml and binary. 2017-01-20 22:42:09 +00:00
Demangle Revert "Demangle: only demangle mangled symbols" 2017-01-20 03:54:04 +00:00
ExecutionEngine RuntimeDyldELF: add LDST128_ABS_LO12_NC reloc 2017-01-23 13:52:08 +00:00
Fuzzer [libFuzzer] mutate empty input using the regular mutators (instead of a custom dummy one). This way when we mutate an empty input there is a chance we will get a dictionary word 2017-01-23 22:52:13 +00:00
IR Make VerifyDomInfo and VerifyLoopInfo global variables 2017-01-24 05:52:07 +00:00
IRReader Timer: Track name and description. 2016-11-18 19:43:18 +00:00
LTO [LTO] Teach lib/LTO about the new pass manager. 2017-01-24 00:58:24 +00:00
LibDriver LibDriver: Allow resource files to be archive members. 2016-12-15 19:37:46 +00:00
LineEditor
Linker [ThinLTO] Import only necessary DICompileUnit fields 2016-12-12 16:09:30 +00:00
MC [Assembler] Improve error when unable to evaluate expression. 2017-01-19 20:06:32 +00:00
Object Add support for the x86_thread_state32_t and 2017-01-23 21:13:29 +00:00
ObjectYAML Add LC_BUILD_VERSION load command 2017-01-23 20:07:55 +00:00
Option Generalize ArgList::AddAllArgs more 2016-09-29 19:47:58 +00:00
Passes [PM] Flesh out the new pass manager LTO pipeline. 2017-01-24 00:57:39 +00:00
ProfileData [WebAssembly] Add triple support for the new wasm object format 2017-01-17 20:34:09 +00:00
Support [Support] Use O_CLOEXEC only when declared 2017-01-24 10:57:01 +00:00
TableGen [Hexagon, TableGen] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-01-04 02:02:05 +00:00
Target [X86][SSE] Add explicit braces to avoid -Wdangling-else warning. 2017-01-24 12:31:30 +00:00
Transforms [PH] Replace uses of AssertingVH from members of analysis results with 2017-01-24 12:55:57 +00:00
XRay Avoid std::errc::protocol_* to appease mingw 2017-01-12 18:33:14 +00:00
CMakeLists.txt [XRay] Define the library for XRay trace logs 2017-01-11 06:39:09 +00:00
LLVMBuild.txt Add an c++ itanium demangler to llvm. 2016-09-06 19:16:48 +00:00