History log of /llvm-project/llvm/include/llvm/Support/KnownBits.h (Results 76 – 82 of 82)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 0ff0d741 07-Aug-2017 Craig Topper <craig.topper@intel.com>

[KnownBits] Fix copy pasto in comment. NFC

llvm-svn: 310320


Revision tags: llvmorg-5.0.0-rc1, llvmorg-4.0.1, llvmorg-4.0.1-rc3, llvmorg-4.0.1-rc2
# 8df66c60 12-May-2017 Craig Topper <craig.topper@gmail.com>

[KnownBits] Add bit counting methods to KnownBits struct and use them where possible

This patch adds min/max population count, leading/trailing zero/one bit counting methods.

The min methods return

[KnownBits] Add bit counting methods to KnownBits struct and use them where possible

This patch adds min/max population count, leading/trailing zero/one bit counting methods.

The min methods return answers based on bits that are known without considering unknown bits. The max methods give answers taking into account the largest count that unknown bits could give.

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

llvm-svn: 302925

show more ...


# f0aeee01 05-May-2017 Craig Topper <craig.topper@gmail.com>

[KnownBits] Add wrapper methods for setting and clear all bits in the underlying APInts in KnownBits.

This adds routines for reseting KnownBits to unknown, making the value all zeros or all ones. It

[KnownBits] Add wrapper methods for setting and clear all bits in the underlying APInts in KnownBits.

This adds routines for reseting KnownBits to unknown, making the value all zeros or all ones. It also adds methods for querying if the value is zero, all ones or unknown.

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

llvm-svn: 302262

show more ...


# 8189a87a 03-May-2017 Craig Topper <craig.topper@gmail.com>

[KnownBits] Add methods for determining if KnownBits is a constant value

This patch adds isConstant and getConstant for determining if KnownBits represents a constant value and to retrieve the value

[KnownBits] Add methods for determining if KnownBits is a constant value

This patch adds isConstant and getConstant for determining if KnownBits represents a constant value and to retrieve the value. Use them to simplify code.

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

llvm-svn: 302091

show more ...


# d938fd13 03-May-2017 Craig Topper <craig.topper@gmail.com>

[KnownBits] Add zext, sext, and trunc methods to KnownBits

This patch adds zext, sext, and trunc methods to KnownBits and uses them where possible.

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

[KnownBits] Add zext, sext, and trunc methods to KnownBits

This patch adds zext, sext, and trunc methods to KnownBits and uses them where possible.

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

llvm-svn: 302088

show more ...


# ca48af3c 29-Apr-2017 Craig Topper <craig.topper@gmail.com>

[KnownBits] Add methods for determining if the known bits represent a negative/nonnegative number and add methods for changing the negative/nonnegative state

Summary: This patch adds isNegative, isN

[KnownBits] Add methods for determining if the known bits represent a negative/nonnegative number and add methods for changing the negative/nonnegative state

Summary: This patch adds isNegative, isNonNegative for querying whether the sign bit is known. It also adds makeNegative and makeNonNegative for controlling the sign bit.

Reviewers: RKSimon, spatel, davide

Reviewed By: RKSimon

Subscribers: llvm-commits

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

llvm-svn: 301747

show more ...


Revision tags: llvmorg-4.0.1-rc1
# b45eabcf 26-Apr-2017 Craig Topper <craig.topper@gmail.com>

[ValueTracking] Introduce a KnownBits struct to wrap the two APInts for computeKnownBits

This patch introduces a new KnownBits struct that wraps the two APInt used by computeKnownBits. This allows u

[ValueTracking] Introduce a KnownBits struct to wrap the two APInts for computeKnownBits

This patch introduces a new KnownBits struct that wraps the two APInt used by computeKnownBits. This allows us to treat them as more of a unit.

Initially I've just altered the signatures of computeKnownBits and InstCombine's simplifyDemandedBits to pass a KnownBits reference instead of two separate APInt references. I'll do similar to the SelectionDAG version of computeKnownBits/simplifyDemandedBits as a separate patch.

I've added a constructor that allows initializing both APInts to the same bit width with a starting value of 0. This reduces the repeated pattern of initializing both APInts. Once place default constructed the APInts so I added a default constructor for those cases.

Going forward I would like to add more methods that will work on the pairs. For example trunc, zext, and sext occur on both APInts together in several places. We should probably add a clear method that can be used to clear both pieces. Maybe a method to check for conflicting information. A method to return (Zero|One) so we don't write it out everywhere. Maybe a method for (Zero|One).isAllOnesValue() to determine if all bits are known. I'm sure there are many other methods we can come up with.

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

llvm-svn: 301432

show more ...


1234