[PATCH] D67686: Fix compile-time regression caused by rL371928
Daniel Sanders via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 17 18:00:50 PDT 2019
dsanders created this revision.
dsanders added a reviewer: jmolloy.
Herald added subscribers: dexonsmith, hiraditya.
Herald added a project: LLVM.
Also fixup rL371928 <https://reviews.llvm.org/rL371928> for cases that occur on our out-of-tree backend
There were still quite a few intermediate APInts and this caused the
compile time of MCCodeEmitter for our target to jump from 16s up to
~5m40s. This patch, brings it back down to ~17s by eliminating pretty
much all of them using two new APInt functions (extractBitsAsZExtValue(),
insertBits() but with a uint64_t). The exact conditions for eliminating
them is that the field extracted/inserted must be <=64-bit which is
almost always true.
Note: The two new APInt API's assume that APInt::WordSize is at least
64-bit because that means they touch at most 2 APInt words. They
statically assert that's true. It seems very unlikely that someone
is patching it to be smaller so this should be fine.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D67686
Files:
llvm/include/llvm/ADT/APInt.h
llvm/lib/Support/APInt.cpp
llvm/test/TableGen/BigEncoder.td
llvm/unittests/ADT/APIntTest.cpp
llvm/utils/TableGen/CodeEmitterGen.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67686.220595.patch
Type: text/x-patch
Size: 12324 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190918/f1a43417/attachment.bin>
More information about the llvm-commits
mailing list