Skip to content

Conversation

@Alexehv77
Copy link
Contributor

dejagnu fix

artemiy-volkov and others added 9 commits November 28, 2025 21:03
The Synopsys RMX-100 has a short, three-stage, in-order execution pipeline.

The option -mmpy-option was added to control which version of the MPY
unit the core has and what the latency of multiply instructions should
be similar to ARCv2 cores (see gcc/config/arc/arc.opt:60).

Authored-by: Artemiy Volkov <[email protected]>
Signed-off-by: Michiel Derhaeg <[email protected]>
The Synopsys RHX-100 has a 10-stage, dual-issue, in-order execution
pipeline.

It has support for instruction fusion, which will be addressed by
subsequent patches.
Signed-off-by: Luis Silva <[email protected]>
@Alexehv77 Alexehv77 self-assigned this Dec 15, 2025
Copy link
Member

@luismgsilva luismgsilva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use the contrib/check_GNU_style.sh script and fix the syntax according to the codebase.

$ git format-patch -1
0001...
$ bash contribu/check_GNU_style.sh 0001...

/*return the next possible fusible insn. */

rtx_insn *
next_p_fusible_insn (rtx_insn *insn)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the "arcv_" prefix in the function name.

continue;

if(GET_CODE(insn) == BARRIER)
continue;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix indentation.

|| !NONDEBUG_INSN_P (next_insn (ready[*n_readyp - i]))
|| !SCHED_GROUP_P (next_insn (ready[*n_readyp - i])))
rtx_insn* next_insn = next_p_fusible_insn (ready[*n_readyp - i]);
/*try to fuse the last_scheduled_insn with */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to leave the comments these must follow the correct structure.

/* This is a comment.  */

/*try to fuse the last_scheduled_insn with */
if (NONDEBUG_INSN_P (ready[*n_readyp - i]) /*fuse only with nondebug insn*/
&& !SCHED_GROUP_P (ready[*n_readyp - i]) /*which have not been already fused*/
&& (!next_insn
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
&& (!next_insn
&& (!next_insn || !SCHED_GROUP_P (next_insn))

&& arcv_macro_fusion_pair_p (sched_state.last_scheduled_insn,
ready[*n_readyp - i]))
&& active_insn_p (ready[*n_readyp - i])
&& (!next_insn
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
&& (!next_insn
&& (!next_insn || !SCHED_GROUP_P (next_insn))

&& active_insn_p (ready[*n_readyp - i])
&& (!next_insn
|| !SCHED_GROUP_P (next_insn))
&& arcv_macro_fusion_pair_p (sched_state.last_scheduled_insn, ready[*n_readyp - i]))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to change this line.

sched_state.last_scheduled_insn = 0;
}

/*return the next possible fusible insn. */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix the comment.

&& arcv_macro_fusion_pair_p (sched_state.last_scheduled_insn, ready[*n_readyp - i]))
{
if (get_attr_type (ready[*n_readyp - i]) == TYPE_LOAD
if (GET_CODE(PATTERN(ready[*n_readyp - i])) == USE)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Syntax.

&& recog_memoized (next_insn (ready[*n_readyp - i])) >= 0
&& get_attr_type (next_insn (ready[*n_readyp - i])) != TYPE_LOAD
&& get_attr_type (next_insn (ready[*n_readyp - i])) != TYPE_STORE)))
&& (!next_insn || !SCHED_GROUP_P (next_insn)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Align indentation with the above conditions.

if(GET_CODE(insn) == BARRIER)
continue;

if(GET_CODE(PATTERN(insn)) == USE)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix syntax.


/*return the next possible fusible insn. */

rtx_insn *
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
rtx_insn *
static rtx_insn *

|| !SCHED_GROUP_P (next_insn (ready[*n_readyp - i])))
&& arcv_macro_fusion_pair_p (sched_state.last_scheduled_insn,
ready[*n_readyp - i]))
&& active_insn_p (ready[*n_readyp - i])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to check active_insn_p here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't that imply NONDEBUG_INSN_P?

/*return the next possible fusible insn. */

rtx_insn *
next_p_fusible_insn (rtx_insn *insn)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
next_p_fusible_insn (rtx_insn *insn)
next_fusible_insn (rtx_insn *insn)

Comment on lines +655 to +656
if (GET_CODE(PATTERN(ready[*n_readyp - i])) == USE)
continue;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to check for USE?

@luismgsilva luismgsilva force-pushed the michiel/fusion-trunk-3 branch 4 times, most recently from 39e1a5e to b64f328 Compare December 15, 2025 16:58
@luismgsilva
Copy link
Member

FYI: You need to rebase your patch on top of the branch again because the patches on michiel/fusion-trunk-3 have changed.

@luismgsilva luismgsilva force-pushed the michiel/fusion-trunk-3 branch 5 times, most recently from a33ab39 to 1f24597 Compare December 16, 2025 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants