LLVM: llvm::IRSimilarity Namespace Reference (original) (raw)
| Classes | |
|---|---|
| struct | IRInstructionData |
| This provides the utilities for hashing an Instruction to an unsigned integer. More... | |
| struct | IRInstructionDataList |
| struct | IRInstructionDataTraits |
| struct | IRInstructionMapper |
| Helper struct for converting the Instructions in a Module into a vector of unsigned integers. More... | |
| class | IRSimilarityCandidate |
| This is a class that wraps a range of IRInstructionData from one point to another in the vector of IRInstructionData, which is a region of the program. More... | |
| class | IRSimilarityIdentifier |
| This class puts all the pieces of the IRInstructionData, IRInstructionMapper, IRSimilarityCandidate together. More... |
| Enumerations | |
|---|---|
| enum | InstrType { Legal, Illegal, Invisible } |
| This represents what is and is not supported when finding similarity in Instructions. More... |
◆ CandidateGVNMapping
◆ SimilarityGroup
◆ SimilarityGroupList
◆ InstrType
This represents what is and is not supported when finding similarity in Instructions.
Legal Instructions are considered when looking at similarity between Instructions.
Illegal Instructions cannot be considered when looking for similarity between Instructions. They act as boundaries between similarity regions.
Invisible Instructions are skipped over during analysis.
| Enumerator |
|---|
| Legal |
| Illegal |
| Invisible |
Definition at line 77 of file IRSimilarityIdentifier.h.
◆ isClose()
Compare one IRInstructionData class to another IRInstructionData class for whether they are performing a the same operation, and can mapped to the same value.
For regular instructions if the hash value is the same, then they will also be close.
Parameters
Returns
true if A and B are similar enough to be mapped to the same value.
Definition at line 220 of file IRSimilarityIdentifier.cpp.
References A(), llvm::all_of(), B(), llvm::cast(), llvm::drop_begin(), llvm::dyn_cast(), GEP, llvm::isa(), and llvm::zip().
Referenced by llvm::IRSimilarity::IRSimilarityCandidate::compareStructure(), llvm::IRSimilarity::IRInstructionDataTraits::isEqual(), and llvm::IRSimilarity::IRSimilarityCandidate::isSimilar().