History log of /llvm-project/llvm/lib/Transforms/Scalar/GVNHoist.cpp (Results 101 – 125 of 126)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-3.9.0-rc1
# 9cf05464 27-Jul-2016 George Burgess IV <george.burgess.iv@gmail.com>

[GVNHoist] Fix typo in assert.

This fixes PR28730.

llvm-svn: 276844


# 55c3007b 27-Jul-2016 Sebastian Pop <sebpop@gmail.com>

GVN-hoist: improve code generation for recursive GEPs

When loading or storing in a field of a struct like "a.b.c", GVN is able to
detect the equivalent expressions, and GVN-hoist would fail in the c

GVN-hoist: improve code generation for recursive GEPs

When loading or storing in a field of a struct like "a.b.c", GVN is able to
detect the equivalent expressions, and GVN-hoist would fail in the code
generation. This is because the GEPs are not hoisted as scalar operations to
avoid moving the GEPs too far from their ld/st instruction when the ld/st is not
movable. So we end up having to generate code for the GEP of a ld/st when we
move the ld/st. In the case of a GEP referring to another GEP as in "a.b.c" we
need to code generate all the GEPs necessary to make all the operands available
at the new location for the ld/st. With this patch we recursively walk through
the GEP operands checking whether all operands are available, and in the case of
a GEP operand, it recursively makes all its operands available. Code generation
happens from the inner GEPs out until reaching the GEP that appears as an
operand of the ld/st.

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

llvm-svn: 276841

show more ...


# 586d3eae 27-Jul-2016 Sebastian Pop <sebpop@gmail.com>

GVN-hoist: use DFS numbers instead of walking the instruction stream

The patch replaces a function that walks the IR with a call to firstInBB() that
uses the DFS numbering. NFC.

Differential Revis

GVN-hoist: use DFS numbers instead of walking the instruction stream

The patch replaces a function that walks the IR with a call to firstInBB() that
uses the DFS numbering. NFC.

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

llvm-svn: 276840

show more ...


# 91d4a301 26-Jul-2016 Sebastian Pop <sebpop@gmail.com>

GVN-hoist: use a DFS numbering of instructions (PR28670)

Instead of DFS numbering basic blocks we now DFS number instructions that avoids
the costly operation of which instruction comes first in a b

GVN-hoist: use a DFS numbering of instructions (PR28670)

Instead of DFS numbering basic blocks we now DFS number instructions that avoids
the costly operation of which instruction comes first in a basic block.

Patch mostly written by Daniel Berlin.

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

llvm-svn: 276714

show more ...


# 38422b13 26-Jul-2016 Sebastian Pop <sebpop@gmail.com>

GVN-hoist: limit hoisting depth (PR28670)

This patch adds an option to specify the maximum depth in a BB at which to
consider hoisting instructions. Hoisting instructions from a deeper level is
not

GVN-hoist: limit hoisting depth (PR28670)

This patch adds an option to specify the maximum depth in a BB at which to
consider hoisting instructions. Hoisting instructions from a deeper level is
not profitable as it increases register pressure and compilation time.

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

llvm-svn: 276713

show more ...


# 40765a62 25-Jul-2016 Daniel Berlin <dberlin@dberlin.org>

Revert NewGVN N^2 behavior patch

llvm-svn: 276670


# 14c00093 25-Jul-2016 Daniel Berlin <dberlin@dberlin.org>

NFC: Make a few asserts in GVNHoist do the same thing, but cheaper.

llvm-svn: 276662


# f107f329 25-Jul-2016 Daniel Berlin <dberlin@dberlin.org>

Fix N^2 instruction ordering comparisons in GVNHoist.
This fixes GVNHoist's portion of PR28670.

llvm-svn: 276658


# 65af45de 25-Jul-2016 Daniel Berlin <dberlin@dberlin.org>

NFC: Refactor GVNHoist class so not everything is public

llvm-svn: 276657


# 68623a0e 25-Jul-2016 David Majnemer <david.majnemer@gmail.com>

[GVNHoist] Merge metadata on hoisted instructions less conservatively

We can combine metadata from multiple instructions intelligently for
certain metadata nodes.

llvm-svn: 276602


# 4728569d 25-Jul-2016 David Majnemer <david.majnemer@gmail.com>

[GVNHoist] Properly merge alignments when hoisting

If we two loads of two different alignments, we must use the minimum of
the two alignments when hoisting. Same deal for stores.

For allocas, use

[GVNHoist] Properly merge alignments when hoisting

If we two loads of two different alignments, we must use the minimum of
the two alignments when hoisting. Same deal for stores.

For allocas, use the maximum of the two allocas.

llvm-svn: 276601

show more ...


# 0e2cec07 22-Jul-2016 Sebastian Pop <sebpop@gmail.com>

GVN-hoist: move check before mutating the IR

llvm-svn: 276368


# c107a487 21-Jul-2016 Sebastian Pop <sebpop@gmail.com>

GVN-hoist: add missing check for all GEP operands available

llvm-svn: 276364


# 31fd5066 21-Jul-2016 Sebastian Pop <sebpop@gmail.com>

