public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug rtl-optimization/109351] New: RA uses lowest cost for the mode of different reg_classes w/o considering hard_regno_mode_ok. @ 2023-03-31 6:13 crazylht at gmail dot com 2023-03-31 7:40 ` [Bug rtl-optimization/109351] " ubizjak at gmail dot com ` (3 more replies) 0 siblings, 4 replies; 5+ messages in thread From: crazylht at gmail dot com @ 2023-03-31 6:13 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109351 Bug ID: 109351 Summary: RA uses lowest cost for the mode of different reg_classes w/o considering hard_regno_mode_ok. Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: crazylht at gmail dot com Target Milestone: --- 575 for (cl = (int) N_REG_CLASSES - 1; cl >= 0; cl--) 576 { 577 if (cl != (int) NO_REGS) 578 for (mode = 0; mode < MAX_MACHINE_MODE; mode++) 579 { 580 ira_max_memory_move_cost[mode][cl][0] 581 = ira_memory_move_cost[mode][cl][0] 582 = memory_move_cost ((machine_mode) mode, 583 (reg_class_t) cl, false); 584 ira_max_memory_move_cost[mode][cl][1] 585 = ira_memory_move_cost[mode][cl][1] 586 = memory_move_cost ((machine_mode) mode, 587 (reg_class_t) cl, true); 588 /* Costs for NO_REGS are used in cost calculation on the 589 1st pass when the preferred register classes are not 590 known yet. In this case we take the best scenario. */ 591 if (ira_memory_move_cost[mode][NO_REGS][0] 592 > ira_memory_move_cost[mode][cl][0]) 593 ira_max_memory_move_cost[mode][NO_REGS][0] 594 = ira_memory_move_cost[mode][NO_REGS][0] 595 = ira_memory_move_cost[mode][cl][0]; 596 if (ira_memory_move_cost[mode][NO_REGS][1] 597 > ira_memory_move_cost[mode][cl][1]) 598 ira_max_memory_move_cost[mode][NO_REGS][1] 599 = ira_memory_move_cost[mode][NO_REGS][1] 600 = ira_memory_move_cost[mode][cl][1]; 601 } 602 } It could be a potential performance issue. It's from PR108707. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug rtl-optimization/109351] RA uses lowest cost for the mode of different reg_classes w/o considering hard_regno_mode_ok. 2023-03-31 6:13 [Bug rtl-optimization/109351] New: RA uses lowest cost for the mode of different reg_classes w/o considering hard_regno_mode_ok crazylht at gmail dot com @ 2023-03-31 7:40 ` ubizjak at gmail dot com 2023-04-05 6:01 ` ubizjak at gmail dot com ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: ubizjak at gmail dot com @ 2023-03-31 7:40 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109351 Uroš Bizjak <ubizjak at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |vmakarov at gcc dot gnu.org --- Comment #1 from Uroš Bizjak <ubizjak at gmail dot com> --- Cc added. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug rtl-optimization/109351] RA uses lowest cost for the mode of different reg_classes w/o considering hard_regno_mode_ok. 2023-03-31 6:13 [Bug rtl-optimization/109351] New: RA uses lowest cost for the mode of different reg_classes w/o considering hard_regno_mode_ok crazylht at gmail dot com 2023-03-31 7:40 ` [Bug rtl-optimization/109351] " ubizjak at gmail dot com @ 2023-04-05 6:01 ` ubizjak at gmail dot com 2023-04-19 5:24 ` cvs-commit at gcc dot gnu.org 2023-04-23 1:59 ` crazylht at gmail dot com 3 siblings, 0 replies; 5+ messages in thread From: ubizjak at gmail dot com @ 2023-04-05 6:01 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109351 --- Comment #2 from Uroš Bizjak <ubizjak at gmail dot com> --- Patch at https://gcc.gnu.org/pipermail/gcc-patches/2023-April/615074.html ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug rtl-optimization/109351] RA uses lowest cost for the mode of different reg_classes w/o considering hard_regno_mode_ok. 2023-03-31 6:13 [Bug rtl-optimization/109351] New: RA uses lowest cost for the mode of different reg_classes w/o considering hard_regno_mode_ok crazylht at gmail dot com 2023-03-31 7:40 ` [Bug rtl-optimization/109351] " ubizjak at gmail dot com 2023-04-05 6:01 ` ubizjak at gmail dot com @ 2023-04-19 5:24 ` cvs-commit at gcc dot gnu.org 2023-04-23 1:59 ` crazylht at gmail dot com 3 siblings, 0 replies; 5+ messages in thread From: cvs-commit at gcc dot gnu.org @ 2023-04-19 5:24 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109351 --- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by hongtao Liu <liuhongt@gcc.gnu.org>: https://gcc.gnu.org/g:727be65ec40e119a7c864bfaa5d6a73547863c06 commit r14-57-g727be65ec40e119a7c864bfaa5d6a73547863c06 Author: liuhongt <hongtao.liu@intel.com> Date: Mon Apr 3 10:54:55 2023 +0800 Check hard_regno_mode_ok before setting lowest memory move cost for the mode with different reg classes. There's a potential performance issue when backend returns some unreasonable value for the mode which can be never be allocate with reg class. gcc/ChangeLog: PR rtl-optimization/109351 * ira.cc (setup_class_subset_and_memory_move_costs): Check hard_regno_mode_ok before setting lowest memory move cost for the mode with different reg classes. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug rtl-optimization/109351] RA uses lowest cost for the mode of different reg_classes w/o considering hard_regno_mode_ok. 2023-03-31 6:13 [Bug rtl-optimization/109351] New: RA uses lowest cost for the mode of different reg_classes w/o considering hard_regno_mode_ok crazylht at gmail dot com ` (2 preceding siblings ...) 2023-04-19 5:24 ` cvs-commit at gcc dot gnu.org @ 2023-04-23 1:59 ` crazylht at gmail dot com 3 siblings, 0 replies; 5+ messages in thread From: crazylht at gmail dot com @ 2023-04-23 1:59 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109351 Hongtao.liu <crazylht at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #4 from Hongtao.liu <crazylht at gmail dot com> --- Fixed in GCC14 ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-04-23 1:59 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2023-03-31 6:13 [Bug rtl-optimization/109351] New: RA uses lowest cost for the mode of different reg_classes w/o considering hard_regno_mode_ok crazylht at gmail dot com 2023-03-31 7:40 ` [Bug rtl-optimization/109351] " ubizjak at gmail dot com 2023-04-05 6:01 ` ubizjak at gmail dot com 2023-04-19 5:24 ` cvs-commit at gcc dot gnu.org 2023-04-23 1:59 ` crazylht at gmail dot com
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).