Subversion Repositories tendra.SVN

Rev

Rev 2 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2 Rev 7
Line -... Line 1...
-
 
1
/*
-
 
2
 * Copyright (c) 2002-2005 The TenDRA Project <http://www.tendra.org/>.
-
 
3
 * All rights reserved.
-
 
4
 *
-
 
5
 * Redistribution and use in source and binary forms, with or without
-
 
6
 * modification, are permitted provided that the following conditions are met:
-
 
7
 *
-
 
8
 * 1. Redistributions of source code must retain the above copyright notice,
-
 
9
 *    this list of conditions and the following disclaimer.
-
 
10
 * 2. Redistributions in binary form must reproduce the above copyright notice,
-
 
11
 *    this list of conditions and the following disclaimer in the documentation
-
 
12
 *    and/or other materials provided with the distribution.
-
 
13
 * 3. Neither the name of The TenDRA Project nor the names of its contributors
-
 
14
 *    may be used to endorse or promote products derived from this software
-
 
15
 *    without specific, prior written permission.
-
 
16
 *
-
 
17
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
-
 
18
 * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-
 
19
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-
 
20
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
-
 
21
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-
 
22
 * EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-
 
23
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-
 
24
 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
 
25
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-
 
26
 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-
 
27
 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
 
28
 *
-
 
29
 * $Id$
-
 
30
 */
1
/*
31
/*
2
    		 Crown Copyright (c) 1997
32
    		 Crown Copyright (c) 1997
3
    
33
 
4
    This TenDRA(r) Computer Program is subject to Copyright
34
    This TenDRA(r) Computer Program is subject to Copyright
5
    owned by the United Kingdom Secretary of State for Defence
35
    owned by the United Kingdom Secretary of State for Defence
6
    acting through the Defence Evaluation and Research Agency
36
    acting through the Defence Evaluation and Research Agency
7
    (DERA).  It is made available to Recipients with a
37
    (DERA).  It is made available to Recipients with a
8
    royalty-free licence for its use, reproduction, transfer
38
    royalty-free licence for its use, reproduction, transfer
9
    to other parties and amendment for any purpose not excluding
39
    to other parties and amendment for any purpose not excluding
10
    product development provided that any such use et cetera
40
    product development provided that any such use et cetera
11
    shall be deemed to be acceptance of the following conditions:-
41
    shall be deemed to be acceptance of the following conditions:-
12
    
42
 
13
        (1) Its Recipients shall ensure that this Notice is
43
        (1) Its Recipients shall ensure that this Notice is
14
        reproduced upon any copies or amended versions of it;
44
        reproduced upon any copies or amended versions of it;
15
    
45
 
16
        (2) Any amended version of it shall be clearly marked to
46
        (2) Any amended version of it shall be clearly marked to
17
        show both the nature of and the organisation responsible
47
        show both the nature of and the organisation responsible
18
        for the relevant amendment or amendments;
48
        for the relevant amendment or amendments;
19
    
49
 
20
        (3) Its onward transfer from a recipient to another
50
        (3) Its onward transfer from a recipient to another
21
        party shall be deemed to be that party's acceptance of
51
        party shall be deemed to be that party's acceptance of
22
        these conditions;
52
        these conditions;
23
    
53
 
24
        (4) DERA gives no warranty or assurance as to its
54
        (4) DERA gives no warranty or assurance as to its
25
        quality or suitability for any purpose and DERA accepts
55
        quality or suitability for any purpose and DERA accepts
26
        no liability whatsoever in relation to any use to which
56
        no liability whatsoever in relation to any use to which
27
        it may be put.
57
        it may be put.
28
*/
58
*/
Line 114... Line 144...
114
    RuleP			rule;
144
    RuleP			rule;
115
} RuleStackT, *RuleStackP;
145
} RuleStackT, *RuleStackP;
116
 
146
 
117
/*--------------------------------------------------------------------------*/
147
/*--------------------------------------------------------------------------*/
118
 
148
 
119
static BoolT			rule_do_inline_tail_calls     = TRUE;
149
static BoolT	rule_do_inline_tail_calls     = TRUE;
120
static BoolT			rule_do_inline_all_basics     = TRUE;
150
static BoolT	rule_do_inline_all_basics     = TRUE;
121
static BoolT			rule_do_inline_singles        = FALSE;
151
static BoolT	rule_do_inline_singles        = FALSE;
122
static BoolT			rule_do_inline_non_tail_calls = FALSE;
152
static BoolT	rule_do_inline_non_tail_calls = FALSE;
123
static BoolT			rule_do_multiple_inlining     = FALSE;
153
static BoolT	rule_do_multiple_inlining     = FALSE;
124
 
154
 
125
/*--------------------------------------------------------------------------*/
155
/*--------------------------------------------------------------------------*/
126
 
156
 
127
static void
157
static void
128
rule_inline_tail_calls_1 PROTO_N ((rule, alt, tail_group))
158
rule_inline_tail_calls_1(RuleP rule, AltP alt, RuleP tail_group)
129
			 PROTO_T (RuleP rule X
-
 
130
				  AltP  alt X
-
 
131
				  RuleP tail_group)
-
 
132
{
159
{
133
    ItemP item = alt_item_head (alt);
160
    ItemP item = alt_item_head(alt);
134
    ItemP next;
161
    ItemP next;
135
 
162
 
136
    while ((next = item_next (item)) != NIL (ItemP)) {
163
    while ((next = item_next(item)) != NIL(ItemP)) {
137
	item = next;
164
	item = next;
138
    }
165
    }
139
    if (item_is_rule (item)) {
166
    if (item_is_rule(item)) {
140
	RuleP item_rule = entry_get_rule (item_entry (item));
167
	RuleP item_rule = entry_get_rule(item_entry(item));
141
 
168
 
142
	if ((rule_get_tail_group (item_rule) == tail_group) &&
169
	if ((rule_get_tail_group(item_rule) == tail_group) &&
143
	    (types_equal_names (rule_result (rule), item_result (item)))) {
170
	    (types_equal_names(rule_result(rule), item_result(item)))) {
144
	    item_inlinable (item);
171
	    item_inlinable(item);
145
	    item_tail_call (item);
172
	    item_tail_call(item);
146
	}
173
	}
147
    }
174
    }
148
}
175
}
149
 
176
 
150
static void
177
static void
151
rule_inline_tail_calls PROTO_N ((rule))
178
rule_inline_tail_calls(RuleP rule)
152
		       PROTO_T (RuleP rule)
-
 
153
{
179
{
154
    RuleP tail_group = rule_get_tail_group (rule);
180
    RuleP tail_group = rule_get_tail_group(rule);
155
    AltP  alt;
181
    AltP  alt;
156
 
182
 
157
    if ((alt = rule_get_handler (rule)) != NIL (AltP)) {
183
    if ((alt = rule_get_handler(rule)) != NIL(AltP)) {
158
	rule_inline_tail_calls_1 (rule, alt, tail_group);
184
	rule_inline_tail_calls_1(rule, alt, tail_group);
159
    }
185
    }
160
    for (alt = rule_alt_head (rule); alt; alt = alt_next (alt)) {
186
    for (alt = rule_alt_head(rule); alt; alt = alt_next(alt)) {
161
	rule_inline_tail_calls_1 (rule, alt, tail_group);
187
	rule_inline_tail_calls_1(rule, alt, tail_group);
162
    }
188
    }
163
}
189
}
164
 
190
 
165
static void			rule_compute_call_graph
-
 
166
	PROTO_S ((RuleP, EntryListP, RuleStackP));
191
static void	rule_compute_call_graph(RuleP, EntryListP, RuleStackP);
167
 
192
 
168
static void
193
static void
169
rule_compute_call_graph_1 PROTO_N ((alt, call_list, next))
194
rule_compute_call_graph_1(AltP alt, EntryListP call_list, RuleStackP next)
170
			  PROTO_T (AltP       alt X
-
 
171
				   EntryListP call_list X
-
 
172
				   RuleStackP next)
-
 
