228 Commits

Author SHA1 Message Date
Liang Zou
d2440eb270 [format] \t => ' '
Summary:
1. \t => '  '
2. test commit access

Reviewers: Higuoxing, liangdzou

Reviewed By: Higuoxing, liangdzou

Subscribers: kristina, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355924 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-12 14:48:32 +00:00
Chandler Carruth
6b547686c5 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351636 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-19 08:50:56 +00:00
Florian Hahn
e4bfa17a91 [NewGVN] Update use counts for SSA copies when replacing them by their operands.
The current code relies on LeaderUseCount to determine if we can remove
an SSA copy, but in that the LeaderUseCount does not refer to the SSA
copy. If a SSA copy is a dominating leader, we use the operand as dominating
leader instead. This means we removed a user of a ssa copy and we should
decrement its use count, so we can remove the ssa copy once it becomes dead.

Fixes PR38804.

Reviewers: efriedma, davide

Reviewed By: davide

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349217 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-15 00:32:38 +00:00
Fangrui Song
53a62241d3 Use llvm::copy. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347126 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-17 01:44:25 +00:00
Florian Hahn
bdee2b6fc1 [NewGVN] Make sure we do not add a user to itself.
If we simplify an instruction to itself, we do not need to add a user to
itself. For congruence classes with a defining expression, we already
use a similar logic.

Fixes PR38259.

Reviewers: davide, efriedma, mcrosier

Reviewed By: davide

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346335 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-07 17:20:07 +00:00
Matthias Braun
b3bc95870d ADT/STLExtras: Introduce llvm::empty; NFC
This is modeled after C++17 std::empty().

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345679 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-31 00:23:23 +00:00
Chandler Carruth
a2da1d0155 [TI removal] Switch NewGVN to directly use Instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344718 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-18 00:39:46 +00:00
Fangrui Song
3b35e17b21 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@343163 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-27 02:13:45 +00:00
Florian Hahn
49e8ec0307 [NewGVN] Mark function as changed if we erase instructions.
Currently eliminateInstructions only returns true if any instruction got
replaced. In the test case for this patch, we eliminate the trivially
dead calls, for which eliminateInstructions not do a replacement and the
function is not marked as changed, which is why the inliner crashes
while traversing the call graph.

Alternatively we could also change eliminateInstructions to return true
in case we mark instructions for deletion, but that's slightly more code
and doing it at the place where the replacement happens seems safer.

Fixes PR37517.

Reviewers: davide, mcrosier, efriedma, bjope

Reviewed By: bjope

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341651 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-07 11:41:34 +00:00
Chandler Carruth
9179aee2c1 [IR] Replace isa<TerminatorInst> with isTerminator().
This is a bit awkward in a handful of places where we didn't even have
an instruction and now we have to see if we can build one. But on the
whole, this seems like a win and at worst a reasonable cost for removing
`TerminatorInst`.

All of this is part of the removal of `TerminatorInst` from the
`Instruction` type hierarchy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340701 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-26 09:51:22 +00:00
Florian Hahn
1bf795160f [InstrSimplify,NewGVN] Add option to ignore additional instr info when simplifying.
NewGVN uses InstructionSimplify for simplifications of leaders of
congruence classes. It is not guaranteed that the metadata or other
flags/keywords (like nsw or exact) of the leader is available for all members
in a congruence class, so we cannot use it for simplification.

This patch adds a InstrInfoQuery struct with a boolean field
UseInstrInfo (which defaults to true to keep the current behavior as
default) and a set of helper methods to get metadata/keywords for a
given instruction, if UseInstrInfo is true. The whole thing might need a
better name, to avoid confusion with TargetInstrInfo but I am not sure
what a better name would be.

The current patch threads through InstrInfoQuery to the required
places, which is messier then it would need to be, if
InstructionSimplify and ValueTracking would share the same Query struct.

The reason I added it as a separate struct is that it can be shared
between InstructionSimplify and ValueTracking's query objects. Also,
some places do not need a full query object, just the InstrInfoQuery.

It also updates some interfaces that do not take a Query object, but a
set of optional parameters to take an additional boolean UseInstrInfo.

See https://bugs.llvm.org/show_bug.cgi?id=37540.

