1 /* 2 * Copyright (c) 2007-2019, NVIDIA CORPORATION. All rights reserved. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 * 16 */ 17 18 #ifndef CCFFINFO_H_ 19 #define CCFFINFO_H_ 20 21 /** 22 \file ccffinfo.h 23 \brief function prototypes and macros for ccffinfo. 24 Function prototypes and macros for common compiler feedback format module 25 */ 26 27 #define CCFFVERSION "0.9" 28 29 #include <stdarg.h> 30 31 void *ccff_bih_info(int msgtype, const char *msgid, int bihx, 32 const char *message, ...); 33 34 void *subccff_bih_info(void *xparent, int msgtype, const char *msgid, int bihx, 35 const char *message, ...); 36 37 void *subccff_ilt_info(void *xparent, int msgtype, const char *msgid, int iltx, 38 int bihx, const char *message, ...); 39 40 void *ccff_ilt_info(int msgtype, const char *msgid, int iltx, int bihx, 41 const char *message, ...); 42 43 void ccff_init_f90(void); 44 void ipa_report(void); /* ipa.c */ 45 46 /* 47 * message type, low bit means 'neg' 48 */ 49 #define MSGINLINER 0x02 50 #define MSGNEGINLINER 0x03 51 #define MSGLOOP 0x04 52 #define MSGNEGLOOP 0x05 53 #define MSGLRE 0x06 54 #define MSGNEGLRE 0x07 55 #define MSGINTENSITY 0x08 56 #define MSGIPA 0x0a 57 #define MSGNEGIPA 0x0b 58 #define MSGFUSE 0x0c 59 #define MSGNEGFUSE 0x0d 60 #define MSGVECT 0x0e 61 #define MSGNEGVECT 0x0f 62 #define MSGOPENMP 0x10 63 #define MSGOPT 0x12 64 #define MSGNEGOPT 0x13 65 #define MSGPREFETCH 0x14 66 #define MSGFTN 0x16 67 #define MSGPAR 0x18 68 #define MSGNEGPAR 0x19 69 #define MSGHPF 0x1a 70 #define MSGPFO 0x1c 71 #define MSGNEGPFO 0x1d 72 #define MSGACCEL 0x1e 73 #define MSGNEGACCEL 0x1f 74 #define MSGUNIFIED 0x20 75 #define MSGCVECT 0x22 76 #define MSGNEGCVECT 0x23 77 #define MSGOMPACCEL 0x24 78 #define MSGPCAST 0x25 79 80 int addfile(char *filename, char *funcname, int tag, int flags, int lineno, 81 int srcline, int level); 82 83 /** 84 \brief ... 85 */ 86 int addinlfile(char *filename, char *funcname, int tag, int flags, int lineno, int srcline, int level, int parent); 87 88 /** 89 \brief ... 90 */ 91 int subfih(int fihindex, int tag, int flags, int lineno); 92 93 /** 94 \brief ... 95 */ 96 void ccff_build(char *options, char *language); 97 98 /** 99 \brief ... 100 */ 101 void ccff_cleanup_children_deferred(void); 102 103 /** 104 \brief ... 105 */ 106 void ccff_close_unit_deferred(void); 107 108 /** 109 \brief ... 110 */ 111 void ccff_close_unit(void); 112 113 /** 114 \brief ... 115 */ 116 void ccff_close(void); 117 118 /** 119 \brief ... 120 */ 121 void *ccff_func_info(int msgtype, const char *msgid, char *funcname, 122 const char *message, ...); 123 124 /** 125 \brief ... 126 */ 127 void *ccff_info(int msgtype, const char *msgid, int fihx, int lineno, const char *message, ...); 128 129 /** 130 \brief ... 131 */ 132 void *_ccff_info(int msgtype, const char *msgid, int fihx, int lineno, 133 const char *varname, const char *funcname, 134 const void *xparent, const char *message, va_list argptr); 135 136 /** 137 \brief ... 138 */ 139 void ccff_open(char *ccff_filename, char *srcfile); 140 141 /** 142 \brief ... 143 */ 144 void ccff_open_unit_deferred(void); 145 146 /** 147 \brief ... 148 */ 149 void ccff_open_unit(void); 150 151 /** 152 \brief ... 153 */ 154 void ccff_seq(int seq); 155 156 /** 157 \brief ... 158 */ 159 void *ccff_var_info(int msgtype, const char *msgid, char *varname, const char *message, ...); 160 161 /** 162 \brief ... 163 */ 164 void dumpmessagelist(int nmessages); 165 166 /** 167 \brief ... 168 */ 169 void fih_fini(void); 170 171 /** 172 \brief ... 173 */ 174 void print_fih(void); 175 176 /** 177 \brief ... 178 */ 179 void print_ifih(void); 180 181 /** 182 \brief ... 183 */ 184 void restore_ccff_mark(void); 185 186 /** 187 \brief ... 188 */ 189 void save_ccff_arg(char *argname, char *argvalue); 190 191 /** 192 \brief ... 193 */ 194 void save_ccff_mark(void); 195 196 /** 197 \brief ... 198 */ 199 void save_ccff_msg(int msgtype, const char *msgid, int fihx, int lineno, 200 const char *varname, const char *funcname); 201 202 /** 203 \brief ... 204 */ 205 void save_ccff_text(char *message); 206 207 /** 208 \brief ... 209 */ 210 void set_allfiles(int save); 211 212 /** 213 \brief ... 214 */ 215 void setfile(int f, char *funcname, int tag); 216 217 /** 218 \brief ... 219 */ 220 void *subccff_info(void *xparent, int msgtype, const char *msgid, int fihx, 221 int lineno, const char *message, ...); 222 223 #endif 224