[PATCH] D74060: [KnownBits] Move AND, OR and XOR logic into KnownBits
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 5 08:31:09 PST 2020
foad created this revision.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
foad added reviewers: nikic, RKSimon, lebedev.ri, bjope.
There are at least three clients for KnownBits calculations:
ValueTracking, SelectionDAG and GlobalISel. To reduce duplication the
common logic should be moved out of these clients and into KnownBits
itself.
This patch does this for AND, OR and XOR calculations by implementing
and using appropriate operator overloads KnownBits::operator& etc.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D74060
Files:
llvm/include/llvm/Support/KnownBits.h
llvm/lib/Analysis/ValueTracking.cpp
llvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
llvm/lib/Support/KnownBits.cpp
llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
llvm/unittests/Support/KnownBitsTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74060.242636.patch
Type: text/x-patch
Size: 16952 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200205/44f42033/attachment.bin>
More information about the llvm-commits
mailing list