xref: /illumos-gate/usr/src/tools/smatch/src/expand.h (revision 1f5207b7)
1*1f5207b7SJohn Levon #ifndef EXPAND_H
2*1f5207b7SJohn Levon #define EXPAND_H
3*1f5207b7SJohn Levon /*
4*1f5207b7SJohn Levon  * sparse/expand.h
5*1f5207b7SJohn Levon  *
6*1f5207b7SJohn Levon  * Copyright (C) 2003 Transmeta Corp.
7*1f5207b7SJohn Levon  *               2003 Linus Torvalds
8*1f5207b7SJohn Levon  *
9*1f5207b7SJohn Levon  * Permission is hereby granted, free of charge, to any person obtaining a copy
10*1f5207b7SJohn Levon  * of this software and associated documentation files (the "Software"), to deal
11*1f5207b7SJohn Levon  * in the Software without restriction, including without limitation the rights
12*1f5207b7SJohn Levon  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13*1f5207b7SJohn Levon  * copies of the Software, and to permit persons to whom the Software is
14*1f5207b7SJohn Levon  * furnished to do so, subject to the following conditions:
15*1f5207b7SJohn Levon  *
16*1f5207b7SJohn Levon  * The above copyright notice and this permission notice shall be included in
17*1f5207b7SJohn Levon  * all copies or substantial portions of the Software.
18*1f5207b7SJohn Levon  *
19*1f5207b7SJohn Levon  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20*1f5207b7SJohn Levon  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21*1f5207b7SJohn Levon  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22*1f5207b7SJohn Levon  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23*1f5207b7SJohn Levon  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24*1f5207b7SJohn Levon  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25*1f5207b7SJohn Levon  * THE SOFTWARE.
26*1f5207b7SJohn Levon  */
27*1f5207b7SJohn Levon 
28*1f5207b7SJohn Levon /* Random cost numbers */
29*1f5207b7SJohn Levon #define SIDE_EFFECTS 10000	/* The expression has side effects */
30*1f5207b7SJohn Levon #define UNSAFE 100		/* The expression may be "infinitely costly" due to exceptions */
31*1f5207b7SJohn Levon #define SELECT_COST 20		/* Cut-off for turning a conditional into a select */
32*1f5207b7SJohn Levon #define BRANCH_COST 10		/* Cost of a conditional branch */
33*1f5207b7SJohn Levon 
34*1f5207b7SJohn Levon #endif
35