summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser
diff options
context:
space:
mode:
authorMehdi Amini <mehdi.amini@apple.com>2016-09-17 06:00:02 +0000
committerMehdi Amini <mehdi.amini@apple.com>2016-09-17 06:00:02 +0000
commita53d49e1b547a9658be46865d687aeb481b3b32c (patch)
tree6af44087ae1c06b8690e2a40259801c80049020b /llvm/lib/AsmParser
parent05188a646d9e5c097a9d18fcae397c6312fe786d (diff)
downloadbcm5719-llvm-a53d49e1b547a9658be46865d687aeb481b3b32c.tar.gz
bcm5719-llvm-a53d49e1b547a9658be46865d687aeb481b3b32c.zip
Don't create a SymbolTable in Function when the LLVMContext discards value names (NFC)
The ValueSymbolTable is used to detect name conflict and rename instructions automatically. This is not needed when the value names are automatically discarded by the LLVMContext. No functional change intended, just saving a little bit of memory. This is a recommit of r281806 after fixing the accessor to return a pointer instead of a reference and updating all the call-sites. llvm-svn: 281813
Diffstat (limited to 'llvm/lib/AsmParser')
-rw-r--r--llvm/lib/AsmParser/LLParser.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index 0e154b26578..18f5bbe6599 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/lib/AsmParser/LLParser.cpp
@@ -2504,7 +2504,7 @@ bool LLParser::PerFunctionState::FinishFunction() {
Value *LLParser::PerFunctionState::GetVal(const std::string &Name, Type *Ty,
LocTy Loc) {
// Look this name up in the normal function symbol table.
- Value *Val = F.getValueSymbolTable().lookup(Name);
+ Value *Val = F.getValueSymbolTable()->lookup(Name);
// If this is a forward reference for the value, see if we already created a
// forward ref record.
@@ -2922,7 +2922,7 @@ bool LLParser::ParseValID(ValID &ID, PerFunctionState *PFS) {
return Error(Label.Loc, "cannot take address of numeric label after "
"the function is defined");
BB = dyn_cast_or_null<BasicBlock>(
- F->getValueSymbolTable().lookup(Label.StrVal));
+ F->getValueSymbolTable()->lookup(Label.StrVal));
if (!BB)
return Error(Label.Loc, "referenced value is not a basic block");
}
@@ -6507,7 +6507,7 @@ bool LLParser::ParseUseListOrderBB() {
return Error(Label.Loc, "invalid numeric label in uselistorder_bb");
if (Label.Kind != ValID::t_LocalName)
return Error(Label.Loc, "expected basic block name in uselistorder_bb");
- Value *V = F->getValueSymbolTable().lookup(Label.StrVal);
+ Value *V = F->getValueSymbolTable()->lookup(Label.StrVal);
if (!V)
return Error(Label.Loc, "invalid basic block in uselistorder_bb");
if (!isa<BasicBlock>(V))
OpenPOWER on IntegriCloud