aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe/icode/hipe_icode.hrl
diff options
context:
space:
mode:
authorMagnus Lång <[email protected]>2017-11-05 18:50:40 +0100
committerMagnus Lång <[email protected]>2017-11-05 20:52:48 +0100
commit14250efc69cacde4310aeb89b3b1ef631d8e5fe9 (patch)
treeb61cb180f9f6b3ac2892a955b8fc9536fc0e7260 /lib/hipe/icode/hipe_icode.hrl
parent354f6d1c29ecaabab8a5aa3f1c95a4188a0aa542 (diff)
downloadotp-14250efc69cacde4310aeb89b3b1ef631d8e5fe9.tar.gz
otp-14250efc69cacde4310aeb89b3b1ef631d8e5fe9.tar.bz2
otp-14250efc69cacde4310aeb89b3b1ef631d8e5fe9.zip
HiPE: Verify GC safety of derived values
HiPE has had metadata for gc safety on it's temporaries for a while, but it has never been enforced or even checked, so naturally several gc-safety violations has slipped through. A new pass, hipe_rtl_verify_gcsafe verifies gcsafety on optimised RTL and is used when running the testsuite, and can be manually enabled with +{hipe,[verify_gcsafe]}.
Diffstat (limited to 'lib/hipe/icode/hipe_icode.hrl')
-rw-r--r--lib/hipe/icode/hipe_icode.hrl8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/hipe/icode/hipe_icode.hrl b/lib/hipe/icode/hipe_icode.hrl
index 380ddd8371..7ed80a9ed4 100644
--- a/lib/hipe/icode/hipe_icode.hrl
+++ b/lib/hipe/icode/hipe_icode.hrl
@@ -41,9 +41,9 @@
-type variable_annotation() :: {atom(), any(), fun((any()) -> string())}.
--record(icode_variable, {name :: non_neg_integer(),
- kind :: 'var' | 'reg' | 'fvar',
- annotation = [] :: [] | variable_annotation()}).
+-record(icode_variable, {name :: non_neg_integer(),
+ kind :: 'var' | 'reg' | 'reg_gcsafe' | 'fvar',
+ annotation = [] :: [] | variable_annotation()}).
%%---------------------------------------------------------------------
%% Type declarations for Icode instructions
@@ -66,7 +66,7 @@
-type icode_funcall() :: mfa() | icode_primop().
-type icode_var() :: #icode_variable{kind::'var'}.
--type icode_reg() :: #icode_variable{kind::'reg'}.
+-type icode_reg() :: #icode_variable{kind::'reg'|'reg_gcsafe'}.
-type icode_fvar() :: #icode_variable{kind::'fvar'}.
-type icode_argument() :: #icode_const{} | #icode_variable{}.
-type icode_term_arg() :: icode_var() | #icode_const{}.