Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
frama-c
Commits
4dabb947
Commit
4dabb947
authored
4 years ago
by
Valentin Perrelle
Browse files
Options
Downloads
Patches
Plain Diff
[dive] build scalar nodes for lvalues even if the code is dead
parent
745934ee
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugins/dive/build.ml
+11
-6
11 additions, 6 deletions
src/plugins/dive/build.ml
with
11 additions
and
6 deletions
src/plugins/dive/build.ml
+
11
−
6
View file @
4dabb947
...
@@ -200,12 +200,17 @@ let enumerate_cells ~is_folded_base ~limit lval kinstr =
...
@@ -200,12 +200,17 @@ let enumerate_cells ~is_folded_base ~limit lval kinstr =
with
Abstract_interp
.
Error_Top
->
raise
Unknown_location
with
Abstract_interp
.
Error_Top
->
raise
Unknown_location
let
build_node_kind
~
is_folded_base
lval
kinstr
=
let
build_node_kind
~
is_folded_base
lval
kinstr
=
match
enumerate_cells
~
is_folded_base
~
limit
:
1
lval
kinstr
with
match
lval
with
|
[
node_kind
]
->
node_kind
|
Var
vi
,
offset
->
|
[]
(* happens if kinstr is dead code *)
->
Scattered
(
lval
,
kinstr
)
(* Build a scalar node even if kinstr is dead *)
|
_
->
assert
false
Scalar
(
vi
,
Cil
.
typeOfLval
lval
,
offset
)
|
exception
(
Too_many_deps
_
)
->
Scattered
(
lval
,
kinstr
)
|
Mem
_
,
_
->
|
exception
Unknown_location
->
Unknown
(
lval
,
kinstr
)
match
enumerate_cells
~
is_folded_base
~
limit
:
1
lval
kinstr
with
|
[
node_kind
]
->
node_kind
|
[]
(* happens if kinstr is dead code *)
->
Scattered
(
lval
,
kinstr
)
|
_
->
assert
false
|
exception
(
Too_many_deps
_
)
->
Scattered
(
lval
,
kinstr
)
|
exception
Unknown_location
->
Unknown
(
lval
,
kinstr
)
let
default_node_locality
callstack
=
let
default_node_locality
callstack
=
match
callstack
with
match
callstack
with
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment