History log of /llvm-project/llvm/lib/Transforms/Scalar/MergeICmps.cpp (Results 51 – 75 of 109)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-9.0.0-rc3, llvmorg-9.0.0-rc2, llvmorg-9.0.0-rc1, llvmorg-10-init, llvmorg-8.0.1, llvmorg-8.0.1-rc4
# 60afa49a 09-Jul-2019 Tim Northover <tnorthover@apple.com>

OpaquePtr: add Type parameter to Loads analysis API.

This makes the functions in Loads.h require a type to be specified
independently of the pointer Value so that when pointers have no structure
oth

OpaquePtr: add Type parameter to Loads analysis API.

This makes the functions in Loads.h require a type to be specified
independently of the pointer Value so that when pointers have no structure
other than address-space, it can still do its job.

Most callers had an obvious memory operation handy to provide this type, but a
SROA and ArgumentPromotion were doing more complicated analysis. They get
updated to merge the properties of the various instructions they were
considering.

llvm-svn: 365468

show more ...


Revision tags: llvmorg-8.0.1-rc3
# 2851248f 26-Jun-2019 Clement Courbet <courbet@google.com>

Revert "r364412 [ExpandMemCmp][MergeICmps] Move passes out of CodeGen into opt pipeline."

Breaks sanitizers:
libFuzzer :: cxxstring.test
libFuzzer :: memcmp.test
libFuzzer :: recommended

Revert "r364412 [ExpandMemCmp][MergeICmps] Move passes out of CodeGen into opt pipeline."

Breaks sanitizers:
libFuzzer :: cxxstring.test
libFuzzer :: memcmp.test
libFuzzer :: recommended-dictionary.test
libFuzzer :: strcmp.test
libFuzzer :: value-profile-mem.test
libFuzzer :: value-profile-strcmp.test

llvm-svn: 364416

show more ...


# 7b3a5f0e 26-Jun-2019 Clement Courbet <courbet@google.com>

[ExpandMemCmp][MergeICmps] Move passes out of CodeGen into opt pipeline.

This allows later passes (in particular InstCombine) to optimize more
cases.

One that's important to us is `memcmp(p, q, con

[ExpandMemCmp][MergeICmps] Move passes out of CodeGen into opt pipeline.

This allows later passes (in particular InstCombine) to optimize more
cases.

One that's important to us is `memcmp(p, q, constant) < 0` and memcmp(p, q, constant) > 0.

llvm-svn: 364412

show more ...


# 3bc5ad55 25-Jun-2019 Clement Courbet <courbet@google.com>

[ExpandMemCmp] Move all options to TargetTransformInfo.

Split off from D60318.

llvm-svn: 364281


Revision tags: llvmorg-8.0.1-rc2
# 43882b16 23-May-2019 Clement Courbet <courbet@google.com>

[MergeICmps] Make the pass compatible with the new pass manager.

Reviewers: gchatelet, spatel

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

[MergeICmps] Make the pass compatible with the new pass manager.

Reviewers: gchatelet, spatel

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 361490

show more ...


# f8f93ba9 22-May-2019 Clement Courbet <courbet@google.com>

Re-land r361257 "[MergeICmps][NFC] Make BCEAtom move-only.""

llvm-svn: 361366


# 122c6e6f 21-May-2019 Clement Courbet <courbet@google.com>

[MergeICmps] Make sorting strongly stable on the rhs.

Summary:
Because the sort order was not strongly stable on the RHS, whether the
chain could merge would depend on the order of the blocks in the

[MergeICmps] Make sorting strongly stable on the rhs.

Summary:
Because the sort order was not strongly stable on the RHS, whether the
chain could merge would depend on the order of the blocks in the Phi.

EXPENSIVE_CHECKS would shuffle the blocks before sorting, resulting in
non-deterministic merging.

Reviewers: gchatelet

Subscribers: hiraditya, llvm-commits, RKSimon

Tags: #llvm

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

llvm-svn: 361281

show more ...


# 8361a104 21-May-2019 Clement Courbet <courbet@google.com>

Revert r361257 "[MergeICmps][NFC] Make BCEAtom move-only."

Broke some bots.

llvm-svn: 361263


# 8fa970c2 21-May-2019 Clement Courbet <courbet@google.com>

[MergeICmps][NFC] Make BCEAtom move-only.

And handle for self-move. This is required so that llvm::sort can work
with EXPENSIVE_CHECKS, as it will do a random shuffle of the input
which can result i

[MergeICmps][NFC] Make BCEAtom move-only.

And handle for self-move. This is required so that llvm::sort can work
with EXPENSIVE_CHECKS, as it will do a random shuffle of the input
which can result in self-moves.

llvm-svn: 361257

show more ...


# a95d95d3 21-May-2019 Clement Courbet <courbet@google.com>

[MergeICmps] Preserve the dominator tree.

Summary: In preparation for D60318 .

Reviewers: gchatelet, efriedma

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://revi

[MergeICmps] Preserve the dominator tree.

Summary: In preparation for D60318 .

Reviewers: gchatelet, efriedma

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 361239

show more ...


# 90900fbc 17-May-2019 Clement Courbet <courbet@google.com>

[MergeICmps][NFC] Add more debug.

llvm-svn: 361024


# 632dfdda 17-May-2019 Clement Courbet <courbet@google.com>

Re-land r360859: "[MergeICmps] Simplify the code."

With a fix for PR41917: The predecessor list was changing under our feet.

- for (BasicBlock *Pred : predecessors(EntryBlock_)) {
+ while (!pred

Re-land r360859: "[MergeICmps] Simplify the code."

With a fix for PR41917: The predecessor list was changing under our feet.

- for (BasicBlock *Pred : predecessors(EntryBlock_)) {
+ while (!pred_empty(EntryBlock_)) {
+ BasicBlock* const Pred = *pred_begin(EntryBlock_);

llvm-svn: 361009

show more ...


# d764e7c6 17-May-2019 Nico Weber <nicolasweber@gmx.de>

Revert r360859: "Reland r360771 "[MergeICmps] Simplify the code.""

It caused PR41917.

llvm-svn: 360963


Revision tags: llvmorg-8.0.1-rc1
# c4fdd717 16-May-2019 Clement Courbet <courbet@google.com>

Reland r360771 "[MergeICmps] Simplify the code."

This revision does not seem to be the culprit.

llvm-svn: 360859


# eaf4413d 15-May-2019 Clement Courbet <courbet@google.com>

Revert r360771 "[MergeICmps] Simplify the code."

Breaks a bunch of builbdots.

llvm-svn: 360776


# 0d071be4 15-May-2019 Clement Courbet <courbet@google.com>

[MergeICmps] Fix r360771.

Twine references a StringRef by reference, not value...

llvm-svn: 360775


# 157ae639 15-May-2019 Clement Courbet <courbet@google.com>

[MergeICmps] Simplify the code.

Instead of patching the original blocks, we now generate new blocks and
delete the old blocks. This results in simpler code with a less twisted
control flow (see the

[MergeICmps] Simplify the code.

Instead of patching the original blocks, we now generate new blocks and
delete the old blocks. This results in simpler code with a less twisted
control flow (see the change in `entry-block-shuffled.ll`).

This will make https://reviews.llvm.org/D60318 simpler by making it more
obvious where control flow created and deleted.

Reviewers: gchatelet

Subscribers: hiraditya, llvm-commits, spatel

Tags: #llvm

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

llvm-svn: 360771

show more ...


Revision tags: llvmorg-8.0.0, llvmorg-8.0.0-rc5, llvmorg-8.0.0-rc4, llvmorg-8.0.0-rc3
# f7e84a2c 15-Feb-2019 Clement Courbet <courbet@google.com>

[MergeICmps] Make base ordering really deterministic.

Summary:
The idea is that we now manipulate bases through a `unsigned BaseID` based on
order of appearance in the comparison chain rather than t

[MergeICmps] Make base ordering really deterministic.

Summary:
The idea is that we now manipulate bases through a `unsigned BaseID` based on
order of appearance in the comparison chain rather than through the `Value*`.

Fixes 40714.

Reviewers: gchatelet

Subscribers: mgrang, jfb, jdoerfert, llvm-commits, hans

Tags: #llvm

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

llvm-svn: 354131

show more ...


# cc004df7 15-Feb-2019 Clement Courbet <courbet@google.com>

[MergeICmps][NFC] Improve doc.

llvm-svn: 354128


Revision tags: llvmorg-7.1.0, llvmorg-7.1.0-rc1, llvmorg-8.0.0-rc2, llvmorg-8.0.0-rc1
# 2946cd70 19-Jan-2019 Chandler Carruth <chandlerc@gmail.com>

Update the file headers across all of the LLVM projects in the monorepo
to reflect the new license.

We understand that people may be surprised that we're moving the header
entirely to discuss the ne

Update the file headers across all of the LLVM projects in the monorepo
to reflect the new license.

We understand that people may be surprised that we're moving the header
entirely to discuss the new license. We checked this carefully with the
Foundation's lawyer and we believe this is the correct approach.

Essentially, all code in the project is now made available by the LLVM
project under our new license, so you will see that the license headers
include that license only. Some of our contributors have contributed
code under our old license, and accordingly, we have retained a copy of
our old license notice in the top-level files in each project and
repository.

llvm-svn: 351636

show more ...


Revision tags: llvmorg-7.0.1, llvmorg-7.0.1-rc3
# 2b7ae47c 05-Nov-2018 Taewook Oh <twoh@fb.com>

[MergeICmps] Do not perform the transformation if GEP is used outside of block

Summary:
This patch prevents MergeICmps to performn the transformation if the address operand GEP of the load instructi

[MergeICmps] Do not perform the transformation if GEP is used outside of block

Summary:
This patch prevents MergeICmps to performn the transformation if the address operand GEP of the load instruction has a use outside of the load's parent block. Without this patch, compiler crashes with the given test case because the use of `%first.i` is still around when the basic block is erased from https://github.com/llvm-mirror/llvm/blob/master/lib/Transforms/Scalar/MergeICmps.cpp#L620. I think checking `isUsedOutsideOfBlock` with `GEP` is the original intention of the code, as the checking for `LoadI` is already performed in the same function.

This patch is incomplete though, as this makes the pass overly conservative and fails the test `tuple-four-int8.ll`. I believe what needs to be done is checking if GEP has a use outside of block that is not the part of "Comparisons" chain. Submit the patch as of now to prevent compiler crash.

Reviewers: courbet, trentxintong

Reviewed By: courbet

Subscribers: llvm-commits

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

llvm-svn: 346151

show more ...


Revision tags: llvmorg-7.0.1-rc2, llvmorg-7.0.1-rc1
# 3cc0e935 26-Oct-2018 Christy Lee <christycylee@gmail.com>

Pointer types were treated as zero-size by MergeICmps

Summary:
The visitICmp analysis function would record compares of pointer types, as size 0. This causes the resulting memcmp() call to have the

Pointer types were treated as zero-size by MergeICmps

Summary:
The visitICmp analysis function would record compares of pointer types, as size 0. This causes the resulting memcmp() call to have the wrong total size.
Found with "self-build" of clang/LLVM on Windows.

Reviewers: christylee, trentxintong, courbet

Reviewed By: courbet

Subscribers: llvm-commits

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

llvm-svn: 345413

show more ...


# 0cac726a 27-Sep-2018 Fangrui Song <maskray@google.com>

llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...)

Summary: The convenience wrapper in STLExtras is available since rL342102.

Reviewers: dblaikie, javed.absar, JDevlieghere, andreadb

Subscr

llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...)

Summary: The convenience wrapper in STLExtras is available since rL342102.

Reviewers: dblaikie, javed.absar, JDevlieghere, andreadb

Subscribers: MatzeB, sanjoy, arsenm, dschuff, mehdi_amini, sdardis, nemanjai, jvesely, nhaehnle, sbc100, jgravelle-google, eraman, aheejin, kbarton, JDevlieghere, javed.absar, gbedwell, jrtc27, mgrang, atanasyan, steven_wu, george.burgess.iv, dexonsmith, kristina, jsji, llvm-commits

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

llvm-svn: 343163

show more ...


# e9437480 24-Sep-2018 Christy Lee <christycylee@gmail.com>

Re-submitting changes in D51550 because it failed to patch.

Reviewers: javed.absar, trentxintong, courbet

Reviewed By: trentxintong

Subscribers: llvm-commits

Differential Revision: https://review

Re-submitting changes in D51550 because it failed to patch.

Reviewers: javed.absar, trentxintong, courbet

Reviewed By: trentxintong

Subscribers: llvm-commits

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

llvm-svn: 342919

show more ...


# c85da8bd 18-Sep-2018 Christy Lee <christycylee@gmail.com>

Do not optimize atomic load to non-atomic memcmp

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

llvm-svn: 342498


12345