Well, trying to improve std::vector::push_back for gcc and llvm. (Disclaimer with gcc's libstc++, didn't look into libc++ code though).
Llvm change: https://github.com/llvm/llvm-project/pull/222727 (from my team).
Gcc change i will be posting tonight or tomorrow depending on me getting it done.
We have always been at war^w alience with
Today has been a day where I get no work done. I hate it.
RE: @Elizafox@social.treehouse.systems
My branch predictor is my local llm.
GCC patches posted:
https://gcc.gnu.org/pipermail/gcc-patches/2026-September/731050.html
https://gcc.gnu.org/pipermail/gcc-patches/2026-September/731051.html
The first one is exactly what the LLVM patch does. But the second one is needed for GCC code generation; I have not looked into why LLVM does not need a similar patch (a reduced testcase for LLVM fails in the same way as GCC did).
I looked into libc++ code generation with push_back and I see the slow path is NOT inlined which might be causing performance issues too. libstdc++'s push_back inlined for both GCC and LLVM. GCC was also to shrink wrap the code but the LLVM bug there is https://github.com/llvm/llvm-project/issues/123120 .
at first I thought it was a different patch which was causing my bug. But it turns out it was something I Just totally forgot about. Anyways I know understand what is going wrong. A RaW dependancy that I missed could happen.
Today reminds me that I am not a super human and that I have only so much time in the day.
I try to have a good balance between cleanups and improvements for gcc.
In fact most of my cleanups are directly related to the improvements I am doing
I find the code that uses visit style programming bad.
Sorry LLVM; I think it is badly written code and is a bad style of code in general.
Yes some folks are adding that style to GCC for the rust front-end.
But I think there are better ways of writing the code. Especially when there are things like statements that would share the same code.
Yes I would say C++ code popularized it and I think it is poorly thought out code.
Look prototyping something should be fun and rewarding. Having a computer do it for you is boring and not rewarding.
Yes experience can make the prototyping faster but that is just like doing an outline of a book or an outline for drawing. Both are types of prototyping. You lay down the infrastructure of a drawing or book first via these outlines.
You could claim that your english instructions to the computer is an outline (yes it is but for a different reason than you think). And that the computer takes that outline and makes something. But it didn't make anything but rather it just took the words/tokens and did a search of previous work and put that all together. It created a derivative work of many things all mashed together. It didn't create anything new. Unlike when you create something .
[RFC PATCH 0/3] wasm: New backend (for GCC)
https://inbox.sourceware.org/gcc-patches/20260505223045.347444-2-feedabl3@gmail.com/
Sent out an RFC for GCC to turn off `-ftrapping-math` by default for C and C++.
This will make GCC inline for clang/LLVM.
A few years ago I would have recommened doing the opposite that is an RFC for Clang to change its default but looking into GCC more; GCC really does not implement -ftrapping-math correctly and seemly never has.
Canonical ceo Mark is huge tech bro who peaked on high school as obvious by his questions about experience during high school.
So his company choosing a half finished utils is just peak white cis male who peaked in high school.
"Woman are supposed to submissive."
That is the thinking of why tech bros call their chatbot by women pronouns.
Plain and simple.
It is the same reason why ships and cars are woman names too.
Nothing new here.
It is also why transwomen are not women to them because transwomen correct men.
It is always me I am the top of the food chain be submissive to me.
The whole chucked, calling men girls, etc. Happens too.
It is all interconnected.
Debugging a vrp miss optimization regression.
Lucky it is just a regression in gcc 16.
And only shows up in a small cases that I highly doubt it will affect real code.
If architecture of a building an art then is so architecture of a program an art.
User-interface is art as is the design of a building is art.
Internals of say how floors are put together and pipes are also considered art. So code is art too.
Backporting just via git cherry-pick is very very bad.
Even yesterday in GCC there needed a fixup for backport (it applied cleanly via git cherry-pick too but produced wrong code) just on newly branched GCC 16. https://gcc.gnu.org/pipermail/gcc-patches/2026-May/715488.html :).
Do you want some toast?
How about an English muffin?
@mirabilos@toot.mirbsd.org @joe@f.duriansoftware.com
The important check is:
Libcalls.getLibcallImpl(RTLIB::BZERO) == RTLIB::Unsupported
So I use both GUI editors and vi. For quick and simple (and most of the time small) stuff, it is faster to use vi (for me).
For an example most of my GCC testcases are almost all written via vi. Creating a new file is easier using vi rather than a GUI; especially copying the file into the correct location afterwards and having to edit it after testing it (make check-gcc RUNTESTFLAGS=...).
Larger changes and changes which I have to think about I use an editor with a GUI (notepad++).
I also use vi to read code in many cases more than a GUI editor but that is because edit vs command view is more natural for that. But that is also if I was searching for something quickly. Rather than something which I need to keep in view for a lot longer and then I use notepad++.
For me I use both for different purposes and for different lengths. I won't leave open a vi session for hours on end while I will leave open a few notepad++ sessions for days on end. (yes I use screen too).
Of all things that get miscompiled while making changes, it is graphite. Seriously everything else in the gcc testsuite works.
Oh it works at stage1 so I know my patch is the cause.
Will debug this tomorrow.
I am 99% sure i am miscompiling ISL. But where and why only isl.
In this one section of push_back code, I have now found 4/5 different missed optimizations. For both gcc and llvm. The last one is a saturated add/multiply which is slightly more complex to handle though but should be doable.
Basically this code is trying to do a sat_mult(elements, 2*sizeof(element)) with a minimum value of sizeof(element).
The sat_mult part i figured out tonight.
I wonder how much this could improve the code.
@malwareminigun@infosec.exchange
"Everyone has a different opinion " Again see the eposide of Silicon Valley.
Anyways there is an option for GCC to change the tab stop. But most don't know about it. -ftabstop=.
I thought this addition to genmatch was going to be much harder. But it turns out not to be so bad. Still need to add some error checking; into the generated code too.
Finally understood how to implement this piece of code and the old code too.
Plus it should give an infrastructure to implement another piece of code. That a coworker was implementing.
So this VRP regression is one of these; this is odd and you keep on thinking why is this code causing issues later on.
And then you remember there is a cache in place. And then you think can reset the cache after this code is done; not exactly so things get complex.
Basically time to hand this over to the person who designed this whole thing; maybe they can think of a decent way of fixing this.