Skip to content

Remove unused Libmaincil module#165

Merged
michael-schwarz merged 1 commit intodevelopfrom
rm-libmaincil
Feb 10, 2024
Merged

Remove unused Libmaincil module#165
michael-schwarz merged 1 commit intodevelopfrom
rm-libmaincil

Conversation

@sim642
Copy link
Copy Markdown
Member

@sim642 sim642 commented Feb 1, 2024

It calls initCIL at top level when linked with -linkall. This is unexpected, because in Goblint we explicitly call initCIL, but that's actually no-op and wouldn't account for runtime changes to Machdep and whatever else mutable initCIL reads.

This indirectly causes goblint/gobview#38. In non-dev dune profile, jsoo now runs global dead code detection which is more aggressive than what the native compiler can on a per-module basis.

The goal here is to remove this unnecessary module from CIL and fix Goblint to not read what initCIL writes in top-level expressions. I'll open a follow-up Goblint PR for that.

It calls initCIL at top level when linked with -linkall.
@sim642 sim642 added this to the 2.0.4 milestone Feb 1, 2024
@michael-schwarz
Copy link
Copy Markdown
Member

It indeed appears unused, so we can remove it.

However, I agree with @stilscher that the root cause for the issue in gobview is probably different: There we have no guarantee all modules have been loaded before the main code of gobview is run. Until we can guarantee that, everything depends on the order in which the compiler (the runtime?) decides to load modules.

@sim642
Copy link
Copy Markdown
Member Author

sim642 commented Feb 2, 2024

However, I agree with @stilscher that the root cause for the issue in gobview is probably different: There we have no guarantee all modules have been loaded before the main code of gobview is run. Until we can guarantee that, everything depends on the order in which the compiler (the runtime?) decides to load modules.

That's what goblint/gobview#39 does the same way that native Goblint.

@michael-schwarz michael-schwarz merged commit 8c9c579 into develop Feb 10, 2024
@michael-schwarz michael-schwarz deleted the rm-libmaincil branch February 10, 2024 15:57
sim642 added a commit to sim642/opam-repository that referenced this pull request Jul 30, 2024
CHANGES:

* Add `Return` statement expression location (goblint/cil#167).
* Add `availability` attribute support (goblint/cil#168, goblint/cil#171).
* Remove unused `Libmaincil` module (goblint/cil#165).
* Fix some synthetic locations (goblint/cil#166, goblint/cil#167).
avsm pushed a commit to avsm/opam-repository that referenced this pull request Sep 5, 2024
CHANGES:

* Add `Return` statement expression location (goblint/cil#167).
* Add `availability` attribute support (goblint/cil#168, goblint/cil#171).
* Remove unused `Libmaincil` module (goblint/cil#165).
* Fix some synthetic locations (goblint/cil#166, goblint/cil#167).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants