Skip to content
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

LLVM lazy load #1694

Merged
merged 4 commits into from
Jul 6, 2022
Merged

LLVM lazy load #1694

merged 4 commits into from
Jul 6, 2022

Conversation

robdockins
Copy link
Contributor

Pull in Crucible changes that enable lazy loading of Crucible CFGs from LLVM.

@robdockins robdockins force-pushed the rwd/llvm-lazy-load branch 3 times, most recently from 93cfc3c to 55c34fc Compare June 30, 2022 21:12
-- | Look up the 'L.Define' for a symbol defined in an 'LLVMModule'
lookupFunctionDef :: LLVMModule arch -> String -> Maybe L.Define
lookupFunctionDef lm nm =
find ((fromString nm ==) . L.defName) $ L.modDefines $ modAST lm
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've gone from a Map lookup to a list lookup, which seems somewhat unfortunate. Could this be a performance bottleneck in practice?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure; I don't have a good sense of how hot this lookup function is. I'd be surprised if it is a major bottleneck, but it's a shame to be going backward in terms of algorithmic complexity.

Ideally, the llvm-pretty library, or some intermediate layer would provide better lookup functionality for this stuff so it doesn't have to be redone everywhere downstream.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eddywestbrook, would you be willing to take a quick look at these heapster-releated changes and give a sense of whether this is a concern for you?

src/SAWScript/Crucible/LLVM/Builtins.hs Outdated Show resolved Hide resolved
@robdockins robdockins force-pushed the rwd/llvm-lazy-load branch from 55c34fc to 4f4e1d7 Compare July 5, 2022 22:34
@robdockins robdockins marked this pull request as ready for review July 5, 2022 22:35
Copy link
Contributor

@chameco chameco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@robdockins
Copy link
Contributor Author

I'm not sure what happened with the MacOS / saw-remote-api test, but given it passed on other platforms I'm willing to write it off as a transient failure.

@robdockins robdockins merged commit ed2c051 into master Jul 6, 2022
@mergify mergify bot deleted the rwd/llvm-lazy-load branch July 6, 2022 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants