[Libre-soc-bugs] [Bug 1229] fosdem2024 llvm simple-v
bugzilla-daemon at libre-soc.org
bugzilla-daemon at libre-soc.org
Sun Dec 3 05:12:52 GMT 2023
https://bugs.libre-soc.org/show_bug.cgi?id=1229
--- Comment #9 from Jacob Lifshay <programmerjake at gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #5)
> attributes will make programmer's lives hell (unreadable crap).
actually, attributes have gotten a whole lot better recently, since C/C++
introduced a new attribute syntax:
e.g.:
[[noreturn]] void f() {
abort();
}
instead of:
void f() __attribute__((noreturn));
void f() {
abort();
}
so I think something like this could be good:
say you want a vector with MAXVL=12, VL=vl, SUBVL=3, and element type float:
[[sv_vec(12)]] float my_vector[vl][3];
or a fixed-length vector with MAXVL=VL=21, SUBVL=1, and element type uint16_t:
[[sv_vec]] uint16_t my_vector2[21];
the [[sv_vec]] could also go at the end if you prefer that (C/C++ lets you put
it a few different places):
uint16_t my_vector2[21] [[sv_vec]];
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the libre-soc-bugs
mailing list