Deutsch   English   Français   Italiano  
<d5e39002d01a02167dd49b278f209eb5@www.novabbs.org>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: news.eternal-september.org!eternal-september.org!feeder3.eternal-september.org!news.quux.org!news.nk.ca!rocksolid2!i2pn2.org!.POSTED!not-for-mail
From: mitchalsup@aol.com (MitchAlsup1)
Newsgroups: comp.arch
Subject: Re: auto predicating branches
Date: Tue, 22 Apr 2025 16:45:20 +0000
Organization: Rocksolid Light
Message-ID: <d5e39002d01a02167dd49b278f209eb5@www.novabbs.org>
References: <vbgdms$152jq$1@dont-email.me> <vfvi1f$2kp4s$1@dont-email.me> <vgerdr$1v4nd$1@dont-email.me> <vtptau$3p73s$1@dont-email.me> <vtq6vh$39sli$1@dont-email.me> <Is7MP.2098019$OrR5.521315@fx18.iad> <4f65d9544ad95edc8b07c869f9921a35@www.novabbs.org> <vtsbga$1tu26$1@dont-email.me> <b8859e8d6b909a4505c0f487a6a0fe35@www.novabbs.org> <vu2542$38qev$1@dont-email.me> <vu46su$1170i$1@dont-email.me> <2025Apr21.080532@mips.complang.tuwien.ac.at> <d47cdad26528b4d2309ac9df60120315@www.novabbs.org> <2025Apr22.071010@mips.complang.tuwien.ac.at>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org;
	logging-data="1429833"; mail-complaints-to="usenet@i2pn2.org";
	posting-account="o5SwNDfMfYu6Mv4wwLiW6e/jbA93UAdzFodw5PEa6eU";
User-Agent: Rocksolid Light
X-Rslight-Posting-User: cb29269328a20fe5719ed6a1c397e21f651bda71
X-Spam-Checker-Version: SpamAssassin 4.0.0
X-Rslight-Site: $2y$10$q6lrUbv4eGY2dHgyGqyQXerJRdzAHWaG3MUtBEUyIBOtUuurYaPee

On Tue, 22 Apr 2025 5:10:10 +0000, Anton Ertl wrote:

> mitchalsup@aol.com (MitchAlsup1) writes:
--------------
>>
>>My argument is that this is a SW decision (in the compiler) not a
>>HW decision (other than providing the PREDs).
>
> That's a position, not an argument.  Do you have an argument for your
> position?

Architecture defines the primitives, Hardware provides the primitives,
SW decides to use them (or not) on a case-by-case basis.

>>Since PREDs are not
>>predicted (unless you think they are predicted BOTH ways) they do
>>not diminish the performance of the branch predictors.
>
> Nor increase it.

When there is an else-clause, the PRED uses 1 fewer instruction:
the branch that exits the then-clause and jumps over the else-
clause does not exist.

>                   But it sounds like you think that the compiler
> should choose predication when the condition is not particularly
> predictable.  How should the compiler know that?

Compiler is setup to use PRED when the then-clause is 8 or fewer
instructions and when the else clause is 8 or fewer instructions,
otherwise it uses branches.
----------
>
> - anton