[llvm-bugs] [Bug 27050] New: ArgumentPromotion crashing with "An asserting value handle still pointed to this value!"
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Mar 24 02:57:02 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=27050
Bug ID: 27050
Summary: ArgumentPromotion crashing with "An asserting value
handle still pointed to this value!"
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Interprocedural Optimizations
Assignee: unassignedbugs at nondot.org
Reporter: mikael.holmen at ericsson.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
Created attachment 16080
--> https://llvm.org/bugs/attachment.cgi?id=16080&action=edit
Reproducer ll file
Running opt with
build-all/bin/opt -S -globals-aa -lcssa -argpromotion argpromo.ll
We get
While deleting: void (%rec*)* %
An asserting value handle still pointed to this value!
UNREACHABLE executed at ../lib/IR/Value.cpp:744!
0 opt 0x00000000016c01b8
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
1 opt 0x00000000016be986 llvm::sys::RunSignalHandlers() + 54
2 opt 0x00000000016c0cea
3 libpthread.so.0 0x00007f6979aff340
4 libc.so.6 0x00007f6978d27cc9 gsignal + 57
5 libc.so.6 0x00007f6978d2b0d8 abort + 328
6 opt 0x000000000167a6cd llvm::llvm_unreachable_internal(char
const*, char const*, unsigned int) + 461
7 opt 0x000000000131ae8e
llvm::ValueHandleBase::ValueIsDeleted(llvm::Value*) + 1070
8 opt 0x000000000131a75b llvm::Value::~Value() + 43
9 opt 0x00000000012b443d llvm::Function::~Function() + 525
10 opt 0x00000000012b4689 llvm::Function::~Function() + 9
11 opt 0x000000000134bfcf
12 opt 0x0000000001346cdf
13 opt 0x0000000000eb0c29
14 opt 0x00000000012ebfe5
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 869
15 opt 0x00000000006303ae main + 8670
16 libc.so.6 0x00007f6978d12ec5 __libc_start_main + 245
17 opt 0x000000000061c61c
Stack dump:
0. Program arguments: build-all/bin/opt -S -globals-aa -lcssa
-argpromotion argpromo.ll
1. Running pass 'CallGraph Pass Manager' on module 'argpromo.ll'.
Abort
And if turning on more printouts with "-debug-pass=Executions -debug":
Args: build-all/bin/opt -S -globals-aa -lcssa -argpromotion RM9887.ll
-debug-pass=Executions -debug
Pass Arguments: -targetlibinfo -tti -assumption-cache-tracker -basiccg
-globals-aa -domtree -loops -lcssa -basiccg -argpromotion -verify -print-module
Target Library Information
Target Transform Information
Assumption Cache Tracker
ModulePass Manager
CallGraph Construction
Globals Alias Analysis
FunctionPass Manager
Dominator Tree Construction
Natural Loop Information
Loop-Closed SSA Form Pass
CallGraph Construction
Call Graph SCC Pass Manager
Promote 'by reference' arguments to scalars
FunctionPass Manager
Module Verifier
Print module to stderr
[2016-03-24 10:58:22.427373000] 0x42eced0 Executing Pass 'CallGraph
Construction' on Module 'RM9887.ll'...
[2016-03-24 10:58:22.427617000] 0x42eced0 Executing Pass 'Globals Alias
Analysis' on Module 'RM9887.ll'...
[2016-03-24 10:58:22.427758000] 0x42eced0 Executing Pass 'Function Pass
Manager' on Module 'RM9887.ll'...
[2016-03-24 10:58:22.427828000] 0x42efab0 Executing Pass 'Dominator Tree
Construction' on Function 'bar'...
[2016-03-24 10:58:22.427906000] 0x42efab0 Executing Pass 'Natural Loop
Information' on Function 'bar'...
[2016-03-24 10:58:22.428004000] 0x42efab0 Executing Pass 'Loop-Closed SSA
Form Pass' on Function 'bar'...
[2016-03-24 10:58:22.428082000] 0x42efab0 Freeing Pass 'Dominator Tree
Construction' on Function 'bar'...
[2016-03-24 10:58:22.428148000] 0x42efab0 Freeing Pass 'Loop-Closed SSA
Form Pass' on Function 'bar'...
[2016-03-24 10:58:22.428212000] 0x42efab0 Freeing Pass 'Natural Loop
Information' on Function 'bar'...
[2016-03-24 10:58:22.428276000] 0x42efab0 Executing Pass 'Dominator Tree
Construction' on Function 'foo'...
[2016-03-24 10:58:22.428343000] 0x42efab0 Executing Pass 'Natural Loop
Information' on Function 'foo'...
[2016-03-24 10:58:22.428441000] 0x42efab0 Executing Pass 'Loop-Closed SSA
Form Pass' on Function 'foo'...
[2016-03-24 10:58:22.428530000] 0x42efab0 Freeing Pass 'Dominator Tree
Construction' on Function 'foo'...
[2016-03-24 10:58:22.428597000] 0x42efab0 Freeing Pass 'Loop-Closed SSA
Form Pass' on Function 'foo'...
[2016-03-24 10:58:22.428659000] 0x42efab0 Freeing Pass 'Natural Loop
Information' on Function 'foo'...
[2016-03-24 10:58:22.428724000] 0x42eced0 Executing Pass 'CallGraph
Construction' on Module 'RM9887.ll'...
[2016-03-24 10:58:22.428793000] 0x42eced0 Executing Pass 'CallGraph Pass
Manager' on Module 'RM9887.ll'...
[2016-03-24 10:58:22.428895000] 0x42f0150 Executing Pass 'Promote 'by
reference' arguments to scalars' on Call Graph Nodes 'Call graph node for
function: 'foo'<<0x42f54f0>> #uses=1
'...
ARG PROMOTION: Promoting to:
declare internal void @foo()
From:
define internal void @foo(%rec* %par0) {
ret void
}
While deleting: void (%rec*)* %
An asserting value handle still pointed to this value!
UNREACHABLE executed at ../lib/IR/Value.cpp:744!
So ArgumentPromotion has tried to rewrite
define internal void @foo(%rec* %par0) {
ret void
}
to
define internal void @foo() {
ret void
}
but then when it removes the old version of foo something still has
a handle to it?
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160324/be6104bc/attachment.html>
More information about the llvm-bugs
mailing list