aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/simplify.c
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-08-09 18:14:20 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-08-25 21:04:11 +0200
commit418aa1fe4bd938f9028ef1f2a71bea56aa9ab3ad (patch)
tree5cc3e683665d7ba06f13be2bd3edc5dca1ef7ed6 /simplify.c
parentff47e3b34d9bb18d32018e1e0bb1fe977d48c0e3 (diff)
downloadsparse-dev-418aa1fe4bd938f9028ef1f2a71bea56aa9ab3ad.tar.gz
add a flag for volatile memops
When simplifying memops, it's needed to check if the memops is a volatile access or not. This is currently done by checking insn->type->ctype.modifiers & MOD_VOLATILE which is rather long but also incorrect for bitfields. Prepare to fix this by adding a flag to struct instruction directly telling if the access is volatile. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'simplify.c')
-rw-r--r--simplify.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/simplify.c b/simplify.c
index 52910876..927c5532 100644
--- a/simplify.c
+++ b/simplify.c
@@ -329,7 +329,7 @@ int kill_insn(struct instruction *insn, int force)
break;
case OP_LOAD:
- if (!force && insn->type->ctype.modifiers & MOD_VOLATILE)
+ if (!force && insn->is_volatile)
return 0;
kill_use(&insn->src);
break;