History log of /llvm-project/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp (Results 201 – 223 of 223)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# ca268ed2 07-Feb-2021 Florian Hahn <flo@fhahn.com>

[ConstraintElimination] Decompose zext for unsigned compares.

For unsigned compares, zext should be a no-op and we can add the
extended value to the constraint system.


# 853c52c9 07-Feb-2021 Florian Hahn <flo@fhahn.com>

[ConstraintElimination] Require GEPs to be inbounds for decomposition.

During decomposition, we assume the no-wrap properties of inbound GEPs.
Make sure the decomposed GEP is actually inbounds.


Revision tags: llvmorg-11.1.0, llvmorg-11.1.0-rc3
# 703f6a68 03-Feb-2021 Florian Hahn <flo@fhahn.com>

[ConstraintElimination] Support conditions from loop preheaders

This patch extends the condition collection logic to allow adding
conditions from pre-headers to loop headers, by allowing cases where

[ConstraintElimination] Support conditions from loop preheaders

This patch extends the condition collection logic to allow adding
conditions from pre-headers to loop headers, by allowing cases where the
target block dominates some of its predecessors.

show more ...


# d8e90716 02-Feb-2021 Florian Hahn <flo@fhahn.com>

[ConstraintElimination] Skip pointer casts.

We should be able to look through pointer casts that do not impact the
value.


# 51da1268 02-Feb-2021 Fangrui Song <i@maskray.me>

[ConstraintElimination] Fix -Wunused-function in -DLLVM_ENABLE_ASSERTIONS=off build


# 3e09bc25 02-Feb-2021 Florian Hahn <flo@fhahn.com>

[ConstraintElimination] Add nicer way to dump constraints (NFC).

Use ConstraintSystem::dump(Names) to display the result of decomposing a
condition.


# 0b28d756 28-Jan-2021 Florian Hahn <flo@fhahn.com>

[ConstraintElimination] Add support for EQ predicates.