173
{
195
{
174
    ItemP item = alt_item_head (alt);
196
    ItemP item = alt_item_head(alt);
175
    ItemP next_item;
197
    ItemP next_item;
176
 
198
 
177
    while ((next_item = item_next (item)) != NIL (ItemP)) {
199
    while ((next_item = item_next(item)) != NIL(ItemP)) {
178
	item = next_item;
200
	item = next_item;
179
    }
201
    }
180
    if (item_is_tail_call (item)) {
202
    if (item_is_tail_call(item)) {
181
	EntryP entry     = item_entry (item);
203
	EntryP entry     = item_entry(item);
182
	RuleP  item_rule = entry_get_rule (entry);
204
	RuleP  item_rule = entry_get_rule(entry);
183
 
205
 
184
	rule_compute_call_graph (item_rule, call_list, next);
206
	rule_compute_call_graph(item_rule, call_list, next);
185
    }
207
    }
186
}
208
}
187
 
209
 
188
static void
210
static void
189
rule_compute_call_graph PROTO_N ((rule, call_list, next))
211
rule_compute_call_graph(RuleP rule, EntryListP call_list, RuleStackP next)
190
			PROTO_T (RuleP      rule X
-
 
191
				 EntryListP call_list X
-
 
192
				 RuleStackP next)
-
 
193
{
212
{
194
    RuleStackT stack;
213
    RuleStackT stack;
195
    AltP       alt;
214
    AltP       alt;
196
 
215
 
197
    stack.rule = rule;
216
    stack.rule = rule;
198
    stack.next = next;
217
    stack.next = next;
199
    while (next) {
218
    while (next) {
200
	if (next->rule == rule) {
219
	if (next->rule == rule) {
201
	    entry_list_add_if_missing (call_list, rule_entry (rule));
220
	    entry_list_add_if_missing(call_list, rule_entry(rule));
202
	    return;
221
	    return;
203
	}
222
	}
204
	next = next->next;
223
	next = next->next;
205
    }
224
    }
206
    if ((alt = rule_get_handler (rule)) != NIL (AltP)) {
225
    if ((alt = rule_get_handler(rule)) != NIL(AltP)) {
207
	rule_compute_call_graph_1 (alt, call_list, &stack);
226
	rule_compute_call_graph_1(alt, call_list, &stack);
208
    }
227
    }
209
    for (alt = rule_alt_head (rule); alt; alt = alt_next (alt)) {
228
    for (alt = rule_alt_head(rule); alt; alt = alt_next(alt)) {
210
	rule_compute_call_graph_1 (alt, call_list, &stack);
229
	rule_compute_call_graph_1(alt, call_list, &stack);
211
    }
230
    }
212
}
231
}
213
 
232
 
214
static void
233
static void
215
rule_compute_all_basics_1 PROTO_N ((rule))
234
rule_compute_all_basics_1(RuleP rule)
216
			  PROTO_T (RuleP rule)
-
 
217
{
235
{
218
    if ((!rule_has_empty_alt (rule)) &&
236
    if ((!rule_has_empty_alt(rule)) &&
219
	(rule_get_handler (rule) == NIL (AltP))) {
237
	(rule_get_handler(rule) == NIL(AltP))) {
220
	AltP alt;
238
	AltP alt;
221
 
239
 
222
	for (alt = rule_alt_head (rule); alt; alt = alt_next (alt)) {
240
	for (alt = rule_alt_head(rule); alt; alt = alt_next(alt)) {
223
	    ItemP item;
241
	    ItemP item;
224
 
242
 
225
	    for (item = alt_item_head (alt); item; item = item_next (item)) {
243
	    for (item = alt_item_head(alt); item; item = item_next(item)) {
226
		if (!item_is_basic (item)) {
244
		if (!item_is_basic(item)) {
227
		    return;
245
		    return;
228
		}
246
		}
229
	    }
247
	    }
230
	}
248
	}
231
	rule_all_basics (rule);
249
	rule_all_basics(rule);
232
    }
250
    }
233
}
251
}
234
 
252
 
235
static void			rule_compute_inlining_1
253
static void	rule_compute_inlining_1(RuleP);
236
	PROTO_S ((RuleP));
-
 
237
 
254
 
238
static void
255
static void
239
rule_compute_inlining_2 PROTO_N ((alt))
256
rule_compute_inlining_2(AltP alt)
240
			PROTO_T (AltP alt)
-
 
