aboutsummaryrefslogtreecommitdiffstats
path: root/backend/Constprop.v
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@gmail.com>2015-09-20 15:23:38 +0200
committerXavier Leroy <xavier.leroy@gmail.com>2015-09-20 15:23:38 +0200
commit9147350fdb47f3471ce6d9202b7c996f79ffab2d (patch)
treef47977b33fa0975d614cc9bc2e4a22c996a96401 /backend/Constprop.v
parentdb0a62a01bbf90617701b68917319767159bf039 (diff)
downloadcompcert-kvx-9147350fdb47f3471ce6d9202b7c996f79ffab2d.tar.gz
compcert-kvx-9147350fdb47f3471ce6d9202b7c996f79ffab2d.zip
Experiment: track the scopes of local variables via __builtin_debug.
C2C: the code that insert debug builtins with the line numbers is now in Unblock. Handle calls to __builtin_debug. Unblock: generate __builtin_debug(1) for line numbers, carrying the list of active scopes as extra arguments. Generate __builtin_debug(6) for local variable declarations, carrying the corresponding scope number as extra argument. Constprop: avoid duplicating debug arguments that are constants already. PrintAsmaux: show this extra debug info as comments.
Diffstat (limited to 'backend/Constprop.v')
-rw-r--r--backend/Constprop.v6
1 files changed, 3 insertions, 3 deletions
diff --git a/backend/Constprop.v b/backend/Constprop.v
index cd844d30..8f4cb76d 100644
--- a/backend/Constprop.v
+++ b/backend/Constprop.v
@@ -144,9 +144,9 @@ Fixpoint debug_strength_reduction (ae: AE.t) (al: list (builtin_arg reg)) :=
| a :: al =>
let a' := builtin_arg_reduction ae a in
let al' := a :: debug_strength_reduction ae al in
- match a' with
- | BA_int _ | BA_long _ | BA_float _ | BA_single _ => a' :: al'
- | _ => al'
+ match a, a' with
+ | BA _, (BA_int _ | BA_long _ | BA_float _ | BA_single _) => a' :: al'
+ | _, _ => al'
end
end.