A == B map to A >= B && A <= B
(https://alive2.llvm.org/ce/z/_dwxKn).

This extends the constraint construction to return a list of
constraints

[ConstraintElimination] Add support for EQ predicates.

A == B map to A >= B && A <= B
(https://alive2.llvm.org/ce/z/_dwxKn).

This extends the constraint construction to return a list of
constraints, which can be used to properly de-compose nested AND & OR.

show more ...


# ce190e41 28-Jan-2021 Florian Hahn <flo@fhahn.com>

[ConstraintElimination] Negate IR condition directly.

Instead of using ConstraintSystem::negate when adding new constraints,
flip the condition in IR.

The main advantage is that EQ predicates can b

[ConstraintElimination] Negate IR condition directly.

Instead of using ConstraintSystem::negate when adding new constraints,
flip the condition in IR.

The main advantage is that EQ predicates can be represented by 2
constraints, which makes negating based on the constraint tricky. The IR
condition can easily negated.

show more ...


# 39486753 30-Jan-2021 Florian Hahn <flo@fhahn.com>

[ConstraintElimination] Verify CS and DFSInStack are in sync.(NFC)

After the main loop is done, we should have one constraint per item in
DFSInStack. Otherwise we added a constraint without a proper

[ConstraintElimination] Verify CS and DFSInStack are in sync.(NFC)

After the main loop is done, we should have one constraint per item in
DFSInStack. Otherwise we added a constraint without a proper DFSInStack
item.

show more ...


Revision tags: llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2
# 9bcc0d10 15-Jan-2021 Kazu Hirata <kazu@google.com>

[CodeGen, Transforms] Use llvm::sort (NFC)


Revision tags: llvmorg-11.1.0-rc1
# bfedd5d2 30-Dec-2020 Juneyoung Lee <aqjune@gmail.com>

[ConstraintElimination] Add support for select form of and/or

This patch adds support for select form of and/or.
Currently there is an ongoing effort for moving towards using `select a, b, false` in

[ConstraintElimination] Add support for select form of and/or

This patch adds support for select form of and/or.
Currently there is an ongoing effort for moving towards using `select a, b, false` instead of `and i1 a, b` and
`select a, true, b` instead of `or i1 a, b` as well.
D93065 has links to relevant changes.

Alive2 proof: (undef input was disabled due to timeout :( )
- and: https://alive2.llvm.org/ce/z/AgvFbQ
- or: https://alive2.llvm.org/ce/z/KjLJyb

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

show more ...


Revision tags: llvmorg-11.0.1, llvmorg-11.0.1-rc2
# 4ceecc82 05-Dec-2020 Florian Hahn <flo@fhahn.com>

[ConstraintElimination] Handle constraints with all zero var coeffs.

Constraints where all variable coefficients are 0 do not add any useful
information. When checking, we can check if they are alwa

[ConstraintElimination] Handle constraints with all zero var coeffs.

Constraints where all variable coefficients are 0 do not add any useful
information. When checking, we can check if they are always true/false.

show more ...


# 2304528b 02-Dec-2020 Florian Hahn <flo@fhahn.com>

[ConstraintElimination] Make sure arguments of std:pow match.

This should fix a build failure on some systems, e.g. solaris11-sparcv9
http://lab.llvm.org:8014/#/builders/22


# 7a4f1d59 30-Nov-2020 Florian Hahn <flo@fhahn.com>

[ConstraintElimination] Decompose GEP %ptr, ZEXT(SHL()).

Add support to decompose a GEP with a ZEXT(SHL()) operand.


# efa9728a 30-Nov-2020 Florian Hahn <flo@fhahn.com>

[ConstraintElimination] Decompose GEP %ptr, SHL().

Add support the decompose a GEP with an SHL operand.


Revision tags: llvmorg-11.0.1-rc1
# 7fa14a7c 18-Nov-2020 Florian Hahn <flo@fhahn.com>

[ConstraintElimination] Decompose GEP with arbitrary offsets.

This patch decomposes `GEP %x, %offset` as 0 + 1 * %x + 1 * %off.


# 2fead1ac 18-Nov-2020 Florian Hahn <flo@fhahn.com>

[ConstraintElimination] Decompose add nuw/sub nuw.

Make use of the more flexible constraint handling added in
a8a79c90699a7ae9dee07daf7281cbbd592bf6ea to decompose add nuw/sub nuw.


# a8a79c90 17-Nov-2020 Florian Hahn <flo@fhahn.com>

[ConstraintElimination] Refactor constraint extraction (NFC).

This patch generalizes the extraction of a constraint for a given
condition. It allows decompose to return a vector of c * X pairs, whic

[ConstraintElimination] Refactor constraint extraction (NFC).

This patch generalizes the extraction of a constraint for a given
condition. It allows decompose to return a vector of c * X pairs, which
allows de-composing multiple instructions in the future.

It also adds more clarifying comments.

show more ...


Revision tags: llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3, llvmorg-11.0.0-rc2
# 13042da5 05-Aug-2020 Florian Hahn <flo@fhahn.com>

[ConstraintElimination] Add support for And.

When processing conditional branches, if the condition is an AND of 2 compares
and the true successor only has the current block as predecessor, queue bo

[ConstraintElimination] Add support for And.

When processing conditional branches, if the condition is an AND of 2 compares
and the true successor only has the current block as predecessor, queue both
conditions for the true successor.

show more ...


# 5a4ca8b5 16-Nov-2020 Florian Hahn <flo@fhahn.com>

[ConstraintElimination] Add support for Or.

When processing conditional branches, if the condition is an OR of 2 compares
and the false successor only has the current block as predecessor, queue bot

[ConstraintElimination] Add support for Or.

When processing conditional branches, if the condition is an OR of 2 compares
and the false successor only has the current block as predecessor, queue both
negated conditions for the false successor

show more ...


# 50bd71e1 27-Sep-2020 Fangrui Song <i@maskray.me>

[NewPM] Port ConstraintElimination to the new pass manager

If -enable-constraint-elimination is specified, add it to the -O2/-O3 pipeline.
(-O1 uses a separate function now.)

Reviewed By: fhahn, ae

[NewPM] Port ConstraintElimination to the new pass manager

If -enable-constraint-elimination is specified, add it to the -O2/-O3 pipeline.
(-O1 uses a separate function now.)

Reviewed By: fhahn, aeubanks

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

show more ...


# 400bdbc4 26-Sep-2020 Fangrui Song <i@maskray.me>

[ConstraintElimination] Internalize function/class and delete an implied condition. NFC

Delete an implied condition (E.NumIn <= CB.NumIn)


# 3d42d549 15-Sep-2020 Florian Hahn <flo@fhahn.com>

[ConstraintElimination] Add constraint elimination pass.

This patch is a first draft of a new pass that adds a more flexible way
to eliminate compares based on more complex constraints collected fro

[ConstraintElimination] Add constraint elimination pass.

This patch is a first draft of a new pass that adds a more flexible way
to eliminate compares based on more complex constraints collected from
dominating conditions.

In particular, it aims at simplifying conditions of the forms below
using a forward propagation approach, rather than instcomine-style
ad-hoc backwards walking of def-use chains.

if (x < y)
if (y < z)
if (x < z) <- simplify

or

if (x + 2 < y)
if (x + 1 < y) <- simplify assuming no wraps

The general approach is to collect conditions and blocks, sort them by
dominance and then iterate over the sorted list. Conditions are turned
into a linear inequality and add it to a system containing the linear
inequalities that hold on entry to the block. For blocks, we check each
compare against the system and see if it is implied by the constraints
in the system.

We also keep a stack of processed conditions and remove conditions from
the stack and the constraint system once they go out-of-scope (= do not
dominate the current block any longer).

Currently there still are the least the following areas for improvements

* Currently large unsigned constants cannot be added to the system
(coefficients must be represented as integers)
* The way constraints are managed currently is not very optimized.

Reviewed By: spatel

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

show more ...


123456789