File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
seaofnodes/src/main/java/com/compilerprogramming/ezlang/compiler/nodes Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ public class CallEndNode extends CFGNode implements MultiNode {
1818 private boolean _folding ;
1919 public final TypeRPC _rpc ;
2020
21+ public static final boolean ALLOW_INLINING_CALLS = false ; // FIXME this is pending
22+
2123 public CallEndNode (CallNode call ) { super (new Node []{call }); _rpc = TypeRPC .constant (_nid ); }
2224 public CallEndNode (CallEndNode cend ) { super (cend ); _rpc = cend ._rpc ; }
2325
@@ -63,7 +65,9 @@ public Node idealize() {
6365
6466 // Trivial inlining: call site calls a single function; single function
6567 // is only called by this call site.
66- if ( !_folding && nIns ()==2 && in (0 ) instanceof CallNode call ) {
68+ // EZ Lang - we do not support inlining calls yet
69+ // EZ Lang - possibly requires updating the type dict to say inlined function is dead
70+ if ( ALLOW_INLINING_CALLS && !_folding && nIns ()==2 && in (0 ) instanceof CallNode call ) {
6771 Node fptr = call .fptr ();
6872 if ( fptr .nOuts () == 1 && // Only user is this call
6973 fptr instanceof ConstantNode && // We have an immediate call
You can’t perform that action at this time.
0 commit comments