mirror of
https://github.com/reactos/syzkaller.git
synced 2024-11-28 22:00:24 +00:00
ifuzz/gen: speed up instruction deduplication
Takes 2.7s instead of 6.8s now.
This commit is contained in:
parent
b8e1000d66
commit
437a8a0b20
@ -137,11 +137,11 @@ func main() {
|
||||
|
||||
var deduped []*ifuzz.Insn
|
||||
nextInsn:
|
||||
for i, insn := range insns {
|
||||
for _, insn := range insns {
|
||||
mod0 := insn.Mod
|
||||
for j := 0; j < i; j++ {
|
||||
insn1 := insns[j]
|
||||
if insn.Mod == 3 && insn1.Mod == -3 || insn.Mod == -3 && insn1.Mod == 3 {
|
||||
for j := len(deduped) - 1; j >= 0; j-- {
|
||||
insn1 := deduped[j]
|
||||
if insn.Mod == 3 && insn1.Mod == -3 || insn.Mod == -3 && insn1.Mod == 3 || insn1.Mod == -1 {
|
||||
insn.Mod = insn1.Mod
|
||||
}
|
||||
if reflect.DeepEqual(insn, insn1) {
|
||||
|
Loading…
Reference in New Issue
Block a user