Reviewers: dberlin, davide, efriedma, sebpop, hiraditya

Reviewed By: hiraditya

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340031 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-17 14:39:04 +00:00
Chen Zheng
12061ae717 [MISC]Fix wrong usage of std::equal()
Differential Revision: https://reviews.llvm.org/D49958


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340000 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-17 07:51:01 +00:00
Florian Hahn
926b53bb06 [GVN,NewGVN] Move patchReplacementInstruction to Utils/Local.h
This function is shared between both implementations. I am not sure if
Utils/Local.h is the best place though.

Reviewers: davide, dberlin, efriedma, xbolva00

Reviewed By: efriedma, xbolva00

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339138 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-07 13:27:33 +00:00
Fangrui Song
af7b1832a0 Remove trailing space
sed -Ei 's/[[:space:]]+$//' include/**/*.{def,h,td} lib/**/*.{cpp,h}

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338293 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-30 19:41:25 +00:00
George Burgess IV
4f40986a05 [DebugCounters] Keep track of total counts
This patch makes debug counters keep track of the total number of times
we've called `shouldExecute` for each counter, so it's easier to build
automated tooling on top of these.

A patch to print these counts is coming soon.

Patch by Zhizhou Yang!

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337748 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-23 21:49:36 +00:00
Sean Fertile
551913f7e3 Revert "Extend CFGPrinter and CallPrinter with Heat Colors"
This reverts r335996 which broke graph printing in Polly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336000 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-29 17:48:58 +00:00
Sean Fertile
8b6f52ae8e Extend CFGPrinter and CallPrinter with Heat Colors
Extends the CFGPrinter and CallPrinter with heat colors based on heuristics or
profiling information. The colors are enabled by default and can be toggled
on/off for CFGPrinter by using the option -cfg-heat-colors for both
-dot-cfg[-only] and -view-cfg[-only].  Similarly, the colors can be toggled
on/off for CallPrinter by using the option -callgraph-heat-colors for both
-dot-callgraph and -view-callgraph.

Patch by Rodrigo Caetano Rocha!

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335996 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-29 17:13:58 +00:00
Hiroshi Inoue
26570985ef [NFC] fix trivial typos in comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334687 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-14 05:41:49 +00:00
David Blaikie
8325fb20d4 Move Analysis/Utils/Local.h back to Transforms
Review feedback from r328165. Split out just the one function from the
file that's used by Analysis. (As chandlerc pointed out, the original
change only moved the header and not the implementation anyway - which
was fine for the one function that was used (since it's a
template/inlined in the header) but not in general)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333954 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-04 21:23:21 +00:00
George Burgess IV
0123bcf4a9 [NewGVN] Fix set comparison; reflow comment
Looks like we intended to compare this->Members with Other->Members
here, but ended up comparing this->Members with this->Members. Oops. :)

Since CongruenceClass::Members is a SmallPtrSet anyway, we can probably
skip building std::sets if we're willing to write a bit more code.

This appears to be no functional change (for sufficiently lax values of
"no"): this equality check was only being called inside of an assert.
So, worst case, we'll catch more bugs in the form of assertion failures.

Thanks to d0k for noting this!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333601 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-30 22:24:08 +00:00
Florian Hahn
eae2e16ab1 [NewGVN] Fix handling of assumes
This patch fixes two bugs:

* test1: Previously assume(a >= 5) concluded that a == 5. That's only
         valid for assume(a == 5)...
* test2: If operands were swapped, additional users were added to the
         wrong cmp operand. This resulted in an "unsettled iteration"
         assertion failure.

Patch by Nikita Popov

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333007 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-22 17:38:22 +00:00
Nicola Zaghen
0818e789cb Rename DEBUG macro to LLVM_DEBUG.
The DEBUG() macro is very generic so it might clash with other projects.
The renaming was done as follows:
- git grep -l 'DEBUG' | xargs sed -i 's/\bDEBUG\s\?(/LLVM_DEBUG(/g'
- git diff -U0 master | ../clang/tools/clang-format/clang-format-diff.py -i -p1 -style LLVM
- Manual change to APInt
- Manually chage DOCS as regex doesn't match it.

