[PATCH] D32569: [SelectionDAG] Use KnownBits struct in DAG's computeKnownBits and simplifyDemandedBits

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 26 16:20:23 PDT 2017


craig.topper created this revision.
Herald added subscribers: nhaehnle, nemanjai, jyknight, arsenm.
Herald added a reviewer: javed.absar.

This patch replaces the separate APInts for KnownZero/KnownOne with a single KnownBits struct. This is similar to what was done to ValueTracking's version earlier today.

This should be a largely mechanical transformation from KnownZero to Known.Zero.

There are a few several places where I replaced

  KnownZero = KnownOne = APInt(KnownZero.getBitWidth(), 0)

with

  Known.Zero.clearAllBits(); Known.One.clearAllBits();

since the width was already dependent on KnownZero.


https://reviews.llvm.org/D32569

Files:
  include/llvm/CodeGen/FunctionLoweringInfo.h
  include/llvm/CodeGen/SelectionDAG.h
  include/llvm/Target/TargetLowering.h
  lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
  lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
  lib/CodeGen/SelectionDAG/SelectionDAG.cpp
  lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
  lib/CodeGen/SelectionDAG/TargetLowering.cpp
  lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
  lib/Target/AArch64/AArch64ISelLowering.cpp
  lib/Target/AArch64/AArch64ISelLowering.h
  lib/Target/AMDGPU/AMDGPUISelLowering.cpp
  lib/Target/AMDGPU/AMDGPUISelLowering.h
  lib/Target/AMDGPU/SIISelLowering.cpp
  lib/Target/ARM/ARMISelLowering.cpp
  lib/Target/ARM/ARMISelLowering.h
  lib/Target/PowerPC/PPCISelDAGToDAG.cpp
  lib/Target/PowerPC/PPCISelLowering.cpp
  lib/Target/PowerPC/PPCISelLowering.h
  lib/Target/Sparc/SparcISelLowering.cpp
  lib/Target/Sparc/SparcISelLowering.h
  lib/Target/SystemZ/SystemZISelDAGToDAG.cpp
  lib/Target/SystemZ/SystemZISelLowering.cpp
  lib/Target/X86/X86ISelDAGToDAG.cpp
  lib/Target/X86/X86ISelLowering.cpp
  lib/Target/X86/X86ISelLowering.h
  lib/Target/X86/X86InstrCompiler.td
  lib/Target/XCore/XCoreISelLowering.cpp
  lib/Target/XCore/XCoreISelLowering.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32569.96845.patch
Type: text/x-patch
Size: 141109 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170426/4ea34d8c/attachment-0001.bin>


More information about the llvm-commits mailing list