summaryrefslogtreecommitdiff
path: root/compiler/optdfa.pas
diff options
context:
space:
mode:
authorflorian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2>2013-04-21 16:53:25 +0000
committerflorian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2>2013-04-21 16:53:25 +0000
commit5a2b7331e28eb42e332dfe04bee982688fede09e (patch)
treefa9384d0e4f00443551550cd690897d18c7ce606 /compiler/optdfa.pas
parent466d6e65037f0d209d2fd61460e95e34c1071d1c (diff)
downloadfpc-5a2b7331e28eb42e332dfe04bee982688fede09e.tar.gz
+ introduce cnf_call_never_returns to signal the dfa if a call node never returns
* get rid of tcgraisenode.pass_generate_code, it is replaced by compiler proc. call nodes generated in pass_1 git-svn-id: http://svn.freepascal.org/svn/fpc/branches/i8086@24288 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/optdfa.pas')
-rw-r--r--compiler/optdfa.pas21
1 files changed, 2 insertions, 19 deletions
diff --git a/compiler/optdfa.pas b/compiler/optdfa.pas
index 28f2f6fd46..e4734bca55 100644
--- a/compiler/optdfa.pas
+++ b/compiler/optdfa.pas
@@ -222,7 +222,8 @@ unit optdfa;
begin
{ last node, not exit or raise node and function? }
if assigned(resultnode) and
- not(node.nodetype in [raisen,exitn]) then
+ not(node.nodetype=exitn) and
+ not((node.nodetype=calln) and (cnf_call_never_returns in tcallnode(node).callnodeflags)) then
begin
{ if yes, result lifes }
DFASetDiff(l,resultnode.optinfo^.life,n.optinfo^.def);
@@ -499,24 +500,6 @@ unit optdfa;
end;
end;
- raisen:
- begin
- if not(assigned(node.optinfo^.life)) then
- begin
- dfainfo.use:=@node.optinfo^.use;
- dfainfo.def:=@node.optinfo^.def;
- dfainfo.map:=map;
- foreachnodestatic(pm_postprocess,traisenode(node).left,@AddDefUse,@dfainfo);
- foreachnodestatic(pm_postprocess,traisenode(node).right,@AddDefUse,@dfainfo);
- foreachnodestatic(pm_postprocess,traisenode(node).third,@AddDefUse,@dfainfo);
- { update node }
- l:=node.optinfo^.life;
- DFASetIncludeSet(l,node.optinfo^.use);
- UpdateLifeInfo(node,l);
- printdfainfo(output,node);
- end;
- end;
-
calln:
begin
if not(assigned(node.optinfo^.def)) and