summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DIE.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2010-03-31 19:34:01 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2010-03-31 19:34:01 +0000
commit74729ae0940379feff9d4d1ab6652e7c3462ac33 (patch)
treeae1dab90a94513e156e113612e54cd522ee3557c /llvm/lib/CodeGen/AsmPrinter/DIE.cpp
parent3f183ae5cb2f505dbf06702a16eef57781ff5b54 (diff)
downloadbcm5719-llvm-74729ae0940379feff9d4d1ab6652e7c3462ac33.tar.gz
bcm5719-llvm-74729ae0940379feff9d4d1ab6652e7c3462ac33.zip
DwarfDebug: Allocate DIEValues with a BumpPtrAllocator. Most of them are
POD-like anyway, so we don't even care about calling their d'tors (DIEBlock being the exception). ~6% less mallocs and ~1% compile time improvement on clang -O0 -g oggenc.c llvm-svn: 100035
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DIE.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DIE.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DIE.cpp b/llvm/lib/CodeGen/AsmPrinter/DIE.cpp
index cb2fe472fb6..e0e3ff79467 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DIE.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DIE.cpp
@@ -19,6 +19,7 @@
#include "llvm/MC/MCStreamer.h"
#include "llvm/MC/MCSymbol.h"
#include "llvm/Target/TargetData.h"
+#include "llvm/Support/Allocator.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/Format.h"
@@ -114,8 +115,8 @@ DIE::~DIE() {
/// addSiblingOffset - Add a sibling offset field to the front of the DIE.
///
-DIEValue *DIE::addSiblingOffset() {
- DIEInteger *DI = new DIEInteger(0);
+DIEValue *DIE::addSiblingOffset(BumpPtrAllocator &A) {
+ DIEInteger *DI = new (A) DIEInteger(0);
Values.insert(Values.begin(), DI);
Abbrev.AddFirstAttribute(dwarf::DW_AT_sibling, dwarf::DW_FORM_ref4);
return DI;
OpenPOWER on IntegriCloud