<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hacker News: nikic</title><link>https://news.ycombinator.com/user?id=nikic</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Wed, 09 Sep 2026 07:08:29 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=nikic" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by nikic in "LLVM: The bad parts"]]></title><description><![CDATA[
<p>> Is there any implicit understanding in the community that byte types will inevitably be added to LLVM?<p>Among the people who are familiar with such things, yes. An RFC on the topic will be posted in the near future.</p>
]]></description><pubDate>Tue, 13 Jan 2026 14:17:20 +0000</pubDate><link>https://news.ycombinator.com/item?id=46601190</link><dc:creator>nikic</dc:creator><comments>https://news.ycombinator.com/item?id=46601190</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46601190</guid></item><item><title><![CDATA[New comment by nikic in "LLVM: The bad parts"]]></title><description><![CDATA[
<p>That was ambiguously phrased. The point I was trying to make here is that we don't have the situation that is very common for open-source projects, where a project might nominally have a 100 contributors, but in reality it's one person doing 95% of the changes.<p>LLVM of course has plenty of contributors that only ever landed one change, but the thing that matters for project health is that that the group of "top contributors" is fairly large.<p>(And yes, this does differ by subproject, e.g. lld is an example of a subproject where one contributor is more active than everyone else combined.)</p>
]]></description><pubDate>Mon, 12 Jan 2026 20:46:44 +0000</pubDate><link>https://news.ycombinator.com/item?id=46594084</link><dc:creator>nikic</dc:creator><comments>https://news.ycombinator.com/item?id=46594084</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46594084</guid></item><item><title><![CDATA[New comment by nikic in "LLVM: The bad parts"]]></title><description><![CDATA[
<p>Yes, the Orc C API follows different rules from the rest of the C API (<a href="https://github.com/llvm/llvm-project/blob/501416a755d1b85ca10507301aac273843a15a39/llvm/include/llvm-c/Orc.h#L20-L23" rel="nofollow">https://github.com/llvm/llvm-project/blob/501416a755d1b85ca1...</a>).</p>
]]></description><pubDate>Mon, 12 Jan 2026 18:54:23 +0000</pubDate><link>https://news.ycombinator.com/item?id=46592613</link><dc:creator>nikic</dc:creator><comments>https://news.ycombinator.com/item?id=46592613</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46592613</guid></item><item><title><![CDATA[LLVM: The Bad Parts]]></title><description><![CDATA[
<p>Article URL: <a href="https://www.npopov.com/2026/01/11/LLVM-The-bad-parts.html">https://www.npopov.com/2026/01/11/LLVM-The-bad-parts.html</a></p>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=46578236">https://news.ycombinator.com/item?id=46578236</a></p>
<p>Points: 19</p>
<p># Comments: 1</p>
]]></description><pubDate>Sun, 11 Jan 2026 18:30:15 +0000</pubDate><link>https://www.npopov.com/2026/01/11/LLVM-The-bad-parts.html</link><dc:creator>nikic</dc:creator><comments>https://news.ycombinator.com/item?id=46578236</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46578236</guid></item><item><title><![CDATA[New comment by nikic in "When compilers surprise you"]]></title><description><![CDATA[
<p>This particular case isn't really due to pattern matching -- it's a result of a generic optimization that evaluates the exit value of an add recurrence using binomial coefficients (even if the recurrence is non-affine). This means it will work even if the contents of the loop get more exotic (e.g. if you perform the sum over x * x * x * x * x instead of x).</p>
]]></description><pubDate>Wed, 24 Dec 2025 15:40:50 +0000</pubDate><link>https://news.ycombinator.com/item?id=46376493</link><dc:creator>nikic</dc:creator><comments>https://news.ycombinator.com/item?id=46376493</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46376493</guid></item><item><title><![CDATA[New comment by nikic in "Zig builds are getting faster"]]></title><description><![CDATA[
<p>This depends a lot on what you're doing with LLVM. If you are just using LLVM as a code generation backend for your language frontend, you generally do not need an LLVM fork.<p>For example, while Rust does have an LLVM fork, it just exists for tighter control over backports, not because there are any modifications to LLVM.</p>
]]></description><pubDate>Sat, 04 Oct 2025 08:18:42 +0000</pubDate><link>https://news.ycombinator.com/item?id=45471649</link><dc:creator>nikic</dc:creator><comments>https://news.ycombinator.com/item?id=45471649</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45471649</guid></item><item><title><![CDATA[New comment by nikic in "Zig builds are getting faster"]]></title><description><![CDATA[
<p>> LLVM is a trap.<p>Is it? I think Rust is a great showcase for why it isn't. Of course it depends somewhat on your compiler implementation approach, but actual codegen-to-LLVM tends to only be a tiny part of the compiler, and it is not particularly hard to replace it with codegen-to-something-else if you so desire. Which is why there is now codegen_cranelift, codegen_gcc, etc.<p>The main "vendor lock-in" LLVM has is if you are exposing the tens of thousands of vendor SIMD intrinsics, but I think that's inherent to the problem space.<p>Of course, whether you're going to find another codegen backend (or are willing to write one yourself) that provides similar capabilities to LLVM is another question...<p>> You bootstrap extra fast, you get all sorts of optimization passes and platforms for free, but you lose out on the ability to tune the final optimization passes and performance of the linking stages.<p>You can tune the pass pipeline when using LLVM. If your language is C/C++ "like", the default pipeline is good enough that many such users of LLVM don't bother, but languages that differ more substantially will usually use fully custom pipelines.<p>> I think we'll see cranelift take off in Rust quite soon, though I also think it wouldn't be the juggernaut of a language if they hadn't stuck with LLVM those early years.<p>I'd expect that most (compiled) languages do well to start with an LLVM backend. Having a tightly integrated custom backend can certainly be worthwhile (and Go is a great success story in that space), but it's usually not the defining the feature of the language, and there is a great opportunity cost to implementing one.</p>
]]></description><pubDate>Sat, 04 Oct 2025 08:13:34 +0000</pubDate><link>https://news.ycombinator.com/item?id=45471630</link><dc:creator>nikic</dc:creator><comments>https://news.ycombinator.com/item?id=45471630</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45471630</guid></item><item><title><![CDATA[New comment by nikic in "The provenance memory model for C"]]></title><description><![CDATA[
<p>That's a great point. I initially thought we could assume no exposure for loads with non-pointer-compatible TBAA, but you are right that this is not correct if the memory has been laundered through memcpy.</p>
]]></description><pubDate>Tue, 01 Jul 2025 19:52:29 +0000</pubDate><link>https://news.ycombinator.com/item?id=44437436</link><dc:creator>nikic</dc:creator><comments>https://news.ycombinator.com/item?id=44437436</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44437436</guid></item><item><title><![CDATA[New comment by nikic in "The provenance memory model for C"]]></title><description><![CDATA[
<p>That type punning through memory does not expose or synthesize memory. There are some possible variations on this, but the most straightforward is that pointer to integer transmutes just return the address (without exposure) and integer to pointer transmutes return a pointer with nullary provenance.</p>
]]></description><pubDate>Tue, 01 Jul 2025 19:14:17 +0000</pubDate><link>https://news.ycombinator.com/item?id=44437131</link><dc:creator>nikic</dc:creator><comments>https://news.ycombinator.com/item?id=44437131</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44437131</guid></item><item><title><![CDATA[New comment by nikic in "The provenance memory model for C"]]></title><description><![CDATA[
<p>At least at a skim, what this specifies for exposure/synthesis for reads/writes of the object representation is concerning. One of the consequences is that dead integer loads cannot be eliminated, as they may have an exposure side effect. I guess C <i>might</i> be able to get away with it due to the interaction with strict aliasing rules. Still quite surprised that they are going against consensus here (and reduces the likelihood that these semantics will get adopted by implementers).</p>
]]></description><pubDate>Mon, 30 Jun 2025 20:45:53 +0000</pubDate><link>https://news.ycombinator.com/item?id=44427669</link><dc:creator>nikic</dc:creator><comments>https://news.ycombinator.com/item?id=44427669</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44427669</guid></item><item><title><![CDATA[New comment by nikic in "Demoting i686-PC-windows-gnu to Tier 2"]]></title><description><![CDATA[
<p>> Interestingly, Windows on ARM hasn't made it up to Tier 1 yet.<p>An RFC for that has been submitted recently: <a href="https://github.com/rust-lang/rfcs/pull/3817">https://github.com/rust-lang/rfcs/pull/3817</a></p>
]]></description><pubDate>Mon, 26 May 2025 17:14:12 +0000</pubDate><link>https://news.ycombinator.com/item?id=44099389</link><dc:creator>nikic</dc:creator><comments>https://news.ycombinator.com/item?id=44099389</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44099389</guid></item><item><title><![CDATA[New comment by nikic in "Exploiting Undefined Behavior in C/C++ Programs: The Performance Impact [pdf]"]]></title><description><![CDATA[
<p>One peculiar thing about the benchmark results is that disabling individual UB seems to fairly consistently reduce performance without LTO, but improve it with LTO. I could see how the UB may be less useful with LTO, but it's not obvious to me why reducing UB would actually help LTO. As far as I can tell, the paper does not attempt to explain this effect.<p>Another interesting thing is that there is clearly synergy between different UB. For the LTO results, disabling each individual UB seems to be either neutral or an improvement, but if you disable all of them at once, then you get a significant regression.</p>
]]></description><pubDate>Fri, 25 Apr 2025 21:04:27 +0000</pubDate><link>https://news.ycombinator.com/item?id=43798499</link><dc:creator>nikic</dc:creator><comments>https://news.ycombinator.com/item?id=43798499</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43798499</guid></item><item><title><![CDATA[New comment by nikic in "Exploiting Undefined Behavior in C/C++ Programs: The Performance Impact [pdf]"]]></title><description><![CDATA[
<p>They do a bit more than that. One of the options (-disable-object-based-analysis under AA2) disables the assumption that distinct identified objects do not alias, which is disabling pointer provenance in at least one key place.<p>So I think this option very roughly approximates a kind of "no provenance, but with address non-determinism" model, which still permits optimizations like SROA on non-escaping objects.</p>
]]></description><pubDate>Fri, 25 Apr 2025 20:55:33 +0000</pubDate><link>https://news.ycombinator.com/item?id=43798423</link><dc:creator>nikic</dc:creator><comments>https://news.ycombinator.com/item?id=43798423</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43798423</guid></item><item><title><![CDATA[New comment by nikic in "GCC 15.1"]]></title><description><![CDATA[
<p>Fun fact: GCC decided to adopt Clang's (old) behavior at the same time Clang decided to adopt GCC's (old) behavior.<p>So now you have this matrix of behaviors:
* Old GCC: Initializes whole union.
* New GCC: Initializes first member only.
* Old Clang: Initializes first member only.
* New Clang: Initializes whole union.</p>
]]></description><pubDate>Fri, 25 Apr 2025 20:42:28 +0000</pubDate><link>https://news.ycombinator.com/item?id=43798312</link><dc:creator>nikic</dc:creator><comments>https://news.ycombinator.com/item?id=43798312</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43798312</guid></item><item><title><![CDATA[New comment by nikic in "Pointers Are Complicated II, or: We need better language specs (2020)"]]></title><description><![CDATA[
<p>Where possible, undefined behavior at the LLVM IR level is always optional, controlled by various flags, attributes and metadata. Things like signed integer overflow, or even the forward progress guarantee are controlled that way, and admit a wide range of possible language semantics.<p>Provenance (and to some degree the entire memory model) is the big exception to this. It's a very core part of the IR semantics, and an optimizing compiler without provenance would have to use entirely different methodology to justify many optimizations. I don't believe that anyone has yet been able to demonstrate the feasibility of highly optimizing compiler without provenance.</p>
]]></description><pubDate>Sun, 02 Feb 2025 16:46:15 +0000</pubDate><link>https://news.ycombinator.com/item?id=42909769</link><dc:creator>nikic</dc:creator><comments>https://news.ycombinator.com/item?id=42909769</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=42909769</guid></item><item><title><![CDATA[This Year in LLVM]]></title><description><![CDATA[
<p>Article URL: <a href="https://www.npopov.com/2025/01/05/This-year-in-LLVM-2024.html">https://www.npopov.com/2025/01/05/This-year-in-LLVM-2024.html</a></p>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=42602749">https://news.ycombinator.com/item?id=42602749</a></p>
<p>Points: 1</p>
<p># Comments: 0</p>
]]></description><pubDate>Sun, 05 Jan 2025 16:15:36 +0000</pubDate><link>https://www.npopov.com/2025/01/05/This-year-in-LLVM-2024.html</link><dc:creator>nikic</dc:creator><comments>https://news.ycombinator.com/item?id=42602749</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=42602749</guid></item><item><title><![CDATA[New comment by nikic in "Making memcpy(NULL, NULL, 0) well-defined"]]></title><description><![CDATA[
<p>NULL == NULL was already defined -- but NULL <= NULL wasn't :)</p>
]]></description><pubDate>Wed, 11 Dec 2024 15:52:41 +0000</pubDate><link>https://news.ycombinator.com/item?id=42388985</link><dc:creator>nikic</dc:creator><comments>https://news.ycombinator.com/item?id=42388985</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=42388985</guid></item><item><title><![CDATA[New comment by nikic in "CVE-2021-4440: A Linux CNA Case Study"]]></title><description><![CDATA[
<p>Huh, this is interesting. Normally the reason to become a CNA is to reduce the amount of bogus CVEs that are issued for your project due to security researchers trying to pad their portfolio.<p>Linux seems to have taken the reverse approach, by just filing their own bogus CVEs instead. One for every bug fix going into the kernel, rendering the CVE system useless.</p>
]]></description><pubDate>Sun, 30 Jun 2024 07:38:09 +0000</pubDate><link>https://news.ycombinator.com/item?id=40835688</link><dc:creator>nikic</dc:creator><comments>https://news.ycombinator.com/item?id=40835688</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=40835688</guid></item><item><title><![CDATA[New comment by nikic in "Own Constant Folder in C/C++"]]></title><description><![CDATA[
<p>LLVM actually also supports instruction-level granularity for fast-math (using essentially the same mechanism as things like unchecked_add), but Clang doesn't expose that level of control.</p>
]]></description><pubDate>Sat, 22 Jun 2024 17:13:04 +0000</pubDate><link>https://news.ycombinator.com/item?id=40760512</link><dc:creator>nikic</dc:creator><comments>https://news.ycombinator.com/item?id=40760512</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=40760512</guid></item><item><title><![CDATA[New comment by nikic in "Compilers are too smart"]]></title><description><![CDATA[
<p>The background here is that "ctpop < 2" or "ctpop == 1" (depending on zero behavior) is LLVM's canonical representation for a "power of two" check. It is used on the premise that the backend will expand it back into a cheap bitwise check and not use an actual ctpop operation. However, due to complex interactions in the backend, this does not actually happen in this case (<a href="https://github.com/llvm/llvm-project/issues/94829">https://github.com/llvm/llvm-project/issues/94829</a>).</p>
]]></description><pubDate>Sun, 09 Jun 2024 10:04:36 +0000</pubDate><link>https://news.ycombinator.com/item?id=40623300</link><dc:creator>nikic</dc:creator><comments>https://news.ycombinator.com/item?id=40623300</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=40623300</guid></item></channel></rss>