首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > Python > py2llvm翻译Python语法到LLVM IR。

py2llvm翻译Python语法到LLVM IR。

  • 资源大小:596.85 kB
  • 上传时间:2021-06-29
  • 下载次数:0次
  • 浏览次数:0次
  • 资源积分:1积分
  • 标      签: python 翻译 语法

资 源 简 介

py2llvm is an another approach translating codes in Python syntax into LLVM IR for fast execution. You can develop & run your code in Python for rapid-prototyping phase. Once your code become in stable, your code is turned into native code by py2llvm and it runs extremely fast(as fast as C). py2llvm enables easy development of your performance-oriented algorithm while its code runs as fast as C. Since Python is a dynamic programming language, not all feature of Python can be mapped into LLVM IR by py2llvm. Only statically type-inferable and no object-oriented code fragment could be translated, but this is almost enough for performance-oriented programs for example numerical computation and graphics. Here is a example translation by py2llvm. ``` def muda(): a = 1 b = 2 c = a + b ``` -> ``` define void @muda() { entry: %tmp0 = alloca i32 ; [#uses=2] store i32 1, i32* %tmp0 %t
VIP VIP
0.210235s