In the transition period the DEBUG() macro is still present and aliased
to the LLVM_DEBUG() one.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@332240 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-14 12:53:11 +00:00
Florian Hahn
73d8c2e5e3 [NewGVN] Split OpPHI detection and creation.
It also adds a check making sure PHIs for operands are all in the same
block.

Patch by Daniel Berlin <dberlin@dberlin.org>

Reviewers: dberlin, davide

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330444 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-20 16:37:13 +00:00
Florian Hahn
141e6bde5c [NewGVN] Add ops as dependency if we cannot find a leader for ValueOp.
If those operands change, we might find a leader for ValueOp, which
could enable new phi-of-op creation.

This fixes a case where we missed creating a phi-of-ops node. With D43865
and this patch, bootstrapping clang/llvm works with -enable-newgvn, whereas
without it, the "value changed after iteration" assertion is triggered.

Reviewers: dberlin, davide

Reviewed By: dberlin

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330334 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-19 15:05:47 +00:00
Mandeep Singh Grang
15ff8cad10 [Transforms] Change std::sort to llvm::sort in response to r327219
Summary:
r327219 added wrappers to std::sort which randomly shuffle the container before sorting.
This will help in uncovering non-determinism caused due to undefined sorting
order of objects having the same key.

To make use of that infrastructure we need to invoke llvm::sort instead of std::sort.

Note: This patch is one of a series of patches to replace *all* std::sort to llvm::sort.
Refer the comments section in D44363 for a list of all the required patches.

Reviewers: kcc, pcc, danielcdh, jmolloy, sanjoy, dberlin, ruiu

Reviewed By: ruiu

Subscribers: ruiu, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330059 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-13 19:47:57 +00:00
Hiroshi Inoue
ef1bc2d3ca [NFC] fix trivial typos in documents and comments
"is is" -> "is", "if if" -> "if", "or or" -> "or"



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329878 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-12 05:53:20 +00:00
Hiroshi Inoue
de3224bc86 [NFC] fix trivial typos in comments and error message
"is is" -> "is", "are are" -> "are"



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329546 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-09 04:37:53 +00:00
David Blaikie
283527b390 Fix a couple of layering violations in Transforms
Remove #include of Transforms/Scalar.h from Transform/Utils to fix layering.

Transforms depends on Transforms/Utils, not the other way around. So
remove the header and the "createStripGCRelocatesPass" function
declaration (& definition) that is unused and motivated this dependency.

Move Transforms/Utils/Local.h into Analysis because it's used by
Analysis/MemoryBuiltins.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328165 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-21 22:34:23 +00:00
Florian Hahn
832f2bf0d8 [NewGVN] Update phi-of-ops def block when updating existing ValuePHI.
In case we update a ValuePHI node created earlier, we could update it
based on a different OpPHI which could be in a different block.
We need to update the TempToBlock mapping reflecting the new block,
otherwise we would end up placing the new phi node in a wrong block.

This problem is exposed by the test case in
https://bugs.llvm.org/show_bug.cgi?id=36504.

This patch fixes a slightly simpler problem than in the bug report. In
the bug's re-producer, the additional problem is that we are re-using a
ValuePHI node with to few incoming values for the new OpPHI. If this
patch makes sense, I will follow it up with a patch that creates a new
PHI node if the existing PHI node has a different number of incoming
values.

Reviewers: davide, dberlin