241
{
257
{
242
    ItemP item;
258
    ItemP item;
243
 
259
 
244
    for (item = alt_item_head (alt); item; item = item_next (item)) {
260
    for (item = alt_item_head(alt); item; item = item_next(item)) {
245
	if ((item_is_rule (item)) && (!item_is_tail_call (item))) {
261
	if ((item_is_rule(item)) && (!item_is_tail_call(item))) {
246
	    EntryP entry     = item_entry (item);
262
	    EntryP entry     = item_entry(item);
247
	    RuleP  item_rule = entry_get_rule (entry);
263
	    RuleP  item_rule = entry_get_rule(entry);
248
 
264
 
249
	    if (rule_is_all_basics (item_rule)) {
265
	    if (rule_is_all_basics(item_rule)) {
250
		item_inlinable (item);
266
		item_inlinable(item);
251
	    } else if (rule_do_inline_singles &&
267
	    } else if (rule_do_inline_singles &&
252
		       rule_has_one_alt (item_rule)) {
268
		       rule_has_one_alt(item_rule)) {
253
		item_inlinable (item);
269
		item_inlinable(item);
254
	    } else if (!rule_do_multiple_inlining) {
270
	    } else if (!rule_do_multiple_inlining) {
255
		rule_inc_call_count (item_rule);
271
		rule_inc_call_count(item_rule);
256
	    }
272
	    }
257
	    if (rule_do_inline_non_tail_calls) {
273
	    if (rule_do_inline_non_tail_calls) {
258
		item_inlinable (item);
274
		item_inlinable(item);
259
	    }
275
	    }
260
	    rule_compute_inlining_1 (item_rule);
276
	    rule_compute_inlining_1(item_rule);
261
	}
277
	}
262
    }
278
    }
263
}
279
}
264
 
280
 
265
static void
281
static void
266
rule_compute_inlining_1 PROTO_N ((rule))
282
rule_compute_inlining_1(RuleP rule)
267
			PROTO_T (RuleP rule)
-
 
268
{
283
{
269
    if (!rule_is_checked_for_inlining (rule)) {
284
    if (!rule_is_checked_for_inlining(rule)) {
270
	if (!rule_is_being_inlined (rule)) {
285
	if (!rule_is_being_inlined(rule)) {
271
	    AltP alt;
286
	    AltP alt;
272
 
287
 
273
	    rule_being_inlined (rule);
288
	    rule_being_inlined(rule);
274
	    if ((alt = rule_get_handler (rule)) != NIL (AltP)) {
289
	    if ((alt = rule_get_handler(rule)) != NIL(AltP)) {
275
		rule_compute_inlining_2 (alt);
290
		rule_compute_inlining_2(alt);
276
	    }
291
	    }
277
	    for (alt = rule_alt_head (rule); alt; alt = alt_next (alt)) {
292
	    for (alt = rule_alt_head(rule); alt; alt = alt_next(alt)) {
278
		rule_compute_inlining_2 (alt);
293
		rule_compute_inlining_2(alt);
279
	    }
294
	    }
280
	    rule_checked_for_inlining (rule);
295
	    rule_checked_for_inlining(rule);
281
	}
296
	}
282
    }
297
    }
283
}
298
}
284
 
299
 
285
static void
300
static void
286
rule_compute_needed_functions_2 PROTO_N ((alt))
301
rule_compute_needed_functions_2(AltP alt)
287
				PROTO_T (AltP alt)
-
 
288
{
302
{
289
    ItemP item;
303
    ItemP item;
290
 
304
 
291
    for (item = alt_item_head (alt); item; item = item_next (item)) {
305
    for (item = alt_item_head(alt); item; item = item_next(item)) {
292
	if (item_is_rule (item)) {
306
	if (item_is_rule(item)) {
293
	    RuleP item_rule = entry_get_rule (item_entry (item));
307
	    RuleP item_rule = entry_get_rule(item_entry(item));
294
 
308
 
295
	    if ((!item_is_inlinable (item)) ||
309
	    if ((!item_is_inlinable(item)) ||
296
		(rule_get_call_count (item_rule) > 1)) {
310
		(rule_get_call_count(item_rule) > 1)) {
297
		rule_will_need_function (item_rule);
311
		rule_will_need_function(item_rule);
298
	    }
312
	    }
299
	}
313
	}
300
    }
314
    }
301
}
315
}
302
 
316
 
303
static void
317
static void
304
rule_compute_needed_functions_1 PROTO_N ((rule))
318
rule_compute_needed_functions_1(RuleP rule)
305
				PROTO_T (RuleP rule)
-
 
306
{
319
{
307
    AltP     alt;
320
    AltP     alt;
308
 
321
 
309
    if ((alt = rule_get_handler (rule)) != NIL (AltP)) {
322
    if ((alt = rule_get_handler(rule)) != NIL(AltP)) {
310
	rule_compute_needed_functions_2 (alt);
323
	rule_compute_needed_functions_2(alt);
311
    }
324
    }
312
    for (alt = rule_alt_head (rule); alt; alt = alt_next (alt)) {
325
    for (alt = rule_alt_head(rule); alt; alt = alt_next(alt)) {
313
	rule_compute_needed_functions_2 (alt);
326
	rule_compute_needed_functions_2(alt);
314
    }
327
    }
315
}
328
}
316
 
329
 
317
/*--------------------------------------------------------------------------*/
330
/*--------------------------------------------------------------------------*/
318
 
331
 
319
void
332
void
320
rule_handle_tails PROTO_N ((rule_list))
333
rule_handle_tails(RuleP rule_list)
321
		  PROTO_T (RuleP rule_list)
-
 
322
{
334
{
323
    RuleP rule;
335
    RuleP rule;
324
 
336
 
325
    for (rule = rule_list; rule; rule = rule_get_next_in_reverse_dfs (rule)) {
337
    for (rule = rule_list; rule; rule = rule_get_next_in_reverse_dfs(rule)) {
326
	rule_set_tail_group (rule, rule_list);
338
	rule_set_tail_group(rule, rule_list);
327
	rule_no_cycles (rule);
339
	rule_no_cycles(rule);
328
    }
340
    }
329
    for (rule = rule_list; rule; rule = rule_get_next_in_reverse_dfs (rule)) {
341
    for (rule = rule_list; rule; rule = rule_get_next_in_reverse_dfs(rule)) {
330
	rule_inline_tail_calls (rule);
342
	rule_inline_tail_calls(rule);
331
    }
343
    }
332
    for (rule = rule_list; rule; rule = rule_get_next_in_reverse_dfs (rule)) {
344
    for (rule = rule_list; rule; rule = rule_get_next_in_reverse_dfs(rule)) {
333
	rule_compute_call_graph (rule, rule_call_list (rule),
345
	rule_compute_call_graph(rule, rule_call_list(rule),
334
				 NIL (RuleStackP));
346
				 NIL(RuleStackP));
335
    }
347
    }
336
}
348
}
337
 
349
 
338
void
350
void
339
rule_compute_all_basics PROTO_N ((entry, gclosure))
351
rule_compute_all_basics(EntryP entry, GenericP gclosure)
340
			PROTO_T (EntryP   entry X
-
 
341
				 GenericP gclosure)
-
 
342
{
352
{
343
    UNUSED (gclosure);
353
    UNUSED(gclosure);
344
    if (rule_do_inline_all_basics && entry_is_rule (entry)) {
354
    if (rule_do_inline_all_basics && entry_is_rule(entry)) {
345
	RuleP rule = entry_get_rule (entry);
355
	RuleP rule = entry_get_rule(entry);
346
 
356
 
347
	rule_compute_all_basics_1 (rule);
357
	rule_compute_all_basics_1(rule);
348
    }
358
    }
349
}
359
}
350
 
360
 
351
void
361
void
352
rule_compute_inlining PROTO_N ((entry, gclosure))
362
rule_compute_inlining(EntryP entry, GenericP gclosure)
353
		      PROTO_T (EntryP   entry X
-
 
354
			       GenericP gclosure)
-
 
355
{
363
{
356
    UNUSED (gclosure);
364
    UNUSED(gclosure);
357
    if (entry_is_rule (entry)) {
365
    if (entry_is_rule(entry)) {
358
	RuleP rule = entry_get_rule (entry);
366
	RuleP rule = entry_get_rule(entry);
359
 
367
 
360
	rule_compute_inlining_1 (rule);
368
	rule_compute_inlining_1(rule);
361
    }
369
    }
362
}
370
}
363
 
371
 
364
void
372
void
365
rule_compute_needed_functions PROTO_N ((entry, gclosure))
373
rule_compute_needed_functions(EntryP entry, GenericP gclosure)
366
			      PROTO_T (EntryP   entry X
-
 
367
				       GenericP gclosure)
-
 
368
{
374
{
369
    UNUSED (gclosure);
375
    UNUSED(gclosure);
370
    if (entry_is_rule (entry)) {
376
    if (entry_is_rule(entry)) {
371
	RuleP rule = entry_get_rule (entry);
377
	RuleP rule = entry_get_rule(entry);
372
 
378
 
373
	rule_compute_needed_functions_1 (rule);
379
	rule_compute_needed_functions_1(rule);
374
    }
380
    }
375
}
381
}
376
 
382
 
377
void
383
void
378
rule_handle_need_functions PROTO_N ((rule_list))
384
rule_handle_need_functions(RuleP rule_list)
379
			   PROTO_T (RuleP rule_list)
-
 
380
{
385
{
381
    RuleP rule;
386
    RuleP rule;
382
 
387
 
383
    for (rule = rule_list; rule; rule = rule_get_next_in_reverse_dfs (rule)) {
388
    for (rule = rule_list; rule; rule = rule_get_next_in_reverse_dfs(rule)) {
384
	rule_will_need_function (rule);
389
	rule_will_need_function(rule);
385
    }
390
    }
386
}
391
}
387
 
392
 
388
BoolT
393
BoolT
389
rule_get_inline_tail_calls PROTO_Z ()
394
rule_get_inline_tail_calls(void)
390
{
395
{
391
    return (rule_do_inline_tail_calls);
396
    return(rule_do_inline_tail_calls);
392
}
397
}
393
 
398
 
394
void
399
void
395
rule_set_inline_tail_calls PROTO_N ((enable))
400
rule_set_inline_tail_calls(BoolT enable)
396
			   PROTO_T (BoolT enable)
-
 
397
{
401
{
398
    rule_do_inline_tail_calls = enable;
402
    rule_do_inline_tail_calls = enable;
399
}
403
}
400
 
404
 
401
void
405
void
402
rule_set_inline_all_basics PROTO_N ((enable))
406
rule_set_inline_all_basics(BoolT enable)
403
			   PROTO_T (BoolT enable)
-
 
404
{
407
{
405
    rule_do_inline_all_basics = enable;
408
    rule_do_inline_all_basics = enable;
406
}
409
}
407
 
410
 
408
void
411
void
409
rule_set_inline_singles PROTO_N ((enable))
412
rule_set_inline_singles(BoolT enable)
410
			PROTO_T (BoolT enable)
-
 
411
{
413
{
412
    rule_do_inline_singles = enable;
414
    rule_do_inline_singles = enable;
413
}
415
}
414
 
416
 
415
void
417
void
416
rule_set_inline_non_tail_calls PROTO_N ((enable))
418
rule_set_inline_non_tail_calls(BoolT enable)
417
			       PROTO_T (BoolT enable)
-
 
418
{
419
{
419
    if (enable) {
420
    if (enable) {
420
	rule_do_inline_non_tail_calls = TRUE;
421
	rule_do_inline_non_tail_calls = TRUE;
421
    } else {
422
    } else {
422
	rule_do_inline_non_tail_calls = FALSE;
423
	rule_do_inline_non_tail_calls = FALSE;
423
	rule_do_multiple_inlining     = FALSE;
424
	rule_do_multiple_inlining     = FALSE;
424
    }
425
    }
425
}
426
}
426
 
427
 
427
void
428
void
428
rule_set_multiple_inlining PROTO_N ((enable))
429
rule_set_multiple_inlining(BoolT enable)
429
			   PROTO_T (BoolT enable)
-
 
430
{
430
{
431
    if (enable) {
431
    if (enable) {
432
	rule_do_inline_non_tail_calls = TRUE;
432
	rule_do_inline_non_tail_calls = TRUE;
433
	rule_do_multiple_inlining     = TRUE;
433
	rule_do_multiple_inlining     = TRUE;
434
    } else {
434
    } else {