Skip to content

Conversation

@ymand
Copy link
Collaborator

@ymand ymand commented Dec 23, 2024

This PR has 2 related goals:

Remove dependency on llvm::Any. For some platforms, use of llvm::Any
forces users to explicitly define internal details related to Any. Aside from
aesthetics, this places an obscure requirement on lattice implementers. We
prefer to use LLVM's (explicit) RTTI framework instead.

Introduce virtual interface for lattices. Currently, we implicitly define the
interface for lattices, because the interface to analyses is fully captured in
templates. This PR moves to an explicit, virtual interface.

We combine these two changes in a single PR because they are closely related: we
use the new lattice interface as the basis of an open type hierarchy that embeds
RTTI for safe interfacing with the dataflow engine.

@github-actions
Copy link

github-actions bot commented Dec 23, 2024

✅ With the latest revision this PR passed the C/C++ code formatter.

@ymand ymand force-pushed the rm-dyn branch 3 times, most recently from 3792a38 to 2273b56 Compare December 23, 2024 15:48
…vm::Any`.

This PR has 2 related goals:

*Remove dependency on `llvm::Any`*. For some platforms, use of `llvm::Any`
forces users to explicitly define internal details related to `Any`. Aside from
aesthetics, this places an obscure requirement on lattice implementers. We
prefer to use LLVM's (explicit) RTTI framework instead.

*Introduce virtual interface for lattices*. Currently, we implicitly define the
interface for lattices, because the interface to analyses is fully captured in
templates. This PR moves to an explicit, virtual interface.

We combine these two changes in a single PR because they are closely related: we
use the new lattice interface as the basis of an open type hierarchy that embeds
RTTI for safe interfacing with the dataflow engine.

As a side-effect, we are able to greatly simplify the interface of
`DataflowAnalysis` and collapse the distinction between it and
`TypeErasedDataflowAnalysis`.
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.

1 participant