[PATCH] D74943: [GISel][KnownBits] Add a cache mechanism to speed compile time
Quentin Colombet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 20 18:15:35 PST 2020
qcolombet created this revision.
qcolombet added reviewers: aemerson, paquette, volkan, aditya_nandakumar, dsanders, arsenm.
Herald added subscribers: hiraditya, wdng.
Herald added a project: LLVM.
This patch adds a cache that is valid only for the duration of a call
to getKnownBits. With such short lived cache we avoid all the problems
of cache invalidation while still getting the benefits of reusing
the information we already computed.
This cache is useful whenever an instruction occurs more than once
in a chain of computation.
E.g.,
v0 = G_ADD v1, v2
v3 = G_ADD v0, v1
Previously we would compute the known bits for:
v1, v2, v0, then v1 again and finally v3.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D74943
Files:
llvm/include/llvm/CodeGen/GlobalISel/GISelKnownBits.h
llvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74943.245780.patch
Type: text/x-patch
Size: 4464 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200221/d36bfd12/attachment.bin>
More information about the llvm-commits
mailing list