1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/unittests/Analysis/CMakeLists.txt
Andrew Litteken f7aaee70de [IRSim] Adding IR Instruction Mapper
This introduces the IRInstructionMapper, and the associated wrapper for
instructions, IRInstructionData, that maps IR level Instructions to
unsigned integers.

Mapping is done mainly by using the "isSameOperationAs" comparison
between two instructions.  If they return true, the opcode, result type,
and operand types of the instruction are used to hash the instruction
with an unsigned integer.  The mapper accepts instruction ranges, and
adds each resulting integer to a list, and each wrapped instruction to
a separate list.

At present, branches, phi nodes are not mapping and exception handling
is illegal.  Debug instructions are not considered.

The different mapping schemes are tested in
unittests/Analysis/IRSimilarityIdentifierTest.cpp

Recommit of: b04c1a9d3127730c05e8a22a0e931a12a39528df

Differential Revision: https://reviews.llvm.org/D86968
2020-09-17 14:06:16 -05:00

55 lines
1.2 KiB
CMake

set(LLVM_LINK_COMPONENTS
Analysis
AsmParser
Core
Support
TransformUtils
)
if (DEFINED LLVM_HAVE_TF_API)
LIST(APPEND EXTRA_TESTS TFUtilsTest.cpp)
else()
LIST(APPEND LLVM_OPTIONAL_SOURCES TFUtilsTest.cpp)
endif()
add_llvm_unittest_with_input_files(AnalysisTests
AliasAnalysisTest.cpp
AliasSetTrackerTest.cpp
AssumeBundleQueriesTest.cpp
BasicAliasAnalysisTest.cpp
BlockFrequencyInfoTest.cpp
BranchProbabilityInfoTest.cpp
CallGraphTest.cpp
CaptureTrackingTest.cpp
CFGTest.cpp
CGSCCPassManagerTest.cpp
ConstraintSystemTest.cpp
DDGTest.cpp
DivergenceAnalysisTest.cpp
DomTreeUpdaterTest.cpp
GlobalsModRefTest.cpp
FunctionPropertiesAnalysisTest.cpp
IRSimilarityIdentifierTest.cpp
IVDescriptorsTest.cpp
LazyCallGraphTest.cpp
LoadsTest.cpp
LoopInfoTest.cpp
LoopNestTest.cpp
MemoryBuiltinsTest.cpp
MemorySSATest.cpp
PhiValuesTest.cpp
ProfileSummaryInfoTest.cpp
ScalarEvolutionTest.cpp
VectorFunctionABITest.cpp
SparsePropagation.cpp
TargetLibraryInfoTest.cpp
TBAATest.cpp
UnrollAnalyzerTest.cpp
ValueLatticeTest.cpp
ValueTrackingTest.cpp
VectorUtilsTest.cpp
${EXTRA_TESTS}
)
target_link_libraries(AnalysisTests PRIVATE LLVMTestingSupport)