LLVM/Clang on windows

所需积分/C币:33 2015-03-07 14:37:56 169KB PDF
收藏 收藏

这是Hans Wennborg演讲是使用的一个PPT。该文档详细谈多了LLVM的众多突出特点及对windows系统的显著支持。
LLVM Libraries for program analysis, optimization and code generation Originally written by Chris Lattner at UIUC Picked up by apple in 2005 Sub-projects: front-end, linker, debugger, 2 No longer an acronym O pen-source: corporate and individual contributors LLVM Internal Representation(IR) RISC-like slightly higher level than assembly Typed Abstracts most(at least many)target details Static Single Assignment(SSA) form Se serializable Example LLVM IR Generation Code Value *n= fn->arg_begin Value *cmp builder. CreateICmpSLE(n, one() builder. Create CondBr(cmp, thenBlock, elseBlock) builder. SetInsertPoint(thenBlock) builder. CreateRet(n) builder. SetInsertPoint (elseBlock) Value *nMinusOne =builder. CreateSub(n, one o) Value *call1= builder. CreateCall(fn, nMinusOne) Value *nMinusTwo builder. CreateSub(n, twoo) Value *call2= builder. CreateCall(fn, nMinusTwo) Value *sum builder. CreateAdd(call1, call2) builder. CreateRet(sum) Example LLVM IR define i32 fib(i32)t entry 11=icmp sle i32%0, 1 br i1%1, label%then, label %else then ret 132 %90 else 2=subi32%0,1 %3=ca11i32@fib(i32%2) %4=subi32%0,2 %5=ca11132@fib(i32%4) %6=addi32%3,%5 ret i32 96 lang C s LLVM front-end Compiles c, ctt, Objective-C Open-sourced by apple in 2007 Self-hosting since 2010 Clang features odern Fast Expressive Abstract Syntax Tree(AST Excellent diagnostics Hackable The missing semicolon int f(int xt int s=0 for (int i=0;i<x: ++1) return s:

试读 43P LLVM/Clang on windows
立即下载 低至0.43元/次 身份认证VIP会员低至7折
  • 分享宗师

关注 私信
LLVM/Clang on windows 33积分/C币 立即下载
LLVM/Clang on windows第1页
LLVM/Clang on windows第2页
LLVM/Clang on windows第3页
LLVM/Clang on windows第4页
LLVM/Clang on windows第5页
LLVM/Clang on windows第6页
LLVM/Clang on windows第7页
LLVM/Clang on windows第8页
LLVM/Clang on windows第9页

试读结束, 可继续读4页

33积分/C币 立即下载 >