GCC Middle and Back End API Reference
custom-sarif-properties/cfg.h
Go to the documentation of this file.
1/* Extra properties for CFGs in SARIF property bags.
2 Copyright (C) 2025 Free Software Foundation, Inc.
3 Contributed by David Malcolm <dmalcolm@redhat.com>.
4
5This file is part of GCC.
6
7GCC is free software; you can redistribute it and/or modify it under
8the terms of the GNU General Public License as published by the Free
9Software Foundation; either version 3, or (at your option) any later
10version.
11
12GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13WARRANTY; without even the implied warranty of MERCHANTABILITY or
14FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15for more details.
16
17You should have received a copy of the GNU General Public License
18along with GCC; see the file COPYING3. If not see
19<http://www.gnu.org/licenses/>. */
20
21#ifndef GCC_CUSTOM_SARIF_PROPERTIES_CFG_H
22#define GCC_CUSTOM_SARIF_PROPERTIES_CFG_H
23
24/* SARIF property names relating to GCC's CFGs. */
25
27 namespace cfg {
28 namespace graph {
31 }
32
33 // node kinds: "function", "loop", or "basic_block"
34
35 // For node_kind: "loop":
36 namespace loop {
37 extern const json::integer_property num;
38 extern const json::integer_property depth;
39 }
40 // For node_kind: "basic_block":
41 namespace basic_block {
42 extern const json::string_property kind;
43 extern const json::integer_property index;
44 extern const json::string_property count; // profile info
45 namespace gimple {
48 }
49 namespace rtl {
51 }
52 }
53
54 namespace node {
55 extern const json::string_property kind;
56 }
57 namespace edge {
60 }
61 }
62}
63
64#endif /* ! GCC_CUSTOM_SARIF_PROPERTIES_CFG_H */
Definition custom-sarif-properties/cfg.h:45
const json::array_of_string_property stmts
const json::array_of_string_property phis
Definition custom-sarif-properties/cfg.h:49
const json::array_of_string_property insns
Definition custom-sarif-properties/cfg.h:41
const json::string_property kind
const json::integer_property index
const json::string_property count
Definition custom-sarif-properties/cfg.h:57
const json::integer_property probability_pc
const json::array_of_string_property flags
const json::integer_property pass_number
const json::string_property pass_name
Definition custom-sarif-properties/cfg.h:36
const json::integer_property depth
const json::integer_property num
const json::string_property kind
Definition custom-sarif-properties/cfg.h:27
Definition custom-sarif-properties/state-graphs.h:30
Definition custom-sarif-properties/state-graphs.h:33
Definition custom-sarif-properties/cfg.h:26
property< integer_number > integer_property
Definition json.h:138
property< array > array_of_string_property
Definition json.h:141
property< string > string_property
Definition json.h:137