[PATCH] D32637: [KnownBits] Add methods to set and clear all bits.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 4 09:39:43 PDT 2017


craig.topper updated this revision to Diff 97838.
craig.topper added a comment.

I've removed the method that sets all bits in both zero and one for now. I think that should be done in a future patch that adds intersecting support since setting all vectors always proceeds an intersection loop. Maybe the method should just be prepareForIntersection or something that stresses that its only useful for that.

I've added methods for testing and setting all ones and all zeros. To preserve existing code semantics I've added two versions of setting zero/one, one that just asserts if it creates a conflict, and one that erases all previous information. The latter is called 'force', but I'm not sure if that's a good name.

Making the vector unknown is now called resetAll. And there is a method to check if the known bits are all unknown.

Let me know if these names make sense. I'm open to other suggestions.


https://reviews.llvm.org/D32637

Files:
  include/llvm/CodeGen/FunctionLoweringInfo.h
  include/llvm/Support/KnownBits.h
  lib/Analysis/Lint.cpp
  lib/Analysis/ValueTracking.cpp
  lib/CodeGen/SelectionDAG/SelectionDAG.cpp
  lib/CodeGen/SelectionDAG/TargetLowering.cpp
  lib/Target/AMDGPU/AMDGPUISelLowering.cpp
  lib/Target/ARM/ARMISelLowering.cpp
  lib/Target/PowerPC/PPCISelLowering.cpp
  lib/Target/Sparc/SparcISelLowering.cpp
  lib/Target/X86/X86ISelLowering.cpp
  lib/Target/XCore/XCoreISelLowering.cpp
  lib/Transforms/InstCombine/InstCombineCalls.cpp
  lib/Transforms/InstCombine/InstCombineCompares.cpp
  lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32637.97838.patch
Type: text/x-patch
Size: 16702 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170504/6c4aaca3/attachment.bin>


More information about the llvm-commits mailing list