This is a similarity visualization tool that accepts a Module and
passes it to the IRSimilarityIdentifier. The resulting SimilarityGroups
are output in a JSON file.
Tests are found in test/tools/llvm-sim and check for the file not found,
a bad module, and that the JSON is created correctly.
Reviewers: paquette, jroelofs, MaskRay
Recommit of: 15645d044b to fix linking
errors and GN build system.
Differential Revision: https://reviews.llvm.org/D86974
28 lines
613 B
LLVM
28 lines
613 B
LLVM
define void @similar_func1() {
|
|
entry:
|
|
%a = alloca i32, align 4
|
|
%b = alloca i32, align 4
|
|
%c = alloca i32, align 4
|
|
store i32 2, i32* %a, align 4
|
|
store i32 3, i32* %b, align 4
|
|
store i32 4, i32* %c, align 4
|
|
%al = load i32, i32* %a
|
|
%bl = load i32, i32* %b
|
|
%cl = load i32, i32* %c
|
|
ret void
|
|
}
|
|
|
|
define void @similar_func2() {
|
|
entry:
|
|
%a = alloca i32, align 4
|
|
%b = alloca i32, align 4
|
|
%c = alloca i32, align 4
|
|
store i32 2, i32* %a, align 4
|
|
store i32 3, i32* %b, align 4
|
|
store i32 4, i32* %c, align 4
|
|
%al = load i32, i32* %a
|
|
%bl = load i32, i32* %b
|
|
%cl = load i32, i32* %c
|
|
ret void
|
|
}
|