tree-core.h 62 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192
  1. /* Core data structures for the 'tree' type.
  2. Copyright (C) 1989-2019 Free Software Foundation, Inc.
  3. This file is part of GCC.
  4. GCC is free software; you can redistribute it and/or modify it under
  5. the terms of the GNU General Public License as published by the Free
  6. Software Foundation; either version 3, or (at your option) any later
  7. version.
  8. GCC is distributed in the hope that it will be useful, but WITHOUT ANY
  9. WARRANTY; without even the implied warranty of MERCHANTABILITY or
  10. FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  11. for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with GCC; see the file COPYING3. If not see
  14. <http://www.gnu.org/licenses/>. */
  15. #ifndef GCC_TREE_CORE_H
  16. #define GCC_TREE_CORE_H
  17. #include "symtab.h"
  18. /* This file contains all the data structures that define the 'tree' type.
  19. There are no accessor macros nor functions in this file. Only the
  20. basic data structures, extern declarations and type definitions. */
  21. /*---------------------------------------------------------------------------
  22. Forward type declarations. Mostly to avoid including unnecessary headers
  23. ---------------------------------------------------------------------------*/
  24. struct function;
  25. struct real_value;
  26. struct fixed_value;
  27. struct ptr_info_def;
  28. struct range_info_def;
  29. struct die_struct;
  30. /*---------------------------------------------------------------------------
  31. #defined constants
  32. ---------------------------------------------------------------------------*/
  33. /* Nonzero if this is a call to a function whose return value depends
  34. solely on its arguments, has no side effects, and does not read
  35. global memory. This corresponds to TREE_READONLY for function
  36. decls. */
  37. #define ECF_CONST (1 << 0)
  38. /* Nonzero if this is a call to "pure" function (like const function,
  39. but may read memory. This corresponds to DECL_PURE_P for function
  40. decls. */
  41. #define ECF_PURE (1 << 1)
  42. /* Nonzero if this is ECF_CONST or ECF_PURE but cannot be proven to no
  43. infinite loop. This corresponds to DECL_LOOPING_CONST_OR_PURE_P
  44. for function decls.*/
  45. #define ECF_LOOPING_CONST_OR_PURE (1 << 2)
  46. /* Nonzero if this call will never return. */
  47. #define ECF_NORETURN (1 << 3)
  48. /* Nonzero if this is a call to malloc or a related function. */
  49. #define ECF_MALLOC (1 << 4)
  50. /* Nonzero if it is plausible that this is a call to alloca. */
  51. #define ECF_MAY_BE_ALLOCA (1 << 5)
  52. /* Nonzero if this is a call to a function that won't throw an exception. */
  53. #define ECF_NOTHROW (1 << 6)
  54. /* Nonzero if this is a call to setjmp or a related function. */
  55. #define ECF_RETURNS_TWICE (1 << 7)
  56. /* Nonzero if this call replaces the current stack frame. */
  57. #define ECF_SIBCALL (1 << 8)
  58. /* Function does not read or write memory (but may have side effects, so
  59. it does not necessarily fit ECF_CONST). */
  60. #define ECF_NOVOPS (1 << 9)
  61. /* The function does not lead to calls within current function unit. */
  62. #define ECF_LEAF (1 << 10)
  63. /* Nonzero if this call returns its first argument. */
  64. #define ECF_RET1 (1 << 11)
  65. /* Nonzero if this call does not affect transactions. */
  66. #define ECF_TM_PURE (1 << 12)
  67. /* Nonzero if this call is into the transaction runtime library. */
  68. #define ECF_TM_BUILTIN (1 << 13)
  69. /* Nonzero if this is an indirect call by descriptor. */
  70. #define ECF_BY_DESCRIPTOR (1 << 14)
  71. /* Nonzero if this is a cold function. */
  72. #define ECF_COLD (1 << 15)
  73. /* Call argument flags. */
  74. /* Nonzero if the argument is not dereferenced recursively, thus only
  75. directly reachable memory is read or written. */
  76. #define EAF_DIRECT (1 << 0)
  77. /* Nonzero if memory reached by the argument is not clobbered. */
  78. #define EAF_NOCLOBBER (1 << 1)
  79. /* Nonzero if the argument does not escape. */
  80. #define EAF_NOESCAPE (1 << 2)
  81. /* Nonzero if the argument is not used by the function. */
  82. #define EAF_UNUSED (1 << 3)
  83. /* Call return flags. */
  84. /* Mask for the argument number that is returned. Lower two bits of
  85. the return flags, encodes argument slots zero to three. */
  86. #define ERF_RETURN_ARG_MASK (3)
  87. /* Nonzero if the return value is equal to the argument number
  88. flags & ERF_RETURN_ARG_MASK. */
  89. #define ERF_RETURNS_ARG (1 << 2)
  90. /* Nonzero if the return value does not alias with anything. Functions
  91. with the malloc attribute have this set on their return value. */
  92. #define ERF_NOALIAS (1 << 3)
  93. /*---------------------------------------------------------------------------
  94. Enumerations
  95. ---------------------------------------------------------------------------*/
  96. /* Codes of tree nodes. */
  97. #define DEFTREECODE(SYM, STRING, TYPE, NARGS) SYM,
  98. #define END_OF_BASE_TREE_CODES LAST_AND_UNUSED_TREE_CODE,
  99. enum tree_code {
  100. #include "all-tree.def"
  101. MAX_TREE_CODES
  102. };
  103. #undef DEFTREECODE
  104. #undef END_OF_BASE_TREE_CODES
  105. /* Number of language-independent tree codes. */
  106. #define NUM_TREE_CODES \
  107. ((int) LAST_AND_UNUSED_TREE_CODE)
  108. #define CODE_CONTAINS_STRUCT(CODE, STRUCT) \
  109. (tree_contains_struct[(CODE)][(STRUCT)])
  110. /* Classify which part of the compiler has defined a given builtin function.
  111. Note that we assume below that this is no more than two bits. */
  112. enum built_in_class {
  113. NOT_BUILT_IN = 0,
  114. BUILT_IN_FRONTEND,
  115. BUILT_IN_MD,
  116. BUILT_IN_NORMAL
  117. };
  118. /* Last marker used for LTO stremaing of built_in_class. We cannot add it
  119. to the enum since we need the enumb to fit in 2 bits. */
  120. #define BUILT_IN_LAST (BUILT_IN_NORMAL + 1)
  121. /* Codes that identify the various built in functions
  122. so that expand_call can identify them quickly. */
  123. #define DEF_BUILTIN(ENUM, N, C, T, LT, B, F, NA, AT, IM, COND) ENUM,
  124. enum built_in_function {
  125. #include "builtins.def"
  126. /* Complex division routines in libgcc. These are done via builtins
  127. because emit_library_call_value can't handle complex values. */
  128. BUILT_IN_COMPLEX_MUL_MIN,
  129. BUILT_IN_COMPLEX_MUL_MAX
  130. = BUILT_IN_COMPLEX_MUL_MIN
  131. + MAX_MODE_COMPLEX_FLOAT
  132. - MIN_MODE_COMPLEX_FLOAT,
  133. BUILT_IN_COMPLEX_DIV_MIN,
  134. BUILT_IN_COMPLEX_DIV_MAX
  135. = BUILT_IN_COMPLEX_DIV_MIN
  136. + MAX_MODE_COMPLEX_FLOAT
  137. - MIN_MODE_COMPLEX_FLOAT,
  138. /* Upper bound on non-language-specific builtins. */
  139. END_BUILTINS
  140. };
  141. /* Internal functions. */
  142. enum internal_fn {
  143. #define DEF_INTERNAL_FN(CODE, FLAGS, FNSPEC) IFN_##CODE,
  144. #include "internal-fn.def"
  145. IFN_LAST
  146. };
  147. /* An enum that combines target-independent built-in functions with
  148. internal functions, so that they can be treated in a similar way.
  149. The numbers for built-in functions are the same as for the
  150. built_in_function enum. The numbers for internal functions
  151. start at END_BUITLINS. */
  152. enum combined_fn {
  153. #define DEF_BUILTIN(ENUM, N, C, T, LT, B, F, NA, AT, IM, COND) \
  154. CFN_##ENUM = int (ENUM),
  155. #include "builtins.def"
  156. #define DEF_INTERNAL_FN(CODE, FLAGS, FNSPEC) \
  157. CFN_##CODE = int (END_BUILTINS) + int (IFN_##CODE),
  158. #include "internal-fn.def"
  159. CFN_LAST
  160. };
  161. /* Tree code classes. Each tree_code has an associated code class
  162. represented by a TREE_CODE_CLASS. */
  163. enum tree_code_class {
  164. tcc_exceptional, /* An exceptional code (fits no category). */
  165. tcc_constant, /* A constant. */
  166. /* Order of tcc_type and tcc_declaration is important. */
  167. tcc_type, /* A type object code. */
  168. tcc_declaration, /* A declaration (also serving as variable refs). */
  169. tcc_reference, /* A reference to storage. */
  170. tcc_comparison, /* A comparison expression. */
  171. tcc_unary, /* A unary arithmetic expression. */
  172. tcc_binary, /* A binary arithmetic expression. */
  173. tcc_statement, /* A statement expression, which have side effects
  174. but usually no interesting value. */
  175. tcc_vl_exp, /* A function call or other expression with a
  176. variable-length operand vector. */
  177. tcc_expression /* Any other expression. */
  178. };
  179. /* OMP_CLAUSE codes. Do not reorder, as this is used to index into
  180. the tables omp_clause_num_ops and omp_clause_code_name. */
  181. enum omp_clause_code {
  182. /* Clause zero is special-cased inside the parser
  183. (c_parser_omp_variable_list). */
  184. OMP_CLAUSE_ERROR = 0,
  185. /* OpenACC/OpenMP clause: private (variable_list). */
  186. OMP_CLAUSE_PRIVATE,
  187. /* OpenMP clause: shared (variable_list). */
  188. OMP_CLAUSE_SHARED,
  189. /* OpenACC/OpenMP clause: firstprivate (variable_list). */
  190. OMP_CLAUSE_FIRSTPRIVATE,
  191. /* OpenMP clause: lastprivate (variable_list). */
  192. OMP_CLAUSE_LASTPRIVATE,
  193. /* OpenACC/OpenMP clause: reduction (operator:variable_list).
  194. OMP_CLAUSE_REDUCTION_CODE: The tree_code of the operator.
  195. Operand 1: OMP_CLAUSE_REDUCTION_INIT: Stmt-list to initialize the var.
  196. Operand 2: OMP_CLAUSE_REDUCTION_MERGE: Stmt-list to merge private var
  197. into the shared one.
  198. Operand 3: OMP_CLAUSE_REDUCTION_PLACEHOLDER: A dummy VAR_DECL
  199. placeholder used in OMP_CLAUSE_REDUCTION_{INIT,MERGE}.
  200. Operand 4: OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER: Another dummy
  201. VAR_DECL placeholder, used like the above for C/C++ array
  202. reductions. */
  203. OMP_CLAUSE_REDUCTION,
  204. /* OpenMP clause: task_reduction (operator:variable_list). */
  205. OMP_CLAUSE_TASK_REDUCTION,
  206. /* OpenMP clause: in_reduction (operator:variable_list). */
  207. OMP_CLAUSE_IN_REDUCTION,
  208. /* OpenMP clause: copyin (variable_list). */
  209. OMP_CLAUSE_COPYIN,
  210. /* OpenMP clause: copyprivate (variable_list). */
  211. OMP_CLAUSE_COPYPRIVATE,
  212. /* OpenMP clause: linear (variable-list[:linear-step]). */
  213. OMP_CLAUSE_LINEAR,
  214. /* OpenMP clause: aligned (variable-list[:alignment]). */
  215. OMP_CLAUSE_ALIGNED,
  216. /* OpenMP clause: depend ({in,out,inout}:variable-list). */
  217. OMP_CLAUSE_DEPEND,
  218. /* OpenMP clause: nontemporal (variable-list). */
  219. OMP_CLAUSE_NONTEMPORAL,
  220. /* OpenMP clause: uniform (argument-list). */
  221. OMP_CLAUSE_UNIFORM,
  222. /* OpenMP clause: to (extended-list).
  223. Only when it appears in declare target. */
  224. OMP_CLAUSE_TO_DECLARE,
  225. /* OpenMP clause: link (variable-list). */
  226. OMP_CLAUSE_LINK,
  227. /* OpenMP clause: from (variable-list). */
  228. OMP_CLAUSE_FROM,
  229. /* OpenMP clause: to (variable-list). */
  230. OMP_CLAUSE_TO,
  231. /* OpenACC clauses: {copy, copyin, copyout, create, delete, deviceptr,
  232. device, host (self), present, present_or_copy (pcopy), present_or_copyin
  233. (pcopyin), present_or_copyout (pcopyout), present_or_create (pcreate)}
  234. (variable-list).
  235. OpenMP clause: map ({alloc:,to:,from:,tofrom:,}variable-list). */
  236. OMP_CLAUSE_MAP,
  237. /* OpenACC clause: use_device (variable_list).
  238. OpenMP clause: use_device_ptr (variable-list). */
  239. OMP_CLAUSE_USE_DEVICE_PTR,
  240. /* OpenMP clause: is_device_ptr (variable-list). */
  241. OMP_CLAUSE_IS_DEVICE_PTR,
  242. /* Internal structure to hold OpenACC cache directive's variable-list.
  243. #pragma acc cache (variable-list). */
  244. OMP_CLAUSE__CACHE_,
  245. /* OpenACC clause: gang [(gang-argument-list)].
  246. Where
  247. gang-argument-list: [gang-argument-list, ] gang-argument
  248. gang-argument: [num:] integer-expression
  249. | static: size-expression
  250. size-expression: * | integer-expression. */
  251. OMP_CLAUSE_GANG,
  252. /* OpenACC clause: async [(integer-expression)]. */
  253. OMP_CLAUSE_ASYNC,
  254. /* OpenACC clause: wait [(integer-expression-list)]. */
  255. OMP_CLAUSE_WAIT,
  256. /* OpenACC clause: auto. */
  257. OMP_CLAUSE_AUTO,
  258. /* OpenACC clause: seq. */
  259. OMP_CLAUSE_SEQ,
  260. /* Internal clause: temporary for combined loops expansion. */
  261. OMP_CLAUSE__LOOPTEMP_,
  262. /* Internal clause: temporary for task reductions. */
  263. OMP_CLAUSE__REDUCTEMP_,
  264. /* OpenACC/OpenMP clause: if (scalar-expression). */
  265. OMP_CLAUSE_IF,
  266. /* OpenMP clause: num_threads (integer-expression). */
  267. OMP_CLAUSE_NUM_THREADS,
  268. /* OpenMP clause: schedule. */
  269. OMP_CLAUSE_SCHEDULE,
  270. /* OpenMP clause: nowait. */
  271. OMP_CLAUSE_NOWAIT,
  272. /* OpenMP clause: ordered [(constant-integer-expression)]. */
  273. OMP_CLAUSE_ORDERED,
  274. /* OpenACC/OpenMP clause: default. */
  275. OMP_CLAUSE_DEFAULT,
  276. /* OpenACC/OpenMP clause: collapse (constant-integer-expression). */
  277. OMP_CLAUSE_COLLAPSE,
  278. /* OpenMP clause: untied. */
  279. OMP_CLAUSE_UNTIED,
  280. /* OpenMP clause: final (scalar-expression). */
  281. OMP_CLAUSE_FINAL,
  282. /* OpenMP clause: mergeable. */
  283. OMP_CLAUSE_MERGEABLE,
  284. /* OpenMP clause: device (integer-expression). */
  285. OMP_CLAUSE_DEVICE,
  286. /* OpenMP clause: dist_schedule (static[:chunk-size]). */
  287. OMP_CLAUSE_DIST_SCHEDULE,
  288. /* OpenMP clause: inbranch. */
  289. OMP_CLAUSE_INBRANCH,
  290. /* OpenMP clause: notinbranch. */
  291. OMP_CLAUSE_NOTINBRANCH,
  292. /* OpenMP clause: num_teams(integer-expression). */
  293. OMP_CLAUSE_NUM_TEAMS,
  294. /* OpenMP clause: thread_limit(integer-expression). */
  295. OMP_CLAUSE_THREAD_LIMIT,
  296. /* OpenMP clause: proc_bind ({master,close,spread}). */
  297. OMP_CLAUSE_PROC_BIND,
  298. /* OpenMP clause: safelen (constant-integer-expression). */
  299. OMP_CLAUSE_SAFELEN,
  300. /* OpenMP clause: simdlen (constant-integer-expression). */
  301. OMP_CLAUSE_SIMDLEN,
  302. /* OpenMP clause: for. */
  303. OMP_CLAUSE_FOR,
  304. /* OpenMP clause: parallel. */
  305. OMP_CLAUSE_PARALLEL,
  306. /* OpenMP clause: sections. */
  307. OMP_CLAUSE_SECTIONS,
  308. /* OpenMP clause: taskgroup. */
  309. OMP_CLAUSE_TASKGROUP,
  310. /* OpenMP clause: priority (integer-expression). */
  311. OMP_CLAUSE_PRIORITY,
  312. /* OpenMP clause: grainsize (integer-expression). */
  313. OMP_CLAUSE_GRAINSIZE,
  314. /* OpenMP clause: num_tasks (integer-expression). */
  315. OMP_CLAUSE_NUM_TASKS,
  316. /* OpenMP clause: nogroup. */
  317. OMP_CLAUSE_NOGROUP,
  318. /* OpenMP clause: threads. */
  319. OMP_CLAUSE_THREADS,
  320. /* OpenMP clause: simd. */
  321. OMP_CLAUSE_SIMD,
  322. /* OpenMP clause: hint (integer-expression). */
  323. OMP_CLAUSE_HINT,
  324. /* OpenMP clause: defaultmap (tofrom: scalar). */
  325. OMP_CLAUSE_DEFAULTMAP,
  326. /* Internally used only clause, holding SIMD uid. */
  327. OMP_CLAUSE__SIMDUID_,
  328. /* Internally used only clause, flag whether this is SIMT simd
  329. loop or not. */
  330. OMP_CLAUSE__SIMT_,
  331. /* OpenACC clause: independent. */
  332. OMP_CLAUSE_INDEPENDENT,
  333. /* OpenACC clause: worker [( [num:] integer-expression)]. */
  334. OMP_CLAUSE_WORKER,
  335. /* OpenACC clause: vector [( [length:] integer-expression)]. */
  336. OMP_CLAUSE_VECTOR,
  337. /* OpenACC clause: num_gangs (integer-expression). */
  338. OMP_CLAUSE_NUM_GANGS,
  339. /* OpenACC clause: num_workers (integer-expression). */
  340. OMP_CLAUSE_NUM_WORKERS,
  341. /* OpenACC clause: vector_length (integer-expression). */
  342. OMP_CLAUSE_VECTOR_LENGTH,
  343. /* OpenACC clause: tile ( size-expr-list ). */
  344. OMP_CLAUSE_TILE,
  345. /* OpenMP internal-only clause to specify grid dimensions of a gridified
  346. kernel. */
  347. OMP_CLAUSE__GRIDDIM_,
  348. /* OpenACC clause: if_present. */
  349. OMP_CLAUSE_IF_PRESENT,
  350. /* OpenACC clause: finalize. */
  351. OMP_CLAUSE_FINALIZE
  352. };
  353. #undef DEFTREESTRUCT
  354. #define DEFTREESTRUCT(ENUM, NAME) ENUM,
  355. enum tree_node_structure_enum {
  356. #include "treestruct.def"
  357. LAST_TS_ENUM
  358. };
  359. #undef DEFTREESTRUCT
  360. enum omp_clause_schedule_kind {
  361. OMP_CLAUSE_SCHEDULE_STATIC,
  362. OMP_CLAUSE_SCHEDULE_DYNAMIC,
  363. OMP_CLAUSE_SCHEDULE_GUIDED,
  364. OMP_CLAUSE_SCHEDULE_AUTO,
  365. OMP_CLAUSE_SCHEDULE_RUNTIME,
  366. OMP_CLAUSE_SCHEDULE_MASK = (1 << 3) - 1,
  367. OMP_CLAUSE_SCHEDULE_MONOTONIC = (1 << 3),
  368. OMP_CLAUSE_SCHEDULE_NONMONOTONIC = (1 << 4),
  369. OMP_CLAUSE_SCHEDULE_LAST = 2 * OMP_CLAUSE_SCHEDULE_NONMONOTONIC - 1
  370. };
  371. enum omp_clause_default_kind {
  372. OMP_CLAUSE_DEFAULT_UNSPECIFIED,
  373. OMP_CLAUSE_DEFAULT_SHARED,
  374. OMP_CLAUSE_DEFAULT_NONE,
  375. OMP_CLAUSE_DEFAULT_PRIVATE,
  376. OMP_CLAUSE_DEFAULT_FIRSTPRIVATE,
  377. OMP_CLAUSE_DEFAULT_PRESENT,
  378. OMP_CLAUSE_DEFAULT_LAST
  379. };
  380. enum omp_clause_defaultmap_kind {
  381. OMP_CLAUSE_DEFAULTMAP_CATEGORY_UNSPECIFIED,
  382. OMP_CLAUSE_DEFAULTMAP_CATEGORY_SCALAR,
  383. OMP_CLAUSE_DEFAULTMAP_CATEGORY_AGGREGATE,
  384. OMP_CLAUSE_DEFAULTMAP_CATEGORY_ALLOCATABLE,
  385. OMP_CLAUSE_DEFAULTMAP_CATEGORY_POINTER,
  386. OMP_CLAUSE_DEFAULTMAP_CATEGORY_MASK = 7,
  387. OMP_CLAUSE_DEFAULTMAP_ALLOC = 1 * (OMP_CLAUSE_DEFAULTMAP_CATEGORY_MASK + 1),
  388. OMP_CLAUSE_DEFAULTMAP_TO = 2 * (OMP_CLAUSE_DEFAULTMAP_CATEGORY_MASK + 1),
  389. OMP_CLAUSE_DEFAULTMAP_FROM = 3 * (OMP_CLAUSE_DEFAULTMAP_CATEGORY_MASK + 1),
  390. OMP_CLAUSE_DEFAULTMAP_TOFROM = 4 * (OMP_CLAUSE_DEFAULTMAP_CATEGORY_MASK + 1),
  391. OMP_CLAUSE_DEFAULTMAP_FIRSTPRIVATE
  392. = 5 * (OMP_CLAUSE_DEFAULTMAP_CATEGORY_MASK + 1),
  393. OMP_CLAUSE_DEFAULTMAP_NONE = 6 * (OMP_CLAUSE_DEFAULTMAP_CATEGORY_MASK + 1),
  394. OMP_CLAUSE_DEFAULTMAP_DEFAULT
  395. = 7 * (OMP_CLAUSE_DEFAULTMAP_CATEGORY_MASK + 1),
  396. OMP_CLAUSE_DEFAULTMAP_MASK = 7 * (OMP_CLAUSE_DEFAULTMAP_CATEGORY_MASK + 1)
  397. };
  398. /* memory-order-clause on OpenMP atomic/flush constructs or
  399. argument of atomic_default_mem_order clause. */
  400. enum omp_memory_order {
  401. OMP_MEMORY_ORDER_UNSPECIFIED,
  402. OMP_MEMORY_ORDER_RELAXED,
  403. OMP_MEMORY_ORDER_ACQUIRE,
  404. OMP_MEMORY_ORDER_RELEASE,
  405. OMP_MEMORY_ORDER_ACQ_REL,
  406. OMP_MEMORY_ORDER_SEQ_CST
  407. };
  408. /* There is a TYPE_QUAL value for each type qualifier. They can be
  409. combined by bitwise-or to form the complete set of qualifiers for a
  410. type. */
  411. enum cv_qualifier {
  412. TYPE_UNQUALIFIED = 0x0,
  413. TYPE_QUAL_CONST = 0x1,
  414. TYPE_QUAL_VOLATILE = 0x2,
  415. TYPE_QUAL_RESTRICT = 0x4,
  416. TYPE_QUAL_ATOMIC = 0x8
  417. };
  418. /* Standard named or nameless data types of the C compiler. */
  419. enum tree_index {
  420. TI_ERROR_MARK,
  421. TI_INTQI_TYPE,
  422. TI_INTHI_TYPE,
  423. TI_INTSI_TYPE,
  424. TI_INTDI_TYPE,
  425. TI_INTTI_TYPE,
  426. TI_UINTQI_TYPE,
  427. TI_UINTHI_TYPE,
  428. TI_UINTSI_TYPE,
  429. TI_UINTDI_TYPE,
  430. TI_UINTTI_TYPE,
  431. TI_ATOMICQI_TYPE,
  432. TI_ATOMICHI_TYPE,
  433. TI_ATOMICSI_TYPE,
  434. TI_ATOMICDI_TYPE,
  435. TI_ATOMICTI_TYPE,
  436. TI_UINT16_TYPE,
  437. TI_UINT32_TYPE,
  438. TI_UINT64_TYPE,
  439. TI_VOID,
  440. TI_INTEGER_ZERO,
  441. TI_INTEGER_ONE,
  442. TI_INTEGER_THREE,
  443. TI_INTEGER_MINUS_ONE,
  444. TI_NULL_POINTER,
  445. TI_SIZE_ZERO,
  446. TI_SIZE_ONE,
  447. TI_BITSIZE_ZERO,
  448. TI_BITSIZE_ONE,
  449. TI_BITSIZE_UNIT,
  450. TI_PUBLIC,
  451. TI_PROTECTED,
  452. TI_PRIVATE,
  453. TI_BOOLEAN_FALSE,
  454. TI_BOOLEAN_TRUE,
  455. TI_FLOAT_TYPE,
  456. TI_DOUBLE_TYPE,
  457. TI_LONG_DOUBLE_TYPE,
  458. /* The _FloatN and _FloatNx types must be consecutive, and in the
  459. same sequence as the corresponding complex types, which must also
  460. be consecutive; _FloatN must come before _FloatNx; the order must
  461. also be the same as in the floatn_nx_types array and the RID_*
  462. values in c-common.h. This is so that iterations over these
  463. types work as intended. */
  464. TI_FLOAT16_TYPE,
  465. TI_FLOATN_TYPE_FIRST = TI_FLOAT16_TYPE,
  466. TI_FLOATN_NX_TYPE_FIRST = TI_FLOAT16_TYPE,
  467. TI_FLOAT32_TYPE,
  468. TI_FLOAT64_TYPE,
  469. TI_FLOAT128_TYPE,
  470. TI_FLOATN_TYPE_LAST = TI_FLOAT128_TYPE,
  471. #define NUM_FLOATN_TYPES (TI_FLOATN_TYPE_LAST - TI_FLOATN_TYPE_FIRST + 1)
  472. TI_FLOAT32X_TYPE,
  473. TI_FLOATNX_TYPE_FIRST = TI_FLOAT32X_TYPE,
  474. TI_FLOAT64X_TYPE,
  475. TI_FLOAT128X_TYPE,
  476. TI_FLOATNX_TYPE_LAST = TI_FLOAT128X_TYPE,
  477. TI_FLOATN_NX_TYPE_LAST = TI_FLOAT128X_TYPE,
  478. #define NUM_FLOATNX_TYPES (TI_FLOATNX_TYPE_LAST - TI_FLOATNX_TYPE_FIRST + 1)
  479. #define NUM_FLOATN_NX_TYPES (TI_FLOATN_NX_TYPE_LAST \
  480. - TI_FLOATN_NX_TYPE_FIRST \
  481. + 1)
  482. /* Put the complex types after their component types, so that in (sequential)
  483. tree streaming we can assert that their component types have already been
  484. handled (see tree-streamer.c:record_common_node). */
  485. TI_COMPLEX_INTEGER_TYPE,
  486. TI_COMPLEX_FLOAT_TYPE,
  487. TI_COMPLEX_DOUBLE_TYPE,
  488. TI_COMPLEX_LONG_DOUBLE_TYPE,
  489. TI_COMPLEX_FLOAT16_TYPE,
  490. TI_COMPLEX_FLOATN_NX_TYPE_FIRST = TI_COMPLEX_FLOAT16_TYPE,
  491. TI_COMPLEX_FLOAT32_TYPE,
  492. TI_COMPLEX_FLOAT64_TYPE,
  493. TI_COMPLEX_FLOAT128_TYPE,
  494. TI_COMPLEX_FLOAT32X_TYPE,
  495. TI_COMPLEX_FLOAT64X_TYPE,
  496. TI_COMPLEX_FLOAT128X_TYPE,
  497. TI_FLOAT_PTR_TYPE,
  498. TI_DOUBLE_PTR_TYPE,
  499. TI_LONG_DOUBLE_PTR_TYPE,
  500. TI_INTEGER_PTR_TYPE,
  501. TI_VOID_TYPE,
  502. TI_PTR_TYPE,
  503. TI_CONST_PTR_TYPE,
  504. TI_SIZE_TYPE,
  505. TI_PID_TYPE,
  506. TI_PTRDIFF_TYPE,
  507. TI_VA_LIST_TYPE,
  508. TI_VA_LIST_GPR_COUNTER_FIELD,
  509. TI_VA_LIST_FPR_COUNTER_FIELD,
  510. TI_BOOLEAN_TYPE,
  511. TI_FILEPTR_TYPE,
  512. TI_CONST_TM_PTR_TYPE,
  513. TI_FENV_T_PTR_TYPE,
  514. TI_CONST_FENV_T_PTR_TYPE,
  515. TI_FEXCEPT_T_PTR_TYPE,
  516. TI_CONST_FEXCEPT_T_PTR_TYPE,
  517. TI_POINTER_SIZED_TYPE,
  518. TI_DFLOAT32_TYPE,
  519. TI_DFLOAT64_TYPE,
  520. TI_DFLOAT128_TYPE,
  521. TI_DFLOAT32_PTR_TYPE,
  522. TI_DFLOAT64_PTR_TYPE,
  523. TI_DFLOAT128_PTR_TYPE,
  524. TI_VOID_LIST_NODE,
  525. TI_MAIN_IDENTIFIER,
  526. TI_SAT_SFRACT_TYPE,
  527. TI_SAT_FRACT_TYPE,
  528. TI_SAT_LFRACT_TYPE,
  529. TI_SAT_LLFRACT_TYPE,
  530. TI_SAT_USFRACT_TYPE,
  531. TI_SAT_UFRACT_TYPE,
  532. TI_SAT_ULFRACT_TYPE,
  533. TI_SAT_ULLFRACT_TYPE,
  534. TI_SFRACT_TYPE,
  535. TI_FRACT_TYPE,
  536. TI_LFRACT_TYPE,
  537. TI_LLFRACT_TYPE,
  538. TI_USFRACT_TYPE,
  539. TI_UFRACT_TYPE,
  540. TI_ULFRACT_TYPE,
  541. TI_ULLFRACT_TYPE,
  542. TI_SAT_SACCUM_TYPE,
  543. TI_SAT_ACCUM_TYPE,
  544. TI_SAT_LACCUM_TYPE,
  545. TI_SAT_LLACCUM_TYPE,
  546. TI_SAT_USACCUM_TYPE,
  547. TI_SAT_UACCUM_TYPE,
  548. TI_SAT_ULACCUM_TYPE,
  549. TI_SAT_ULLACCUM_TYPE,
  550. TI_SACCUM_TYPE,
  551. TI_ACCUM_TYPE,
  552. TI_LACCUM_TYPE,
  553. TI_LLACCUM_TYPE,
  554. TI_USACCUM_TYPE,
  555. TI_UACCUM_TYPE,
  556. TI_ULACCUM_TYPE,
  557. TI_ULLACCUM_TYPE,
  558. TI_QQ_TYPE,
  559. TI_HQ_TYPE,
  560. TI_SQ_TYPE,
  561. TI_DQ_TYPE,
  562. TI_TQ_TYPE,
  563. TI_UQQ_TYPE,
  564. TI_UHQ_TYPE,
  565. TI_USQ_TYPE,
  566. TI_UDQ_TYPE,
  567. TI_UTQ_TYPE,
  568. TI_SAT_QQ_TYPE,
  569. TI_SAT_HQ_TYPE,
  570. TI_SAT_SQ_TYPE,
  571. TI_SAT_DQ_TYPE,
  572. TI_SAT_TQ_TYPE,
  573. TI_SAT_UQQ_TYPE,
  574. TI_SAT_UHQ_TYPE,
  575. TI_SAT_USQ_TYPE,
  576. TI_SAT_UDQ_TYPE,
  577. TI_SAT_UTQ_TYPE,
  578. TI_HA_TYPE,
  579. TI_SA_TYPE,
  580. TI_DA_TYPE,
  581. TI_TA_TYPE,
  582. TI_UHA_TYPE,
  583. TI_USA_TYPE,
  584. TI_UDA_TYPE,
  585. TI_UTA_TYPE,
  586. TI_SAT_HA_TYPE,
  587. TI_SAT_SA_TYPE,
  588. TI_SAT_DA_TYPE,
  589. TI_SAT_TA_TYPE,
  590. TI_SAT_UHA_TYPE,
  591. TI_SAT_USA_TYPE,
  592. TI_SAT_UDA_TYPE,
  593. TI_SAT_UTA_TYPE,
  594. TI_OPTIMIZATION_DEFAULT,
  595. TI_OPTIMIZATION_CURRENT,
  596. TI_TARGET_OPTION_DEFAULT,
  597. TI_TARGET_OPTION_CURRENT,
  598. TI_CURRENT_TARGET_PRAGMA,
  599. TI_CURRENT_OPTIMIZE_PRAGMA,
  600. TI_MAX
  601. };
  602. /* An enumeration of the standard C integer types. These must be
  603. ordered so that shorter types appear before longer ones, and so
  604. that signed types appear before unsigned ones, for the correct
  605. functioning of interpret_integer() in c-lex.c. */
  606. enum integer_type_kind {
  607. itk_char,
  608. itk_signed_char,
  609. itk_unsigned_char,
  610. itk_short,
  611. itk_unsigned_short,
  612. itk_int,
  613. itk_unsigned_int,
  614. itk_long,
  615. itk_unsigned_long,
  616. itk_long_long,
  617. itk_unsigned_long_long,
  618. itk_intN_0,
  619. itk_unsigned_intN_0,
  620. itk_intN_1,
  621. itk_unsigned_intN_1,
  622. itk_intN_2,
  623. itk_unsigned_intN_2,
  624. itk_intN_3,
  625. itk_unsigned_intN_3,
  626. itk_none
  627. };
  628. /* A pointer-to-function member type looks like:
  629. struct {
  630. __P __pfn;
  631. ptrdiff_t __delta;
  632. };
  633. If __pfn is NULL, it is a NULL pointer-to-member-function.
  634. (Because the vtable is always the first thing in the object, we
  635. don't need its offset.) If the function is virtual, then PFN is
  636. one plus twice the index into the vtable; otherwise, it is just a
  637. pointer to the function.
  638. Unfortunately, using the lowest bit of PFN doesn't work in
  639. architectures that don't impose alignment requirements on function
  640. addresses, or that use the lowest bit to tell one ISA from another,
  641. for example. For such architectures, we use the lowest bit of
  642. DELTA instead of the lowest bit of the PFN, and DELTA will be
  643. multiplied by 2. */
  644. enum ptrmemfunc_vbit_where_t {
  645. ptrmemfunc_vbit_in_pfn,
  646. ptrmemfunc_vbit_in_delta
  647. };
  648. /* Flags that may be passed in the third argument of decl_attributes, and
  649. to handler functions for attributes. */
  650. enum attribute_flags {
  651. /* The type passed in is the type of a DECL, and any attributes that
  652. should be passed in again to be applied to the DECL rather than the
  653. type should be returned. */
  654. ATTR_FLAG_DECL_NEXT = 1,
  655. /* The type passed in is a function return type, and any attributes that
  656. should be passed in again to be applied to the function type rather
  657. than the return type should be returned. */
  658. ATTR_FLAG_FUNCTION_NEXT = 2,
  659. /* The type passed in is an array element type, and any attributes that
  660. should be passed in again to be applied to the array type rather
  661. than the element type should be returned. */
  662. ATTR_FLAG_ARRAY_NEXT = 4,
  663. /* The type passed in is a structure, union or enumeration type being
  664. created, and should be modified in place. */
  665. ATTR_FLAG_TYPE_IN_PLACE = 8,
  666. /* The attributes are being applied by default to a library function whose
  667. name indicates known behavior, and should be silently ignored if they
  668. are not in fact compatible with the function type. */
  669. ATTR_FLAG_BUILT_IN = 16,
  670. /* A given attribute has been parsed as a C++-11 attribute. */
  671. ATTR_FLAG_CXX11 = 32
  672. };
  673. /* Types used to represent sizes. */
  674. enum size_type_kind {
  675. stk_sizetype, /* Normal representation of sizes in bytes. */
  676. stk_ssizetype, /* Signed representation of sizes in bytes. */
  677. stk_bitsizetype, /* Normal representation of sizes in bits. */
  678. stk_sbitsizetype, /* Signed representation of sizes in bits. */
  679. stk_type_kind_last
  680. };
  681. enum operand_equal_flag {
  682. OEP_ONLY_CONST = 1,
  683. OEP_PURE_SAME = 2,
  684. OEP_MATCH_SIDE_EFFECTS = 4,
  685. OEP_ADDRESS_OF = 8,
  686. /* Internal within operand_equal_p: */
  687. OEP_NO_HASH_CHECK = 16,
  688. /* Internal within inchash::add_expr: */
  689. OEP_HASH_CHECK = 32,
  690. /* Makes operand_equal_p handle more expressions: */
  691. OEP_LEXICOGRAPHIC = 64
  692. };
  693. /* Enum and arrays used for tree allocation stats.
  694. Keep in sync with tree.c:tree_node_kind_names. */
  695. enum tree_node_kind {
  696. d_kind,
  697. t_kind,
  698. b_kind,
  699. s_kind,
  700. r_kind,
  701. e_kind,
  702. c_kind,
  703. id_kind,
  704. vec_kind,
  705. binfo_kind,
  706. ssa_name_kind,
  707. constr_kind,
  708. x_kind,
  709. lang_decl,
  710. lang_type,
  711. omp_clause_kind,
  712. all_kinds
  713. };
  714. enum annot_expr_kind {
  715. annot_expr_ivdep_kind,
  716. annot_expr_unroll_kind,
  717. annot_expr_no_vector_kind,
  718. annot_expr_vector_kind,
  719. annot_expr_parallel_kind,
  720. annot_expr_kind_last
  721. };
  722. /*---------------------------------------------------------------------------
  723. Type definitions
  724. ---------------------------------------------------------------------------*/
  725. /* When processing aliases at the symbol table level, we need the
  726. declaration of target. For this reason we need to queue aliases and
  727. process them after all declarations has been produced. */
  728. struct GTY(()) alias_pair {
  729. tree decl;
  730. tree target;
  731. };
  732. /* An initialization priority. */
  733. typedef unsigned short priority_type;
  734. /* The type of a callback function for walking over tree structure. */
  735. typedef tree (*walk_tree_fn) (tree *, int *, void *);
  736. /* The type of a callback function that represents a custom walk_tree. */
  737. typedef tree (*walk_tree_lh) (tree *, int *, tree (*) (tree *, int *, void *),
  738. void *, hash_set<tree> *);
  739. /*---------------------------------------------------------------------------
  740. Main data structures
  741. ---------------------------------------------------------------------------*/
  742. /* A tree node can represent a data type, a variable, an expression
  743. or a statement. Each node has a TREE_CODE which says what kind of
  744. thing it represents. Some common codes are:
  745. INTEGER_TYPE -- represents a type of integers.
  746. ARRAY_TYPE -- represents a type of pointer.
  747. VAR_DECL -- represents a declared variable.
  748. INTEGER_CST -- represents a constant integer value.
  749. PLUS_EXPR -- represents a sum (an expression).
  750. As for the contents of a tree node: there are some fields
  751. that all nodes share. Each TREE_CODE has various special-purpose
  752. fields as well. The fields of a node are never accessed directly,
  753. always through accessor macros. */
  754. /* Every kind of tree node starts with this structure,
  755. so all nodes have these fields.
  756. See the accessor macros, defined below, for documentation of the
  757. fields, and the table below which connects the fields and the
  758. accessor macros. */
  759. struct GTY(()) tree_base {
  760. ENUM_BITFIELD(tree_code) code : 16;
  761. unsigned side_effects_flag : 1;
  762. unsigned constant_flag : 1;
  763. unsigned addressable_flag : 1;
  764. unsigned volatile_flag : 1;
  765. unsigned readonly_flag : 1;
  766. unsigned asm_written_flag: 1;
  767. unsigned nowarning_flag : 1;
  768. unsigned visited : 1;
  769. unsigned used_flag : 1;
  770. unsigned nothrow_flag : 1;
  771. unsigned static_flag : 1;
  772. unsigned public_flag : 1;
  773. unsigned private_flag : 1;
  774. unsigned protected_flag : 1;
  775. unsigned deprecated_flag : 1;
  776. unsigned default_def_flag : 1;
  777. union {
  778. /* The bits in the following structure should only be used with
  779. accessor macros that constrain inputs with tree checking. */
  780. struct {
  781. unsigned lang_flag_0 : 1;
  782. unsigned lang_flag_1 : 1;
  783. unsigned lang_flag_2 : 1;
  784. unsigned lang_flag_3 : 1;
  785. unsigned lang_flag_4 : 1;
  786. unsigned lang_flag_5 : 1;
  787. unsigned lang_flag_6 : 1;
  788. unsigned saturating_flag : 1;
  789. unsigned unsigned_flag : 1;
  790. unsigned packed_flag : 1;
  791. unsigned user_align : 1;
  792. unsigned nameless_flag : 1;
  793. unsigned atomic_flag : 1;
  794. unsigned spare0 : 3;
  795. unsigned spare1 : 8;
  796. /* This field is only used with TREE_TYPE nodes; the only reason it is
  797. present in tree_base instead of tree_type is to save space. The size
  798. of the field must be large enough to hold addr_space_t values. */
  799. unsigned address_space : 8;
  800. } bits;
  801. /* The following fields are present in tree_base to save space. The
  802. nodes using them do not require any of the flags above and so can
  803. make better use of the 4-byte sized word. */
  804. /* The number of HOST_WIDE_INTs in an INTEGER_CST. */
  805. struct {
  806. /* The number of HOST_WIDE_INTs if the INTEGER_CST is accessed in
  807. its native precision. */
  808. unsigned char unextended;
  809. /* The number of HOST_WIDE_INTs if the INTEGER_CST is extended to
  810. wider precisions based on its TYPE_SIGN. */
  811. unsigned char extended;
  812. /* The number of HOST_WIDE_INTs if the INTEGER_CST is accessed in
  813. offset_int precision, with smaller integers being extended
  814. according to their TYPE_SIGN. This is equal to one of the two
  815. fields above but is cached for speed. */
  816. unsigned char offset;
  817. } int_length;
  818. /* VEC length. This field is only used with TREE_VEC. */
  819. int length;
  820. /* This field is only used with VECTOR_CST. */
  821. struct {
  822. /* The value of VECTOR_CST_LOG2_NPATTERNS. */
  823. unsigned int log2_npatterns : 8;
  824. /* The value of VECTOR_CST_NELTS_PER_PATTERN. */
  825. unsigned int nelts_per_pattern : 8;
  826. /* For future expansion. */
  827. unsigned int unused : 16;
  828. } vector_cst;
  829. /* SSA version number. This field is only used with SSA_NAME. */
  830. unsigned int version;
  831. /* CHREC_VARIABLE. This field is only used with POLYNOMIAL_CHREC. */
  832. unsigned int chrec_var;
  833. /* Internal function code. */
  834. enum internal_fn ifn;
  835. /* OMP_ATOMIC* memory order. */
  836. enum omp_memory_order omp_atomic_memory_order;
  837. /* The following two fields are used for MEM_REF and TARGET_MEM_REF
  838. expression trees and specify known data non-dependences. For
  839. two memory references in a function they are known to not
  840. alias if dependence_info.clique are equal and dependence_info.base
  841. are distinct. Clique number zero means there is no information,
  842. clique number one is populated from function global information
  843. and thus needs no remapping on transforms like loop unrolling. */
  844. struct {
  845. unsigned short clique;
  846. unsigned short base;
  847. } dependence_info;
  848. } GTY((skip(""))) u;
  849. };
  850. /* The following table lists the uses of each of the above flags and
  851. for which types of nodes they are defined.
  852. addressable_flag:
  853. TREE_ADDRESSABLE in
  854. VAR_DECL, PARM_DECL, RESULT_DECL, FUNCTION_DECL, LABEL_DECL
  855. SSA_NAME
  856. all types
  857. CONSTRUCTOR, IDENTIFIER_NODE
  858. STMT_EXPR
  859. CALL_EXPR_TAILCALL in
  860. CALL_EXPR
  861. CASE_LOW_SEEN in
  862. CASE_LABEL_EXPR
  863. PREDICT_EXPR_OUTCOME in
  864. PREDICT_EXPR
  865. static_flag:
  866. TREE_STATIC in
  867. VAR_DECL, FUNCTION_DECL
  868. CONSTRUCTOR
  869. TREE_NO_TRAMPOLINE in
  870. ADDR_EXPR
  871. BINFO_VIRTUAL_P in
  872. TREE_BINFO
  873. TREE_SYMBOL_REFERENCED in
  874. IDENTIFIER_NODE
  875. CLEANUP_EH_ONLY in
  876. TARGET_EXPR, WITH_CLEANUP_EXPR
  877. TRY_CATCH_IS_CLEANUP in
  878. TRY_CATCH_EXPR
  879. ASM_INPUT_P in
  880. ASM_EXPR
  881. TYPE_REF_CAN_ALIAS_ALL in
  882. POINTER_TYPE, REFERENCE_TYPE
  883. CASE_HIGH_SEEN in
  884. CASE_LABEL_EXPR
  885. ENUM_IS_SCOPED in
  886. ENUMERAL_TYPE
  887. TRANSACTION_EXPR_OUTER in
  888. TRANSACTION_EXPR
  889. SSA_NAME_ANTI_RANGE_P in
  890. SSA_NAME
  891. MUST_TAIL_CALL in
  892. CALL_EXPR
  893. public_flag:
  894. TREE_OVERFLOW in
  895. INTEGER_CST, REAL_CST, COMPLEX_CST, VECTOR_CST
  896. TREE_PUBLIC in
  897. VAR_DECL, FUNCTION_DECL
  898. IDENTIFIER_NODE
  899. CONSTRUCTOR_NO_CLEARING in
  900. CONSTRUCTOR
  901. ASM_VOLATILE_P in
  902. ASM_EXPR
  903. CALL_EXPR_VA_ARG_PACK in
  904. CALL_EXPR
  905. TYPE_CACHED_VALUES_P in
  906. all types
  907. SAVE_EXPR_RESOLVED_P in
  908. SAVE_EXPR
  909. OMP_CLAUSE_LASTPRIVATE_FIRSTPRIVATE in
  910. OMP_CLAUSE_LASTPRIVATE
  911. OMP_CLAUSE_PRIVATE_DEBUG in
  912. OMP_CLAUSE_PRIVATE
  913. OMP_CLAUSE_LINEAR_NO_COPYIN in
  914. OMP_CLAUSE_LINEAR
  915. OMP_CLAUSE_MAP_ZERO_BIAS_ARRAY_SECTION in
  916. OMP_CLAUSE_MAP
  917. OMP_CLAUSE_REDUCTION_OMP_ORIG_REF in
  918. OMP_CLAUSE_{,TASK_,IN_}REDUCTION
  919. TRANSACTION_EXPR_RELAXED in
  920. TRANSACTION_EXPR
  921. FALLTHROUGH_LABEL_P in
  922. LABEL_DECL
  923. SSA_NAME_IS_VIRTUAL_OPERAND in
  924. SSA_NAME
  925. EXPR_LOCATION_WRAPPER_P in
  926. NON_LVALUE_EXPR, VIEW_CONVERT_EXPR
  927. private_flag:
  928. TREE_PRIVATE in
  929. all decls
  930. CALL_EXPR_RETURN_SLOT_OPT in
  931. CALL_EXPR
  932. OMP_SECTION_LAST in
  933. OMP_SECTION
  934. OMP_PARALLEL_COMBINED in
  935. OMP_PARALLEL
  936. OMP_CLAUSE_PRIVATE_OUTER_REF in
  937. OMP_CLAUSE_PRIVATE
  938. OMP_CLAUSE_LINEAR_NO_COPYOUT in
  939. OMP_CLAUSE_LINEAR
  940. TYPE_REF_IS_RVALUE in
  941. REFERENCE_TYPE
  942. ENUM_IS_OPAQUE in
  943. ENUMERAL_TYPE
  944. protected_flag:
  945. TREE_PROTECTED in
  946. BLOCK
  947. all decls
  948. CALL_FROM_THUNK_P and
  949. CALL_ALLOCA_FOR_VAR_P in
  950. CALL_EXPR
  951. OMP_CLAUSE_LINEAR_VARIABLE_STRIDE in
  952. OMP_CLAUSE_LINEAR
  953. ASM_INLINE_P in
  954. ASM_EXPR
  955. side_effects_flag:
  956. TREE_SIDE_EFFECTS in
  957. all expressions
  958. all decls
  959. all constants
  960. FORCED_LABEL in
  961. LABEL_DECL
  962. volatile_flag:
  963. TREE_THIS_VOLATILE in
  964. all expressions
  965. all decls
  966. TYPE_VOLATILE in
  967. all types
  968. readonly_flag:
  969. TREE_READONLY in
  970. all expressions
  971. all decls
  972. TYPE_READONLY in
  973. all types
  974. constant_flag:
  975. TREE_CONSTANT in
  976. all expressions
  977. all decls
  978. all constants
  979. TYPE_SIZES_GIMPLIFIED in
  980. all types
  981. unsigned_flag:
  982. TYPE_UNSIGNED in
  983. all types
  984. DECL_UNSIGNED in
  985. all decls
  986. asm_written_flag:
  987. TREE_ASM_WRITTEN in
  988. VAR_DECL, FUNCTION_DECL, TYPE_DECL
  989. RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE
  990. BLOCK, STRING_CST
  991. SSA_NAME_OCCURS_IN_ABNORMAL_PHI in
  992. SSA_NAME
  993. used_flag:
  994. TREE_USED in
  995. all expressions
  996. all decls
  997. IDENTIFIER_NODE
  998. nothrow_flag:
  999. TREE_NOTHROW in
  1000. CALL_EXPR
  1001. FUNCTION_DECL
  1002. TREE_THIS_NOTRAP in
  1003. INDIRECT_REF, MEM_REF, TARGET_MEM_REF, ARRAY_REF, ARRAY_RANGE_REF
  1004. SSA_NAME_IN_FREE_LIST in
  1005. SSA_NAME
  1006. DECL_NONALIASED in
  1007. VAR_DECL
  1008. deprecated_flag:
  1009. TREE_DEPRECATED in
  1010. all decls
  1011. all types
  1012. IDENTIFIER_TRANSPARENT_ALIAS in
  1013. IDENTIFIER_NODE
  1014. SSA_NAME_POINTS_TO_READONLY_MEMORY in
  1015. SSA_NAME
  1016. visited:
  1017. TREE_VISITED in
  1018. all trees (used liberally by many passes)
  1019. saturating_flag:
  1020. TYPE_REVERSE_STORAGE_ORDER in
  1021. RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE, ARRAY_TYPE
  1022. TYPE_SATURATING in
  1023. other types
  1024. VAR_DECL_IS_VIRTUAL_OPERAND in
  1025. VAR_DECL
  1026. nowarning_flag:
  1027. TREE_NO_WARNING in
  1028. all expressions
  1029. all decls
  1030. TYPE_ARTIFICIAL in
  1031. all types
  1032. default_def_flag:
  1033. TYPE_FINAL_P in
  1034. RECORD_TYPE, UNION_TYPE and QUAL_UNION_TYPE
  1035. TYPE_VECTOR_OPAQUE in
  1036. VECTOR_TYPE
  1037. SSA_NAME_IS_DEFAULT_DEF in
  1038. SSA_NAME
  1039. DECL_NONLOCAL_FRAME in
  1040. VAR_DECL
  1041. REF_REVERSE_STORAGE_ORDER in
  1042. BIT_FIELD_REF, MEM_REF
  1043. FUNC_ADDR_BY_DESCRIPTOR in
  1044. ADDR_EXPR
  1045. CALL_EXPR_BY_DESCRIPTOR in
  1046. CALL_EXPR
  1047. */
  1048. struct GTY(()) tree_typed {
  1049. struct tree_base base;
  1050. tree type;
  1051. };
  1052. struct GTY(()) tree_common {
  1053. struct tree_typed typed;
  1054. tree chain;
  1055. };
  1056. struct GTY(()) tree_int_cst {
  1057. struct tree_typed typed;
  1058. HOST_WIDE_INT val[1];
  1059. };
  1060. struct GTY(()) tree_real_cst {
  1061. struct tree_typed typed;
  1062. struct real_value * real_cst_ptr;
  1063. };
  1064. struct GTY(()) tree_fixed_cst {
  1065. struct tree_typed typed;
  1066. struct fixed_value * fixed_cst_ptr;
  1067. };
  1068. struct GTY(()) tree_string {
  1069. struct tree_typed typed;
  1070. int length;
  1071. char str[1];
  1072. };
  1073. struct GTY(()) tree_complex {
  1074. struct tree_typed typed;
  1075. tree real;
  1076. tree imag;
  1077. };
  1078. struct GTY(()) tree_vector {
  1079. struct tree_typed typed;
  1080. tree GTY ((length ("vector_cst_encoded_nelts ((tree) &%h)"))) elts[1];
  1081. };
  1082. struct GTY(()) tree_poly_int_cst {
  1083. struct tree_typed typed;
  1084. tree coeffs[NUM_POLY_INT_COEFFS];
  1085. };
  1086. struct GTY(()) tree_identifier {
  1087. struct tree_common common;
  1088. struct ht_identifier id;
  1089. };
  1090. struct GTY(()) tree_list {
  1091. struct tree_common common;
  1092. tree purpose;
  1093. tree value;
  1094. };
  1095. struct GTY(()) tree_vec {
  1096. struct tree_common common;
  1097. tree GTY ((length ("TREE_VEC_LENGTH ((tree)&%h)"))) a[1];
  1098. };
  1099. /* A single element of a CONSTRUCTOR. VALUE holds the actual value of the
  1100. element. INDEX can optionally design the position of VALUE: in arrays,
  1101. it is the index where VALUE has to be placed; in structures, it is the
  1102. FIELD_DECL of the member. */
  1103. struct GTY(()) constructor_elt {
  1104. tree index;
  1105. tree value;
  1106. };
  1107. struct GTY(()) tree_constructor {
  1108. struct tree_typed typed;
  1109. vec<constructor_elt, va_gc> *elts;
  1110. };
  1111. enum omp_clause_depend_kind
  1112. {
  1113. OMP_CLAUSE_DEPEND_IN,
  1114. OMP_CLAUSE_DEPEND_OUT,
  1115. OMP_CLAUSE_DEPEND_INOUT,
  1116. OMP_CLAUSE_DEPEND_MUTEXINOUTSET,
  1117. OMP_CLAUSE_DEPEND_SOURCE,
  1118. OMP_CLAUSE_DEPEND_SINK,
  1119. OMP_CLAUSE_DEPEND_DEPOBJ,
  1120. OMP_CLAUSE_DEPEND_LAST
  1121. };
  1122. enum omp_clause_proc_bind_kind
  1123. {
  1124. /* Numbers should match omp_proc_bind_t enum in omp.h. */
  1125. OMP_CLAUSE_PROC_BIND_FALSE = 0,
  1126. OMP_CLAUSE_PROC_BIND_TRUE = 1,
  1127. OMP_CLAUSE_PROC_BIND_MASTER = 2,
  1128. OMP_CLAUSE_PROC_BIND_CLOSE = 3,
  1129. OMP_CLAUSE_PROC_BIND_SPREAD = 4,
  1130. OMP_CLAUSE_PROC_BIND_LAST
  1131. };
  1132. enum omp_clause_linear_kind
  1133. {
  1134. OMP_CLAUSE_LINEAR_DEFAULT,
  1135. OMP_CLAUSE_LINEAR_REF,
  1136. OMP_CLAUSE_LINEAR_VAL,
  1137. OMP_CLAUSE_LINEAR_UVAL
  1138. };
  1139. struct GTY(()) tree_exp {
  1140. struct tree_typed typed;
  1141. location_t locus;
  1142. tree GTY ((special ("tree_exp"),
  1143. desc ("TREE_CODE ((tree) &%0)")))
  1144. operands[1];
  1145. };
  1146. /* Immediate use linking structure. This structure is used for maintaining
  1147. a doubly linked list of uses of an SSA_NAME. */
  1148. struct GTY(()) ssa_use_operand_t {
  1149. struct ssa_use_operand_t* GTY((skip(""))) prev;
  1150. struct ssa_use_operand_t* GTY((skip(""))) next;
  1151. /* Immediate uses for a given SSA name are maintained as a cyclic
  1152. list. To recognize the root of this list, the location field
  1153. needs to point to the original SSA name. Since statements and
  1154. SSA names are of different data types, we need this union. See
  1155. the explanation in struct imm_use_iterator. */
  1156. union { gimple *stmt; tree ssa_name; } GTY((skip(""))) loc;
  1157. tree *GTY((skip(""))) use;
  1158. };
  1159. struct GTY(()) tree_ssa_name {
  1160. struct tree_typed typed;
  1161. /* _DECL wrapped by this SSA name. */
  1162. tree var;
  1163. /* Statement that defines this SSA name. */
  1164. gimple *def_stmt;
  1165. /* Value range information. */
  1166. union ssa_name_info_type {
  1167. /* Pointer attributes used for alias analysis. */
  1168. struct GTY ((tag ("0"))) ptr_info_def *ptr_info;
  1169. /* Value range attributes used for zero/sign extension elimination. */
  1170. struct GTY ((tag ("1"))) range_info_def *range_info;
  1171. } GTY ((desc ("%1.typed.type ?" \
  1172. "!POINTER_TYPE_P (TREE_TYPE ((tree)&%1)) : 2"))) info;
  1173. /* Immediate uses list for this SSA_NAME. */
  1174. struct ssa_use_operand_t imm_uses;
  1175. };
  1176. struct GTY(()) phi_arg_d {
  1177. /* imm_use MUST be the first element in struct because we do some
  1178. pointer arithmetic with it. See phi_arg_index_from_use. */
  1179. struct ssa_use_operand_t imm_use;
  1180. tree def;
  1181. location_t locus;
  1182. };
  1183. struct GTY(()) tree_omp_clause {
  1184. struct tree_common common;
  1185. location_t locus;
  1186. enum omp_clause_code code;
  1187. union omp_clause_subcode {
  1188. enum omp_clause_default_kind default_kind;
  1189. enum omp_clause_schedule_kind schedule_kind;
  1190. enum omp_clause_depend_kind depend_kind;
  1191. /* See include/gomp-constants.h for enum gomp_map_kind's values. */
  1192. unsigned int map_kind;
  1193. enum omp_clause_proc_bind_kind proc_bind_kind;
  1194. enum tree_code reduction_code;
  1195. enum omp_clause_linear_kind linear_kind;
  1196. enum tree_code if_modifier;
  1197. enum omp_clause_defaultmap_kind defaultmap_kind;
  1198. /* The dimension a OMP_CLAUSE__GRIDDIM_ clause of a gridified target
  1199. construct describes. */
  1200. unsigned int dimension;
  1201. } GTY ((skip)) subcode;
  1202. /* The gimplification of OMP_CLAUSE_REDUCTION_{INIT,MERGE} for omp-low's
  1203. usage. */
  1204. gimple_seq gimple_reduction_init;
  1205. gimple_seq gimple_reduction_merge;
  1206. tree GTY ((length ("omp_clause_num_ops[OMP_CLAUSE_CODE ((tree)&%h)]")))
  1207. ops[1];
  1208. };
  1209. struct GTY(()) tree_block {
  1210. struct tree_base base;
  1211. tree chain;
  1212. unsigned block_num;
  1213. location_t locus;
  1214. location_t end_locus;
  1215. tree vars;
  1216. vec<tree, va_gc> *nonlocalized_vars;
  1217. tree subblocks;
  1218. tree supercontext;
  1219. tree abstract_origin;
  1220. tree fragment_origin;
  1221. tree fragment_chain;
  1222. /* Pointer to the DWARF lexical block. */
  1223. struct die_struct *die;
  1224. };
  1225. struct GTY(()) tree_type_common {
  1226. struct tree_common common;
  1227. tree size;
  1228. tree size_unit;
  1229. tree attributes;
  1230. unsigned int uid;
  1231. unsigned int precision : 10;
  1232. unsigned no_force_blk_flag : 1;
  1233. unsigned needs_constructing_flag : 1;
  1234. unsigned transparent_aggr_flag : 1;
  1235. unsigned restrict_flag : 1;
  1236. unsigned contains_placeholder_bits : 2;
  1237. ENUM_BITFIELD(machine_mode) mode : 8;
  1238. unsigned string_flag : 1;
  1239. unsigned lang_flag_0 : 1;
  1240. unsigned lang_flag_1 : 1;
  1241. unsigned lang_flag_2 : 1;
  1242. unsigned lang_flag_3 : 1;
  1243. unsigned lang_flag_4 : 1;
  1244. unsigned lang_flag_5 : 1;
  1245. unsigned lang_flag_6 : 1;
  1246. unsigned lang_flag_7 : 1;
  1247. /* TYPE_ALIGN in log2; this has to be large enough to hold values
  1248. of the maximum of BIGGEST_ALIGNMENT and MAX_OFILE_ALIGNMENT,
  1249. the latter being usually the larger. For ELF it is 8<<28,
  1250. so we need to store the value 32 (not 31, as we need the zero
  1251. as well), hence six bits. */
  1252. unsigned align : 6;
  1253. unsigned warn_if_not_align : 6;
  1254. unsigned typeless_storage : 1;
  1255. unsigned empty_flag : 1;
  1256. unsigned spare : 17;
  1257. alias_set_type alias_set;
  1258. tree pointer_to;
  1259. tree reference_to;
  1260. union tree_type_symtab {
  1261. int GTY ((tag ("TYPE_SYMTAB_IS_ADDRESS"))) address;
  1262. struct die_struct * GTY ((tag ("TYPE_SYMTAB_IS_DIE"))) die;
  1263. } GTY ((desc ("debug_hooks->tree_type_symtab_field"))) symtab;
  1264. tree canonical;
  1265. tree next_variant;
  1266. tree main_variant;
  1267. tree context;
  1268. tree name;
  1269. };
  1270. struct GTY(()) tree_type_with_lang_specific {
  1271. struct tree_type_common common;
  1272. /* Points to a structure whose details depend on the language in use. */
  1273. struct lang_type *lang_specific;
  1274. };
  1275. struct GTY(()) tree_type_non_common {
  1276. struct tree_type_with_lang_specific with_lang_specific;
  1277. tree values;
  1278. tree minval;
  1279. tree maxval;
  1280. tree lang_1;
  1281. };
  1282. struct GTY (()) tree_binfo {
  1283. struct tree_common common;
  1284. tree offset;
  1285. tree vtable;
  1286. tree virtuals;
  1287. tree vptr_field;
  1288. vec<tree, va_gc> *base_accesses;
  1289. tree inheritance;
  1290. tree vtt_subvtt;
  1291. tree vtt_vptr;
  1292. vec<tree, va_gc> base_binfos;
  1293. };
  1294. struct GTY(()) tree_decl_minimal {
  1295. struct tree_common common;
  1296. location_t locus;
  1297. unsigned int uid;
  1298. tree name;
  1299. tree context;
  1300. };
  1301. struct GTY(()) tree_decl_common {
  1302. struct tree_decl_minimal common;
  1303. tree size;
  1304. ENUM_BITFIELD(machine_mode) mode : 8;
  1305. unsigned nonlocal_flag : 1;
  1306. unsigned virtual_flag : 1;
  1307. unsigned ignored_flag : 1;
  1308. unsigned abstract_flag : 1;
  1309. unsigned artificial_flag : 1;
  1310. unsigned preserve_flag: 1;
  1311. unsigned debug_expr_is_from : 1;
  1312. unsigned lang_flag_0 : 1;
  1313. unsigned lang_flag_1 : 1;
  1314. unsigned lang_flag_2 : 1;
  1315. unsigned lang_flag_3 : 1;
  1316. unsigned lang_flag_4 : 1;
  1317. unsigned lang_flag_5 : 1;
  1318. unsigned lang_flag_6 : 1;
  1319. unsigned lang_flag_7 : 1;
  1320. unsigned lang_flag_8 : 1;
  1321. /* In VAR_DECL and PARM_DECL, this is DECL_REGISTER
  1322. IN TRANSLATION_UNIT_DECL, this is TRANSLATION_UNIT_WARN_EMPTY_P. */
  1323. unsigned decl_flag_0 : 1;
  1324. /* In FIELD_DECL, this is DECL_BIT_FIELD
  1325. In VAR_DECL and FUNCTION_DECL, this is DECL_EXTERNAL.
  1326. In TYPE_DECL, this is TYPE_DECL_SUPPRESS_DEBUG. */
  1327. unsigned decl_flag_1 : 1;
  1328. /* In FIELD_DECL, this is DECL_NONADDRESSABLE_P
  1329. In VAR_DECL, PARM_DECL and RESULT_DECL, this is
  1330. DECL_HAS_VALUE_EXPR_P. */
  1331. unsigned decl_flag_2 : 1;
  1332. /* In FIELD_DECL, this is DECL_PADDING_P. */
  1333. unsigned decl_flag_3 : 1;
  1334. /* Logically, these two would go in a theoretical base shared by var and
  1335. parm decl. */
  1336. unsigned gimple_reg_flag : 1;
  1337. /* In VAR_DECL, PARM_DECL and RESULT_DECL, this is DECL_BY_REFERENCE. */
  1338. unsigned decl_by_reference_flag : 1;
  1339. /* In a VAR_DECL and PARM_DECL, this is DECL_READ_P. */
  1340. unsigned decl_read_flag : 1;
  1341. /* In a VAR_DECL or RESULT_DECL, this is DECL_NONSHAREABLE. */
  1342. /* In a PARM_DECL, this is DECL_HIDDEN_STRING_LENGTH. */
  1343. unsigned decl_nonshareable_flag : 1;
  1344. /* DECL_OFFSET_ALIGN, used only for FIELD_DECLs. */
  1345. unsigned int off_align : 6;
  1346. /* DECL_ALIGN. It should have the same size as TYPE_ALIGN. */
  1347. unsigned int align : 6;
  1348. /* DECL_WARN_IF_NOT_ALIGN. It should have the same size as
  1349. TYPE_WARN_IF_NOT_ALIGN. */
  1350. unsigned int warn_if_not_align : 6;
  1351. /* 14 bits unused. */
  1352. /* UID for points-to sets, stable over copying from inlining. */
  1353. unsigned int pt_uid;
  1354. tree size_unit;
  1355. tree initial;
  1356. tree attributes;
  1357. tree abstract_origin;
  1358. /* Points to a structure whose details depend on the language in use. */
  1359. struct lang_decl *lang_specific;
  1360. };
  1361. struct GTY(()) tree_decl_with_rtl {
  1362. struct tree_decl_common common;
  1363. rtx rtl;
  1364. };
  1365. struct GTY(()) tree_field_decl {
  1366. struct tree_decl_common common;
  1367. tree offset;
  1368. tree bit_field_type;
  1369. tree qualifier;
  1370. tree bit_offset;
  1371. tree fcontext;
  1372. };
  1373. struct GTY(()) tree_label_decl {
  1374. struct tree_decl_with_rtl common;
  1375. int label_decl_uid;
  1376. int eh_landing_pad_nr;
  1377. };
  1378. struct GTY(()) tree_result_decl {
  1379. struct tree_decl_with_rtl common;
  1380. };
  1381. struct GTY(()) tree_const_decl {
  1382. struct tree_decl_common common;
  1383. };
  1384. struct GTY(()) tree_parm_decl {
  1385. struct tree_decl_with_rtl common;
  1386. rtx incoming_rtl;
  1387. };
  1388. struct GTY(()) tree_decl_with_vis {
  1389. struct tree_decl_with_rtl common;
  1390. tree assembler_name;
  1391. struct symtab_node *symtab_node;
  1392. /* Belong to VAR_DECL exclusively. */
  1393. unsigned defer_output : 1;
  1394. unsigned hard_register : 1;
  1395. unsigned common_flag : 1;
  1396. unsigned in_text_section : 1;
  1397. unsigned in_constant_pool : 1;
  1398. unsigned dllimport_flag : 1;
  1399. /* Don't belong to VAR_DECL exclusively. */
  1400. unsigned weak_flag : 1;
  1401. unsigned seen_in_bind_expr : 1;
  1402. unsigned comdat_flag : 1;
  1403. /* Used for FUNCTION_DECL, VAR_DECL and in C++ for TYPE_DECL. */
  1404. ENUM_BITFIELD(symbol_visibility) visibility : 2;
  1405. unsigned visibility_specified : 1;
  1406. /* Belong to FUNCTION_DECL exclusively. */
  1407. unsigned init_priority_p : 1;
  1408. /* Used by C++ only. Might become a generic decl flag. */
  1409. unsigned shadowed_for_var_p : 1;
  1410. /* Belong to FUNCTION_DECL exclusively. */
  1411. unsigned cxx_constructor : 1;
  1412. /* Belong to FUNCTION_DECL exclusively. */
  1413. unsigned cxx_destructor : 1;
  1414. /* Belong to FUNCTION_DECL exclusively. */
  1415. unsigned final : 1;
  1416. /* Belong to FUNCTION_DECL exclusively. */
  1417. unsigned regdecl_flag : 1;
  1418. /* 14 unused bits. */
  1419. };
  1420. struct GTY(()) tree_var_decl {
  1421. struct tree_decl_with_vis common;
  1422. };
  1423. struct GTY(()) tree_decl_non_common {
  1424. struct tree_decl_with_vis common;
  1425. /* Almost all FE's use this. */
  1426. tree result;
  1427. };
  1428. /* FUNCTION_DECL inherits from DECL_NON_COMMON because of the use of the
  1429. arguments/result/saved_tree fields by front ends. It was either inherit
  1430. FUNCTION_DECL from non_common, or inherit non_common from FUNCTION_DECL,
  1431. which seemed a bit strange. */
  1432. struct GTY(()) tree_function_decl {
  1433. struct tree_decl_non_common common;
  1434. struct function *f;
  1435. /* Arguments of the function. */
  1436. tree arguments;
  1437. /* The personality function. Used for stack unwinding. */
  1438. tree personality;
  1439. /* Function specific options that are used by this function. */
  1440. tree function_specific_target; /* target options */
  1441. tree function_specific_optimization; /* optimization options */
  1442. /* Generic function body. */
  1443. tree saved_tree;
  1444. /* Index within a virtual table. */
  1445. tree vindex;
  1446. /* In a FUNCTION_DECL for which DECL_BUILT_IN holds, this is
  1447. DECL_FUNCTION_CODE. Otherwise unused.
  1448. ??? The bitfield needs to be able to hold all target function
  1449. codes as well. */
  1450. ENUM_BITFIELD(built_in_function) function_code : 12;
  1451. ENUM_BITFIELD(built_in_class) built_in_class : 2;
  1452. unsigned static_ctor_flag : 1;
  1453. unsigned static_dtor_flag : 1;
  1454. unsigned uninlinable : 1;
  1455. unsigned possibly_inlined : 1;
  1456. unsigned novops_flag : 1;
  1457. unsigned returns_twice_flag : 1;
  1458. unsigned malloc_flag : 1;
  1459. unsigned operator_new_flag : 1;
  1460. unsigned declared_inline_flag : 1;
  1461. unsigned no_inline_warning_flag : 1;
  1462. unsigned no_instrument_function_entry_exit : 1;
  1463. unsigned no_limit_stack : 1;
  1464. unsigned disregard_inline_limits : 1;
  1465. unsigned pure_flag : 1;
  1466. unsigned looping_const_or_pure_flag : 1;
  1467. unsigned has_debug_args_flag : 1;
  1468. unsigned versioned_function : 1;
  1469. unsigned lambda_function: 1;
  1470. /* No bits left. */
  1471. };
  1472. struct GTY(()) tree_translation_unit_decl {
  1473. struct tree_decl_common common;
  1474. /* Source language of this translation unit. Used for DWARF output. */
  1475. const char * GTY((skip(""))) language;
  1476. /* TODO: Non-optimization used to build this translation unit. */
  1477. /* TODO: Root of a partial DWARF tree for global types and decls. */
  1478. };
  1479. struct GTY(()) tree_type_decl {
  1480. struct tree_decl_non_common common;
  1481. };
  1482. struct GTY ((chain_next ("%h.next"), chain_prev ("%h.prev"))) tree_statement_list_node
  1483. {
  1484. struct tree_statement_list_node *prev;
  1485. struct tree_statement_list_node *next;
  1486. tree stmt;
  1487. };
  1488. struct GTY(()) tree_statement_list
  1489. {
  1490. struct tree_typed typed;
  1491. struct tree_statement_list_node *head;
  1492. struct tree_statement_list_node *tail;
  1493. };
  1494. /* Optimization options used by a function. */
  1495. struct GTY(()) tree_optimization_option {
  1496. struct tree_base base;
  1497. /* The optimization options used by the user. */
  1498. struct cl_optimization *opts;
  1499. /* Target optabs for this set of optimization options. This is of
  1500. type `struct target_optabs *'. */
  1501. void *GTY ((atomic)) optabs;
  1502. /* The value of this_target_optabs against which the optabs above were
  1503. generated. */
  1504. struct target_optabs *GTY ((skip)) base_optabs;
  1505. };
  1506. /* Forward declaration, defined in target-globals.h. */
  1507. struct GTY(()) target_globals;
  1508. /* Target options used by a function. */
  1509. struct GTY(()) tree_target_option {
  1510. struct tree_base base;
  1511. /* Target globals for the corresponding target option. */
  1512. struct target_globals *globals;
  1513. /* The optimization options used by the user. */
  1514. struct cl_target_option *opts;
  1515. };
  1516. /* Define the overall contents of a tree node.
  1517. It may be any of the structures declared above
  1518. for various types of node. */
  1519. union GTY ((ptr_alias (union lang_tree_node),
  1520. desc ("tree_node_structure (&%h)"), variable_size)) tree_node {
  1521. struct tree_base GTY ((tag ("TS_BASE"))) base;
  1522. struct tree_typed GTY ((tag ("TS_TYPED"))) typed;
  1523. struct tree_common GTY ((tag ("TS_COMMON"))) common;
  1524. struct tree_int_cst GTY ((tag ("TS_INT_CST"))) int_cst;
  1525. struct tree_poly_int_cst GTY ((tag ("TS_POLY_INT_CST"))) poly_int_cst;
  1526. struct tree_real_cst GTY ((tag ("TS_REAL_CST"))) real_cst;
  1527. struct tree_fixed_cst GTY ((tag ("TS_FIXED_CST"))) fixed_cst;
  1528. struct tree_vector GTY ((tag ("TS_VECTOR"))) vector;
  1529. struct tree_string GTY ((tag ("TS_STRING"))) string;
  1530. struct tree_complex GTY ((tag ("TS_COMPLEX"))) complex;
  1531. struct tree_identifier GTY ((tag ("TS_IDENTIFIER"))) identifier;
  1532. struct tree_decl_minimal GTY((tag ("TS_DECL_MINIMAL"))) decl_minimal;
  1533. struct tree_decl_common GTY ((tag ("TS_DECL_COMMON"))) decl_common;
  1534. struct tree_decl_with_rtl GTY ((tag ("TS_DECL_WRTL"))) decl_with_rtl;
  1535. struct tree_decl_non_common GTY ((tag ("TS_DECL_NON_COMMON")))
  1536. decl_non_common;
  1537. struct tree_parm_decl GTY ((tag ("TS_PARM_DECL"))) parm_decl;
  1538. struct tree_decl_with_vis GTY ((tag ("TS_DECL_WITH_VIS"))) decl_with_vis;
  1539. struct tree_var_decl GTY ((tag ("TS_VAR_DECL"))) var_decl;
  1540. struct tree_field_decl GTY ((tag ("TS_FIELD_DECL"))) field_decl;
  1541. struct tree_label_decl GTY ((tag ("TS_LABEL_DECL"))) label_decl;
  1542. struct tree_result_decl GTY ((tag ("TS_RESULT_DECL"))) result_decl;
  1543. struct tree_const_decl GTY ((tag ("TS_CONST_DECL"))) const_decl;
  1544. struct tree_type_decl GTY ((tag ("TS_TYPE_DECL"))) type_decl;
  1545. struct tree_function_decl GTY ((tag ("TS_FUNCTION_DECL"))) function_decl;
  1546. struct tree_translation_unit_decl GTY ((tag ("TS_TRANSLATION_UNIT_DECL")))
  1547. translation_unit_decl;
  1548. struct tree_type_common GTY ((tag ("TS_TYPE_COMMON"))) type_common;
  1549. struct tree_type_with_lang_specific GTY ((tag ("TS_TYPE_WITH_LANG_SPECIFIC")))
  1550. type_with_lang_specific;
  1551. struct tree_type_non_common GTY ((tag ("TS_TYPE_NON_COMMON")))
  1552. type_non_common;
  1553. struct tree_list GTY ((tag ("TS_LIST"))) list;
  1554. struct tree_vec GTY ((tag ("TS_VEC"))) vec;
  1555. struct tree_exp GTY ((tag ("TS_EXP"))) exp;
  1556. struct tree_ssa_name GTY ((tag ("TS_SSA_NAME"))) ssa_name;
  1557. struct tree_block GTY ((tag ("TS_BLOCK"))) block;
  1558. struct tree_binfo GTY ((tag ("TS_BINFO"))) binfo;
  1559. struct tree_statement_list GTY ((tag ("TS_STATEMENT_LIST"))) stmt_list;
  1560. struct tree_constructor GTY ((tag ("TS_CONSTRUCTOR"))) constructor;
  1561. struct tree_omp_clause GTY ((tag ("TS_OMP_CLAUSE"))) omp_clause;
  1562. struct tree_optimization_option GTY ((tag ("TS_OPTIMIZATION"))) optimization;
  1563. struct tree_target_option GTY ((tag ("TS_TARGET_OPTION"))) target_option;
  1564. };
  1565. /* Structure describing an attribute and a function to handle it. */
  1566. struct attribute_spec {
  1567. /* The name of the attribute (without any leading or trailing __),
  1568. or NULL to mark the end of a table of attributes. */
  1569. const char *name;
  1570. /* The minimum length of the list of arguments of the attribute. */
  1571. int min_length;
  1572. /* The maximum length of the list of arguments of the attribute
  1573. (-1 for no maximum). */
  1574. int max_length;
  1575. /* Whether this attribute requires a DECL. If it does, it will be passed
  1576. from types of DECLs, function return types and array element types to
  1577. the DECLs, function types and array types respectively; but when
  1578. applied to a type in any other circumstances, it will be ignored with
  1579. a warning. (If greater control is desired for a given attribute,
  1580. this should be false, and the flags argument to the handler may be
  1581. used to gain greater control in that case.) */
  1582. bool decl_required;
  1583. /* Whether this attribute requires a type. If it does, it will be passed
  1584. from a DECL to the type of that DECL. */
  1585. bool type_required;
  1586. /* Whether this attribute requires a function (or method) type. If it does,
  1587. it will be passed from a function pointer type to the target type,
  1588. and from a function return type (which is not itself a function
  1589. pointer type) to the function type. */
  1590. bool function_type_required;
  1591. /* Specifies if attribute affects type's identity. */
  1592. bool affects_type_identity;
  1593. /* Function to handle this attribute. NODE points to the node to which
  1594. the attribute is to be applied. If a DECL, it should be modified in
  1595. place; if a TYPE, a copy should be created. NAME is the canonicalized
  1596. name of the attribute i.e. without any leading or trailing underscores.
  1597. ARGS is the TREE_LIST of the arguments (which may be NULL). FLAGS gives
  1598. further information about the context of the attribute. Afterwards, the
  1599. attributes will be added to the DECL_ATTRIBUTES or TYPE_ATTRIBUTES, as
  1600. appropriate, unless *NO_ADD_ATTRS is set to true (which should be done on
  1601. error, as well as in any other cases when the attributes should not be
  1602. added to the DECL or TYPE). Depending on FLAGS, any attributes to be
  1603. applied to another type or DECL later may be returned;
  1604. otherwise the return value should be NULL_TREE. This pointer may be
  1605. NULL if no special handling is required beyond the checks implied
  1606. by the rest of this structure. */
  1607. tree (*handler) (tree *node, tree name, tree args,
  1608. int flags, bool *no_add_attrs);
  1609. /* Specifies the name of an attribute that's mutually exclusive with
  1610. this one, and whether the relationship applies to the function,
  1611. variable, or type form of the attribute. */
  1612. struct exclusions {
  1613. const char *name;
  1614. bool function;
  1615. bool variable;
  1616. bool type;
  1617. };
  1618. /* An array of attribute exclusions describing names of other attributes
  1619. that this attribute is mutually exclusive with. */
  1620. const exclusions *exclude;
  1621. };
  1622. /* These functions allow a front-end to perform a manual layout of a
  1623. RECORD_TYPE. (For instance, if the placement of subsequent fields
  1624. depends on the placement of fields so far.) Begin by calling
  1625. start_record_layout. Then, call place_field for each of the
  1626. fields. Then, call finish_record_layout. See layout_type for the
  1627. default way in which these functions are used. */
  1628. typedef struct record_layout_info_s {
  1629. /* The RECORD_TYPE that we are laying out. */
  1630. tree t;
  1631. /* The offset into the record so far, in bytes, not including bits in
  1632. BITPOS. */
  1633. tree offset;
  1634. /* The last known alignment of SIZE. */
  1635. unsigned int offset_align;
  1636. /* The bit position within the last OFFSET_ALIGN bits, in bits. */
  1637. tree bitpos;
  1638. /* The alignment of the record so far, in bits. */
  1639. unsigned int record_align;
  1640. /* The alignment of the record so far, ignoring #pragma pack and
  1641. __attribute__ ((packed)), in bits. */
  1642. unsigned int unpacked_align;
  1643. /* The previous field laid out. */
  1644. tree prev_field;
  1645. /* The static variables (i.e., class variables, as opposed to
  1646. instance variables) encountered in T. */
  1647. vec<tree, va_gc> *pending_statics;
  1648. /* Bits remaining in the current alignment group */
  1649. int remaining_in_alignment;
  1650. /* True if we've seen a packed field that didn't have normal
  1651. alignment anyway. */
  1652. int packed_maybe_necessary;
  1653. } *record_layout_info;
  1654. /* Iterator for going through the function arguments. */
  1655. struct function_args_iterator {
  1656. tree next; /* TREE_LIST pointing to the next argument */
  1657. };
  1658. /* Structures to map from a tree to another tree. */
  1659. struct GTY(()) tree_map_base {
  1660. tree from;
  1661. };
  1662. /* Map from a tree to another tree. */
  1663. struct GTY((for_user)) tree_map {
  1664. struct tree_map_base base;
  1665. unsigned int hash;
  1666. tree to;
  1667. };
  1668. /* Map from a decl tree to another tree. */
  1669. struct GTY((for_user)) tree_decl_map {
  1670. struct tree_map_base base;
  1671. tree to;
  1672. };
  1673. /* Map from a tree to an int. */
  1674. struct GTY((for_user)) tree_int_map {
  1675. struct tree_map_base base;
  1676. unsigned int to;
  1677. };
  1678. /* Map from a decl tree to a tree vector. */
  1679. struct GTY((for_user)) tree_vec_map {
  1680. struct tree_map_base base;
  1681. vec<tree, va_gc> *to;
  1682. };
  1683. /* Abstract iterators for CALL_EXPRs. These static inline definitions
  1684. have to go towards the end of tree.h so that union tree_node is fully
  1685. defined by this point. */
  1686. /* Structure containing iterator state. */
  1687. struct call_expr_arg_iterator {
  1688. tree t; /* the call_expr */
  1689. int n; /* argument count */
  1690. int i; /* next argument index */
  1691. };
  1692. struct const_call_expr_arg_iterator {
  1693. const_tree t; /* the call_expr */
  1694. int n; /* argument count */
  1695. int i; /* next argument index */
  1696. };
  1697. /* The builtin_info structure holds the FUNCTION_DECL of the standard builtin
  1698. function, and flags. */
  1699. struct GTY(()) builtin_info_type {
  1700. tree decl;
  1701. /* Whether the user can use <xxx> instead of explicitly using calls
  1702. to __builtin_<xxx>. */
  1703. unsigned implicit_p : 1;
  1704. /* Whether the user has provided a declaration of <xxx>. */
  1705. unsigned declared_p : 1;
  1706. };
  1707. /* Information about a _FloatN or _FloatNx type that may be
  1708. supported. */
  1709. struct floatn_type_info {
  1710. /* The number N in the type name. */
  1711. int n;
  1712. /* Whether it is an extended type _FloatNx (true) or an interchange
  1713. type (false). */
  1714. bool extended;
  1715. };
  1716. /*---------------------------------------------------------------------------
  1717. Global variables
  1718. ---------------------------------------------------------------------------*/
  1719. /* Matrix describing the structures contained in a given tree code. */
  1720. extern bool tree_contains_struct[MAX_TREE_CODES][64];
  1721. /* Class of tree given its code. */
  1722. extern const enum tree_code_class tree_code_type[];
  1723. /* Each tree code class has an associated string representation.
  1724. These must correspond to the tree_code_class entries. */
  1725. extern const char *const tree_code_class_strings[];
  1726. /* Number of argument-words in each kind of tree-node. */
  1727. extern const unsigned char tree_code_length[];
  1728. /* Vector of all alias pairs for global symbols. */
  1729. extern GTY(()) vec<alias_pair, va_gc> *alias_pairs;
  1730. /* Names of all the built_in classes. */
  1731. extern const char *const built_in_class_names[BUILT_IN_LAST];
  1732. /* Names of all the built_in functions. */
  1733. extern const char * built_in_names[(int) END_BUILTINS];
  1734. /* Number of operands and names for each OMP_CLAUSE node. */
  1735. extern unsigned const char omp_clause_num_ops[];
  1736. extern const char * const omp_clause_code_name[];
  1737. /* A vector of all translation-units. */
  1738. extern GTY (()) vec<tree, va_gc> *all_translation_units;
  1739. /* Vector of standard trees used by the C compiler. */
  1740. extern GTY(()) tree global_trees[TI_MAX];
  1741. /* The standard C integer types. Use integer_type_kind to index into
  1742. this array. */
  1743. extern GTY(()) tree integer_types[itk_none];
  1744. /* Types used to represent sizes. */
  1745. extern GTY(()) tree sizetype_tab[(int) stk_type_kind_last];
  1746. /* Arrays for keeping track of tree node statistics. */
  1747. extern uint64_t tree_node_counts[];
  1748. extern uint64_t tree_node_sizes[];
  1749. /* True if we are in gimple form and the actions of the folders need to
  1750. be restricted. False if we are not in gimple form and folding is not
  1751. restricted to creating gimple expressions. */
  1752. extern bool in_gimple_form;
  1753. /* Functional interface to the builtin functions. */
  1754. extern GTY(()) builtin_info_type builtin_info[(int)END_BUILTINS];
  1755. /* If nonzero, an upper limit on alignment of structure fields, in bits, */
  1756. extern unsigned int maximum_field_alignment;
  1757. /* Points to the FUNCTION_DECL of the function whose body we are reading. */
  1758. extern GTY(()) tree current_function_decl;
  1759. /* Nonzero means a FUNC_BEGIN label was emitted. */
  1760. extern GTY(()) const char * current_function_func_begin_label;
  1761. /* Information about the _FloatN and _FloatNx types. */
  1762. extern const floatn_type_info floatn_nx_types[NUM_FLOATN_NX_TYPES];
  1763. #endif // GCC_TREE_CORE_H