[llvm-bugs] [Bug 26055] New: LiveDebugValues is very slow
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Jan 6 17:26:25 PST 2016
https://llvm.org/bugs/show_bug.cgi?id=26055
Bug ID: 26055
Summary: LiveDebugValues is very slow
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Common Code Generator Code
Assignee: vikram.tarikere at gmail.com
Reporter: vonosmas at gmail.com
CC: aprantl at apple.com, dberlin at dberlin.org,
dblaikie at gmail.com, llvm-bugs at lists.llvm.org
Classification: Unclassified
LiveDebugValues pass re-committed in r255759 is slow on large functions with
lots of local variables and basic blocks. This often happens if one is using
"-O2 -fsanitize=address -g" (first flag causes a lot of inlining, while ASan
adds a number of non-trivial basic blocks).
Attached is a reproducer created from OpenCV 2.2.0:
$ ./bin/llc -filetype=obj a.ll
takes forever, and the time is spent in this pass:
46.42% llc llc [.] (anonymous
namespace)::LiveDebugValues::VarLoc::operator==((anonymous
namespace)::LiveDebugValues::VarLoc const&) const
20.04% llc llc [.] (anonymous
namespace)::LiveDebugValues::transfer(llvm::MachineInstr&, std::list<(anonymous
namespace)::LiveDebugValues::VarLoc, std::allocator<(anonymous
namespace)::LiveDeb
11.14% llc llc [.] bool
__gnu_cxx::__ops::_Iter_pred<(anonymous
namespace)::LiveDebugValues::transferRegisterDef(llvm::MachineInstr&,
std::list<(anonymous namespace)::LiveDebugValues::VarLoc,
9.74% llc llc [.] (anonymous
namespace)::LiveDebugValues::runOnMachineFunction(llvm::MachineFunction&)
Note that some functions are wildly inefficient: e.g.
transferTerminatorInst appends one list to another in O(n^2) time. It looks
like at least in some cases it would be beneficial to replace lists with hash
maps. I've created a patch to do so, but the compile time was huge anyway.
Also, do you have an estimate on the total number of times you will consider a
single machine instruction? (as you can scan the same MBB several times).
Currently there's no way to disable this pass: could you consider adding an
option to switch it on/off, or disabling it while working on speeding it up?
--
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/20160107/07f26bf1/attachment.html>
More information about the llvm-bugs
mailing list