diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-06-20 13:59:24 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-06-21 16:31:07 +0200 |
commit | 37d3030711cc30564fb142154e4e8cabdc91724e (patch) | |
tree | 4903ba1af3e6cec185cdc7796596749dd1867e01 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 5342dd6bf44455401789c6076bc6c166e914cdf1 (diff) | |
download | llvm-37d3030711cc30564fb142154e4e8cabdc91724e.zip llvm-37d3030711cc30564fb142154e4e8cabdc91724e.tar.gz llvm-37d3030711cc30564fb142154e4e8cabdc91724e.tar.bz2 |
[ValueTracking, BasicAA] Don't simplify instructions
GetUnderlyingObject() (and by required symmetry
DecomposeGEPExpression()) will call SimplifyInstruction() on the
passed value if other checks fail. This simplification is very
expensive, but has little effect in practice. This patch removes
the SimplifyInstruction call(), and replaces it with a check for
single-argument phis (which can occur in canonical IR in LCSSA
form), which is the only useful simplification case I was able to
identify.
At O3 the geomean CTMark improvement is -1.7%. The largest
improvement is SPASS with ThinLTO at -6%.
In test-suite, I see only two tests with a hash difference and
no code size difference (PAQ8p, Ptrdist), which indicates that
the simplification only ends up being useful very rarely. (I would
have liked to figure out which simplification is responsible here,
but wasn't able to spot it looking at transformation logs.)
The AMDGPU test case that is update was using two selects with
undef condition, in which case GetUnderlyingObject will return
the first select operand as the underlying object. This will of
course not happen with non-undef conditions, so this was not
testing anything realistic. Additionally this illustrates potential
unsoundness: While GetUnderlyingObject will pick the first operand,
the select might be later replaced by the second operand, resulting
in inconsistent assumptions about the undef value.
Differential Revision: https://reviews.llvm.org/D82261
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions