11 Commits

Author SHA1 Message Date
Max Kazantsev
d9bd97c132 Make widenable condition transparent for MemoryWriteTracking
Side effects of widenable condition intrinsic are modelled via
InaccessibleMemOnly, and there is no way to say that it isn't
really writing any memory. This patch teaches MemoryWriteTracking
ignore this intrinsic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354021 91177308-0d34-0410-b5e6-96231b3b80d8
2019-02-14 11:10:29 +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
Max Kazantsev
c80a38c134 [IPT] Drop cache less eagerly in GVN and LoopSafetyInfo
Current strategy of dropping `InstructionPrecedenceTracking` cache is to
invalidate the entire basic block whenever we change its contents. In fact,
`InstructionPrecedenceTracking` has 2 internal strictures: `OrderedInstructions`
that is needed to be invalidated whenever the contents changes, and the map
with first special instructions in block. This second map does not need an
update if we add/remove a non-special instuction because it cannot
affect the contents of this map.

This patch changes API of `InstructionPrecedenceTracking` so that it now
accounts for reasons under which we invalidate blocks. This should lead
to much less recalculations of the map and should save us some compile time
because in practice we don't typically add/remove special instructions.

Differential Revision: https://reviews.llvm.org/D54462
Reviewed By: efriedma


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350694 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-09 07:28:13 +00:00
Max Kazantsev
8e59cd1915 [LICM] Hoist guards from non-header blocks
This patch relaxes overconservative checks on whether or not we could write
memory before we execute an instruction. This allows us to hoist guards out of
loops even if they are not in the header block.

Differential Revision: https://reviews.llvm.org/D50891
Reviewed By: fedor.sergeev



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346643 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-12 09:29:58 +00:00
Max Kazantsev
281457bf89 [NFC] Rename variable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341901 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-11 05:10:01 +00:00
Max Kazantsev
62f16664ab [NFC] Simplify inner structure of InstructionPrecedenceTracking
Currently it has a set KnownBlocks that marks blocks as having cached
answers and a map FirstSpecialInsts that maps these blocks to first
special instructions in them. The value in the map is always non-null,
and for blocks that are known to have no special instructions the map
does not have an instance.

This patch removes KnownBlocks as obsolete. Instead, for blocks that
are known to have no special instructions, we just put a nullptr value.
This makes the code much easier to read.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341531 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-06 09:29:42 +00:00
Max Kazantsev
d8ffa610fe Return "[NFC] Add severe validation of InstructionPrecedenceTracking"
This validation patch has been reverted as rL341147 because of conserns raised by
@reames. This revision returns it as is to raise a discussion and address the concerns.

Differential Revision: https://reviews.llvm.org/D51523
Reviewed By: reames


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341526 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-06 08:33:02 +00:00
Max Kazantsev
d02189d061 Revert "[NFC] Add severe validation of InstructionPrecedenceTracking" for discussion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341147 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-31 00:01:54 +00:00
Max Kazantsev
9480b0964b [NFC] Add severe validation of InstructionPrecedenceTracking
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341051 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-30 10:26:06 +00:00
Max Kazantsev
009ed30f63 [NFC] Rename map to make the naming consistent
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341043 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-30 09:24:33 +00:00
Max Kazantsev
3a86455ee7 [NFC] Move OrderedInstructions and InstructionPrecedenceTracking to Analysis
These classes don't make any changes to IR and have no reason to be in
Transform/Utils. This patch moves them to Analysis folder. This will allow
us reusing these classes in some analyzes, like MustExecute.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341015 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-30 04:49:03 +00:00