GVH-hoist: only clone GEPs (PR28606)

Do not clone stored values unless they are GEPs that are special cased to avoid
hoisting them without hoisting their associated ld/st.

Differential revision: ht

GVH-hoist: only clone GEPs (PR28606)

Do not clone stored values unless they are GEPs that are special cased to avoid
hoisting them without hoisting their associated ld/st.

Differential revision: https://reviews.llvm.org/D22652

llvm-svn: 276358

show more ...


# 825e4ab9 21-Jul-2016 David Majnemer <david.majnemer@gmail.com>

[GVNHoist] Preserve optimization hints which agree

If we have optimization hints with agree with each other along different
paths, preserve them.

llvm-svn: 276248


# 4808f264 21-Jul-2016 David Majnemer <david.majnemer@gmail.com>

[GVNHoist] Don't wrongly preserve TBAA

We hoisted loads/stores without taking into account which can cause
miscompiles.

llvm-svn: 276240


# bd21012c 20-Jul-2016 David Majnemer <david.majnemer@gmail.com>

[GVNHoist] Don't hoist PHI nodes

We hoisted PHIs without respecting their special insertion point in the
block, leading to verfier errors.

This fixes PR28626.

llvm-svn: 276181


# 2d23c029 19-Jul-2016 Paul Robinson <paul.robinson@sony.com>

Make GVN Hoisting obey optnone/bisect.

Differential Revision: http://reviews.llvm.org/D22545

llvm-svn: 276048


# 04854ab1 18-Jul-2016 David Majnemer <david.majnemer@gmail.com>

[GVNHoist] Remove a home-grown version of replaceUsesOfWith

replaceUsesOfWith will, on average, consider fewer values when trying
to do the replacement.

No functional change is intended.

llvm-svn:

[GVNHoist] Remove a home-grown version of replaceUsesOfWith

replaceUsesOfWith will, on average, consider fewer values when trying
to do the replacement.

No functional change is intended.

llvm-svn: 275884

show more ...


# 3498ad11 18-Jul-2016 Reid Kleckner <rnk@google.com>

Fix -Wmicrosoft-enum-value in GVNHoist.cpp

llvm-svn: 275879


# 04c7c225 18-Jul-2016 David Majnemer <david.majnemer@gmail.com>

[GVNHoist] Change the key for VNtoInsns to a pair

While debugging GVNHoist, I found it confusing that the entries in a
VNtoInsns were not always value numbers. They _usually_ were except for
StoreI

[GVNHoist] Change the key for VNtoInsns to a pair

While debugging GVNHoist, I found it confusing that the entries in a
VNtoInsns were not always value numbers. They _usually_ were except for
StoreInst in which case they were a hash of two different value numbers.

This leads to two observations:
- It is more difficult to debug things when the semantic contents of
VNtoInsns changes over time.
- Using a single value number is not much cheaper, the value of
VNtoInsns is a SmallVector.
- It is not immediately clear what the algorithm would do if there were
hash collisions in the StoreInst case.

Using a DenseMap of std::pair sidesteps all of this.

N.B. The changes in the test were due their sensitivity to the
iteration order of VNtoInsns which has changed.

llvm-svn: 275761

show more ...


# aa241783 18-Jul-2016 David Majnemer <david.majnemer@gmail.com>

[GVNHoist] Sink HoistedCtr into GVNHoist

HoistedCtr cannot be a mutated global variable, that will open us up to
races between threads compiling code in parallel.

llvm-svn: 275744


# 4c66a714 18-Jul-2016 David Majnemer <david.majnemer@gmail.com>

[GVNHoist] Some small cleanups

No functional change is intended, just trying to clean things up a
little.

llvm-svn: 275743


# 4177480a 15-Jul-2016 Sebastian Pop <sebpop@gmail.com>

code hoisting pass based on GVN

This pass hoists duplicated computations in the program. The primary goal of
gvn-hoist is to reduce the size of functions before inline heuristics to reduce
the total

code hoisting pass based on GVN

This pass hoists duplicated computations in the program. The primary goal of
gvn-hoist is to reduce the size of functions before inline heuristics to reduce
the total cost of function inlining.

Pass written by Sebastian Pop, Aditya Kumar, Xiaoyu Hu, and Brian Rzycki.
Important algorithmic contributions by Daniel Berlin under the form of reviews.

Differential Revision: http://reviews.llvm.org/D19338

llvm-svn: 275561

show more ...


# 63847d04 14-Jul-2016 Sebastian Pop <spop@codeaurora.org>

code hoisting pass based on GVN

This pass hoists duplicated computations in the program. The primary goal of
gvn-hoist is to reduce the size of functions before inline heuristics to reduce
the total

code hoisting pass based on GVN

This pass hoists duplicated computations in the program. The primary goal of
gvn-hoist is to reduce the size of functions before inline heuristics to reduce
the total cost of function inlining.

Pass written by Sebastian Pop, Aditya Kumar, Xiaoyu Hu, and Brian Rzycki.
Important algorithmic contributions by Daniel Berlin under the form of reviews.

Differential Revision: http://reviews.llvm.org/D19338

llvm-svn: 275401

show more ...


123456