[Libre-soc-bugs] [Bug 1229] fosdem2024 llvm simple-v

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Sun Dec 3 10:04:11 GMT 2023


https://bugs.libre-soc.org/show_bug.cgi?id=1229

--- Comment #12 from Jacob Lifshay <programmerjake at gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #10)
> (In reply to Jacob Lifshay from comment #9)
> 
> > actually, attributes have gotten a whole lot better recently, since C/C++
> > introduced a new attribute syntax:
> 
> please please i know you love "latest and greatest" but it severely
> interferes with simplicity and practical "get-it-done-in-scope-on-budget"
> 
> > e.g.:
> > [[noreturn]] 
> 
> **NO**. absolutely not. end of this line of reasoning.
> i said ANY deviation from standard c is unacceptable.

well, too bad, *any* syntax we use to express SV operations is not standard C
(including the `register` array syntax, the C standard doesn't really allow you
to use register on arrays).

why not use the syntax *standard* C explicitly provides for extensions instead
of inventing our own in a way that seems like a syntax land-grab (which is what
just using `register` like that seems to me and probably to other compiler
devs)?

> 
> it interferes with the addition of autovectorisation
> passes, later [alexandre oliva is the leading expert
> in gcc autovectorisation]

this is C *syntax*, by the time any autovectorization passes are run,
*everything* is in compiler IR, and essentially *none* of the source syntax is
left. compiler IR is *not* C. if we pick `register` or if we pick `[[sv_vec]]`
they will both translate to the same compiler IR.

> plus can you imagine the nightmare of porting? hundreds
> of millions of lines of code, stupid "attributes" all
> over the place whilst we raise the USD 50 million to have
> a go at proper autovectorisation in both gcc and llvm?

autovectorization is independent of which C frontend syntax we pick.

the whole point of autovectorization is to automatically convert *scalar code*
to vectorized code, so any way we express SV operations, that's manual
vectorization, so the autovectorizer doesn't generally do anything with the
manually vectorized code.

> we have to be *smart* about this jacob.

yes, we have to make arguments that hold water if we're going to try to argue
for or against attributes.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the libre-soc-bugs mailing list