summaryrefslogtreecommitdiff
path: root/tools/opt/BreakpointPrinter.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2017-04-26 23:59:52 +0000
committerAdrian Prantl <aprantl@apple.com>2017-04-26 23:59:52 +0000
commit9d291ed9adc63a55b343a706315971410adb7136 (patch)
tree43f283176f6779f9e618079a0d44300b3afe095a /tools/opt/BreakpointPrinter.cpp
parent589155c2d7c6f0b81caf0ab5b410e626794dc7d9 (diff)
Turn DISubprogram into a variable-length node.
DISubprogram currently has 10 pointer operands, several of which are often nullptr. This patch reduces the amount of memory allocated by DISubprogram by rearranging the operands such that containing type, template params, and thrown types come last, and are only allocated when they are non-null (or followed by non-null operands). This patch also eliminates the entirely unused DisplayName operand. This saves up to 4 pointer operands per DISubprogram. (I tried measuring the effect on peak memory usage on an LTO link of an X86 llc, but the results were very noisy). This reapplies r301498 with an attempted workaround for g++. Differential Revision: https://reviews.llvm.org/D32560 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301501 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/opt/BreakpointPrinter.cpp')
-rw-r--r--tools/opt/BreakpointPrinter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/opt/BreakpointPrinter.cpp b/tools/opt/BreakpointPrinter.cpp
index 33b3edcd123..e5614ed061e 100644
--- a/tools/opt/BreakpointPrinter.cpp
+++ b/tools/opt/BreakpointPrinter.cpp
@@ -51,7 +51,7 @@ struct BreakpointPrinter : public ModulePass {
if (!SP)
continue;
getContextName(SP->getScope().resolve(), Name);
- Name = Name + SP->getDisplayName().str();
+ Name = Name + SP->getName().str();
if (!Name.empty() && Processed.insert(Name).second) {
Out << Name << "\n";
}