1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
llvm-mirror/lib
Mikael Holmen 2e96ed2e60 [SROA] Really remove associated dbg.declare when removing dead alloca
Summary:
There already was code that tried to remove the dbg.declare, but that code
was placed after we had called
 I->replaceAllUsesWith(UndefValue::get(I->getType()));
on the alloca, so when we searched for the relevant dbg.declare, we
couldn't find it.

Now we do the search before we call RAUW so there is a chance to find it.

An existing testcase needed update due to this. Two dbg.declare with undef
were removed and then suddenly one of the two CHECKS failed.

Before this patch we got

  call void @llvm.dbg.declare(metadata i24* undef, metadata !14, metadata !DIExpression(DW_OP_LLVM_fragment, 32, 24)), !dbg !15
  call void @llvm.dbg.declare(metadata %struct.prog_src_register* undef, metadata !14, metadata !DIExpression()), !dbg !15
  call void @llvm.dbg.value(metadata i32 0, metadata !14, metadata !DIExpression(DW_OP_LLVM_fragment, 0, 32)), !dbg !15
  call void @llvm.dbg.value(metadata i32 0, metadata !14, metadata !DIExpression(DW_OP_LLVM_fragment, 32, 24)), !dbg !15

and with it we get

  call void @llvm.dbg.value(metadata i32 0, metadata !14, metadata !DIExpression(DW_OP_LLVM_fragment, 0, 32)), !dbg !15
  call void @llvm.dbg.value(metadata i32 0, metadata !14, metadata !DIExpression(DW_OP_LLVM_fragment, 32, 24)), !dbg !15

However, the CHECKs in the testcase checked things in a silly order, so
they only passed since they found things in the first dbg.declare. Now
we changed the order of the checks and the test passes.

Reviewers: rnk

Reviewed By: rnk

Subscribers: llvm-commits

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

llvm-svn: 313875
2017-09-21 11:14:27 +00:00
..
Analysis Revert r313771 "[SLP] Vectorize jumbled memory loads." 2017-09-20 18:00:03 +00:00
AsmParser IR: Represent -ggnu-pubnames with a flag on the DICompileUnit. 2017-09-12 21:50:41 +00:00
BinaryFormat [BinaryFormat] Fix out of bounds read. 2017-08-31 12:50:42 +00:00
Bitcode [llvm] Fix some typos. NFC. 2017-09-15 20:01:43 +00:00
CodeGen Fixed reverted commit rL312318 2017-09-21 10:04:02 +00:00
DebugInfo llvm-dwarfdump: implement --recurse-depth=<N> 2017-09-20 17:44:00 +00:00
Demangle
ExecutionEngine Revert "Revert "ExecutionEngine: add R_AARCH64_ABS{16,32}"" 2017-09-20 21:32:44 +00:00
Fuzzer Moving libFuzzer from LLVM to compiler-rt. 2017-08-21 23:25:12 +00:00
FuzzMutate Move some CLI utils out of llvm-isel-fuzzer and into the library 2017-09-02 23:43:04 +00:00
IR Fixed reverted commit rL312318 2017-09-21 10:04:02 +00:00
IRReader
LineEditor
Linker Linker: Create a function declaration when moving a non-prevailing alias of function type. 2017-08-10 01:07:44 +00:00
LTO Revert "[ThinLTO] Avoid archive member collisions with old API" 2017-09-17 18:11:26 +00:00
MC [WebAssembly] Add support for local symbol bindings 2017-09-20 21:17:04 +00:00
Object [WebAssembly] Weak symbols should be defined in SF_Global 2017-09-20 23:39:44 +00:00
ObjectYAML Reland "[WebAssembly] Add support for naming wasm data segments" 2017-09-20 19:03:35 +00:00
Option Revert "Revert r311552: [Bash-autocompletion] Add support for static analyzer flags" 2017-08-29 00:09:31 +00:00
Passes [DivRempairs] add a pass to optimize div/rem pairs (PR31028) 2017-09-09 13:38:18 +00:00
ProfileData [llvm-cov] Improve error messaging for function mismatches 2017-09-21 01:11:30 +00:00
Support [yaml2obj] - Don't crash on one more invalid document. 2017-09-21 08:25:59 +00:00
TableGen Untabify. 2017-08-28 06:47:47 +00:00
Target [mips] Fix relocation record format and ELF header for N32 ABI 2017-09-21 10:44:26 +00:00
Testing
ToolDrivers [llvm-dlltool] Mention arm64 in the lists of architecture alternatives 2017-09-08 06:49:46 +00:00
Transforms [SROA] Really remove associated dbg.declare when removing dead alloca 2017-09-21 11:14:27 +00:00
WindowsManifest Fix bug 34608 by moving private header out of public header. 2017-09-14 23:01:13 +00:00
XRay [XRay][tools] Support tail-call exits before we write them in the runtime 2017-09-18 06:08:46 +00:00
CMakeLists.txt Moving libFuzzer from LLVM to compiler-rt. 2017-08-21 23:25:12 +00:00
LLVMBuild.txt Re-apply "Introduce FuzzMutate library" 2017-08-21 22:57:06 +00:00