[all-commits] [llvm/llvm-project] c63aed: [KnownBits] Move AND, OR and XOR logic into KnownBits

jayfoad via All-commits all-commits at lists.llvm.org
Thu Apr 9 02:10:52 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: c63aed890ecaf686486d6067dc190db7f275afc3
      https://github.com/llvm/llvm-project/commit/c63aed890ecaf686486d6067dc190db7f275afc3
  Author: Jay Foad <jay.foad at amd.com>
  Date:   2020-04-09 (Thu, 09 Apr 2020)

  Changed paths:
    M llvm/include/llvm/Support/KnownBits.h
    M llvm/lib/Analysis/ConstantFolding.cpp
    M llvm/lib/Analysis/ValueTracking.cpp
    M llvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
    M llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
    M llvm/lib/Support/KnownBits.cpp
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
    M llvm/unittests/Support/KnownBitsTest.cpp

  Log Message:
  -----------
  [KnownBits] Move AND, OR and XOR logic into KnownBits

Summary:
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.

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D74060




More information about the All-commits mailing list