[llvm-bugs] [Bug 35955] New: llvm-tblgen for X86GenInstrInfo.inc.tmp takes a long time due to lots of instregex use
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Jan 15 13:16:37 PST 2018
https://bugs.llvm.org/show_bug.cgi?id=35955
Bug ID: 35955
Summary: llvm-tblgen for X86GenInstrInfo.inc.tmp takes a long
time due to lots of instregex use
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: X86
Assignee: unassignedbugs at nondot.org
Reporter: nicolasweber at gmx.de
CC: llvm-bugs at lists.llvm.org
In a highly-parallel build (-j250), full build time is limited by llvm-tblgen
taking 1 minute to generate X86GenInstrInfo.inc.tmp and
X86GenSubtargetInfo.inc.tmp each.
Command:
cd /Users/thakis/src/llvm-build-goma/lib/Target/X86 && time
/Users/thakis/src/llvm-build-goma/bin/llvm-tblgen -gen-instr-info -I
/Users/thakis/src/llvm-rw/lib/Target/X86 -I /Users/thakis/src/llvm-rw/include
-I /Users/thakis/src/llvm-rw/lib/Target
/Users/thakis/src/llvm-rw/lib/Target/X86/X86.td -o
/Users/thakis/src/llvm-build-goma/lib/Target/X86/X86GenInstrInfo.inc.tmp
Profile:
43.05 s 100.0% 0 s llvm-tblgen (26142)
43.05 s 100.0% 0 s Main Thread 0x7659e
43.05 s 99.9% 0 s start
43.04 s 99.9% 0 s main
43.04 s 99.9% 0 s llvm::TableGenMain(char*, bool
(*)(llvm::raw_ostream&, llvm::RecordKeeper&))
40.53 s 94.1% 0 s (anonymous
namespace)::LLVMTableGenMain(llvm::raw_ostream&, llvm::RecordKeeper&)
40.53 s 94.1% 0 s llvm::EmitInstrInfo(llvm::RecordKeeper&,
llvm::raw_ostream&)
38.05 s 88.3% 0 s llvm::CodeGenTarget::getSchedModels()
const
38.05 s 88.3% 0 s
llvm::CodeGenSchedModels::CodeGenSchedModels(llvm::RecordKeeper&,
llvm::CodeGenTarget const&)
37.93 s 88.1% 3.00 ms
llvm::CodeGenSchedModels::collectSchedClasses()
37.88 s 87.9% 12.00 ms
llvm::CodeGenSchedModels::createInstRWClass(llvm::Record*)
37.85 s 87.9% 38.00 ms
llvm::SetTheory::expand(llvm::Record*)
37.77 s 87.7% 28.67 s (anonymous
namespace)::InstRegexOp::apply(llvm::SetTheory&, llvm::DagInit*,
llvm::SmallSetVector<llvm::Record*, 16u>&, llvm::ArrayRef<llvm::SMLoc>)
9.02 s 20.9% 1.45 s
llvm::Regex::match(llvm::StringRef, llvm::SmallVectorImpl<llvm::StringRef>*)
41.00 ms 0.0% 0 s
llvm::Regex::Regex(llvm::StringRef, unsigned int)
Looking through http://llvm-cs.pcc.me.uk/utils/TableGen/CodeGenSchedule.cpp#60
and its callers on that stack suggests that reordering could help a lot here.
All the instregex calls are pretty new (r315175, r316492, etc); maybe you could
try to speed this up some?
--
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/20180115/8ba1c03c/attachment.html>
More information about the llvm-bugs
mailing list