-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid loop bounds in rijndael benchmarks #44
Comments
Dear all,
I don't know about the Tacle-bench functions, but loop bounds that are zero can indeed be meaningful. Such bounds typically indicate that the loop is dead code that never is executed.
Best,
Björn Lisper
…________________________________
From: Emad Jacob Maroun ***@***.***>
Sent: Friday, April 5, 2024 4:34 PM
To: tacle/tacle-bench ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [tacle/tacle-bench] Invalid loop bounds in rijndael benchmarks (Issue #44)
[EXTERNAL MAIL - MDU]
VARNING: Detta epostmeddelande har sitt ursprung utanför MDU. Klicka inte på länkar och öppna inte bifogade filer om du inte känner igen avsändaren och vet att innehållet är säkert.
CAUTION: This email originated from outside of MDU. Do not click links or open attachments unless you recognize the sender and know the content is safe.
The two rijndael benchmarks rijndael_dec and rijndael_enc have invalid loop bounds that mean they cannot be WCET analyzed.
For rijndael_dec, the problem is in aes.c's rijndael_dec_set_keyfunction where a do-while loop (line 90) is given the bounds_Pragma( "loopbound min 0 max 0" ). The same happens again on line 103. This cannot be ignored as this function is directly called from rijndael_dec_main` and so are part of the benchmarked code.
A 0 bound is meaningless and can therefore not be used as a basis for WCET analysis.
rijndael_enc has the exact same problem with its rijndael_enc_set_key function.
The true bounds for these loops must be found so the code can be corrected.
—
Reply to this email directly, view it on GitHub<#44>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADBJJSVQAFABCTHNK2JCPRDY32Y57AVCNFSM6AAAAABFZIRPLKVHI2DSMVQWIX3LMV43ASLTON2WKOZSGIZDQMJYGM4DKMA>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
@blisper could you elaborate on the usefulness of allowing upper bounds of 0? In which cases would a 0-bounded loop be preferable to just removing the code from the program? In this case specifically, the 0-bounds are set on do-while loops. do-while loops' bodies will be run at least once, contradicting the bound. Our Patmos compiler disallows do-while loops with a static 0-bound so that such contradictions can be caught at compile time. Therefore, I still feel a refinement of the bounds in these programs is preferable. |
Hi again all,
I was just pointing out that there are situations where zero loop bounds can make sense. Whether they are useful is another issue. And I have no idea whether the rijndael bounds are valid or not.
Best, Björn
…________________________________
From: Emad Jacob Maroun ***@***.***>
Sent: Thursday, April 11, 2024 11:25 AM
To: tacle/tacle-bench ***@***.***>
Cc: Björn Lisper ***@***.***>; Mention ***@***.***>
Subject: Re: [tacle/tacle-bench] Invalid loop bounds in rijndael benchmarks (Issue #44)
[EXTERNAL MAIL - MDU]
VARNING: Detta epostmeddelande har sitt ursprung utanför MDU. Klicka inte på länkar och öppna inte bifogade filer om du inte känner igen avsändaren och vet att innehållet är säkert.
CAUTION: This email originated from outside of MDU. Do not click links or open attachments unless you recognize the sender and know the content is safe.
@blisper<https://github.com/blisper> could you elaborate on the usefulness of allowing upper bounds of 0? In which cases would a 0-bounded loop be preferable to just removing the code from the program?
I'm here thinking only of statically known bounds of 0. I of course see the use of dynamic loop bounds (e.g. that an analyzer would find) evaluating to 0 under certain conditions.
In this case specifically, the 0-bounds are set on do-while loops. do-while loops' bodies will be run at least once, contradicting the bound. Our Patmos compiler disallows do-while loops with a static 0-bound so that such contradictions can be caught at compile time. Therefore, I still feel a refinement of the bounds in these programs is preferable.
—
Reply to this email directly, view it on GitHub<#44 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADBJJSUWJL6DPBOPMVMXVC3Y4ZJKBAVCNFSM6AAAAABFZIRPLKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBZGI4DIMZUGM>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
The two rijndael benchmarks
rijndael_dec
andrijndael_enc
have invalid loop bounds that mean they cannot be WCET analyzed.For
rijndael_dec
, the problem is inaes.c
'srijndael_dec_set_key
function where a do-while loop (line 90) is given the bounds_Pragma( "loopbound min 0 max 0" )
. The same happens again on line 103.This cannot be ignored as this function is directly called from
rijndael_dec_main
and so are part of the benchmarked code.A 0 bound is meaningless and can therefore not be used as a basis for WCET analysis.
rijndael_enc
has the exact same problem with itsrijndael_enc_set_key
function.The true bounds for these loops must be found so the code can be corrected.
The text was updated successfully, but these errors were encountered: