Fix reading Time zone rules using Julian days (#17672)
[platform/upstream/coreclr.git] / src / jit / valuenumfuncs.h
1 // Licensed to the .NET Foundation under one or more agreements.
2 // The .NET Foundation licenses this file to you under the MIT license.
3 // See the LICENSE file in the project root for more information.
4
5 // Defines the functions understood by the value-numbering system.
6 // ValueNumFuncDef(<name of function>, <arity (1-4)>, <is-commutative (for arity = 2)>, <non-null (for gc functions)>,
7 // <is-shared-static>)
8
9 // clang-format off
10 ValueNumFuncDef(MapStore, 3, false, false, false)
11 ValueNumFuncDef(MapSelect, 2, false, false, false)
12
13 ValueNumFuncDef(FieldSeq, 2, false, false, false)   // Sequence (VN of null == empty) of (VN's of) field handles.
14 ValueNumFuncDef(NotAField, 0, false, false, false)  // Value number function for FieldSeqStore::NotAField.
15 ValueNumFuncDef(ZeroMap, 0, false, false, false)    // The "ZeroMap": indexing at any index yields "zero of the desired type".
16
17 ValueNumFuncDef(PtrToLoc, 2, false, false, false)           // Pointer (byref) to a local variable.  Args: VN's of: 0: var num, 1: FieldSeq.
18 ValueNumFuncDef(PtrToArrElem, 4, false, false, false)       // Pointer (byref) to an array element.  Args: 0: array elem type eq class var_types value, VN's of: 1: array, 2: index, 3: FieldSeq.
19 ValueNumFuncDef(PtrToStatic, 1, false, false, false)        // Pointer (byref) to a static variable (or possibly a field thereof, if the static variable is a struct).  Args: 0: FieldSeq, first element
20                                                      // of which is the static var.
21 ValueNumFuncDef(Phi, 2, false, false, false)        // A phi function.  Only occurs as arg of PhiDef or PhiMemoryDef.  Arguments are SSA numbers of var being defined.
22 ValueNumFuncDef(PhiDef, 3, false, false, false)     // Args: 0: local var # (or -1 for memory), 1: SSA #, 2: VN of definition.
23 // Wouldn't need this if I'd made memory a regular local variable...
24 ValueNumFuncDef(PhiMemoryDef, 2, false, false, false) // Args: 0: VN for basic block pointer, 1: VN of definition
25 ValueNumFuncDef(InitVal, 1, false, false, false)    // An input arg, or init val of a local Args: 0: a constant VN.
26
27
28 ValueNumFuncDef(Cast, 2, false, false, false)               // VNF_Cast: Cast Operation changes the representations size and unsigned-ness.
29                                                      //           Args: 0: Source for the cast operation.
30                                                      //                 1: Constant integer representing the operation .
31                                                      //                    Use VNForCastOper() to construct.
32
33 ValueNumFuncDef(CastClass, 2, false, false, false)          // Args: 0: Handle of class being cast to, 1: object being cast.
34 ValueNumFuncDef(IsInstanceOf, 2, false, false, false)       // Args: 0: Handle of class being queried, 1: object being queried.
35 ValueNumFuncDef(ReadyToRunCastClass, 2, false, false, false)          // Args: 0: Helper stub address, 1: object being cast.
36 ValueNumFuncDef(ReadyToRunIsInstanceOf, 2, false, false, false)       // Args: 0: Helper stub address, 1: object being queried.
37 ValueNumFuncDef(TypeHandleToRuntimeType, 1, false, false, false)      // Args: 0: TypeHandle to translate
38
39 ValueNumFuncDef(LdElemA, 3, false, false, false)            // Args: 0: array value; 1: index value; 2: type handle of element.
40
41 ValueNumFuncDef(ByrefExposedLoad, 3, false, false, false)      // Args: 0: type handle/id, 1: pointer value; 2: ByrefExposed heap value
42
43 ValueNumFuncDef(GetRefanyVal, 2, false, false, false)       // Args: 0: type handle; 1: typedref value.  Returns the value (asserting that the type is right).
44
45 ValueNumFuncDef(GetClassFromMethodParam, 1, false, true, false)       // Args: 0: method generic argument.
46 ValueNumFuncDef(GetSyncFromClassHandle, 1, false, true, false)        // Args: 0: class handle.
47 ValueNumFuncDef(LoopCloneChoiceAddr, 0, false, true, false)
48
49 // How we represent values of expressions with exceptional side effects:
50 ValueNumFuncDef(ValWithExc, 2, false, false, false)         // Args: 0: value number from normal execution; 1: VN for set of possible exceptions.
51
52 ValueNumFuncDef(ExcSetCons, 2, false, false, false)         // Args: 0: exception; 1: exception set (including EmptyExcSet).  Invariant: "car"s are always in ascending order.
53
54 // Various exception values.
55 ValueNumFuncDef(NullPtrExc, 1, false, false, false)         // Null pointer exception.
56 ValueNumFuncDef(ArithmeticExc, 0, false, false, false)      // E.g., for signed its, MinInt / -1.
57 ValueNumFuncDef(OverflowExc, 0, false, false, false)        // Integer overflow.
58 ValueNumFuncDef(ConvOverflowExc, 2, false, false, false)    // Integer overflow produced by converion.  Args: 0: input value; 1: var_types of target type
59                                                      // (shifted left one bit; low bit encode whether source is unsigned.) 
60 ValueNumFuncDef(DivideByZeroExc, 0, false, false, false)    // Division by zero.
61 ValueNumFuncDef(IndexOutOfRangeExc, 2, false, false, false) // Args: 0: array length; 1: index.  The exception raised if this bounds check fails.
62 ValueNumFuncDef(InvalidCastExc, 2, false, false, false)     // Args: 0: ref value being cast; 1: handle of type being cast to.  Represents the exception thrown if the cast fails.
63 ValueNumFuncDef(NewArrOverflowExc, 1, false, false, false)  // Raises Integer overflow when Arg 0 is negative
64 ValueNumFuncDef(HelperMultipleExc, 0, false, false, false)  // Represents one or more different exceptions that may be thrown by a JitHelper
65
66 ValueNumFuncDef(Lng2Dbl, 1, false, false, false)
67 ValueNumFuncDef(ULng2Dbl, 1, false, false, false)
68 ValueNumFuncDef(Dbl2Int, 1, false, false, false)
69 ValueNumFuncDef(Dbl2UInt, 1, false, false, false)
70 ValueNumFuncDef(Dbl2Lng, 1, false, false, false)
71 ValueNumFuncDef(Dbl2ULng, 1, false, false, false)
72 ValueNumFuncDef(FltRound, 1, false, false, false)
73 ValueNumFuncDef(DblRound, 1, false, false, false)
74
75 ValueNumFuncDef(Sin, 1, false, false, false)
76 ValueNumFuncDef(Cos, 1, false, false, false)
77 ValueNumFuncDef(Cbrt, 1, false, false, false)
78 ValueNumFuncDef(Sqrt, 1, false, false, false)
79 ValueNumFuncDef(Abs, 1, false, false, false)
80 ValueNumFuncDef(RoundDouble, 1, false, false, false)
81 ValueNumFuncDef(RoundFloat, 1, false, false, false)
82 ValueNumFuncDef(RoundInt, 1, false, false, false)
83 ValueNumFuncDef(Cosh, 1, false, false, false)
84 ValueNumFuncDef(Sinh, 1, false, false, false)
85 ValueNumFuncDef(Tan, 1, false, false, false)
86 ValueNumFuncDef(Tanh, 1, false, false, false)
87 ValueNumFuncDef(Asin, 1, false, false, false)
88 ValueNumFuncDef(Asinh, 1, false, false, false)
89 ValueNumFuncDef(Acos, 1, false, false, false)
90 ValueNumFuncDef(Acosh, 1, false, false, false)
91 ValueNumFuncDef(Atan, 1, false, false, false)
92 ValueNumFuncDef(Atan2, 2, false, false, false)
93 ValueNumFuncDef(Atanh, 1, false, false, false)
94 ValueNumFuncDef(Log10, 1, false, false, false)
95 ValueNumFuncDef(Pow, 2, false, false, false)
96 ValueNumFuncDef(Exp, 1, false, false, false)
97 ValueNumFuncDef(Ceiling, 1, false, false, false)
98 ValueNumFuncDef(Floor, 1, false, false, false)
99
100 ValueNumFuncDef(ManagedThreadId, 0, false, false, false)
101
102 ValueNumFuncDef(ObjGetType, 1, false, false, false)
103 ValueNumFuncDef(GetgenericsGcstaticBase, 1, false, true, true)
104 ValueNumFuncDef(GetgenericsNongcstaticBase, 1, false, true, true)
105 ValueNumFuncDef(GetsharedGcstaticBase, 2, false, true, true)
106 ValueNumFuncDef(GetsharedNongcstaticBase, 2, false, true, true)
107 ValueNumFuncDef(GetsharedGcstaticBaseNoctor, 1, false, true, true)
108 ValueNumFuncDef(GetsharedNongcstaticBaseNoctor, 1, false, true, true)
109 ValueNumFuncDef(ReadyToRunStaticBase, 1, false, true, true)
110 ValueNumFuncDef(ReadyToRunGenericStaticBase, 2, false, true, true)
111 ValueNumFuncDef(GetsharedGcstaticBaseDynamicclass, 2, false, true, true)
112 ValueNumFuncDef(GetsharedNongcstaticBaseDynamicclass, 2, false, true, true)
113 ValueNumFuncDef(GetgenericsGcthreadstaticBase, 1, false, true, true)
114 ValueNumFuncDef(GetgenericsNongcthreadstaticBase, 1, false, true, true)
115 ValueNumFuncDef(GetsharedGcthreadstaticBase, 2, false, true, true)
116 ValueNumFuncDef(GetsharedNongcthreadstaticBase, 2, false, true, true)
117 ValueNumFuncDef(GetsharedGcthreadstaticBaseNoctor, 2, false, true, true)
118 ValueNumFuncDef(GetsharedNongcthreadstaticBaseNoctor, 2, false, true, true)
119 ValueNumFuncDef(GetsharedGcthreadstaticBaseDynamicclass, 2, false, true, true)
120 ValueNumFuncDef(GetsharedNongcthreadstaticBaseDynamicclass, 2, false, true, true)
121
122 ValueNumFuncDef(ClassinitSharedDynamicclass, 2, false, false, false)
123 ValueNumFuncDef(RuntimeHandleMethod, 2, false, true, false)
124 ValueNumFuncDef(RuntimeHandleClass, 2, false, true, false)
125
126 ValueNumFuncDef(GetStaticAddrContext, 1, false, true, false)
127 ValueNumFuncDef(GetStaticAddrTLS, 1, false, true, false)
128
129 ValueNumFuncDef(JitNew, 2, false, true, false)
130 ValueNumFuncDef(JitNewArr, 3, false, true, false)
131 ValueNumFuncDef(JitReadyToRunNew, 2, false, true, false)
132 ValueNumFuncDef(JitReadyToRunNewArr, 3, false, true, false)
133 ValueNumFuncDef(Box, 3, false, false, false)
134 ValueNumFuncDef(BoxNullable, 3, false, false, false)
135
136 ValueNumFuncDef(LT_UN, 2, false, false, false)
137 ValueNumFuncDef(LE_UN, 2, false, false, false)
138 ValueNumFuncDef(GE_UN, 2, false, false, false)
139 ValueNumFuncDef(GT_UN, 2, false, false, false)
140 ValueNumFuncDef(ADD_UN, 2, true, false, false)
141 ValueNumFuncDef(SUB_UN, 2, false, false, false)
142 ValueNumFuncDef(MUL_UN, 2, true, false, false)
143
144 ValueNumFuncDef(StrCns, 2, false, true, false)
145
146 ValueNumFuncDef(Unbox, 2, false, true, false)
147 // clang-format on
148
149 #undef ValueNumFuncDef