Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
nikic
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
1.
▲
by
nikic
8mo ago
> Is there any implicit understanding in the community that byte types will inevitably be added to LLVM? Among the people who are familiar with such things, yes. An RFC on the topic will be posted in the near future.
2.
▲
by
nikic
8mo ago
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 p
3.
▲
by
nikic
8mo ago
Yes, the Orc C API follows different rules from the rest of the C API ( https://github.com/llvm/llvm-project/blob/501416a755d1b85ca1... ).
4.
▲
LLVM: The Bad Parts
(npopov.com)
19 points
by
nikic
8mo ago
|
1 comments
5.
▲
by
nikic
9mo ago
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
6.
▲
by
nikic
1y ago
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. For example, while Rust does have an LLVM fork, it just exis
7.
▲
by
nikic
1y ago
> LLVM is a trap. 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 n
8.
▲
by
nikic
1y ago
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.
9.
▲
by
nikic
1y ago
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
10.
▲
by
nikic
1y ago
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
11.
▲
by
nikic
1y ago
> Interestingly, Windows on ARM hasn't made it up to Tier 1 yet. An RFC for that has been submitted recently: https://github.com/rust-lang/rfcs/pull/3817
12.
▲
by
nikic
1y ago
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 obvio
13.
▲
by
nikic
1y ago
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. So I think t
14.
▲
by
nikic
1y ago
Fun fact: GCC decided to adopt Clang's (old) behavior at the same time Clang decided to adopt GCC's (old) behavior. So now you have this matrix of behaviors: * Old GCC: Initializes whole union. * New GCC: Initializes first member
15.
▲
by
nikic
2y ago
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
16.
▲
This Year in LLVM
(npopov.com)
1 points
by
nikic
2y ago
|
0 comments
17.
▲
by
nikic
2y ago
NULL == NULL was already defined -- but NULL <= NULL wasn't :)
18.
▲
by
nikic
2y ago
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. Linux seems to have taken the reverse approach,
19.
▲
by
nikic
2y ago
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.
20.
▲
by
nikic
2y ago
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
21.
▲
This Year in LLVM
(npopov.com)
9 points
by
nikic
3y ago
|
0 comments
22.
▲
by
nikic
3y ago
> It's true that MSVC doesn't have an equivalent of -fno-strict-aliasing, but that's because it just doesn't apply optimizations that assume strict aliasing in the first place. Admittedly the picture around signed ove
23.
▲
by
nikic
3y ago
> People can (and do) point at the C spec for fault of this and it is true that if the C spec was more strict then these compilers would not have the free pass to do these crazy miscompilations. However there is nothing stopping these co
24.
▲
by
nikic
3y ago
The main performance-critical undefined behavior in C is provenance. The rest can be removed without major performance impact. (Which is not to say they can't give you 10% on specific workloads, just they aren't what is taking y
25.
▲
by
nikic
3y ago
What's with RISC-V and these peculiar extension names?
26.
▲
by
nikic
3y ago
> You cannot do business and be anonymous. The tax man would eat you alive. At least outside of USA. You also need a license as sole proprietor or be incorporated as a company in order to make repetitive sales and not one-offs. So again,
27.
▲
by
nikic
3y ago
Why does the flag use different representation depending on whether the value is negative?
28.
▲
by
nikic
3y ago
From this kind of response, it's always so hard to tell whether it's easy for you because you have the relevant experience, or you just think it's easy because you don't. A (very non-exhaustive) list of interesting quest
29.
▲
by
nikic
3y ago
JITs are generally one of the most challenging places to use LLVM, exactly because of its bad compile-time characteristics. There are some successful uses of LLVM based JIT compilers (e.g. Azul's Falcon JIT), but this is definitely a u
30.
▲
by
nikic
4y ago
You can see the impact on Rust here: https://perf.rust-lang.org/compare.html?start=2d0a7def330ed9... The tl;dr is that check builds are faster (i.e. optimization quality has improved) while debug/opt builds are mixed,
More ›