- Mar 06, 2015
-
-
Michael Gottesman authored
llvm-svn: 231436
-
Michael Gottesman authored
It will always be in the history if it is needed again. Now it is just dead code. llvm-svn: 231435
-
Rui Ueyama authored
In the resolver, we maintain a list of undefined symbols, and when we visit an archive file, we check that file if undefined symbols can be resolved using files in the archive. The archive file class provides find() function to lookup a symbol. Previously, we call find() for each undefined symbols. Archive files may be visited multiple times if they are in a --start-group and --end-group. If we visit a file M times and if we have N undefined symbols, find() is called M*N times. I found that that is one of the most significant bottlenecks in LLD when linking a large executable. find() is not a very cheap operation because it looks up a hash table for a given string. And a string, or a symbol name, can be pretty long if you are dealing with C++ symbols. We can eliminate the bottleneck. Calling find() with the same symbol multiple times is a waste. If a result of looking up a symbol is "not found", it stays "not found" forever because the symbol simply doesn't exist in the archive. Thus, we should call find() only for newly-added undefined symbols. This optimization makes O(M*N) O(N). In this patch, all undefined symbols are added to a vector. For each archive/shared library file, we maintain a start position P. All symbols [0, P) are already searched. [P, end of the vector) are not searched yet. For each file, we scan the vector only once. This patch changes the order in which undefined symbols are looked for. Previously, we iterated over the result of _symbolTable.undefines(). Now we iterate over the new vector. This is a benign change but caused differences in output if remaining undefines exist. This is why some tests are updated. The performance improvement of this patch seems sometimes significant. Previously, linking chrome.dll on my workstation (Xeon 2.4GHz 8 cores) took about 70 seconds. Now it takes (only?) 30 seconds! http://reviews.llvm.org/D8091 llvm-svn: 231434
-
Nadav Rotem authored
This optimization a continuation of r231140 that reasoned about signed div. llvm-svn: 231433
-
Rui Ueyama authored
_reverseRef is a multimap from atoms to atoms. The map contains reverse edges of "layout-before" and "group" edges for dead-stripping. The type of the variable was DenseMap<Atom *, DenseSet<Atom *>>. This patch changes that to std::unordered_multimap<Atom *, Atom *>. A DenseMap with a value type of DenseSet was not fast. Inserting 900k items to the map took about 1.6 seconds on my workstation. unordered_multimap on the other hand took only 0.6 seconds. Use of the map also got faster -- originally markLive took 1.3 seconds in the same test case, and it now took 1.0 seconds. In total we shove off 1.3 seconds out of 27 seconds in that test case. llvm-svn: 231432
-
Hans Wennborg authored
llvm-svn: 231431
-
Michael Gottesman authored
llvm-svn: 231430
-
Kuba Brecka authored
Reviewed at http://reviews.llvm.org/D7973 llvm-svn: 231429
-
Kuba Brecka authored
Reviewed at http://reviews.llvm.org/D8087 llvm-svn: 231428
-
Michael Gottesman authored
llvm-svn: 231427
-
Michael Gottesman authored
[objc-arc] Extract out state specific to a ref count from the main objc arc sequence dataflow. This will allow me to separate the actual ARC queries from the meat of the dataflow algorithm. llvm-svn: 231426
-
Michael Gottesman authored
llvm-svn: 231425
-
Richard Smith authored
We used to save out and eagerly load a (potentially huge) table of merged formerly-canonical declarations when we loaded each module. This was extremely inefficient in the presence of large amounts of merging, and didn't actually save any merging lookup work, because we still needed to perform name lookup to check that our merged declaration lists were complete. This also resulted in a loss of laziness -- even if we only needed an early declaration of an entity, we would eagerly pull in all declarations that had been merged into it regardless. We now store the relevant fragments of the table within the declarations themselves. In detail: * The first declaration of each entity within a module stores a list of first declarations from imported modules that are merged into it. * Loading that declaration pre-loads those other entities, so that they appear earlier within the redeclaration chain. * The name lookup tables list the most recent local lookup result, if there is one, or all directly-imported lookup results if not. llvm-svn: 231424
-
Chaoren Lin authored
Reviewers: clayborg, zturner, vharron, sbest Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8065 llvm-svn: 231423
-
Ahmed Bougacha authored
It turns out 256bit V[SZ]EXT nodes are still generated by the new shuffle lowering, so this is here to stay! llvm-svn: 231422
-
Daniel Jasper authored
Discovered by asan. llvm-svn: 231421
-
Greg Clayton authored
When we have a symbol, like "NSLog" that we try to call in an expression, make sure we prioritize the external symbols over the internal one. This is a temporary fix until a more comprehensive fix can be made for finding functions that we call in expressions. We find "NSLog" in ClangExpressionDeclMap::FindExternalVisibleDecls() in after a call to target->GetImages().FindFunctions(...). Note that there are two symbols: NSLog from CFNetwork which is not external, and NSLog from Foundation which _is_ external. We do something with the external symbol with: if (extern_symbol) { AddOneFunction (context, NULL, extern_symbol, current_id); context.m_found.function = true; } Then later we try to lookup the _Z5NSLogP8NSStringz name and we don't find it so we call ClangExpressionDeclMap::GetFunctionAddress() with "_Z5NSLogP8NSStringz" as the name and the sc_list_size is zero at the "if" statement at line 568 because we don't find the mangled name and we extract the basename "NSLog" and call: FindCodeSymbolInContext(ConstString(basename), m_parser_vars->m_sym_ctx, sc_list); sc_list_size = sc_list.GetSize(); and we get a list size of two again, and we proceed to search for the symbol again, this time ignoring the external vs non-external-ness of the symbols that we find. This fix ensures we prioritize the external symbol until we get a real fix from Sean Callanan when he gets back to make sure we don't do multiple lookups for the same symbol we already resolved. <rdar://problem/19879282> llvm-svn: 231420 -
Fariborz Jahanian authored
arithmetic type to a vector so that the arithmatic type matches the vector element type. Without which it crashes in Code Gen. rdar://20000762 llvm-svn: 231419
-
Paul Robinson authored
llvm-svn: 231418
-
Peter Collingbourne authored
llvm-svn: 231417
-
Peter Collingbourne authored
Fixes llgo following Duncan's changes to debug info in r231082. llgo needs to replace composite types, which are no longer represented using MDTuple. llvm-svn: 231416
-
Greg Clayton authored
<rdar://problem/20039160> llvm-svn: 231415
-
Philip Reames authored
At this point, we should have decent coverage of the involved code. I've got a few more test cases to cleanup and submit, but what's here is already reasonable. I've got a collection of liveness tests which will be posted for review along with a decent liveness algorithm in the next few days. Once those are in, the code in this file should be well tested and I can start renaming things without risk of serious breakage. llvm-svn: 231414
-
Kostya Serebryany authored
[sanitizer] Reconstruct the function that dumps block/edge coverage, hopefully making it more robust. Also increase the allowed coverage size on 32-bit. llvm-svn: 231413
-
Quentin Colombet authored
llvm-svn: 231412
-
Benjamin Kramer authored
NFC. llvm-svn: 231411
-
Alexey Samsonov authored
The test case fails on AArch64. llvm-svn: 231410
-
Alexey Samsonov authored
It's not that easy. If we're only checking -fsanitize=shift-base we still need to verify that exponent has sane value, otherwise UBSan-inserted checks for base will contain undefined behavior themselves. llvm-svn: 231409
-
Sanjay Patel authored
This patch reduces code size for all AVX targets and increases speed for some chips. SSE 4.1 introduced the useless (see code comments) 2-register form of BLENDV and only in the packed float/double flavors. AVX subsequently made the instruction useful by adding a 4-register operand form. So we just need to paper over the lack of scalar forms of this instruction, complicate the code to choose float or double forms, and use blendv on scalars since all FP is in xmm registers anyway. This gives us an approximately 50% speed up for a blendv microbenchmark sequence on SandyBridge and Haswell: blendv : 29.73 cycles/iter logic : 43.15 cycles/iter No new test cases with this patch because: 1. fast-isel-select-sse.ll tests the positive side for regular X86 lowering and fast-isel 2. sse-minmax.ll and fp-select-cmp-and.ll confirm that we're not firing for scalar selects without AVX 3. fp-select-cmp-and.ll and logical-load-fold.ll confirm that we're not firing for scalar selects with constants. http://llvm.org/bugs/show_bug.cgi?id=22483 Differential Revision: http://reviews.llvm.org/D8063 llvm-svn: 231408
-
Vince Harron authored
Trying to get the build green so we can notice new failures easier. Differential Revision: http://reviews.llvm.org/D8039 llvm-svn: 231407
-
Benjamin Kramer authored
NFC intended. llvm-svn: 231406
-
Andrew Kaylor authored
llvm-svn: 231405
-
Eric Fiselier authored
llvm-svn: 231404
-
Rui Ueyama authored
llvm-svn: 231403
-
Joerg Sonnenberger authored
caller of the function. llvm-svn: 231402
-
Benjamin Kramer authored
The copies already diverged, don't let them become any worse. Reduce redundancy in code with a little macro metaprogramming. llvm-svn: 231401
-
Ahmed Bougacha authored
Fixes PR22761, rdar://20024866. Differential Revision: http://reviews.llvm.org/D8042 llvm-svn: 231400
-
Philip Reames authored
These are focused around the actual relocation rewriting itself, not the rest of the infrastructure. llvm-svn: 231399
-
Rafael Espindola authored
I missed an occurrence of the old symbol in my previous patch. llvm-svn: 231398
-
Tom Stellard authored
This is what all the targets check for and is consistent with the initialized value of MissingFeatures, which is sometimes assinged to ErrorInfo. llvm-svn: 231397
-