Threadwell
Search
Search
Dark mode
Light mode
Reader mode
Explorer
Recent Notes
JohannesVuorine
Aug 26, 2026
archive
twitter
johannesvuorine
Threads
Aug 26, 2026
archive
iquilezles
Aug 26, 2026
archive
twitter
iquilezles
jonathan_blow
38 items with this tag.
Aug 26, 2026
Jonathan_Blow
archive
twitter
jonathan_blow
Dec 24, 2024
I have a moral dilemma in the design of the programming language.
archive
twitter
jonathan_blow
Dec 28, 2024
@Jonathan_Blow @rflaherty71 FWIW I implement SIMD for Dlang.
archive
twitter
jonathan_blow
Dec 26, 2024
@sasuke___420 @corsix @lemire @rflaherty71 Yeah, AVX512 seems like kind of a waste of time right now unless one is targeting a specific machine for specific reasons.
archive
twitter
jonathan_blow
Dec 26, 2024
I’ve never looked at a real-world optimizer.
archive
twitter
jonathan_blow
Dec 26, 2024
@Jonathan_Blow @rflaherty71 Are you aware of fasmg? It's an assembler engine, meaning that even the instruction sets are libraries (literally just include 'http://avx.inc').
archive
twitter
jonathan_blow
Dec 26, 2024
LLVM does what you want, you just need to learn what the MC layer is all about.
archive
twitter
jonathan_blow
Dec 26, 2024
@Jonathan_Blow @rflaherty71 I'm going to admit my radical opinion here, I think high level languages have been a mistake in general and that all you really want at all is a high level assembler.
archive
twitter
jonathan_blow
Dec 26, 2024
@Jonathan_Blow @rflaherty71 I think its a question of modularity in that long term plan sounds like totally replacing LLVM.
archive
twitter
jonathan_blow
Dec 26, 2024
@Jonathan_Blow @rflaherty71 Why are your metadata tables so large?
archive
twitter
jonathan_blow
Dec 25, 2024
@Jonathan_Blow @rflaherty71 I'm working with my personal language with some similarities in philosophies.
archive
twitter
jonathan_blow
Dec 25, 2024
@Jonathan_Blow @rflaherty71 Id consider being able to compile to C, then you are not dependent on any particular implementation and you are guaranteed to support all platforms.
archive
twitter
jonathan_blow
Dec 25, 2024
@Jonathan_Blow @rflaherty71 It might be worth looking at SPIRV-V as it provides cross-platform RTL that can be converted to platform-specific insns with a lightweight driver/converter.
archive
twitter
jonathan_blow
Dec 25, 2024
@Jonathan_Blow @rflaherty71 With incomplete knowledge and opinions, I believe in the monolithic compiler.
archive
twitter
jonathan_blow
Dec 25, 2024
@Jonathan_Blow @rflaherty71 Feels like the inevitable path down to creating a bespoke IL.
archive
twitter
jonathan_blow
Dec 25, 2024
@Jonathan_Blow @rflaherty71 Could you keep the tables in userspace, but mark them with a compiler directive saying “use this table for codegen”? The compiler would then parse it out in earlier phases for use in the backend.
archive
twitter
jonathan_blow
Dec 25, 2024
I think ffmpeg is one of the large & prolific open source projects that maintains huge segments of hand written assembly code, and they maintain separate assembly code for arm (aarch64) and x86.
archive
twitter
jonathan_blow
Dec 25, 2024
(My last serious work on compilers was a project course way back in 2008, where we got as far as doing a few basic optimizations on SSA, allocating registers and doing instruction tiling for x86.
archive
twitter
jonathan_blow
Dec 25, 2024
@Jonathan_Blow @rflaherty71 I definitely don't see a reason to externalize the assembler if you're going to need it to eventually replace the backend code generation.
archive
twitter
jonathan_blow
Dec 25, 2024
@Jonathan_Blow @rflaherty71 It’s interesting that I’ve seen this exact issue (re:llvm) come up in several domains - there is a monolithic solution that is really 10 pieces combined.
archive
twitter
jonathan_blow
Dec 25, 2024
@Jonathan_Blow @rflaherty71 I do lots of asm/intrinsics.
archive
twitter
jonathan_blow
Dec 25, 2024
@Jonathan_Blow @rflaherty71 As the solution for this exact dillema, in my lang I'm thinking about exposing inline IR to the user.
archive
twitter
jonathan_blow
Dec 25, 2024
@Jonathan_Blow @rflaherty71 Can popcount and SIMD functions be implement using inline assembly? It sounds like they're built into the compiler right now rather than the standard library.
archive
twitter
jonathan_blow
Dec 24, 2024
@Jonathan_Blow @rflaherty71 Suggestion: focus on compile speed and small size, aka simple code generation (easy to maintain), but not necessarily runtime performance optimal.
archive
twitter
jonathan_blow
Dec 24, 2024
@Jonathan_Blow @rflaherty71 I wonder if this is this why MSVC did away with inline assembly in favor of intrinsics? Just the hassle and maintenance effort involved with assembly generation?
archive
twitter
jonathan_blow
Dec 24, 2024
@Jonathan_Blow @rflaherty71 I know a few compiler people and they also hate dependencies, one told me he puts things into modules so the backend and frontend sees as little as possible.
archive
twitter
jonathan_blow
Dec 24, 2024
The costs of dropping SIMD are low in the space of game development.
archive
twitter
jonathan_blow
Dec 24, 2024
IIRC your language lets you run code at compile time as part of the compiling process so why not have the assembler be at that level instead of in the compiler itself and let the compile time code gen be able to output machine code directly & let the assembly instructions be part of the standard library for each specific platform instead?
archive
twitter
jonathan_blow
Dec 24, 2024
@Jonathan_Blow @rflaherty71 I feel like you sort of answered your own question.
archive
twitter
jonathan_blow
Dec 24, 2024
@Jonathan_Blow @rflaherty71 Is it too late to target some subset of C for the IR and optionally let users pick their own toolchain to build the binary if they want to do something exotic?
archive
twitter
jonathan_blow
Dec 24, 2024
@Jonathan_Blow @rflaherty71 Please consider the data communication cost of having more than one binary.
archive
twitter
jonathan_blow
Dec 24, 2024
@Jonathan_Blow @rflaherty71 For graphics APIs you can have a mapping for the lowest common denominator with virtually no overhead; is this similar to what you had in mind for intrinsics?
archive
twitter
jonathan_blow
Dec 24, 2024
@Jonathan_Blow @rflaherty71 I think you should keep the assembler in tree because you know you’re gonna need it for instruction selection.
archive
twitter
jonathan_blow
Dec 24, 2024
If the plan in the long term is to be off LLVM, you’ll need all that code anyway so that is fairly fixed.
archive
twitter
jonathan_blow
Dec 24, 2024
@Jonathan_Blow @rflaherty71 In my experience writing optimized numerical routines the "generic builtins" approach doesn't work well because the underlying data shape and algo is also influenced by the available instructions and bitwidths of the simd impl.
archive
twitter
jonathan_blow
Dec 24, 2024
We have two practical variable-length SIMD instruction sets: SVE/SVE2 and RISC-V.
archive
twitter
jonathan_blow
Dec 24, 2024
@Jonathan_Blow @rflaherty71 I would prefer a cool assembler and "intrinsics" could be implemented with it in userspace.
archive
twitter
jonathan_blow
Dec 24, 2024
As an embedded dev working with ARM and some DSPs, I vote for keeping the assembler inside the compiler but stripped down.
archive
twitter
jonathan_blow