summaryrefslogtreecommitdiff
path: root/gcc/ipa-type-escape-analysis.h
blob: 7dcda948189c2c069ad5b8e548fffa2caca6a158 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef GCC_IPA_TYPE_ESCAPE_ANALYSIS_H
#define GCC_IPA_TYPE_ESCAPE_ANALYSIS_H
#pragma once

struct escaping_reason_s {
  unsigned global_is_visible : 1;
  unsigned parameter_is_visible : 1;
  unsigned return_is_visible : 1;
  unsigned type_is_casted : 1;
};
typedef struct escaping_reason_s escaping_reason;

struct escaping_info_s { const_tree type; bool is_escaping; escaping_reason reason; };
typedef struct escaping_info_s escaping_info;
//TODO: Maybe change this to a std::map?
//Can we get an idea of what conventions gcc want?
//Maybe I should ask...
typedef hash_map<const_tree, escaping_info> type_map;
void calculate_escaping_types(type_map&);

#endif