Reviewed By: dberlin

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@326181 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-27 09:34:51 +00:00
Daniel Berlin
41985cbc8e NewGVN: Fix PR/33367, which was causing us to delete non-copy intrinsics accidentally in some rare cases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322115 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-09 20:12:42 +00:00
Davide Italiano
0d1abb33e6 [NewGVN] Stop assuming PHI args ordering when looking at phi-of-ops.
It's not guaranteed. There's a bug open to sort them in predecessor
order, but it won't happen anytime soon. In the meanwhile, passes
will have to do an O(#preds) scan. Such is life.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316953 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-30 20:20:16 +00:00
Eugene Zelenko
8b6784b39c [Transforms] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316241 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-20 21:47:29 +00:00
Daniel Berlin
9d89f00c5e NewGVN: Factor out duplicate parts of OpIsSafeForPHIOfOps
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315040 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-06 01:33:06 +00:00
Daniel Berlin
1d6610a9fa NewGVN: Fix PR 34473, by not using ExactlyEqualsExpression for finding
phi of ops users.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314612 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-30 23:51:55 +00:00
Daniel Berlin
25bd82ac68 NewGVN: Evaluate phi of ops expressions before creating phi node
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314611 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-30 23:51:54 +00:00
Daniel Berlin
7e81ef7f17 NewGVN: Allow dependent PHI of ops
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314610 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-30 23:51:53 +00:00
Daniel Berlin
9eca46bbae NewGVN: Make OpIsSafeForPhiOfOps non-recursive
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314609 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-30 23:51:04 +00:00
Daniel Berlin
d8e533dd67 NewGVN: Remove unused includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313700 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-20 00:07:12 +00:00
Daniel Berlin
110f9f2e80 NewGVN: Fix PR 34430 - we need to look through predicateinfo copies to detect self-cycles of phi nodes. We also need to not ignore certain types of arguments when testing whether the phi has a backedge or was originally constant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312510 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-05 02:17:43 +00:00
Daniel Berlin
660fd0b5be NewGVN: Fix PR 34452 by passing instruction all the way down when we do aggregate value simplification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312509 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-05 02:17:42 +00:00
Daniel Berlin
d17cd5cd24 NewGVN: Detect copies through predicateinfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312508 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-05 02:17:41 +00:00
Daniel Berlin
190a294869 NewGVN: Change where check for original instruction in phi of ops leader finding is done. Where we had it before, we would stop looking when we hit the original instruction, but skip it. Now we skip it and keep looking.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312507 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-05 02:17:40 +00:00
Daniel Berlin
026a351310 Fix PR/33305. caused by trying to simplify expressions in phi of ops that should have no leaders.
Summary:
After a discussion with Rekka, i believe this (or a small variant)
should fix the remaining phi-of-ops problems.

Rekka's algorithm for completeness relies on looking up expressions
that should have no leader, and expecting it to fail (IE looking up
expressions that can't exist in a predecessor, and expecting it to
find nothing).

Unfortunately, sometimes these expressions can be simplified to
constants, but we need the lookup to fail anyway.  Additionally, our
simplifier outsmarts this by taking these "not quite right"
expressions, and simplifying them into other expressions or walking
through phis, etc.  In the past, we've sometimes been able to find
leaders for these expressions, incorrectly.

This change causes us to not to try to phi of ops such expressions.
We determine safety by seeing if they depend on a phi node in our
block.

This is not perfect, we can do a bit better, but this should be a
"correctness start" that we can then improve.  It also requires a
bunch of caching that i'll eventually like to eliminate.

The right solution, longer term, to the simplifier issues, is to make
the query interface for the instruction simplifier/constant folder
have the flags we need, so that we can keep most things going, but
turn off the possibly-invalid parts (threading through phis, etc).
This is an issue in another wrong code bug as well.

Reviewers: davide, mcrosier

Subscribers: sanjoy, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312401 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-02 02:18:44 +00:00
Daniel Berlin
29492fbac5 NewGVN: Make sure we don't incorrectly use PredicateInfo when doing PHI of ops
Summary: When we backtranslate expressions, we can't use the predicateinfo, since we are evaluating them in a different context.

Reviewers: davide, mcrosier

Subscribers: sanjoy, Prazek, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312352 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-01 19:20:18 +00:00
Daniel Berlin
36fa01b111 NewGVN: Make sure we add the correct user if we swapped the comparison operands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312162 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-30 19:53:23 +00:00
Daniel Berlin
01a26ffc1a NewGVN: Allow simplification into variables
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312161 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-30 19:52:39 +00:00
Davide Italiano
ba48d7b486 [NewGVN] Use auto when the type is obvious NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311838 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-26 22:31:10 +00:00
Daniel Berlin
7824530ee0 NewGVN: Fix PR33204 - We need to add memory users when we bypass memorydefs for loads, not just when we do it for stores.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311829 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-26 07:37:11 +00:00
Daniel Berlin
9dc6eddb1d NewGVN: We weren't properly simplifying selects with equal arguments due to a thinko.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311626 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-24 02:43:17 +00:00
Benjamin Kramer
c773276189 Move helper classes into anonymous namespaces.
No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311288 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-20 13:03:48 +00:00