-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sail -smt very slow to generate. #783
Comments
There's the
I think the problem might be the path-condition generation after inlining in the SMT properties. The current method is very slow, but the previous method was subtly wrong in some rare cases. |
I think I recently made the application of some optimisations a bit too conservative when I was working on the SystemVerilog generation, if I force them to be applied everywhere (even when potentially unsound) it goes fast:
Just a case of finding the right point where the optimisations fire, but not anywhere it might be unsound. |
Thank you, again, for your fast turnaround. Indeed, I think
|
I think I have a fix here #784, but it has a few issues still that'll I'll need to fix tomorrow before I can merge it. |
It definitely goes faster now :-) |
I think that commit was unsound after testing it some more though... Looks like the issue is with |
Maybe we should rewrite that not to use mutable variables: just define the return Capability upfront with all permissions false and otype for the non-exe case then use |
Yes, I think there are a few other similar functions though. Essentially I've already done the thing I need in order to fix the performance issue more generally in the Sail to SystemVerilog backend. The intermediate representation I use when generating SystemVerilog (SVIR) is just bitvector SMT expressions wrapped in a SystemVerilog module structure. If I inlined that structure into plain SMT, I'd get the right thing and wouldn't have to worry about things like mutable variables turning off optimisations which is just going to stay brittle and annoying. |
Building prefixes of the CHERIoT sail model's properties file gets very slow very quickly:
$property
-s)prop_nullzero
)prop_seal_root
)prop_decEnc
)prop_andperms
)This is not the kind of growth curve that inspires confidence in running the whole file. Unfortunately, the vast majority of this time is spent after
--verbose 1
stops being useful:And similarly for
--dtc_verbose
and--dsmt_verbose
. Any hints as to what I could do to see wheresail
is spending its time?The text was updated successfully, but these errors were encountered: