llvm-project/llvm/lib/Transforms
Florian Hahn 19f9e32f07 [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

llvm-svn: 340031
2018-08-17 14:39:04 +00:00
..
AggressiveInstCombine [LLVM-C] Fix name mangling on AggressiveInstCombine 2018-07-17 11:13:58 +00:00
Coroutines Move Analysis/Utils/Local.h back to Transforms 2018-06-04 21:23:21 +00:00
Hello
IPO [Inliner] add inliner stats to new pm version of inliner 2018-08-14 15:19:14 +00:00
InstCombine [InstCombine] Remove unused method FAddCombine::createFDiv(). NFC 2018-08-17 11:33:48 +00:00
Instrumentation [InstrProf] Use atomic profile counter updates for TSan 2018-08-16 22:24:47 +00:00
ObjCARC ProvenanceAnalysis: Store WeakTrackingVH instead of Value* in UnderlyingValue Cache. 2018-06-21 05:14:00 +00:00
Scalar [InstrSimplify,NewGVN] Add option to ignore additional instr info when simplifying. 2018-08-17 14:39:04 +00:00
Utils [InstCombine] add reflection fold for tan(-x) 2018-08-16 22:46:20 +00:00
Vectorize NFC: Clarify comment in loop vectorization legality 2018-08-14 20:25:13 +00:00
CMakeLists.txt Another try to commit 323321 (aggressive instruction combine). 2018-01-25 12:06:32 +00:00
LLVMBuild.txt Another try to commit 323321 (aggressive instruction combine). 2018-01-25 12:06:32 +00:00