llvm

干货回顾 | 快速上手 VS Code:开发环境搭建和常用插件配置

强颜欢笑 提交于 2021-02-19 12:11:30
关注精彩内容,先点击 蓝字 关注我哦~ VS Code 中文社区简介: VS Code 中文成立于2019年11月30日,社区致力于促进开发者之间的交流学习。定期举办线上与线下的沙龙、动手实践营以及开发者交流大会等。 快速上手 VS Code:开发环境搭建和常用插件配置 时间:10月30日(周五) 19:30-21:30 主讲嘉宾介绍 张迪,中国科技大学,机器人实验室自然语言处理和机器人定位导航方向研究生。 分享大纲 一、快速搭建编译环境 二、包管理器的对比选择(Windows) scoop Windows Package manager chocolate 三、面向数据科学的Python环境搭建 Python开发常用插件和配置 四、Windows下CPP环境无痛搭建 gcc llvm/clang vcpkg 常用插件和配置 五、Git相关常用插件和配置 六、让你的Code更出彩:常用插件和配置 七、码字更智能:主流智能补全插件对比(AI-powerd autocompletion) 原配夫人intellicode 国产Aixcoder Tabnine Kite 八、让你的开发更舒适 九、让你的界面更美 十、让你摸鱼更快乐 开发环境的搭建 本次讲座主要面向入门者。 对于 Windows ,搭建环境可能并不如 Linux 方便。张老师提到了 Windows 上的 3 个包管理器:

干货回顾 | 快速上手 VS Code:开发环境搭建和常用插件配置

纵饮孤独 提交于 2021-02-19 11:49:51
关注精彩内容,先点击 蓝字 关注我哦~ VS Code 中文社区简介: VS Code 中文成立于2019年11月30日,社区致力于促进开发者之间的交流学习。定期举办线上与线下的沙龙、动手实践营以及开发者交流大会等。 快速上手 VS Code:开发环境搭建和常用插件配置 时间:10月30日(周五) 19:30-21:30 主讲嘉宾介绍 张迪,中国科技大学,机器人实验室自然语言处理和机器人定位导航方向研究生。 分享大纲 一、快速搭建编译环境 二、包管理器的对比选择(Windows) scoop Windows Package manager chocolate 三、面向数据科学的Python环境搭建 Python开发常用插件和配置 四、Windows下CPP环境无痛搭建 gcc llvm/clang vcpkg 常用插件和配置 五、Git相关常用插件和配置 六、让你的Code更出彩:常用插件和配置 七、码字更智能:主流智能补全插件对比(AI-powerd autocompletion) 原配夫人intellicode 国产Aixcoder Tabnine Kite 八、让你的开发更舒适 九、让你的界面更美 十、让你摸鱼更快乐 开发环境的搭建 本次讲座主要面向入门者。 对于 Windows ,搭建环境可能并不如 Linux 方便。张老师提到了 Windows 上的 3 个包管理器:

How to write an LLVM backend for stack machine?

天涯浪子 提交于 2021-02-19 03:37:28
问题 When I'm trying to build an LLVM backend without defining RegisterClass instances in TableGen file, it throws the following error: error:No 'RegisterClass' subclasses defined How to define a stack machine target for LLVM (i.e. that doesn't use registers)? 回答1: Just don't do it. LLVM DAG is designed specifically for the register machines and is of a little value for a stack machine compilation. You'd need a custom backend instead. One approach I was using for a similar problem (LLVM IR ->

LLVM IR alloca instruction

风格不统一 提交于 2021-02-18 20:50:09
问题 I want to design a IR (like LLVM IR) for my toy compiler and I don't know what is the purpose of the alloca instruction in further analysis. In which optimizations alloca informations are used? 回答1: The ‘alloca‘ instruction allocates memory on the stack frame of the currently executing function, to be automatically released when this function returns to its caller. The object is always allocated in the address space for allocas indicated in the datalayout. The ‘alloca‘ instruction is commonly

LLVM Insert function call defined from another file

丶灬走出姿态 提交于 2021-02-18 17:16:46
问题 I want to insert a function all before a certain instruction but the function call is defined in another file. I tried IRBuilder<> Builder(pi); CallInst *callOne = Builder.CreateCall(func_ins, "foo"); where func_ins is func*(or Value* to be more general) and foo is the variable name prefix of calling function got assigned. Since this function is defined in another file I've no idea where the pointer func_ins should point to so I just set it to NULL but it didn't work. Can anyone give me some

LLVM Insert function call defined from another file

家住魔仙堡 提交于 2021-02-18 17:15:10
问题 I want to insert a function all before a certain instruction but the function call is defined in another file. I tried IRBuilder<> Builder(pi); CallInst *callOne = Builder.CreateCall(func_ins, "foo"); where func_ins is func*(or Value* to be more general) and foo is the variable name prefix of calling function got assigned. Since this function is defined in another file I've no idea where the pointer func_ins should point to so I just set it to NULL but it didn't work. Can anyone give me some

Inserting a block between two blocks in LLVM

匆匆过客 提交于 2021-02-18 08:25:54
问题 I want to insert a block in between two basic blocks in LLVM. So for example, if a basic block A was jumping to basic block B, I want to insert a basic block C in between them such that A jumps to C and C jumps to B. How can I do that? I do have the basic idea that I need to change the terminating instruction of Basic Block A, such that the target B is replaced by C, but how do I go on adding the new basic block C in between? 回答1: Yes, you need to change (or replace) the terminating

Inserting a block between two blocks in LLVM

試著忘記壹切 提交于 2021-02-18 08:25:23
问题 I want to insert a block in between two basic blocks in LLVM. So for example, if a basic block A was jumping to basic block B, I want to insert a basic block C in between them such that A jumps to C and C jumps to B. How can I do that? I do have the basic idea that I need to change the terminating instruction of Basic Block A, such that the target B is replaced by C, but how do I go on adding the new basic block C in between? 回答1: Yes, you need to change (or replace) the terminating

Why is the LLVM execution engine faster than compiled code?

故事扮演 提交于 2021-02-17 08:29:10
问题 I have a compiler which targets LLVM, and I provide two ways to run the code: Run it automatically. This mode compiles the code to LLVM and uses the ExecutionEngine JIT to compile it into machine code on-the-fly and run it without ever generating an output file. Compile it and run separately. This mode outputs an LLVM .bc file, which I manually optimise (with opt ), compile to native assembly (with llc ) compile to machine code and link (with gcc ), and run. I was expecting approach #2 to be

LLVM ARM64 assembly: Getting a symbol/label address?

我的梦境 提交于 2021-02-17 02:28:07
问题 I am porting some 32-bit ARM code to 64-bit and am having trouble determining the 64-bit version of this instruction: ldr r1, =_fns Where _fns is a symbol defined in some C source file elsewhere in the project. I've tried the below but both give errors: adr x1, _fns <== "error: unknown AArch64 fixup kind!" adrl x1, _fns <== "error: unrecognized instruction mnemonic" The assembler is LLVM in the iOS SDK (XCode 7.1). I've noticed that if _fns is locally defined (i.e. in the same .S file) then