aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe/rtl/hipe_rtl_liveness.erl
diff options
context:
space:
mode:
authorYiannis Tsiouris <[email protected]>2014-01-28 18:13:43 +0200
committerYiannis Tsiouris <[email protected]>2014-03-07 18:35:03 +0200
commit7a490d5cff3f033901ab6cac6c0fc1fd7bcb22c7 (patch)
tree5d41e499c747e4faa640cd560f53ee9dcbf16afa /lib/hipe/rtl/hipe_rtl_liveness.erl
parentfdec9307a6fb5a911f3d6d0de31c35e8a90e5a39 (diff)
downloadotp-7a490d5cff3f033901ab6cac6c0fc1fd7bcb22c7.tar.gz
otp-7a490d5cff3f033901ab6cac6c0fc1fd7bcb22c7.tar.bz2
otp-7a490d5cff3f033901ab6cac6c0fc1fd7bcb22c7.zip
Extend RTL API to support the LLVM backend
Extend the 'rtl_var' definition to host liveness information needed for a simple liveness analysis performed by the LLVM backend. Also, uncomment some function definitions (mostly simple accessors) that are already there and are useful for the translation of RTL code to LLVM assembly. Finally, extend the RTL 'call' instruction with the 'normalcontinuation' field which is required for translating calls that are in the scope of an exception handler. This extra field is required in order to point to a new basic block which will hold the 'unwind label' of LLVM's invoke instruction. While the 'unwind label' is semantically equivalent with the 'failcontinuation', in LLVM this block must have a 'landingpad' instruction. The problem arises by the fact that an RTL 'continuation' block can also be accessible by other paths in the RTL CFG, and so cannot be marked as a landing pad. To overcome this issue we create a new block (the 'normalcontinuation') which is used as the 'unwind label' of LLVM's invoke instruction and which will eventually transfer control to the 'continuation' block.
Diffstat (limited to 'lib/hipe/rtl/hipe_rtl_liveness.erl')
-rw-r--r--lib/hipe/rtl/hipe_rtl_liveness.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/hipe/rtl/hipe_rtl_liveness.erl b/lib/hipe/rtl/hipe_rtl_liveness.erl
index 3cfada9d6c..0c4b6b2e11 100644
--- a/lib/hipe/rtl/hipe_rtl_liveness.erl
+++ b/lib/hipe/rtl/hipe_rtl_liveness.erl
@@ -34,7 +34,8 @@
-module(hipe_rtl_liveness).
-%% -define(LIVEOUT_NEEDED,true). % needed for liveness.inc below.
+%% -define(DEBUG_LIVENESS,true).
+-define(LIVEOUT_NEEDED,true). % needed for liveness.inc below.
-define(PRETTY_PRINT,false).
-include("hipe_rtl.hrl").