HN user

mshockwave

1,058 karma

Interested in Compilers, Code Generation, Static Analysis, System Software and System Security. Familiar with LLVM.

meet.hn/city/33.6856969,-117.8259810/Irvine

Posts37
Comments287
View on HN
github.com 5mo ago

RISC-V Vector Primer

mshockwave
4pts0
myhsu.xyz 8mo ago

Machine Scheduler in LLVM – Part II

mshockwave
31pts0
myhsu.xyz 10mo ago

Machine Scheduler in LLVM

mshockwave
1pts0
github.com 12mo ago

Jelu: Self hosted read and to-read list book tracker

mshockwave
11pts0
mips.com 1y ago

GlobalFoundries to Acquire MIPS

mshockwave
243pts148
v8.dev 1y ago

Land ahoy: leaving the Sea of Nodes

mshockwave
3pts0
myhsu.xyz 1y ago

Visualize RISC-V Vector Memory Instructions

mshockwave
4pts0
myhsu.xyz 1y ago

Scheduling Model in LLVM – Part II

mshockwave
2pts0
myhsu.xyz 1y ago

When LLVM scalable vector meets RISC-V

mshockwave
6pts0
myhsu.xyz 1y ago

Scheduling Model in LLVM

mshockwave
86pts3
myhsu.xyz 2y ago

Legalizations in LLVM Back End

mshockwave
1pts0
rayanfam.com 2y ago

Hypervisor from Scratch (2022)

mshockwave
142pts10
github.com 3y ago

Git-baobab: Visualize Git history in a sunburst chart

mshockwave
1pts0
mpoquet.github.io 3y ago

Version Control System (VCS) adoption in open source projects (2020)

mshockwave
2pts0
discourse.llvm.org 3y ago

When There Are No Bytes

mshockwave
1pts0
www.dcode.fr 3y ago

Periodic Table Cipher

mshockwave
1pts0
stackoverflow.com 3y ago

The “initialize_main” function in coreutils code (2013)

mshockwave
1pts0
twitter.com 3y ago

Mold linker creator considers changing the license

mshockwave
51pts19
github.com 3y ago

Jq Internals: Backtracking (2017)

mshockwave
124pts47
sun.hasenbraten.de 3y ago

VLink: A versatile and portable multi file format linker

mshockwave
1pts0
abseil.io 4y ago

Abseil C++ Tips of the Week (2020)

mshockwave
1pts0
catb.org 4y ago

The Eric Conspiracy

mshockwave
2pts0
m680x0.github.io 4y ago

Encoding Variable-Length Instructions in LLVM

mshockwave
3pts0
m680x0.github.io 4y ago

Motorola 68k Application Binary Interface (ABI)

mshockwave
63pts29
www.youtube.com 4y ago

Gas Turbine Engine Anatomy [video]

mshockwave
2pts0
www.amazon.com 5y ago

Show HN: I wrote a new LLVM Book

mshockwave
2pts0
github.com 5y ago

LLVM now has an experimental back end for M68k (Motorola 68000 series CPU)

mshockwave
3pts2
github.com 5y ago

CIL – A High-Level IR for C/C++ implemented using MLIR

mshockwave
1pts0
github.com 5y ago

The default branch of LLVM has changed to “main”

mshockwave
3pts1
github.com 5y ago

Bazel Build System Support for LLVM

mshockwave
118pts98

one of the reasons I rarely read press releases is that I don't believe in promises -- I believe in _incentives_. In this case, what will Qualcomm be incentivized to do? What are in their interests?

indeed, open sourcing is only half (or even less) of the picture: who is driving the open source community and how it is driven (i.e. governing structure) are probably more important IMHO. There are countless of cases where an open source project is either killed by slow death, or dictated by a single entity. Chris's previous projects like LLVM and MLIR are fortunate enough to grow and thrive organically, and that takes years if not decades to cultivate

In the end, programs will want probably to stay conservative and will implement only the core ISA

Unlikely, as pointed out in sibling comments the core ISA is too limited. What might prevail is profiles, specifically profiles for application processors like RVA22U64 and RVA23U64, which the latter one makes a lot more sense IMHO.

yes, it has been done for at least a decade if not more

Even more of a wild idea is to pair up two cores and have them work together this way

I don't think that'll be profitable, because...

When you have a core that would have been idle anyway

...you'll just schedule in another process. Modern OS rarely runs short on available tasks to run

The article is easy to follow but I think the author missed the e point: branchless programming (a subset of the more known constant time programming) is almost exclusively used in cryptography only nowadays. As shown by the benchmarks in the article, modern branch predictors can easily achieve over 95% if not 99% precision since like a decade ago

yes, the short answer is LLVM uses RegPressureTracker (https://llvm.org/doxygen/classllvm_1_1RegPressureTracker.htm...) to do all those calculations. Slightly longer answer: I should probably be a little more specific that in most cases, Machine Scheduler cares more about register pressure _delta_ caused by a single instruction, either traverses from bottom-up or top-down. In which case it's easier to make an estimation when some of other instructions are not scheduled yet.

How can AI ID a cat? 11 months ago

Came to say Apple also did a great job on tagging my bois who are both grey-ish cats, even in pictures they faced backward, no idea how they did that

RVV is the hardest though (20k intrinsics)

A bit late to this comment but most of these intrinsics are overloads of different LMUL and SEW on a single instruction. I'm pretty sure the actual number of RVV instructions is way less. So maybe you could consolidate overloads of the same instruction into the same page or something.

that modeling instruction scheduling doesn't matter all that much for codegen on OoO cores.

yeah scheduling quality usually has a weaker connection to the performance of OoO cores. Though I would also like to point out:

  1. in-order cores still heavily relies on scheduling quality
  2. Issue width is actually a big thing in MachineScheduler regardless of in-order or out-of-order cores. So the problem you outlined above w.r.t different implementations of uops cracking is indeed quite relevant
  3. MachineScheduler does not use the BufferSize -- which more or less mirrors the issue queue size of each pipe -- at all for out-of-order core. MicroOpBufferSize, which models the unified reservation station / ROB size, only got used in a really specific place. However, these parameters matter (much) more for llvm-mca

In the case where one of the structs has just been computed, attempting to load it as a single 32-bit load can result in a store forwarding failure

It actually depends on the uArch, Apple silicon doesn't seem to have this restriction: https://news.ycombinator.com/item?id=43888005

In a non-inlined, non-PGO scenario the compiler doesn't have enough information to tell whether the optimization is suitable.

I guess you're talking about stores and load across function boundaries?

Trivia: X86 LLVM creates a whole Pass just to prevent this partial-store-to-load issue on Intel CPUs: https://github.com/llvm/llvm-project/blob/main/llvm/lib/Targ...

in addition to storing profiles, what about caching some native code? so that we can eliminate the JIT overhead for hot functions

EDIT: they describe this in their "Alternative" section as future work