Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

They're kind of two different things. The first was hand-compiling (or tracing) things for highly assured work. The other was a tangent where I wonder if a bytecode like LLVM could be used as a cross-platform assembler that's closer to hand-optimized assembler than C due to less knowledge of intent being required. Not to mention simpler structure.

They're different things. If it's a worthwhile path, then the formal efforts on LLVM IR and verified optimizations could be combined with hand-made, inline LLVM for a safer, portable alternative to different inline assembler for each platform. Complimentary, not contradictory, when in context.



OK I see. That said the LLVM bytecode is not portable or cross platform. The front-end is responsible for respecting the target ABI for example.


Ah ok. Appreciate that detail. My concept was replacing inline assembler in an otherwise portable 3GL with LLVM bytecode. The compiler wouldve taken care of ABI in that scenario. LLVM should be easier to optimize than C and maybe fast enough to eliminate need for several different assemblers.

What do you think of that?




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: