summaryrefslogtreecommitdiff
path: root/src/jit/ssaconfig.h
blob: 6e81ad9fd679069576ec1e370bcdc74e61fcd5f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

// ==++==
//

//

//
// ==--==

/*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XX                                                                           XX
XX                                  SSA                                      XX
XX                                                                           XX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
*/

#pragma once

#ifdef DEBUG
#define DBG_SSA_JITDUMP(...)                                                                                           \
    if (JitTls::GetCompiler()->verboseSsa)                                                                             \
    JitDump(__VA_ARGS__)
#else
#define DBG_SSA_JITDUMP(...)
#endif

// DBG_SSA_JITDUMP prints only if DEBUG, DEBUG_SSA, and tlsCompiler->verbose are all set.

namespace SsaConfig
{
// FIRST ssa num is given to the first definition of a variable which can either be:
// 1. A regular definition in the program.
// 2. Or initialization by compInitMem.
static const int FIRST_SSA_NUM = 2;

// UNINIT ssa num is given to variables whose definitions were never encountered:
// 1. Neither by SsaBuilder
// 2. Nor were they initialized using compInitMem.
static const int UNINIT_SSA_NUM = 1;

// Sentinel value to indicate variable not touched by SSA.
static const int RESERVED_SSA_NUM = 0;

} // end of namespace SsaConfig