Closed harkal closed 3 months ago
question: why do
request_analysis
andinvalidate_analysis
have to be called imperatively? is there any way for a pass to register which analyses it needs and then there is automated machinery which calls request_analysis and invalidate_analysis?
I tried both designs, but the imperative won at the end. It's more clear/explicit when and how request and invalidations happen, and it gives you the flexibility of sequencing and re-requesting analyses when needed depending on the nature of the pass.
and it gives you the flexibility of sequencing and re-requesting analyses when needed depending on the nature of the pass.
note: large contracts i was testing come from 24s to ~6-7s(!)
What I did
This PR completes a big refactor of the venom codebase, while introducing
IRContext
andIRPassManager
.IRContext
is now encapsulating the whole Venom context of compilation which now contains all theIRFunction
s. The pass managerIRPassManages
attempts to clean up the pass/analysis handling, by providing a way for passes to request and retrieve specific analyses over the Venom code.How I did it
How to verify it
Commit message
Description for the changelog
Cute Animal Picture