llvm-project/llvm/lib
Quentin Colombet 4e1d389ac5 [X86] Model FAULTING_LOAD_OP as a terminator and branch.
This operation may branch to the handler block and we do not want it
to happen anywhere within the basic block.
Moreover, by marking it "terminator and branch" the machine verifier
does not wrongly assume (because of AnalyzeBranch not knowing better)
the branch is analyzable. Indeed, the target was seeing only the
unconditional branch and not the faulting load op and thought it was
a simple unconditional block.
The machine verifier was complaining because of that and moreover,
other optimizations could have done wrong transformation!

In the process, simplify the representation of the handler block in
the faulting load op. Now, we directly reference the handler block
instead of using a label. This has the benefits of:
1. MC knows how to issue a label for a BB, so leave that to it.
2. Accessing the target BB from its label is painful, whereas it is
   direct from a MBB operand.

Note: The 2 bytes offset in implicit-null-check.ll comes from the
fact the unconditional jumps are not removed anymore, as the whole
terminator sequence is not analyzable anymore.

Will fix it in a subsequence commit.

llvm-svn: 268327
2016-05-02 22:58:54 +00:00
..
Analysis [LVI] Add an API to LazyValueInfo so that it can export ConstantRanges 2016-05-02 19:58:00 +00:00
AsmParser IR: Enable debug info type ODR uniquing for forward decls 2016-04-19 18:00:19 +00:00
Bitcode Clean up to avoid compiler warnings for casting away const qualifiers. 2016-04-27 18:35:02 +00:00
CodeGen [X86] Model FAULTING_LOAD_OP as a terminator and branch. 2016-05-02 22:58:54 +00:00
DebugInfo [llvm-pdbdump] Fix read past EOF when file is too small. 2016-05-02 22:16:57 +00:00
ExecutionEngine Thread Expected<...> up from libObject’s getType() for symbols to allow llvm-objdump to produce a good error message. 2016-05-02 20:28:12 +00:00
Fuzzer [libFuzzer] enable detect_leaks=1, add proper docs 2016-04-29 18:49:55 +00:00
IR Revert "[SimplifyCFG] Extend TryToSimplifyUncondBranchFromEmptyBlock for empty block including lifetime intrinsics" 2016-05-02 19:43:22 +00:00
IRReader Remove autoconf support 2016-01-26 21:29:08 +00:00
LTO LTO: Don't bother trying to mangle unnamed globals, as they can't be preserved with MustPreserveSymbols. 2016-04-27 23:48:11 +00:00
LibDriver LibDriver: Silently do nothing when provided no inputs. 2016-04-13 19:36:04 +00:00
LineEditor Fix Clang-tidy modernize-deprecated-headers warnings in some files; other minor fixes. 2016-03-28 17:40:08 +00:00
Linker Fix recursive -only-needed. 2016-04-21 14:56:33 +00:00
MC Read discriminators correctly from object file. 2016-04-28 22:09:37 +00:00
Object Don't try to create thin bsd archives. 2016-05-02 21:06:57 +00:00
ObjectYAML [lanai] Add Lanai backend. 2016-03-28 13:09:54 +00:00
Option Option parser: class for consuming a joined arg in addition to all remaining args 2016-04-15 00:23:30 +00:00
Passes PM: Port Reassociate to the new pass manager 2016-04-26 23:39:29 +00:00
ProfileData Remove redundant return, NFC 2016-05-02 21:33:36 +00:00
Support Add operator- to Path's reverse_iterator. Needed for D19666 2016-04-29 16:48:07 +00:00
TableGen [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
Target [X86] Model FAULTING_LOAD_OP as a terminator and branch. 2016-05-02 22:58:54 +00:00
Transforms Revert "ThinLTO: do not import function whose linkage prevents inlining." 2016-05-02 22:26:04 +00:00
CMakeLists.txt Move ObjectYAML code to a new library. 2016-03-01 19:15:06 +00:00
LLVMBuild.txt Add LLVMBuild for ObjectYAML. 2016-03-01 21:29:33 +00:00