Updated writeup

This commit is contained in:
York Jasper Niebuhr 2025-10-21 16:50:47 +02:00
parent 201e2935ed
commit 28a8e64174
2 changed files with 4 additions and 1 deletions

View File

@ -25,3 +25,6 @@ Constant foldable expressions, e.g. "size_t myOffset = ((size_t)&((struct task_s
-> static assertions happen before plugin could restore const-ness -> static assertions happen before plugin could restore const-ness
-> plugin callback in build_component_ref (0 miss rate) -> plugin callback in build_component_ref (0 miss rate)
-> must be type compatible for fold_offsetof -> must be type compatible for fold_offsetof
CONSTRUCTORs are only turned into COMPONENT_REF at gimplification
-> early gimple pass (before cfg) to replace offsets with calls

View File

@ -695,7 +695,7 @@ int plugin_init (struct plugin_name_args *plugin_info, struct plugin_gcc_version
register_callback(plugin_info->base_name, PLUGIN_ATTRIBUTES, on_register_attributes, NULL); register_callback(plugin_info->base_name, PLUGIN_ATTRIBUTES, on_register_attributes, NULL);
register_callback(plugin_info->base_name, PLUGIN_FINISH_TYPE, on_type_complete, NULL); register_callback(plugin_info->base_name, PLUGIN_FINISH_TYPE, on_type_complete, NULL);
// TODO register_callback(plugin_info->base_name, PLUGIN_BUILD_COMPONENT_REF, on_build_component_ref, NULL); register_callback(plugin_info->base_name, PLUGIN_BUILD_COMPONENT_REF, on_build_component_ref, NULL);
struct register_pass_info log_component_refs_pass_info; struct register_pass_info log_component_refs_pass_info;
log_component_refs_pass_info.pass = new log_component_refs_pass(nullptr); log_component_refs_pass_info.pass = new log_component_refs_pass(nullptr);