diff --git a/docs/writeup.txt b/docs/writeup.txt index f9ceeb6..dd2fb07 100644 --- a/docs/writeup.txt +++ b/docs/writeup.txt @@ -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 -> plugin callback in build_component_ref (0 miss rate) -> 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 diff --git a/playground/spslr_pinpoint.cpp b/playground/spslr_pinpoint.cpp index e0cfef6..14c49f4 100644 --- a/playground/spslr_pinpoint.cpp +++ b/playground/spslr_pinpoint.cpp @@ -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_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; log_component_refs_pass_info.pass = new log_component_refs_pass(nullptr);