aboutsummaryrefslogtreecommitdiffstats
path: root/lib/AsmParser/llvmAsmParser.y
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-10-21 23:02:41 +0000
committerChris Lattner <sabre@nondot.org>2001-10-21 23:02:41 +0000
commitc9a21b51a11d84443cb3f03787fd08a69fdd73cd (patch)
treefa032c7b7c180ed3321c1af00dd5a9b48afe50c4 /lib/AsmParser/llvmAsmParser.y
parentbfabd8877dce8e5942e1cddd9e945dc48e2276cd (diff)
downloadexternal_llvm-c9a21b51a11d84443cb3f03787fd08a69fdd73cd.zip
external_llvm-c9a21b51a11d84443cb3f03787fd08a69fdd73cd.tar.gz
external_llvm-c9a21b51a11d84443cb3f03787fd08a69fdd73cd.tar.bz2
Two changes:
1. Delete type handle regardless of whether a collision occured 2. Remove a MAJOR pessimization of runtime performance (thought be be an optimization at the time). This second one was causing a 105k llvm file (from gcc) to parse in 58 seconds... without the 'optimization' it now parses in 3.64 seconds. I suck. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@933 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser/llvmAsmParser.y')
-rw-r--r--lib/AsmParser/llvmAsmParser.y21
1 files changed, 2 insertions, 19 deletions
diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y
index 28562ac..e49ffa3 100644
--- a/lib/AsmParser/llvmAsmParser.y
+++ b/lib/AsmParser/llvmAsmParser.y
@@ -463,21 +463,6 @@ static void ResolveTypes(vector<PATypeHolder<Type> > &LateResolveTypes) {
}
-// ResolveSomeTypes - This goes through the forward referenced type table and
-// completes references that are now done. This is so that types are
-// immediately resolved to be as concrete as possible. This does not cause
-// thrown exceptions if not everything is resolved.
-//
-static void ResolveSomeTypes(vector<PATypeHolder<Type> > &LateResolveTypes) {
- for (unsigned i = 0; i < LateResolveTypes.size(); ) {
- if (ResolveType(LateResolveTypes[i]))
- ++i; // Type didn't resolve
- else
- LateResolveTypes.erase(LateResolveTypes.begin()+i); // Type resolved!
- }
-}
-
-
// setValueName - Set the specified value to the name given. The name may be
// null potentially, in which case this is a noop. The string passed in is
// assumed to be a malloc'd string buffer, and is freed by this function.
@@ -1041,11 +1026,9 @@ ConstPool : ConstPool OptAssign CONST ConstVal {
InsertType($4->get(),
inMethodScope() ? CurMeth.Types : CurModule.Types);
}
- delete $4;
-
- ResolveSomeTypes(inMethodScope() ? CurMeth.LateResolveTypes :
- CurModule.LateResolveTypes);
}
+
+ delete $4;
}
| ConstPool MethodProto { // Method prototypes can be in const pool
}