Function checkModuleCompatibility is a performance bottleneck #622
Labels
performance
Issues that involve or include performance problems
subsystem: crucible-llvm
Issues related to LLVM bitcode verification with crucible-llvm
Function
checkModuleCompatibility
is called bycrucible_llvm_verify
to check that each supplied override was proved using the same LLVM module.saw-script/src/SAWScript/Crucible/LLVM/Builtins.hs
Lines 270 to 283 in 74ddfaf
The problem is that it does a full structural comparison of the entire LLVM AST for every override, which can be expensive. Profiling shows that on some proof scripts, this can account for up to half of the total runtime of
crucible_llvm_verify
.Instead of a full structural comparison, we should perhaps generate a unique ID for each
LLVMModule
value when the module is loaded, which we can then use for fast comparisons.The text was updated successfully, but these errors were encountered: