[LLVMbugs] [Bug 13821] New: Slow compilation of ASan unittests in CMake debug build
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Sep 12 08:06:38 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=13821
Bug #: 13821
Summary: Slow compilation of ASan unittests in CMake debug
build
Product: new-bugs
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: samsonov at google.com
CC: chandlerc at gmail.com, kcc at google.com,
llvmbugs at cs.uiuc.edu
Classification: Unclassified
To reproduce:
1. Create cmake build directory:
$ mkdir llvm_debug_build
$ cd llvm_debug_build
$ cmake /path/to/llvm/checkout
2. Build ASan unittests
$ make AsanUnitTests -j8
OR download asan_test_preproc.cc from attachment
$ ./llvm_debug_build/bin/clang++ -O2 -faddress-sanitizer asan_test_preproc.cc
-c -o a.o
compilation time with -O2: 1m59.702s
compilation time w/o -O2: 0m31.462s
"perf record -g" for -O2 doesn't really look helpful:
+ 1.60% [.] llvm::PointerIntPair<llvm::IndexListEntry*, 2u, unsigned
int, llvm
+ 1.23% [.] llvm::Value::getValueID() const
+ 0.82% [.] llvm::IndexListEntry::getIndex() const
+ 0.78% [.]
llvm::PointerLikeTypeTraits<llvm::IndexListEntry*>::getFromVoidPoi
+ 0.73% [.] llvm::SlotIndex::getIndex() const
+ 0.73% [.] llvm::PointerIntPair<llvm::IndexListEntry*, 2u, unsigned
int, llvm
+ 0.71% [.] llvm::SlotIndex::isValid() const
+ 0.61% [.] _int_malloc
+ 0.60% [.] llvm::SlotIndex::listEntry() const
+ 0.51% [.] llvm::PointerIntPair<llvm::Value*, 2u, unsigned int,
llvm::Pointer
+ 0.49% [.] llvm::SmallPtrSetImpl::insert_imp(void const*)
+ 0.46% [.] llvm::SlotIndex::getSlot() const
+ 0.46% [.] llvm::APInt::isSingleWord() const
+ 0.45% [.] llvm::SDNode::getOpcode() const
+ 0.42% [.] llvm::MachineOperand::isReg() const
+ 0.39% [.] llvm::SmallVectorBase::empty() const
+ 0.37% [.] memcpy
+ 0.37% [.] llvm::SmallPtrSetImpl::FindBucketFor(void const*) const
+ 0.34% [.] llvm::Instruction::getOpcode() const
+ 0.33% [.]
llvm::SpillPlacement::Node::update(llvm::SpillPlacement::Node cons
+ 0.33% [.] llvm::Type::getTypeID() const
It would be cool if llvm could print the time spent by each pass. Does anyone
knows if it can? :) For now hypothesis is that we can blame RegAlloc, but more
investigation needed.
The test is 2000+ lines of heavy googletest code, so it's really big, but the
long compile time is somewhat distracting anyway. Possible solution is to split
the file into several smaller ones: this can save compile time, but this
doesn't fix the source of the problem.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list