Hacker News new | ask | show | jobs
Major release of xocc C compiler, 0.9.2, based on BSD license
6 points by steven_known 2522 days ago
Hello everybody,

  I'm glad to announce the major release of xocc C compiler, 0.9.2, based on BSD license.
  xocc is a C compiler that based on XOC infrastructure, XGEN code generator and XOCFE
  C frontend.
  Both xocc, XOC, XGEN, and XOCFE are based on BSD license.
  
  XOC provides multi-level operations, flexibility, and the capability of representing almost all popular languages.
  There are mainly two level IR representations used throughout all phases of the compilation.
  In addition to basic IR representation, XOC also provides IR builder, BB manipulating api, Control Flow Graph(CFG), 
  IR lowering, Control Dependent Graph, Dominator Tree, Register SSA, Memory SSA, Agressive Flow Sensitive Alias Analysis,
  Flow Insensitive Alias Analysis, Agressive Field Sensitive Alias Analysis, Interprocedual Analysis Framework, Inliner,
  Dead Code Elimination, Copy Propagation, GCSE, GVN, and a lot of sophisticated control flow and peephole optimizations.
  Moveover, XOC does not use any std library, it provides all basic algorithm library, see Manual.txt of XOC.
  
  XGEN provides a retargetable machine code generator.
  For now, it could generate ARM, x86, PAC code. But, x86 and PAC code generator are not release for temporary.
  XGEN provides IR2OR translator, Pre-Instruction-Schedular, Register Allocation, Post-Instruction-Schedular,
  Instruction Packager and Assembly Printer.
  
  XOCFE is a C frontend, it could provide AST as output.
  
  xocc is a driver that compose XOCFE, AST2IR, XOC and XGEN into complete C compiler.
  
  All features provided by xocc, XOC, XGEN, XOCFE could empower you to develop any compiler and analysis tools.
  
  More important is, any feedback on the compiler and its components would be much appreciated!
 
Get them: https://github.com/stevenknown/xgen https://github.com/stevenknown/xoc https://github.com/stevenknown/xocfe https://github.com/stevenknown/xpoly

steven.known@gmail.com

1 comments

As this seems to be a fairly unknown project, some benchmarks against clang/gcc would surly spark more interest in the project.

Afaict, the XOC infrastructure, released by Alibaba, hasn't seen any commits in the last few years.

So my question then is, does this project offer something that the others (gcc/clang/icc) don't, or why should someone use it? Or is it just a hobby project, or a purely academic exercise?

XOC provides multi-level IR, it can express and model a program at very high level semantic, whereas gcc/llvm could not. With our experience, keeping all well-tuned transformation and optimization on same IR expression(multi-level) are very important. XOC used to be JavaVM AOT IR, C/C++ compiler IR, JavaScriptVM AOT IR, and it was doing very well. In some new project, XOC even could be used as Deep Learning compiler IR. So XOC is very scalable. In my opinion, perhaps the most interesting feature is its memory description that runs through the framework.
I may be misinterpreting, but I think are based on BSD license is what this does that others don’t (clang comes close, but is moving slightly further away from it, towards Apache 2.0)
Yes, XOC's licenses are very business-friendly.