[PATCH] D42176: [WebAssembly] Optimise relocation iteration to remove n^2 loop (LLD)
Nicholas Wilson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 17 06:17:55 PST 2018
ncw created this revision.
ncw added a reviewer: sbc100.
Herald added subscribers: llvm-commits, mgrang, sunfish, aheejin, jgravelle-google, dschuff, jfb.
Addresses issue: https://github.com/WebAssembly/tool-conventions/issues/32
Previously, for each function/segment we iterated over every relocation to find the relevant ones, which is an n^2 operation.
Now, we just make a single pass. There's a very small upfront cost involved in sorting the relocations (which they probably are anyway, but I don't think it's guaranteed).
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D42176
Files:
wasm/InputChunks.cpp
wasm/InputChunks.h
wasm/InputFiles.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42176.130162.patch
Type: text/x-patch
Size: 5491 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180117/46cd715c/attachment.bin>
More information about the llvm-commits
mailing list