[all-commits] [llvm/llvm-project] 19f01a: [GVN] add early exit to ConstantFoldLoadThroughBit...
Jameson Nash via All-commits
all-commits at lists.llvm.org
Mon Jul 13 19:06:11 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 19f01a484760d9a29f4f414b30da110dd6550191
https://github.com/llvm/llvm-project/commit/19f01a484760d9a29f4f414b30da110dd6550191
Author: Jameson Nash <vtjnash at gmail.com>
Date: 2020-07-13 (Mon, 13 Jul 2020)
Changed paths:
M llvm/lib/Analysis/ConstantFolding.cpp
M llvm/test/Transforms/GVN/non-integral-pointers.ll
M llvm/test/Transforms/GlobalOpt/evaluate-call-errors.ll
Log Message:
-----------
[GVN] add early exit to ConstantFoldLoadThroughBitcast [NFC]
And adds some additional test coverage to ensure later commits don't
introduce regressions.
Differential Revision: https://reviews.llvm.org/D59730
Commit: e244f86f4dfd9e8982940d09294af522d3809d7f
https://github.com/llvm/llvm-project/commit/e244f86f4dfd9e8982940d09294af522d3809d7f
Author: Jameson Nash <vtjnash at gmail.com>
Date: 2020-07-13 (Mon, 13 Jul 2020)
Changed paths:
M llvm/lib/Transforms/Utils/VNCoercion.cpp
Log Message:
-----------
[VNCoercion] avoid creating bitcast for zero offsets [NFCI]
This could previously make it more complicated for ConstantFolding
later, leading to a higher likelyhood it would have to reject the
expression, even though zero seems like probably the common case here.
Differential Revision: https://reviews.llvm.org/D59730
Commit: 2c7a07b59d5da54eba8e3e030e1cc040a88ecf58
https://github.com/llvm/llvm-project/commit/2c7a07b59d5da54eba8e3e030e1cc040a88ecf58
Author: Jameson Nash <vtjnash at gmail.com>
Date: 2020-07-13 (Mon, 13 Jul 2020)
Changed paths:
M llvm/lib/Analysis/ConstantFolding.cpp
M llvm/lib/Transforms/Utils/VNCoercion.cpp
M llvm/test/Transforms/GVN/non-integral-pointers.ll
Log Message:
-----------
[GVN] teach ConstantFolding correct handling of non-integral addrspace casts
Here we teach the ConstantFolding analysis pass that it is not legal to
replace a load of a bitcast constant (having a non-integral addrspace)
with a bitcast of the value of that constant (with a different
non-integral addrspace).
But also teach it that certain bit patterns are always known and
convertable (a fact it already uses elsewhere). This required us to also
fix a globalopt test, since, after this change, LLVM is able to realize
that the test actually is a valid transform (NULL is always a known
bit-pattern) and so it doesn't need to emit the failure remarks for it.
Also simplify some of the negative tests for transforms by avoiding a
type change in their bitcast, and add positive versions of the same
tests, to show that they otherwise should work.
Differential Revision: https://reviews.llvm.org/D59730
Compare: https://github.com/llvm/llvm-project/compare/fefe6a6642e4...2c7a07b59d5d
More information about the All-commits
mailing list