代码拉取完成,页面将自动刷新
From 0dcb4f52399f0ba06ee72c54622aaf1c95da18e5 Mon Sep 17 00:00:00 2001
From: h00564365 <[email protected]>
Date: Thu, 21 Nov 2024 11:57:48 +0800
Subject: [PATCH] ipa-modify
---
gcc/ipa-inline.cc | 30 ++++++++++++++++++------------
1 file changed, 18 insertions(+), 12 deletions(-)
diff --git a/gcc/ipa-inline.cc b/gcc/ipa-inline.cc
index 4e93652bb..8d5cc9a84 100644
--- a/gcc/ipa-inline.cc
+++ b/gcc/ipa-inline.cc
@@ -229,7 +229,7 @@ caller_growth_limits (struct cgraph_edge *e)
the function is located. */
static void
-prompt_inline_failed_reason (struct cgraph_edge *e)
+prompt_inline_failed_target_option_reason (struct cgraph_edge *e)
{
static std::set<std::pair<void*, void*>> address_pair_set;
if (e->inline_failed == CIF_TARGET_OPTION_MISMATCH
@@ -289,7 +289,8 @@ report_inline_failed_reason (struct cgraph_edge *e)
(dump_file, 2, opts_for_fn (e->caller->decl),
opts_for_fn (e->callee->ultimate_alias_target ()->decl));
}
- prompt_inline_failed_reason (e);
+
+ prompt_inline_failed_target_option_reason (e);
}
/* Decide whether sanitizer-related attributes allow inlining. */
@@ -351,18 +352,23 @@ sanitize_attrs_match_for_inline_p (const_tree caller, const_tree callee)
static cgraph_node *
find_related_node_lto_file_data (cgraph_node *node)
{
- struct ipa_ref *ref = NULL;
-
- /* Switch to the original function, for example xxx.constprop.x function. */
- if (node->clone_of)
- node = node->clone_of;
+ cgraph_node *cur = node;
- /* Find the lto_file_data information of referring. */
- for (int i = 0; node->iterate_referring (i, ref); i++)
+ while (cur->clone_of)
{
- struct cgraph_node *cnode = dyn_cast <cgraph_node *> (ref->referring);
- if (cnode && cnode->lto_file_data)
- return cnode;
+ /* Switch to original node, for example xxx.constprop.x function. */
+ cur = cur->clone_of;
+ if (cur->lto_file_data)
+ return cur;
+
+ /* Find the lto_file_data information of referring. */
+ struct ipa_ref *ref = NULL;
+ for (int i = 0; cur->iterate_referring (i, ref); i++)
+ {
+ struct cgraph_node *cnode = dyn_cast <cgraph_node *> (ref->referring);
+ if (cnode && cnode->lto_file_data)
+ return cnode;
+ }
}
return NULL;
--
2.28.0.windows.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。