diff options
author | Xavier Leroy <xavierleroy@users.noreply.github.com> | 2021-09-15 14:00:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-15 14:00:41 +0200 |
commit | c9fad7cd7bdc4e79fb06a1d39abfa0d5471623e5 (patch) | |
tree | 300c838636f84ef8cc57faa86eca9440e9171c69 /backend | |
parent | 8eaff6bf3933f2213ae85584009e05123c40fa65 (diff) | |
download | compcert-kvx-c9fad7cd7bdc4e79fb06a1d39abfa0d5471623e5.tar.gz compcert-kvx-c9fad7cd7bdc4e79fb06a1d39abfa0d5471623e5.zip |
Avoid `Global Set Asymmetric Patterns` (#408)
Instead, add `Set Asymmetric Patterns` to the files that need it,
or use `Arguments` to make inductive types work better with symmetric patterns.
Closes: #403
Diffstat (limited to 'backend')
-rw-r--r-- | backend/Inlining.v | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/backend/Inlining.v b/backend/Inlining.v index 7eb0f0fa..d66d2586 100644 --- a/backend/Inlining.v +++ b/backend/Inlining.v @@ -293,10 +293,13 @@ Inductive inline_decision (ros: reg + ident) : Type := | Cannot_inline | Can_inline (id: ident) (f: function) (P: ros = inr reg id) (Q: fenv!id = Some f). +Arguments Cannot_inline {ros}. +Arguments Can_inline {ros}. + Program Definition can_inline (ros: reg + ident): inline_decision ros := match ros with - | inl r => Cannot_inline _ - | inr id => match fenv!id with Some f => Can_inline _ id f _ _ | None => Cannot_inline _ end + | inl r => Cannot_inline + | inr id => match fenv!id with Some f => Can_inline id f _ _ | None => Cannot_inline end end. (** Inlining of a call to function [f]. An appropriate context is |