[www-releases] r208244 - Add source, binaries, and documentation for 3.4.1 release

Tom Stellard thomas.stellard at amd.com
Wed May 7 13:09:36 PDT 2014


Added: www-releases/trunk/3.4.1/docs/searchindex.js
URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/3.4.1/docs/searchindex.js?rev=208244&view=auto
==============================================================================
--- www-releases/trunk/3.4.1/docs/searchindex.js (added)
+++ www-releases/trunk/3.4.1/docs/searchindex.js Wed May  7 15:09:32 2014
@@ -0,0 +1 @@
+Search.setIndex({objects:{"":{"--stats":[65,0,1,"cmdoption--stats"],"-B":[93,0,1,"cmdoption-llvm-nm-B"],"-O":[65,0,1,"cmdoption-O"],"-seed":[60,0,1,"cmdoption-seed"],"-I":[97,0,1,"cmdoption-tblgen-I"],"-gen-register-info":[97,0,1,"cmdoption-tblgen-gen-register-info"],"-gen-subtarget":[97,0,1,"cmdoption-tblgen-gen-subtarget"],"-S":[84,0,1,"cmdoption-S"],"-mattr":[65,0,1,"cmdoption-mattr"],"-d":[90,0,1,"cmdoption-d"],"-f":[84,0,1,"cmdoption-f"],"-demangle":[66,0,1,"cmdoption-demangle"],"--no-progress-bar":[1,0,1,"cmdoption--no-progress-bar"],"-o":[97,0,1,"cmdoption-tblgen-o"],"--enable-unsafe-fp-math":[65,0,1,"cmdoption--enable-unsafe-fp-math"],"-h":[1,0,1,"cmdoption-h"],"--defined-only":[93,0,1,"cmdoption-llvm-nm--defined-only"],"-j":[1,0,1,"cmdoption-j"],"-v":[90,0,1,"cmdoption-v"],"-q":[1,0,1,"cmdoption-q"],"-p":[84,0,1,"cmdoption-p"],"-s":[1,0,1,"cmdoption-s"],"-gen-dag-isel":[97,0,1,"cmdoption-tblgen-gen-dag-isel"],"-use-symbol-table":[66,0,1,"cmdoption-use-symbol-table"!
 ],"--max-
 tests":[1,0,1,"cmdoption--max-tests"],"-class":[97,0,1,"cmdoption-tblgen-class"],"-section-relocations":[50,0,1,"cmdoption-section-relocations"],"-std-compile-opts":[84,0,1,"cmdoption-std-compile-opts"],"-nodetails":[32,0,1,"cmdoption-llvm-bcanalyzer-nodetails"],"-gen-instr-info":[97,0,1,"cmdoption-tblgen-gen-instr-info"],"-P":[93,0,1,"cmdoption-llvm-nm-P"],"--print-file-name":[93,0,1,"cmdoption-llvm-nm--print-file-name"],"-stats":[84,0,1,"cmdoption-stats"],"--extern-only":[93,0,1,"cmdoption-llvm-nm--extern-only"],"-symbols":[50,0,1,"cmdoption-symbols"],"-print-sets":[97,0,1,"cmdoption-tblgen-print-sets"],"-program-headers":[50,0,1,"cmdoption-program-headers"],"--disable-fp-elim":[65,0,1,"cmdoption--disable-fp-elim"],"--check-prefix":[4,0,1,"cmdoption--check-prefix"],"--x86-asm-syntax":[65,0,1,"cmdoption--x86-asm-syntax"],"--show-suites":[1,0,1,"cmdoption--show-suites"],"--enable-correct-eh-support":[65,0,1,"cmdoption--enable-correct-eh-support"],"-relocations":[50,0,1,"cmd!
 option-re
 locations"],"-needed-libs":[50,0,1,"cmdoption-needed-libs"],"--vg-leak":[1,0,1,"cmdoption--vg-leak"],"--enable-no-nans-fp-math":[65,0,1,"cmdoption--enable-no-nans-fp-math"],"-asmwriternum":[97,0,1,"cmdoption-tblgen-asmwriternum"],"--print-machineinstrs":[65,0,1,"cmdoption--print-machineinstrs"],"-asmparsernum":[97,0,1,"cmdoption-tblgen-asmparsernum"],"-section-symbols":[50,0,1,"cmdoption-section-symbols"],"--print-size":[93,0,1,"cmdoption-llvm-nm--print-size"],"--config-prefix":[1,0,1,"cmdoption--config-prefix"],"-gen-pseudo-lowering":[97,0,1,"cmdoption-tblgen-gen-pseudo-lowering"],"-print-records":[97,0,1,"cmdoption-tblgen-print-records"],"-verify":[32,0,1,"cmdoption-llvm-bcanalyzer-verify"],"--load":[65,0,1,"cmdoption--load"],"-dump":[78,0,1,"cmdoption-dump"],"--dynamic":[93,0,1,"cmdoption-llvm-nm--dynamic"],"--spiller":[65,0,1,"cmdoption--spiller"],"-gen-intrinsic":[97,0,1,"cmdoption-tblgen-gen-intrinsic"],"-verify-each":[84,0,1,"cmdoption-verify-each"],"-strip-debug":[8!
 4,0,1,"cm
 doption-strip-debug"],"--size-sort":[93,0,1,"cmdoption-llvm-nm--size-sort"],"-version":[97,0,1,"cmdoption-tblgen-version"],"-size":[60,0,1,"cmdoption-size"],"--enable-no-infs-fp-math":[65,0,1,"cmdoption--enable-no-infs-fp-math"],"--path":[1,0,1,"cmdoption--path"],"-time-passes":[84,0,1,"cmdoption-time-passes"],"-gcda":[78,0,1,"cmdoption-gcda"],"-march":[65,0,1,"cmdoption-march"],"-disable-inlining":[84,0,1,"cmdoption-disable-inlining"],"--time-passes":[65,0,1,"cmdoption--time-passes"],"--vg":[1,0,1,"cmdoption--vg"],"--show-tests":[1,0,1,"cmdoption--show-tests"],"-help":[32,0,1,"cmdoption-llvm-bcanalyzer-help"],"--shuffle":[1,0,1,"cmdoption--shuffle"],"-gen-asm-writer":[97,0,1,"cmdoption-tblgen-gen-asm-writer"],"-load":[84,0,1,"cmdoption-load"],"-expand-relocs":[50,0,1,"cmdoption-expand-relocs"],"--disable-excess-fp-precision":[65,0,1,"cmdoption--disable-excess-fp-precision"],"--format":[93,0,1,"cmdoption-llvm-nm--format"],"-print-enums":[97,0,1,"cmdoption-tblgen-print-enums!
 "],"-file
 type":[65,0,1,"cmdoption-filetype"],"-gen-emitter":[97,0,1,"cmdoption-tblgen-gen-emitter"],"-unwind":[50,0,1,"cmdoption-unwind"],"-sections":[50,0,1,"cmdoption-sections"],"-gen-dfa-packetizer":[97,0,1,"cmdoption-tblgen-gen-dfa-packetizer"],"-gen-tgt-intrinsic":[97,0,1,"cmdoption-tblgen-gen-tgt-intrinsic"],"-section-data":[50,0,1,"cmdoption-section-data"],"-disable-opt":[84,0,1,"cmdoption-disable-opt"],"-mcpu":[65,0,1,"cmdoption-mcpu"],"-file-headers":[50,0,1,"cmdoption-file-headers"],"--undefined-only":[93,0,1,"cmdoption-llvm-nm--undefined-only"],"-debug":[84,0,1,"cmdoption-debug"],"--param":[1,0,1,"cmdoption--param"],"-dynamic-table":[50,0,1,"cmdoption-dynamic-table"],"-inlining":[66,0,1,"cmdoption-inlining"],"--vg-arg":[1,0,1,"cmdoption--vg-arg"],"-functions":[66,0,1,"cmdoption-functions"],"--max-time":[1,0,1,"cmdoption--max-time"],"--debug":[1,0,1,"cmdoption--debug"],"-profile-info-file":[84,0,1,"cmdoption-profile-info-file"],"-mtriple":[65,0,1,"cmdoption-mtriple"],"--nu!
 meric-sor
 t":[93,0,1,"cmdoption-llvm-nm--numeric-sort"],"--strict-whitespace":[4,0,1,"cmdoption--strict-whitespace"],"-dyn-symbols":[50,0,1,"cmdoption-dyn-symbols"],"-gen-fast-isel":[97,0,1,"cmdoption-tblgen-gen-fast-isel"],"-gen-disassembler":[97,0,1,"cmdoption-tblgen-gen-disassembler"],"-gen-asm-matcher":[97,0,1,"cmdoption-tblgen-gen-asm-matcher"],"--no-sort":[93,0,1,"cmdoption-llvm-nm--no-sort"],"-gcno":[78,0,1,"cmdoption-gcno"],"--input-file":[4,0,1,"cmdoption--input-file"],"--debug-syms":[93,0,1,"cmdoption-llvm-nm--debug-syms"],"-gen-enhanced-disassembly-info":[97,0,1,"cmdoption-tblgen-gen-enhanced-disassembly-info"],"--regalloc":[65,0,1,"cmdoption--regalloc"],"--time-tests":[1,0,1,"cmdoption--time-tests"],"-default-arch":[66,0,1,"cmdoption-default-arch"]}},terms:{orthogon:73,interchang:[56,71,75],four:[71,47,36,37,18,1,87,62,75,94,6,86,20,17],prefix:[75,1,20,4,42,8,12,13,14,45,83,18,87,64,21,68,52,91,22,71,55,94,56],grokabl:75,is_open:6,francesco:27,atomicrmw:[20,73],add32ri8:6!
 8,globalv
 ari:[64,14,35,9,86],identityprop:14,foldingsetnodeid:14,build_fcmp:[10,11,12,13,17],dbx:87,digit:[20,18,93,14],intregsregclass:47,emitconst:47,module_code_funct:94,basic_:68,delv:[10,44],f110:6,dw_lang_c89:87,configstatusscript:56,distcheckdir:56,fpmad:87,mli:10,bitstream:94,second:[27,71,0,29,1,77,75,59,3,20,35,80,37,4,81,41,43,9,11,14,17,47,86,62,18,87,64,21,91,57,72,94,89],x86ii:47,r15d:68,r15b:68,alignstack:[21,20,94],thefpm:[41,42,43,44],constrast:36,r15w:68,errorf:[37,95,41,42,43,44],xchg:[20,73],cull:75,ongo:23,noreturn:[20,94],visitxor:70,here:[57,71,29,30,77,31,75,59,3,82,4,61,33,35,80,6,37,20,39,81,41,42,43,44,8,9,10,11,12,13,14,16,17,47,85,62,74,18,87,64,86,21,68,52,70,22,36,72,73,92,95,96,56,26],gnu_hash:87,lowerswitch:27,image_file_machine_r4000:92,"0x20":87,golden:75,unic:18,bou_tru:18,unif:36,unix:[21,52,80,14,18,81,8,56,3,4],pound:[56,57],content_disposition_typ:23,txt:[75,52,48,18,77,8,66,23,24,89],unit:[27,68,51,52,47,0,38,18,71,87,64,75,20,91,56,86,14,22,!
 81],ldri:
 47,fstream:6,subpath:[24,1],destarglist:20,callgraph:[64,27],strike:[37,17],feat_jit_arm:71,until:[27,28,1,20,61,37,38,39,41,42,43,44,8,10,11,12,13,14,15,16,17,47,95,18,64,93,49,68,70,71,23,94,91],new_else_bb:[11,12,13],emitlabelplusoffset:62,jmp:20,relat:[27,57,28,1,77,75,59,20,6,37,42,43,44,8,10,12,71,14,17,47,86,87,64,21,36,23,24],notic:[81,85,6,37,71,41,23,86,13,14,17],hurt:75,exce:[75,20,87],hole:[18,20],herebi:75,unpack:[21,56,7,33],image_scn_align_128byt:92,generalis:[12,42],dagtodag:34,conceptu:[75,86,4,18,71,20,91,14],forexpr:[41,42,43,11,12,13],oftc:33,rework:[18,23],al_superregsset:47,phabric:[23,69],dtor:[81,20],replaceusesofwith:[51,14],doubletyp:14,caution:[56,73],fibonacci:[56,31,15,39],want:[27,53,57,41,29,30,31,75,59,3,4,33,34,35,71,6,37,20,39,81,7,43,44,8,9,10,11,13,14,15,16,17,47,86,85,18,87,64,21,68,52,69,22,36,54,23,45,94,95,96,56,89],umin:20,hasfp:47,codegen:[4,20,33,34,6,37,38,41,42,43,44,8,10,11,12,13,17,47,62,64,21,71,73,74],mcasmstream:71,shuffl:[1!
 ,20],hoc:
 [27,71,14],classifi:36,i686:[71,4],how:[27,53,57,28,41,29,1,30,58,77,31,75,95,59,82,4,33,34,35,71,6,37,20,39,81,7,42,43,44,8,9,10,11,12,13,14,15,16,17,46,47,48,85,18,63,87,64,96,49,86,80,21,68,52,69,70,36,73,55,23,45,94,91,24,56,89,26],hot:27,actionscript:[35,9],macosx10:20,perspect:[64,91,85,36],lhse:41,wrong:[75,36,53,3,56,20,81],beauti:[37,39,42,12,15,17],adc32rm:68,outoperandlist:[68,47],weakanylinkag:14,index2virtreg:71,passopt:64,apint:14,alias:[27,35,47,36,18,71,9,94,86,20],"18th":86,prototypeast:[37,95,41,42,43,44],tok_for:[41,42,43],"0x3f":19,feedback:[64,96,23],govern:20,affect:[81,52,6,28,26,18,53,7,73,43,64,20,11,3,14],vari:[35,14,71,73,87,9,94,3,70,81],z196:22,makefil:[21,83,53,52,47,33,37,74,29,48,8,62,24,56,71,64,81,45,17],exported_symbol_list:56,redhat:54,fit:[27,75,86,20,18,71,87,43,23,11,14],fix:[57,28,71,29,1,77,75,4,35,37,95,39,81,41,9,13,14,15,16,17,47,86,18,87,64,21,68,51,22,53,72,73,23,94,89,26],"200000e":[11,43],xxxinstrdescriptor:47,hidden:[75,14,18!
 ,71,87,58
 ,64,94,49,20],easier:[27,71,28,73,75,20,34,6,37,95,81,41,82,8,13,14,16,17,83,62,68,69,53,36,23,24],aliasesset:36,proce:[28,62,51,91],imagstart:[12,42],interrupt:[3,75,1,20],itanium:[21,88,91],kernelparam:6,initializecustomlow:62,loopinfo:64,llvm_config_project:45,dcmake_install_prefix:7,exprast:[37,95,41,42,43,44,16],accommod:71,spotless:56,"0x7ffff7ed404c":82,build_fadd:17,openfileforwrit:3,resum:[91,20,82],isloadfromstackslot:47,pinsrd_1:4,numentri:94,whip:[12,42],intregssuperclass:47,dst:[59,68,71,47],smp:64,only_tool:[21,56],llvm_lit_arg:52,adapt:[3,81,14,27],aliasdebugg:36,inteqclass:14,dse:[27,51,73,36],impract:14,navig:[24,18,22],omiss:20,targetloweringobjectfil:71,adc64ri32:68,md5:21,f3_1:47,uiuc:23,f3_3:47,proj_src_root:[56,45],reformul:36,realstart:[12,42],pointstoconstantmemori:[20,36],att:[67,65,20],unabl:[68,51,20,16],disablelazycompil:14,confus:[80,47,86,14,23,20],configurescriptflag:56,clariti:[11,43],wast:[61,89,41,87,13,14],psubusw:8,mingw:[21,31,71,52,77],!
 mklib:56,
 wasn:[75,36,41,42,12,13],vhdl:22,isalnum:[37,95,39,41,42,43,44],evolut:27,signext:[20,94],setargstr:18,nobuiltin:20,master:[8,21,96,45,33],image_scn_mem_discard:92,similarli:[33,47,36,20,18,53,70,23,56,77,14,29],getnod:[34,47],image_sym_class_stat:92,linpack:0,addrrr:47,arrayidx4:20,"0x3500000001652748":82,ntid:6,crawl:62,technic:[33,23],lvalu:14,tree:[27,75,41,29,1,77,31,20,33,6,37,95,39,81,7,42,43,44,8,10,11,12,13,14,15,16,17,85,48,87,64,86,21,51,52,22,23,45,24,56],project:[75,29,1,58,77,31,33,34,88,39,81,8,15,45,48,62,87,21,52,22,55,23,24,56],entri:[27,57,71,3,20,61,34,85,6,37,4,40,41,42,43,44,10,11,12,13,14,17,47,86,62,87,64,50,68,91,36,94,95,24,56,89],sdnode:[70,71,14,47],recheck:[27,56],uniniti:[62,68,20,86],aapc:30,aforement:21,increment:[27,75,62,20,71,41,43,70,23,77,72,11,13,14],infring:23,incompat:[54,20],dozen:30,sig_atomic_t:20,implicitus:71,lfoo:71,multimap:14,get_instrinfo_operand_types_enum:47,simplifi:[21,53,27,71,29,39,41,42,43,44,92,23,57,75,10,11,12,13,14!
 ,15],shal
 l:[20,18,35,9,52],object:[53,57,41,29,1,58,31,75,85,3,82,20,61,35,71,6,37,38,81,7,43,44,8,9,10,11,95,13,14,15,16,17,46,83,47,86,62,74,18,84,87,64,65,49,66,67,50,93,21,68,51,70,22,36,92,55,23,45,94,91,56,26],image_sym_type_long:92,letter:[75,47,18,41,42,94,56,12,13,20],breakpoint:[64,70,82],alwaysinlin:[20,94],errorv:[37,41,42,43,44],getelementtyp:14,purgev:94,dummi:[27,68,71,81,47],lpm:64,mayreadfrommemori:73,detriment:75,came:[11,93,35,9,43],explan:[81,52,85],functionattr:27,matchinstructionimpl:71,layout:[27,71,52,47,21,62,14,6,87,33,86,20,45],apach:[3,23],somefil:81,busi:23,rich:[33,25],recursivetarget:56,plate:18,selectiondagbuild:71,enable_profil:[21,81,56],ceil:[20,0],replaceusesofwithonconst:51,addrr:47,smallvectorimpl:14,ppc_fp128:[20,94],hasopsizeprefix:68,patch:[33,75,69,21,62,44,8,96,31,23,10,77],respond:[27,36],mandatori:[31,14,47],result:[27,53,0,28,71,29,1,77,31,75,59,3,82,4,61,33,34,79,80,6,37,38,81,41,42,43,44,8,10,11,12,13,14,16,17,47,86,62,95,18,84,87,64,2!
 0,49,67,2
 1,68,70,36,73,57,55,23,94,91,56],respons:[27,57,36,62,20,18,48,72,77,64,23,56,71,14],fail:[75,28,29,1,30,4,31,3,20,38,81,8,18,87,67,21,52,91,22,53,73,23,56],best:[27,35,21,91,39,36,75,87,23,9,45,95,67,71,14,81,16,53],dw_tag_reference_typ:87,wikipedia:[24,11,20,43],copyleft:23,figur:[64,71,47,14,18,53,70,8,75,56,20],irc:[33,23,69],sysroot:7,glasgow:20,xvf:31,never:[27,75,29,20,47,35,80,36,81,44,9,10,71,14,85,86,62,64,57,73,55,74],extend:[75,1,20,33,34,35,85,95,39,41,42,43,44,9,10,11,12,13,14,15,16,46,47,62,18,21,68,22,71,73],extens:[27,75,31,3,20,33,34,88,95,81,41,42,43,11,12,13,14,16,47,62,18,87,64,65,19,52,91,71,92,23,24,56],extent:[62,23,20,86,48],toler:[62,20,77],advertis:91,rtti:[33,75,85,91,54,14],"0f3f800000":6,accident:[64,3,18,75,14],logic:[21,86,71,85,27,37,14,1,41,42,43,23,95,20,56,24,11,12,13,4,17],compromis:14,assur:57,mattr:[67,65,4,47],creategvnpass:[41,42,43,44],"2nd":[68,14],addsdrm:68,diff:[21,75,69,27,40,58,8,23],summat:20,assum:[27,57,28,29,75,78,31,2,20,!
 34,35,6,3
 7,95,81,42,9,12,71,14,45,17,47,86,87,64,65,67,21,52,70,36,72,23,94,91,56],summar:[62,27,1,71],duplic:[27,68,75,80,36,20,18,71,87,23,19,95,3,74,14,22,16],frc:71,frb:71,fra:71,bewilder:56,union:[75,36,71,41,87,13,20],n_hash:87,frt:71,feat_disassembl:71,spir:22,life:[23,75],regul:64,mrm6m:47,type_code_x86_fp80:94,ani:[27,57,0,71,29,1,30,77,31,75,32,59,3,95,4,81,61,33,34,35,80,6,37,38,39,40,41,42,43,44,8,9,76,10,11,12,13,14,15,16,17,83,47,86,62,74,18,84,87,64,65,19,20,49,93,21,68,51,52,70,22,36,73,23,45,94,91,24,56,25,89,26],cufunct:6,"0x16151f0":82,objectfil:61,emploi:14,image_scn_mem_not_cach:92,dissect:6,paramattr_block:94,commerci:23,employ:23,one_onli:19,emit_22:47,unop:[12,13,41,42],rediscov:[35,9],lto_module_is_object_file_in_memori:74,globaldc:[27,14],createret:[37,41,42,43,44],transpar:[34,75,86,14,18,74],bikesh:85,generalcategori:18,falsedest:20,split:[27,34,47,86,70,18,71,73,87,8,23,20,45],immtypebit:68,functionpassmanag:[41,42,43,44],annoat:25,reassoci:[27,51,41,42,!
 43,44,10,
 11,12,13,20],dest1:20,fairli:[35,47,36,95,39,81,42,43,9,24,11,12,14,15,16],dest2:20,boiler:18,ownership:[41,42,43,44,23,14],printdeclar:47,engin:[61,21,83,35,86,27,37,33,22,39,43,44,51,9,56,10,11,15,81],tune:[52,0,18,71,41,87,65,13,14],libcal:[27,29],tokvarnam:26,nuzman:0,gzip:[21,77],unchang:[20,14,36],ordin:18,volunt:[28,96],bit:[71,28,75,2,32,85,4,34,35,88,80,6,37,20,39,41,42,43,44,9,10,11,12,13,14,15,16,17,47,86,62,18,87,64,19,49,21,68,52,22,57,73,94,95,96,26],previous:[47,29,37,20,18,43,77,26,22,17],easi:[71,28,41,29,1,75,20,35,37,95,39,7,43,44,8,9,10,11,13,14,15,16,17,85,62,87,64,21,52,57,55,23,94,24,89],bitwidth:[20,94],had:[21,6,22,57,73,64,32,3,89,20],har:[21,45],hat:[21,57],sanit:52,ocamlbuild:[10,11,12,13,16,17],issimpl:73,preserv:[35,80,86,48,18,36,64,9,71,20],st_mode:80,shadow:[47,62,41,42,43,11,12,13],stylist:75,measur:80,specif:[27,71,0,28,29,1,77,31,75,3,4,61,33,34,35,88,80,6,20,39,81,42,8,9,12,14,15,16,47,86,62,63,87,64,65,19,67,50,21,68,52,91,22,57,73,23,9!
 4,95,24,5
 6,25,26],fcmpinst:14,nonlazybind:20,remind:77,underli:[75,86,14,18,71,23,20,22],right:[27,75,28,77,20,34,35,80,37,38,39,81,41,42,43,44,8,9,10,12,13,14,15,16,17,85,18,21,53,73,23,95,56],old:[21,35,33,20,22,36,41,87,82,23,9,49,13,14,81],getargumentlist:14,unabashedli:56,attornei:23,olt:20,paralleltarget:56,dominatorset:64,getbit:18,sparcsubtarget:47,bottom:[27,51,69,47,0,18,64,11,3,20,67],undisturb:75,lto_module_get_num_symbol:74,stringsort:75,subclass:[68,71,85,47,36,62,95,18,57,64,75,14,16],cassert:[75,6],armv7l:30,topleveltarget:56,op_begin:14,condit:[27,75,2,3,20,6,37,95,39,81,41,42,43,11,12,13,14,15,16,17,47,86,18,64,21,51,91,71,73,74],foo:[75,0,20,6,37,4,81,43,44,10,11,71,14,16,17,85,86,18,87,19,68,53,36,57,95,26],"0f00000000":6,armv7a:7,sensibl:14,egregi:23,tablegen:[21,34,52,47,33,71,7,68,77,59,24,56,97,26],bindex:47,emitt:[68,47,43,82,11,97,20],image_scn_mem_lock:92,llvmanalysi:45,true_branch_weight:2,fca:51,slightli:[75,14,41,42,44,64,10,12,13,20],xor64rr:71,dw_tag_!
 array_typ
 :87,basenam:87,expandop:34,mbb:[71,47],creativ:47,mcinstlow:71,wrap:[61,21,75,86,39,37,20,18,57,87,23,22,94,95,3,14,15,16,17],msp430:[21,71],data32bitsdirect:47,suffici:[27,68,53,85,36,62,4,18,39,73,70,20,56,25,86,14,15],support:[27,57,0,71,1,75,77,31,2,95,59,3,82,4,33,34,35,80,6,37,20,39,81,41,42,43,44,8,9,10,11,12,13,14,15,16,17,46,83,47,86,62,85,18,87,64,65,19,49,67,93,21,68,52,69,74,22,36,73,54,55,23,45,94,91,24,56,89,26],sub_rr:68,happi:[13,41,45],avail:[27,75,0,28,29,1,58,77,3,82,20,33,85,36,37,39,81,42,43,44,8,10,11,14,15,17,83,47,62,18,84,87,64,96,65,67,21,68,52,91,22,71,73,54,23,24,56],width:[35,0,62,20,71,73,75,9,94,14],cpprefer:14,overhead:[62,81,44,59,10,14],use_back:14,headach:28,"0x2413bc":64,fpga:71,offer:[62,22,57,14],refcount:62,multiprocessor:[62,64],reserveresourc:71,mymod:56,insidi:75,reiter:20,handili:75,fermi:71,dump_valu:[10,11,12,13,17],rerun:[56,14],isexternalsymbol:47,adopt:[3,23,71],proven:[27,93,13,20,41],exist:[27,57,71,1,75,3,20,33,34,35,80,36,!
 37,4,81,4
 1,42,43,44,9,76,11,12,13,14,45,17,47,48,62,87,64,96,65,86,21,68,52,91,53,73,55,94,24,56,89],flagsflat:57,nvvmreflect:6,ericsson:20,build_phi:[11,12,13],bswap:[34,20],floor:[20,0],role:[75,28,95,87,62,26,16],finalizeobject:61,presum:20,smell:14,roll:[75,85],mri:71,legitim:75,notif:36,intend:[27,3,20,61,33,34,80,36,4,40,14,47,62,18,21,52,26,71,73,23,91,56,25,74],createargumentalloca:41,intens:[14,0],intent:[80,26,71,41,23,74,13,20],preverifi:27,keycol:59,valuehandl:21,"1s100000s11010s10100s1111s1010s110s11s1":14,cumemcpyhtod:6,geometr:[35,9],time:[27,53,0,28,41,29,1,77,31,75,4,61,33,5,71,6,37,20,39,7,42,43,44,8,10,11,12,13,14,15,45,17,63,47,48,62,74,18,84,34,87,64,96,65,19,67,93,80,21,68,51,52,70,22,36,73,57,54,55,23,94,24,56,89,26],push:[62,75,71,70],image_file_dl:92,breadth:[67,39,15],nearbyint:[22,20,0],chain:[21,51,71,47,27,20,22,1,41,36,87,64,31,74,3,13,14],ptrtoint:[20,86],sparctargetmachin:47,osi:81,aptr:20,const_nul:[11,12,13],image_sym_type_short:92,decid:[34,57,0,95!
 ,18,53,41
 ,42,44,64,10,12,13,20,16,87],hold:[27,75,20,61,37,95,39,41,42,43,44,10,11,12,13,14,45,17,47,62,18,87,64,21,68,71,16,24],decim:[68,80,18,57,19,20],x08:92,decis:[75,0,20,71,44,23,91,10,70],x03:92,uadd:20,macho:[61,71],oversight:23,x04:92,painlessli:18,uint32_max:87,cudevicecomputecap:6,s390x:22,vmcore:[21,18,52,14,34],fullest:75,exact:[27,75,48,62,20,18,73,87,64,74,24,14,29],mergebb:[41,42,43],solver:71,x0c:92,unsupport:[71,47,28,1,73,77,8,31],team:[45,77],cooki:20,prevent:[27,75,0,77,3,20,36,37,4,81,41,8,13,14,17,62,18,87,64,21,22,72,23,56],feat_inlineasm:71,dcmake_cxx_flag:7,sign:[68,35,88,69,47,86,20,18,71,75,23,9,94,14,74],heavyweight:14,scev:[27,36],relocat:[61,67,47],lazili:[10,74,14,94,44],currenc:[10,71,23,44],merge_bb:[11,12,13],current:[27,57,28,41,1,75,77,31,2,59,3,4,61,33,34,35,71,6,37,38,39,81,7,42,43,44,8,9,10,11,12,13,14,15,16,17,47,86,62,18,87,64,96,65,19,20,67,93,80,21,68,69,91,22,36,72,73,54,55,23,45,94,95,24,56,26],image_scn_cnt_cod:92,i256:20,objdir:[8,21,!
 56],oeq:2
 0,intraprocedur:70,cudevicegetnam:6,dropdown:69,autogener:23,live_begin:62,modif:[80,47,14,18,87,70,64,2,74,20],splice:[20,14],address:[27,71,0,58,20,61,35,6,41,44,9,10,13,14,45,47,86,62,18,87,64,93,66,68,52,91,22,36,72,73,54,23,94],along:[27,71,75,59,20,61,35,85,6,37,39,44,9,10,14,15,17,47,62,87,64,93,52,53,72,73,94,89],ffast:0,cur_var:13,volumin:14,commentstr:47,queue:[64,14,47],vectori:20,replaceinstwithvalu:14,mipsel:21,commonli:[21,75,47,62,20,63,94,14],ourselv:[87,6],ipc:3,ipa:51,love:14,"2ap3":19,pentium:[21,47],prefer:[68,75,69,47,36,28,20,39,30,73,96,23,91,66,3,14,15],ipo:51,src2:[68,71],regalloc:[64,67,65,71],src1:[68,71],cttz:20,instal:[28,7,29,30,31,34,6,37,95,81,41,42,43,44,10,11,12,13,14,45,17,83,64,96,21,52,54,55,16,24,56],llvm_lib_search_path:21,anothercategori:18,virtreg:71,optimize_opt:21,image_sym_class_nul:92,abbrevid:94,scope:[75,20,14,36,37,41,42,43,11,12,13,70,17,62,87,64,68,91,57,23,94,97],tightli:[75,37,95,41,42,43,44,10,11,12,13,20,16,17],"66ghz":9!
 6,peopl:[
 33,34,35,69,86,39,28,18,71,75,77,64,23,9,3,20,15,81],claus:[71,23,20,91],refrain:77,enhanc:[33,35,37,41,42,43,44,64,23,9,75,10,11,12,13,97,17],dagarg:26,linkmodul:56,langref:[34,73],easiest:[21,35,47,77,64,9,89],b_ctor_bas:4,subel:20,descriptor:[94,87,47],valuet:14,whatev:[27,86,36,20,18,57,3,4],problemat:75,encapsul:[75,85,49],recycl:71,setrecordnam:94,optnon:20,r11b:68,r11d:68,"0x00001c00":71,fpu:[7,30],legalizetyp:71,parameter:68,r11w:68,remap:[61,71],motohiro:71,spot:[27,77],mrm4m:47,mrm4r:47,succ:75,date:[21,68,80,36,28,22,43,77,31,56,11,70],fucompi:71,data:[27,57,71,78,75,3,20,61,34,6,86,41,42,43,44,10,11,12,13,14,47,48,62,18,87,64,93,19,50,68,51,70,22,36,73,94,91,56,74],stress:[75,60,58],indexloc:14,disable_auto_depend:56,stdio:[21,55,31,11,10,3,12,13,74],stdin:[8,10,11,12,13,4,16,17],mangl:[21,93,23,87],fp4:68,sandbox:[28,7],fp6:68,fp1:68,fp0:68,fp3:68,fp2:68,callabl:[37,17,20,6],iftmp:[41,42,43,11,12,13],untest:28,operand_type_list_end:47,my_funct:6,llvm_library_vi!
 s:62,tta:
 22,x86retflag:68,overhaul:77,thumb:[3,23,71,85],image_sym_class_block:92,denser:[12,42],precedecnc:[41,42],instantli:14,"__stack_chk_guard":20,jit:[71,29,31,75,82,33,35,6,37,38,39,81,41,42,43,44,9,10,11,12,13,14,15,16,17,46,83,47,62,63,67,21,52,70,22,53,54,24,56],image_sym_class_end_of_struct:92,outli:91,smarter:18,isbinaryop:[41,42],"0x00000147":87,inpredsens:59,therebi:18,"0x00000140":87,getanalysi:64,didn:[75,37,71,41,87,64,13,14,16,17],llvm_src_dir:30,separ:[57,29,75,3,20,6,4,7,8,45,47,86,62,18,87,64,93,21,68,52,71,73,23,16,94,95,24,56,89,74],complextyp:92,sk_squar:85,compil:[27,53,0,28,41,29,30,58,77,78,31,75,3,4,33,34,35,88,71,6,37,38,39,81,7,42,43,44,8,9,10,11,12,13,14,15,16,17,83,47,86,62,95,18,84,87,64,96,65,20,67,93,21,51,52,70,22,36,54,23,45,91,24,56,74],argvalu:[18,82],"2005q3":21,registertarget:47,switchinst:[27,2],movsx64rr32:71,toolchain:[21,22,71,52],blk:14,"0x1c2":19,libxxx:7,getschedclass:47,roots_iter:62,pseudocod:47,million:[20,14],removefrompar:14,crazi!
 er:[11,43
 ],"byte":[34,80,47,36,20,71,72,73,87,86,94,32,10,11,12,13,14,16,17],subregist:47,reusabl:71,departur:56,jitcompilerfunct:47,sysconfdir:56,modest:75,recov:[14,4,91],cbw:71,neglect:29,arraytyp:14,oper:[27,57,0,71,75,2,3,20,34,35,88,80,6,37,95,39,81,41,42,43,44,9,10,11,12,13,14,15,16,17,46,47,48,64,65,67,86,68,91,22,36,73,94,56,26],onc:[27,57,28,71,29,1,77,31,75,3,61,33,5,35,36,37,38,81,41,43,44,9,10,11,13,14,16,17,47,86,62,74,18,84,34,64,21,68,51,52,70,22,53,55,23,95,94,91,56,89,26],iaddroff:71,insertbefor:14,"0x7f":[68,20],submit:[21,69,33,53,77,23,70],open:[33,68,71,52,85,38,22,56,75,87,89,31,23,11,10,3,12,13,20,81,17],lexicograph:75,addtmp4:[37,17],insttoreplac:14,f88:6,convent:[75,88,85,47,6,37,14,71,87,94,89,20,81,17],bite:81,f80:20,enable_optim:[54,21,77,56],optlevel:18,draft:[21,73,87],addtmp1:[10,44],getsubtarget:47,conveni:[21,68,35,52,85,6,20,18,1,42,43,75,9,27,11,12,71,14,81,45],goldberg91:62,usenamedoperandt:47,fma:[71,6,20,0],programat:[12,71,42],artifact:86,"__a!
 pple_name
 spac":87,third:[75,29,77,20,35,37,9,71,45,17,47,86,62,18,63,87,64,21,91,57,23,94],rival:14,rzi:6,"0x12345678":87,sai:[35,85,80,29,39,37,4,18,71,75,23,9,56,59,3,86,89,14,15,17],nicer:[18,57,14],argument:[27,71,29,1,58,31,75,32,59,4,61,34,35,85,36,37,38,81,41,42,43,44,8,9,10,11,12,13,14,16,17,83,63,47,86,62,18,84,87,64,93,20,67,21,68,52,91,53,72,55,45,95,56,97,26],second_tru:20,sar:71,saw:[64,11,74,43],entrytoken:71,notw:4,xxxgenregisterinfo:47,destroi:[71,47,14,57,64,91,20,81],note:[27,53,95,41,29,1,30,58,77,75,32,59,3,82,20,61,33,34,35,88,71,6,37,38,39,86,7,42,43,44,9,10,11,12,13,14,15,16,17,47,85,62,74,18,87,64,65,19,49,80,21,68,51,52,69,70,22,36,73,23,45,94,91,24,56,26],denomin:75,take:[27,57,28,71,1,31,75,32,59,4,61,5,35,85,6,37,20,39,81,41,42,43,44,9,76,10,11,12,13,14,15,16,17,47,86,62,74,18,84,34,87,64,65,49,67,21,68,52,90,70,22,36,92,73,55,23,95,94,91,56,89,26],cmake_prefix_path:52,noth:[64,27,86,62,20,39,71,41,8,91,56,3,13,14,15],funcion:6,printer:[27,47,62,71,24,25,!
 20],buffe
 r:[35,37,20,87,41,42,43,44,74,9,95,91,10,11,12,13,14,15,16,17],fcc_ug:47,compress:[21,52,94,32,56,14],llvm_is_multithread:14,insertel:[20,4],abus:14,homepag:[21,31],normalformat:18,allevi:[18,71,14],drive:[24,30],add_llvm_:52,axi:0,mcjit:[61,21,22,82,33],identifierstr:[37,95,39,41,42,43,44],cclib:[12,13],objptr:20,xml:94,xmm:[4,47],slow:[54,27,65,14,64],activ:[33,71,47,46,62,91,36,64,23,20],v2size:36,freebsd5:71,dw_tag_imported_declar:87,dominatortre:64,clang:[75,0,28,41,1,30,77,31,2,82,20,33,6,37,4,81,7,42,43,44,8,10,13,14,45,87,65,21,68,51,52,69,91,22,73,55,23,95,24,56,74],"import":[27,57,0,28,1,30,77,31,75,59,20,33,35,36,37,95,40,42,43,44,9,10,11,12,71,14,16,17,47,62,18,87,64,21,70,22,53,73,23,94],requir:[27,57,28,41,1,30,77,31,75,59,3,95,4,61,34,35,88,71,6,37,20,39,81,7,42,43,44,8,9,10,11,12,13,14,15,16,17,47,48,62,85,18,64,86,80,21,68,52,70,22,36,73,55,23,45,94,91,24,56,74],prime:[37,95,41,42,43,44,10,11,12,13,16,17],borrow:20,specialsquar:85,getframes:62,openorcreatef!
 ileforwri
 t:3,xmax:[12,42],clenumvalend:18,where:[27,57,28,71,29,1,75,77,31,2,85,4,61,34,80,6,37,20,39,81,41,43,44,8,10,11,13,14,15,16,17,63,47,86,62,18,84,87,64,49,21,52,70,53,73,55,23,45,94,91,24,56,97,26],deadlin:23,postdom:27,dw_at_apple_property_sett:87,arglist:20,xxxtrait:57,x86targetmachin:71,x24:92,build_mul:[10,11,12,13,17],getindex:47,assumpt:[35,20,71,75,87,65,9,4],screen:[28,75],secnam:19,opval:47,sparc:[21,68,88,47,22,71,73,64],uncondition:[71,36],genericvalu:[10,11,12,13],eflag:68,extern_weak:[20,94],mani:[27,53,0,28,41,29,31,75,85,3,4,81,34,35,71,6,37,20,39,40,7,42,43,44,8,9,10,11,12,13,14,15,16,17,47,86,62,18,87,64,21,69,70,22,36,73,57,94,95,24,56],dw_at_mips_linkage_nam:87,unistd:3,sccp:[27,51],sentinel:14,constant:[27,71,75,32,20,34,6,37,81,41,42,43,44,10,14,17,47,62,18,87,64,19,21,51,36,73,94],boat:75,curs:[38,1],printstar:[11,43],fib:[27,39,41,43,11,13,15],add16mr:68,pluginfilenam:67,ismod:68,parseifexpr:[41,42,43],inst_begin:14,add16mi:68,constantfoldcal:34,thous!
 and:27,fo
 rmed:20,somemap:75,ppcisellow:34,former:[95,71,73,16],combine1:71,combine2:71,emitalign:62,rawfrm:[68,47],polli:52,view_function_cfg:11,test_exec_root:1,lto_module_get_symbol_attribut:74,canon:[27,14,87,20],blah:18,pthread:20,ascii:[80,37,95,39,41,42,43,44,87,94,10,11,12,13,20,15,16,17],binari:[27,75,28,41,77,31,20,61,5,35,79,6,37,95,39,81,7,42,43,44,9,76,10,11,12,13,14,15,16,17,83,47,62,18,84,87,66,88,68,52,90,70,22,71,92,54,55,23,94],devcount:6,tutori:[4,33,35,6,37,95,39,41,42,43,44,9,10,11,12,13,15,16,17,46,18,56],immutableset:14,srem:[71,20],sreg:6,intrepid:[95,16],"0x1603020":82,getfunct:[37,41,42,43,44,64,62,14],extern:[27,28,29,30,20,61,35,80,6,37,95,39,41,42,43,44,8,9,10,11,12,13,14,15,16,17,46,47,18,87,64,93,67,21,22,71,54,55,94,74],defi:20,sret:[20,94],defm:[68,26,47],fnname:[37,95,41,42,43,44],dw_form_ref_udata:87,clobber:[68,71,20,36],dimension:[12,86,20,42,6],runtimedyldmacho:61,noencod:71,resp:[20,14],rest:[21,89,94,62,14,71,41,87,23,74,20,95,3,13,4,16],checkc!
 udaerror:
 6,fmadd:71,gdb:[33,35,47,71,87,82,64,55,9,14],unmaintain:68,invalid:[27,75,1,61,36,37,95,41,42,43,44,10,11,12,13,14,16,17,47,86,18,84,87,64,51,91],smallvector:14,loadable_modul:[8,56,64,62],cond_fals:[13,41],r13w:68,ghostli:14,"__imp_":20,littl:[27,75,30,3,20,35,37,95,39,81,41,42,43,44,9,12,13,14,15,16,17,47,86,62,18,87,64,21,71,94,56,89],instrument:[21,86,63,64,78,27],r13d:68,r13b:68,exercis:[8,35,9],dwarfdebug:87,featurev8deprec:47,uncal:75,mrm2m:[68,47],around:[27,75,77,3,20,35,36,95,81,43,9,11,14,47,86,18,87,64,49,21,73,23,24],libm:[10,37,44,20,17],libc:[21,35,20,75,23,9,14],unveil:[39,15],libz:20,traffic:[41,13,14],dispatch:[95,14,16],world:[21,35,62,39,87,64,31,9,89,20,15],mrm2r:[68,47],ac_config_srcdir:45,intel:[52,0,88,7,8,65,67,20],"__gxx_personality_v0":[91,20],integ:[75,0,32,4,34,80,6,37,20,8,71,14,17,47,86,62,18,87,68,91,57,94,26],timepassesisen:18,updat:[27,77,20,61,34,35,80,36,37,4,81,41,42,43,44,9,10,11,12,13,14,45,85,62,18,87,64,21,52,69,91,22,71,95,74],inte!
 r:[3,23,5
 1,36],manag:[61,21,35,47,36,28,38,81,41,70,64,62,51,9,77,96,86,13,14],mfenc:73,pushf:71,pred_iter:14,constitut:[8,14,94],stryjewski:27,seterrorstr:[41,42,43,44],"0x000000000059c583":82,definit:[27,71,77,75,32,59,20,33,34,35,37,4,39,40,41,42,43,44,9,10,11,12,13,14,15,16,17,47,18,87,64,93,68,51,74,53,73,94,95,24,56,97,26],parseextern:[37,95,41,42,43,44],evolv:74,exit:[27,75,76,29,1,4,78,32,82,60,5,35,79,80,6,20,40,41,42,43,44,9,11,14,81,83,63,48,62,84,64,65,19,66,67,50,90,91,71,93,38,97],notabl:[21,71,14,20,86],refer:[27,57,28,71,1,4,77,75,20,61,33,88,6,37,38,81,41,43,8,11,13,14,16,17,47,86,62,95,18,87,64,93,49,67,21,68,51,52,69,70,22,36,94,91,24,56,25,26],pointnum:62,power:[27,30,20,88,36,37,95,39,41,42,43,44,10,11,12,13,14,15,16,17,18,22,71,74],isloopinvari:14,blockaddress:20,image_sym_type_union:92,debug:[27,71,1,58,77,78,31,75,20,81,33,5,35,36,38,39,40,41,82,8,9,13,14,15,45,83,47,62,18,84,87,64,65,66,21,52,70,53,54,93,91,56,74],ispic:47,mov64ri:47,isset:18,mingw32msvc:71,!
 acc:[21,1
 4],stone:22,spiffygrep:18,gplv3:55,aco:36,acm:[62,71],printmethod:47,compuat:51,act:[27,71,14,87,20],industri:33,rebuild:[21,81,14,56],specialfp:68,srcloc:20,effici:[27,75,3,20,33,36,95,81,44,8,10,14,16,85,62,87,64,65,21,68,22,71,23,94,25],ri_inst:68,surviv:[91,16,95],homeless:14,asymptomat:38,setinsertpoint:[37,41,42,43,44],hex:[57,20],movsx64rr16:71,kaleidoscop:[46,35,37,95,39,41,42,43,44,9,10,11,12,13,15,16,17],verbatim:[18,47],thedoclist:57,mantissa:20,conclud:[11,12,42,43],bundl:71,image_file_machine_mipsfpu16:92,createjit:61,clenumv:18,epilog:[71,47],conclus:[46,35,95,39,41,9,13,15,16],ifunequ:20,pull:[21,75,73],tripl:[61,21,47,6,28,71,7,87,8,65,94,67,20],dirti:75,rage:32,agrep:29,inaccuraci:20,emitprologu:47,basenamesourc:56,uid:80,creat:[27,71,0,28,41,29,1,77,31,3,20,61,33,35,80,6,37,95,81,7,42,43,44,9,10,11,12,13,14,15,16,17,46,83,47,86,62,18,84,87,64,65,49,21,68,52,69,74,57,23,45,91,96,56,25,89,26],certain:[64,54,34,71,80,36,14,18,1,41,68,44,8,19,20,10,56,13,4],ge!
 tnamedope
 randidx:47,creal:[12,42],movsx32rr8:71,discrimin:[71,75,85],collector:[35,62,81,51,9,94,20],promoteop:34,collis:[37,20,75,14,87],writabl:87,freestand:20,of_list:[10,11,12,13,16,17],benchspec:29,fatal_error:52,spiffysh:18,allowsanysmalls:14,mask:[71,62,4,57,49,20],shadowlist:47,llvm_shutdown:14,tricki:[62,64,75,73],mimic:[56,75],createuitofp:[37,41,42,43,44],prealloc:14,cpp:[75,3,82,4,34,6,37,95,81,41,42,43,44,8,83,47,62,18,87,64,21,52,71,56],cpu:[57,47,22,1,7,30,64,65,94,49,67,20],consider:[21,71,57,87,3,14],illustr:[39,37,20,18,41,87,44,64,74,95,10,13,14,15,16,17],labeltyp:14,scc:[64,27,51],dw_at_apple_properti:87,astcontext:75,rewrit:[27,75,85,47,41,51,13],add16ri:68,incap:[35,9,94],add16rm:68,distalwai:56,tail:[27,68,35,94,6,26,71,87,9,20,4],add16rr:68,norm:[56,26],type_code_funct:94,getframeinfo:[71,47],"102kb":18,hard:[71,80,41,39,57,7,30,42,54,23,70,75,3,12,13,20,15,45,81],candid:[28,20,77],element_typ:[10,11,12,13,17],attr0:94,attr1:94,ia64:88,strang:[29,13,41,81],co!
 ndition:1
 ,quux:75,pedant:52,sane:[39,52,15,73],small:[27,75,29,77,32,3,20,33,6,38,39,8,70,15,85,86,62,18,87,64,67,14,71,23,94,24],release_xi:77,dsa:51,mount:21,"__image_info":20,sync:[21,57,73,6],past:[68,75,69,47,86,14,42,73,23,12,20],pass:[27,53,28,71,29,1,58,77,59,82,4,61,33,34,35,85,6,37,38,40,41,42,43,44,8,9,10,11,12,13,14,81,16,17,63,47,86,62,95,18,84,87,64,65,19,20,49,67,21,52,70,22,36,72,73,55,23,45,91,24,56,25,74],enter_subblock:94,trick:[33,35,85,20,39,7,23,9,41,13,14,15],deleg:91,xor:[27,71,47,6,20,0,14],registerregalloc:64,clock:[64,20],section:[27,71,0,92,29,1,77,75,3,20,61,35,80,36,85,95,86,44,9,10,14,16,47,48,62,18,84,87,64,19,66,67,50,21,68,52,91,22,53,72,73,23,94,24,56,25,89,26],delet:[27,75,20,80,6,37,4,81,41,42,43,44,10,11,12,13,14,17,87,64,21,70,71,36,55],abbrevi:[75,94,32],succinct:1,letlist:26,method:[53,71,29,75,3,20,61,34,85,36,37,4,41,43,44,10,11,13,14,17,47,86,62,18,87,64,49,51,70,57,95],contrast:[85,37,91,71,64,17],hasn:[64,14,86],full:[27,57,41,77,75,82,2!
 0,35,71,6
 ,37,95,39,81,7,42,43,44,8,9,10,11,12,13,14,15,16,17,83,84,87,93,21,89,52,69,22,36,73,23,45,24,56,97],hash:[27,35,21,36,87,57,23,9,14],vtabl:[75,4,87],unmodifi:45,tailcal:71,blocknam:94,inher:[81,14],ineffici:[0,71,41,94,13,14],dw_tag_arg_vari:87,islvalu:75,myownp3sett:87,shufflevector:[20,4],prior:[21,75,91,18,71,64,94,24,20],lto_module_get_symbol_nam:74,pick:[71,52,47,86,20,53,7,44,75,10,67,14],action:[34,75,47,62,14,71,64,2,91,56,20],narrowaddr:20,token_prec:[10,11,12,13,16,17],via:[61,21,71,69,27,91,20,22,84,7,64,82,8,55,74,56,3,14],depart:[75,80],dw_tag_namespac:87,ifcond:[41,42,43,11,12,13],vim:[21,68,89,56],memrr:47,image_sym_class_member_of_union:92,ifcont:[41,42,43,11,12,13],decrement:91,select:[27,71,29,1,78,31,59,20,61,34,6,41,13,14,47,86,18,64,93,21,68,51,69,70,22,57,23,91,56],silva:26,x44:92,mycompil:52,targetselect:[41,42,43,44],isconst:[14,94],more:[27,53,0,28,41,29,1,30,31,75,32,85,3,4,33,34,35,71,6,37,38,39,81,7,42,43,44,8,9,10,11,12,13,14,15,16,17,63,47,86,!
 62,95,18,
 84,87,64,96,20,49,50,80,21,68,51,52,69,70,22,36,72,73,57,54,23,45,94,91,24,56,25,89,74],isintegerti:14,door:85,tester:[33,29,1,58,77,23],f3_2:47,type_code_metadata:94,zeroext:[20,94],addcom:62,movabsq:72,multiset:14,compani:23,cach:[61,27,52,36,20,87,71,30,73,64,14],llvm_on_unix:3,at_apple_properti:87,x86callingconv:47,returntyp:20,learn:[21,35,69,20,22,41,89,75,9,13,14],cmpinst:14,legalizedag:34,bogu:[64,21],scan:[64,35,62,1,75,44,8,65,9,10,67,71],challeng:[12,42],registr:[88,47,62,81,82,64],accept:[21,75,69,85,6,4,18,81,55,31,23,20,25,14,26],pessim:27,x86instrinfo:47,v_reg:71,huge:[8,21,23,75],llvmgrep:21,readobj:[21,50,58],testresult:33,feat_objectwrit:71,appenduniqu:20,simpl:[27,57,0,71,29,1,31,75,3,4,34,35,6,37,20,39,41,42,43,44,8,9,10,11,12,13,14,15,16,17,46,47,86,62,18,87,64,65,67,93,21,68,70,36,73,23,45,94,95,24,25],isn:[27,75,3,20,37,95,39,81,43,44,10,11,70,15,45,17,86,64,14,71,73,23,16,56],loophead:[20,42,43],plant:64,referenc:[20,37,95,41,42,43,44,10,11,12,13,14,!
 16,17,47,
 18,87,93,51,74,55,94,26],spillalign:47,variant:[64,27,52,47,14,18,8,24,11,10,3,12,13,4,15,16,17],plane:[12,42],maywritetomemori:[14,73],thought:[37,20,71,26,17],circumst:[47,4,41,44,64,20,91,10,56,13,14],github:46,arcanist:69,author:[75,85,71,51,26,81],atan2:[39,15],nvidia:[71,6],returns_signed_char:20,constitu:[11,43],ith:14,trade:[70,14],i386:[66,71],paper:[33,71,75,88],vec2:[20,14],pane:69,vec1:[20,14],bou_unset:18,nifti:[64,11,35,9,43],alli:20,gcov:78,hexinteg:26,superflu:86,targetselectiondag:[34,71,47],image_sym_type_void:92,argsv:[37,41,42,43,44],cond_next:[13,41],instruct:[27,53,0,71,75,2,32,59,20,33,34,35,88,80,6,37,4,81,41,43,44,8,9,60,10,11,13,14,17,47,86,62,87,64,65,67,21,68,51,52,69,70,22,36,72,73,55,94,91,56,25,97],authent:[96,88],achiev:[52,20,22,73,74,59,3,14],tokcodefrag:26,lto_module_is_object_file_in_memory_for_target:74,found:[27,53,0,28,71,4,77,31,32,59,3,20,33,80,6,37,38,41,42,8,12,13,14,45,17,47,62,18,87,64,21,52,90,70,36,57,23,91,56,74],gettermin:14,!
 mergabl:2
 7,"0b000011":47,monoton:[20,73,77],type_info:91,realli:[27,75,29,31,20,34,35,37,39,81,41,42,43,44,8,9,10,11,12,13,14,15,17,86,18,87,68,52,73,23,56,89,26],loweralloc:64,getcalleesavedreg:47,reduct:[27,75,0,38,58,67,20],reconstitut:20,massiv:[56,40],ftz:6,stackframes:62,research:[33,29,34,87],getbasicblock:71,x86genregisterinfo:[71,47],occurr:[18,4,94],loopbb:[41,42,43],qualifi:[81,86,71,87,77,20],distoth:56,proxi:71,on_clon:1,numabbrevop:94,believ:[75,20,42,43,44,23,10,11,12,14],"__cxa_begin_catch":91,instrmap:[59,47],mrm0m:47,fnptrval:20,xxxend:14,amper:30,testament:[39,15],ge_missing_jmp_buf:75,new_then_bb:[11,12,13],major:[21,68,71,47,27,4,22,36,41,54,77,8,23,20,13,14,81],dw_at_high_pc:87,curesult:6,unprofit:27,number:[27,71,0,95,41,29,1,75,77,2,32,82,4,33,34,35,80,36,37,20,39,81,7,42,43,44,8,9,10,11,12,13,14,15,16,17,83,47,86,62,74,18,87,64,49,21,68,51,52,69,70,57,72,89,54,23,45,94,91,24,56,97,26],dw_at_apple_property_readwrit:87,distchecktop:56,obj_root:21,horribl:75,dw!
 _at_low_p
 c:87,differ:[27,57,0,28,71,29,77,31,75,32,59,3,4,61,33,34,35,88,85,6,37,20,40,41,42,43,44,8,9,60,10,11,12,13,14,81,17,47,86,62,74,18,87,64,65,19,49,21,68,69,70,22,36,23,94,91,56,26],exponenti:[27,18,20],checkpoint:91,unrecogniz:93,functionast:[37,95,41,42,43,44],illeg:[27,71,86,6,20,18,0,14,81],dfa:[71,97],fptr:[41,42,43,44],relationship:[47,62,20,87,64,59,3,4,14],dagarglist:26,consult:[21,51,80,33,81,64,31,56],aad:71,llvm_svn_rw:82,tokstr:26,seamlessli:74,powi:20,reus:[14,71,87,64,23,20],arrang:[64,85,18,71,8,20,45],comput:[27,71,75,32,20,35,88,6,37,39,81,41,42,43,44,9,10,11,12,13,14,15,17,47,86,62,64,70,22,36,96],packag:[21,52,33,28,7,30,77,54,56,45],returns_twic:20,flto:55,equival:[27,68,35,52,94,86,6,62,26,18,71,73,75,19,20,56,9,14,22,67],odd:[18,23,75,53],self:[27,81,69,62,95,29,71,42,44,64,94,10,12,14,16],also:[27,57,0,28,41,29,1,30,77,31,75,32,59,3,95,4,33,5,35,79,71,6,37,38,39,81,7,42,43,44,8,9,76,10,11,12,13,14,15,16,17,47,86,62,74,18,34,87,64,65,20,49,66,67,93,80,!
 21,68,51,
 52,69,70,22,36,73,54,55,23,45,94,91,24,56,89,26],without:[27,75,0,77,3,82,20,80,38,39,81,41,42,43,44,8,10,11,12,13,14,15,16,83,47,86,62,95,18,87,64,49,67,21,52,69,70,22,71,73,54,55,23,45,94,91,56,25,89,74],ex2:6,ptrb:6,ptrc:6,coff:[88,71,19,92],ptra:6,pipelin:[27,47,6,41,42,43,44,8,32,10,11,12,13,64],unset_vari:56,rhs_val:[10,11,12,13,17],step_val:[11,12,13],plai:[35,39,64,9,26,15],plan:[68,81,6,62,71,64,23,14],exn:20,alu32_rr:59,"0x14c":92,cover:[64,21,86,75,47,39,18,71,42,87,8,31,23,22,96,12,89,20,15],abnorm:3,exp:[2,20,0],microsoft:[33,52,18,71,31,96,88,20],pubnam:87,gold:[21,71,55,30,33],getsymbolnam:47,xcode:[21,52,82],gcmetadaprint:62,session:[89,82],tracevalu:27,ugt:20,impact:[62,20,75,14,87],addrri:47,writer:[33,34,71,88,47,62,40,73,64,94,97,20,81],solut:[33,35,52,18,71,41,73,87,64,9,13,14,81],printdatadirect:47,llvm_executionengin:[10,11,12,13],factor:[68,75,0,14,71,20],bernstein:87,i64imm:47,llvm_obj_dir:81,microprocessor:[71,20,47],regstat:71,mainten:[59,23,74],b!
 itmap:94,
 f2_1:47,synthet:47,f2_2:47,synthes:[10,34,87,44],"__stack_chk_fail":20,machinememoperand:73,coerce_offset0:4,link_compon:[56,45],set:[27,57,28,41,29,1,30,77,31,75,59,3,20,61,33,34,85,88,71,6,37,38,39,81,7,42,43,44,8,10,11,12,13,14,15,16,17,47,62,74,18,84,87,64,96,65,67,93,80,21,68,52,69,70,22,36,54,55,23,45,94,95,24,56,97,26],image_sym_class_member_of_enum:92,seq:92,creator:[64,21],overwhelm:[39,15],startup:[54,75,1,20,6],seg:21,see:[27,53,0,28,41,29,1,31,75,32,85,3,4,33,5,35,79,71,6,37,38,81,7,42,43,44,8,9,76,10,11,12,13,14,16,17,47,48,62,18,84,34,87,64,96,65,20,66,67,86,93,80,21,68,51,52,70,22,36,73,89,23,45,94,95,24,56,25,97],sed:[21,81,56],overboard:75,analog:[62,68,14],module_code_tripl:94,reglist:47,parsenumberexpr:[37,95,41,42,43,44],lto_codegen_cr:74,topmost:62,mymaptyp:57,mutex:14,subdir:[8,56],documentlisttrait:57,mappingtrait:57,thrive:33,signatur:[64,71,20,80,32],machineoperand:[71,47],javascript:[35,9],libnam:[64,56,83],myocamlbuild:[10,11,12,13,17],disallow:[2!
 4,18,20,8
 6],nohup:28,dividend:[71,20],proj_src_dir:56,bodi:[27,75,20,37,4,41,42,43,44,10,11,12,13,14,16,17,18,87,64,68,70,72,94,95,26],last:[75,0,1,77,85,4,80,37,20,39,42,8,12,14,17,47,18,64,68,91,22,71,23,94,89,26],operarand:2,"0xh":20,whole:[64,34,75,80,62,20,29,71,7,43,44,8,24,23,95,49,10,11,14,16],sink:[27,18,36],load:[27,53,71,1,4,75,20,61,6,38,40,41,82,8,13,14,63,47,48,62,18,84,87,64,65,67,86,51,70,22,36,73,94,24,56,25,74],episod:[11,43],nakatani:71,schedul:[21,47,4,22,71,30,77,64,67,14],dw_tag_namelist:87,hollow:57,lex:[39,10,11,12,13,26,15,16,17],functionpass:[27,47,36,62,64,14],"0x100000f24":66,boolean_property_nam:24,worthless:75,devic:[5,79,90,6,76,22,84,30],perpetu:23,"0xf":68,devis:45,firm:56,gettokpreced:[37,95,41,42,43,44],fire:[75,70],func:[5,20,64,10,11,12,13,14,16,17],registerpass:64,rdtsc:20,straight:[68,36,37,95,39,71,49,3,14,15,16,17],erron:[21,18],histor:[8,20,73,86],durat:[64,71,36],passmanag:[61,18,41,42,43,44,64,10,11,12,13],error:[27,53,57,28,71,1,77,75,32,!
 3,4,5,35,
 79,80,6,37,38,39,81,41,42,43,44,8,9,76,10,11,12,13,14,15,16,17,83,63,47,62,18,84,64,65,19,20,66,67,21,68,90,91,36,73,55,23,45,95,56,97,74],dvariabl:52,v1size:36,real:[21,75,47,6,4,18,36,42,87,20,12,14,39],machinecodeemitt:47,reg2mem:27,binutil:[96,21,88,7,55],genregisternam:71,miscommun:23,inst_invok:94,chase:53,i29:20,decor:87,irrelev:[86,20,36],i20:20,i24:20,x64:[96,21,4],funni:[75,13,41],decod:[27,68,20,87,94,14],sparclite86x:47,built_sourc:56,foldingset:14,bitread:24,predreg:59,dw_at_declar:87,stack:[27,71,75,20,33,35,36,39,41,9,13,14,15,47,62,87,64,21,51,91,22,57,72,25,26],recent:[21,28,91,57,23,20],call32r:68,eleg:[35,95,43,44,9,10,11,16],llvm_unreach:75,person:[91,53,20,89,57],parse_prototyp:[10,11,12,13,16,17],expens:[27,75,47,91,18,73,64,65,67,14],call32m:68,llvm_tablegen:52,always_inlin:27,crosscompil:[71,7],else_v:[11,12,13],debug_level:18,simd:[67,22,65,20,0],sidebar:77,smooshlab:33,eager:14,input:[27,57,0,71,1,4,78,32,59,20,81,5,35,79,6,37,38,39,40,41,42,43,44,!
 8,9,76,10
 ,11,13,70,15,17,47,18,84,87,64,65,66,67,50,21,68,51,22,36,92,93,95,56,97,74],format:[27,71,29,1,78,75,32,59,20,61,33,34,88,80,6,40,82,81,63,47,48,18,84,87,65,19,67,50,93,21,68,91,22,57,23,94,24,89],subfield:68,intuit:20,dw_tag_ptr_to_member_typ:87,formal:[20,14,87],ivar:87,isdeclar:14,threadsaf:62,image_sym_type_nul:92,parse_toplevel:[10,11,12,13,16,17],ii32:68,x86framelow:71,moduleid:[8,37,17],encount:[20,93,71,14,47],image_file_debug_strip:92,sampl:[21,6,37,95,18,92,82,62,31,45,59,56,16,17],sight:[13,41],instcount:27,"_bool":[13,41],p5i8:6,recognit:22,llvm_obj_root:[8,56,29,45],xxxgendagisel:47,agreement:23,prerequisit:[64,47],linker_private_weak:20,indirectbrinst:2,condbranch:47,oneormor:18,getinsertblock:[41,42,43],putchard:[35,37,41,42,43,44,9,10,11,12,13],primarili:[21,5,40,27,62,22,1,30,48,42,68,24,12,71,14,50],getimm:47,xxxinstrformat:47,requires_rtti:54,contributor:23,occupi:[20,80],span:[64,75],printinformationalmessag:18,custom:[27,34,71,52,47,29,33,62,4,18,57,68!
 ,75,20,38
 ,24,86,14,22,81],createcondbr:[41,42,43],suit:[21,34,71,52,28,91,29,1,7,87,77,8,31,23,56,14,81],parse_arg:[10,11,12,13,16,17],expound:87,subgraph:27,atop:62,lint:27,nodupl:20,atoi:20,link:[27,53,28,71,58,77,31,75,20,33,35,80,6,37,38,39,7,42,44,8,9,10,11,12,13,14,15,45,17,83,47,62,18,84,87,64,93,19,21,51,52,90,70,36,72,54,55,23,24,56,89,74],atom:[33,27,20,73,4,87,14],line:[27,57,0,28,71,29,1,31,75,32,82,4,33,5,35,79,80,6,37,38,39,81,41,42,43,44,8,9,76,10,11,12,13,14,15,16,17,47,62,95,18,84,87,64,65,20,49,66,67,50,93,21,68,89,52,69,90,70,22,53,72,73,54,55,23,45,91,24,56,97],talli:29,simplif:[64,27,22,70],cin:81,intim:75,hex8:57,"0xffffffff":94,fdiv:20,doc:[21,34,52,33,38,22,57,7,77,88,89],impl:[64,27,14],debugtrap:20,parser:[20,35,37,95,39,81,41,42,43,44,9,10,11,12,13,15,16,17,46,18,21,71,24,97],call_site_num:91,"char":[75,0,82,20,80,6,37,95,41,42,43,44,10,11,12,13,14,15,16,17,47,86,18,87,64,36,74],at_encod:87,gcfunctioninfo:62,doe:[27,53,57,71,29,1,77,31,75,85,3,82,20,81,61,!
 34,35,79,
 80,6,37,39,40,41,42,43,44,8,9,10,11,12,13,14,15,16,17,47,86,62,74,18,87,64,93,49,21,68,52,70,36,72,73,55,23,45,94,91,56,25,26],linkonceodrlinkag:14,tok_unari:[41,42],codes:68,xxxcodeemitt:47,ud2a:71,kwalifi:92,scrape:1,disp32:71,isnotduplic:68,issiz:14,caml:[46,15,16],lang:18,mayalia:36,land:[91,23,20],x86codeemitt:47,algorithm:[27,35,71,47,36,62,20,18,40,41,43,75,9,95,91,11,13,14,22,16],agg:20,libstdc:[21,7],fresh:[21,56],hello:[21,68,39,64,31,20,15],mustalia:36,llvmcontext:[37,14,41,42,43,44,20],code:[27,53,0,28,41,29,1,30,58,77,31,75,95,85,3,82,4,61,33,34,35,71,6,37,38,39,81,7,42,43,44,8,9,10,11,12,13,14,15,16,17,46,47,86,62,74,18,63,87,89,64,65,19,20,49,66,67,93,80,21,68,51,52,69,70,22,36,72,73,57,54,55,23,45,94,91,24,56,97,26],partial:[21,51,27,20,0,57,8,71,14,97],resultv:20,scratch:[14,47],setcc:[71,14],globallisttyp:14,printimplicitdef:47,young:14,send:[21,5,71,79,69,33,28,76,22,53,65,73,77,8,23,96,97,64,89],tr1:14,sens:[35,80,81,36,37,20,18,71,73,87,75,9,86,14,22,17!
 ],henders
 on2002:62,sent:[33,65,23,77,76],unzip:[28,21],clearresourc:71,registeredarg:62,tri:[27,52,47,39,71,64,89,70,15],bsd4:80,setconvertact:47,magic:[21,80,20,42,87,94,12,14],dname:18,complic:[21,34,75,85,47,62,73,8,31],trc:71,tre:27,blockquot:94,fewer:[62,27],"try":[27,57,71,75,3,20,33,35,36,38,81,41,42,44,9,10,11,12,13,14,16,17,48,18,63,64,21,70,53,73,91,56,89],race:[14,73],build_uitofp:[10,11,12,13,17],udiv:[71,20],vehicl:75,impli:[21,47,36,62,26,71,23,20,56,66,3,86,14],monospac:89,natur:[27,75,28,77,3,4,37,20,41,43,11,13,14,17,85,86,62,18,87,64,21,68,91,57,73,23,89,74],odr:20,proj_obj_dir:56,psubu:8,llvmdebugvers:87,instnam:27,ueq:[41,13,20],index:[21,71,94,80,47,36,62,33,18,57,87,77,91,20,49,56,86,14,22],twine:14,targetregisterclass:[71,47],asmwrit:[62,34],getanalysisusag:[64,36],henceforth:72,paramti:94,image_scn_align_64byt:92,dyn_cast_or_nul:14,lea:[68,71],targetregisterinfo:[71,47],len:20,sparctargetlow:47,rglob:5,let:[53,71,29,59,20,35,85,6,37,4,39,41,42,43,44,9,10,11,1!
 2,13,14,1
 5,16,17,47,86,18,87,64,21,68,52,69,74,22,36,54,95,96,89,26],ubuntu:[21,7,30],ptx30:71,ptx31:71,great:[75,62,39,71,42,64,23,56,12,14,15],survei:88,machineinstr:[67,65,71,47],technolog:[74,22,35,9],rdx:68,flagshollow:57,global_end:14,rdi:68,firefox:22,sgt:20,sgi:14,sgn:20,sge:20,movsx32rr16:71,"__________":14,getnumparam:14,eltti:94,zip:[21,56],commun:[61,33,51,36,20,6,75,77,64,23,74,3,82,14,81],my_fmad:6,doubl:[27,71,31,20,35,88,85,37,4,39,41,42,43,44,9,10,11,12,13,14,15,16,17,47,18,87,68,57,94,95,56],upgrad:[21,81,87,48],next:[75,28,77,31,59,20,61,85,37,4,39,41,42,43,44,8,10,11,12,13,14,15,16,17,47,86,62,95,18,87,64,21,70,22,94,91,74],doubt:[89,85],lock:[64,20,14,73],commut:[27,71,47,36],fpregsclass:47,comparison:[27,85,0,28,20,86,42,73,2,95,12,14,16],gladli:[21,31],firstcondit:14,bunzip2:21,objectslo:56,uvari:52,get_instrinfo_operand_enum:47,folder:[21,52],devmajor:6,intregssuperregclass:47,scatter:[87,0],dw_form_data4:87,weaker:20,dw_form_data1:87,dw_form_data2:87,process!
 :[27,57,0
 ,28,30,77,75,59,3,82,20,61,33,35,80,4,39,44,8,9,10,71,14,15,16,47,62,95,18,87,64,93,21,68,69,70,22,53,73,23,91,24,56,74],optioncategori:18,preformat:89,high:[27,75,0,77,3,20,61,33,34,35,80,6,81,41,82,8,9,13,14,45,47,86,62,87,68,91,71,36,23,94],pictur:[37,86,17],fprintf:[37,95,41,42,43,44],streamer:71,dw_ate_signed_char:87,onlin:[13,41],adc32mi8:68,visitsrl:34,delai:14,infeas:51,allocainst:[20,13,14,41],stand:[64,75,14,71,8,23,95,20,16],overridden:[20,47,36],singular:75,surfac:71,xc3:92,xc7:92,xc4:92,x86registerinfo:[71,47],addri:47,dw_at_apple_property_attribut:87,dw_tag_class_typ:87,alloc:[57,75,20,61,35,36,41,44,9,10,13,14,47,86,62,64,65,67,21,91,22,71,72],essenti:[47,62,84,73,94,14],sdiv:20,seriou:21,counter:[27,20,22,73,70,14],robot:33,element:[27,34,57,94,47,6,14,0,36,87,75,68,20,86,71,26,89],issu:[57,71,1,30,77,75,35,6,39,41,43,44,8,9,10,11,13,14,15,18,87,64,19,21,36,23],liveintervalanalysi:71,unaccept:23,allow:[27,57,0,71,1,75,92,77,2,85,3,82,4,61,33,34,35,80,6,37,38!
 ,39,81,41
 ,42,43,44,9,10,11,12,13,14,15,16,17,47,86,62,95,18,87,64,65,19,20,49,21,68,69,74,22,36,72,73,54,23,94,91,24,56,25,26],retval:[37,41,42,43,44,20],stepexpr:[13,41,42,43],movl:4,fstrict:20,movi:75,move:[27,35,80,21,62,36,75,73,43,77,64,23,9,11,71,20,81],stacksav:20,comma:[21,68,18,57,43,11,25,20],oprofil:[54,52],ofstream:18,perfect:23,define_abbrev:94,chosen:[71,75,1,20],infrastructur:[64,21,34,71,33,62,20,22,1,75,36,70,8,23,96,14,45,87],cond_tru:[13,41],lastinst:47,therefor:[27,71,86,6,62,20,18,57,73,64,23,25,14],python:[21,35,28,1,7,8,62,31,9,26],initializenativetarget:[41,42,43,44],overal:[69,86,62,91,71,43,23,11,20],innermost:0,facilit:[14,57,87,23,20,45],typestack:34,fcc_val:47,anyth:[21,75,85,27,37,65,71,73,43,44,87,31,23,67,10,11,14,81,17],hasexternallinkag:14,truth:[11,20,43],"0b111":68,llvminitializesparcasmprint:47,compute_xx:6,idxmask:20,subset:[27,35,86,6,20,22,1,36,87,8,23,9,14,29],denseset:14,"0x7fffffffe040":82,bump:[62,72,14],lsampl:45,"static":[27,57,7,58,75,2!
 0,61,34,8
 5,36,37,38,39,81,41,42,43,44,10,71,14,45,17,47,86,62,18,87,64,65,67,21,51,70,22,53,73,95,56,74],convert_from_eh_region_ranges_1:21,variabl:[27,53,0,71,29,1,31,75,32,4,61,5,35,80,6,37,20,39,81,41,42,43,44,8,9,10,11,12,13,14,15,16,17,46,47,86,62,18,87,64,21,68,51,52,36,72,73,57,55,45,94,95,56,26],matrix:[62,22,71],contigu:[20,14,87],myregalloc:64,tok_if:[41,42,43],tok_in:[41,42,43],memorysanit:20,shut:[75,47],initializepass:36,unpars:[95,1,16],tempt:[3,75],image_file_system:92,shortest:26,spill:[67,71,47],could:[27,71,1,75,59,3,20,35,85,36,37,4,81,41,42,43,44,8,9,10,11,13,14,16,47,86,62,18,87,49,21,68,52,69,70,57,73,55,95,96,89],lexer:[46,34,35,37,95,39,41,42,43,44,9,10,11,12,13,15,16,17],scari:[39,35,9,15],length:[27,68,89,80,86,20,18,1,87,8,94,10,11,12,13,14,17],enforc:[68,75,62,4,18,71,73,20,14],outsid:[27,51,55,86,33,28,20,18,36,73,64,37,75,3,14,29,17],scare:23,spilt:71,softwar:[21,35,47,37,39,75,77,8,62,31,23,9,67,56,64,15],scene:[22,14],add_pt:59,spaghetti:[39,15],selec!
 tiondagno
 d:[71,47],owner:[71,23,80,77],nvvm:6,add_pf:59,featurev9:47,sparcgensubtarget:47,licens:[75,81,77,64,55,23],system:[53,28,41,29,30,77,31,75,3,20,33,34,35,88,71,6,39,81,7,44,9,10,13,14,15,45,86,48,18,87,64,65,67,80,21,68,51,52,69,22,36,54,55,23,24,56,74],parse_oper:[12,13],gcse:[64,27,14],termin:[27,75,76,1,2,3,20,5,79,80,6,40,43,8,11,70,47,18,84,87,64,68,90,14,91],f_inlined_into_main:66,llvmgcc:56,returnindex:49,ldrex:73,gotcha:75,endexpr:[13,41,42,43],baseclasslist:26,"12x10":20,arrayref:14,haven:[64,29,75],datatyp:[39,22,71,15,14,18],steen:36,bother:[13,41],arg_end:14,bitvalu:57,stricter:73,xxxregisterinfo:47,getzextvalu:14,viewer:75,op_end:14,var_arg_function_typ:17,clearli:[23,75],optimis:10,mdstring:[2,87],"0x00002200":87,disassembl:[21,33,76,22,71,58,31,32,24,25,97,20],tramp1:20,accuraci:[27,20],at_typ:87,foldingsetimpl:21,type_of:[10,11,12,13,17],courtesi:23,griddim:6,poison4:20,poison3:20,poison2:20,zec12:22,incfil:56,setloadextact:47,ffi_include_dir:52,segment:[33,!
 71,72,87]
 ,placement:[27,75,45,56],stronger:[20,14],parsevarexpr:41,face:[64,3,75,72],isbranch:68,brew:14,vaarg:22,linkonc:[21,6,20,19,94,14],fact:[75,20,35,80,36,37,81,41,42,44,9,10,12,13,14,85,86,18,64,21,68,51,91,71,23,24,26],dbn:21,borderlin:75,truedest:20,dbg:[27,20,87,70],module_code_deplib:94,rough:[26,73,86],trivial:[27,75,3,20,34,35,36,95,39,81,41,44,9,10,13,14,15,16,47,86,18,87,64,71,73],redirect:[8,38,77],isstor:71,getelementptr:[35,86,6,62,4,36,9,20,32,71,14,81],hash_data_count:87,should:[27,53,57,28,41,29,1,75,30,77,31,2,59,3,20,61,33,34,85,71,6,37,38,39,81,7,43,44,8,10,11,95,13,14,15,16,17,47,86,62,74,18,84,87,64,96,65,49,67,80,21,68,89,70,22,36,73,54,55,23,45,94,91,24,56,25,97,26],jan:80,suppos:[71,52,85,91,57,64,24,3,20],create_funct:[10,11,12,13],opreand:14,nonzero:[68,94],hope:[54,62,23,75],meant:[21,33,28,26,84,31,20,56,89,14],insight:20,familiar:[21,85,6,39,71,43,64,56,11,15],memcpi:[27,20,73,36],autom:[21,71,69,45],smash:20,symtab:14,machineconstantpool:71,reid:3!
 ,dw_ate_s
 ign:87,stuff:[68,75,18,71,41,43,44,64,89,10,11,13,14,29,81],booltmp:[37,41,42,43,44,10,11,12,13,17],inlni:66,type_code_arrai:94,unimport:28,frame:[61,27,35,47,62,20,65,71,72,87,51,9,91,66,14],packet:[96,71,97],temporarili:[56,70],binary_nam:66,polymorph:14,wire:81,op_iter:14,fakesourc:56,compute_factori:82,verilog:22,live_iter:62,sectionmemorymanag:61,unrecurs:[13,41],email:[21,35,69,33,73,23,9,45],superword:[51,0],dislik:23,linkonceanylinkag:14,memri:[71,47],endl:75,use_iter:14,doxygen:[21,75,33,37,31,56,14,17],scalaropt:83,valgrind:[8,38,1,53],sdtc:47,etc:[27,75,28,29,77,31,3,4,33,34,35,36,37,38,39,81,41,42,43,44,9,10,11,12,13,14,15,16,17,47,86,62,87,64,20,49,21,68,52,71,73,54,23,94,95,56,74],cindex:47,vk_basicblock:75,preheader_bb:[11,12],position_at_end:[10,11,12,13,17],exprprec:[37,95,41,42,43,44],indici:94,distil:8,bininteg:26,rpcc:20,llvm_external_:52,triniti:88,insuffici:[3,20,30,47,87],va_arg:20,immedi:[27,75,73,20,61,35,80,6,81,41,44,9,10,13,14,47,64,68,69,71,36,9!
 4,25],hex
 16:57,image_sym_type_char:92,togeth:[27,75,0,29,4,20,35,80,36,37,38,39,42,43,8,9,11,12,14,15,16,17,62,18,84,87,64,93,68,90,70,71,23,95,24],allocationinst:14,rbx:[68,71],dataflow:[41,13,20],cvt:6,reloc_absolute_dword:[75,47],rbp:[68,71],cvf:77,enginebuild:[61,41,42,43,44],objmakefil:56,auxiliarydata:92,apfloat:[37,22,41,42,43,44,17],site:[27,36,62,20,22,1,8,31,91,14],uglygep:86,archiv:[21,80,33,22,58,55,23,24,56,93,74,45],mybuilddir:52,incom:[47,20,71,41,43,23,11,12,13,14],surprisingli:[10,21,95,16,44],greater:[21,47,6,62,71,2,94,32,86,20],mutat:[27,75,62,41,42,12,13,14],referenti:27,basicblocklisttyp:14,lex_com:[10,11,12,13,15,16,17],dan:57,phi:[27,0,71,41,42,43,94,32,11,12,13,20],sadd:20,expans:[71,26,47,49],upon:[61,81,47,62,14,84,87,56,20,45],foldmemoryoperand:[71,47],expand:[34,57,47,4,32,68,97,75,49,56,50,71,20,81],off:[75,20,35,80,6,37,39,41,42,43,44,8,9,10,11,12,13,14,15,17,68,52,70,71,54,23],symbol2:19,argnam:[37,95,18,41,42,43,44],exampl:[27,53,0,28,41,29,1,75,30,3!
 1,2,95,59
 ,3,82,4,81,34,35,71,6,37,38,39,40,7,42,43,44,8,9,10,11,12,13,14,15,16,17,83,47,86,62,85,18,84,87,64,96,19,20,49,66,21,68,51,52,69,70,36,73,57,54,55,23,45,94,91,24,56,25,89,74],command:[53,0,28,71,29,1,58,77,31,75,32,82,4,33,5,79,80,6,37,38,39,81,41,42,43,44,8,76,10,11,12,13,14,15,16,17,47,18,84,64,96,65,20,49,67,50,21,68,52,69,90,70,22,36,72,55,93,45,95,24,56,97,74],svnup:21,filesystem:[1,7],outputfilenam:18,newest:19,paus:[62,36],xec:92,glue:81,web:[22,23,69],zenterpris:22,drawback:[18,23,14],exempt:75,target_opt:21,nvt:47,globalopt:[64,27],indvar:[64,27,14,20],piec:[53,77,75,37,95,39,41,42,43,8,11,12,13,70,15,16,17,86,87,21,68,71,23,94,24],core2:8,five:[91,18,71,14],release_16:21,addsdrr:68,xe8:92,recurr:27,desc:[64,18,47],resid:[6,62,87,64,94,20],emmc:30,type_code_vector:94,isus:71,objectbuff:61,byteswap:34,resiz:75,"0x29273623":87,captur:[20,34,35,37,4,41,42,43,44,8,9,10,11,12,13,70,16,17,18,87,71,94,95],main_loop:[10,11,12,13,16,17],build_exampl:56,i64:[47,86,4,71,87,6!
 ,20],emit
 globaladdress:47,flush:[61,75,6,30,10,11,12,13,16,17],guarante:[21,35,71,86,27,62,20,18,36,41,73,87,64,23,9,91,56,13,14,81],transport:22,"__syncthread":6,avoid:[75,28,30,3,20,47,36,41,8,13,70,85,86,62,87,64,21,68,14,22,71,23,94,74],image_sym_class_fil:92,mnemon:[71,47],arg_siz:[37,41,42,43,44,62,14],barlist:75,stage:[33,47,6,28,38,18,71,77,95,74,16],"0x4200":87,c_str:[6,37,95,18,41,42,43,44,14,39],nullari:[95,16],uniquevector:14,chrome:22,getbitwidth:14,handleextern:[37,95,41,42,43,44],dw_tag_base_typ:87,insidebundl:71,retcc_x86_32:47,waterfal:96,mere:[27,86,37,31,20,17],merg:[27,0,28,77,20,36,37,4,41,42,43,44,10,11,12,13,14,16,17,87,71,23,95,74],behind:[33,71,6,4,22,53,87,64,75,49,59,14],relpo:80,valuesuffix:26,multidef:68,textfileread:75,p4i8:6,mandel:[12,42],llvm_include_exampl:52,mdnode:[2,20,87],"function":[27,53,0,71,1,58,75,32,59,3,82,4,81,61,5,35,80,6,37,20,39,40,41,42,43,44,9,10,11,12,13,14,15,16,17,63,47,86,62,85,18,84,34,87,64,93,49,66,21,51,52,70,22,36,72,73,57,!
 54,55,95,
 94,91,24,56,25,74],namedvalu:[37,41,42,43,44],documentlist:57,getenv:3,dw_at_entry_pc:87,count:[27,34,80,47,0,62,4,18,36,87,70,8,91,95,20,49,14,29,16],inst_cal:94,data16bitsdirect:47,lookup_funct:[10,11,12,13,17],evidenc:86,localexec:[20,94],otherwis:[27,57,41,1,30,4,78,32,20,5,79,37,38,39,40,7,42,43,44,76,10,11,12,13,14,15,16,17,83,63,48,74,18,84,87,64,65,67,50,68,51,90,70,53,73,95,94,91,56,97,26],problem:[27,71,41,77,31,75,3,4,33,35,36,37,38,81,7,42,43,8,9,11,12,13,14,17,86,62,18,84,87,64,21,70,53,54,23],"int":[57,0,71,4,31,75,59,82,20,35,6,37,38,39,81,41,42,43,44,9,10,11,12,13,14,16,17,47,86,62,74,18,87,66,21,68,70,36,92,73,55,95,89,26],rightli:56,ini:24,inf:[67,18,65,20,87],ing:[27,75,37,41,44,10,13,17],inc:[59,56,71,64,47],bzip2:[21,56],nonetheless:20,optsiz:[20,94],libcxx:28,lookup:[21,35,47,37,20,42,87,75,9,12,13,14,17],varieti:[27,75,30,35,88,80,36,37,42,43,44,9,10,11,12,14,17,62,87,21,51,91,22,71,73,94,24,26],getopt:18,liblzma:7,computearea:85,aliasresult:36,repeat!
 :[27,28,7
 0,87,91,25,20],defaultlib:31,emitsymbolattribut:71,in0:20,in1:[71,20],in2:71,eof:[37,95,39,41,42,43,44],header_data:87,cumemfre:6,dumpabl:64,rabfik:80,configmaxtest:14,hashes_count:87,sm_20:[71,6],sm_21:71,untrust:23,child:[12,42,85],rapid:23,"const":[34,57,85,47,36,37,20,18,6,41,42,43,44,64,62,74,95,75,71,14,87],lsda:91,r8b:68,r8d:68,deviat:[71,75],binoppreced:[37,95,41,42,43,44],worth:[70,75,14,30,85],r8w:68,rowfield:59,printnextinstruct:14,getpar:[41,14,42,43],type_code_numentri:94,llvm_enable_ffi:52,cmd:69,upload:69,reg:[68,47,6,71,25,4],red:[21,20,87],add_rr:68,add_char:[10,11,12,13,15,16,17],externally_initi:20,callcount:14,cmp:[27,71,14,20],abil:[27,34,84,39,62,71,18,57,41,42,43,82,25,11,12,13,15,45,87],hork:68,mcstreamer:[62,71],consequ:[21,36,20,70,8,91,56,14],ilist:14,image_scn_mem_shar:92,llvmbuild:[24,33,48],scalarenumerationtrait:57,disk:[75,20,1,87,24,3,74],runfunctionasmain:82,loop_bb:[11,12,13],flaghollow:57,topolog:4,told:75,ontwo:20,copysign:20,somefunc:[7!
 5,14],x86
 mmx:20,mcoperand:71,pred_end:14,myregisteralloc:64,optzn:[53,41,42,43,44,10,11,12,13],"0f7f800000":6,aka:[36,37,20,39,71,41,42,43,44,95,10,11,12,13,14,15,16,17],werror:55,idnam:[37,95,41,42,43,44],instr:[62,68,71,97],releas:[75,28,77,20,33,37,81,14,45,83,47,64,49,21,52,22,71,73,54,55,23,56,74],setgc:62,sspstrong:20,ftoi:47,total:[14,29,72,73,87,64,94,32,20],bra:6,highli:[62,14,71,41,13,20,45],bookkeep:[27,14],plot:[12,42],postincr:75,foster:[3,23],greedi:[71,18,65],simplifycfg:[38,13,41,81,27],setreg:71,iscommut:68,llvm_enable_p:52,numberofauxsymbol:92,image_file_machine_powerpc:92,word:[75,85,47,37,14,18,71,87,62,94,91,20,81,17],insignific:[40,20],err:[64,14,6],restor:[47,72,71,41,42,43,94,91,11,12,13,20],next_prec:[10,11,12,13,16,17],work:[27,57,41,29,1,77,31,75,32,85,3,4,61,33,34,35,88,71,36,37,38,39,81,7,42,43,44,8,9,10,11,12,13,14,15,16,17,47,48,62,18,87,64,96,65,20,86,21,68,51,52,69,70,22,53,72,73,55,23,45,95,24,56,74],wors:71,viewcfgonli:[14,43],unnam:[27,18,26,20],"!
 16gb":96,
 novic:52,autodetect:[67,65],u64:6,indic:[27,75,0,29,1,2,32,85,20,33,80,36,37,95,43,8,11,14,16,17,47,86,62,18,87,64,19,49,68,52,91,71,23,94,24,56,26],llvmcore:[28,45],liter:[75,20,80,37,95,39,41,42,43,44,10,11,12,13,14,15,16,17,18,94,25,26],unavail:[73,47],constantstruct:14,createinstructioncombiningpass:[41,42,43,44],str2:68,ordinari:20,sever:[27,75,28,29,1,32,3,20,33,34,35,80,36,37,81,43,8,9,11,14,45,17,47,62,18,87,64,49,21,68,52,90,70,71,94,91,56,74],verifi:[27,58,77,32,20,37,4,81,41,42,43,44,11,12,13,70,45,17,48,84,87,64,23,94,56,89],bindir:[56,83],arcp:20,superreg:47,rebas:21,lad:18,chines:21,after:[27,57,41,29,30,77,75,85,3,95,4,61,35,71,6,37,38,81,7,42,43,44,8,9,76,10,11,12,13,14,16,17,47,86,62,74,18,84,87,64,20,67,80,21,68,52,70,22,36,73,23,45,94,91,96,56,25,89,26],hex32:57,lab:[96,33],law:75,arch:[21,80,28,77,65,66,67],demonstr:[47,37,20,44,10,14,17],sparccallingconv:47,domin:[21,27,62,20,41,64,13,14],opaqu:[27,14,94,20],lto_module_dispos:74,recompil:[11,22,43,36],i!
 cmpinst:1
 4,green:87,buildslav:96,noitinerari:[68,47],order:[27,71,29,1,31,75,59,3,82,20,81,34,85,36,37,4,39,40,41,43,44,8,10,11,13,14,15,16,17,47,48,62,18,84,87,64,93,86,21,68,91,57,73,23,45,94,95,24,56,74],movhpd:4,hex64:57,diagnos:[64,40],use_camlp4:[10,11,12,13,16,17],offici:[88,28,71,41,37,23,13],opnod:47,type_code_opaqu:94,pascal:20,noimm:68,getnexttoken:[37,95,41,42,43,44],flexibl:[64,68,71,85,4,18,1,42,58,8,20,24,12,14],bytecod:[21,22,94],llvm_root:52,setoperationact:[71,47],induct:[27,21,37,0,41,36,43,64,11,13,17],them:[27,57,28,41,29,31,75,59,3,4,33,35,71,6,37,38,39,81,7,42,43,44,8,9,10,11,12,13,14,15,16,17,47,86,62,85,18,87,64,93,20,49,80,21,68,90,70,22,36,72,73,54,23,45,94,95,24,56,25,74],thei:[27,71,0,28,29,1,30,77,75,32,59,3,4,33,35,80,36,37,38,40,41,43,44,8,9,10,11,95,13,14,81,16,17,47,86,62,85,18,84,87,64,93,20,67,21,68,51,70,22,57,73,23,45,94,91,24,56,25],fragment:[68,48,62,14,29,71,87,20,26],safe:[21,35,94,71,86,27,62,38,18,36,73,70,51,9,20,13,14,53],printccoperand:!
 47,denorm
 :57,"break":[27,75,77,2,20,34,37,95,39,41,42,43,44,11,12,14,15,16,47,62,18,64,49,91,71,54,23,25],bang:26,selti:20,lifelong:33,stdarg:20,"__cxa_rethrow":91,sequentialtyp:14,monolith:[23,72],"0x000003cd":87,overflow:[20,86],stream:[75,0,76,4,20,5,79,38,10,11,12,71,14,15,16,17,47,84,64,93,21,13,90,57,94,95],const_op_iter:14,network:22,visiticmpinst:70,lib64:52,image_file_relocs_strip:92,multilin:1,srcmakefil:56,log2:[20,0],barrier:[62,22,20,73,6],multilib:7,standard:[27,71,0,76,1,31,75,32,3,4,33,5,35,79,80,6,37,38,39,81,41,42,43,44,8,9,88,10,11,12,13,14,15,16,17,63,47,62,18,84,87,64,65,20,66,67,50,93,21,68,90,91,36,73,23,94,95,56,97,74],fixm:[21,47],debuglev:18,mvt:[71,47],angl:57,zerodirect:47,regress:[21,34,75,28,70,22,1,77,8,23,56,4,29,45],gcregistri:62,subtl:[35,86,95,43,44,9,10,11,16],render:[20,12,71,14,42],independ:[75,0,3,4,33,35,20,81,7,9,14,47,86,18,64,49,67,21,22,71,23,24,56,25,74],subreg:47,lto_code_gen_t:74,i48:20,setcondcodeact:47,llvm_build_32_bit:52,"0x00000000!
 016677e0"
 :82,ispredic:68,purposefulli:8,type_code_struct:94,image_file_bytes_reversed_hi:92,isalpha:[37,95,39,41,42,43,44],baseclasslistn:26,john:75,"40th":[39,15],headerdata:87,getdatasect:62,inexact:20,tee:70,registerpasspars:64,gcmetadataprinterregistri:62,analyzebranch:47,hashdata:87,target:[27,71,0,41,29,30,58,77,31,75,59,20,61,33,34,35,6,81,7,42,43,44,8,9,10,11,12,13,83,47,86,62,87,64,65,49,67,21,68,52,91,22,53,73,23,94,24,56,25,97],provid:[27,57,71,29,1,75,30,31,2,32,85,3,82,20,61,33,35,80,6,37,38,86,41,42,43,44,9,10,13,14,16,17,47,48,62,18,84,87,64,96,21,68,51,52,91,22,36,73,23,45,94,95,24,56,25,74],cppflag:[37,41,42,43,44,56,45],minut:21,uint64_t:[57,14,49],hassse2:68,hassse3:68,emitfunctionstub:47,contenti:75,consumeaft:18,manner:[21,47,86,20,71,73,91,14],strength:[27,71,33,20,18,39,73,14,15],recreat:[21,57],laden:[35,9],latter:[95,71,47,16,73],"0x400528":66,postcal:62,transmit:20,smul_lohi:71,usernam:[21,23],cumodul:6,llvm_definit:52,lexic:[68,81,26,71,87,44,95,10,20,16],!
 phase:[47
 ,0,28,38,71,42,77,62,65,74,20,95,12,14,16],retcc_sparc32:47,enable_if_c:85,valuerequir:18,instritinclass:68,bracket:[24,91,57,20,87],notion:[85,71,87,43,44,64,23,10,11,20],uitofp:[37,41,43,11,13,20,17],md_prof:2,opposit:[56,51,80,57],freeform:18,overload:[34,85,47,6,14,42,64,56,12,20],buildbot:[8,33,1,96,77],op0:94,involv:[27,34,57,71,47,36,20,22,56,41,73,43,77,95,11,59,3,86,13,14,16],just:[27,57,28,41,29,1,31,75,32,85,3,4,81,35,71,36,37,20,39,40,7,42,43,44,8,9,10,11,12,13,14,15,16,17,47,86,18,63,87,64,93,67,80,21,68,69,70,22,53,72,73,55,23,45,94,95,24,56,89],the_funct:[10,11,12,13,17],"41m":18,sroa:51,baseopcod:[59,47],latenc:[67,71,20],callbackvh:14,instlisttyp:14,predecessor:[27,20,71,43,11,14],showdebug:82,likewis:[62,21,20],tag_memb:87,dw_tag_compile_unit:87,llvm_include_tool:52,subtarget:[71,47,97],lit_arg:8,fomit:71,emb:[20,22,35,9,94],cleanli:[64,23,20,77],st_uid:80,cudevicegetcount:6,commandlin:[33,18],memorywithorigin:52,chapuni:33,dw_ate_float:87,miscompil:[21,53!
 ,70,81,38
 ],eatomtypedieoffset:87,awar:[75,85,36,4,18,71,73,87,23,24,86,14],sphinxquickstarttempl:[21,89],unordered_set:14,awai:[64,27,75,85,4,39,87,8,74,14,15],getiniti:14,accord:[52,85,47,28,14,18,77,62,94,20],unsett:64,tst_code_entri:94,featurevi:47,preprocessor:[35,47,18,81,44,9,10,56],isjumptableindex:47,memorybuff:75,cov:[78,58],howev:[75,0,29,31,59,3,20,61,35,80,36,81,41,42,43,44,8,9,10,11,12,13,14,86,62,18,87,64,21,70,71,72,73,54,55,23,94,24,56,89],xmm0:[8,68,4],xmm1:68,calltmp:[37,41,42,43,44,10,11,12,13,17],ilp:0,llvm_deleted_funct:75,themself:23,com:[21,23,14,69,46],col:27,con:26,testcleanup:20,widen:[71,0],solari:21,resultti:20,excess:[67,65,14],getbasicblocklist:[41,14,42,43],push_back:[75,47,37,95,57,41,42,43,44,14],mclabel:71,wider:[34,73,86],guid:[27,28,29,58,77,31,20,33,88,6,95,8,70,45,46,47,86,18,87,21,69,14,73,23,16,24,56],goodby:89,speak:[11,12,42,43],degener:[27,13,41],"__builtin_expect":2,"__nvvm_reflect":6,debug_info:87,subscrib:23,mallocbench:29,compatible_cla!
 ss:71,hoi
 st:[27,14,73,20,36],unclutt:3,binaryoper:[75,14],inhibit:20,ident:[27,75,80,36,62,14,71,41,87,43,44,20,10,11,12,13,4,15,16,17],aix:[21,71,88],gnu:[64,21,68,52,80,47,91,22,71,30,8,55,93,96,56,20,45],properti:[27,68,35,47,36,62,20,18,71,41,87,64,59,31,9,94,24,13,14],aim:[75,70,22,23,38,3,20],scalarrepl:[27,13,41,73],pairwis:36,publicli:[14,87],aid:62,keytyp:87,opt:[27,53,0,29,58,31,75,6,38,81,41,43,44,8,10,11,13,14,18,84,64,21,70,36,23,56],printabl:[20,80,47],conv:81,theexecutionengin:[41,42,43,44],extractloop:27,cond:[47,81,41,42,43,11,12,13,20],int_of_float:[12,13],dw_tag_lexical_block:87,dumper:20,dw_tag_enumer:87,old_val:[11,12,13],descent:[95,39,42,12,15,16],incorrectli:[37,39,17],patent:23,descend:20,addintervalsforspil:71,fragil:[8,4],code_own:23,hand:[27,71,28,75,3,35,85,37,95,39,42,44,9,10,12,14,15,16,17,47,86,62,84,49,68,52,57,73],fuse:[27,20,67],use_llvm_scalar_opt:[10,11,12,13],operandv:[41,42],kept:[64,23,51,36],scenario:[8,70,81,14,73],incorpor:[52,71,14],thu:[2!
 7,71,20,3
 6,37,95,81,42,43,44,8,10,11,12,13,70,16,17,62,18,87,64,69,14,53,23,94,91,56],hypothet:[64,71,14],client:[75,61,33,47,36,41,44,10,13,14,85,48,62,18,87,64,22,71,23,94,24,25],thi:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,47,48,49,50,51,52,53,54,55,56,57,59,20,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,93,94,95,96,97],gettok:[37,95,39,41,42,43,44],clenumvaln:18,destsharedlib:56,lc0:20,mandelbrot:[42,12,15,39],stack_loc:71,ifdef:[3,18,35,9],sparctargetasminfo:47,opencl:[22,6],spread:27,board:[7,30],parse_primari:[10,11,12,13,16,17],relwithdebinfo:52,mayb:[34,35,9,68],stringwithspecialstr:87,fusion:20,fsin:[65,47],xdata:19,mip:[21,88,47,22,71,7,73,87],ppc32:71,irbuilder_8h:[37,17],sectnam:18,entry_block:13,bucket_count:87,bpl:68,image_file_machine_ebc:92,openfil:75,negat:[12,42,94],percentag:32,cfrac:29,bork:[18,68],flatten:[71,20,0],bore:64,pos2:1!
 8,pos1:18
 ,getmodulematchqu:47,colloqui:20,fpic:52,loadregfromaddr:47,mandleconverg:[12,42],dopartialredundancyelimin:18,"754r":22,wunus:75,trunk:[21,33,29,71,87,77,8,31,23,45],peek:[10,11,12,13,16,17],plu:[47,62,20,43,23,95,94,91,11,14,16],aggress:[27,51,21,0,95,36,87,43,62,75,11,71,20,16],memdep:[27,36],someclass:26,pose:[62,51],confer:[62,71],fastmath:6,repositori:[21,81,69,33,91,53,7,87,8,23],post:[27,33,71,23,67,20,45],obj:[83,28,29,62,31,65,20],literatur:71,image_scn_align_4byt:92,canonic:[14,71,4,27],s64:6,looppass:64,nctaid:6,xyz:[59,67,65],"float":[71,0,30,20,34,6,37,95,39,7,43,44,10,11,12,13,14,15,16,17,47,86,18,87,65,19,67,68,57,94],profession:23,bound:[68,47,6,62,14,57,87,86,20],unittestnametest:52,opportun:[27,47,0,44,10,20],accordingli:[59,62,14],wai:[27,53,0,28,41,29,77,31,75,85,82,4,35,71,6,37,38,39,81,7,42,43,44,8,9,10,11,12,13,14,15,16,17,47,86,62,95,18,87,64,20,49,66,80,21,68,70,22,36,73,57,23,45,94,91,24,56],copycost:47,callexprast:[37,95,41,42,43,44],type_code_ha!
 lf:94,low
 est:[75,37,95,41,42,43,44,73,10,11,12,13,20,16,17],asmwriternum:97,raw_ostream:[64,71,57,75],maxim:[67,39,15,94],argpromot:[27,36],"true":[27,57,71,75,2,59,20,85,6,38,7,43,8,10,11,12,13,14,17,47,86,62,18,87,64,66,67,21,36,73,55,26],reset:[68,94],absent:14,optimizationbit:18,legalizeop:34,arm_aapcs_vfpcc:94,maximum:[52,36,14,18,71,32,20],anew:87,absenc:[71,70],llvm_gc_root_chain:62,emit:[27,71,58,78,31,59,20,61,35,6,37,4,81,41,42,43,82,9,11,12,13,70,16,17,47,86,62,18,87,64,65,67,21,68,51,53,73,94,95,97,74],alongsid:94,wcover:75,hardcod:[59,47],noinlin:[82,20,94,49],xxxjitinfo:47,postscript:27,valuelist:26,encrypt:23,xxxbranchselector:47,test:[27,57,28,41,29,1,30,58,77,31,4,33,34,71,36,38,81,7,43,44,8,60,10,11,13,14,45,85,48,18,5,87,64,65,20,50,21,52,69,70,22,53,55,23,91,24,56,97],shrink:71,roots_siz:62,realiti:77,xxxtargetasminfo:47,fpreg:47,"2acr96qjuqsym":23,add32ri:68,debugflag:[18,14],pathnam:[21,83],set_value_nam:[10,11,12,13,17],libgcc1:7,concept:[21,68,71,94,85,6,37,3!
 3,22,56,8
 7,43,64,75,20,11,3,86,14,17],mayload:68,consum:[48,37,44,18,86,41,30,43,42,87,31,95,32,10,11,12,13,14,25,16,17],dw_tag_inlined_subroutin:87,trigram:22,supplement:88,prereleas:21,middl:[62,75,81,87],zone:20,linker_priv:[20,94],graph:[27,29,20,37,41,42,43,44,10,11,12,13,70,17,47,64,21,68,51,14,71,97],certainli:[62,27,35,9,45],jvm:[35,9],dootherth:75,munger_struct:86,fom:27,brows:[37,17],seemingli:47,dw_apple_property_readonli:87,avx1:8,avx2:8,administr:[96,77],aad8i8:71,gui:[31,75],libthread_db:82,adc64ri8:68,gut:56,sparcinstrformat:47,usescustominsert:68,upper:[75,47,38,87,56,14],isvolatil:20,brave:[95,16],paramattr_code_entri:94,setgraphattr:14,cost:[27,35,47,0,20,71,75,54,74,9,91,59,14],build_fmul:17,after_bb:[11,12,13],gr16:71,appear:[21,40,80,47,27,26,18,1,30,70,36,75,20,73,86,14,81,87],scaffold:[95,16],"23421e":20,constantarrai:14,uniform:[75,14],isoptim:87,va_list:20,image_sym_class_funct:92,defici:[39,15],gener:[27,53,95,0,28,71,29,1,75,58,77,78,31,2,32,85,3,82,4,61,3!
 3,34,35,8
 0,6,37,38,39,81,41,42,43,44,8,9,60,10,11,12,13,14,15,16,17,46,47,86,62,74,18,84,87,89,64,65,19,20,67,21,68,51,52,69,70,22,36,72,73,57,23,45,94,91,24,56,25,97,26],inputcont:57,satisfi:[36,41,73,77,23,3,13],vice:[8,14,73],roots_end:62,precursor:23,plotter:[12,42],image_sym_class_argu:92,mach_universal_binari:66,behav:[91,75,53,20,36],myvar:86,triag:71,succ_end:14,extra:[27,68,75,52,86,28,20,18,53,72,2,94,91,14],stingi:14,fbb:47,marker:[20,18,1,14,71],type_code_void:94,llvm_on_xyz:3,regex:[18,4,22,29],prove:[27,29,36],nothrow:73,naddit:18,subvers:[21,81,69,22,53,77,8,31,23,45],live:[27,51,71,21,37,20,36,41,87,53,64,62,31,74,75,13,14,17],stackprotector:20,lgtm:69,"0xl00000000000000004000900000000000":20,cxxabi:21,finit:[71,20],viewcfg:[14,43],geordi:33,iffals:20,logarithm:[14,94],graphic:[12,35,9,42],ibm:88,at_nam:87,canconstantfoldcallto:34,prepar:[61,27,33,28,91,86,7,56,20],focu:[71,74,89,0],cat:[8,21,18,62,66],ctfe:22,can:[27,53,95,0,28,41,29,1,30,77,31,75,32,59,3,82,4,81,61!
 ,33,34,35
 ,71,6,37,38,39,40,7,42,43,44,8,9,60,76,10,11,12,13,14,15,16,17,83,63,85,47,48,62,74,18,84,87,64,96,65,20,49,66,86,93,80,21,68,89,52,69,70,22,36,72,73,57,55,23,45,94,91,24,56,25,97,26],debug_symbol:[54,56],boilerpl:[68,85,62,18,44,10],heart:[56,48],underestim:20,basemulticlasslist:26,chip:[47,6,71,7,30,8,65,67],spu:[21,47],topic:[46,35,52,39,75,9,89,14,15],abort:[27,68,75,20,70],spl:68,occur:[27,71,76,1,75,4,2,32,3,20,5,79,80,38,81,8,14,45,83,86,62,84,64,65,68,51,90,91,53,23,16,94,95,56,97,26],multipl:[27,71,0,29,75,3,4,61,5,80,36,37,20,42,43,44,8,10,11,12,14,16,17,47,86,18,87,64,96,93,19,66,21,68,22,57,73,23,45,94,95,24,26],image_sym_class_regist:92,ge_missing_sigjmp_buf:75,write:[27,57,76,29,31,75,32,3,20,33,5,35,79,80,6,4,39,81,43,44,8,9,10,11,71,14,15,45,46,47,48,62,18,84,87,64,66,86,21,68,89,52,90,36,73,23,97],regioninfo:27,"0x80":80,x86instrss:47,product:[62,26,22,71,42,77,64,23,95,56,12,20,16],multiplicand:20,southern:88,targetmachin:[61,62,71,64,47],cours:[34,35,36,9!
 5,18,39,6
 4,9,56,14,15,16],uint:65,drastic:3,lto_codegen_compil:74,breakag:23,voidtyp:14,goal:[71,86,0,62,22,39,41,89,23,56,24,3,75,13,74,15],autotool:[55,47],copyphysreg:47,getcalledfunct:[62,14],explicit:[75,20,35,6,81,41,42,43,44,9,10,11,12,13,14,85,86,62,18,87,64,51,71,73,23,24],objectimag:61,somewhat:[75,36,20,29,81,42,73,23,95,12,14,16],mapvector:14,ghc:[71,20],thread_loc:[71,20],approx:6,arch_nam:66,approv:[23,77],graphviz:[27,14],brain:75,svnrevert:21,cold:20,still:[27,71,0,29,1,31,75,3,20,61,35,81,41,42,43,9,11,12,13,14,85,62,18,87,64,21,70,53,54,55,23,56],ieee:[22,65,20,80],dynam:[27,71,82,20,61,38,81,42,44,10,12,70,45,85,86,62,18,84,87,64,65,67,50,14,22,57,72,93,94],mypass:[64,14],conjunct:[68,48,28,63,56,3,20],precondit:[56,75],getoperand:[75,71,14,47],window:[64,21,75,52,33,20,18,71,42,43,8,31,88,11,96,3,14,22],addreg:71,curli:[8,20,68,14],has_asmprint:24,non:[27,57,28,71,1,75,32,59,4,61,5,35,79,80,6,85,38,39,40,41,43,44,8,9,76,10,11,13,14,15,16,83,47,48,62,74,18,84,34,8!
 7,64,65,2
 0,67,86,21,68,52,90,70,22,36,73,55,23,95,94,91,97,26],evok:20,recal:[37,57,43,44,10,17],halv:34,half:[89,20,94,47],now:[71,41,29,1,77,75,20,33,34,35,80,6,37,4,81,7,42,43,44,9,10,11,12,13,14,16,17,85,62,18,87,64,21,52,69,70,22,57,73,23,45,95],nop:20,discuss:[33,75,85,47,20,18,87,64,23,95,14,16],mybranch:21,introduct:[27,53,57,28,41,75,30,77,31,2,59,20,61,33,34,71,6,37,95,39,7,42,43,44,10,11,12,13,14,15,16,17,46,47,86,62,18,87,64,96,19,49,21,68,89,52,91,22,36,72,73,55,23,24,56,25,97,26],organ:[33,75,91,29,87,44,8,10,24,3,45],drop:[22,20,69],reg1024:71,reg1025:71,reg1026:71,reg1027:71,image_scn_align_1024byt:92,dw_tag_vari:87,add32rr:68,domain:[68,35,47,62,22,71,9],replac:[27,3,20,80,6,41,8,13,14,47,62,18,93,49,21,68,51,52,74,71,73,55,23,91,26],arg2:[39,15],condmovfp:68,releasememori:64,degen:20,backport:7,reallyhidden:18,year:75,operand:[27,34,75,94,47,86,37,14,71,41,42,2,68,20,32,12,13,4,17],rl4:6,happen:[27,57,77,75,20,61,37,4,81,43,44,10,11,14,16,17,86,62,87,64,21,71,73,23!
 ,95],rl6:
 6,rl1:6,rl3:6,rl2:6,shown:[68,81,52,85,47,6,50,20,18,1,42,87,31,12,89,14,29],accomplish:[21,85,27,62,39,23,14,15],space:[71,31,75,59,3,20,61,35,80,6,4,41,44,9,10,13,14,45,47,86,62,87,64,93,21,68,91,22,57,72,94,24],oldval:[41,42,43],rational:[71,20,86],dw_at_apple_property_readonli:87,ldrr:47,release_31:21,release_30:21,release_33:21,release_32:21,argv:[6,18,87,82,67,70],ldrd:73,mandelconverg:[12,42],argc:[18,82,20,87,6],card:30,care:[21,68,35,52,47,36,4,29,71,41,73,77,64,9,20,3,25,13,14,81],xor16rr:71,couldn:36,adc32rr:68,gcmetadataprint:62,unwis:[20,80],adc32ri:68,blind:71,directli:[27,71,58,31,75,32,3,20,80,6,41,42,43,44,10,11,12,13,14,45,83,47,86,62,18,87,64,67,21,52,69,91,22,36,73,23,94,96],subrang:87,rint:[22,20],yourself:[21,34,23,14,68],stringref:[75,57,14,87],size:[27,57,0,71,29,75,32,20,34,35,80,6,37,38,41,42,43,44,8,9,60,13,14,16,47,86,62,18,87,64,93,19,68,70,22,36,72,73,54,94,95,74],sub_ri:68,yypvr:89,silent:[23,20,36],caught:[91,75,20],yin:57,type_block:94,himit!
 su:21,che
 cker:[53,86],cumul:71,friend:81,editor:[21,23,75,89,56],nummeta:62,ariti:62,especi:[27,23,47,18,81,75,30,73,2,51,3,14,22,45,87],dw_tag_interface_typ:87,apple_nam:87,cpu0:46,llvmtop:64,mostli:[27,35,52,47,21,18,71,73,43,31,51,9,11],distsubdir:56,quad:[20,47],than:[27,57,28,71,30,75,32,20,33,34,35,80,36,37,95,39,81,41,42,43,44,8,9,10,11,12,13,14,15,16,17,47,86,62,74,18,87,64,96,65,49,21,52,70,53,72,73,23,45,94,91,24,56,25,89,26],image_sym_type_word:92,"0x432ff973cafa8000":20,xcore:[21,71],spisd:47,browser:[33,22,69],loweratom:27,anywher:[68,89,4,41,8,74,45,95,56,13,20,16],delin:1,cc_sparc32:47,bitcast:[27,47,36,62,20,22,86,4],feat_segstacks_x86:71,readcyclecount:20,fldcw:71,mccodeemitt:71,begin:[71,77,31,75,3,20,61,80,36,85,40,41,43,10,11,12,13,14,16,17,47,62,18,87,21,51,57,23,94,26],importantli:[11,75,43,36],toplevel:[10,11,12,13,16,17],cstdlib:95,"_global__i_a":81,renam:[21,75,28,22,41,87,37,56,13,20,45],visual:[27,75,52,47,21,14,22,71,43,31,33,20,11,4,63],"_p1":87,"_p3":87!
 ,callinst
 :14,llvm_libdir_suffix:52,add_reassoci:[10,11,12,13],concurr:[33,62,20,22,73,14],image_file_bytes_reversed_lo:92,fifth:[20,47,6],onli:[27,57,0,41,29,1,75,77,31,2,32,59,3,95,4,81,33,34,35,71,6,37,20,39,40,7,42,43,44,8,9,10,11,12,13,14,15,16,17,86,85,47,48,62,74,18,84,87,64,65,19,67,50,93,80,21,68,51,52,70,22,36,73,23,45,94,91,24,56,97,26],image_rel_i386_dir32nb:19,expr_prec:[10,11,12,13,16,17],endloop:[13,41,42,43],overwritten:[71,20],llvminitializesparctargetinfo:47,cannot:[27,75,77,78,31,3,4,61,35,36,20,9,70,47,86,62,18,63,64,93,19,14,22,71,73,23,38],targetjitinfo:[71,47],mrm6r:47,operandlist:68,intermitt:21,object_addr:62,gettypenam:14,rrinst:68,"0x0000000000d953b3":82,sometest:29,hierarchi:[21,34,53,85,33,37,1,64,14],istreambuf_iter:6,concern:[86,62,14,23,24,20],"1svn":77,brace:[68,75,4,8,20,14],mrminitreg:47,printinstruct:47,foo2:[55,74],between:[27,57,28,29,75,59,3,20,81,61,33,34,6,4,39,40,43,44,10,11,71,14,15,47,86,62,18,87,64,65,21,68,51,69,74,22,36,73,23,94,56,25,26!
 ],x86relo
 c:47,modulelevelpass:64,paramet:[27,75,1,2,20,61,6,37,71,14,17,47,86,62,18,87,64,49,52,91,57,94],constantpoolsect:47,typedef:[75,57,14,87],"__text":71,intregssubclass:47,dw_tag_subrange_typ:87,pertain:[56,23,87,91],inputfilenam:18,inconsist:[75,87,86],doesnotaccessmemori:36,qualtyp:75,image_sym_type_struct:92,gr32:[68,71],overview:[75,28,29,31,59,20,61,33,88,6,43,8,11,45,62,18,64,21,91,36,54,94,24,89],my86flag:57,basic_pars:18,exploit:[37,18,22],clarif:[23,88],invert:8,shim:27,valuekind:75,invers:27,uglifi:[10,44],getentryblock:[41,14],kdevelop3:21,derefer:[20,14,87,86],emphas:89,getpointers:62,rubi:62,getjitinfo:[71,47],x86_fastcal:71,thischar:[37,95,39,41,42,43,44],eip:68,module_code_vers:94,global_context:[10,11,12,13,17],retcc_x86_32_c:47,fneg:20,dw_at_artifici:87,suse:21,stdout:[21,92,31,10,11,12,13,20,16,17],metric:[64,77],henc:[21,18,74,26,81],worri:[21,69,95,18,20,16],onlyreadsmemori:36,eras:[37,18,81,41,42,43,73,56,14,87],texinfo:21,bigblock:67,develop:[71,29,30,58!
 ,77,78,75
 ,3,33,81,41,8,13,45,46,86,62,18,87,64,96,21,68,52,91,22,53,54,23,24,56,74],proto:[37,95,41,42,43,44,10,11,12,13,16,17],"__nv_powf":6,sizeofimm:47,cc1:82,srcroot:8,epoch:[57,80],komatsu:71,externalstorag:18,document:[27,53,57,28,29,30,58,77,31,75,59,3,20,61,33,34,88,85,6,37,7,44,8,10,71,14,45,47,86,62,74,18,87,64,96,19,21,51,52,70,22,36,73,54,23,94,91,24,56,89,26],finish:[0,28,77,44,20,61,37,41,42,43,82,10,11,12,13,70,16,17,64,91,71,89],ssub:20,preassign:71,someon:[34,35,71,75,23,9,89],removebranch:47,freeli:[23,73],tradition:[71,36],pervas:[14,85],whose:[68,75,94,47,36,93,26,87,71,41,42,70,23,20,95,12,13,14,16],createstor:41,destreg:71,ccc:[20,7,94],neon:[71,7,30],noaa:27,touch:[27,75,20,87,64,14],tool_verbos:[21,56],speed:[75,18,41,8,23,13],create_modul:[10,11,12,13,17],versu:75,struct:[35,94,47,0,62,4,18,57,41,87,64,75,9,20,86,13,14],bb0_29:6,bb0_28:6,getx86regnum:47,bb0_26:6,filecheck:[38,22,58,8,50,4],desktop:54,identif:[21,7,26,20],treatment:[62,47],versa:[8,14,73],ear!
 li:[75,47
 ,6,41,56,13],imul16rmi8:71,"0x82638293":87,read:[27,53,0,71,78,31,75,32,82,4,81,33,5,35,79,80,6,37,20,39,40,41,42,43,44,8,9,88,76,10,12,13,14,15,17,63,47,62,74,18,84,34,87,65,66,67,50,21,68,89,70,22,36,73,57,23,94,95,56,97,26],cayman:88,amd:[88,7],googletest:1,detract:75,amp:88,bangoper:26,funcresolv:[84,14],udis86:21,benefit:[27,75,36,62,22,86,87,14,45],lex_numb:[10,11,12,13,15,16,17],output:[27,53,57,28,71,29,1,78,31,75,32,59,4,33,5,79,80,6,38,40,41,42,43,44,8,60,76,10,11,12,13,14,16,47,62,18,84,34,87,64,65,20,66,67,50,21,89,90,70,22,36,92,93,95,56,25,97],libbeauti:22,debug_pubtyp:87,matur:[62,18],initid:94,cmake_install_prefix:[52,31,7],viral:23,globalvalu:14,getregisterinfo:[71,47],debug_with_typ:14,extralib:56,blockidx:6,lto_codegen_set_debug_model:74,rauw:[51,14],tdm:96,tok_binari:[41,42],sixth:47,objectbufferstream:61,"throw":[27,91,71,64,3,20],dw_tag_subprogram:87,src:[83,47,28,29,71,77,8,20,45],sra:26,central:[3,87,91],greatli:87,underwai:22,image_sym_class_sect:92!
 ,srl:26,n
 umbit:14,chop:87,degre:[96,73,0],dw_tag_subroutine_typ:87,backup:55,processor:[21,52,47,0,62,88,18,71,87,67,56,20,22],valuecol:59,bodylist:26,op3val:47,llibnam:18,unregist:64,xxxbegin:14,outloop:[13,41,42,43],yout:57,your:[53,57,28,41,29,30,31,75,85,4,33,34,35,71,6,37,20,39,81,7,42,43,44,8,9,10,11,12,13,14,15,45,47,86,62,18,64,80,21,68,51,52,69,70,36,73,54,55,23,96,56,89],parsebinoprh:[37,95,41,42,43,44],verifyfunct:[37,41,42,43,44],loc:[87,47],log:[36,0,14,29,1,70,20],opengl:[75,35,9],aren:[27,35,86,21,62,20,36,75,43,44,31,23,9,10,71,14],haskel:[14,35,9,20],start:[27,57,0,28,41,29,1,77,31,75,82,20,33,34,35,71,6,37,38,39,81,7,42,43,44,8,9,10,11,12,13,14,15,16,17,47,86,62,18,87,64,96,80,21,68,52,69,70,22,36,23,45,94,95,24,56,89],low:[75,32,3,20,33,34,6,95,41,42,12,13,14,16,47,86,62,18,87,50,68,22,71,94],lot:[27,71,29,30,75,20,34,35,85,37,95,39,81,41,42,44,9,10,12,13,14,15,16,17,47,86,62,18,87,64,49,21,68,70,22,57,73,54,23,56],submiss:23,compute_20:6,satur:[12,42],furthermor:!
 [27,4,86]
 ,"default":[27,57,0,41,29,1,75,31,2,85,4,61,5,80,6,37,38,81,7,42,43,44,8,76,10,11,12,71,14,45,17,83,47,62,18,34,64,65,19,20,66,67,21,68,52,22,36,54,93,94,95,56,25,97],tok_def:[37,95,39,41,42,43,44],start_bb:[11,12,13],bucket:[27,14,87],v32:6,loadabl:[64,56],scanner:[39,15],decreas:67,opnam:47,producess:21,value_1:24,value_2:24,valid:[27,28,77,20,61,33,6,37,4,81,41,42,43,44,8,10,11,12,13,14,16,17,83,86,18,87,64,65,67,52,22,57,95,26],release_19:21,release_18:21,release_17:21,ignor:[0,32,20,33,36,37,4,39,40,41,42,43,44,8,10,11,12,13,14,15,16,17,47,18,87,21,71,23,94,95,24,56,25],you:[27,53,57,28,41,29,1,30,58,77,31,75,85,3,82,4,33,34,35,71,6,37,38,39,81,7,42,43,44,8,9,76,10,11,12,13,14,15,16,17,47,86,62,18,84,87,64,20,49,66,67,80,21,68,52,69,70,22,36,73,54,55,23,45,94,95,96,56,89,26],release_14:21,release_13:21,release_12:21,release_11:21,poor:[11,75,43],polar:57,registri:[62,64],multidimension:20,binfmt:21,pool:[64,71,94,47,32],reduc:[27,53,28,75,59,20,33,5,80,6,38,44,10,70,86!
 ,18,64,68
 ,14,22,71,23],bulk:[71,13,41],ipsccp:27,adc64mr:68,value_n:24,skeleton:21,osx:80,messi:71,month:[33,77],correl:[62,20],"__cxa_end_catch":91,getglob:47,pandaboard:30,paramidx:94,mrmsrcmem:47,getnullvalu:[41,14,42,43],"_ri":68,cpufrequtil:30,sparcinstrinfo:47,articl:[11,13,41,43,21],sdisel:51,gcfunctionmetadata:62,phielimin:71,"_rr":68,mysourc:87,datalayout:[47,6,62,71,41,42,43,44,94,10,11,12,13,20],verb:[56,75],mechan:[61,33,71,94,91,6,37,26,29,0,87,64,55,75,20,56,24,3,14,62,17],veri:[27,71,0,29,30,77,75,4,81,33,35,36,37,20,39,40,41,42,43,44,8,9,10,11,12,13,14,15,16,17,86,62,95,18,87,64,21,68,70,57,73,23,94,91,25],passmanagerbas:47,targetregisterdesc:[71,47],methodbodi:47,eatomtypetag:87,emul:[27,34,71,20,75],managedstat:14,cosin:[20,47],customari:18,dimens:20,fixedt:87,casual:[56,23],kistanova:96,dofin:[64,47],nand:20,fpformat:68,isobjcclass:87,llvmlibspath:56,fp128:[22,20,94],"0x00000100":87,signextimm:71,modular:[24,64,84,75,36],minor:[75,71,77,54,23,9,35],exeext:56,prolo!
 gu:[62,72
 ,22,20,47],strong:[20,23,4,73,81],modifi:[27,71,29,1,31,75,59,20,34,80,6,85,81,41,13,14,45,47,62,18,87,64,21,70,36,73,23,24,56,25],trunc:[20,0],divisor:20,ahead:[21,35,95,39,53,75,64,31,23,9,15,16],dform_1:71,xstep:[12,42],amount:[27,75,20,34,39,81,44,10,71,70,15,63,62,18,84,64,65,67,68,14,53,72,91,56],lto_module_create_from_memori:74,module_code_datalayout:94,initializealiasanalysi:36,ask:[28,77,31,33,34,35,36,95,81,41,43,9,11,13,14,16,87,64,21,23,56,26],href:71,famili:[35,20,87,31,9,14],sequencetrait:57,dangl:[11,14],"0x710":66,is64bitmod:47,isimmedi:47,zorg:96,massag:75,formul:3,bash:[3,89],libxml2:7,taken:[27,68,35,80,47,36,28,20,18,71,91,2,9,56,3,14],distfil:56,zork:68,vec:[20,14],build_arch:[56,45],cbtw:71,valuetyp:[71,47],regoffset:25,x01:92,targetcallingconv:47,"0b000111":47,x00:92,x86instrmmx:47,histori:[21,23,69],ninf:20,indirectbr:20,reindent:75,addrspacecast:[22,20],templat:[21,68,57,85,47,27,37,14,18,36,87,64,62,75,33,20,3,89,26,22],vectortyp:14,unreli:36,phras!
 e:75,anot
 h:[27,57,41,30,31,75,59,3,4,34,35,71,6,37,20,81,7,42,43,44,8,9,10,11,12,13,14,16,47,62,18,84,87,64,19,80,68,51,22,36,73,23,94,95,24,56,89,74],perhap:[62,20,75,14,36],snippet:[62,52,14],reject:[35,37,20,18,81,41,42,43,44,9,77,10,11,12,13,4,17],rude:91,personlist:57,secondlastopc:47,unlink:[37,14],retcc_x86common:47,"0x00003500":87,lifetim:[62,14,71,87,64,20],machinepassregistri:64,feat_asmpars:71,polit:71,help:[57,28,76,29,1,30,58,78,75,32,3,4,33,34,35,79,36,38,39,81,8,9,14,15,45,83,63,48,62,18,84,5,87,64,96,65,20,49,67,50,93,21,68,52,69,90,70,22,53,73,23,24,56,25,97,74],mbbi:71,soon:[28,95,43,64,23,11,74,16],mrmdestreg:[68,47],held:[23,20],ffi:81,foo4:[55,74],ffc:71,foo1:[55,74],compulation:51,foo3:[55,74],dfpreg:47,complex:[75,0,77,3,20,34,35,95,41,42,44,9,10,12,13,14,16,47,62,87,64,71],eatomtypecuoffset:87,tok_els:[41,42,43],systemz:[21,22,71,88],finer:36,cee:14,image_scn_lnk_info:92,sentenc:75,wideaddr:20,ninja:7,gmon:56,libllvm:54,stopper:28,addenda:88,tear:[91,14],scal!
 arevolut:
 [27,86,36],fulli:[21,68,35,86,0,95,71,41,42,87,75,9,94,27,67,12,13,20,16],heavi:[56,14],succ_iter:14,llvm_build_tool:52,longjmp:[27,35,9,20,91],beyond:[89,86,91,25,97,20,14],todo:[27,34,69,28,71,7,68,87,64],ific:18,isunaryop:[41,42],ppcinstrinfo:34,safeti:[20,22,35,9],publish:[28,75,14],debuglevel:18,unreview:23,labf:18,ast:[46,35,37,95,39,41,42,43,44,51,9,10,11,12,13,15,16,17],errorp:[37,95,41,42,43,44],dw_tag_volatile_typ:87,mystruct:86,pub:87,reason:[27,75,7,3,20,34,36,37,95,39,41,43,44,8,10,11,13,14,15,16,17,85,86,18,87,64,68,22,71,72,73,23,24,89],base:[27,53,57,28,41,29,1,75,30,77,2,32,59,3,20,61,33,85,71,6,37,95,81,7,42,43,44,8,10,11,12,13,14,16,17,86,47,48,62,18,87,64,65,50,80,21,68,51,52,70,22,36,23,45,94,91,26],put:[27,57,77,75,20,35,36,4,39,41,43,82,8,9,11,13,14,15,62,18,87,64,70,71,73,89],asi:47,intermodular:[33,74],wglobal:75,asm:[6,91,71,65,94,67,97,20],basi:[39,62,20,18,1,42,32,12,14,15],bring:[35,62,22,75,9,14],launch:6,warpsiz:6,undergo:[27,20],assign:[27,57!
 ,75,2,59,
 20,6,37,39,81,41,13,14,15,17,47,86,18,68,51,71,73,23,94,26],obviou:[27,35,36,70,87,71,75,42,44,23,9,95,73,10,12,20,81],ultrasparc3:47,islazi:47,isregist:71,uninterest:[39,15],module_block:94,implementor:[10,11,68,43,44],miss:[41,20,29,7,42,70,55,75,95,12,13,14,16],st6:68,st4:68,st5:68,nodetail:32,st7:68,st0:[68,47],st1:[68,71,47],st2:68,st3:68,scheme:[47,62,32,41,49,13,14],schema:[57,1,92,48],adher:[3,23,14],xxxgencodeemitt:47,getter:[14,87],bidirect:14,newabbrevlen:94,numroot:62,intrinsicinst:62,std:[34,53,80,47,6,37,95,18,0,41,42,43,44,75,84,57,14,39,81],grep:[21,52,18,71,30,8,4,29],stl:[21,75,27,57,14,81],sparsebitvector:14,rootmetadata:62,store:[27,71,29,4,61,80,6,20,39,81,41,13,14,15,45,47,86,62,18,87,49,66,21,51,52,91,36,72,73,16,94,95],str:[6,37,14,41,42,43,44,92,95,20],consumpt:[64,71],aliaseeti:20,toward:[33,23,14,20],grei:28,randomli:60,tailcallelim:27,"null":[27,57,47,36,62,20,84,6,75,87,43,64,65,95,67,11,86,14],dllvm_target_arch:7,imagin:22,unintend:27,lib:[31,3!
 2,3,82,33
 ,34,37,41,42,43,44,14,45,83,47,62,18,64,50,21,52,71,55,56],lic:27,ourfunctionpass:14,lit:[52,22,1,58,8,31,56,45],"__apple_objc":87,useless:[11,35,9,87,43],mixtur:68,setjmp:[27,35,91,84,9,20],c_ctor_bas:4,maco:[21,81,14],alpha:[21,20,47],mach:[66,88,20,87],isbarri:68,hipe:[71,20],clear:[62,75,86,37,20,84,41,42,43,44,24,23,95,56,10,11,12,13,14,16,17],implicitdef:71,clean:[27,71,21,38,53,77,64,6,56,74,81],latest:[28,21,22,4],test1:[8,89],use_s:14,stackprotectorcheck:20,v16:6,i32imm:[68,47],"3x4":20,get_instrinfo_named_op:47,test5:4,ptrval:20,pretti:[27,29,3,37,95,39,41,42,43,44,10,11,12,13,15,16,17,86,64,49,68,25,89,26],setnam:[37,41,42,43,44,14],less:[27,75,28,1,30,20,35,80,36,37,95,39,81,41,42,43,44,8,9,10,11,12,13,14,15,16,17,62,18,87,21,71,94,89],lastopc:47,adc32ri8:68,createfsub:[37,41,42,43,44],rephras:86,darwin:[8,28,71,20,56],defaultdest:20,prolang:29,addpreemitpass:47,has_asmpars:24,nativ:[27,57,41,29,31,20,34,35,71,6,37,38,81,7,42,43,44,9,10,11,12,13,14,17,83,47,86,8!
 7,65,80,2
 1,52,70,22,53,73,55,24,56,74],same_cont:19,"133700e":[37,17],externalfnconst:27,rejit:[10,44],llvmlibdir:56,image_scn_lnk_oth:92,keystrok:75,kawahito:71,immutablepass:[64,36],ctaid:6,xword:47,close:[27,51,86,33,28,20,48,37,75,95,71,14,16,17],"0x0b17c0de":94,smallvectorhead:14,deriv:[61,27,34,51,80,85,62,14,39,71,75,68,87,64,59,23,20,24,56,26,15],libcmt:31,particip:[20,23,14,56],parse_unari:[12,13],pifft:29,tool_nam:21,isprefix:18,cst_code_integ:94,emitint32:62,end_block:94,makeup:14,fpform:68,numer:[47,39,37,26,18,41,42,43,44,31,93,20,95,10,11,12,13,14,15,16,17],llvmobj:45,isol:[68,75,70,71,41,8,13,14],lowercas:[10,47,44],numel:20,distinguish:[35,62,14,9,3,20],both:[27,71,0,41,1,77,75,85,20,61,35,80,36,37,4,81,7,43,44,8,9,10,11,13,14,16,17,47,86,62,95,18,87,64,21,68,70,57,72,73,54,23,94,91,24,56,26],delimit:[25,20],fancyaa:64,lako:75,debug_typ:14,getnumvirtreg:71,protector:[20,87],block_par:[11,12,13],"__objc":20,jeff:3,byval:[71,20,94],header:[27,75,7,29,31,3,20,61,33,80,8!
 5,81,41,4
 2,43,11,12,13,14,45,83,47,18,87,66,50,21,52,92,73,94,24,56],instrsch:14,hasdelayslot:68,linux:[21,81,88,82,33,22,71,7,30,44,8,55,56,77,45],llvm_enable_thread:52,stamp:80,territori:21,empti:[75,1,20,37,95,41,42,43,44,11,14,16,17,47,62,18,87,66,68,52,57,56,26],destructor:[75,14,81,64,91,20],newcom:[13,41],sslverifi:21,newinst:14,as_float:[10,11,12,13],box:[71,87,69],lattner:[35,9],imag:[61,22,71,42,93,19,12,20],ada:91,imac:0,coordin:57,modrefv:68,imap:21,look:[27,57,71,1,77,31,75,82,4,33,34,35,85,6,37,20,41,42,43,44,8,9,10,11,12,13,14,16,17,47,86,62,18,87,64,21,68,74,36,72,55,23,45,94,95,24,89,26],fptosi:20,ramif:86,"while":[75,0,28,1,78,59,3,82,20,33,35,36,37,4,39,41,42,43,44,8,9,11,13,14,15,16,86,18,84,87,64,21,68,51,52,70,22,71,54,94,95,56,74],dw_lang_c_plus_plu:87,loos:[56,87],loop:[27,75,0,20,35,36,37,95,39,41,42,43,44,9,10,11,12,13,14,15,16,17,62,64,21,68,51,22,71,73],pack:[28,71,87,37,94,20,17],malloc:[62,14,35,9,64],pragmat:22,readi:[61,39,37,95,18,87,41,42,43,44,64,5!
 5,23,77,1
 0,11,12,13,15,16,17],readm:[8,21,23,89],"__gcmap_":62,thesparctarget:47,hideaki:71,"0x00001203":87,quadrat:[71,65,14],type_symtab_block:94,fedora:21,grant:23,tokinteg:26,belong:[20,18,14],llvm_site_config:31,dest:20,octal:[18,68,80],conflict:[21,68,37,20,71,41,42,43,44,8,23,10,11,12,13,14,17],ashr:20,goodwil:23,ccif:47,optim:[27,53,0,71,29,30,58,31,75,59,4,33,34,35,85,6,37,38,39,81,41,42,43,44,8,9,10,11,12,13,14,15,45,17,46,47,86,62,18,84,87,64,96,65,20,67,21,51,70,22,36,73,54,55,94,24,56,74],image_sym_class_type_definit:92,va_copi:20,temporari:[27,51,57,20,29,1,8,56,71,14,81],user:[27,57,0,71,29,1,77,75,32,20,33,35,80,6,37,38,39,41,42,43,44,8,9,10,11,12,13,14,15,16,17,46,47,62,18,87,64,65,21,68,51,52,69,70,22,36,73,89,54,23,95,96,56,25,97,74],function_block:94,"3gb":31,vreg:71,"0x16677e0":82,older:[56,18,25,47,30],mctargetstream:71,pointtoconstantmemori:36,reclaim:[51,20],use_:14,positionaleatsarg:18,basiccg:27,weakest:[71,73],predetermin:36,cout:[57,75,81,6],isunord:73,dw!
 _ate_unsi
 gned_char:87,undeclar:[37,17],tick:80,recurs:[27,35,37,20,39,1,41,42,43,62,9,95,56,11,12,13,14,15,16,17],shortcut:[39,15,16],supersparc:47,codegener:53,gnueabihf:[7,30],march:[21,71,22,53,87,65,67,4],arm_aapcscc:94,mcsectionelf:71,xterm:75,nothidden:18,game:23,optimizationlist:18,characterist:[34,47,14,71,92,20],isproto:94,pcmarker:20,outright:86,success:[53,75,20,37,95,41,42,43,44,10,11,12,13,14,16,17,47,48,64,21,57,23],signal:[8,18,20,73,82],resolv:[61,68,71,37,20,1,43,44,64,23,74,56,10,11,14,17],"______________________________________":14,image_file_executable_imag:92,popular:[71,30,36],fake:67,some:[27,57,0,28,41,29,1,75,30,77,31,2,59,3,4,33,34,35,71,36,37,20,39,81,7,42,43,44,8,9,10,11,12,13,14,15,16,17,47,85,62,74,18,87,64,65,49,86,93,80,21,68,51,52,69,70,22,53,72,73,54,23,94,95,24,56,89,26],urgent:23,mnemonicalia:71,getfunctionlist:14,mem_address:71,addpreserv:[64,36],printinlineasm:47,slash:[80,87],castinst:14,bcanalyz:[94,58,32],unreferenc:[56,20],run:[27,53,0,28,41!
 ,29,1,30,
 77,31,75,82,4,61,33,35,71,6,37,38,39,81,7,42,43,44,8,9,10,11,12,13,14,15,16,17,83,63,47,62,95,18,84,87,64,96,20,21,68,52,70,22,36,73,54,55,23,45,91,24,56,74],stem:14,sacrif:22,step:[27,57,28,7,29,77,31,59,20,34,71,6,85,41,42,43,11,12,13,14,45,46,47,86,64,21,68,52,70,36,91,96,74],copyvalu:36,curtok:[37,95,41,42,43,44],assignvirt2phi:71,subtract:[34,20],"_ztid":20,blocksizei:6,idx:[75,86,37,41,42,43,44,20],nnnnnn:71,shini:64,blocksizez:6,f31:47,blocksizex:6,block:[27,71,0,28,75,2,32,20,6,37,4,40,41,42,43,44,10,11,12,13,14,16,17,47,48,62,63,87,64,67,68,51,91,36,72,23,94,95,89],use_llvm:[10,11,12,13,17],gcroot:[62,20],aq2:20,within:[27,57,71,29,1,75,20,6,4,81,41,42,43,44,10,11,12,13,14,45,85,86,62,84,87,68,51,70,36,94,91,56],loadsdnod:14,proj_install_root:45,ensur:[27,75,73,32,4,6,37,20,81,41,42,8,13,14,17,83,47,18,84,64,77,21,91,22,71,36,23,94,56],properli:[21,71,33,20,18,36,41,73,44,8,70,24,75,13,14,29],pwd:7,vfprintf:20,newer:[21,82],cmpxchg:[20,73],specialti:14,info:[27,71,!
 29,1,82,2
 0,35,38,39,41,42,43,44,9,10,11,12,13,14,15,47,62,84,87,64,66,21,68,52,91,57,94,97,74],inreg:[71,20,94,47],"0xc3":68,i65:20,abs_fp64:68,similar:[27,71,0,30,75,3,20,80,6,37,4,39,42,43,44,8,10,11,12,14,15,45,17,83,47,86,62,18,64,68,91,57,73,23,94],createdefaultmypass:64,obviat:45,reflectparam:6,doesn:[27,71,1,75,77,2,3,20,35,80,36,37,4,39,81,41,42,43,44,8,9,10,11,12,13,14,15,16,17,85,86,62,95,18,64,68,70,53,73,55,23,91],repres:[27,71,1,75,2,20,34,80,6,37,95,81,41,42,43,44,10,11,12,13,14,16,17,47,86,18,87,49,68,91,36,73,94,26],arg_iter:[37,41,42,43,44,14],nextvari:[42,43],minsiz:20,titl:[23,69],speccpu2006:29,nan:[67,65,20,87],setenv:56,"0x00007fff":71,dosometh:75,resign:23,xtemp:73,drag:69,eval:[27,36],parseenvironmentopt:18,canfoldasload:68,source_x86_64:66,typeid:[91,34,94],infrequ:64,addmbb:71,orbit:[12,42],devminor:6,depth:[27,18,71,87,43,55,11],xxxgeninstrinfo:47,unconnect:86,intervalmap:14,msbuild:52,getkind:85,image_scn_mem_preload:92,compact:[35,62,71,9,32,14],friendli!
 :[33,25,1
 6,95],unsimm:71,breakcriticaledg:64,aris:[23,14,86],instr_iter:71,yoyodyn:23,then_bb:[11,12,13],image_sym_dtype_arrai:92,runnabl:21,nonatom:87,llvmdisasminstruct:25,weakvh:14,use_llvm_target:[10,11,12,13],dw_tag_const_typ:87,ccifnest:47,relink:[83,70],thunderbird:23,calleef:[37,41,42,43,44],jump:[27,71,47,18,53,43,94,56,11,20,45],imper:[75,62,41,43,11,13],download:[21,52,47,33,28,22,7,77,8,55,96,56,14,45],click:[31,69],hasoneus:75,poke:94,intregsregisterclass:47,espresso:29,cell:47,experiment:[78,22,34],registerschedul:64,ramsei:71,init_v:13,legalizeact:47,becom:[64,27,68,75,85,47,0,20,18,71,41,30,43,8,95,56,11,86,13,14,16],accessor:[64,95,71,87],"_source_dir":52,startexpr:[13,41,42,43],convert:[27,71,76,1,58,20,34,35,6,37,39,41,42,43,44,9,10,11,12,13,14,15,17,47,86,18,64,49,66,21,68,22,57,92,73],convers:[68,57,47,6,14,18,0,20],vbr:[80,94,32],solaris2:64,chang:[27,57,28,71,29,1,75,77,31,2,4,61,33,34,79,85,6,37,38,40,41,42,43,44,10,11,12,13,14,81,45,17,83,47,48,62,18,87,64,9!
 6,20,49,8
 6,21,68,51,52,69,70,22,36,73,54,23,94,24,56,74],hexagon:[21,71],add_definit:52,chanc:[61,68,2,39,57,23,15],danger:[14,4,20],revok:23,realloc:36,dyn_cast:[33,75,47,85,62,14],"boolean":[27,68,75,52,47,18,71,43,65,94,24,11,20],makefileconfigin:56,implic:[71,23],recordid:94,fibi:[13,41],llvm_stop_multithread:14,remaind:[21,34,47,91,71,8,24,20],llvm_enable_warn:52,"0x00ff0000":71,numelt:94,benchmark:[21,0,28,29,87,8,23,14,45],landingpad:[91,20],nvptx:[33,71,88,6],findlead:14,retriev:[61,80,6,18,57,64,14],image_scn_gprel:92,perceiv:[35,9],memory_order_acq_rel:[20,73],linearscan:[64,67,71],meet:[64,71,23,45],control:[27,75,0,1,31,20,61,34,35,6,37,95,39,40,41,42,43,44,9,10,11,12,13,14,15,16,17,46,47,18,87,64,65,67,21,52,70,22,71,72,23,91,56,74],malform:[27,70],sudo:[21,30],llvm_use_intel_jitev:52,compactli:68,myfooflag:57,tarbal:[33,77,7,56],emitepilogu:47,egrep:21,parenexpr:[37,95,41,42,43,44,10,11,12,13,16,17],dissolv:56,tag_base_typ:87,templatearglist:26,lto_module_is_object_fil!
 :74,live_
 s:62,eliminatecallframepseudoinstr:47,aliasanalysiscount:36,targetdata:27,"0x3feaed548f090ce":44,filterclass:59,zext:[20,49],subtyp:47,primaryexpr:[95,16],jne:71,onzero:20,distzip:56,outer:[57,41,43,64,11,13,20],consensu:23,pushfl:71,topdistdir:56,release_15:21,dw_tag_auto_vari:87,label_branch_weight:2,handl:[27,71,0,3,20,33,35,85,6,37,95,39,41,42,43,44,9,11,12,13,14,15,16,17,47,62,18,87,64,65,49,67,21,68,74,22,57,73,23,91,24,26],auto:[33,87,48,71,0],handi:[37,56,89,14,17],memberlist:47,p15:6,p16:6,p17:6,p18:6,gridsizei:6,modr:71,somewher:[64,85,37,20,29,42,8,91,12,4,17],ourfpm:[41,42,43,44],mode:[21,68,71,52,90,47,28,14,18,1,41,83,77,23,94,56,13,4,22,80],basicblockpass:64,acquirereleas:73,unwind:[27,47,91,71,19,50,20],globl:[19,6],selectiondag:[27,34,47,71,73,14],grok:[37,81,17],chunk:[27,75,37,71,72,87,94,17],special:[27,53,0,41,1,3,20,33,35,71,6,39,7,82,8,9,13,14,15,47,86,62,18,87,64,21,68,36,73,57,94,24,56,26],image_sym_type_byt:92,"0x00000130":87,influenc:[64,51,87],dw!
 _at_apple
 _property_copi:87,suitabl:[61,27,63,6,62,20,18,71,8,78,94,14],hardwar:[21,88,47,6,22,71,31,67,20],statist:[36,22,84,64,65,32,67,14,29,45],iostream:[75,81,6],spec95:29,lcssa:[27,51],"__cuda_ftz":6,manipul:[21,81,48,62,20,71,41,49,13,14],parallel_dir:[56,45],machineinstrbuild:71,ecx:[68,71,19],image_scn_mem_writ:92,bodyexpr:[13,41,42,43],bclinklib:56,membership:14,keep:[27,75,0,77,3,20,33,35,36,37,4,39,81,41,42,8,9,12,13,14,15,16,17,85,18,87,64,68,71,23,45,95,74],wrote:[34,20,86],geometri:22,dumpmymapdoc:57,svptr:20,linkallcodegencompon:64,qualiti:[27,71,30,77,8,23,64],fmul:[6,37,71,44,10,20,17],lshr:20,art:62,find_a:14,rs1:47,has_disassembl:24,scalartrait:57,dump:[27,71,37,20,87,57,41,42,43,44,64,78,70,94,32,10,11,14,17],perfectli:[75,86,4,71,95,20,81,16],mkdir:[21,56,52,77,55],wrapper:[61,27,47,87,94,3,14],second_end:20,attach:[21,75,69,6,41,87,82,23,13,20],regionpass:64,functionpassctor:64,"final":[75,28,41,1,77,85,20,61,35,80,37,95,39,7,42,43,8,9,11,12,13,14,15,16,17,47,7!
 4,18,87,6
 4,21,68,52,70,22,71,23,45,94,91,56,26],prone:[68,18,71,30,81],rsi:68,deconstruct:71,methodolog:91,rst:[71,89],exactli:[27,68,57,94,85,36,62,14,18,1,87,44,64,24,19,20,10,3,4],rsp:[68,71,72],ehashfunctiondjb:87,bloat:75,a_ctor_bas:4,instvisitor:[34,14],dubiou:80,bare:[83,14,47],f16:20,exhibit:[70,73],multhread:14,xor8rr:71,reg2:4,reg1:4,goldberg:62,lightli:[28,20],tabl:[27,71,0,29,58,77,32,59,20,61,33,35,80,36,37,95,41,42,43,44,9,10,11,12,13,14,16,17,46,47,48,85,18,87,93,66,50,21,68,91,22,57,94,56,74],need:[27,53,57,28,41,29,77,31,75,86,95,59,3,82,4,33,34,35,71,6,37,20,39,81,7,42,43,44,8,9,10,11,12,13,14,15,16,17,83,63,47,48,62,85,18,84,87,64,65,49,67,50,80,21,68,89,52,70,22,36,72,73,55,23,45,94,91,24,56,25,97,74],altivec:[22,71],border:71,fp5:68,"0x08":87,reloc_pcrel_word:[75,47],"0x04":87,"0x00":80,parse_extern:[10,11,12,13,16,17],fileit:18,unawar:20,platformstripopt:56,llvmgold:55,equal_rang:14,instanci:68,singl:[27,71,0,28,29,1,20,34,35,80,6,37,4,39,41,44,8,9,10,13,14,45,!
 17,47,86,
 62,18,87,64,49,21,68,51,90,70,22,57,73,23,94,91,56],parseidentifierexpr:[37,95,41,42,43,44],discov:[84,62,71,1,41,87,43,11,3,13],rigor:71,x86_ssecal:47,x86_fp80:[20,94],sdk:31,url:[23,89],hasrex_wprefix:68,"0xe8":68,yaml2obj:92,indx:57,snapshot:36,unoptim:[21,65],constrain:[37,54,68,81,17],disable_assert:[54,21,77,56],"0x0a":80,cute:[35,9],verbos:[21,1,80,90,57,56],objc:[33,89,87],molest:20,anywai:[27,7],varnam:[11,13,41,42,43],nondebug:27,envp:82,x86_thiscal:71,won:[75,86,36,28,29,71,7,87,44,8,37,23,49,10,56,89,20],themodul:[37,41,42,43,44],add_to_library_group:24,gettyp:[75,14],tbb:47,coalesc:[20,40,14,71,67],shr:75,enabl:[27,71,0,76,1,30,78,75,20,5,79,38,81,82,8,14,63,47,62,18,84,87,64,65,67,21,52,90,22,57,72,54,55,23,56,25,74],getmbb:47,she:[96,68],contain:[27,53,0,28,29,1,75,30,77,31,2,59,82,4,61,33,85,79,80,6,37,20,7,43,44,8,10,11,71,14,16,17,47,86,62,95,18,87,64,96,93,66,21,68,51,52,74,22,36,57,23,45,94,91,24,56,97,26],shapekind:85,grab:[68,28,81,77,11,12,13,14],imag!
 e_file_lo
 cal_syms_strip:92,shl:[27,75,26,20],nolink:18,flip:75,target_link_librari:52,image_scn_mem_16bit:92,statu:[81,76,1,78,32,4,33,5,79,80,60,40,14,83,63,48,84,65,66,67,50,69,90,22,93,38,96,56,97],correctli:[64,21,71,86,20,18,57,72,73,43,87,8,23,45,91,11,75,95,14,81,16],writter:18,sectvalu:18,realign:20,state:[21,71,69,36,62,20,18,57,75,73,87,64,23,95,91,27,56,89,14],neither:[27,31,20,94,36],tent:20,vfp3:7,kei:[68,71,14,57,64,23,59,20],header_data_len:87,setgraphcolor:14,eclips:21,thank:53,xxxreloc:47,admin:96,handledefinit:[37,95,41,42,43,44],dw_tag_inherit:87,test_format:1,unglamor:23,multi_v:18,orig:20,quit:[33,34,35,86,36,37,20,56,73,43,82,62,9,11,3,71,14,89,17],slowli:[21,23],addition:[21,71,27,62,20,18,36,73,8,55,23,24,56,14],classnam:97,libdir:[56,83],image_sym_dtype_nul:92,treat:[35,94,47,86,37,14,18,71,75,73,8,74,9,20,49,59,56,4,17],cputyp:94,alphacompilationcallback:47,otp:20,createcal:[37,41,42,43,44],plausibl:27,acq_rel:[20,73],replic:[68,53,74,57],novel:[62,20,14],d!
 w_tag_typ
 edef:87,removenod:21,harder:[27,95,81,3,20,16],contextu:25,print_str:[10,11,12,13,16,17],engag:23,demo:[37,18,77,81,17],rootstackoffset:62,povray31:29,invokeinst:14,welcom:[21,35,88,37,95,39,41,42,43,44,64,31,23,9,10,11,12,13,15,16,17],parti:[23,45],reloc_picrel_word:[75,47],print_float:[10,11,12,13],sqrt:[57,20,0],setcategori:18,matcher:[71,97],donoth:20,http:[21,46,33,28,29,7,77,8,37,31,23,96,17],tokprec:[37,95,41,42,43,44],effect:[27,75,29,30,3,20,36,42,43,8,11,12,14,47,86,62,18,87,64,67,21,71,94,56,25,26],isopt:18,llvm_use_oprofil:52,global_s:14,initi:[27,57,71,1,75,32,20,61,34,85,6,37,81,41,43,44,10,11,12,13,14,17,47,62,18,64,67,68,52,91,22,36,72,94,26],appendinglinkag:14,dllvm_enable_p:7,callgraphscc:64,isrematerializ:68,dw_form_strp:87,well:[27,71,77,31,75,82,20,34,6,37,38,39,81,41,42,44,8,10,12,13,14,15,16,17,18,84,87,64,66,21,68,69,70,22,36,73,55,23,94,95,24,74],makefileconfig:56,undefin:[27,68,53,52,47,6,20,0,75,73,74,91,86,93,14,81],sibl:[71,20],jonathan2251:46,d!
 istanc:[2
 0,57,14,86],memory_order_consum:73,mistaken:[10,44],aform_1:71,aform_2:71,size1:20,size2:20,size3:20,outstream:62,dependfil:56,densiti:[12,75,42],warrant:34,kick:[12,42],nodebuginfo:18,takelast:14,howto:[46,68,89],mcsectioncoff:71,add_gvn:[10,11,12,13],burden:23,zchf:7,xxxisellow:47,loss:[62,14],lost:[20,35,9,81,56],"0f3fb8aa3b":6,ldflag:[21,83,37,41,42,43,44,56],necessari:[27,53,77,75,3,20,61,34,80,36,4,81,7,82,8,14,47,62,18,64,49,21,51,91,71,73,23,56,89,74],rotl:34,lose:[64,35,9,87],page:[61,21,75,52,69,0,37,33,18,81,87,58,77,8,31,23,88,56,14,22],llvm_release_global_lock:14,therein:45,revers:[27,51,0,4,22,86,14],revert:[21,23],"04e":20,notfp:68,"__cxa_allocate_except":91,home:[29,14,82],librari:[27,53,0,41,31,75,32,3,82,20,33,35,88,80,6,37,38,39,81,7,42,43,44,8,9,12,14,15,16,17,83,47,48,62,18,84,87,64,67,50,21,86,52,90,22,36,57,54,23,45,94,95,24,56,97,74],win32:[3,31,71,21],makelight:75,broad:[39,62,18,44,10,15],overlap:[64,71,36,20,0],estim:[27,0],asmstr:[68,47],myfunct:!
 6,encoura
 g:[27,35,53,75,23,9,14],ifequ:20,ec12:22,usag:[27,75,0,20,33,80,6,38,39,8,70,15,18,87,64,21,52,14,71,55,24,56],prefetch:[88,20],nutshel:14,offset:[35,80,47,86,62,20,71,72,87,8,9,94,4,14],image_file_32bit_machin:92,testsuit:[21,4,56],bcreader:83,freedom:[20,14],viewvc:33,bodyitem:26,metadata_attach:94,cocoa:20,cmake_cxx_flag:52,m_func:14,"0x00000110":87,image_file_removable_run_from_swap:92,"_cuda_ftz":6,downgrad:81,inner:[38,57,14,20,33],global_iter:14,feat_segstack:71,pty2:20,addpassestoemitfil:64,eax:[19,68,71,4,47],gain:18,spuriou:75,eas:30,highest:[37,95,41,42,43,44,10,11,12,13,20,16,17],eat:[39,37,95,18,41,42,43,44,10,11,12,13,15,16,17],liblto:[55,74],dmb:73,displac:71,displai:[27,71,47,29,39,50,18,1,75,87,96,23,32,85,25,93,15],sectiondata:92,asynchron:73,cruel:89,"0xffbef174":64,limit:[27,71,75,20,33,36,38,86,42,43,44,10,11,12,70,48,62,18,87,64,49,14,57,72,73,56],calctypenam:34,add_llvm_loadable_modul:52,tmp9:[4,86],atyp:86,isconvertibletothreeaddress:68,reciproc:20,e!
 valu:[27,
 75,20,34,35,6,37,95,41,42,43,44,9,10,11,12,13,16,17,47,86,62,36],lastchar:[37,95,39,41,42,43,44],intregsregclassid:47,fourinarow:29,rule:[27,75,28,29,77,3,20,79,37,4,81,7,43,8,11,14,45,17,85,48,87,64,86,68,71,73,23,56],acloc:[21,45],tok_var:41,arctan:57,hash_set:14,getjmp_buftyp:75,futur:[62,64,75,86,28,20,39,71,87,43,82,8,37,23,94,49,11,13,14,15,17],rememb:[21,41,86,20,18,71,7,43,64,31,23,95,11,75,13,14,29,16,81],parse_id:[10,11,12,13,16,17],iplist:14,baselin:[71,77],stat:[80,36,70,29,84,64,65,67,3,14],addrequir:64,cmake_build_typ:52,ctlz:20,dw_tag:87,stab:87,same_s:19,dyld:61,llvm_map_components_to_librari:52,stai:[33,23,74,57],sphinx:[21,89,33],"_ztv3foo":4,indirectli:[68,75,20,73],bcc:47,portion:[21,47,27,38,18,71,70,44,23,91,10,25,20],image_file_machine_sh3dsp:92,callingconv:[94,47],getpointertofunct:[61,41,42,43,44,14],use_bind:[10,11,12,13],accur:[27,35,36,62,33,87,74,9,20],unaryexprast:[41,42],parse_var_nam:13,sorri:[35,9],bespok:62,swap:[20,30],preprocess:[53,81],a!
 ux:14,dow
 nstream:40,"void":[27,71,0,73,75,4,34,6,37,20,81,41,42,43,44,14,47,86,62,18,87,64,91,57,36,55,94,95,74],llbuilder:13,build_stor:13,appar:[13,41],x86_stdcallcc:94,theier:27,stageselectioncat:18,image_file_machine_m32r:92,scalarbitsettrait:57,vector:[27,57,0,75,20,33,34,35,6,37,95,41,42,43,44,9,13,14,17,47,86,18,87,51,22,71,94],llvm_build_test:52,mllvm:0,initialis:18,whirlwind:[95,16],likeli:2,cpu_x86:57,getposit:18,aggreg:[27,51,14,47,20],binop_preced:[10,11,12,13,16,17],ill:80,even:[71,0,41,29,1,31,75,3,20,35,80,36,4,39,7,42,43,44,8,9,10,12,13,14,15,85,62,64,93,67,21,68,22,57,94,56,25,89,74],rope:14,addllvm:52,neg:[47,86,91,87,23,94,20],asid:14,transcrib:[37,17],nex:64,libpo:18,"new":[27,53,57,28,71,85,1,77,75,95,59,3,82,20,61,33,34,35,80,6,37,38,81,41,42,43,44,8,9,10,11,12,13,14,16,17,47,48,74,18,84,87,64,49,21,68,51,69,70,22,36,72,73,55,23,45,94,91,56,25,89,26],net:[96,33],ever:[35,36,20,75,23,9,24,14],metadata:[27,51,86,21,62,33,39,6,87,2,94,20,15],elimin:[27,71,75,20,6,!
 95,81,41,
 42,43,44,10,11,12,13,14,16,47,62,18,87,64,65,21,51,70,36,55,23],behavior:[27,75,53,1,20,34,36,4,40,41,43,11,13,14,81,16,47,62,18,64,21,91,71,73,95],old_bind:13,mem:[27,10,11,12,13,20,25,16,17],henrik:3,restat:75,met:[71,20],valuemap:14,ccassigntostack:47,image_scn_cnt_initialized_data:92,interpret:[1,20,35,37,38,40,41,42,43,44,8,9,10,11,12,13,14,16,17,83,62,18,87,67,21,68,52,71,54,94,95,24,56,26],dcmake_crosscompil:7,gcname:94,getunqu:14,credit:23,ebenders_test:82,permit:[68,51,62,14,71,41,8,65,13,20],parlanc:[39,15],prolog:[71,47],fsub:[41,13,20],immin:77,machineregisterinfo:71,quickcheck:14,createnvvmreflectpass:6,icc_n:47,disambigu:36,calm:[13,41],recommend:[21,71,52,86,6,95,87,1,41,54,44,8,23,10,56,75,13,64,16],icc_g:47,type:[27,53,0,41,29,75,77,2,32,85,20,61,33,5,35,71,6,37,38,39,81,7,42,43,44,8,9,10,11,12,13,14,15,16,17,47,86,62,95,18,34,87,64,65,19,49,93,80,21,68,51,52,69,70,22,36,92,57,23,45,94,91,24,56,25,26],tell:[75,29,20,34,35,36,37,38,41,8,9,13,14,45,17,86,62,1!
 8,87,21,6
 8,52,70,71,54,23,16,95,56,74],esi:[68,71],"__eh_fram":71,llvm_acquire_global_lock:14,warn:[21,34,75,52,80,27,26,18,71,77,31,23,33,20,24,56,14,29],all_build:31,gpl:[23,81],dw_tag_apple_properti:87,room:[64,95,16,49],floattyp:14,dw_apple_property_nonatom:87,setup:[35,85,47,37,87,8,55,9,17],thefunct:[37,41,42,43,44],frequenc:63,librarygroup:24,root:[21,83,51,52,96,48,37,1,7,87,8,62,23,24,71,20,45,17],clang_cc1:4,defer:[10,61,44],give:[27,57,75,20,35,6,37,39,81,7,42,44,9,12,71,14,15,17,47,18,87,64,21,70,36,73,23,94,96,25,89,26],dlsym:[10,56,64,44],ocaml:[22,10,11,12,13,15,16,17],binpath:82,subtmp5:[13,41],dragonegg:[33,81,23,71,77],unsign:[71,0,75,2,20,6,37,41,42,43,44,14,17,47,86,62,18,87,57,36,94,74],quot:[68,18,87,8,24,20],tbaa:[51,20],targetlow:[34,71,70,47],answer:[33,75,86,27,18,36,41,43,44,89,10,11,13,20,81],registerlist:47,config:[1,58,3,37,81,41,42,43,44,8,14,45,17,83,47,48,24,21,22,23,96,56],confid:23,reloc_absolute_word:[75,47],attempt:[61,27,84,47,36,91,38,56,70,64,!
 75,94,21,
 3,71,20,81],unnamed_addr:[20,94],maintain:[34,75,36,62,20,18,71,68,73,64,23,94,3,14,87],yourregex:4,vfp:30,"0fbf317200":6,privileg:[3,20],gcda:78,copyright:[64,23,81],unexpetedli:8,sigplan:[62,71],better:[27,53,0,29,75,4,35,20,41,43,82,9,11,13,14,16,63,64,51,71,73,95],argti:20,persist:14,erlang:20,newtoset:75,dummytargetmachin:47,promin:[8,29],overestim:20,then_:[11,12,13],usertarget:56,mapsectionaddress:61,isel:[68,51,47,22,71,97],"instanceof":14,grammat:[95,29,16],grammar:[95,12,34,16,42],meat:10,build_for_websit:77,setdescript:18,getvalu:[75,14],somefancyaa:64,went:[11,43],thenv:[41,42,43],side:[27,71,6,37,20,36,42,43,8,62,75,95,11,12,14,16,17],bone:47,mean:[27,71,1,77,75,85,3,20,35,80,36,37,4,39,41,43,44,9,10,11,13,14,15,45,17,47,86,62,18,87,64,93,68,52,74,57,55,23,94,56,26],awri:56,add_ri:68,oppos:[21,51,20,18,93,11,26,45],taught:71,f108:6,f107:6,extract:[27,5,80,47,20,68,58,87,31,14],getsextvalu:14,unbound:[71,47],crucial:20,content:[27,75,29,4,32,20,33,80,36,85,38,10!
 ,11,12,13
 ,14,15,16,17,46,47,48,18,87,64,19,68,52,74,71,23,94,24,56,89,26],dw_lang_c99:87,mtripl:[20,65,4,67],dfpregsregclass:47,reader:[34,75,95,57,58,94,50,20,81,16],end_cond:[11,12,13],umul:20,parseforexpr:[41,42,43],nodetyp:47,linear:[21,86,36,71,64,65,67,14],parse_definit:[10,11,12,13,16,17],mytyp:20,verif:[27,18,20],situat:[27,85,47,86,20,18,71,73,44,64,55,91,10,56,14],infin:20,parenthesi:[95,75,16],f89:6,getfunctiontyp:14,retcc_x86_32_fast:47,dw_at_rang:87,nummodulevalu:94,typesaf:20,ish:[12,42],fptoui:20,isa:[33,75,88,85,47,62,71,14],getinstrinfo:[71,47],isd:[34,71,47],cpuinfo:30,floorf:0,my_kernel:6,targetregistri:[71,47],hook:[11,71,70,45,43],unlik:[21,75,94,85,27,62,26,71,41,73,44,64,55,23,20,91,10,56,13,14],agre:[27,23,57],payload:71,hood:8,global_empti:14,tsc701:47,specialis:20,ieee754:20,sometim:[27,71,94,85,47,86,4,18,57,75,70,8,23,20,56,14,81],arm_apcscc:94,dwell:37,filepo:18,llvm_enable_pedant:52,bodyv:41,namespac:[68,75,47,37,95,18,41,42,43,44,64,62,94,14,87],build_!
 cond_br:[
 11,12,13],isascii:[37,95,41,42,43,44],dllvm_tablegen:7,mergereturn:27,symptom:21,enjoi:96,r14d:68,silli:[39,75,15,81,36],r14b:68,keyword:[64,68,41,71,86,0,20,18,36,39,42,43,8,75,11,12,13,26,15],mcdesc:47,r14w:68,matter:[34,73,64,23,10,20],pointkind:62,modern:[35,88,0,22,39,82,8,9,56,14,15,81],mind:[95,75,13,41,16],mine:87,stackar:62,bitfield:73,seed:60,seen:[35,47,20,18,71,42,44,64,75,9,94,12,14],seem:[71,52,85,36,62,18,40,86,70],seek:[27,52,33,86,23,19,56],minu:[72,20],ty2:[34,20],memcheck:[8,1],image_sym_class_register_param:92,preincrement:75,rethrow:91,myset:75,myseq:57,distsourc:56,fnstrart:71,cudevic:6,regular:[21,5,35,80,20,18,73,9,56,4,29],ccassigntoreg:47,tradit:[21,27,39,71,87,64,93,15],simplic:[37,62,39,14,17],don:[27,53,0,28,71,29,1,77,75,3,4,35,6,37,20,39,81,41,42,43,44,8,9,10,11,12,13,14,15,16,17,85,86,62,18,87,64,67,21,69,36,54,23,95,56,89],pointe:[20,94],dom:27,pointi:57,alarm:30,obtus:86,dog:18,expandinlineasm:47,digress:[12,42],dot:[27,77,14,87,56],hunger:!
 [35,9],vi
 sitor:[34,37,39,62,70,15],esoter:68,llvm_enable_werror:52,syntax:[71,75,20,33,6,37,4,39,81,41,42,43,44,8,10,11,12,13,15,16,17,86,18,87,65,19,67,21,68,51,22,57,92,95,56,25,89,26],errstr:[41,42,43,44],image_sym_class_weak_extern:92,istruncatingstor:47,despit:[64,18,71,68,87],acquir:[20,73],libari:83,explain:[75,52,80,36,72,39,71,41,64,13,14,15,81],"__nv_truncf":6,pinst:14,stop:[21,34,75,52,62,20,40,64,95,91,14,81,16],compli:62,smul:20,bar:[26,57,52,6,0,4,18,1,87,43,37,75,20,11,71,14,81,17],sacrific:20,baz:[75,0,18,87,43,11,26],reload:[71,13,41,51],bad:[75,28,20,87,81,42,70,38,3,12,14],dw_tag_shared_typ:87,shtest:1,addinstselector:47,flagpointi:57,cstdio:[37,95,41,42,43,44],instalias:71,isdef:71,"0x42":94,"0x43":94,subject:[20,23,14,71],p1i8:6,said:[35,91,22,87,77,75,9,14],xarch:21,simplest:[71,47,37,95,18,57,44,31,10,16],attribut:[27,94,47,6,62,33,18,40,65,87,23,74,20,49,59,67,14,22],add_memory_to_register_promot:13,triplet:[8,18,20],howtousejit:83,lazi:[27,14,20,36],abs_fp80!
 :68,confi
 gurescript:56,imagmag:[12,42],against:[21,83,23,52,80,85,6,4,29,57,54,8,2,20,91,27,14,81],fno:0,uni:6,readnon:[27,20,87,94,6],uno:20,foobaz:75,createload:41,devbufferc:6,devbufferb:6,devbuffera:6,foobar:[57,75],int32_t:[62,57],loader:[38,84,27],theoret:[3,14],"__________________________________________________________":14,performcustomlow:62,three:[27,28,29,1,4,14,20,81,43,8,70,16,47,86,95,18,64,21,91,71,94,38,56],objc_properti:87,specul:[91,73,36],succ_begin:14,trigger:[61,5,57,52,36,62,70,22,53,8,75,20,29],interest:[27,71,29,1,58,31,75,32,4,61,33,35,36,37,20,39,81,41,42,43,44,8,9,10,11,12,13,14,15,16,17,85,62,18,87,64,21,91,57,73,23,95,96],basic:[27,71,0,29,58,77,31,75,32,85,3,20,81,35,80,6,37,95,39,40,41,42,43,44,9,10,11,12,13,14,15,16,17,47,86,62,18,63,87,64,65,49,21,68,51,52,53,73,45,94,89,26],mo_registermask:71,tini:[75,85],llvmpassnam:52,build_load:13,deeper:[89,85],suppress:[62,75,1,20],mce:47,sparsemultiset:14,multithread:[62,64,14],lpae:73,argumentexpr:[10,11,12,1!
 3,16,17],
 llvm_include_test:52,ugli:[14,12,81,4,42],subsequ:[61,27,68,47,86,20,18,71,87,25,14],intregsvt:47,itinerari:[68,71,47],noredzon:[20,94],slt:20,servic:[3,81,36],lex_id:[10,11,12,13,15,16,17],slp:[22,51,0],calcul:[64,27,51,47,36,20,29,71,87,43,8,11,86,14],typeflag:87,sle:20,anchor:[75,87],r600:[22,88],uncopy:75,xxxkind:85,disappear:[21,81,30],grown:[12,35,9,42],receiv:[61,14,94,91,20,16],make:[27,53,0,28,41,29,1,30,77,75,85,3,82,4,33,35,71,6,37,20,39,81,7,42,43,44,8,9,10,11,12,13,14,15,16,17,83,47,48,62,18,87,64,96,65,67,86,80,21,68,89,52,69,70,22,36,73,57,54,55,23,45,94,95,24,56,97,74],bitmask:20,who:[21,35,47,33,53,41,54,8,23,9,24,3,75,13,20],isspac:[37,95,39,41,42,43,44],initialexec:[20,94],kevin:71,zlib1g:7,kib:18,overs:14,revector:[27,14],binopprototyp:[12,13],qualif:77,vehiclemak:75,ea_r:71,addrawvalu:49,inherit:[64,68,75,85,36,26,18,71,54,3,14],endif:[35,52,18,75,9,3],programm:[33,35,85,0,62,26,22,84,42,70,64,9,20,73,56,12,71,14,18],paradigm:[22,14,86],left:[27,68,71,8!
 0,47,0,37
 ,70,29,57,87,43,75,94,95,11,20,16,17],projusedlib:56,identifi:[27,75,28,1,20,80,6,37,4,39,41,42,43,44,10,11,12,13,14,15,16,17,47,86,62,95,18,87,64,19,21,51,52,70,71,45,94,91,25,26],op1:[20,94],op2:20,op3:47,bandwidth:20,hotspot:63,human:[21,68,75,79,90,27,76,63,57,64,32,20],nowadai:7,yet:[61,21,83,75,96,47,27,62,20,18,71,42,43,44,64,24,10,11,12,14,29],languag:[27,71,76,75,4,33,5,35,79,6,37,20,39,81,41,42,43,44,8,9,10,11,12,13,14,15,16,17,46,47,86,62,18,84,87,65,88,21,68,90,91,22,57,73,23,95,26],macport:54,save:[71,0,31,32,20,61,34,6,41,42,43,44,10,11,12,13,14,47,18,87,21,68,69,91,53,54,94],vpsubusw:8,u999999:69,applic:[75,29,20,61,33,35,88,80,39,42,44,8,9,10,12,14,15,83,47,62,18,64,68,91,22,71,23,94,24,56],segnam:18,link_directori:52,background:[71,14,89,85,82],opc:[68,41,42],wojciech:27,getinstlist:14,manual:[75,20,33,35,88,47,8,9,70,85,86,18,84,87,64,21,68,69,14,22,71,23,96,56],dindex:47,tolmach:62,machinepassregistrynod:64,choic:[34,35,20,39,30,43,65,9,76,11,14],unnecess!
 ari:[27,7
 1,14,47],cxxflag:[56,83],www:77,deal:[27,75,85,91,41,73,87,23,94,13,14],global_ctor:[81,20],interv:[21,71,14,27],somehow:[64,14],dead:[27,51,21,20,18,36,87,64,74,6,71,14,81],type_code_fp128:94,intern:[27,71,29,1,75,3,20,61,33,6,37,38,81,41,13,14,17,47,86,18,87,64,66,21,68,91,57,36,94,56,74],make_pair:41,norman:71,insensit:36,collect:[27,75,0,29,20,61,33,35,88,36,39,9,14,15,62,18,87,49,68,51,22,56,74],tempor:20,getchar:[37,95,39,41,42,43,44],xmm15:68,creatur:[42,12,15,39],burg:51,bold:89,identifierexpr:[37,95,41,42,43,44,10,11,12,13,16,17],uncompress:[21,14,52],cdt4:21,mappingnorm:57,buri:75,promot:[27,34,51,47,36,20,71,41,23,13,14],burr:67,"super":[71,74,47],fnty:20,unsaf:[35,73,87,65,9,67,20],dw_tag_formal_paramet:87,movsd:4,argv0:67,culaunchkernel:6,ppcf128:20,compilecommonopt:56,simul:[71,20],movsx:71,commit:[21,75,69,33,22,77,8,23,96,89],movsq:71,decompil:22,mrm7m:47,contriv:[68,81],f128:[20,47],down:[27,71,33,35,85,36,38,42,43,9,11,12,14,16,47,86,95,18,84,87,64,65,67,2!
 1,69,70,2
 2,53,54,23,91,56],pair:[27,71,47,36,14,57,41,73,43,87,91,95,20,49,11,4,16],indexreg:71,mrm7r:47,nomodref:36,add32mi8:68,subl:[71,4],parsesubtargetfeatur:47,precomput:36,perldoc:21,frameinfo:47,xpass:1,imit:[89,26],r173931:68,fraction:[59,85],amazingli:[11,43],"_els":[41,42,43],fork:3,numxform:14,creation:[61,47,62,14,77,49,20],form:[27,53,57,71,29,77,75,59,4,61,33,35,80,6,37,38,39,81,41,43,44,8,9,10,11,13,14,15,16,17,47,48,62,85,18,87,64,19,20,86,21,68,51,52,74,36,23,95,94,91,56,26],sub1:4,forc:[75,52,0,91,18,57,7,87,64,67,56,20],retarget:[33,71],nounwind:[6,4,87,8,94,20],phid:75,emitbyt:47,autoinsert:14,inttoptr:[20,86],type_code_ppc_fp128:94,processrelocationref:61,llvma:56,multisourc:[8,29,23,87,53],dontcopi:75,lowerinvok:[27,65,67],"__i386__":[35,9],unrel:[23,14,47,77],classid:26,classif:[3,20],featur:[27,71,0,28,29,1,77,75,59,3,20,33,35,95,81,41,42,43,8,9,11,12,13,14,16,47,62,18,87,64,21,68,52,69,22,57,54,23,45,56,74],semicolon:[68,52,37,95,41,42,43,44,10,11,12,13,16,1!
 7],classi
 c:22,visitgcroot:62,diagnost:[1,4,40],glanc:[75,35,9],ship:[21,35,9,82],dwarfnumb:47,password:[96,23],excel:[14,47,36],image_scn_align_2048byt:92,stackrestor:20,journei:[13,41],subdivid:29,why:[75,20,36,95,39,81,41,43,11,13,14,15,16,85,86,87,64,57,55,23,56,89],"0fc2d20000":6,iteri:[10,11,12,13,17],libffi:54,fsf:21,pseudo:[47,14,71,87,64,24,97,20],dcommit:21,image_sym_type_int:92,skip:[75,47,37,95,39,71,41,42,43,44,87,94,10,11,12,13,20,15,16,17],"0x00000150":87,skim:75,createvirtualregist:71,mill:18,primer:89,pldi:62,hierarch:[27,94],misread:75,libit:18,depend:[27,71,0,28,41,29,1,75,2,32,59,3,20,61,80,6,37,38,81,7,8,13,14,16,17,83,47,86,18,84,87,64,96,19,49,21,91,22,36,73,54,23,45,94,95,24,56],fancier:[64,89],intermedi:[33,5,81,90,47,28,20,22,84,62,95,49,14,16],targetinstrformat:47,hasinternallinkag:14,image_scn_align_2byt:92,letitem:26,mandlebrot:[12,42],llvmbuilder:10,llvmdummycodegen:47,string:[27,71,1,75,2,59,3,20,34,80,6,37,4,39,41,42,43,44,10,11,12,13,14,15,16,17,47,18!
 ,87,64,65
 ,49,66,67,21,68,52,57,94,95,24,25,26],create_argument_alloca:13,kernel_param_2:6,kernel_param_0:6,kernel_param_1:6,print_endlin:[10,11,12,13,16,17],dil:68,did:[21,35,85,36,20,81,41,42,44,64,75,9,91,10,12,13,14],die:[27,87],dif:27,dig:[68,39,15],iter:[27,71,0,75,20,61,36,95,41,42,43,11,12,13,70,16,47,62,74,18,68,51,14,57,23,26],item:[21,68,80,18,57,41,87,94,32,24,56,13,22],div:[71,14],round:[57,22,71,42,77,12,20,87],dir:[21,52,28,1,7,87,56,45],sparclit:47,originput:18,nozero:67,sideeffect:20,addr:[66,20,47],insertbranch:47,addx:68,respres:14,suspect:84,addi:68,slot:[27,47,72,71,41,32,13,20],dwarf:[35,47,62,74,71,87,82,9,91,14],oversimplifi:14,elsev:[41,42,43],imul16rmi:71,wait:[75,28,95,96,3,16],patleaf:47,canadian:21,shift:[27,34,18,71,94,20],bot:[33,23],"_ztii":20,storeregtoaddr:47,extrem:[27,94,47,36,14,87,71,41,73,70,64,23,20,59,13,26],bob:57,else_:[11,12,13],opcstr:47,stb_local:20,elect:23,modul:[27,71,29,1,58,77,75,32,20,61,5,6,37,40,41,42,43,44,8,10,11,12,13,14,81,17,!
 63,47,62,
 84,87,64,21,51,70,36,94,56,74],"__jit_debug_register_cod":82,movsx64rr8:71,"0baz":14,"0x60":80,sake:[64,14],bewar:62,allocinst:13,getsubtargetimpl:47,visit:[62,70,34,14],tokidentifi:26,deplib:94,perl:[62,21],everybodi:23,zeroargfp:68,checkout:[8,21,22,28,54],fcomi:71,com_fir:71,appel:62,extractvalu:20,examin:[61,21,47,70,18,71,77,8,14],effort:[61,27,34,75,37,81,87,23,3,17],armhf:7,fly:[95,22,71,44,10,16],reviewe:23,ulp:20,uniqu:[68,71,94,0,37,4,57,87,59,74,20,49,24,14,17],ult:[41,43,10,11,12,13,20,17],sourcewar:55,imped:20,nextvar:[41,42,43,11,12,13],nearest:20,basic_block:17,predict:[64,33,2],crazi:[18,35,9,15,39],subregion:20,fp16:20,strikingli:[12,42],delete_funct:[10,11,12,13,17],subnorm:6,binarypreced:[41,42],"0x000034f0":87,targetsubtarget:[71,47],ping:23,f32:[71,20,47,6],idiv:71,till:[96,14,82],getdatalayout:[47,62,41,42,43,44],purg:75,foreach:[68,75,26],pure:[27,47,37,71,87,23,24,26,17],doclist:57,testingconfig:1,map:[57,0,71,1,75,59,20,61,34,6,37,95,41,42,43,44,10,!
 11,12,13,
 14,17,47,62,18,87,51,36,92,94],max:[18,1,20],usabl:[71,18,65,14,47],intrus:14,smallstr:14,mag:20,mai:[27,57,0,71,29,1,75,30,77,31,2,3,4,61,5,35,80,6,37,38,39,81,41,42,43,82,8,9,11,12,13,14,15,45,17,47,86,62,18,34,87,64,96,65,20,49,67,93,21,68,51,52,70,22,36,73,55,23,94,91,24,56,74],underscor:[56,75,87],maj:28,grow:[20,18,71,43,11,25,14],man:[8,21,18,33],noun:75,"0x00001000":87,"switch":[27,75,30,77,2,59,20,34,85,37,95,41,42,43,44,10,11,14,17,47,62,18,21,91,57,55,56],myglob:87,targetframeinfo:[71,47],purifi:53,str1:68,talk:[34,35,37,95,39,41,43,44,64,75,9,10,11,13,15,16,17],isieeenorm:22,image_sym_class_automat:92,abbrevop0:94,abbrevop1:94,config_fil:56,shield:[3,71],iptr:20,comdat:19,"123kkk":18,recoup:94,nbsp:71,gcmetadata:62,pointer:[27,57,0,71,75,20,61,35,6,95,39,81,41,42,43,44,9,10,11,12,13,14,15,16,47,86,62,87,64,65,51,91,22,36,73,94,74],entiti:[68,75,14,87,94,20],group:[27,75,29,4,3,20,33,35,80,95,8,9,16,47,18,87,64,68,22,71,23,24],monitor:36,polici:[21,23,14,36,33],s!
 hadowstac
 k:62,build_shared_lib:52,mail:[21,35,69,33,28,22,75,23,9,96,89,45],inlinehint:[20,94],main:[27,75,77,31,82,20,33,35,6,37,95,41,42,43,44,8,9,10,11,12,13,14,16,17,62,18,87,64,66,21,68,91,22,71,55,23,24,89,74],irbuild:[37,41,42,43,44,10,11,17],recoveri:[37,95,41,42,43,44,10,11,12,13,16,17],parseunari:[12,41,42],remateri:73,synopsi:[76,1,4,78,32,60,5,79,80,38,40,83,63,48,18,84,65,66,67,50,90,93,97],sooner:96,initv:41,possess:14,lo16:71,subproject:[21,22,23,77,33],isnul:75,x11:14,myflag:57,misbehav:28,loopunswitch:27,ndebug:[54,18],continu:[75,29,4,20,35,36,95,82,8,9,14,16,85,18,69,91,71,72,23,94,38,74],gcread:[62,20],redistribut:[23,81],libgcc:72,tmp8:86,recogn:[27,29,39,74,18,71,43,11,20,15],tmp7:[4,86],tmp6:86,tmp1:[75,4],tmp3:4,tmp2:[13,41],getbinarypreced:[41,42],announc:[28,33,77],pocl:22,numval:[37,95,39,41,42,43,44,94],dw_tag_unspecified_typ:87,arminstrinfo:47,correct:[27,71,0,28,29,77,75,3,20,34,36,81,7,44,8,10,14,18,87,64,65,67,21,51,52,22,53,72,73,23,96,56],earlier:[2!
 4,31,20,4
 7],"goto":[75,0,41,42,43,13],tmpb:41,ori:71,org:[21,57,33,28,29,55,7,77,8,37,31,23,96,17],ord:20,v8deprecatedinst:47,createasmstream:71,thing:[27,57,41,29,1,77,31,75,3,4,35,71,36,37,20,39,81,7,42,43,44,8,9,10,11,12,13,14,15,16,17,86,62,18,87,64,21,68,70,53,54,23,45,94,95,24,56,25,89],principl:[3,39,75,88,15],think:[34,35,52,85,6,39,36,75,43,23,9,11,59,3,86,71,14,15,45],frequent:[27,75,52,86,21,62,33,18,81,31,23,20,3,14,63],first:[27,53,57,71,29,1,75,77,31,2,59,3,95,4,61,35,80,6,37,20,39,81,41,42,43,44,8,9,76,10,11,12,13,14,15,16,17,47,85,62,74,18,84,87,64,67,86,21,68,51,52,70,36,73,23,45,94,91,96,56,25,89,26],carri:[20,25,14,80,86],"long":[71,28,1,75,2,32,85,3,20,35,88,80,36,37,38,81,8,9,14,17,47,86,62,87,64,19,21,70,57,23,56],crit:27,numop:[94,47],indiviu:71,adjac:[26,14,20],averag:[11,43,32],daunt:52,"0f42d20000":6,attrkind:49,foldingsetnod:14,getpredopcod:59,vbr6:94,vbr4:94,vbr5:94,vbr8:94,redefinit:[37,41,42,43,44,10,11,12,13,17],valuedisallow:18,were:[21,68,35,27,14,18!
 ,1,73,48,
 87,31,75,9,20,84,56,71,4,22,53],lcpi0_0:8,mcexpr:71,mrm5m:47,dw_tag_set_typ:87,licm:[27,51,36,73,64,14],llvmlibsopt:56,dash:[18,57],mageia:21,greet:68,gettargetlow:47,exclud:[38,71,23,59,56,4],mrm5r:47,repeatedli:[22,20],unadorn:20,weak_odr:[20,94],squar:[24,57,20,85],advic:[33,38,30,54,23,70],cumoduleloaddataex:6,llvm_target:[10,11,12,13],"_crit_edg":20,advis:[11,77,80,43,49],interior:[51,85],immsext16:71,channel:33,sparciseldagtodag:47,llvm_analysi:[10,11,12,13,17],ptrloc:[62,20],pain:[18,14,82],ldststoreupd:71,trace:[64,18,51,87],normal:[71,0,76,1,77,75,3,20,5,79,80,4,42,12,14,63,18,84,87,64,93,21,68,90,91,22,57,72,73,23,94,56,25,74],track:[27,68,53,71,36,37,70,84,1,41,42,87,64,62,23,75,12,13,14,81,17],c99:[20,19],allroot:29,beta:21,cucontext:6,f3_12:47,r31:71,isglobaladdress:47,synonym:80,cumodulegetfunct:6,dw_form_:87,llvmgxx:56,isphysicalregist:71,defaultconfig:14,gracefulli:14,lexicon:[33,51],show:[71,0,28,1,2,82,20,61,35,6,37,4,39,81,41,42,43,44,9,10,11,12,13,14,15,!
 16,17,47,
 86,18,87,64,93,21,68,89,57,55,95,97],eckel:14,shoe:57,threshold:[27,20],frontend:[21,22,40,73,24,20],emitexternalsymboladdress:47,globalsmodref:[64,27,36],dice:14,fenc:[20,73],jite:[33,82],adc64mi32:68,parametr:26,customwritebarri:62,dword:75,sparcisellow:47,intptr_t:[41,42,43,44],gep:[27,81,86,33],variou:[27,57,29,75,59,20,61,88,6,38,39,43,44,8,10,11,71,14,15,16,47,95,84,87,64,21,68,69,70,22,36,73,94,91,24,56,74],get:[27,53,57,28,41,29,58,77,31,75,85,3,82,4,61,33,34,35,71,6,37,20,39,81,7,42,43,44,8,9,10,11,12,13,14,15,16,17,47,86,62,74,18,63,87,64,49,21,68,52,69,70,22,36,73,23,45,95,96,56,89,26],mung:[27,86],secondari:23,repo:21,emitlabel:71,llvmsystem:56,wheezi:7,fde:71,gen:[6,41,42,43,44,97],r10b:68,yield:[27,86,20,18,94,14,29],r10d:68,stupid:70,mediat:36,r10w:68,summari:[27,76,29,1,32,4,5,79,38,41,13,83,86,18,84,65,67,50,21,69,90,93,94,56,97],wiki:52,kernel:[33,35,47,6,22,0,9,67],setpreservesal:64,"__builtin_setjmp":91,intrinsicsnvvm:6,fmuladd:[20,0],spars:[21,34,51,27,!
 71,14],se
 an:26,testcas:[37,38,23,20,14,17],"0b1001011":68,infinit:[21,36,20,71,27],nestabl:[68,26],innov:22,getmetadata:87,enumer:[68,57,47,18,71,87,75,94,97,14],label:[27,75,94,47,6,62,4,71,41,43,20,11,13,14,81],innoc:[11,43],enumem:47,volatil:[27,81,47,36,62,71,73,20],across:[21,27,6,20,18,0,73,44,64,24,35,9,32,10,71,14,51,87],august:61,parent:[21,75,37,20,1,43,24,11,14],fpregsregisterclass:47,frameaddress:20,modref:[68,73,36],parseprototyp:[37,95,41,42,43,44],copyabl:14,false_branch_weight:2,blocklen:94,audienc:[33,47],library_nam:24,p0i64:4,improv:[27,35,69,47,36,62,22,1,44,64,9,10,77,20],peephol:[34,71,41,42,43,44,64,10,11,12,13,14],among:[21,75,36,74,71,19,6,14],acceler:[35,9,87],colspan:71,unittest:52,tsflag:47,getnumsuccessor:75,cancel:91,iscal:68,inadvert:[3,4],xadd:73,ultim:[68,75,28,1,44,10,56,20],p0i8:[20,6],mark:[21,68,71,47,6,62,20,22,1,73,82,8,75,94,27,25,14],certifi:81,"0x4004f4":66,basicaa:[64,27,36],"0f0":71,fadd:[34,47,6,37,71,41,43,44,10,11,13,20,17],squash:21,f9!
 2:6,f93:6
 ,f90:6,f91:6,f96:6,f97:6,f94:6,f95:6,univers:[75,14,81,23,66,20],f98:6,f99:6,those:[27,71,1,30,75,32,3,20,33,80,36,4,40,41,8,13,14,47,86,62,18,87,64,21,68,52,70,57,73,23,91,24,56],sound:36,isvararg:14,interoper:[62,14,35,9,91],"0x3fed":87,"0x3feb":87,"0x3fea":87,"na\u00efv":27,invoc:[52,4,71,70,64,20,38,56,14],isdoubl:68,gvneedslazyptr:47,advantag:[74,35,86,62,20,18,71,41,42,73,23,9,49,12,13,14],parse_expr:[10,11,12,13,16,17],bytecode_libdir:56,destin:[80,47,91,71,41,8,2,13,20],llvm_gcc_dir:29,variable_op:68,my_function_precis:6,cudeviceget:6,liveoffset:62,same:[27,53,0,28,71,78,75,32,59,3,4,34,35,79,80,6,37,20,39,81,41,42,43,44,8,9,10,11,12,13,14,16,17,47,86,62,18,84,87,64,19,67,21,51,70,22,36,72,73,57,54,55,23,45,94,95,24,56,89],image_file_machine_unknown:92,pad:[91,20,80,94],pai:[8,23,75,47],oneargfp:68,add32mi:68,exhaust:[62,21,71,14,27],assist:[75,53,42,56,12,97],executionengin:[21,52,82,71,41,42,43,44,10,11,12,13,14],capabl:[20,34,35,88,6,37,41,42,44,9,10,12,13,14,17,!
 47,18,64,
 21,71,36,74],value_symtab_block:94,executeprogramandwait:3,runonmachinefunct:[64,71,47],appropri:[27,71,28,7,1,77,75,59,3,20,34,6,95,41,42,12,13,14,16,47,62,18,87,64,49,21,68,91,36,73,23,96,56,74],macro:[21,84,52,47,20,18,57,44,64,75,10,14,45],markup:[21,25,75,89],spadini:27,getobjfilelow:62,asmnam:47,req_llvm_librari:52,roughli:[51,85,91,71,73,77],release_22:21,execut:[27,53,0,71,29,1,58,31,75,3,82,20,61,33,88,6,37,38,81,41,42,43,44,8,10,11,13,14,16,17,63,47,62,95,18,84,87,64,65,67,21,51,52,70,22,36,72,73,93,45,91,56],speccpu2000:29,mo1:47,mul_ri:68,mygcprint:62,subblock:94,aspect:[35,52,37,26,22,71,87,43,62,23,9,20,95,11,14,16,17],mul_rr:68,flavor:[20,68,14,87],"125000e":20,xxxtargetmachin:47,critial:77,param:[75,6,62,1,96,31,10,11,12,13,14,17],cumoduleunload:6,sparcregisterinfo:47,autoregen:[47,45],dclang_tablegen:7,mcregaliasiter:71,mov:[19,71,4,73,6],sk_specialsquar:85,va_start:20,libsfgcc1:7,mod:[27,68,47,36,20,64,14],cast_or_nul:14,llvm_tarball_nam:56,ifstream:6,qnan!
 :20,serve
 r:[22,14],bb0_4:6,bb0_5:6,either:[27,53,29,1,77,75,20,61,34,35,80,6,95,39,81,43,44,8,9,10,11,71,14,15,16,83,47,86,62,18,84,87,65,66,68,70,36,73,55,23,94,91,56],bb0_2:6,physreg:71,mappingnormalizationheap:57,fulfil:[3,85],exitcod:1,fastcal:71,ascend:20,adequ:[62,31,52,47],confirm:75,llvmscalaropt:45,recomput:[64,14,36],ffi_library_dir:52,inject:75,toolkit:[14,6],ret_val:[10,11,12,13,17],broken:[21,68,81,47,33,1,8,23,64],fpmath:20,cuinit:6,selectaddrrr:47,cornerston:86,x32:4,dw_ate_address:87,island:88,image_scn_align_4096byt:92,llvm_targets_to_build:[31,52],livecount:62,terminolog:[21,75],hashtbl:[10,11,12,13,16,17],strip:[21,27,74,18,84,87,8,56,14],"0x3fe9":87,ymax:[12,42],mingw32:[96,71],overwrit:[18,45],legalact:47,savethi:4,x86inst:68,addrequiredtransit:64,svn:[21,52,69,0,29,54,77,8,31,23,45,17],dw_ate_boolean:87,enough:[75,31,3,20,37,95,43,8,11,70,45,17,47,86,18,87,64,52,14,71,72,73,23,16,56,25],getmodrefinfo:36,buggi:[21,53],strawberri:21,possibl:[27,53,57,28,41,1,75,3!
 ,20,61,34
 ,35,71,6,95,39,81,7,43,44,8,9,10,11,13,14,15,16,85,86,62,18,87,64,21,68,52,69,70,36,72,73,55,23,94,56,25,89,74],optnum:18,poolalloc:36,unusu:[35,62,71,72,9,56,14],sanitize_address:20,embed:[27,52,62,20,22,88,42,43,87,23,94,11,12,14],i32mem:68,machinefunctioninfo:71,threadloc:94,subprogram:87,deep:[27,75,85,89],simpletyp:92,calledcount:70,file:[27,57,0,28,41,29,1,75,58,77,78,31,2,32,59,3,82,4,81,61,33,5,79,71,6,37,38,39,40,7,42,43,44,8,88,60,76,10,13,14,15,45,83,63,47,48,74,18,84,34,87,64,65,20,66,67,50,93,80,21,68,89,52,69,90,70,22,53,92,55,23,94,95,24,56,25,97,26],emitvalu:71,proport:[56,18],fill:[57,36,37,14,18,53,41,42,43,44,64,75,95,96,20,39,87],denot:[21,71,62,57,94,20],targetmanag:61,mangler:47,field:[68,35,94,80,47,36,62,26,1,87,57,75,9,20,95,59,86,93,14,16],loadobject:61,"0xc0de":94,riinst:68,architectur:[28,1,30,77,31,20,33,88,6,4,7,8,46,47,65,66,67,21,68,52,22,71,73],reextern:[37,41,42,43,44,10,11,12,13,17],resolut:[74,42],condens:20,sequenc:[27,71,0,75,4,36,20,41!
 ,42,12,13
 ,14,16,47,86,62,64,67,68,91,57,92,95,26],ilist_trait:14,arrayidx:20,unload:64,descript:[27,53,76,1,58,78,75,32,60,33,5,79,80,6,85,4,40,71,14,83,63,47,48,18,84,87,96,65,20,66,67,50,93,21,68,69,90,70,36,92,73,91,94,38,24,56,97,74],escap:[21,68,36,62,4,42,74,20,12,26,25],getreturntyp:14,unset:26,ac_config_fil:45,represent:[71,75,20,33,34,35,36,37,95,81,42,44,9,10,12,14,16,17,47,62,18,87,64,68,51,22,57,73,25],forget:[62,75,85],mrm3m:47,forbidden:[64,3,75],dollar:30,dw_form_ref2:87,sunk:36,llvmdummyasmprint:47,dw_form_ref1:87,regno:71,mrm3r:47,dw_form_ref8:87,children:[56,85],edg:[27,33,4,71,64,20,70],image_sym_class_clr_token:92,at_byte_s:87,insertion_block:[11,12,13],daniel:87,brtarget8:47,immt:68,image_scn_lnk_comdat:92,r14:[68,71],r15:[68,71],r12:[68,71],r13:[68,71],straightforward:[35,85,47,37,87,81,41,42,43,44,64,9,10,11,12,13,14,17],r11:[68,72],fals:[27,75,7,1,30,2,59,20,85,36,37,38,81,41,42,43,44,11,14,47,62,18,87,64,67,21,70,22,56,74],offlin:[71,6],util:[27,0,28,58,31,3!
 2,33,80,3
 6,14,47,48,62,18,63,93,67,21,68,52,57,23,24,56],fall:[27,75,47,62,14,18,41,42,43,44,20,10,11,12,13,4],type_code_integ:94,basereg:71,run_funct:[10,11,12,13],gcno:78,use_end:14,stderr:[27,37,95,41,42,43,44],quiet2:18,zero:[27,75,0,76,1,4,78,32,20,61,5,35,79,6,38,40,43,8,9,11,12,13,14,16,83,63,47,48,62,18,84,87,65,67,86,68,90,91,71,93,94,95,97],lawyer:23,val2:20,val1:20,val0:20,excit:[22,35,9,77],intptr:87,excis:20,abi:[27,35,88,80,47,21,91,87,6,7,30,44,54,9,10,71,20,81],worthwhil:14,abl:[53,0,20,35,80,36,4,81,7,42,43,44,9,10,11,12,71,14,47,86,62,18,87,64,21,68,51,70,57,73,23,24,89,74],desttool:56,abu:80,g0l6pw:21,hurdl:81,"public":[75,28,77,33,47,6,37,95,41,42,43,44,14,85,62,18,87,64,96,21,57,23,24],exit5:6,cumemcpydtoh:6,valc:6,variat:[47,36,0,71,3,89],vala:6,sophist:[62,29,71,64,89,20],analysisusag:[64,36],memory_order_acquir:[20,73],movsx16rm8w:71,dequ:14,valu:[27,57,0,71,29,1,75,92,31,2,32,59,82,4,81,5,35,79,80,6,37,38,39,40,41,42,43,44,8,9,76,10,11,12,13,14,15,16,17,83,4!
 7,48,62,8
 5,18,84,34,87,64,65,20,49,67,86,21,68,51,52,90,91,36,72,73,23,45,94,95,24,56,97,26],quieta:18,search:[21,27,47,0,62,4,18,1,87,43,70,59,51,33,20,56,24,11,14,22,45],unabbrevi:94,upcast:85,createfcmpon:[41,42,43],r12w:68,r12b:68,val_:13,r12d:68,codebas:[75,81],narrow:[21,34,75,86,36,38,53,73,70,14],iuml:71,quotient:20,primit:[68,35,86,62,20,18,42,73,75,9,94,12,14,87],transit:[71,44,64,24,10,20,59],establish:[47,62,71,44,23,10,20],memor:75,mylib:56,zeroiniti:20,liber:[23,75],mfloat:7,tackl:[10,13,41,81,44],two:[27,53,0,71,29,1,75,2,59,3,95,4,61,33,35,80,6,37,20,40,41,42,43,44,8,9,10,11,12,13,14,81,16,17,47,86,62,85,18,87,64,19,67,21,68,51,52,69,70,36,73,57,23,45,94,91,56,26],unwindless:27,saptr:20,desir:[61,27,68,35,47,62,14,18,1,87,70,64,75,19,20,59,9,77,4],penultim:47,mozilla:22,reconfigur:[24,56,96,47],particular:[27,53,71,29,1,75,20,61,85,6,95,41,44,8,10,13,14,16,47,86,62,18,87,64,21,68,70,22,36,73,94,91,24,26],ultrasparc:[21,47],dictat:[72,75,14],none:[71,1,77,59,3,20,80,1!
 0,11,12,1
 3,14,16,17,86,62,18,64,67,21,68,91,53,56],dep:[10,11,12,13],elsebb:[41,42,43],dev:[34,65,84,7,64,23,67,14],remain:[21,68,75,94,80,27,62,4,87,84,41,42,77,8,23,20,91,12,13,14],paragraph:[75,89],deb:7,binfmt_misc:21,def:[59,34,37,95,39,41,42,43,44,10,11,12,13,14,15,16,17,47,87,93,68,51,71,26],mergefunc:27,emiss:[47,62,71,41,13,20],sln:31,loopend:[13,41,42,43],mcobjectstream:71,minimum:[21,34,75,52,47,38,53,87,23,95,20,16],explor:[14,69],dw_ate_unsign:87,strlen:14,retcc_x86_32_ss:47,calltmp1:[37,11,43,17],calltmp2:[10,44],awkward:[18,75,86],secur:[27,18,22],programmat:[62,57,6],immutablemap:14,comfort:69,unittestnam:52,mapl:87,unswitch:27,csv:29,regener:[53,47,45,77],our:[71,0,75,35,6,37,95,39,41,42,43,44,9,10,11,12,13,14,15,16,17,18,87,64,21,52,53,54,23,74],"0x0000000000000002":82,add32mr:68,memory_order_seq_cst:[20,73],associ:[27,75,3,20,61,80,95,14,16,47,62,18,87,65,19,49,68,51,91,71,94,24],ccpassbyv:47,sse4:0,sse2:8,mislead:75,cs1:36,image_sym_class_end_of_funct:92,rotat:[2!
 7,34,71],
 intermediari:14,isconstantpoolindex:47,mydoctyp:57,through:[27,71,0,75,3,20,61,88,85,36,95,39,81,41,42,43,44,10,11,12,13,14,15,16,47,86,62,18,87,64,65,49,52,69,70,22,57,73,23,94,25,74],constants_block:94,suffer:[62,21],llvm_src_root:[56,29,45],patfrag:47,late:[71,20,47],pch:87,pend:[21,82,37,95,41,42,43,44,10,11,12,13,16,17],good:[27,71,28,29,30,77,75,3,34,88,6,37,38,81,41,42,43,44,10,11,12,13,14,47,18,87,64,21,68,70,22,36,23,25],pollut:[21,75],adventur:14,complain:[21,55,6],event:[52,14],mysteri:86,micro:75,token:[34,71,37,95,39,57,41,42,43,44,68,25,10,11,12,13,26,15,16,17],distdir:56,subsystem:[33,71,20],mm5:68,unequ:20,mm7:68,timelin:77,mm1:68,idea:[27,75,28,29,30,20,34,35,37,95,41,42,43,44,9,10,11,12,13,16,17,18,87,68,23,94],mm3:68,mm2:68,dstindex:47,connect:[96,27,51,14,69],orient:[14,75,35,9,85],sparcgenregisterinfo:47,usedlib:[56,45],dw_tag_xxx:87,isref:68,print:[27,57,71,29,1,4,31,75,32,20,5,79,80,36,37,38,81,41,42,43,44,76,10,11,12,13,14,16,17,83,63,47,48,62,18,84,!
 34,87,64,
 65,58,66,67,50,21,68,90,53,93,95,56,25,97],variable_nam:52,dagcombin:34,isinlin:87,cconv:20,mmx:[71,20,47],intregssubregclass:47,suspici:3,committ:23,cuctxdestroi:6,dw_tag_union_typ:87,omit:[27,5,71,79,76,84,43,64,65,95,32,11,50,93,20,16],buildmast:96,testfnptr:20,postdomtre:27,vmov:4,perman:[81,77],llvm_found:52,registerasmstream:71,printsth:27,exchang:14,argstart:18,done:[27,71,28,29,30,77,75,59,3,82,20,61,34,80,37,95,41,42,43,44,8,10,11,12,13,14,16,17,85,62,74,18,84,87,64,21,68,52,70,22,57,72,73,23,91,56,26],dylib:54,"0x00007ffff7ed40a9":82,stabl:[74,23,14,40],asmread:34,rootnum:62,functionindex:49,image_sym_type_uint:92,somewhatspecialsquar:85,least:[27,75,28,7,1,30,77,20,80,36,37,95,41,42,43,44,10,11,12,13,14,16,17,47,18,21,68,22,71,73,23,94],statement:[27,34,75,47,0,91,86,41,87,43,2,11,13,14],createpromotememorytoregisterpass:41,unalign:[22,73],cfe:[21,23,69,77],binop:[37,95,41,42,43,44,10,11,12,13,16,17],selector:[21,47,91,71,87,97,20],part:[27,75,1,31,20,35,85,36,37!
 ,38,39,41
 ,42,43,44,8,9,10,11,12,13,14,15,16,17,47,86,62,95,18,87,64,21,68,52,70,22,71,73,23,94,91,24,56,74],pars:[71,1,31,59,20,61,33,34,37,95,39,81,41,42,43,44,10,11,12,13,15,16,17,47,18,87,68,51,74,57,94,26],toolset:[22,52],contrari:71,cyclic:21,i32:[27,35,47,6,62,14,71,41,87,89,8,2,9,20,91,59,86,13,4,81],"_tag":[10,11,12,13,16,17],horizont:4,i8mem:71,fpinst:68,constval:14,xxxtargetlow:47,uncontroversi:62,char6:94,consol:[10,33,71,89,44],built:[27,71,41,29,77,31,2,20,35,85,37,95,39,81,7,42,43,44,8,9,10,11,12,13,14,15,16,17,83,47,48,62,18,96,86,21,52,91,22,57,73,55,45,94,24,56],build:[27,75,28,41,29,1,30,58,77,31,82,20,33,35,80,36,37,95,39,81,7,42,43,44,8,9,10,11,12,13,14,15,16,17,83,47,48,62,18,84,64,96,21,68,52,91,22,71,54,55,23,45,94,24,56,74],extractel:20,distribut:[21,68,75,6,38,29,1,7,77,8,31,23,33,56,82,64,81],previou:[27,71,28,77,75,20,34,80,6,37,4,81,41,42,43,8,11,12,13,14,16,17,47,64,21,22,57,72,73,94,95,24,89],chart:0,most:[27,53,28,41,29,1,30,77,31,75,32,85,3,4,61,33,34!
 ,35,71,6,
 37,20,81,7,42,43,82,8,9,11,12,13,14,16,17,83,63,47,86,62,18,84,87,64,49,21,68,89,52,69,91,36,73,54,23,45,95,24,56,25,97,26],cygwin:[21,31,71],charg:71,dereferenc:[27,14,20,86],"234000e":[37,17],resolvereloc:61,sector:3,runonmodul:64,gettypedescript:34,carefulli:[62,23,13,41,87],particularli:[75,47,4,63,73,64,20,14],fine:[75,52,39,22,86,41,15,31,3,13,14,18],find:[27,57,28,41,29,1,30,75,3,95,20,33,34,71,36,37,38,40,7,42,43,44,10,11,12,13,14,81,16,17,47,86,62,74,18,87,64,21,68,89,52,70,22,53,55,23,45,91,24,56,97,26],realmag:[12,42],fcpsgn:22,filesizepars:18,printmemoperand:47,"__nv_exp2f":6,hasctrldep:68,unus:[27,5,51,6,71,87,75,24,3,14],express:[27,71,75,20,5,35,36,37,4,39,81,41,42,43,44,9,10,11,12,13,14,15,16,17,47,86,62,18,34,87,21,68,51,91,57,95],cheaper:14,restart:[64,96,14],misnam:71,mycustomtyp:57,image_file_machine_arm:92,diloc:87,common:[27,57,71,31,75,3,20,61,33,34,35,80,6,85,95,81,41,42,43,44,9,10,11,12,13,14,16,47,86,62,18,87,64,93,21,68,51,91,36,73,23,45,94,24,56,!
 89],intpt
 rsiz:62,"__nv_isnanf":6,printout:[84,14],decompos:[34,23],atomtyp:87,reserv:[71,20,94,47,77],mrm1m:47,ccdelegateto:47,someth:[27,71,31,75,59,3,20,34,35,85,36,37,4,41,42,43,44,9,10,11,12,13,14,16,17,47,18,93,21,53,23,95,89,26],someti:20,debat:75,smallest:[53,20],subscript:[27,20,87,36],experi:[89,52,87,30,10,56,44],altern:[71,52,47,86,20,18,57,41,92,70,8,55,31,74,95,91,13,14,29,16,81],dw_at_apple_property_gett:87,bourn:[21,18,81],appreci:23,complement:[20,14,86],unrol:[27,20,0],popul:[91,21,34,1,6],alon:[62,95,18,71,8,23,16,56,45],foreign:[81,52],densemapinfo:14,cpufreq:30,corei7:[8,0],simpli:[27,75,29,3,20,80,36,37,4,81,7,44,8,10,14,45,17,47,86,18,84,87,64,21,70,71,23,16,95,56,25],fldcww:71,point:[57,0,28,41,77,75,85,3,20,61,34,71,6,37,95,39,7,42,43,44,10,11,12,13,14,15,16,17,47,86,62,18,87,64,65,19,67,21,68,51,52,70,22,36,73,55,94,91,96,56,74],instanti:[61,68,57,85,47,18,1,64,14],alloca:[27,86,62,20,71,41,87,72,13,14],classof:85,shutdown:14,suppli:[21,35,57,20,87,53,30,77,!
 64,74,9,9
 4,91,25,14],setinternallinkag:14,throughout:[61,21,94,56,3,20],backend:[71,29,20,14,33,34,38,81,70,46,83,47,86,62,67,21,68,91,22,53,73,97],global_begin:[75,14],dovetail:[13,41],aarch64:[22,88],linkonce_odr:[20,94,6],reformat:25,multiclassobject:26,image_sym_class_extern:92,lto_codegen_add_must_preserve_symbol:74,unnecessarili:[64,36],gap:20,feat_jit:71,understand:[27,71,1,31,75,3,20,34,35,36,39,81,41,8,9,13,15,86,62,64,69,91,57,23,94,24,56,25,89,26],repetit:71,p20:6,isstoretostackslot:47,raw:[61,5,71,79,90,76,18,84,49,25,29],unifi:[14,35,9,94,27],fun:[35,39,19,9,56,10,11,12,13,15,17],anonym:[27,68,75,47,37,95,87,41,42,43,44,64,31,23,10,11,12,13,26,16,17],everyon:[75,23,9,35],subsect:[89,14],propag:[27,51,21,20,18,71,91,3,14],lto_codegen_add_modul:74,mystic:[35,9],semispac:62,itself:[57,28,41,1,78,75,20,34,35,71,36,37,38,81,7,42,43,44,8,9,10,11,12,13,14,16,17,85,48,62,95,18,87,64,86,21,52,74,53,23,94,91,24,56,26],codegen_func:[10,11,12,13,17],ualpha:26,case_branch_weight:2,m!
 yseqel:57
 ,incarn:34,benign:29,nameflag:87,sym:[28,93],keyt:14,moment:[62,20,73,17],aliassettrack:36,travers:[27,71,85,62,1,64,24,14],task:[34,62,91,77,3,14],n_bucket:87,epilogu:[62,22,20,47],parenthes:[75,95,1,8,20,16],uint32_t:[57,87],spend:1,instr_begin:13,ldc:22,obscur:14,ipconstprop:27,ldr:25,shape:[20,14,87,85,77],at_decl_lin:87,depriv:14,stwu:71,cut:[18,47],shiftinst:75,snan:20,singlesourc:[8,29],"0b000000":47,restructuredtext:[21,89],objectbodi:26,win:[75,14,36],rgm:64,bin:[21,28,38,18,7,8,55,31,45],"0x00001023":87,big:[68,75,47,28,20,71,41,30,42,8,37,23,67,12,13,14,17],judgement:23,fucomip:71,phinod:[75,41,42,43],ccassigntoregwithshadow:47,knock:75,semi:[24,62,35,9],constmerg:27,has_jit:24,aliasset:[47,36],often:[27,53,57,71,75,20,33,34,35,85,6,4,81,41,44,8,9,10,13,14,16,47,86,62,18,63,87,68,52,70,36,23,95,56],steensgaard:36,weakodrlinkag:14,dllimport:[20,94],back:[57,7,77,75,20,33,80,6,37,81,41,42,43,44,8,10,11,13,70,86,87,21,52,14,71,72,54,23,91],bach:3,"0x00002000":87,mir!
 ror:[21,6
 2,42,43,11,12],densemap:14,sizeof:[35,6,20,81,9,14],sparcreg:47,scale:[62,71,75,85,86],arcmt:30,per:[27,71,29,1,32,20,80,6,44,10,14,85,62,18,87,64,93,52,74,22,57,73,94,91,24,56,26],bruce:14,substitut:[27,68,71,62,1,73,8,4],mathemat:[95,81,20,16,6],larg:[27,75,29,77,31,32,59,20,6,38,44,8,10,70,45,47,18,87,67,21,68,14,22,71,23,94,56],chandlerc:69,reproduc:[53,41,8,23,13,70],createentryblockalloca:41,bb0_1:6,intial:14,patient:64,c0c0c0:71,initialse:60,addpdrr:68,adc64rr:68,adc64rm:68,addpdrm:68,float_of_str:[10,11,12,13,15,16,17],deadtypeelim:[27,14],bugpoint:[27,5,21,38,53,58,64,31,23,33,70],impos:[20,71,14],constraint:[27,34,71,47,20,84,68,64,14],createfadd:[37,41,42,43,44],litconfig:1,forexprast:[41,42,43],disclosur:23,timberwolfmc:29,ostream:[75,14],nsz:20,frames:62,nsw:[20,86],inclus:[68,47,56,3,97,20,45],errno:[20,36],megabyt:[21,38],x86_fastcallcc:94,subst:[68,26],includ:[27,71,41,29,1,75,77,31,2,32,59,3,95,4,61,33,34,35,88,80,6,37,38,39,81,7,42,43,44,8,9,10,11,12,13,14!
 ,15,16,83
 ,47,85,62,74,18,84,87,64,20,86,21,68,52,69,90,70,22,36,73,55,23,45,91,24,56,25,97,26],cptmp0:47,cptmp1:47,forward:[27,34,75,94,36,37,14,39,71,68,43,87,91,95,20,49,3,26,15,16,17],image_scn_align_1byt:92,tinyptrvector:14,reorgan:57,dwarfdump:87,int8_t:57,translat:[27,35,79,97,47,21,20,18,36,73,57,87,75,9,86,71,14,22,81],llvmfoldingbuild:10,codeblock:[62,21],concaten:[21,68,26,8,20,14],internaltarget:56,exported_symbol_fil:56,movsx16rr8w:71,dw_tag_const:87,movnt:20,v8i16:47,curr:15,xxxiter:14,utilis:22,debug_nam:87,codgen:17,isdigit:[37,95,39,41,42,43,44],prevail:80,singli:62,cmake:[21,52,48,33,7,64,96,31,24,89],crypt:23,sequenti:[4,71,91,94,20,14],declas:20,dw_at_apple_property_retain:87,llvm_target_arch:52,vg_leak:1,asymmetr:86,llvm:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,!
 87,89,90,
 91,93,94,95,96,97],mismatch:[37,81,41,42,43,44,10,11,12,13,20,25,17],globalvar:94,tok_numb:[37,95,39,41,42,43,44],libtool:[21,81,56],extrahelp:18,tok_extern:[37,95,39,41,42,43,44],image_sym_type_float:92,downcast:85,i16:[71,20,47,6],tradeoff:[10,62,73,44],required_librari:24,type_code_float:94,dwarfregnum:47,"0fb5bfbe8e":6,addescapingus:36,queri:[27,35,47,36,18,71,73,87,64,75,9,49,59,14,22],strex:73,regallocregistri:64,demangl:[66,93,87],pred_begin:14,privat:[75,85,47,6,14,87,96,94,24,20],sensit:[64,57,40,52,36],elsewher:[56,47],createtargetasminfo:47,granular:3,cumoduleloaddata:6,noop:20,"6666ff":71,priority_queu:14,immsubreg:47,vla:86,named_valu:[10,11,12,13,17],cudeviceptr:6,volum:[33,14,87,56],implicitli:[71,75,20,35,37,95,39,42,43,44,9,10,11,12,13,14,15,16,17,18,64,68,57,23,94,56],postord:51,ddd:80,pbqp:[71,65],"0x8":87,fortun:[35,41,43,44,9,10,11,13,14],veli:71,dw_virtuality__virtu:87,"0x3":14,segmentreg:71,"0x1":[14,87],"0x0":[14,94],toplevelexpr:[37,95,41,42,43,44,1!
 0,11,12,1
 3,16,17],"0x4":87,leakag:22,accomod:6,append:[68,52,80,20,79,87,8,94,38,11,14,45],"0x1f84":66,resembl:86,unwound:20,access:[27,57,0,71,31,75,20,61,34,35,80,6,86,41,8,9,13,14,47,48,62,18,87,64,93,21,68,22,36,73,23,96],agg1:20,agg3:20,agg2:20,deduc:[27,68,26],camlp4:[15,16],sint:20,"0xk":20,objects:20,partialalia:36,"0xm":20,"0xl":20,"0xc":94,getsourc:21,sine:[20,47],implicit:[68,75,47,20,71,43,11,14],"0xe":94,"0xd":94,remark:70,myhead:87,fpregsregclass:47,cerr:6,implement:[27,57,28,71,1,75,85,3,82,20,61,33,34,35,80,6,37,95,39,86,41,42,43,44,9,10,11,12,13,14,15,16,17,46,47,48,62,18,87,64,65,21,51,74,22,36,72,73,55,23,91,24,56,25,26],foundat:64,domtre:27,standpoint:14,toshio:71,seamless:55,websit:[22,53,77],projlibspath:56,select_isd_stor:47,insertvalu:20,int32ti:14,trait:[57,14],image_scn_align_512byt:92,trail:[57,86,14,18,1,87,20],account:[21,85,69,62,23,96],scalabl:36,alia:[27,51,47,36,33,18,0,73,64,93,94,86,71,20],rdynam:[12,13,42,44],obvious:[27,34,71,86,36,28,20,18,39,75!
 ,68,64,23
 ,95,14,15,16],unread:[75,73],fetch:[21,22,2,20,71],aliv:[64,27,71,14],abcd:94,sought:20,spruce:87,msvc:[71,14],formmask:47,serial:[56,34,57,45],everywher:[8,10,57,44],gcc:[27,71,0,41,29,77,75,20,33,35,88,38,81,7,9,13,14,47,86,18,84,87,65,21,91,22,53,73,55,23,56],rootcount:62,optyp:47,add32rm:68,inteldialect:20,llvm_lit_tools_dir:[31,52],usub:20,smovq:71,add64mr:68,powerpc64:88,getehframesect:61,inst:[27,68,14,47],getsigjmp_buftyp:75,llvm_include_dir:52,redund:[27,51,18,71,44,10,14],philosophi:[33,70,87,77,24,74],physic:[68,71,14,47],bind:[68,75,47,37,20,22,57,41,42,43,44,95,10,11,12,13,26,81,16,17],llvm_library_dir:52,correspond:[27,57,31,75,59,20,34,85,6,37,4,40,43,8,11,71,14,81,16,17,83,47,86,62,95,18,87,64,65,19,66,21,68,51,52,70,53,73,23,94,91,26],afterloop:[41,42,43,11,12,13],noitin:67,fallback:94,loopendbb:[41,42,43],c11b17:71,ptr_rc:71,symbolt:14,cpu_x86_64:57,cflag:[56,45],bunch:[39,29,81,42,44,10,12,14,15],acycl:[71,51,47,97],outputdebuginfo:18,labor:18,i1942652:20!
 ,typemap:
 34,immtyp:68,dag:[26,68,51,47,4,71,73,97,14],uncategor:18,passnam:84,dbgopt:87,spell:75,dai:[33,35,52,77,23,9,14],mention:[33,68,75,85,20,18,71,72,87,94,24,14],symbol1:19,nval:20,mylist:57,isimplicitdef:68,strive:[8,75],createfcmpult:[37,41,42,43,44],parseexpress:[37,95,41,42,43,44],mem2reg:[62,27,13,14,41],destarchivelib:56,dllvm_libdir_suffix:52,machinebasicblock:[71,14,47],add16ri8:68,lie:18,postdomfronti:27,intellig:[20,14],cmake_module_path:52,addtypenam:14,llvmbug:33,llvmsupport:[56,45],fluctuat:36,paramattr:94,twice:[21,28,20,44,64,31,10,56,14],createmyregisteralloc:64,rev:[10,11,12,13,16,17],ret:[27,68,81,86,6,37,20,71,41,87,43,44,8,62,72,10,11,13,4,89,17],stub:[88,71,14,47],typenam:[34,14],rel:[75,28,29,1,77,32,20,33,4,81,43,11,14,45,62,18,19,71,72,73,94,25],rem:71,rec:[10,11,12,13,15,16,17],barrier0:6,ref:[21,68,27,6,37,95,36,41,42,43,44,64,10,11,12,13,16,17],defens:23,math:[75,6,22,0,39,42,15,65,67,12,20,18,87],clarifi:[73,87],insid:[27,75,28,29,1,20,33,7,82,8,71!
 ,14,45,85
 ,48,62,87,64,21,68,57,94,26],qux:20,attrbuild:49,standalon:[24,71],invas:[23,57],bleed:33,indent:[57,75,89],re2:22,image_file_machine_armv7:92,retain:[51,14,18,81,87,64,23,56,20],ud2:71,suffix:[64,34,75,52,80,47,37,20,18,1,8,79,65,76,56,14,17],targetregsterinfo:71,pgr:33,secondlastinst:47,facil:[75,36,62,18,1,87,31,56,3,81,45],misoptim:2,target_data:[10,11,12,13],messag:[27,53,52,80,90,21,33,18,1,75,70,57,64,23,91,4,29],llvmusedlib:56,comparefp:68,debuginfo:[8,27,87],ogt:20,mytool:56,s32:6,"__objc_imageinfo":20,nontempor:20,image_file_aggressive_ws_trim:92,source_i386:66,prune:27,structur:[27,71,0,29,58,31,75,20,61,35,80,36,37,4,39,40,41,42,43,44,8,9,10,11,12,13,14,15,16,17,47,48,62,95,18,87,64,49,86,68,51,70,22,57,73,94,91,24,56,89,74],charact:[1,20,80,37,4,39,41,42,43,44,8,10,11,12,13,14,15,16,17,18,87,93,68,71,94,95,56,25,26],"123mb":18,then_val:[11,12,13],plaintext:21,deprec:[8,29,14,87,47],ispack:94,have:[27,53,57,28,41,29,1,30,77,31,75,32,59,3,95,4,81,61,33,34,35,71,6!
 ,37,20,39
 ,40,7,42,43,44,8,9,10,11,12,13,14,15,16,17,47,86,62,85,18,84,87,64,96,93,19,49,80,21,68,52,69,70,22,36,72,73,55,23,45,94,91,24,56,25,89,26],tidi:64,min:[28,20],mid:20,in64bitmod:71,sspreq:[20,94],mix:[86,0,4,71,55,74,24,14],builtin:[21,6,18,1,41,42,48,73,64,94,12,13,20,22,16],startval:[41,42,43],p3i8:6,mit:23,analysi:[27,0,29,32,59,20,33,34,36,37,81,41,42,43,44,10,13,86,62,84,87,64,21,51,52,74,71,73,26],poison_yet_again:20,unless:[27,75,29,20,5,4,81,41,43,8,11,13,14,47,86,18,64,65,21,90,70,23,91,56,89],preliminari:[27,47],setpreservescfg:64,eight:[71,20,80],llvm_shutdown_obj:14,transcript:[10,44],memorydependenceanalysi:36,returnaddress:20,gather:[0,91,18,8,23,24,14,45],request:[61,68,80,69,62,74,23,94,91,20],htpasswd:23,getdirectori:87,institer:14,occasion:[62,94],addpassestoemitmc:61,addtmp:[37,41,42,43,44,10,11,12,13,17],dllexport:[20,94],ifconvers:47,text:[75,29,4,34,35,80,39,8,9,15,47,18,93,19,68,52,69,22,71,92,23,56,25,89,26],ifconvert:47,sanitize_thread:20,setter:[14!
 ,87],dw_t
 ag_pointer_typ:87,textual:[68,51,71,44,8,65,10,25,81],loweroper:47,categor:[27,18,47],src_root:21,"__morestack":72,cpunam:[67,65],inferior:82,data64bitsdirect:47,print_newlin:[10,11,12,13],lower_bound:14,litvalu:94,sysv:93,disagre:20,bear:4,is_base_of:85,image_sym_class_member_of_struct:92,increas:[27,75,0,37,53,23,67,74,17],gcwrite:[62,20],at_end:[10,11,12,13,17],callpcrel32:68,integr:[27,81,52,46,62,74,18,1,48,64,58,24,20,22],printlabel:47,conform:[21,57,62,20,22,1,14,81],project_nam:45,emitfnstart:71,dw_tag_file_typ:87,reform:75,pattern:[34,71,47,6,37,4,18,39,68,58,73,8,75,20,56,86,14,15,16,87],boundari:[27,71,20,87,94],"__builtin_msa":22,callgraphsccpass:64,progress:[51,52,39,1,77,23,88,71,14,15],"0b100":68,"0b101":68,switchtosect:71,nvptx64:6,phase3:28,plugin:[33,62,38,22,84,55,67],equal:[27,68,81,85,47,36,20,18,71,41,42,43,2,94,95,11,12,13,14,16],instanc:[75,28,1,77,4,61,33,35,85,37,95,8,9,71,14,16,17,47,62,18,87,64,68,52,57],valuelistn:26,comment:[27,71,75,20,35,37,4!
 ,39,41,42
 ,43,44,8,9,10,11,12,13,14,15,16,17,85,48,62,68,69,22,57,23,95,24,56,26],guidelin:[14,75,7,89],functionnam:[62,20],setmcjitmemorymanag:61,v2i32:20,defini:59,addresssanit:20,autovector:0,component_1:24,component_0:24,assert:[64,27,53,52,47,21,28,18,6,41,30,42,54,75,77,56,57,71,14,81],determinist:[70,71,14,36],multi:[50,33,18,74,22],plain:[62,64,89,14],defin:[27,53,57,41,29,1,77,75,32,59,3,4,33,34,35,71,6,37,38,39,81,7,42,43,44,8,9,10,11,12,13,14,15,16,17,46,47,48,62,95,18,87,64,93,19,20,86,80,21,68,52,74,36,73,54,23,45,94,91,24,56,89,26],deem:[34,53,20,77],operandtyp:47,noimplicitfloat:[20,94],helper:[61,75,47,36,37,95,18,1,41,42,43,44,8,12,13,14,15,16,17],almost:[21,34,51,62,22,71,75,3,14],irreduc:27,maystor:68,isreturn:68,build_alloca:13,substanti:[75,36,22,44,10,20],fiddl:[14,89,7],unneed:[13,41],llvm_enable_zlib:52,japanes:21,codepath:73,infer:[71,85,48,57,75,65,67,56],backtrac:71,cmakecach:52,valueopt:18,dealloc:[62,14],default_branch_weight:2,sm_30:71,image_scn_align_32!
 byt:92,sm
 _35:71,mcsection:71,center:71,neural:29,nevertheless:20,getopcod:[14,47],builder:[21,33,37,95,22,41,42,43,44,96,49,10,11,12,13,16,17],dfpregsregisterclass:47,setp:6,choos:[71,59,20,37,38,39,43,44,10,11,14,15,45,17,47,18,87,64,67,52,53,23,16,95,96,56],setvector:14,usual:[75,29,32,20,34,35,85,36,4,8,9,14,47,86,62,18,84,87,64,21,68,52,70,71,72,73,55,23,94,56,89,74],unari:[35,39,41,42,9,12,13,26,15],tarjan:64,getgloballist:14,numberexprast:[37,95,41,42,43,44],memmov:20,settabl:56,p19:6,tough:[95,16],cortex:[7,30,49],gendfapacket:71,adt:[21,14,52],tight:74,add_cfg_simplif:[10,11,12,13],uwtabl:[20,87],add:[27,53,57,28,41,29,1,75,95,59,3,82,4,33,34,35,71,6,37,38,39,81,7,42,43,44,8,9,10,11,12,13,14,15,16,17,47,86,62,85,18,84,87,64,20,49,80,21,68,52,69,70,22,36,73,54,23,45,94,91,96,56,26],cleanup:[27,91,87,43,44,23,10,11,20],adc:[27,51,14,36],citizen:14,dced:14,match:[27,71,29,1,4,75,20,5,85,37,38,39,40,44,8,10,11,12,13,14,15,16,17,47,86,62,18,34,87,64,58,21,68,70,57,73,45,94,91,24,!
 56,74],ap
 ple_typ:87,hypersparc:47,llvm_yaml_is_document_list_vector:57,image_file_net_run_from_swap:92,punctuat:[75,26],realiz:[10,12,44,34,42],llvalu:[10,11,12,13,17],insert:[27,75,3,20,80,36,37,41,42,43,44,10,11,12,13,70,17,47,62,18,87,64,65,67,14,71,73],like:[27,57,28,41,29,75,30,31,2,85,3,4,81,61,34,35,71,6,37,20,39,40,7,42,43,44,8,9,10,11,12,13,14,15,16,17,47,86,62,74,18,87,64,93,80,21,68,52,69,70,22,36,72,73,54,23,45,94,95,24,56,25,89,26],studi:45,sstream:75,registeranalysisgroup:[64,36],inferenc:71,c1x:[20,73],soft:[3,87,67],crawler:62,unreach:[27,5,62,81,41,42,43,44,10,11,12,13,20],convei:[91,20],registermcobjectstream:71,proper:[75,85,47,14,1,73,20],getparamtyp:14,release_1:21,tmp:[86,62,20,71,41,87,44,8,66,10,13,4,45,14],nvcc:71,add_instruction_combin:[10,11,12,13],llvmrock:75,webcl:22,esp:[68,71,4],"0th":86,nvcl:6,"__internal_accurate_powf":6,dw_tag_structure_typ:87,prose:75,image_scn_lnk_nreloc_ovfl:92,dce:[38,18,34,27],noisi:[27,23,14],host:[61,21,75,52,6,62,20,22,71,7,!
 30,8,56,1
 4,81],although:[64,21,34,71,52,85,48,62,18,1,42,73,8,31,75,94,24,56,89,14,17],isfloatingpointti:14,simpler:[27,34,71,41,42,87,12,13,20],about:[27,53,0,28,41,29,1,30,77,31,75,32,59,3,82,4,61,33,34,35,71,6,37,20,39,81,7,42,43,44,9,10,11,12,13,14,15,16,17,47,86,62,85,18,63,87,64,65,50,93,80,21,68,52,69,90,74,22,36,73,54,23,95,94,91,96,56,25,89,26],actual:[27,71,28,29,1,75,85,3,4,61,35,80,36,37,20,39,81,41,42,43,44,8,9,10,11,12,13,14,15,16,17,47,86,95,18,87,64,96,21,68,70,57,23,45,94,91,24,56],endcod:75,madechang:62,discard:[21,18,71,19,20],addendum:33,upward:1,guard:[20,75,14,56],been:[27,75,28,1,77,32,3,82,4,61,34,35,80,6,37,38,81,42,43,44,9,10,11,12,14,16,17,47,86,62,95,18,84,87,64,20,21,68,70,22,71,73,23,45,91,56,89,26],ifexpr:[41,42,43,11,12,13],leverag:22,rcx:68,eh_fram:91,naveen:27,rcn:28,getelementptrinst:14,biggest:71,log10:[20,0],functionlisttyp:14,unexpect:[75,29,41,31,23,13,20],f4rc:71,bur:51,brand:64,machinefunctionpass:[64,47],bui:30,uninstal:[56,52],oauth:69,inli!
 n:[27,75,
 20,35,6,39,81,43,44,9,10,11,71,14,18,84,87,64,66,21,69,91,22,57,23],bug:[71,28,41,29,4,77,31,75,20,33,5,35,37,38,40,7,8,9,13,14,81,17,85,93,21,68,70,22,53,23,26],wise:20,mcpu:[47,6,7,8,65,67],refin:[71,36],wish:[21,34,53,52,47,86,18,1,68,77,56,14],srcarglist:20,rc1:[28,77],rc2:[28,77],emitjumptableinfo:47,pin:20,hashfunctiontyp:87,dure:[62,21,34,47,0,28,33,18,71,87,77,8,37,74,20,91,59,14,29,17],pic:[75,47,53,7,67,71],int64_t:[57,14],probabl:[21,35,86,20,18,56,75,30,43,8,23,9,45,32,11,95,71,14,81,16],llvm_append_vc_rev:52,oak:87,detail:[57,0,71,77,31,75,32,3,20,33,35,80,36,37,39,81,41,42,8,9,12,13,14,15,45,17,47,86,18,87,64,96,21,68,51,52,70,22,53,72,73,23,91,24,56,25,74],virtual:[27,75,1,3,4,47,36,37,95,81,41,42,43,44,13,14,17,83,85,62,87,64,49,71],out:[27,57,28,41,29,1,30,77,31,75,32,59,3,20,34,35,71,36,37,95,39,81,7,42,43,44,8,9,10,11,12,13,14,15,16,17,47,48,62,18,63,87,64,66,67,86,80,21,68,52,70,22,53,73,55,23,94,91,56],apple_objc:87,zeroormor:18,winzip:31,al_aliasset:47!
 ,frontier
 :[27,13,41],afterbb:[41,42,43],binoprh:[37,95,41,42,43,44,10,11,12,13,16,17],predsens:59,unshadow:[41,42,43,11,12,13],vliw:[71,97],twoaddressinstructionpass:71,eliminateframeindex:47,poorli:75,getreginfo:71,undef:[14,81,4,73,20],isvi:47,spec:[57,14,29,53,87,77,8,20,26],add_incom:[11,12],concret:[27,68,85,47,18,71,44,64,94,10,77,14],under:[75,1,20,35,6,38,81,8,9,16,46,47,18,64,24,21,71,55,23,95,96,56],runhelp:75,playground:[39,15],everi:[27,71,28,29,1,75,30,77,2,3,20,33,35,6,95,81,41,43,44,8,9,10,11,13,14,85,62,18,84,87,64,21,68,51,70,36,72,73,23,94,24,56],risk:77,f934:47,rise:75,risc:[73,47],upstream:21,printfunctionpass:27,llvm_yaml_strong_typedef:57,mygc:62,isv9:47,isdefinit:87,x86_64:[21,71,28,20,22,57,7,30,8,66,4],zlib:[21,52],dw_form_ref4:87,xxxinstrinfo:[59,47],naiv:27,direct:[57,28,1,4,77,75,3,20,38,41,13,14,47,18,87,64,19,68,51,71,56,97],nail:[11,43],xor32rr:71,llvmtransformutil:45,blockinfo:94,profileinfo:27,blue:87,hide:[18,75],introspect:[25,74,49],foundfoo:75,po!
 ison:20,h
 i16:71,conduct:23,postdomin:27,functiontyp:[37,41,42,43,44,14],studio:[21,75,52,33,22,31],debugg:[61,27,35,33,64,70,71,87,43,82,8,75,9,21,11,93,20],path:[27,75,7,29,1,31,80,6,38,81,41,8,13,14,45,83,48,62,64,65,67,21,52,91,36,73,55,56,97],dlopen:[64,56],forum:[33,20],typebuild:14,mypassopt:64,anymor:[64,27,22,14],pointcount:62,precis:[27,85,47,36,37,95,39,71,73,87,65,67,20,15,16,17],portabl:[33,35,62,20,22,1,75,9,56,3,71,14,81],nontempl:18,printd:[35,41,42,9,12,13],strai:8,printf:[21,70,81,41,42,87,55,31,74,12,13,20],ymin:[12,42],smallsetvector:14,describ:[27,71,29,1,58,77,75,59,20,61,33,34,35,80,6,37,95,39,86,42,43,44,9,10,11,12,14,15,16,17,47,48,62,85,18,87,64,65,19,21,68,91,22,53,23,45,94,24,56,74],would:[27,57,0,77,31,75,32,3,4,35,36,37,20,81,42,43,44,8,9,10,11,12,71,14,16,17,85,86,62,18,87,64,96,65,21,68,51,53,73,55,23,45,94,95,24,56,89,26],gcstrategi:62,asset:22,addincom:[41,42,43],include_directori:52,must:[27,53,57,41,29,1,77,75,85,3,4,61,34,71,6,37,20,81,7,42,43,8,1!
 1,12,13,1
 4,45,17,47,86,62,18,87,64,19,80,21,68,51,52,74,22,36,73,23,94,91,24,56,89,26],shoot:[10,44],join:[64,20,14,67],getnumoperand:14,image_file_machine_mipsfpu:92,runfunct:[14,82],introduc:[27,68,85,47,36,20,71,41,42,43,73,77,11,12,13,4],overrid:[76,21,68,85,47,36,26,18,71,64,65,20,67,27,56,14],"__data":20,virtreg2indexfunctor:71,selp:6,inadvis:86,registerehfram:61,dw_tag_label:87,attract:[62,23],makellvm:21,enc:87,end:[27,53,0,28,41,29,77,75,85,3,95,4,81,33,35,79,71,6,37,20,39,40,7,42,43,44,8,9,10,11,12,13,14,15,16,17,47,86,62,74,18,84,87,64,65,19,80,21,68,52,70,36,57,23,45,94,91,56,89,26],r10:[68,71,72,6],pipefail:[22,1],concis:[18,71,75,86],hasnam:14,env:28,frameless:71,ancestor:[20,85],collaps:20,dialect:[25,20],mess:[21,73,27],befor:[27,53,0,28,41,29,77,31,75,85,4,61,34,35,71,6,37,20,39,81,7,42,43,44,8,9,10,11,12,13,14,15,16,17,47,86,62,95,18,84,87,64,67,80,21,68,52,70,36,73,57,23,91,56],getreservedreg:47,const_iter:14,parallel:[21,51,52,0,22,1,54,96,56,71,20,45],bootstrap:!
 21,r_arm_
 thm_movw_abs_nc:7,parserclass:18,includedir:[56,83],environ:[64,21,71,52,27,62,20,18,1,73,54,55,56,3,14,22,81],reloc:[61,71,47,53,7,75,19,67,50],enter:[21,71,69,70,1,87,44,95,94,91,10,14,16],exclus:[18,20,73],composit:[14,87],over:[27,75,20,35,36,37,39,81,41,42,43,9,11,12,13,70,15,17,85,86,62,74,68,51,69,14,71,94,26],commasepar:18,imul:71,blatent:[13,41],optional_dir:[56,45],str_offset:87,rfunc:5,parseparenexpr:[37,95,41,42,43,44],align32bit:94,imm:[25,71,68,47],image_sym_type_dword:92,tramp:20,replaceinstwithinst:14,getorinsertfunct:14,llvmbitread:45,comprehens:[8,21,22,27],settruncstoreact:47,cfgsimplifi:14,getlazyresolverfunct:47,echo:[21,89,56],const_global_iter:14,"0x60500020":92,exampletest:1,modrefresult:36,each:[27,53,57,28,71,29,1,77,75,59,3,95,4,61,33,34,85,80,6,37,20,39,81,41,42,43,44,8,10,11,12,13,14,15,16,17,83,63,47,86,62,74,18,84,87,64,65,49,67,50,93,21,68,52,90,70,36,73,54,23,45,94,91,24,56,26],use_begin:[75,14],sk_lastsquar:85,prohibit:[74,73],abbrevwidth:9!
 4,gprc:71
 ,ptrtoreplacedint:14,tag_pointer_typ:87,goe:[57,52,71,47,6,62,14,53,41,73,87,91,56,25,13,20,81],newli:[27,37,42,43,44,55,10,11,12,14,17],laid:[10,20,71,14,44],adjust:[75,47,81,41,13,20,45],rs2:47,got:[71,18,53,44,10,14,22],unimagin:27,frem:20,debug_pubnam:87,precaut:14,threadidx:6,free:[64,35,88,36,37,22,39,75,73,44,8,62,51,9,77,10,56,71,14,15,17],getfilenam:87,rangelist:26,galina:96,precompil:6,distract:23,puzzl:53,r9d:68,r9b:68,filter:[8,59,20,91],addrspac:[20,6],rais:[27,62,20,70,91,10,11,12,13,14,15,16,17],runtimedyldimpl:61,r9w:68,differnt:57,onto:[21,62,71,87,77,23,20],rang:[75,20,33,36,39,42,44,10,12,70,15,85,86,62,18,87,64,65,68,14,22,71,91],neededsafepoint:62,xnorrr:47,wordsiz:62,rank:27,restrict:[34,81,86,0,62,26,18,71,73,87,64,23,19,20,91,14],datastructur:14,alreadi:[57,71,75,20,34,85,36,37,39,81,41,42,43,44,8,10,11,12,13,14,15,45,17,47,62,18,87,64,19,21,52,22,53,72,23,89],hackabl:[39,15],createcfgsimplificationpass:[41,42,43,44],consecut:[0,4,87,64,20,26],primar!
 i:[33,36,
 37,20,39,71,41,42,43,44,62,95,10,11,12,13,14,15,16,17],llvmsrc:45,rewritten:71,exp2:[20,0],top:[27,71,29,1,75,20,35,36,37,4,81,41,42,43,44,8,9,10,11,12,13,14,16,17,86,48,18,87,64,67,21,52,91,57,55,23,45,94,95,24,56,26],seq_cst:[20,73],downsid:14,toi:[35,37,95,39,41,42,43,44,9,10,11,12,13,15,16,17],ton:[39,15],too:[57,30,31,75,3,20,35,95,41,8,9,13,70,16,18,64,21,68,52,14,71,55,56],tom:57,toc:71,initialize_native_target:[10,11,12,13],createalloca:41,tool:[27,53,28,1,58,78,31,75,32,3,82,4,81,33,5,6,37,38,39,40,43,44,8,60,10,11,71,14,15,45,17,83,47,48,62,18,63,87,64,19,20,50,21,68,51,52,69,70,22,36,54,55,23,94,24,56,74],usesmetadata:62,took:[37,41,42,43,44,10,11,12,13,17],targetgroup:24,localtarget:56,conserv:[75,36,62,20,73,77,64,74],dw_at_apple_property_nonatom:87,expr:[5,97,95,41,42,43,10,11,12,13,16,17],globalalia:64,fashion:[21,34,20,47],ran:64,ram:96,dw_tag_string_typ:87,lbd:46,further:[21,75,52,94,47,86,62,4,87,31,23,20,91,56,14,45],rax:[68,47],adc32mi:68,unresolv:[56,1,!
 9,35],tho
 rough:75,sk_somewhatspecialsquar:85,xfail:[8,29,1],contact:[64,96,22,23,45],thoroughli:[11,43],adc32mr:68,atom_count0:87,though:[27,75,29,20,34,37,95,41,43,8,10,13,14,16,17,85,86,62,18,87,64,91,71,73,74],visitfab:34,glob:5,"__apple_typ":87,bss:67,sethi:47,bsd:[56,93,23,80],"0x00000002":87,"0x00000003":87,"0x00000000":87,"0x00000004":87,"0x00000009":87,flow:[27,57,0,71,75,20,61,35,6,37,95,39,40,41,42,43,44,9,10,11,12,13,14,15,16,17,46,47,64,70,22,36,23,91,89,74],roots_begin:62,getorcreatefoo:14,abbrev:94,declar:[27,71,75,3,20,34,85,6,37,4,39,81,41,42,43,44,10,11,12,13,14,15,16,17,47,18,87,64,21,68,36,94,95,24,56,26],radix:75,prepend:[14,87],"_build":21,saga:[11,43],isnorm:22,"0x70b298":64,random:[75,38,1,58,70,23,20,60,14],radiu:85,radic:71,dfapacket:71,absolut:[21,34,75,47,20,18,7,64,4],bitcoderead:34,createreassociatepass:[41,42,43,44],configur:[75,0,28,29,1,30,77,31,3,4,33,6,81,7,8,14,45,47,64,96,65,21,71,54,55,23,24,56],nextprec:[37,95,41,42,43,44],multiclassid:26,getreg!
 :[71,47],
 llvm_yaml_is_sequence_vector:57,label0:20,twiddl:[41,42,43,44,10,11,12,13,20],watch:[23,75],image_scn_type_no_pad:92,pointertyp:14,report:[27,28,29,1,77,32,20,33,36,37,8,70,17,63,87,64,65,21,14,53,55,24,74],reconstruct:[87,80,86],sparclet:47,aliasanalysisdebugg:36,start_val:[11,12,13],sunit:71,isoper:[41,42],basicblock:[27,75,21,37,41,42,43,44,64,62,11,14],stringwithcstr:87,lto_module_is_object_file_for_target:74,habit:[27,75],nuw:20,memory_order_releas:[20,73],storesdnod:47,attributeset:49,bitvector:14,nul:[12,14,42],num:[62,47],libsampl:45,corrupt:[91,35,9,80],hopefulli:[27,75,36,18,73,44,64,94,10,89],databas:[35,9,57],image_file_machine_mips16:92,discoveri:1,valb:6,tolmach94:62,mul:[27,68,6,37,20,86,4,17],approach:[27,75,85,47,86,70,18,71,72,87,8,74,59,14,22],weak:[74,81,41,73,93,94,13,20,14],protect:[75,47,20,22,71,73,87,94,3,14],notatom:73,critedge1:6,fault:[21,23,38],r7xx:88,mybarflag:57,lto_module_cr:74,kwd:[10,11,12,13,15,16,17],coldcc:[20,94],max_int_bit:14,trust:[!
 23,75],na
 ke:[20,94],xemac:[21,56],nonsens:[13,41,89],getglobalcontext:[37,41,42,43,44,14],accumul:[27,0,10,11,12,13,16,17],oldbind:[13,41],quickli:[84,33,53,80,21,62,70,18,36,54,87,8,31,75,56,3,71,20],getsymbolt:14,"0x000003bd":87,msec:0,xxx:[29,75,4,47],uncommon:91,expected_v:20,testcaselength:14,craft:14,"catch":[86,37,91,18,44,23,10,82,20,17],smallbitvector:14,image_sym_class_undefined_stat:92,simplevalu:26,bitcod:[27,71,76,58,31,32,20,33,5,79,80,6,38,40,70,81,83,63,84,34,64,65,67,21,90,14,53,55,93,94,56,74],basic_p:68,basic_r:68,curvar:[13,41],cumemalloc:6,mcsymbol:[62,71],p_reg:71,image_sym_type_mo:92,svr4:80,vk_argument:75,registermypass:64,tediou:57,list_property_nam:24,suggest:[64,75,36,20,7,54,23,14,45],ilp32:[35,9],disposit:23,dooneiter:70,complet:[27,71,1,58,77,31,75,3,20,61,33,6,37,38,39,41,42,43,44,8,10,11,12,13,15,16,17,47,62,18,84,87,64,21,68,51,91,22,36,23,94,95,56,74],sched:[67,71,47],darwin9:4,binaryexprast:[37,95,41,42,43,44],build_ret:[10,11,12,13,17],introductor!
 i:33,prop
 erty_nam:24,redefin:[68,37,41,42,12,13,17],sethiddenflag:18,image_scn_mem_not_pag:92,bugzilla:[8,28,23,77,33],everyth:[77,31,20,33,6,37,95,39,42,43,8,11,12,15,16,17,86,18,64,21,71,73,55,56],spencer:3,addend:20,makevehicl:75,finalizememori:61,"0x01":68,meta:[62,14,22,71,87,20],shorthand:68,expos:[21,71,27,20,18,1,41,36,70,64,74,73,3,75,13,14,22],interfer:[91,86],elf:[61,88,71,87,50,20],"0x7fffffffe018":82,els:[27,71,0,29,31,75,3,4,34,35,6,37,20,39,41,42,43,44,8,9,10,11,12,13,14,15,16,17,47,18,67,68,57,55,23,95],at_artifici:87,explanatori:29,elt:20,xnor:47,setloadxact:47,disableencod:68,howtosubmitabug:21,"______________________":14,thumb2:[71,49],gr64:71,end_:[11,12,13],apart:[14,36],unindex:47,arbitrari:[75,1,20,35,36,37,95,39,86,41,44,9,10,13,14,15,16,17,47,48,62,18,87,64,68,91,71,23,94,24],contradict:23,build_add:[10,11,12,13,17],hunk:68,hung:14,ifexprast:[11,41,42,43],llvm_use_sanit:52,excerpt:6,"000000e":[37,41,43,44,10,11,13,17],enumcas:57,indirect:[20,71,14,81,47],suc!
 cessfulli
 :[36,53,7,42,77,96,12],live_end:62,icc:[87,0],guaranteedtailcallopt:20,armv7:30,armv6:30,unstabl:[28,30],registerclass:[68,71,47],core:[64,21,68,41,88,36,37,20,22,7,30,43,42,8,96,23,24,44,14,87],compiler_rt:23,tour:[95,16],subtmp:[37,41,42,43,44,10,11,12,13,17],cast210:20,"0x2":[14,87],meyer:75,chapter:[33,35,37,95,39,41,42,43,44,9,10,11,12,13,15,16,17],min_int_bit:14,canreserveresourc:71,surround:[27,4,73,20,86],unfortun:[35,43,44,64,75,9,10,11,14],distinct:[27,68,94,86,36,37,4,71,8,20,24,56,14,17],g_inlined_into_f:66,algo:64,bitsetcas:57,produc:[27,57,41,1,4,75,32,3,20,35,71,37,38,40,7,43,44,9,10,11,13,14,81,17,63,47,86,62,84,87,64,65,80,21,70,22,53,73,55,23,24,56,25],addpsrr:68,instcombin:[27,81,14,70],regist:[27,57,0,71,4,82,20,61,6,37,38,81,41,42,43,44,10,11,12,13,14,17,47,62,84,64,65,67,21,68,91,22,36,23,96,25,97],encod:[21,68,71,80,47,33,91,14,57,41,87,65,94,32,67,13,20],othervt:47,parse_bin_rh:[10,11,12,13,16,17],createfmul:[37,41,42,43,44],objectso:56,storag:[6,62,!
 14,18,71,
 87,94,20],addpsrm:68,git:[21,52,69,55],closur:[24,35,9],x86targetasminfo:47,"class":[27,71,75,59,3,20,61,33,34,35,85,36,37,95,41,42,43,44,9,10,13,14,16,17,47,62,18,87,64,49,21,68,51,57,54,94,56,25,97,26],stuck:[35,9],reli:[75,86,0,28,20,71,41,87,8,62,23,74,56,13,14,81],gid:80,image_sym_type_enum:92,synthesiz:22,sitofp:[37,20,17],head:[21,68,75,62,20,22,89,26],medium:67,modulepass:[64,36,6],p0i32:4,heap:[35,36,62,20,57,41,51,9,72,13,14],icmp:[20,14,94],counsel:23,attr:[20,87,94],fundament:[33,34,75,47,86,20,18,71,68,64,49,97,26],opensus:21,autoconf:[21,81,47,45,77],loadregfromstackslot:[71,47],adorn:89,uncoop:62,trig:47,eieio:20,"_ztv3bar":4,trip:[27,21,75,0],assembl:[81,76,29,58,31,32,20,33,34,79,6,40,44,8,88,10,46,47,86,62,84,65,19,67,21,68,22,71,72,23,94,24,56,25,97],pipe:[3,22,1,4],readonli:[27,20,87,94],tirefactori:75,tip:[21,35,33,39,64,23,9,70,15],tid:6,node:[27,57,0,71,2,32,20,33,34,85,6,37,95,41,42,43,44,10,11,12,13,14,16,17,47,87,64,51,36],smallset:14,consid:[27,75!
 ,28,30,59
 ,3,20,35,36,38,39,81,41,43,82,9,11,13,14,15,16,85,86,62,18,87,64,93,68,51,71,94,95,56,26],idx3:86,global_dtor:20,idx1:[20,86],idx0:20,uniformli:75,libcuda:6,faster:[21,75,80,20,22,30,70,91,96,56,14,87],bullet:[81,85],freebench:29,serious:31,offsetof:[35,9],backward:[0,62,18,94,49,14],getintrinsicid:62,focus:[8,71,40,14,47],catagor:27,signific:[34,75,36,62,20,39,42,43,64,23,74,94,12,14,15],llc:[64,21,71,47,6,62,38,53,72,58,70,8,31,65,67,56,4],n32:20,lld:52,addregisterclass:[71,47],readabl:[21,71,79,90,27,76,63,57,73,87,64,75,32,56,89,20],pop_back:[18,14],sourc:[27,53,57,28,29,1,58,77,31,75,3,82,4,33,35,6,37,38,81,7,44,8,9,10,71,14,45,17,83,47,48,62,18,84,87,64,65,20,66,86,21,52,70,22,36,23,24,56,74],overcom:8,feasibl:[20,7],armv8:88,cool:[37,18,41,42,43,44,64,10,11,12,13,17],cuctxcreat:6,curop:47,blockdim:6,quick:[27,35,52,80,69,36,28,70,18,86,7,87,44,8,23,9,10,75,64],release_26:21,release_27:21,release_24:21,release_25:21,"__builtin_longjmp":91,release_23:21,release_20:21,r!
 elease_21
 :21,release_28:21,release_29:21,magnif:[42,12,15,39],endcond:[13,41,42,43],port:[21,35,0,22,71,31,9,96,3,81],llvmlib:[56,45],"64bit":28,alphajitinfo:47,exitcond:20,sinc:[53,57,28,7,30,31,75,59,3,20,61,85,71,6,37,95,39,81,41,42,43,44,10,11,12,13,14,16,17,47,86,62,18,87,64,80,21,91,36,72,23,94,56,89,26],u32:6,llvmld:56,declare_funct:[10,11,12,13,17],old_valu:13,memory_order_relax:[20,73],testsut:56,fmag:80,dw_tag_restrict_typ:87,preorder:85,tire:[68,12,75,42],createbasicaliasanalysispass:[41,42,43,44],switchsect:[62,71],r6xx:88,dorit:0,weird:71,automaton:71,semant:[68,51,91,6,37,20,71,75,73,43,87,64,62,74,11,24,3,25,14,81,17],targets_to_build:[8,7,47],builder_at:13,circumv:18,tweak:[54,18,85],visibl:[75,80,6,14,18,71,73,87,64,74,94,20],msy:21,memori:[27,53,0,71,1,30,75,20,81,61,34,35,6,38,39,40,41,82,9,13,14,15,47,86,62,87,64,51,52,22,36,72,73,57,25,74],camlp4of:[10,11,12,13,16,17],pred:[6,20,41,43,11,13,14],preg:71,pref:[20,14],todai:[75,73,86],handler:[91,71,20,73],instalia!
 :71,brevi
 ti:6,criteria:77,msg:20,andw:4,prev:14,reorder:[20,4,73,87],plug:[37,17],capit:75,share:[27,53,29,75,59,3,20,6,37,38,81,7,42,82,8,71,14,45,17,87,64,65,67,21,68,52,70,57,73,54,94,56,74],drown:29,prototyp:[27,5,75,47,37,95,87,41,34,43,42,64,10,11,12,13,20,44,16,17],build_br:[11,12,13],religi:75,registerinfo:[71,47],function_typ:[10,11,12,13,17],purpos:[21,68,75,86,6,28,20,18,71,87,44,64,37,23,56,27,3,14],dbginfo:27,preemptibl:27,sidelength:85,parse_binary_preced:[12,13],add8rr:71,critic:[27,75,36,28,95,77,64,62,67,16],alwai:[27,71,29,1,75,2,32,3,4,5,35,80,36,37,20,81,41,42,43,44,8,9,10,11,12,13,14,45,17,85,86,18,87,21,51,69,22,57,23,94,95,24,56,74],differenti:[24,3,69,56],stepval:[41,42,43],twoargfp:68,anyon:[23,73,47,87],fourth:[64,11,18,20,47],cstptr:20,"__nv_isinff":6,double_typ:[10,11,12,13,17],clone:[21,1,41,64,55,13,14],mcdisassembl:71,interconnect:22,geforc:6,colfield:59,practic:[27,51,86,39,37,20,18,81,75,73,43,44,62,23,10,11,87,14,15,17],firstlett:82,calltmp6:[13,41]!
 ,predic:[
 68,75,47,73,59,20],the_fpm:[10,11,12,13],cse:[10,34,51,73,44],destmodul:56,preced:[27,1,20,36,37,95,39,41,42,43,44,8,10,11,12,13,14,15,16,17,48,87,93,26],combin:[27,71,0,77,32,20,34,35,37,95,86,9,70,16,17,47,48,62,18,84,64,19,14,22,57,23,94],nextindvar:20,isfinitenonzero:22,blocker:28,ac_init:45,blarg:14,microscop:75,size_t:[62,57,74],mainli:45,canari:20,gte:20,branch_weight:2,pinsrd:4,platform:[30,77,31,3,20,33,88,81,7,42,44,8,10,14,62,64,96,21,52,22,71,73,54,23,24,56,74],gtu:6,gtx:6,underneath:[8,21,45],cst:20,flagspointi:57,inoperandlist:[68,47],term:[33,51,27,20,36,75,73,87,8,23,91,3,71,26,81],name:[27,71,95,28,41,29,1,77,31,75,32,59,3,82,4,81,5,35,79,80,6,37,38,39,40,7,42,43,44,8,9,76,10,11,12,13,14,15,16,17,83,47,48,62,85,18,84,34,87,64,96,65,19,20,66,67,86,93,21,68,89,52,69,90,74,22,57,92,23,45,94,91,24,56,25,97,26],getoperatornam:[41,42],realist:[62,95,68,16],cellspac:71,sequentiallyconsist:73,callsit:[27,14,91],varexprast:41,the_execution_engin:[10,11,12,13],indivi!
 du:[21,34
 ,75,94,80,27,33,29,1,68,70,8,31,23,20,32,24,25,14],otherspecialsquar:85,const0:94,getdoubleti:[37,41,42,43,44],x86call:68,profit:[27,71,0],decimalinteg:26,profil:[27,81,21,38,63,84,87,58,64,2,56,45],roundp:0,iscxxclass:87,factori:[27,34,75,14],aliase:[20,94],"\u03c6":20,migrat:23,write_escap:64,integertyp:14,theori:[35,9,57],build_sub:[10,11,12,13,17],boehm:62,prescrib:75,synchron:[74,20,73],refus:[27,5,52,90,76,84,79],motion:[21,51,36,64,27,20],turn:[27,75,20,34,35,80,37,95,81,9,70,16,17,47,62,18,87,21,14,71,73,54,56,89,74],place:[27,71,0,28,1,75,20,34,35,80,37,95,39,41,42,44,8,9,10,12,13,14,15,45,17,47,86,62,18,87,64,96,67,21,68,70,22,57,55,23,91,24,56],ture:[10,95,16,44],imposs:[35,47,36,73,23,9],origin:[27,71,80,86,21,20,48,87,91,56,3,4,14],suspend:62,sanitize_memori:20,arrai:[27,0,20,35,80,6,95,41,8,9,10,11,12,13,14,16,17,47,86,62,87,91,71,36,94],bou_fals:18,transform:[27,75,59,4,33,34,36,37,20,81,41,42,43,44,10,13,14,45,17,47,62,84,87,64,21,68,52,70,22,71,73],rodata:4!
 7,predefi
 n:[64,12,1,42],unrecogn:18,"0x00003550":87,given:[27,71,1,31,32,85,3,20,61,34,80,36,37,95,40,42,12,14,81,16,17,47,48,18,84,87,64,66,21,52,91,57,73,55,94,24,56,26],frameindex:47,image_sym_class_external_def:92,necessarili:[21,75,86,28,81,87,20],llvm_int_ti:34,circl:85,white:88,cope:[18,14],copi:[27,71,0,77,75,20,61,6,4,81,7,8,14,45,83,47,62,18,87,64,67,21,51,52,70,36,72,73,55,94,56,89],specifi:[27,53,57,71,29,1,77,31,75,3,4,33,5,35,79,80,6,37,38,81,41,42,43,44,8,9,60,76,10,11,12,13,14,16,17,83,47,86,62,95,18,84,87,64,65,19,20,66,67,50,21,68,52,90,70,36,73,93,45,94,91,24,56,97,26],image_scn_mem_execut:92,enclos:[68,75,4,8,94,14],grunt:18,releasei:28,serv:[33,86,27,14,1,87,8,56,26],wide:[27,71,30,20,33,35,6,43,44,9,10,11,14,86,62,87,68,22,36,73,94,56,26],image_sym_type_doubl:92,subexpress:[51,36,95,41,42,43,44,64,10,11,12,13,16],getoperationnam:34,posix:[93,52,80],balanc:[75,73],posit:[21,71,91,74,18,57,7,42,43,67,23,94,56,59,11,12,20,16],ebp:[68,71],xxxgenasmwrit:47,seri:[21,!
 71,52,20,
 39,53,44,64,23,94,91,10,88,14,15],pre:[27,34,51,21,28,53,77,37,23,67,56,71,14,45,17],isfunct:87,subroutin:[62,87],doiniti:[47,62,41,42,43,44,64],bitwis:[27,20],techniqu:[71,47,0,62,20,39,36,41,42,43,44,64,70,95,10,11,12,13,14,15,16],ebx:[68,71,19],moreov:[27,71,20],datapath:22,codegen_proto:[10,11,12,13,17],ideal:[24,75,14,47],sure:[71,0,28,7,30,77,75,3,34,35,36,37,95,81,41,42,43,44,8,9,13,14,17,85,18,87,64,21,52,53,73,54,55,23,96,56],multipli:[27,34,51,20,71],clearer:75,frin:22,gunzip:[21,31],fco:47,bb0_30:6,later:[27,75,29,20,61,37,4,44,8,10,11,12,13,14,45,17,47,87,64,21,22,71,16,95,56,89],quantiti:20,mybison:29,runtim:[27,71,0,3,44,20,35,88,42,82,9,12,70,47,62,18,87,64,21,14,22,57,72,23,91],readjust:71,xxxasmprint:47,cs2:36,cmakelist:[52,48],apple_namespac:87,build_cal:[10,11,12,13,17],uncondit:[27,47,43,11,12,13,20],dw_lang_cobol74:87,cheap:[27,75,14,73],permiss:[61,21,23,80,96],hack:[27,35,39,7,64,9,15],culinkst:6,tend:[21,75,86,28,22,40,87,23,24,14],explicitli:[61,21,!
 68,35,52,
 81,27,37,14,18,36,75,9,20,86,71,4,29,17],lua:62,derivedtyp:[34,37,41,42,43,44,14],written:[27,53,0,76,75,32,3,20,5,35,6,39,81,42,43,8,9,11,12,71,14,15,47,48,87,19,68,22,36,57,23,24,56],gulp:75,sk_circl:85,analyz:[27,84,21,29,56,87,43,64,31,58,32,11,71,14],abs_fp32:68,analys:[21,34,71,36,33,84,87,64,20,27,14],llvm_scalar_opt:[10,11,12,13],mcsectionmacho:71,jazz:45,ssp:[20,87,94],module_code_gcnam:94,allocat:[71,47],crude:27,dyn:50,tailor:30,use_llvm_executionengin:[10,11,12,13],sse:[71,20,47,49],regtyp:47,ssa:[27,35,81,47,37,20,39,71,41,42,43,62,51,9,11,12,13,14,15,17],dw_tag_packed_typ:87,reveal:86,"0x00002023":87,dramat:[75,18,44,65,10,20],intrins:[27,34,47,6,62,33,22,0,72,73,87,20,91,97,14],fastcc:[71,20,81,94],bison:29,scott:75,backedg:[11,12,42,43,27],n16:6,lnt:[8,28,29,7],deadargelim:27,atomic_:73,detect:[27,40,52,0,4,1,87,44,20,10,14],mov32ri:71,review:[33,69,21,77,31,23,3,89],image_scn_cnt_uninitialized_data:92,abs_f:68,cycl:[74,20],bitset:[57,47],collect2:55,come:[7!
 1,75,59,2
 0,34,35,80,6,37,38,39,41,43,44,8,9,10,11,13,14,15,45,17,86,62,87,64,21,68,52,57,23,94],latch:20,at_apple_runtime_class:87,region:[27,51,91,64,94,20],quiet:[56,18,1,82],contract:[20,85],nocaptur:[27,20,94],llvm_start_multithread:14,entir:[27,53,0,29,1,75,32,20,35,80,6,37,81,44,8,9,10,71,14,17,47,86,62,18,63,87,64,21,36,57,23,94,24,56],image_scn_mem_purg:92,imgrel:19,image_file_machine_powerpcfp:92,nnn:80,color:[71,14,87],pow:[6,20,0],inspir:[27,20],period:[8,70,23,20],pop:[62,20,71,41,43,94,11,13,14],hblcnsviw:18,image_file_machine_sh4:92,image_file_machine_sh5:92,colon:[68,52,57,8,24,4],image_file_machine_sh3:92,pod:75,coupl:[68,35,20,42,43,73,64,23,9,11,12,14,74],test_source_root:1,sectionnumb:92,"abstract":[27,71,75,3,20,85,37,95,39,81,41,42,43,44,10,11,12,13,14,15,16,17,47,62,87,64,68,51,57,94,74],debug_str:87,variableexprast:[37,95,41,42,43,44],mytype1:57,andrew:62,mytype2:57,mrmdestmem:47,instrssrr:68,intertwin:51,"case":[27,57,41,29,75,30,58,2,59,3,4,61,33,5,35,71,36,!
 37,38,39,
 81,7,42,43,44,8,9,10,11,12,13,14,15,16,17,83,47,85,62,74,18,84,34,87,64,20,86,80,21,68,52,70,53,72,73,23,45,94,95,56,25,89,26],addimm:71,module_code_alia:94,permut:20,stackgrowsdown:47,registerwithsubreg:47,type_code_point:94,cast:[68,35,85,86,26,18,41,42,43,44,75,9,20,10,14,22],tblgen:[34,52,47,71,7,68,58,56,97],anytim:81,isextern:87,clutter:23,image_file_up_system_onli:92,rangepiec:26,d14:47,d15:47,addedcomplex:68,value_desc:18,d10:47,d11:47,d12:47,d13:47,alphabet:56,rgpassmanag:64,html:[21,34,52,28,38,29,71,7,77,37,17],intreg:[59,47],eventu:[27,85,20,29,43,11,4],hasadsizeprefix:68,week:23,image_sym_class_label:92,nest:[68,71,47,36,0,91,1,87,43,64,62,75,95,94,56,24,11,89,20,16],confidenti:23,driver:[88,6,37,95,39,41,42,43,44,45,10,11,12,13,74,15,16,17],driven:[27,35,47,36,18,71,41,44,8,9,10,13,4,15],devoid:71,setversionprint:18,viewgraph:14,moder:14,justifi:[74,80],iterat:14,"__main":64,model:[27,71,0,1,59,20,33,37,95,81,41,13,14,16,17,47,86,62,18,87,67,22,53,73,57,94,74]!
 ,customre
 adbarri:62,unimpl:[64,75],when:[27,53,0,28,71,29,1,77,31,75,85,3,82,4,61,33,34,35,80,6,37,38,39,81,41,42,43,44,8,9,10,11,12,13,14,15,16,17,83,63,47,86,62,74,18,84,87,64,93,20,67,50,21,68,52,69,70,22,36,72,73,57,54,23,95,94,91,24,56,89,26],"0x000003f3":87,redwin:71,kill:[64,38,71,70],refactor:[13,41],dynamic_cast:[41,75,14,85],miscellan:[88,80,18,64,20,29,45],widest:23,hint:[75,86,37,70,17,20,14],except:[27,57,71,1,75,32,3,4,33,35,79,80,6,37,20,39,41,42,44,9,10,11,12,13,14,15,16,17,47,86,18,64,65,67,21,68,91,22,36,73,94,24,56,26],cxx:[21,28,81,7,55,56],blob:[28,75,94],notori:3,disrupt:[89,20],image_sym_dtype_point:92,predrel:59,subtargetfeatur:47,createbr:[41,42,43],image_sym_class_union_tag:92,"0x000003ff":71,saniti:[24,21,52,56],"0x1000":87,whitespac:[21,37,26,39,41,42,43,44,23,95,10,11,12,13,4,15,16,17],image_scn_align_256byt:92,cooper:[62,55],targetinstrinfo:[71,47],evergreen:88,trampolin:20,at_apple_property_attribut:87,freez:[81,77],slice:[26,68,14],gvn:[27,36,41,42,43!
 ,44,64],e
 asili:[64,21,53,27,62,18,48,7,87,57,8,75,24,3,71,14,22],legal:[21,34,47,6,20,71,73,8,23,25,86,14],gridsizex:6,encodecompactunwindregisterswithoutfram:71,gridsizez:6,derferenc:14,libfil:83,freed:[72,14,36],garbag:[33,35,62,39,81,51,9,94,20,15],inspect:[86,14,71,87,64,94,95,20],boolordefault:18,oneargfprw:68,immut:[64,20,14,49],execv:3,stacklet:72,errata:88,cmptmp:[37,41,42,43,44,10,11,12,13,17],cuda:[22,71,88,6],image_scn_align_16byt:92,onon:20,tape:21,routin:[21,35,62,95,39,1,44,64,23,9,10,3,71,14,15,16],llvmsetdisasmopt:25,dw_at_nam:87,tbcc:47,lastli:[8,64,49],target_triplet:8,overrod:68,idx2:86,cpu_powerpc:57,possbil:57,unconvent:[35,9],classess:47,fcc_g:47,getbuff:57,strict:[37,4,87,24,14,17],interfac:[27,71,1,75,59,3,82,20,33,35,88,6,37,95,39,81,44,9,10,14,15,16,17,47,62,18,87,64,49,21,68,52,69,36,55,24,74],mm4:68,strictli:[21,6,62,20,56,87,43,11,3,4],blocklen_32:94,machin:[75,0,1,30,77,82,20,61,33,35,6,4,7,44,8,9,10,14,47,62,87,64,65,19,67,21,51,52,22,71,92,96,97],fcc_!
 u:47,mm6:
 68,regard:[33,75,20,81,77],ocaml_lib:[10,11,12,13,17],mm0:[68,71],setjmp_buf:91,procedur:[51,52,39,18,77,88,14,15,45],longer:[27,75,80,62,22,71,41,89,64,23,49,13,14,81,45],notat:[21,68,80,20,18,57,26],nmake:52,runonregion:64,parsetoplevelexpr:[37,95,41,42,43,44],handletoplevelexpress:[37,95,41,42,43,44],image_file_machine_thumb:92,x86_stdcall:71,clrq:71,clrw:71,cbe:53,strongli:[68,35,62,7,41,43,51,9,11,75,13],clrb:71,intro:[33,68,13,41,88],deletevalu:36,umax:20,encompass:[30,49],rearrang:51,intra:36,tok_eof:[37,95,39,41,42,43,44],clrl:71,incorrect:[37,53,41,42,43,44,10,11,12,13,20,17],call2:4,purdu:26,multiclass:[68,26,47],idiom:[37,18,14,17],symbol:[27,71,41,58,75,32,82,20,61,35,80,36,37,7,42,43,44,9,11,12,13,14,17,47,62,18,87,93,19,66,67,50,21,68,51,22,57,92,54,94,56,74],briefli:64,mrmsrcreg:47,llvmcreatedisasm:25,buildmi:71,ilist_nod:14,getdisplaynam:87,callq:72,directori:[75,28,29,1,77,31,3,33,81,7,8,14,45,83,47,87,64,96,21,68,52,22,71,55,23,24,56,97],invest:34,calle:[2!
 7,68,81,4
 7,37,95,71,41,42,43,44,64,10,11,12,13,20,17],potenti:[27,71,36,70,18,1,39,43,77,23,95,91,11,75,20,15,16,81],degrad:62,"__sync_":73,metatada:2,all:[27,53,95,0,28,41,29,1,75,30,58,77,31,2,86,32,59,3,82,4,81,61,33,5,35,71,6,37,38,39,40,7,42,43,44,8,9,10,11,12,13,14,15,16,17,83,63,47,85,62,74,18,84,34,87,64,96,65,20,66,67,50,93,80,21,68,51,52,70,22,36,73,57,55,23,45,94,91,24,56,97,26],replacealluseswith:[51,14],dist:[21,14,56],fp_to_sint:47,lack:[86,62,26,71,77,54,10,20],scalar:[27,51,47,0,62,71,18,57,41,42,43,44,24,13,20],basicblockutil:14,pty:20,ptx:[21,71,88,6],follow:[27,53,0,28,41,29,1,30,58,77,75,32,59,3,95,4,34,79,71,6,85,38,39,81,7,42,43,82,8,11,12,13,14,15,16,47,86,62,74,18,84,87,64,96,93,19,20,80,21,68,52,69,70,36,73,57,54,55,23,45,94,91,24,56,25,89,26],spcc:47,ptr:[20,14,47,6],uint8_t:57,targetdescript:47,getaddressingmod:47,init:[21,18,41,64,13,20],program:[27,53,0,71,29,1,58,78,31,75,3,82,4,33,5,35,88,80,6,38,39,81,41,43,44,8,9,10,11,13,14,15,16,86,63,85,48,62,95,1!
 8,84,87,6
 4,65,20,66,67,50,21,51,70,22,36,57,54,55,23,45,94,91,56,97,74],deepcheck:14,lsbit:14,far:[34,35,36,37,95,18,41,42,87,64,9,24,12,13,14,16,17],faq:[33,35,9,81,20],urem:[34,71,20],worst:[14,35,9,72],toolbuildpath:56,failur:[64,21,53,57,28,4,29,1,30,70,8,31,23,20,38,77,14,15,16,87],fab:[20,0],unoffici:86,experimental_dir:56,isunpredicatedtermin:47,basicaliasanalysi:[64,27,36],subsubsect:89,feat_reli:71,lisp:[62,35,9],sectionnam:94,list:[27,53,95,0,28,71,85,1,75,58,77,2,32,59,82,20,81,61,33,34,35,88,80,6,37,38,39,40,41,42,43,44,8,9,10,11,12,13,14,15,16,17,83,47,48,62,74,18,84,87,89,64,65,49,67,93,21,68,51,52,69,70,22,36,72,73,57,54,23,45,94,91,24,56,25,97,26],lli:[21,38,53,58,82,64,31,65,67],llvmdev:[33,35,75,73,23,9,26],ten:86,use_llvm_analysi:[10,11,12,13,17],still_poison:20,tex:29,rate:[23,80,94,32],pressur:[71,75,0],design:[27,71,91,29,1,75,3,4,61,33,35,36,20,39,81,41,82,9,13,14,15,45,86,47,48,62,18,87,64,96,49,50,68,51,70,22,57,73,23,94,38,24,74],storageclass:92,hasard:62,m!
 rm0r:47,w
 hat:[27,53,57,28,41,29,58,77,31,75,3,4,33,34,35,71,6,37,20,39,81,7,42,43,44,9,10,11,12,13,14,15,16,17,47,86,95,18,84,87,64,96,65,80,21,68,51,52,69,90,70,36,73,55,23,45,94,91,24,56,89,26],namedindex:47,sub:[21,34,71,94,47,37,4,22,1,68,73,8,87,23,20,56,14,17],sun:[8,64],sum:[20,14,94,0],brief:[21,75,52,36,62,18,53],tailcallopt:[71,20],asmprint:[62,71,47],version:[71,0,77,31,75,32,82,4,33,34,35,88,6,37,20,81,41,43,44,8,9,10,11,13,14,45,17,83,47,18,87,64,67,50,21,52,69,90,22,36,73,54,55,23,94,96,56,25,97,26],ctpop:[20,47],value_typ:57,themselv:[71,20,18,1,87,23,94,95,24,56,14,16],behaviour:[8,18,75,0],xmm3:68,shouldn:[61,75,36,18,7,15,56,20,39],jitcompilerfn:47,xmm6:68,b32:6,xmm4:68,xmm5:68,build_config:31,xmm8:68,xmm9:68,asmpars:[21,34],misinterpret:[75,70],instrsdrm:68,observ:[35,22,71,73,75,9,20],mac:[80,22,82,64,77,14],xmm2:68,magnitud:20,"0x0000006e":87,filenam:[76,83,5,79,90,93,38,18,84,68,87,78,65,60,32,56,50,97,4,67],heurist:[27,13,20,71,41],sparcasmprint:[71,47],dump_m!
 odul:[10,
 11,12,13,17],hexadecim:[68,18,57,93,19,20],proceed:[62,21,71],ac_config_makefil:45,coverag:[78,23,58],metadata_block:94,forcefulli:86,llvmtargetmachin:47,flat:57,at_apple_property_sett:87,cxa_demangl:87,isload:71,"80x86":96,flag:[71,0,28,75,59,20,6,4,7,82,8,10,11,12,13,17,83,47,62,18,87,21,52,57,54,55,56],defininit:74,stick:[75,14,30],"0x00000067":87,known:[27,57,28,71,29,77,31,75,20,33,6,37,38,39,81,41,42,43,44,10,11,12,13,14,15,16,17,47,86,64,21,68,91,36,72,45,94,95],ensu:47,valuabl:[29,23],outlin:[64,57],outliv:[27,20],relocationtyp:[75,47],dmpqrtx:80,image_scn_align_8192byt:92,ppc64:[22,71],reevalu:26,"__cxa_throw":91,bjarn:14,revis:[21,75,52,69,87,77,23,14],operandti:71,newlin:[75,80,1,42,94,12,4],divid:[27,34,20,29,71,8,32,3,4],rather:[64,21,71,47,27,28,20,1,75,30,87,36,62,31,23,94,95,86,26,81,16],anxiou:52,hash_map:14,divis:[12,71,20,42],llvmgccdir:29,targetasminfo:[62,47],goat:75,replacewithnewvalu:36,resourc:[64,88,18,14,77],algebra:[27,20],mccontext:71,invok:[27,7!
 5,20,61,6
 ,4,41,44,8,10,13,14,16,47,62,95,18,64,21,52,70,71,36,94,91,56,74],ranlib:[21,56,55],reflect:[21,47,36,6,42,77,64,12,74],okai:[75,86,37,95,41,42,43,44,11,10,3,12,13,20,16,17],ptxstring:6,"short":[21,57,97,47,6,71,84,1,41,36,43,42,31,23,75,11,12,13,20,81,87],postfix:75,unhid:18,stash:85,ambigu:[85,95,18,42,8,12,26,16],caus:[27,53,57,71,1,4,75,32,3,20,61,34,80,6,38,40,41,42,43,8,13,14,81,45,62,18,84,64,67,21,70,36,73,55,23,16,95,56],callback:[62,71,14,47,36],prepass:71,fslp:0,headlight:75,runonscc:64,reachabl:[62,52,51,20],geomean:0,next_var:[11,12,13],dso_path:65,style:[75,1,20,33,35,80,36,4,41,9,13,14,45,85,62,18,19,67,68,70,71,73,23,16,95,24,26],call:[27,57,0,95,71,29,1,75,32,3,82,4,61,34,35,88,80,6,37,20,39,81,41,42,43,44,8,9,10,11,12,13,14,15,16,17,47,62,74,18,87,64,49,67,21,68,51,69,70,22,36,72,73,54,45,94,91,24,25,26],lai:[75,86,20,71,41,42,43,44,10,11,12,13,14],harmless:27,anachronist:94,retti:94,might:[71,75,77,31,2,3,20,35,80,36,85,4,81,7,43,9,11,12,13,14,45,47,62,18!
 ,84,87,21
 ,51,70,57,73,23,24,56,25,89],alter:[64,56,18,81,20],wouldn:[75,13,41],"return":[27,57,0,71,75,78,31,2,59,3,82,20,61,34,35,80,6,37,60,39,81,41,42,43,44,8,9,10,11,12,13,14,15,16,17,47,62,85,18,63,87,64,49,66,67,50,21,70,36,72,73,23,95,94,91,56,25,89,74],no_instal:56,var_nam:[11,12,13],framework:[27,34,41,71,33,37,20,29,36,39,42,87,64,62,12,13,14,15,17],preheaderbb:[42,43],somebodi:23,bigger:[57,75],strr:47,complexpattern:[71,47],sourcebas:33,module_code_sectionnam:94,level:[27,57,0,71,29,75,32,3,82,4,61,33,35,6,37,20,39,81,41,42,43,44,8,9,10,11,12,13,14,15,16,17,86,47,48,62,18,87,64,65,50,21,68,51,52,91,22,36,73,23,45,94,95,24,56,26],"__dwarf":87,refresh:74,const_float:[10,11,12,13,17],difficult:[75,52,36,14,18,42,73,23,74,12,89,20],truncat:[20,47,77],compriz:32,nightli:[33,28,29,77,8,23],weight:[33,2,20],"2x3x4":20,branchinst:2,linkag:[21,71,6,37,20,40,87,94,14,17],regmapping_f:71,asmparsernum:97,expect:[27,71,29,1,75,31,2,3,4,36,37,20,39,86,41,42,43,44,8,10,11,12,13,14,15,1!
 6,17,48,6
 2,18,87,64,49,21,68,22,57,72,73,23,94,95,24,26],atom_count:87,slave:96,resulttyp:20,foolproof:64,ccifinreg:47,image_file_line_nums_strip:92,benjamin:62,uncommit:21,advanc:[46,75,47,62,14,18,44,64,23,95,10,89,20,16],"0xxxxxxxxx":87,teach:[37,34,39,15,17],pre_stor:71,flagflat:57,thrown:[91,20],targetinfo:47,putchar:[37,41,42,43,44,10,11,12,13],thread:[27,71,52,36,62,20,22,1,72,73,82,94,6,14],vararg:[37,14,71,94,20,17],toolnam:[56,45],runtimedyldelf:61,machineframeinfo:71,ccifnotvararg:47,circuit:[12,42],precal:62,libclc:23,bitpack:8,feed:[11,87,43,36],notifi:[23,77,36,0],ystep:[12,42],dw_at_apple_property_assign:87,feel:[35,36,37,70,22,39,23,9,20,15,17],cuda_success:6,add16mi8:68,smallptrset:14,auroraux:21,cond_val:[11,12,13],construct:[27,71,75,59,20,34,35,80,36,37,95,39,81,41,42,43,44,9,10,11,12,13,14,15,16,17,47,18,87,64,21,68,57,94,56,89,26],blank:[35,80,95,39,75,23,9,89,15,16],slower:[75,62,91,71,14,81],fanci:29,my_jit_tool:56,superpos:14,script:[64,21,81,47,48,28,38,18,!
 1,30,77,8
 ,62,63,23,56,14,29,45],interact:[61,27,35,52,69,47,20,18,71,73,70,64,9,95,14,29,16,87],parsetyp:34,stori:[21,31],gpu:[33,22,88,47,6],gpr:[25,71,68],luckili:62,option:[27,53,57,28,41,1,30,58,77,78,31,32,82,4,61,33,5,79,71,6,37,38,40,7,42,43,44,8,60,76,11,12,13,14,81,45,17,83,63,47,48,62,74,18,84,87,64,65,20,49,66,67,50,93,80,21,68,52,69,90,70,36,73,54,55,23,94,24,56,25,97,26],syncthread:6,wswitch:75,st_gid:80,cmake_c_flag:52,mcasmpars:71,secondcondit:14,albeit:[13,41],kind:[27,75,2,32,20,80,81,41,42,12,13,14,85,62,18,84,87,65,49,68,91,71,73,23,24,56,89,74],assert_valid_funct:[10,11,12,13,17],doubli:[72,14],whenev:[75,36,4,18,1,82,8,59,20,38,24,56,14,39],remot:[61,21],remov:[27,71,76,77,75,85,3,20,5,35,80,6,37,4,81,41,42,43,44,9,10,11,14,45,47,18,84,87,64,65,49,21,51,70,22,36,54,23,91,56,74],empty_subregsset:47,valuesymbolt:[21,14],dinkumwar:14,cleaner:[18,75,14],body_v:13,nnan:20,peculiar:26,ysvn:77,dedic:47,"0b000100":47,check:[27,57,0,28,41,29,1,30,77,31,75,4,35,71,6,37,38!
 ,39,7,42,
 43,44,8,9,10,11,12,13,14,15,16,17,85,86,18,87,64,20,80,21,68,52,91,22,53,72,73,55,23,95,96,56,89,74],violat:[75,86,62,43,23,11,20],intregsclass:47,paramidx1:94,paramidx0:94,exec:38,unsur:26,neverhassideeffect:68,english:[21,75],reach:[27,75,47,62,24,20],flagsround:57,disttarbz2:56,image_rel_amd64_addr32nb:19,amaz:[12,42],dw_tag_enumeration_typ:87,xmm7:68,blockid:94,destruct:[21,35,9],libopag:54,sandybridg:0,arg_empti:14,rtl:71,area:[81,28,91,71,41,8,62,23,3,13,20],intti:20,optimizationlevel:18,inapplic:30,brtarget:47,penalti:[20,14],bfd:55,front:[27,71,77,75,20,33,35,39,81,41,42,43,44,9,10,11,12,13,14,15,45,86,62,84,87,21,91,53,23],create_add:17,image_file_large_address_awar:92,hash_funct:87,stackoffset:62,shlibext:[8,56],address_s:6,pushfq:71,"0x0001023":87,aliasopt:18,spurious:8,mydoclist:57,mydoclisttyp:57,fastest:96,sizabl:14,stdcall:71,sextload:47,llvmdummi:47,sk_otherspecialsquar:85,getvaluetyp:47,getpointertonamedfunct:61,"0x1234":87,use_empti:14,arr:[20,14,86],stump!
 :47,llvmp
 rof:[27,63],simm13:47,shared_librari:[56,45],proactiv:[23,70],mutabl:[46,39,41,42,43,11,12,13,20,15],arc:69,dumb:[35,9],arg:[75,1,44,20,37,38,39,41,42,43,82,10,11,12,13,15,16,17,18,67,53,95,26],unreserv:87,disadvantag:[74,18,14,49],icc_:47,unqualifi:71,arm:[21,88,47,33,22,71,7,30,73,8,25],property_valu:24,simultan:[8,21,14,0],setupmachinefunct:47,inconveni:[13,41,81],inst_end:14,maprequir:57,pubtyp:87,condv:[41,42,43],extensioan:28,syntact:[10,20,4,44],unabbrev:94,sole:[23,14],aspir:[12,42],setbid:94,succeed:[64,1,20],outfil:60,solv:[35,86,36,87,71,41,42,77,23,9,12,13],setindexedloadact:47,v128:[20,6],isdopcod:34,interprocedur:[64,27,74,20,36],blissfulli:18,isomorph:81,available_extern:[20,94],context:[57,75,20,6,37,95,81,41,42,43,44,8,10,11,12,13,14,16,17,85,86,18,87,64,68,51,69,91,36,73,96,25,26],subclassref:26,internallinkag:14,tgt:97,getsrc:21,die_offset_bas:87,sweep:62,lbar:71,arbitrarili:[11,20,85,43,87],mistak:75,java:[27,35,62,20,73,9,14],due:[51,36,28,4,53,75,30,82!
 ,62,2,74,
 20,91,71,26],whoa:[10,44],strategi:[41,18,13,20,71],thunk:[27,71],flight:20,append_block:[10,11,12,13,17],activeperl:21,feat_tailcal:71,demand:[21,13,41,71,94],instructor:47,echocmd:56,eatomtypedietag:87,frozen:82,batch:31,dagtodagisel:34,abov:[27,57,28,41,29,75,59,4,61,34,35,71,36,37,38,39,81,7,42,43,44,8,9,10,11,12,13,14,15,16,17,47,86,62,85,18,87,64,20,66,80,21,68,52,53,72,45,94,95,25,89,74],cmp32ri:71,getlinenumb:87,runonfunct:[47,36,62,14,64,70],image_file_machine_am33:92,rip:[8,68],x8b:92,demot:27,illinoi:[23,75,81],mioperandinfo:47,minim:[75,80,86,74,87,71,42,73,45,67,3,12,95,20,16],getnumel:14,higher:[21,23,0,33,36,31,2,9,35,20,95,27,71,14,81,16],x83:92,x87:20,x86:[57,0,77,75,20,34,88,4,7,8,47,65,19,67,21,68,52,22,71,72,73,24],wherea:[20,71,14,91],robust:[8,25],wherev:[75,14],obit:20,stateless:27,lower:[27,75,0,20,34,35,36,95,81,41,42,9,12,13,16,47,86,62,84,87,21,71,97],buildmod:[8,56],machineri:[29,85],discourag:[3,18,14,56],find_packag:52,emitjumptableaddress:47,s!
 earchabl:
 56,chees:75,propos:[23,87],module_code_asm:94,stripwarnmsg:56,islocaltounit:87,regardless:[27,5,75,79,90,62,76,84,41,87,54,31,13,20],waymark:14,parse_var_init:13,exposit:[39,15,44],getbinarycodeforinstr:47,lmalloc:18,type_code_label:94,finder:33,view_function_cfg_onli:11,complaint:[35,9],vendor:20,erasefrompar:[47,37,41,42,43,44,62,14],v64:[20,6],mypassnam:14,preexist:27,awaken:91,image_sym_class_bit_field:92,pers_fn:20,confront:86,llvm_yaml_is_flow_sequence_vector:57,xmm10:68,xmm11:68,xmm12:68,xmm13:68,xmm14:68,hatsiz:57,normalizedpolar:57,cst_code_wide_integ:94,"1st":87,global:[27,71,0,1,75,32,82,20,81,5,35,80,6,37,4,39,40,41,42,43,44,9,10,13,14,15,45,17,47,86,62,18,87,64,93,21,91,36,73,94,74],understood:[20,35,9,71],litter:23,unspecifi:[29,71,20,6],f88017:71,consciou:21,surpris:[14,35,9,20],multmp:[37,41,42,43,44,10,11,12,13,17],glibc:[21,81],image_scn_mem_read:92,prof:[63,58],patchset:21,proc:[21,30,47],emitinstruct:[71,47],assignvirt2stackslot:71,runtimedyld:61,lhs_val!
 :[10,11,1
 2,13,17],ispointertyp:75,"_unwind_resum":91,testfunc:[10,44],arg_begin:[37,41,42,43,44,14],row:59,image_file_machine_wcemipsv2:92,registerasmprint:47,runonloop:64,threadid:6,tok_then:[41,42,43],runonbasicblock:64,plethora:[21,81,14],branchfold:47,prec:[12,13,41,42],artifici:87,operandmap:47,question:[75,31,20,33,35,36,95,81,41,43,9,11,13,14,45,86,87,21,69,22,23,16,56,89],fast:[75,47,14,22,71,41,30,87,64,65,13,20,89,97],lldb:[24,23,87,82],arithmet:[27,86,0,37,20,71,41,13,14,17],perform:[27,71,0,28,29,1,30,77,75,3,20,61,34,35,80,6,37,81,41,8,9,13,14,45,17,47,86,62,18,84,87,64,65,21,68,51,52,70,22,36,73,23,91,24,56,74],fptrunc:20,"__cxa_call_unexpect":91,aliasanalysi:[36,41,42,43,44,64,20],files:60,lto_codegen_set_pic_model:74,of_channel:[10,11,12,13,16,17],gcca:79,yrc1:77,delta:53,consist:[75,29,1,77,32,3,20,36,37,4,41,42,43,44,10,11,12,13,17,47,86,62,18,87,93,49,68,91,71,73,23,94,24,56,26],caller:[27,81,47,37,70,22,71,72,42,43,87,64,62,11,12,20,17],eqtyp:34,fcmp:[37,41,43,10!
 ,11,12,13
 ,20,17],parsedefinit:[37,95,41,42,43,44],mflop:0,msa:22,tdrr:67,highlight:[21,68,71,14,89],worklist:[27,14],tooldir:56,icc_val:47,cleargraphattr:14,phieliminationid:71,cciftyp:47,pat:[71,47],"0x0000000000dc8872":82,sdvalu:[71,47],registerdescriptor:47,nice:[27,4,35,37,95,39,41,42,43,44,8,9,10,11,12,13,14,15,16,17,18,64,68,73],ecosystem:[24,14],at_decl_fil:87,storeregtostackslot:[71,47],parseprimari:[37,95,41,42,43,44,12],domfronti:27,containsfoo:75,ccpromotetotyp:47,meaning:[86,62,14,84,67,89,20],thedoc:57,ccifcc:47,dllvm_default_target_tripl:7,ternari:71,gr1:20,elementtyp:20,gr8:[71,47],spillsiz:47,runtest:[28,7],cmpq:72,tag_structure_typ:87,module_code_globalvar:94,edi:[68,71,4],block_begin:[10,11,12,13,17],gmake:[64,21,29,81,45],dispel:86,int8ti:14,edu:26,edx:[68,71],uphold:20,xxxiseldagtodag:47,codesourceri:21,else_bb:[11,12,13],vptr:[20,14],needstub:47,va_end:20,formbit:68,fpformbit:68,mcinst:71,whichev:87,w64:21,vadv:29,emitconstantpool:47,relev:[88,85,36,20,71,7,73,4!
 3,54,59,2
 4,11,4],mandelhelp:[12,42],"0x0002023":87,maxsiz:75,loop_end_bb:[11,12,13],h_inlined_into_g:66,pleas:[53,28,30,77,31,75,59,20,35,6,37,81,7,8,9,71,14,17,46,47,96,21,68,89,69,22,36,73,23,24,97,26],smaller:[27,75,69,62,20,29,71,23,14],"_main":[66,92],lcuda:6,cfg:[64,27,71,20,22,1,43,8,31,2,11,14],memset:[27,20,73],fold:[27,34,47,36,37,20,71,73,44,64,10,14],investig:[29,35,9],ctor:[75,20,81],compat:[27,75,31,20,33,34,35,80,6,81,8,9,62,18,87,19,49,67,91,71,73,23,94],memcpyopt:[27,73,36],image_file_machine_i386:92,compar:[27,0,28,29,59,20,36,4,40,41,42,43,8,11,12,13,14,45,86,87,68,91,71,16,95,56],mainlin:[21,23,77],proj_obj_root:[56,45],finishassembl:62,dllvm_targets_to_build:[52,7],chose:[10,28,44],sexi:[39,15],ocamlbuild_plugin:[10,11,12,13,17],destbitcodelib:56,libltdl:56,sext:20,sse41:4,larger:[34,75,47,20,22,71,5,87,23,94,32,14],shader:[88,22,71,75],nsstring:87,unattend:70,typic:[27,75,32,20,61,35,80,36,85,4,8,9,14,45,47,86,62,84,87,64,93,21,51,90,91,71,24,56,25,74],apr:3,ap!
 pli:[27,7
 5,28,77,3,20,61,35,80,36,41,42,44,9,10,12,13,14,47,86,74,18,84,87,64,19,21,68,70,22,71,73,23,96,26],approxim:[27,31,1],inequ:71,loopcond:[41,42,43,11,12,13],api:[75,33,88,6,37,81,44,10,14,17,62,18,68,52,22,71,36,54,55,23,24,25],opcod:[68,75,85,47,37,14,71,41,42,73,95,59,12,20,16,17],transformutil:24,gnuwin32:[31,52],emitconstpooladdress:47,fed:71,from:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,21,22,23,24,26,27,28,29,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,47,48,50,51,52,53,54,55,56,57,58,59,20,61,62,84,64,65,66,67,68,70,71,72,73,74,75,76,77,79,80,81,82,83,85,86,87,88,69,91,93,94,95,96,97],usb:30,ineg:71,few:[27,75,0,77,3,20,35,80,6,37,95,42,44,8,9,10,12,14,45,17,47,62,84,87,64,21,70,71,73,23,16,94,24,56],usr:[21,52,6,18,7,55,56],regconstraint:71,my_addit:87,sort:[35,52,93,20,18,53,41,73,43,44,23,9,95,10,11,75,13,14,81,16,87],clever:[35,9,85],ap2:20,dxr:22,cimag:[12,42],adc64mi8:68,llvmtooldir:56,tok_identifi:[37,95,39,41,42,43,44],is_zero_undef:20,localdynam:[!
 20,94],au
 gment:[12,14,42],lbb0_2:72,annot:[51,6,63,87,25,20],annoi:75,no_dead_strip:20,endian:[94,71,20,87,47],typesequ:34,getregclass:71,proof:2,cta:6,quickstart:[21,33,29,7,8,55,89],tar:[21,28,7,77,31,56],isindirectbranch:68,movapd:4,tag:[21,75,62,20,57,87,77,94,56,25,14],proprietari:23,tab:[75,4],xmin:[12,42],tag_apple_properti:87,predicate_stor:47,six:[71,1,73],getregisteredopt:18,subdirectori:[21,52,47,29,1,77,8,24,45],instead:[27,57,71,1,77,75,59,3,82,20,33,5,35,85,6,37,95,39,81,41,42,44,9,10,12,13,14,15,16,17,63,47,48,62,18,84,64,93,19,67,86,21,51,90,70,22,36,72,73,23,94,24,56,26],constantfp:[37,41,42,43,44,14,17],sin:[57,36,37,95,39,0,44,10,20,15,16,17],chri:[75,71,77,64,23,9,35],sil:68,tension:[13,41],fpext:20,vehicletyp:75,hazard:51,singlethread:20,printdens:[12,42],attent:[8,23,20,47],hasiniti:14,initialize_ag_pass:64,mynewpass:38,light:[75,20],llvm_build_exampl:52,freebsd:[21,22,71,77],elid:[62,68],elig:[27,20],ptroff:71,elim:[65,87],dw_tag_memb:87,getanalysisifavail:64,!
 build_fsu
 b:17,projlibsopt:56,"100mb":56,reilli:14,initroot:62,srcdir:8,"80x87":71,in32bitmod:71,crash:[27,35,21,62,38,53,70,9,67,14],nonneg:20,guess:52,devel:28,successor:[27,40,47,20,71,75,14],module_code_purgev:94,trac:96,edit:[21,14,52,45,80],trap:[20,86],codegenprepar:27,instsp:47,forcibl:20,image_scn_align_8byt:92,mylistel:57,virtregmap:71,sahf:71,argumentlisttyp:14,const_use_iter:14,customroot:62,llvm_compiler_job:52,pointless:91,distnam:56,categori:[27,75,47,20,18,53,87,8,14,29],sectalign:18,basic_ss:68,stroustrup:14,llvmbb:33,llvmconfig:52,dive:[39,15,85],proviso:23,ac_config_aux_dir:45,powerpc:[21,34,71,52,47,22,57,73,88,20],dictionari:[1,20],deadarghax0r:27,promptli:23,my86_64flag:57,image_sym_class_undefined_label:92,tailcalle:71,lto:[55,51,74],mrm1r:47,flaground:57,isfoo:75,"0x2000":87,prioriti:[20,87,86],unknown:[71,0,30,20,80,37,95,39,41,42,43,44,10,11,12,13,15,16,17,18,57,55],printoperand:47,boil:[85,42,43,23,11,12],misunderstood:[33,81,86],tidbit:[46,35,36,39,41,9,13!
 ,15],shel
 l:[21,81,52,18,1,8,89,70],unabridg:[13,41],juli:62,protocol:75,emac:[21,68,75,56],probe:[71,14],utf:21,bitcodewrit:[34,14],clip:82,favorit:[11,51,43],cohen:3,linker:[75,58,20,33,6,81,7,42,70,83,47,18,87,65,19,21,90,14,71,55,24,56,74],appel89:62,coher:24,lowerfp_to_sint:47,disjoint:[36,20,0],printvar:56,inform:[27,53,57,28,41,29,1,75,30,58,77,78,31,2,32,59,3,82,4,61,33,35,88,71,6,37,38,81,7,42,44,8,9,10,12,13,14,45,17,86,63,47,48,62,85,18,84,87,64,96,93,19,20,50,21,68,51,52,90,91,22,36,89,55,23,94,24,56,25,97,74],diverg:[12,42,86],rout:36,"__unwind_info":71,which:[27,53,95,0,28,41,29,1,75,77,31,2,32,59,3,82,4,61,33,34,35,71,6,37,38,39,40,7,42,43,44,8,9,10,11,12,13,14,81,16,17,83,63,85,47,48,62,74,18,84,87,64,96,65,20,49,67,86,93,80,21,68,51,52,70,22,36,72,73,57,55,23,45,94,91,24,56,25,89,26],movsx32rm16:71,ncsa:23,llvmtarget:45,clash:[75,20],safepointaddress:62,clase:14,sunwspro:21,image_file_machine_ia64:92,dw_op_addr:87,hassideeffect:68,attributelist:49,dens:[20,14,94],add!
 regfrm:47
 ,objroot:8,osuosl:96,determin:[27,57,29,1,77,59,3,20,61,85,80,6,37,95,42,43,8,11,12,71,14,45,17,63,47,18,84,87,64,65,52,91,53,36,16,94,56],image_file_machine_amd64:92,const_arg_iter:14,setindexedstoreact:47,"30pm":57,mainloop:[37,95,41,42,43,44],filetyp:[31,65],findregress:28,liveinterv:[67,71],mistyp:75,strtol:18,locat:[27,53,0,28,71,29,1,58,3,20,61,33,80,6,4,81,41,42,8,12,13,14,45,47,48,62,18,87,66,86,21,52,91,36,73,57,56,25],strtod:[37,95,18,41,42,43,44,39],much:[27,53,57,28,41,75,32,85,3,20,34,35,71,6,37,95,81,7,44,8,9,10,13,14,16,17,47,74,18,87,64,80,21,68,69,70,36,73,54,55,23,45,96,89,26],eatomtypetypeflag:87,multmp4:[10,44],local:[27,57,71,1,75,20,81,61,6,37,39,40,41,44,8,10,13,14,15,17,62,18,87,64,65,67,21,51,22,36,93,94,56,26],multmp1:[37,17],multmp2:[37,17],multmp3:[37,17],contribut:[27,46,20,71,64,23,33,14],pypi:81,succe:[76,5,81,79,80,90,85,38,84,41,83,97,8,65,95,32,96,91,13,4,16],buildtool:24,lto_module_t:74,operating_system:20,dw_tag_user_bas:87,selectcod:47,r!
 egallocli
 nearscan:71,partit:[27,71,65,70,30],view:[27,74,29,71,73,43,15,94,11,14,39],modulo:[71,20,87],knowledg:[27,35,71,75,8,23,9,94,56,25,89,20],maketir:75,objectcach:61,dw_form_xxx:87,int16_t:[57,47],terminatorinst:[75,2,14],image_sym_class_enum_tag:92,image_scn_lnk_remov:92,becaus:[27,71,0,41,29,1,77,31,75,59,3,4,61,35,80,36,37,20,39,81,7,42,43,44,9,10,11,12,13,14,15,16,17,47,86,62,85,18,87,64,93,49,21,68,70,57,73,23,95,94,91,56,74],gmail:[21,69],closer:[51,86],entranc:20,framemap:62,divisionbyzero:20,dll:[8,20],favor:[29,23],libsystem:75,beginassembl:62,"__apple_nam":87,rppassmanag:64,image_sym_dtype_funct:92,llvm_enable_assert:52,amen:71,cudamodul:6,sprinkl:14,job:[64,3,52,85,21],mapopt:57,noalia:[86,20,94,36],externallinkag:[37,41,42,43,44,17],exclam:20,addit:[27,53,0,71,29,1,77,31,75,32,3,4,5,35,88,6,37,38,41,42,44,8,9,10,12,13,14,16,17,63,47,86,62,95,18,84,87,64,65,19,20,21,51,70,22,36,73,23,45,94,91,24,56,25],"0x00000120":87,thenbb:[11,41,42,43],constantint:14,tgtm:21,mli!
 mit:38,gr
 ain:[22,14],committe:14,libtinfo:7,uint16_t:[59,57,87,47],pnacl:22,unclear:[13,41,36],parallel_loop_access:20,wall:[64,1,9,35],hyphen:[18,47],wonder:[75,85,86,81,44,10],arriv:86,chmod:21,walk:[64,27,57,14],respect:[75,77,20,14,47,36,38,81,41,13,70,45,85,86,62,21,68,91,22,71,23,25],rpo:51,yaml:[33,57,92],decent:[64,34,14,30,77],xxxcallingconv:47,compos:[56,31,20,80,87],compon:[27,53,29,77,20,61,33,6,60,82,14,45,83,47,48,62,21,51,71,23,24,56],packedvector:14,besid:[75,47,95,18,42,12,16],inbound:[20,86],presenc:[47,4,22,71,73,20,91,14,29],ptxa:6,present:[71,1,20,33,4,41,42,43,11,12,13,14,86,62,18,87,67,21,53,94,56,26],xorrr:47,align:[27,71,88,47,6,62,20,22,57,73,87,74,94,49,86,4],dfpregsclass:47,unsuit:73,constprop:[27,18,14],wili:86,wild:[12,18,42],xorri:47,bb3:20,bb2:[20,94],bb1:[20,94],d_ctor_bas:4,layer:[71,35,9,36],avx:[8,0],instrinfo:[71,47],cctype:[37,95,41,42,43,44],eptr:20,avl:14,motiv:[59,11,13,41,43],dual:23,add64mi32:68,dinstinguish:87,alternativali:52,incq:4,gprof!
 :[21,56],
 xxxschedul:47,cross:[33,52,21,38,7,30,20,14],member:[61,27,34,71,80,47,0,85,20,29,57,75,68,87,8,74,86,14],binary_preced:[12,13],largest:[20,71,19],linaro:30,f64:[71,20,47,6],"0x1b":94,hasjit:47,maptag:57,ssecal:47,app:[54,75,14],hardcodedsmalls:14,bcpl:[68,26],decoupl:68,outputtyp:34,iftru:20,extra_dist:56,inc4:4,"0x10":87,linkagetyp:14,getrawpoint:49,my_function_fast:6,machinefunct:[64,71,14],libdevic:6,getoffset:47,camel:75,converg:[12,42],obtain:[61,27,68,71,52,47,91,53,23,56,3,14],heavili:[62,33,35,9,81],tce:22,tcb:72,superset:[20,80],methodproto:47,amd64:21,eatomtypenul:87,smith:75,book:[64,33,75,51,14],waypoint:70,emitobject:61,smart:75,llvm_on_win32:3,llvmdisassembler_option_usemarkup:25,agnost:[3,71,87],strconcat:[68,26,47],lightweight:[75,1,14],know:[27,57,0,71,29,1,31,75,82,20,35,36,37,95,81,41,42,43,44,8,9,10,11,12,13,14,16,17,47,62,18,87,64,21,52,69,70,53,73,23,96,89,74],nor:[27,75,86,62,71,31,94,56,3,20,81],librarynam:[62,56,64,47,45],"7e15":18,hostc:6,hostb:6,!
 hosta:6,i
 ncred:[23,75],repurpos:87,unord:[89,20,73,47],"0xff":68,createphi:[41,42,43],unabbrev_record:94,growth:[71,14],"export":[21,36,74,18,71,42,77,55,56,20],superclass:[64,68,14,47,36],package_vers:52,add64ri32:68,not_found:[10,11,12,13,16,17],leaf:[91,22,87],image_sym_class_struct_tag:92,lead:[27,68,71,86,20,18,57,73,55,75,95,56,14,16],sjlj:91,leak:[62,39,1,72,8,15],leaq:72,leav:[27,53,69,47,21,62,18,1,87,55,6,20,81,45],prehead:[11,43,27],leader:75,getnam:[37,87,81,41,42,43,44,64,14],numstr:[37,95,39,41,42,43,44],acronym:33,"enum":[57,75,59,34,47,36,37,95,39,41,42,43,44,14,85,62,18,87,49,68,71,92,97],tdfile:56,xxxgencallingconv:47,eatomtypenameflag:87,rare:[68,94,47,62,4,71,20,91,14],add64mi8:68,column:[21,75,0,29,87,59],type_code_doubl:94,lppassmanag:64,constructor:[61,71,85,47,14,18,57,73,43,64,75,49,20,81],spiller:[67,65,71],disabl:[75,0,28,1,77,4,36,20,81,7,43,11,14,62,18,84,65,67,21,52,70,22,53,54,55,38,56],stackentri:62,own:[27,75,29,77,3,20,61,34,35,85,39,81,41,42,8,9,12!
 ,13,14,15
 ,45,47,62,18,87,64,21,71,55,23,94,24,56],automat:[27,71,1,58,75,20,33,85,36,37,38,81,7,43,44,10,11,14,45,17,47,62,18,63,87,64,96,65,21,68,69,70,57,72,24,56,89],warranti:[64,23],automak:[21,56],build_mod:31,val:[68,47,6,37,14,18,41,42,43,44,95,94,49,20],transfer:[72,20,91],explict:19,threadsanit:20,intention:[64,95,75,20,16],appl:[21,33,28,20,71,87,82,23,4],arg1:[39,15],"var":[68,6,41,87,13,20],incorr:2,varexpr:[13,41],mailer:23,"0x7fffffff":20,codegen_expr:[10,11,12,13,17],lazyresolverfn:47,made:[27,75,57,20,33,35,36,37,81,41,42,43,44,9,11,13,14,45,85,86,87,64,91,71,72,23,94,56,89],temp:53,whether:[27,71,75,20,34,35,80,36,85,95,81,41,42,43,9,11,12,13,14,45,47,86,62,18,84,65,67,21,68,52,69,70,53,55,16,94,91,24,74],troubl:[21,18,23,31],record:[68,35,29,84,65,63,23,9,94,67,93,97,26],below:[27,71,0,28,29,30,77,31,20,5,80,6,85,4,41,42,8,10,12,13,14,16,47,18,87,64,65,21,52,36,72,23,45,94,95,24,56],structtyp:14,disttargzip:56,again:[35,37,14,18,53,41,43,44,64,77,9,72,20,89,10,11,1!
 3,4,29],l
 lvmasmpars:[34,45],numberexpr:[37,95,41,42,43,44,10,11,12,13,16,17],significantli:[14,22,43,64,74,95,94,32,11,20,16],link_libs_in_shar:56,rl5:6,create_entry_block_alloca:13,sparseset:14,rl7:6,mutual:[37,18,39,15,17],targetfunc:14,minsizerel:52,the_modul:[10,11,12,13,17],percent:36,constantfold:34,parsecommandlineopt:18,other:[27,53,0,28,41,29,1,75,30,77,31,2,59,3,4,81,61,33,34,35,88,71,6,37,20,39,40,7,42,43,44,8,9,10,11,12,13,14,15,16,17,46,47,85,62,74,18,84,87,89,64,65,19,49,66,86,93,80,21,68,51,52,69,70,22,36,73,57,55,23,95,94,91,24,56,97,26],bool:[57,75,34,47,36,37,41,42,43,44,10,11,12,13,14,17,85,62,18,87,64,52,71],branch:[27,75,77,2,20,33,88,81,41,42,43,11,12,13,14,47,62,21,69,91,71,23],neelakantam:27,inst_iter:14,keep_symbol:56,hacker:[33,23],junk:[10,11,12,13,16,17],xxxsubtarget:47,indexedmap:[71,14],add_subdirectori:52,ptrreg:71,debian:[54,21,7],stringmap:[18,14,6],experienc:70,sass:6,reliabl:[71,1],subregclasslist:47,pdata:19,emerg:82,auxiliari:47,invari:[21,51,36,!
 20,64,27,
 14],istermin:68},objtypes:{"0":"std:option"},titles:["Auto-Vectorization in LLVM","lit - LLVM Integrated Tester","LLVM Branch Weight Metadata","System Library","FileCheck - Flexible pattern matching file verifier","llvm-extract - extract a function from an LLVM module","User Guide for NVPTX Back-end","How To Cross-Compile Clang/LLVM using Clang/LLVM","LLVM Testing Infrastructure Guide","8. Kaleidoscope: Conclusion and other useful LLVM tidbits","4. Kaleidoscope: Adding JIT and Optimizer Support","5. Kaleidoscope: Extending the Language: Control Flow","6. Kaleidoscope: Extending the Language: User-defined Operators","7. Kaleidoscope: Extending the Language: Mutable Variables","LLVM Programmer’s Manual","1. Kaleidoscope: Tutorial Introduction and the Lexer","2. Kaleidoscope: Implementing a Parser and AST","3. Kaleidoscope: Code generation to LLVM IR","CommandLine 2.0 Library Manual","LLVM Extensions","LLVM Language Reference Manual","Getting Started with the LLVM System!
 ","LLVM 3
 .4.1 Release Notes","LLVM Developer Policy","LLVMBuild Guide","LLVM’s Optional Rich Disassembly Output","TableGen Language Reference","LLVM’s Analysis and Transform Passes","How To Validate a New Release","LLVM test-suite Makefile Guide","How To Build On ARM","Getting Started with the LLVM System using Microsoft Visual Studio","llvm-bcanalyzer - LLVM bitcode analyzer","Overview","Extending LLVM: Adding instructions, intrinsics, types, etc.","8. Kaleidoscope: Conclusion and other useful LLVM tidbits","LLVM Alias Analysis Infrastructure","3. Kaleidoscope: Code generation to LLVM IR","bugpoint - automatic test case reduction tool","1. Kaleidoscope: Tutorial Introduction and the Lexer","llvm-diff - LLVM structural ‘diff’","7. Kaleidoscope: Extending the Language: Mutable Variables","6. Kaleidoscope: Extending the Language: User-defined Operators","5. Kaleidoscope: Extending the Language: Control Flow","4. Kaleidoscope: Adding JIT and Optimizer Support","!
 Creating 
 an LLVM Project","LLVM Tutorial: Table of Contents","Writing an LLVM Backend","llvm-build - LLVM Project Build Utility","How To Use Attributes","llvm-readobj - LLVM Object Reader","The LLVM Lexicon","Building LLVM with CMake","How to submit an LLVM bug report","Advice on Packaging LLVM","The LLVM gold plugin","LLVM Makefile Guide","YAML I/O","LLVM Command Guide","How To Use Instruction Mappings","llvm-stress - generate random .ll files","MCJIT Design and Implementation","Accurate Garbage Collection with LLVM","llvm-prof - print execution profile of LLVM program","Writing an LLVM Pass","llc - LLVM static compiler","llvm-symbolizer - convert addresses into source code locations","lli - directly execute programs from LLVM bitcode","TableGen Fundamentals","Code Reviews with Phabricator","LLVM bugpoint tool: design and usage","The LLVM Target-Independent Code Generator","Segmented Stacks in LLVM","LLVM Atomic Instructions and Concurrency Guide","LLVM Link Time Optimization: Desi!
 gn and Im
 plementation","LLVM Coding Standards","llvm-dis - LLVM disassembler","How To Release LLVM To The Public","llvm-cov - emit coverage information","llvm-as - LLVM assembler","llvm-ar - LLVM archiver","Frequently Asked Questions (FAQ)","Debugging JIT-ed Code With GDB","llvm-config - Print LLVM compilation options","opt - LLVM optimizer","How to set up LLVM-style RTTI for your class hierarchy","The Often Misunderstood GEP Instruction","Source Level Debugging with LLVM","Architecture & Platform Information for Compiler Writers","Sphinx Quickstart Template","llvm-link - LLVM bitcode linker","Exception Handling in LLVM","yaml2obj","llvm-nm - list LLVM bitcode and object file’s symbol table","LLVM Bitcode File Format","2. Kaleidoscope: Implementing a Parser and AST","How To Add Your Build Configuration To LLVM Buildbot Infrastructure","tblgen - Target Description To C++ Code Generator"],objnames:{"0":["std","option","option"]},filenames:["Vectorizers","CommandGuide/lit","B!
 ranchWeig
 htMetadata","SystemLibrary","CommandGuide/FileCheck","CommandGuide/llvm-extract","NVPTXUsage","HowToCrossCompileLLVM","TestingGuide","tutorial/OCamlLangImpl8","tutorial/OCamlLangImpl4","tutorial/OCamlLangImpl5","tutorial/OCamlLangImpl6","tutorial/OCamlLangImpl7","ProgrammersManual","tutorial/OCamlLangImpl1","tutorial/OCamlLangImpl2","tutorial/OCamlLangImpl3","CommandLine","Extensions","LangRef","GettingStarted","ReleaseNotes","DeveloperPolicy","LLVMBuild","MarkedUpDisassembly","TableGen/LangRef","Passes","ReleaseProcess","TestSuiteMakefileGuide","HowToBuildOnARM","GettingStartedVS","CommandGuide/llvm-bcanalyzer","index","ExtendingLLVM","tutorial/LangImpl8","AliasAnalysis","tutorial/LangImpl3","CommandGuide/bugpoint","tutorial/LangImpl1","CommandGuide/llvm-diff","tutorial/LangImpl7","tutorial/LangImpl6","tutorial/LangImpl5","tutorial/LangImpl4","Projects","tutorial/index","WritingAnLLVMBackend","CommandGuide/llvm-build","HowToUseAttributes","CommandGuide/llvm-readobj","Lexic!
 on","CMak
 e","HowToSubmitABug","Packaging","GoldPlugin","MakefileGuide","YamlIO","CommandGuide/index","HowToUseInstrMappings","CommandGuide/llvm-stress","MCJITDesignAndImplementation","GarbageCollection","CommandGuide/llvm-prof","WritingAnLLVMPass","CommandGuide/llc","CommandGuide/llvm-symbolizer","CommandGuide/lli","TableGenFundamentals","Phabricator","Bugpoint","CodeGenerator","SegmentedStacks","Atomics","LinkTimeOptimization","CodingStandards","CommandGuide/llvm-dis","HowToReleaseLLVM","CommandGuide/llvm-cov","CommandGuide/llvm-as","CommandGuide/llvm-ar","FAQ","DebuggingJITedCode","CommandGuide/llvm-config","CommandGuide/opt","HowToSetUpLLVMStyleRTTI","GetElementPtr","SourceLevelDebugging","CompilerWriterInfo","SphinxQuickstartTemplate","CommandGuide/llvm-link","ExceptionHandling","yaml2obj","CommandGuide/llvm-nm","BitCodeFormat","tutorial/LangImpl2","HowToAddABuilder","CommandGuide/tblgen"]})
\ No newline at end of file

Added: www-releases/trunk/3.4.1/docs/tutorial/LangImpl1.html
URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/3.4.1/docs/tutorial/LangImpl1.html?rev=208244&view=auto
==============================================================================
--- www-releases/trunk/3.4.1/docs/tutorial/LangImpl1.html (added)
+++ www-releases/trunk/3.4.1/docs/tutorial/LangImpl1.html Wed May  7 15:09:32 2014
@@ -0,0 +1,350 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>1. Kaleidoscope: Tutorial Introduction and the Lexer — LLVM 3.4 documentation</title>
+    
+    <link rel="stylesheet" href="../_static/llvm-theme.css" type="text/css" />
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '3.4',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../_static/jquery.js"></script>
+    <script type="text/javascript" src="../_static/underscore.js"></script>
+    <script type="text/javascript" src="../_static/doctools.js"></script>
+    <link rel="top" title="LLVM 3.4 documentation" href="../index.html" />
+    <link rel="up" title="LLVM Tutorial: Table of Contents" href="index.html" />
+    <link rel="next" title="2. Kaleidoscope: Implementing a Parser and AST" href="LangImpl2.html" />
+    <link rel="prev" title="LLVM Tutorial: Table of Contents" href="index.html" />
+<style type="text/css">
+  table.right { float: right; margin-left: 20px; }
+  table.right td { border: 1px solid #ccc; }
+</style>
+
+  </head>
+  <body>
+<div class="logo">
+  <a href="../index.html">
+    <img src="../_static/logo.png"
+         alt="LLVM Logo" width="250" height="88"/></a>
+</div>
+
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="LangImpl2.html" title="2. Kaleidoscope: Implementing a Parser and AST"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="index.html" title="LLVM Tutorial: Table of Contents"
+             accesskey="P">previous</a> |</li>
+  <li><a href="http://llvm.org/">LLVM Home</a> | </li>
+  <li><a href="../index.html">Documentation</a>»</li>
+
+          <li><a href="index.html" accesskey="U">LLVM Tutorial: Table of Contents</a> »</li> 
+      </ul>
+    </div>
+
+
+    <div class="document">
+      <div class="documentwrapper">
+          <div class="body">
+            
+  <div class="section" id="kaleidoscope-tutorial-introduction-and-the-lexer">
+<h1>1. Kaleidoscope: Tutorial Introduction and the Lexer<a class="headerlink" href="#kaleidoscope-tutorial-introduction-and-the-lexer" title="Permalink to this headline">¶</a></h1>
+<div class="contents local topic" id="contents">
+<ul class="simple">
+<li><a class="reference internal" href="#tutorial-introduction" id="id1">Tutorial Introduction</a></li>
+<li><a class="reference internal" href="#the-basic-language" id="id2">The Basic Language</a></li>
+<li><a class="reference internal" href="#the-lexer" id="id3">The Lexer</a></li>
+</ul>
+</div>
+<div class="section" id="tutorial-introduction">
+<h2><a class="toc-backref" href="#id1">1.1. Tutorial Introduction</a><a class="headerlink" href="#tutorial-introduction" title="Permalink to this headline">¶</a></h2>
+<p>Welcome to the “Implementing a language with LLVM” tutorial. This
+tutorial runs through the implementation of a simple language, showing
+how fun and easy it can be. This tutorial will get you up and started as
+well as help to build a framework you can extend to other languages. The
+code in this tutorial can also be used as a playground to hack on other
+LLVM specific things.</p>
+<p>The goal of this tutorial is to progressively unveil our language,
+describing how it is built up over time. This will let us cover a fairly
+broad range of language design and LLVM-specific usage issues, showing
+and explaining the code for it all along the way, without overwhelming
+you with tons of details up front.</p>
+<p>It is useful to point out ahead of time that this tutorial is really
+about teaching compiler techniques and LLVM specifically, <em>not</em> about
+teaching modern and sane software engineering principles. In practice,
+this means that we’ll take a number of shortcuts to simplify the
+exposition. For example, the code leaks memory, uses global variables
+all over the place, doesn’t use nice design patterns like
+<a class="reference external" href="http://en.wikipedia.org/wiki/Visitor_pattern">visitors</a>, etc... but
+it is very simple. If you dig in and use the code as a basis for future
+projects, fixing these deficiencies shouldn’t be hard.</p>
+<p>I’ve tried to put this tutorial together in a way that makes chapters
+easy to skip over if you are already familiar with or are uninterested
+in the various pieces. The structure of the tutorial is:</p>
+<ul class="simple">
+<li><a class="reference external" href="#language">Chapter #1</a>: Introduction to the Kaleidoscope
+language, and the definition of its Lexer - This shows where we are
+going and the basic functionality that we want it to do. In order to
+make this tutorial maximally understandable and hackable, we choose
+to implement everything in C++ instead of using lexer and parser
+generators. LLVM obviously works just fine with such tools, feel free
+to use one if you prefer.</li>
+<li><a class="reference external" href="LangImpl2.html">Chapter #2</a>: Implementing a Parser and AST -
+With the lexer in place, we can talk about parsing techniques and
+basic AST construction. This tutorial describes recursive descent
+parsing and operator precedence parsing. Nothing in Chapters 1 or 2
+is LLVM-specific, the code doesn’t even link in LLVM at this point.
+:)</li>
+<li><a class="reference external" href="LangImpl3.html">Chapter #3</a>: Code generation to LLVM IR - With
+the AST ready, we can show off how easy generation of LLVM IR really
+is.</li>
+<li><a class="reference external" href="LangImpl4.html">Chapter #4</a>: Adding JIT and Optimizer Support
+- Because a lot of people are interested in using LLVM as a JIT,
+we’ll dive right into it and show you the 3 lines it takes to add JIT
+support. LLVM is also useful in many other ways, but this is one
+simple and “sexy” way to show off its power. :)</li>
+<li><a class="reference external" href="LangImpl5.html">Chapter #5</a>: Extending the Language: Control
+Flow - With the language up and running, we show how to extend it
+with control flow operations (if/then/else and a ‘for’ loop). This
+gives us a chance to talk about simple SSA construction and control
+flow.</li>
+<li><a class="reference external" href="LangImpl6.html">Chapter #6</a>: Extending the Language:
+User-defined Operators - This is a silly but fun chapter that talks
+about extending the language to let the user program define their own
+arbitrary unary and binary operators (with assignable precedence!).
+This lets us build a significant piece of the “language” as library
+routines.</li>
+<li><a class="reference external" href="LangImpl7.html">Chapter #7</a>: Extending the Language: Mutable
+Variables - This chapter talks about adding user-defined local
+variables along with an assignment operator. The interesting part
+about this is how easy and trivial it is to construct SSA form in
+LLVM: no, LLVM does <em>not</em> require your front-end to construct SSA
+form!</li>
+<li><a class="reference external" href="LangImpl8.html">Chapter #8</a>: Conclusion and other useful LLVM
+tidbits - This chapter wraps up the series by talking about
+potential ways to extend the language, but also includes a bunch of
+pointers to info about “special topics” like adding garbage
+collection support, exceptions, debugging, support for “spaghetti
+stacks”, and a bunch of other tips and tricks.</li>
+</ul>
+<p>By the end of the tutorial, we’ll have written a bit less than 700 lines
+of non-comment, non-blank, lines of code. With this small amount of
+code, we’ll have built up a very reasonable compiler for a non-trivial
+language including a hand-written lexer, parser, AST, as well as code
+generation support with a JIT compiler. While other systems may have
+interesting “hello world” tutorials, I think the breadth of this
+tutorial is a great testament to the strengths of LLVM and why you
+should consider it if you’re interested in language or compiler design.</p>
+<p>A note about this tutorial: we expect you to extend the language and
+play with it on your own. Take the code and go crazy hacking away at it,
+compilers don’t need to be scary creatures - it can be a lot of fun to
+play with languages!</p>
+</div>
+<div class="section" id="the-basic-language">
+<h2><a class="toc-backref" href="#id2">1.2. The Basic Language</a><a class="headerlink" href="#the-basic-language" title="Permalink to this headline">¶</a></h2>
+<p>This tutorial will be illustrated with a toy language that we’ll call
+“<a class="reference external" href="http://en.wikipedia.org/wiki/Kaleidoscope">Kaleidoscope</a>” (derived
+from “meaning beautiful, form, and view”). Kaleidoscope is a procedural
+language that allows you to define functions, use conditionals, math,
+etc. Over the course of the tutorial, we’ll extend Kaleidoscope to
+support the if/then/else construct, a for loop, user defined operators,
+JIT compilation with a simple command line interface, etc.</p>
+<p>Because we want to keep things simple, the only datatype in Kaleidoscope
+is a 64-bit floating point type (aka ‘double’ in C parlance). As such,
+all values are implicitly double precision and the language doesn’t
+require type declarations. This gives the language a very nice and
+simple syntax. For example, the following simple example computes
+<a class="reference external" href="http://en.wikipedia.org/wiki/Fibonacci_number">Fibonacci numbers:</a></p>
+<div class="highlight-python"><pre># Compute the x'th fibonacci number.
+def fib(x)
+  if x < 3 then
+    1
+  else
+    fib(x-1)+fib(x-2)
+
+# This expression will compute the 40th number.
+fib(40)</pre>
+</div>
+<p>We also allow Kaleidoscope to call into standard library functions (the
+LLVM JIT makes this completely trivial). This means that you can use the
+‘extern’ keyword to define a function before you use it (this is also
+useful for mutually recursive functions). For example:</p>
+<div class="highlight-python"><pre>extern sin(arg);
+extern cos(arg);
+extern atan2(arg1 arg2);
+
+atan2(sin(.4), cos(42))</pre>
+</div>
+<p>A more interesting example is included in Chapter 6 where we write a
+little Kaleidoscope application that <a class="reference external" href="LangImpl6.html#example">displays a Mandelbrot
+Set</a> at various levels of magnification.</p>
+<p>Lets dive into the implementation of this language!</p>
+</div>
+<div class="section" id="the-lexer">
+<h2><a class="toc-backref" href="#id3">1.3. The Lexer</a><a class="headerlink" href="#the-lexer" title="Permalink to this headline">¶</a></h2>
+<p>When it comes to implementing a language, the first thing needed is the
+ability to process a text file and recognize what it says. The
+traditional way to do this is to use a
+“<a class="reference external" href="http://en.wikipedia.org/wiki/Lexical_analysis">lexer</a>” (aka
+‘scanner’) to break the input up into “tokens”. Each token returned by
+the lexer includes a token code and potentially some metadata (e.g. the
+numeric value of a number). First, we define the possibilities:</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="c1">// The lexer returns tokens [0-255] if it is an unknown character, otherwise one</span>
+<span class="c1">// of these for known things.</span>
+<span class="k">enum</span> <span class="n">Token</span> <span class="p">{</span>
+  <span class="n">tok_eof</span> <span class="o">=</span> <span class="o">-</span><span class="mi">1</span><span class="p">,</span>
+
+  <span class="c1">// commands</span>
+  <span class="n">tok_def</span> <span class="o">=</span> <span class="o">-</span><span class="mi">2</span><span class="p">,</span> <span class="n">tok_extern</span> <span class="o">=</span> <span class="o">-</span><span class="mi">3</span><span class="p">,</span>
+
+  <span class="c1">// primary</span>
+  <span class="n">tok_identifier</span> <span class="o">=</span> <span class="o">-</span><span class="mi">4</span><span class="p">,</span> <span class="n">tok_number</span> <span class="o">=</span> <span class="o">-</span><span class="mi">5</span><span class="p">,</span>
+<span class="p">};</span>
+
+<span class="k">static</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">IdentifierStr</span><span class="p">;</span>  <span class="c1">// Filled in if tok_identifier</span>
+<span class="k">static</span> <span class="kt">double</span> <span class="n">NumVal</span><span class="p">;</span>              <span class="c1">// Filled in if tok_number</span>
+</pre></div>
+</div>
+<p>Each token returned by our lexer will either be one of the Token enum
+values or it will be an ‘unknown’ character like ‘+’, which is returned
+as its ASCII value. If the current token is an identifier, the
+<tt class="docutils literal"><span class="pre">IdentifierStr</span></tt> global variable holds the name of the identifier. If
+the current token is a numeric literal (like 1.0), <tt class="docutils literal"><span class="pre">NumVal</span></tt> holds its
+value. Note that we use global variables for simplicity, this is not the
+best choice for a real language implementation :).</p>
+<p>The actual implementation of the lexer is a single function named
+<tt class="docutils literal"><span class="pre">gettok</span></tt>. The <tt class="docutils literal"><span class="pre">gettok</span></tt> function is called to return the next token
+from standard input. Its definition starts as:</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="c1">/// gettok - Return the next token from standard input.</span>
+<span class="k">static</span> <span class="kt">int</span> <span class="nf">gettok</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">static</span> <span class="kt">int</span> <span class="n">LastChar</span> <span class="o">=</span> <span class="sc">' '</span><span class="p">;</span>
+
+  <span class="c1">// Skip any whitespace.</span>
+  <span class="k">while</span> <span class="p">(</span><span class="n">isspace</span><span class="p">(</span><span class="n">LastChar</span><span class="p">))</span>
+    <span class="n">LastChar</span> <span class="o">=</span> <span class="n">getchar</span><span class="p">();</span>
+</pre></div>
+</div>
+<p><tt class="docutils literal"><span class="pre">gettok</span></tt> works by calling the C <tt class="docutils literal"><span class="pre">getchar()</span></tt> function to read
+characters one at a time from standard input. It eats them as it
+recognizes them and stores the last character read, but not processed,
+in LastChar. The first thing that it has to do is ignore whitespace
+between tokens. This is accomplished with the loop above.</p>
+<p>The next thing <tt class="docutils literal"><span class="pre">gettok</span></tt> needs to do is recognize identifiers and
+specific keywords like “def”. Kaleidoscope does this with this simple
+loop:</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="k">if</span> <span class="p">(</span><span class="n">isalpha</span><span class="p">(</span><span class="n">LastChar</span><span class="p">))</span> <span class="p">{</span> <span class="c1">// identifier: [a-zA-Z][a-zA-Z0-9]*</span>
+  <span class="n">IdentifierStr</span> <span class="o">=</span> <span class="n">LastChar</span><span class="p">;</span>
+  <span class="k">while</span> <span class="p">(</span><span class="n">isalnum</span><span class="p">((</span><span class="n">LastChar</span> <span class="o">=</span> <span class="n">getchar</span><span class="p">())))</span>
+    <span class="n">IdentifierStr</span> <span class="o">+=</span> <span class="n">LastChar</span><span class="p">;</span>
+
+  <span class="k">if</span> <span class="p">(</span><span class="n">IdentifierStr</span> <span class="o">==</span> <span class="s">"def"</span><span class="p">)</span> <span class="k">return</span> <span class="n">tok_def</span><span class="p">;</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">IdentifierStr</span> <span class="o">==</span> <span class="s">"extern"</span><span class="p">)</span> <span class="k">return</span> <span class="n">tok_extern</span><span class="p">;</span>
+  <span class="k">return</span> <span class="n">tok_identifier</span><span class="p">;</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<p>Note that this code sets the ‘<tt class="docutils literal"><span class="pre">IdentifierStr</span></tt>‘ global whenever it
+lexes an identifier. Also, since language keywords are matched by the
+same loop, we handle them here inline. Numeric values are similar:</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="k">if</span> <span class="p">(</span><span class="n">isdigit</span><span class="p">(</span><span class="n">LastChar</span><span class="p">)</span> <span class="o">||</span> <span class="n">LastChar</span> <span class="o">==</span> <span class="sc">'.'</span><span class="p">)</span> <span class="p">{</span>   <span class="c1">// Number: [0-9.]+</span>
+  <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">NumStr</span><span class="p">;</span>
+  <span class="k">do</span> <span class="p">{</span>
+    <span class="n">NumStr</span> <span class="o">+=</span> <span class="n">LastChar</span><span class="p">;</span>
+    <span class="n">LastChar</span> <span class="o">=</span> <span class="n">getchar</span><span class="p">();</span>
+  <span class="p">}</span> <span class="k">while</span> <span class="p">(</span><span class="n">isdigit</span><span class="p">(</span><span class="n">LastChar</span><span class="p">)</span> <span class="o">||</span> <span class="n">LastChar</span> <span class="o">==</span> <span class="sc">'.'</span><span class="p">);</span>
+
+  <span class="n">NumVal</span> <span class="o">=</span> <span class="n">strtod</span><span class="p">(</span><span class="n">NumStr</span><span class="p">.</span><span class="n">c_str</span><span class="p">(),</span> <span class="mi">0</span><span class="p">);</span>
+  <span class="k">return</span> <span class="n">tok_number</span><span class="p">;</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<p>This is all pretty straight-forward code for processing input. When
+reading a numeric value from input, we use the C <tt class="docutils literal"><span class="pre">strtod</span></tt> function to
+convert it to a numeric value that we store in <tt class="docutils literal"><span class="pre">NumVal</span></tt>. Note that
+this isn’t doing sufficient error checking: it will incorrectly read
+“1.23.45.67” and handle it as if you typed in “1.23”. Feel free to
+extend it :). Next we handle comments:</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="k">if</span> <span class="p">(</span><span class="n">LastChar</span> <span class="o">==</span> <span class="sc">'#'</span><span class="p">)</span> <span class="p">{</span>
+  <span class="c1">// Comment until end of line.</span>
+  <span class="k">do</span> <span class="n">LastChar</span> <span class="o">=</span> <span class="n">getchar</span><span class="p">();</span>
+  <span class="k">while</span> <span class="p">(</span><span class="n">LastChar</span> <span class="o">!=</span> <span class="n">EOF</span> <span class="o">&&</span> <span class="n">LastChar</span> <span class="o">!=</span> <span class="sc">'\n'</span> <span class="o">&&</span> <span class="n">LastChar</span> <span class="o">!=</span> <span class="sc">'\r'</span><span class="p">);</span>
+
+  <span class="k">if</span> <span class="p">(</span><span class="n">LastChar</span> <span class="o">!=</span> <span class="n">EOF</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">gettok</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<p>We handle comments by skipping to the end of the line and then return
+the next token. Finally, if the input doesn’t match one of the above
+cases, it is either an operator character like ‘+’ or the end of the
+file. These are handled with this code:</p>
+<div class="highlight-c++"><div class="highlight"><pre>  <span class="c1">// Check for end of file.  Don't eat the EOF.</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">LastChar</span> <span class="o">==</span> <span class="n">EOF</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">tok_eof</span><span class="p">;</span>
+
+  <span class="c1">// Otherwise, just return the character as its ascii value.</span>
+  <span class="kt">int</span> <span class="n">ThisChar</span> <span class="o">=</span> <span class="n">LastChar</span><span class="p">;</span>
+  <span class="n">LastChar</span> <span class="o">=</span> <span class="n">getchar</span><span class="p">();</span>
+  <span class="k">return</span> <span class="n">ThisChar</span><span class="p">;</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<p>With this, we have the complete lexer for the basic Kaleidoscope
+language (the <a class="reference external" href="LangImpl2.html#code">full code listing</a> for the Lexer
+is available in the <a class="reference external" href="LangImpl2.html">next chapter</a> of the tutorial).
+Next we’ll <a class="reference external" href="LangImpl2.html">build a simple parser that uses this to build an Abstract
+Syntax Tree</a>. When we have that, we’ll include a
+driver so that you can use the lexer and parser together.</p>
+<p><a class="reference external" href="LangImpl2.html">Next: Implementing a Parser and AST</a></p>
+</div>
+</div>
+
+
+          </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="LangImpl2.html" title="2. Kaleidoscope: Implementing a Parser and AST"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="index.html" title="LLVM Tutorial: Table of Contents"
+             >previous</a> |</li>
+  <li><a href="http://llvm.org/">LLVM Home</a> | </li>
+  <li><a href="../index.html">Documentation</a>»</li>
+
+          <li><a href="index.html" >LLVM Tutorial: Table of Contents</a> »</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        © Copyright 2003-2013, LLVM Project.
+      Last updated on 2014-05-06.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
+    </div>
+  </body>
+</html>
\ No newline at end of file

Added: www-releases/trunk/3.4.1/docs/tutorial/LangImpl2.html
URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/3.4.1/docs/tutorial/LangImpl2.html?rev=208244&view=auto
==============================================================================
--- www-releases/trunk/3.4.1/docs/tutorial/LangImpl2.html (added)
+++ www-releases/trunk/3.4.1/docs/tutorial/LangImpl2.html Wed May  7 15:09:32 2014
@@ -0,0 +1,1117 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>2. Kaleidoscope: Implementing a Parser and AST — LLVM 3.4 documentation</title>
+    
+    <link rel="stylesheet" href="../_static/llvm-theme.css" type="text/css" />
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '3.4',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../_static/jquery.js"></script>
+    <script type="text/javascript" src="../_static/underscore.js"></script>
+    <script type="text/javascript" src="../_static/doctools.js"></script>
+    <link rel="top" title="LLVM 3.4 documentation" href="../index.html" />
+    <link rel="up" title="LLVM Tutorial: Table of Contents" href="index.html" />
+    <link rel="next" title="3. Kaleidoscope: Code generation to LLVM IR" href="LangImpl3.html" />
+    <link rel="prev" title="1. Kaleidoscope: Tutorial Introduction and the Lexer" href="LangImpl1.html" />
+<style type="text/css">
+  table.right { float: right; margin-left: 20px; }
+  table.right td { border: 1px solid #ccc; }
+</style>
+
+  </head>
+  <body>
+<div class="logo">
+  <a href="../index.html">
+    <img src="../_static/logo.png"
+         alt="LLVM Logo" width="250" height="88"/></a>
+</div>
+
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="LangImpl3.html" title="3. Kaleidoscope: Code generation to LLVM IR"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="LangImpl1.html" title="1. Kaleidoscope: Tutorial Introduction and the Lexer"
+             accesskey="P">previous</a> |</li>
+  <li><a href="http://llvm.org/">LLVM Home</a> | </li>
+  <li><a href="../index.html">Documentation</a>»</li>
+
+          <li><a href="index.html" accesskey="U">LLVM Tutorial: Table of Contents</a> »</li> 
+      </ul>
+    </div>
+
+
+    <div class="document">
+      <div class="documentwrapper">
+          <div class="body">
+            
+  <div class="section" id="kaleidoscope-implementing-a-parser-and-ast">
+<h1>2. Kaleidoscope: Implementing a Parser and AST<a class="headerlink" href="#kaleidoscope-implementing-a-parser-and-ast" title="Permalink to this headline">¶</a></h1>
+<div class="contents local topic" id="contents">
+<ul class="simple">
+<li><a class="reference internal" href="#chapter-2-introduction" id="id2">Chapter 2 Introduction</a></li>
+<li><a class="reference internal" href="#the-abstract-syntax-tree-ast" id="id3">The Abstract Syntax Tree (AST)</a></li>
+<li><a class="reference internal" href="#parser-basics" id="id4">Parser Basics</a></li>
+<li><a class="reference internal" href="#basic-expression-parsing" id="id5">Basic Expression Parsing</a></li>
+<li><a class="reference internal" href="#binary-expression-parsing" id="id6">Binary Expression Parsing</a></li>
+<li><a class="reference internal" href="#parsing-the-rest" id="id7">Parsing the Rest</a></li>
+<li><a class="reference internal" href="#the-driver" id="id8">The Driver</a></li>
+<li><a class="reference internal" href="#conclusions" id="id9">Conclusions</a></li>
+<li><a class="reference internal" href="#full-code-listing" id="id10">Full Code Listing</a></li>
+</ul>
+</div>
+<div class="section" id="chapter-2-introduction">
+<h2><a class="toc-backref" href="#id2">2.1. Chapter 2 Introduction</a><a class="headerlink" href="#chapter-2-introduction" title="Permalink to this headline">¶</a></h2>
+<p>Welcome to Chapter 2 of the “<a class="reference external" href="index.html">Implementing a language with
+LLVM</a>” tutorial. This chapter shows you how to use the
+lexer, built in <a class="reference external" href="LangImpl1.html">Chapter 1</a>, to build a full
+<a class="reference external" href="http://en.wikipedia.org/wiki/Parsing">parser</a> for our Kaleidoscope
+language. Once we have a parser, we’ll define and build an <a class="reference external" href="http://en.wikipedia.org/wiki/Abstract_syntax_tree">Abstract
+Syntax Tree</a> (AST).</p>
+<p>The parser we will build uses a combination of <a class="reference external" href="http://en.wikipedia.org/wiki/Recursive_descent_parser">Recursive Descent
+Parsing</a> and
+<a class="reference external" href="http://en.wikipedia.org/wiki/Operator-precedence_parser">Operator-Precedence
+Parsing</a> to
+parse the Kaleidoscope language (the latter for binary expressions and
+the former for everything else). Before we get to parsing though, lets
+talk about the output of the parser: the Abstract Syntax Tree.</p>
+</div>
+<div class="section" id="the-abstract-syntax-tree-ast">
+<h2><a class="toc-backref" href="#id3">2.2. The Abstract Syntax Tree (AST)</a><a class="headerlink" href="#the-abstract-syntax-tree-ast" title="Permalink to this headline">¶</a></h2>
+<p>The AST for a program captures its behavior in such a way that it is
+easy for later stages of the compiler (e.g. code generation) to
+interpret. We basically want one object for each construct in the
+language, and the AST should closely model the language. In
+Kaleidoscope, we have expressions, a prototype, and a function object.
+We’ll start with expressions first:</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="c1">/// ExprAST - Base class for all expression nodes.</span>
+<span class="k">class</span> <span class="nc">ExprAST</span> <span class="p">{</span>
+<span class="nl">public:</span>
+  <span class="k">virtual</span> <span class="o">~</span><span class="n">ExprAST</span><span class="p">()</span> <span class="p">{}</span>
+<span class="p">};</span>
+
+<span class="c1">/// NumberExprAST - Expression class for numeric literals like "1.0".</span>
+<span class="k">class</span> <span class="nc">NumberExprAST</span> <span class="o">:</span> <span class="k">public</span> <span class="n">ExprAST</span> <span class="p">{</span>
+  <span class="kt">double</span> <span class="n">Val</span><span class="p">;</span>
+<span class="nl">public:</span>
+  <span class="n">NumberExprAST</span><span class="p">(</span><span class="kt">double</span> <span class="n">val</span><span class="p">)</span> <span class="o">:</span> <span class="n">Val</span><span class="p">(</span><span class="n">val</span><span class="p">)</span> <span class="p">{}</span>
+<span class="p">};</span>
+</pre></div>
+</div>
+<p>The code above shows the definition of the base ExprAST class and one
+subclass which we use for numeric literals. The important thing to note
+about this code is that the NumberExprAST class captures the numeric
+value of the literal as an instance variable. This allows later phases
+of the compiler to know what the stored numeric value is.</p>
+<p>Right now we only create the AST, so there are no useful accessor
+methods on them. It would be very easy to add a virtual method to pretty
+print the code, for example. Here are the other expression AST node
+definitions that we’ll use in the basic form of the Kaleidoscope
+language:</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="c1">/// VariableExprAST - Expression class for referencing a variable, like "a".</span>
+<span class="k">class</span> <span class="nc">VariableExprAST</span> <span class="o">:</span> <span class="k">public</span> <span class="n">ExprAST</span> <span class="p">{</span>
+  <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">Name</span><span class="p">;</span>
+<span class="nl">public:</span>
+  <span class="n">VariableExprAST</span><span class="p">(</span><span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="o">&</span><span class="n">name</span><span class="p">)</span> <span class="o">:</span> <span class="n">Name</span><span class="p">(</span><span class="n">name</span><span class="p">)</span> <span class="p">{}</span>
+<span class="p">};</span>
+
+<span class="c1">/// BinaryExprAST - Expression class for a binary operator.</span>
+<span class="k">class</span> <span class="nc">BinaryExprAST</span> <span class="o">:</span> <span class="k">public</span> <span class="n">ExprAST</span> <span class="p">{</span>
+  <span class="kt">char</span> <span class="n">Op</span><span class="p">;</span>
+  <span class="n">ExprAST</span> <span class="o">*</span><span class="n">LHS</span><span class="p">,</span> <span class="o">*</span><span class="n">RHS</span><span class="p">;</span>
+<span class="nl">public:</span>
+  <span class="n">BinaryExprAST</span><span class="p">(</span><span class="kt">char</span> <span class="n">op</span><span class="p">,</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="n">lhs</span><span class="p">,</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="n">rhs</span><span class="p">)</span>
+    <span class="o">:</span> <span class="n">Op</span><span class="p">(</span><span class="n">op</span><span class="p">),</span> <span class="n">LHS</span><span class="p">(</span><span class="n">lhs</span><span class="p">),</span> <span class="n">RHS</span><span class="p">(</span><span class="n">rhs</span><span class="p">)</span> <span class="p">{}</span>
+<span class="p">};</span>
+
+<span class="c1">/// CallExprAST - Expression class for function calls.</span>
+<span class="k">class</span> <span class="nc">CallExprAST</span> <span class="o">:</span> <span class="k">public</span> <span class="n">ExprAST</span> <span class="p">{</span>
+  <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">Callee</span><span class="p">;</span>
+  <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">ExprAST</span><span class="o">*></span> <span class="n">Args</span><span class="p">;</span>
+<span class="nl">public:</span>
+  <span class="n">CallExprAST</span><span class="p">(</span><span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="o">&</span><span class="n">callee</span><span class="p">,</span> <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">ExprAST</span><span class="o">*></span> <span class="o">&</span><span class="n">args</span><span class="p">)</span>
+    <span class="o">:</span> <span class="n">Callee</span><span class="p">(</span><span class="n">callee</span><span class="p">),</span> <span class="n">Args</span><span class="p">(</span><span class="n">args</span><span class="p">)</span> <span class="p">{}</span>
+<span class="p">};</span>
+</pre></div>
+</div>
+<p>This is all (intentionally) rather straight-forward: variables capture
+the variable name, binary operators capture their opcode (e.g. ‘+’), and
+calls capture a function name as well as a list of any argument
+expressions. One thing that is nice about our AST is that it captures
+the language features without talking about the syntax of the language.
+Note that there is no discussion about precedence of binary operators,
+lexical structure, etc.</p>
+<p>For our basic language, these are all of the expression nodes we’ll
+define. Because it doesn’t have conditional control flow, it isn’t
+Turing-complete; we’ll fix that in a later installment. The two things
+we need next are a way to talk about the interface to a function, and a
+way to talk about functions themselves:</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="c1">/// PrototypeAST - This class represents the "prototype" for a function,</span>
+<span class="c1">/// which captures its name, and its argument names (thus implicitly the number</span>
+<span class="c1">/// of arguments the function takes).</span>
+<span class="k">class</span> <span class="nc">PrototypeAST</span> <span class="p">{</span>
+  <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">Name</span><span class="p">;</span>
+  <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">></span> <span class="n">Args</span><span class="p">;</span>
+<span class="nl">public:</span>
+  <span class="n">PrototypeAST</span><span class="p">(</span><span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="o">&</span><span class="n">name</span><span class="p">,</span> <span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">></span> <span class="o">&</span><span class="n">args</span><span class="p">)</span>
+    <span class="o">:</span> <span class="n">Name</span><span class="p">(</span><span class="n">name</span><span class="p">),</span> <span class="n">Args</span><span class="p">(</span><span class="n">args</span><span class="p">)</span> <span class="p">{}</span>
+<span class="p">};</span>
+
+<span class="c1">/// FunctionAST - This class represents a function definition itself.</span>
+<span class="k">class</span> <span class="nc">FunctionAST</span> <span class="p">{</span>
+  <span class="n">PrototypeAST</span> <span class="o">*</span><span class="n">Proto</span><span class="p">;</span>
+  <span class="n">ExprAST</span> <span class="o">*</span><span class="n">Body</span><span class="p">;</span>
+<span class="nl">public:</span>
+  <span class="n">FunctionAST</span><span class="p">(</span><span class="n">PrototypeAST</span> <span class="o">*</span><span class="n">proto</span><span class="p">,</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="n">body</span><span class="p">)</span>
+    <span class="o">:</span> <span class="n">Proto</span><span class="p">(</span><span class="n">proto</span><span class="p">),</span> <span class="n">Body</span><span class="p">(</span><span class="n">body</span><span class="p">)</span> <span class="p">{}</span>
+<span class="p">};</span>
+</pre></div>
+</div>
+<p>In Kaleidoscope, functions are typed with just a count of their
+arguments. Since all values are double precision floating point, the
+type of each argument doesn’t need to be stored anywhere. In a more
+aggressive and realistic language, the “ExprAST” class would probably
+have a type field.</p>
+<p>With this scaffolding, we can now talk about parsing expressions and
+function bodies in Kaleidoscope.</p>
+</div>
+<div class="section" id="parser-basics">
+<h2><a class="toc-backref" href="#id4">2.3. Parser Basics</a><a class="headerlink" href="#parser-basics" title="Permalink to this headline">¶</a></h2>
+<p>Now that we have an AST to build, we need to define the parser code to
+build it. The idea here is that we want to parse something like “x+y”
+(which is returned as three tokens by the lexer) into an AST that could
+be generated with calls like this:</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="n">ExprAST</span> <span class="o">*</span><span class="n">X</span> <span class="o">=</span> <span class="k">new</span> <span class="n">VariableExprAST</span><span class="p">(</span><span class="s">"x"</span><span class="p">);</span>
+<span class="n">ExprAST</span> <span class="o">*</span><span class="n">Y</span> <span class="o">=</span> <span class="k">new</span> <span class="n">VariableExprAST</span><span class="p">(</span><span class="s">"y"</span><span class="p">);</span>
+<span class="n">ExprAST</span> <span class="o">*</span><span class="n">Result</span> <span class="o">=</span> <span class="k">new</span> <span class="n">BinaryExprAST</span><span class="p">(</span><span class="sc">'+'</span><span class="p">,</span> <span class="n">X</span><span class="p">,</span> <span class="n">Y</span><span class="p">);</span>
+</pre></div>
+</div>
+<p>In order to do this, we’ll start by defining some basic helper routines:</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="c1">/// CurTok/getNextToken - Provide a simple token buffer.  CurTok is the current</span>
+<span class="c1">/// token the parser is looking at.  getNextToken reads another token from the</span>
+<span class="c1">/// lexer and updates CurTok with its results.</span>
+<span class="k">static</span> <span class="kt">int</span> <span class="n">CurTok</span><span class="p">;</span>
+<span class="k">static</span> <span class="kt">int</span> <span class="nf">getNextToken</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">return</span> <span class="n">CurTok</span> <span class="o">=</span> <span class="n">gettok</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<p>This implements a simple token buffer around the lexer. This allows us
+to look one token ahead at what the lexer is returning. Every function
+in our parser will assume that CurTok is the current token that needs to
+be parsed.</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="c1">/// Error* - These are little helper functions for error handling.</span>
+<span class="n">ExprAST</span> <span class="o">*</span><span class="nf">Error</span><span class="p">(</span><span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">Str</span><span class="p">)</span> <span class="p">{</span> <span class="n">fprintf</span><span class="p">(</span><span class="n">stderr</span><span class="p">,</span> <span class="s">"Error: %s</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="n">Str</span><span class="p">);</span><span class="k">return</span> <span class="mi">0</span><span class="p">;}</span>
+<span class="n">PrototypeAST</span> <span class="o">*</span><span class="nf">ErrorP</span><span class="p">(</span><span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">Str</span><span class="p">)</span> <span class="p">{</span> <span class="n">Error</span><span class="p">(</span><span class="n">Str</span><span class="p">);</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span> <span class="p">}</span>
+<span class="n">FunctionAST</span> <span class="o">*</span><span class="nf">ErrorF</span><span class="p">(</span><span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">Str</span><span class="p">)</span> <span class="p">{</span> <span class="n">Error</span><span class="p">(</span><span class="n">Str</span><span class="p">);</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span> <span class="p">}</span>
+</pre></div>
+</div>
+<p>The <tt class="docutils literal"><span class="pre">Error</span></tt> routines are simple helper routines that our parser will
+use to handle errors. The error recovery in our parser will not be the
+best and is not particular user-friendly, but it will be enough for our
+tutorial. These routines make it easier to handle errors in routines
+that have various return types: they always return null.</p>
+<p>With these basic helper functions, we can implement the first piece of
+our grammar: numeric literals.</p>
+</div>
+<div class="section" id="basic-expression-parsing">
+<h2><a class="toc-backref" href="#id5">2.4. Basic Expression Parsing</a><a class="headerlink" href="#basic-expression-parsing" title="Permalink to this headline">¶</a></h2>
+<p>We start with numeric literals, because they are the simplest to
+process. For each production in our grammar, we’ll define a function
+which parses that production. For numeric literals, we have:</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="c1">/// numberexpr ::= number</span>
+<span class="k">static</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="nf">ParseNumberExpr</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">ExprAST</span> <span class="o">*</span><span class="n">Result</span> <span class="o">=</span> <span class="k">new</span> <span class="n">NumberExprAST</span><span class="p">(</span><span class="n">NumVal</span><span class="p">);</span>
+  <span class="n">getNextToken</span><span class="p">();</span> <span class="c1">// consume the number</span>
+  <span class="k">return</span> <span class="n">Result</span><span class="p">;</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<p>This routine is very simple: it expects to be called when the current
+token is a <tt class="docutils literal"><span class="pre">tok_number</span></tt> token. It takes the current number value,
+creates a <tt class="docutils literal"><span class="pre">NumberExprAST</span></tt> node, advances the lexer to the next token,
+and finally returns.</p>
+<p>There are some interesting aspects to this. The most important one is
+that this routine eats all of the tokens that correspond to the
+production and returns the lexer buffer with the next token (which is
+not part of the grammar production) ready to go. This is a fairly
+standard way to go for recursive descent parsers. For a better example,
+the parenthesis operator is defined like this:</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="c1">/// parenexpr ::= '(' expression ')'</span>
+<span class="k">static</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="nf">ParseParenExpr</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat (.</span>
+  <span class="n">ExprAST</span> <span class="o">*</span><span class="n">V</span> <span class="o">=</span> <span class="n">ParseExpression</span><span class="p">();</span>
+  <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">V</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+
+  <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="sc">')'</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">Error</span><span class="p">(</span><span class="s">"expected ')'"</span><span class="p">);</span>
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat ).</span>
+  <span class="k">return</span> <span class="n">V</span><span class="p">;</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<p>This function illustrates a number of interesting things about the
+parser:</p>
+<p>1) It shows how we use the Error routines. When called, this function
+expects that the current token is a ‘(‘ token, but after parsing the
+subexpression, it is possible that there is no ‘)’ waiting. For example,
+if the user types in “(4 x” instead of “(4)”, the parser should emit an
+error. Because errors can occur, the parser needs a way to indicate that
+they happened: in our parser, we return null on an error.</p>
+<p>2) Another interesting aspect of this function is that it uses recursion
+by calling <tt class="docutils literal"><span class="pre">ParseExpression</span></tt> (we will soon see that
+<tt class="docutils literal"><span class="pre">ParseExpression</span></tt> can call <tt class="docutils literal"><span class="pre">ParseParenExpr</span></tt>). This is powerful
+because it allows us to handle recursive grammars, and keeps each
+production very simple. Note that parentheses do not cause construction
+of AST nodes themselves. While we could do it this way, the most
+important role of parentheses are to guide the parser and provide
+grouping. Once the parser constructs the AST, parentheses are not
+needed.</p>
+<p>The next simple production is for handling variable references and
+function calls:</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="c1">/// identifierexpr</span>
+<span class="c1">///   ::= identifier</span>
+<span class="c1">///   ::= identifier '(' expression* ')'</span>
+<span class="k">static</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="nf">ParseIdentifierExpr</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">IdName</span> <span class="o">=</span> <span class="n">IdentifierStr</span><span class="p">;</span>
+
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat identifier.</span>
+
+  <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="sc">'('</span><span class="p">)</span> <span class="c1">// Simple variable ref.</span>
+    <span class="k">return</span> <span class="k">new</span> <span class="n">VariableExprAST</span><span class="p">(</span><span class="n">IdName</span><span class="p">);</span>
+
+  <span class="c1">// Call.</span>
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat (</span>
+  <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">ExprAST</span><span class="o">*></span> <span class="n">Args</span><span class="p">;</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="sc">')'</span><span class="p">)</span> <span class="p">{</span>
+    <span class="k">while</span> <span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="p">{</span>
+      <span class="n">ExprAST</span> <span class="o">*</span><span class="n">Arg</span> <span class="o">=</span> <span class="n">ParseExpression</span><span class="p">();</span>
+      <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">Arg</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+      <span class="n">Args</span><span class="p">.</span><span class="n">push_back</span><span class="p">(</span><span class="n">Arg</span><span class="p">);</span>
+
+      <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">==</span> <span class="sc">')'</span><span class="p">)</span> <span class="k">break</span><span class="p">;</span>
+
+      <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="sc">','</span><span class="p">)</span>
+        <span class="k">return</span> <span class="n">Error</span><span class="p">(</span><span class="s">"Expected ')' or ',' in argument list"</span><span class="p">);</span>
+      <span class="n">getNextToken</span><span class="p">();</span>
+    <span class="p">}</span>
+  <span class="p">}</span>
+
+  <span class="c1">// Eat the ')'.</span>
+  <span class="n">getNextToken</span><span class="p">();</span>
+
+  <span class="k">return</span> <span class="k">new</span> <span class="n">CallExprAST</span><span class="p">(</span><span class="n">IdName</span><span class="p">,</span> <span class="n">Args</span><span class="p">);</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<p>This routine follows the same style as the other routines. (It expects
+to be called if the current token is a <tt class="docutils literal"><span class="pre">tok_identifier</span></tt> token). It
+also has recursion and error handling. One interesting aspect of this is
+that it uses <em>look-ahead</em> to determine if the current identifier is a
+stand alone variable reference or if it is a function call expression.
+It handles this by checking to see if the token after the identifier is
+a ‘(‘ token, constructing either a <tt class="docutils literal"><span class="pre">VariableExprAST</span></tt> or
+<tt class="docutils literal"><span class="pre">CallExprAST</span></tt> node as appropriate.</p>
+<p>Now that we have all of our simple expression-parsing logic in place, we
+can define a helper function to wrap it together into one entry point.
+We call this class of expressions “primary” expressions, for reasons
+that will become more clear <a class="reference external" href="LangImpl6.html#unary">later in the
+tutorial</a>. In order to parse an arbitrary
+primary expression, we need to determine what sort of expression it is:</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="c1">/// primary</span>
+<span class="c1">///   ::= identifierexpr</span>
+<span class="c1">///   ::= numberexpr</span>
+<span class="c1">///   ::= parenexpr</span>
+<span class="k">static</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="nf">ParsePrimary</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">switch</span> <span class="p">(</span><span class="n">CurTok</span><span class="p">)</span> <span class="p">{</span>
+  <span class="nl">default:</span> <span class="k">return</span> <span class="n">Error</span><span class="p">(</span><span class="s">"unknown token when expecting an expression"</span><span class="p">);</span>
+  <span class="k">case</span> <span class="n">tok_identifier</span>: <span class="k">return</span> <span class="n">ParseIdentifierExpr</span><span class="p">();</span>
+  <span class="k">case</span> <span class="n">tok_number</span>:     <span class="k">return</span> <span class="n">ParseNumberExpr</span><span class="p">();</span>
+  <span class="k">case</span> <span class="sc">'('</span>:            <span class="k">return</span> <span class="n">ParseParenExpr</span><span class="p">();</span>
+  <span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<p>Now that you see the definition of this function, it is more obvious why
+we can assume the state of CurTok in the various functions. This uses
+look-ahead to determine which sort of expression is being inspected, and
+then parses it with a function call.</p>
+<p>Now that basic expressions are handled, we need to handle binary
+expressions. They are a bit more complex.</p>
+</div>
+<div class="section" id="binary-expression-parsing">
+<h2><a class="toc-backref" href="#id6">2.5. Binary Expression Parsing</a><a class="headerlink" href="#binary-expression-parsing" title="Permalink to this headline">¶</a></h2>
+<p>Binary expressions are significantly harder to parse because they are
+often ambiguous. For example, when given the string “x+y*z”, the parser
+can choose to parse it as either “(x+y)*z” or “x+(y*z)”. With common
+definitions from mathematics, we expect the later parse, because “*”
+(multiplication) has higher <em>precedence</em> than “+” (addition).</p>
+<p>There are many ways to handle this, but an elegant and efficient way is
+to use <a class="reference external" href="http://en.wikipedia.org/wiki/Operator-precedence_parser">Operator-Precedence
+Parsing</a>.
+This parsing technique uses the precedence of binary operators to guide
+recursion. To start with, we need a table of precedences:</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="c1">/// BinopPrecedence - This holds the precedence for each binary operator that is</span>
+<span class="c1">/// defined.</span>
+<span class="k">static</span> <span class="n">std</span><span class="o">::</span><span class="n">map</span><span class="o"><</span><span class="kt">char</span><span class="p">,</span> <span class="kt">int</span><span class="o">></span> <span class="n">BinopPrecedence</span><span class="p">;</span>
+
+<span class="c1">/// GetTokPrecedence - Get the precedence of the pending binary operator token.</span>
+<span class="k">static</span> <span class="kt">int</span> <span class="nf">GetTokPrecedence</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">isascii</span><span class="p">(</span><span class="n">CurTok</span><span class="p">))</span>
+    <span class="k">return</span> <span class="o">-</span><span class="mi">1</span><span class="p">;</span>
+
+  <span class="c1">// Make sure it's a declared binop.</span>
+  <span class="kt">int</span> <span class="n">TokPrec</span> <span class="o">=</span> <span class="n">BinopPrecedence</span><span class="p">[</span><span class="n">CurTok</span><span class="p">];</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">TokPrec</span> <span class="o"><=</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="o">-</span><span class="mi">1</span><span class="p">;</span>
+  <span class="k">return</span> <span class="n">TokPrec</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="kt">int</span> <span class="nf">main</span><span class="p">()</span> <span class="p">{</span>
+  <span class="c1">// Install standard binary operators.</span>
+  <span class="c1">// 1 is lowest precedence.</span>
+  <span class="n">BinopPrecedence</span><span class="p">[</span><span class="sc">'<'</span><span class="p">]</span> <span class="o">=</span> <span class="mi">10</span><span class="p">;</span>
+  <span class="n">BinopPrecedence</span><span class="p">[</span><span class="sc">'+'</span><span class="p">]</span> <span class="o">=</span> <span class="mi">20</span><span class="p">;</span>
+  <span class="n">BinopPrecedence</span><span class="p">[</span><span class="sc">'-'</span><span class="p">]</span> <span class="o">=</span> <span class="mi">20</span><span class="p">;</span>
+  <span class="n">BinopPrecedence</span><span class="p">[</span><span class="sc">'*'</span><span class="p">]</span> <span class="o">=</span> <span class="mi">40</span><span class="p">;</span>  <span class="c1">// highest.</span>
+  <span class="p">...</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<p>For the basic form of Kaleidoscope, we will only support 4 binary
+operators (this can obviously be extended by you, our brave and intrepid
+reader). The <tt class="docutils literal"><span class="pre">GetTokPrecedence</span></tt> function returns the precedence for
+the current token, or -1 if the token is not a binary operator. Having a
+map makes it easy to add new operators and makes it clear that the
+algorithm doesn’t depend on the specific operators involved, but it
+would be easy enough to eliminate the map and do the comparisons in the
+<tt class="docutils literal"><span class="pre">GetTokPrecedence</span></tt> function. (Or just use a fixed-size array).</p>
+<p>With the helper above defined, we can now start parsing binary
+expressions. The basic idea of operator precedence parsing is to break
+down an expression with potentially ambiguous binary operators into
+pieces. Consider ,for example, the expression “a+b+(c+d)*e*f+g”.
+Operator precedence parsing considers this as a stream of primary
+expressions separated by binary operators. As such, it will first parse
+the leading primary expression “a”, then it will see the pairs [+, b]
+[+, (c+d)] [*, e] [*, f] and [+, g]. Note that because parentheses are
+primary expressions, the binary expression parser doesn’t need to worry
+about nested subexpressions like (c+d) at all.</p>
+<p>To start, an expression is a primary expression potentially followed by
+a sequence of [binop,primaryexpr] pairs:</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="c1">/// expression</span>
+<span class="c1">///   ::= primary binoprhs</span>
+<span class="c1">///</span>
+<span class="k">static</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="nf">ParseExpression</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">ExprAST</span> <span class="o">*</span><span class="n">LHS</span> <span class="o">=</span> <span class="n">ParsePrimary</span><span class="p">();</span>
+  <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">LHS</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+
+  <span class="k">return</span> <span class="n">ParseBinOpRHS</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">LHS</span><span class="p">);</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<p><tt class="docutils literal"><span class="pre">ParseBinOpRHS</span></tt> is the function that parses the sequence of pairs for
+us. It takes a precedence and a pointer to an expression for the part
+that has been parsed so far. Note that “x” is a perfectly valid
+expression: As such, “binoprhs” is allowed to be empty, in which case it
+returns the expression that is passed into it. In our example above, the
+code passes the expression for “a” into <tt class="docutils literal"><span class="pre">ParseBinOpRHS</span></tt> and the
+current token is “+”.</p>
+<p>The precedence value passed into <tt class="docutils literal"><span class="pre">ParseBinOpRHS</span></tt> indicates the
+<em>minimal operator precedence</em> that the function is allowed to eat. For
+example, if the current pair stream is [+, x] and <tt class="docutils literal"><span class="pre">ParseBinOpRHS</span></tt> is
+passed in a precedence of 40, it will not consume any tokens (because
+the precedence of ‘+’ is only 20). With this in mind, <tt class="docutils literal"><span class="pre">ParseBinOpRHS</span></tt>
+starts with:</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="c1">/// binoprhs</span>
+<span class="c1">///   ::= ('+' primary)*</span>
+<span class="k">static</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="nf">ParseBinOpRHS</span><span class="p">(</span><span class="kt">int</span> <span class="n">ExprPrec</span><span class="p">,</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="n">LHS</span><span class="p">)</span> <span class="p">{</span>
+  <span class="c1">// If this is a binop, find its precedence.</span>
+  <span class="k">while</span> <span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="p">{</span>
+    <span class="kt">int</span> <span class="n">TokPrec</span> <span class="o">=</span> <span class="n">GetTokPrecedence</span><span class="p">();</span>
+
+    <span class="c1">// If this is a binop that binds at least as tightly as the current binop,</span>
+    <span class="c1">// consume it, otherwise we are done.</span>
+    <span class="k">if</span> <span class="p">(</span><span class="n">TokPrec</span> <span class="o"><</span> <span class="n">ExprPrec</span><span class="p">)</span>
+      <span class="k">return</span> <span class="n">LHS</span><span class="p">;</span>
+</pre></div>
+</div>
+<p>This code gets the precedence of the current token and checks to see if
+if is too low. Because we defined invalid tokens to have a precedence of
+-1, this check implicitly knows that the pair-stream ends when the token
+stream runs out of binary operators. If this check succeeds, we know
+that the token is a binary operator and that it will be included in this
+expression:</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="c1">// Okay, we know this is a binop.</span>
+<span class="kt">int</span> <span class="n">BinOp</span> <span class="o">=</span> <span class="n">CurTok</span><span class="p">;</span>
+<span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat binop</span>
+
+<span class="c1">// Parse the primary expression after the binary operator.</span>
+<span class="n">ExprAST</span> <span class="o">*</span><span class="n">RHS</span> <span class="o">=</span> <span class="n">ParsePrimary</span><span class="p">();</span>
+<span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">RHS</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+</pre></div>
+</div>
+<p>As such, this code eats (and remembers) the binary operator and then
+parses the primary expression that follows. This builds up the whole
+pair, the first of which is [+, b] for the running example.</p>
+<p>Now that we parsed the left-hand side of an expression and one pair of
+the RHS sequence, we have to decide which way the expression associates.
+In particular, we could have “(a+b) binop unparsed” or “a + (b binop
+unparsed)”. To determine this, we look ahead at “binop” to determine its
+precedence and compare it to BinOp’s precedence (which is ‘+’ in this
+case):</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="c1">// If BinOp binds less tightly with RHS than the operator after RHS, let</span>
+<span class="c1">// the pending operator take RHS as its LHS.</span>
+<span class="kt">int</span> <span class="n">NextPrec</span> <span class="o">=</span> <span class="n">GetTokPrecedence</span><span class="p">();</span>
+<span class="k">if</span> <span class="p">(</span><span class="n">TokPrec</span> <span class="o"><</span> <span class="n">NextPrec</span><span class="p">)</span> <span class="p">{</span>
+</pre></div>
+</div>
+<p>If the precedence of the binop to the right of “RHS” is lower or equal
+to the precedence of our current operator, then we know that the
+parentheses associate as “(a+b) binop ...”. In our example, the current
+operator is “+” and the next operator is “+”, we know that they have the
+same precedence. In this case we’ll create the AST node for “a+b”, and
+then continue parsing:</p>
+<div class="highlight-c++"><div class="highlight"><pre>      <span class="p">...</span> <span class="k">if</span> <span class="n">body</span> <span class="n">omitted</span> <span class="p">...</span>
+    <span class="p">}</span>
+
+    <span class="c1">// Merge LHS/RHS.</span>
+    <span class="n">LHS</span> <span class="o">=</span> <span class="k">new</span> <span class="n">BinaryExprAST</span><span class="p">(</span><span class="n">BinOp</span><span class="p">,</span> <span class="n">LHS</span><span class="p">,</span> <span class="n">RHS</span><span class="p">);</span>
+  <span class="p">}</span>  <span class="c1">// loop around to the top of the while loop.</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<p>In our example above, this will turn “a+b+” into “(a+b)” and execute the
+next iteration of the loop, with “+” as the current token. The code
+above will eat, remember, and parse “(c+d)” as the primary expression,
+which makes the current pair equal to [+, (c+d)]. It will then evaluate
+the ‘if’ conditional above with “*” as the binop to the right of the
+primary. In this case, the precedence of “*” is higher than the
+precedence of “+” so the if condition will be entered.</p>
+<p>The critical question left here is “how can the if condition parse the
+right hand side in full”? In particular, to build the AST correctly for
+our example, it needs to get all of “(c+d)*e*f” as the RHS expression
+variable. The code to do this is surprisingly simple (code from the
+above two blocks duplicated for context):</p>
+<div class="highlight-c++"><div class="highlight"><pre>    <span class="c1">// If BinOp binds less tightly with RHS than the operator after RHS, let</span>
+    <span class="c1">// the pending operator take RHS as its LHS.</span>
+    <span class="kt">int</span> <span class="n">NextPrec</span> <span class="o">=</span> <span class="n">GetTokPrecedence</span><span class="p">();</span>
+    <span class="k">if</span> <span class="p">(</span><span class="n">TokPrec</span> <span class="o"><</span> <span class="n">NextPrec</span><span class="p">)</span> <span class="p">{</span>
+      <span class="n">RHS</span> <span class="o">=</span> <span class="n">ParseBinOpRHS</span><span class="p">(</span><span class="n">TokPrec</span><span class="o">+</span><span class="mi">1</span><span class="p">,</span> <span class="n">RHS</span><span class="p">);</span>
+      <span class="k">if</span> <span class="p">(</span><span class="n">RHS</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+    <span class="p">}</span>
+    <span class="c1">// Merge LHS/RHS.</span>
+    <span class="n">LHS</span> <span class="o">=</span> <span class="k">new</span> <span class="n">BinaryExprAST</span><span class="p">(</span><span class="n">BinOp</span><span class="p">,</span> <span class="n">LHS</span><span class="p">,</span> <span class="n">RHS</span><span class="p">);</span>
+  <span class="p">}</span>  <span class="c1">// loop around to the top of the while loop.</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<p>At this point, we know that the binary operator to the RHS of our
+primary has higher precedence than the binop we are currently parsing.
+As such, we know that any sequence of pairs whose operators are all
+higher precedence than “+” should be parsed together and returned as
+“RHS”. To do this, we recursively invoke the <tt class="docutils literal"><span class="pre">ParseBinOpRHS</span></tt> function
+specifying “TokPrec+1” as the minimum precedence required for it to
+continue. In our example above, this will cause it to return the AST
+node for “(c+d)*e*f” as RHS, which is then set as the RHS of the ‘+’
+expression.</p>
+<p>Finally, on the next iteration of the while loop, the “+g” piece is
+parsed and added to the AST. With this little bit of code (14
+non-trivial lines), we correctly handle fully general binary expression
+parsing in a very elegant way. This was a whirlwind tour of this code,
+and it is somewhat subtle. I recommend running through it with a few
+tough examples to see how it works.</p>
+<p>This wraps up handling of expressions. At this point, we can point the
+parser at an arbitrary token stream and build an expression from it,
+stopping at the first token that is not part of the expression. Next up
+we need to handle function definitions, etc.</p>
+</div>
+<div class="section" id="parsing-the-rest">
+<h2><a class="toc-backref" href="#id7">2.6. Parsing the Rest</a><a class="headerlink" href="#parsing-the-rest" title="Permalink to this headline">¶</a></h2>
+<p>The next thing missing is handling of function prototypes. In
+Kaleidoscope, these are used both for ‘extern’ function declarations as
+well as function body definitions. The code to do this is
+straight-forward and not very interesting (once you’ve survived
+expressions):</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="c1">/// prototype</span>
+<span class="c1">///   ::= id '(' id* ')'</span>
+<span class="k">static</span> <span class="n">PrototypeAST</span> <span class="o">*</span><span class="nf">ParsePrototype</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="n">tok_identifier</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">ErrorP</span><span class="p">(</span><span class="s">"Expected function name in prototype"</span><span class="p">);</span>
+
+  <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">FnName</span> <span class="o">=</span> <span class="n">IdentifierStr</span><span class="p">;</span>
+  <span class="n">getNextToken</span><span class="p">();</span>
+
+  <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="sc">'('</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">ErrorP</span><span class="p">(</span><span class="s">"Expected '(' in prototype"</span><span class="p">);</span>
+
+  <span class="c1">// Read the list of argument names.</span>
+  <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">></span> <span class="n">ArgNames</span><span class="p">;</span>
+  <span class="k">while</span> <span class="p">(</span><span class="n">getNextToken</span><span class="p">()</span> <span class="o">==</span> <span class="n">tok_identifier</span><span class="p">)</span>
+    <span class="n">ArgNames</span><span class="p">.</span><span class="n">push_back</span><span class="p">(</span><span class="n">IdentifierStr</span><span class="p">);</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="sc">')'</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">ErrorP</span><span class="p">(</span><span class="s">"Expected ')' in prototype"</span><span class="p">);</span>
+
+  <span class="c1">// success.</span>
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat ')'.</span>
+
+  <span class="k">return</span> <span class="k">new</span> <span class="n">PrototypeAST</span><span class="p">(</span><span class="n">FnName</span><span class="p">,</span> <span class="n">ArgNames</span><span class="p">);</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<p>Given this, a function definition is very simple, just a prototype plus
+an expression to implement the body:</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="c1">/// definition ::= 'def' prototype expression</span>
+<span class="k">static</span> <span class="n">FunctionAST</span> <span class="o">*</span><span class="nf">ParseDefinition</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat def.</span>
+  <span class="n">PrototypeAST</span> <span class="o">*</span><span class="n">Proto</span> <span class="o">=</span> <span class="n">ParsePrototype</span><span class="p">();</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">Proto</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+
+  <span class="k">if</span> <span class="p">(</span><span class="n">ExprAST</span> <span class="o">*</span><span class="n">E</span> <span class="o">=</span> <span class="n">ParseExpression</span><span class="p">())</span>
+    <span class="k">return</span> <span class="k">new</span> <span class="n">FunctionAST</span><span class="p">(</span><span class="n">Proto</span><span class="p">,</span> <span class="n">E</span><span class="p">);</span>
+  <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<p>In addition, we support ‘extern’ to declare functions like ‘sin’ and
+‘cos’ as well as to support forward declaration of user functions. These
+‘extern’s are just prototypes with no body:</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="c1">/// external ::= 'extern' prototype</span>
+<span class="k">static</span> <span class="n">PrototypeAST</span> <span class="o">*</span><span class="nf">ParseExtern</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat extern.</span>
+  <span class="k">return</span> <span class="n">ParsePrototype</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<p>Finally, we’ll also let the user type in arbitrary top-level expressions
+and evaluate them on the fly. We will handle this by defining anonymous
+nullary (zero argument) functions for them:</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="c1">/// toplevelexpr ::= expression</span>
+<span class="k">static</span> <span class="n">FunctionAST</span> <span class="o">*</span><span class="nf">ParseTopLevelExpr</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">ExprAST</span> <span class="o">*</span><span class="n">E</span> <span class="o">=</span> <span class="n">ParseExpression</span><span class="p">())</span> <span class="p">{</span>
+    <span class="c1">// Make an anonymous proto.</span>
+    <span class="n">PrototypeAST</span> <span class="o">*</span><span class="n">Proto</span> <span class="o">=</span> <span class="k">new</span> <span class="n">PrototypeAST</span><span class="p">(</span><span class="s">""</span><span class="p">,</span> <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">></span><span class="p">());</span>
+    <span class="k">return</span> <span class="k">new</span> <span class="n">FunctionAST</span><span class="p">(</span><span class="n">Proto</span><span class="p">,</span> <span class="n">E</span><span class="p">);</span>
+  <span class="p">}</span>
+  <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<p>Now that we have all the pieces, let’s build a little driver that will
+let us actually <em>execute</em> this code we’ve built!</p>
+</div>
+<div class="section" id="the-driver">
+<h2><a class="toc-backref" href="#id8">2.7. The Driver</a><a class="headerlink" href="#the-driver" title="Permalink to this headline">¶</a></h2>
+<p>The driver for this simply invokes all of the parsing pieces with a
+top-level dispatch loop. There isn’t much interesting here, so I’ll just
+include the top-level loop. See <a class="reference external" href="#code">below</a> for full code in the
+“Top-Level Parsing” section.</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="c1">/// top ::= definition | external | expression | ';'</span>
+<span class="k">static</span> <span class="kt">void</span> <span class="nf">MainLoop</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">while</span> <span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="p">{</span>
+    <span class="n">fprintf</span><span class="p">(</span><span class="n">stderr</span><span class="p">,</span> <span class="s">"ready> "</span><span class="p">);</span>
+    <span class="k">switch</span> <span class="p">(</span><span class="n">CurTok</span><span class="p">)</span> <span class="p">{</span>
+    <span class="k">case</span> <span class="n">tok_eof</span>:    <span class="k">return</span><span class="p">;</span>
+    <span class="k">case</span> <span class="sc">';'</span>:        <span class="n">getNextToken</span><span class="p">();</span> <span class="k">break</span><span class="p">;</span>  <span class="c1">// ignore top-level semicolons.</span>
+    <span class="k">case</span> <span class="n">tok_def</span>:    <span class="n">HandleDefinition</span><span class="p">();</span> <span class="k">break</span><span class="p">;</span>
+    <span class="k">case</span> <span class="n">tok_extern</span>: <span class="n">HandleExtern</span><span class="p">();</span> <span class="k">break</span><span class="p">;</span>
+    <span class="nl">default:</span>         <span class="n">HandleTopLevelExpression</span><span class="p">();</span> <span class="k">break</span><span class="p">;</span>
+    <span class="p">}</span>
+  <span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<p>The most interesting part of this is that we ignore top-level
+semicolons. Why is this, you ask? The basic reason is that if you type
+“4 + 5” at the command line, the parser doesn’t know whether that is the
+end of what you will type or not. For example, on the next line you
+could type “def foo...” in which case 4+5 is the end of a top-level
+expression. Alternatively you could type “* 6”, which would continue
+the expression. Having top-level semicolons allows you to type “4+5;”,
+and the parser will know you are done.</p>
+</div>
+<div class="section" id="conclusions">
+<h2><a class="toc-backref" href="#id9">2.8. Conclusions</a><a class="headerlink" href="#conclusions" title="Permalink to this headline">¶</a></h2>
+<p>With just under 400 lines of commented code (240 lines of non-comment,
+non-blank code), we fully defined our minimal language, including a
+lexer, parser, and AST builder. With this done, the executable will
+validate Kaleidoscope code and tell us if it is grammatically invalid.
+For example, here is a sample interaction:</p>
+<div class="highlight-bash"><pre>$ ./a.out
+ready> def foo(x y) x+foo(y, 4.0);
+Parsed a function definition.
+ready> def foo(x y) x+y y;
+Parsed a function definition.
+Parsed a top-level expr
+ready> def foo(x y) x+y );
+Parsed a function definition.
+Error: unknown token when expecting an expression
+ready> extern sin(a);
+ready> Parsed an extern
+ready> ^D
+$</pre>
+</div>
+<p>There is a lot of room for extension here. You can define new AST nodes,
+extend the language in many ways, etc. In the <a class="reference external" href="LangImpl3.html">next
+installment</a>, we will describe how to generate LLVM
+Intermediate Representation (IR) from the AST.</p>
+</div>
+<div class="section" id="full-code-listing">
+<h2><a class="toc-backref" href="#id10">2.9. Full Code Listing</a><a class="headerlink" href="#full-code-listing" title="Permalink to this headline">¶</a></h2>
+<p>Here is the complete code listing for this and the previous chapter.
+Note that it is fully self-contained: you don’t need LLVM or any
+external libraries at all for this. (Besides the C and C++ standard
+libraries, of course.) To build this, just compile with:</p>
+<div class="highlight-bash"><div class="highlight"><pre><span class="c"># Compile</span>
+clang++ -g -O3 toy.cpp
+<span class="c"># Run</span>
+./a.out
+</pre></div>
+</div>
+<p>Here is the code:</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="cp">#include <cctype></span>
+<span class="cp">#include <cstdio></span>
+<span class="cp">#include <cstdlib></span>
+<span class="cp">#include <map></span>
+<span class="cp">#include <string></span>
+<span class="cp">#include <vector></span>
+
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+<span class="c1">// Lexer</span>
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+
+<span class="c1">// The lexer returns tokens [0-255] if it is an unknown character, otherwise one</span>
+<span class="c1">// of these for known things.</span>
+<span class="k">enum</span> <span class="n">Token</span> <span class="p">{</span>
+  <span class="n">tok_eof</span> <span class="o">=</span> <span class="o">-</span><span class="mi">1</span><span class="p">,</span>
+
+  <span class="c1">// commands</span>
+  <span class="n">tok_def</span> <span class="o">=</span> <span class="o">-</span><span class="mi">2</span><span class="p">,</span> <span class="n">tok_extern</span> <span class="o">=</span> <span class="o">-</span><span class="mi">3</span><span class="p">,</span>
+
+  <span class="c1">// primary</span>
+  <span class="n">tok_identifier</span> <span class="o">=</span> <span class="o">-</span><span class="mi">4</span><span class="p">,</span> <span class="n">tok_number</span> <span class="o">=</span> <span class="o">-</span><span class="mi">5</span>
+<span class="p">};</span>
+
+<span class="k">static</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">IdentifierStr</span><span class="p">;</span>  <span class="c1">// Filled in if tok_identifier</span>
+<span class="k">static</span> <span class="kt">double</span> <span class="n">NumVal</span><span class="p">;</span>              <span class="c1">// Filled in if tok_number</span>
+
+<span class="c1">/// gettok - Return the next token from standard input.</span>
+<span class="k">static</span> <span class="kt">int</span> <span class="nf">gettok</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">static</span> <span class="kt">int</span> <span class="n">LastChar</span> <span class="o">=</span> <span class="sc">' '</span><span class="p">;</span>
+
+  <span class="c1">// Skip any whitespace.</span>
+  <span class="k">while</span> <span class="p">(</span><span class="n">isspace</span><span class="p">(</span><span class="n">LastChar</span><span class="p">))</span>
+    <span class="n">LastChar</span> <span class="o">=</span> <span class="n">getchar</span><span class="p">();</span>
+
+  <span class="k">if</span> <span class="p">(</span><span class="n">isalpha</span><span class="p">(</span><span class="n">LastChar</span><span class="p">))</span> <span class="p">{</span> <span class="c1">// identifier: [a-zA-Z][a-zA-Z0-9]*</span>
+    <span class="n">IdentifierStr</span> <span class="o">=</span> <span class="n">LastChar</span><span class="p">;</span>
+    <span class="k">while</span> <span class="p">(</span><span class="n">isalnum</span><span class="p">((</span><span class="n">LastChar</span> <span class="o">=</span> <span class="n">getchar</span><span class="p">())))</span>
+      <span class="n">IdentifierStr</span> <span class="o">+=</span> <span class="n">LastChar</span><span class="p">;</span>
+
+    <span class="k">if</span> <span class="p">(</span><span class="n">IdentifierStr</span> <span class="o">==</span> <span class="s">"def"</span><span class="p">)</span> <span class="k">return</span> <span class="n">tok_def</span><span class="p">;</span>
+    <span class="k">if</span> <span class="p">(</span><span class="n">IdentifierStr</span> <span class="o">==</span> <span class="s">"extern"</span><span class="p">)</span> <span class="k">return</span> <span class="n">tok_extern</span><span class="p">;</span>
+    <span class="k">return</span> <span class="n">tok_identifier</span><span class="p">;</span>
+  <span class="p">}</span>
+
+  <span class="k">if</span> <span class="p">(</span><span class="n">isdigit</span><span class="p">(</span><span class="n">LastChar</span><span class="p">)</span> <span class="o">||</span> <span class="n">LastChar</span> <span class="o">==</span> <span class="sc">'.'</span><span class="p">)</span> <span class="p">{</span>   <span class="c1">// Number: [0-9.]+</span>
+    <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">NumStr</span><span class="p">;</span>
+    <span class="k">do</span> <span class="p">{</span>
+      <span class="n">NumStr</span> <span class="o">+=</span> <span class="n">LastChar</span><span class="p">;</span>
+      <span class="n">LastChar</span> <span class="o">=</span> <span class="n">getchar</span><span class="p">();</span>
+    <span class="p">}</span> <span class="k">while</span> <span class="p">(</span><span class="n">isdigit</span><span class="p">(</span><span class="n">LastChar</span><span class="p">)</span> <span class="o">||</span> <span class="n">LastChar</span> <span class="o">==</span> <span class="sc">'.'</span><span class="p">);</span>
+
+    <span class="n">NumVal</span> <span class="o">=</span> <span class="n">strtod</span><span class="p">(</span><span class="n">NumStr</span><span class="p">.</span><span class="n">c_str</span><span class="p">(),</span> <span class="mi">0</span><span class="p">);</span>
+    <span class="k">return</span> <span class="n">tok_number</span><span class="p">;</span>
+  <span class="p">}</span>
+
+  <span class="k">if</span> <span class="p">(</span><span class="n">LastChar</span> <span class="o">==</span> <span class="sc">'#'</span><span class="p">)</span> <span class="p">{</span>
+    <span class="c1">// Comment until end of line.</span>
+    <span class="k">do</span> <span class="n">LastChar</span> <span class="o">=</span> <span class="n">getchar</span><span class="p">();</span>
+    <span class="k">while</span> <span class="p">(</span><span class="n">LastChar</span> <span class="o">!=</span> <span class="n">EOF</span> <span class="o">&&</span> <span class="n">LastChar</span> <span class="o">!=</span> <span class="sc">'\n'</span> <span class="o">&&</span> <span class="n">LastChar</span> <span class="o">!=</span> <span class="sc">'\r'</span><span class="p">);</span>
+    
+    <span class="k">if</span> <span class="p">(</span><span class="n">LastChar</span> <span class="o">!=</span> <span class="n">EOF</span><span class="p">)</span>
+      <span class="k">return</span> <span class="n">gettok</span><span class="p">();</span>
+  <span class="p">}</span>
+  
+  <span class="c1">// Check for end of file.  Don't eat the EOF.</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">LastChar</span> <span class="o">==</span> <span class="n">EOF</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">tok_eof</span><span class="p">;</span>
+
+  <span class="c1">// Otherwise, just return the character as its ascii value.</span>
+  <span class="kt">int</span> <span class="n">ThisChar</span> <span class="o">=</span> <span class="n">LastChar</span><span class="p">;</span>
+  <span class="n">LastChar</span> <span class="o">=</span> <span class="n">getchar</span><span class="p">();</span>
+  <span class="k">return</span> <span class="n">ThisChar</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+<span class="c1">// Abstract Syntax Tree (aka Parse Tree)</span>
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+<span class="k">namespace</span> <span class="p">{</span>
+<span class="c1">/// ExprAST - Base class for all expression nodes.</span>
+<span class="k">class</span> <span class="nc">ExprAST</span> <span class="p">{</span>
+<span class="nl">public:</span>
+  <span class="k">virtual</span> <span class="o">~</span><span class="n">ExprAST</span><span class="p">()</span> <span class="p">{}</span>
+<span class="p">};</span>
+
+<span class="c1">/// NumberExprAST - Expression class for numeric literals like "1.0".</span>
+<span class="k">class</span> <span class="nc">NumberExprAST</span> <span class="o">:</span> <span class="k">public</span> <span class="n">ExprAST</span> <span class="p">{</span>
+<span class="nl">public:</span>
+  <span class="n">NumberExprAST</span><span class="p">(</span><span class="kt">double</span> <span class="n">val</span><span class="p">)</span> <span class="p">{}</span>
+<span class="p">};</span>
+
+<span class="c1">/// VariableExprAST - Expression class for referencing a variable, like "a".</span>
+<span class="k">class</span> <span class="nc">VariableExprAST</span> <span class="o">:</span> <span class="k">public</span> <span class="n">ExprAST</span> <span class="p">{</span>
+  <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">Name</span><span class="p">;</span>
+<span class="nl">public:</span>
+  <span class="n">VariableExprAST</span><span class="p">(</span><span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="o">&</span><span class="n">name</span><span class="p">)</span> <span class="o">:</span> <span class="n">Name</span><span class="p">(</span><span class="n">name</span><span class="p">)</span> <span class="p">{}</span>
+<span class="p">};</span>
+
+<span class="c1">/// BinaryExprAST - Expression class for a binary operator.</span>
+<span class="k">class</span> <span class="nc">BinaryExprAST</span> <span class="o">:</span> <span class="k">public</span> <span class="n">ExprAST</span> <span class="p">{</span>
+<span class="nl">public:</span>
+  <span class="n">BinaryExprAST</span><span class="p">(</span><span class="kt">char</span> <span class="n">op</span><span class="p">,</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="n">lhs</span><span class="p">,</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="n">rhs</span><span class="p">)</span> <span class="p">{}</span>
+<span class="p">};</span>
+
+<span class="c1">/// CallExprAST - Expression class for function calls.</span>
+<span class="k">class</span> <span class="nc">CallExprAST</span> <span class="o">:</span> <span class="k">public</span> <span class="n">ExprAST</span> <span class="p">{</span>
+  <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">Callee</span><span class="p">;</span>
+  <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">ExprAST</span><span class="o">*></span> <span class="n">Args</span><span class="p">;</span>
+<span class="nl">public:</span>
+  <span class="n">CallExprAST</span><span class="p">(</span><span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="o">&</span><span class="n">callee</span><span class="p">,</span> <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">ExprAST</span><span class="o">*></span> <span class="o">&</span><span class="n">args</span><span class="p">)</span>
+    <span class="o">:</span> <span class="n">Callee</span><span class="p">(</span><span class="n">callee</span><span class="p">),</span> <span class="n">Args</span><span class="p">(</span><span class="n">args</span><span class="p">)</span> <span class="p">{}</span>
+<span class="p">};</span>
+
+<span class="c1">/// PrototypeAST - This class represents the "prototype" for a function,</span>
+<span class="c1">/// which captures its name, and its argument names (thus implicitly the number</span>
+<span class="c1">/// of arguments the function takes).</span>
+<span class="k">class</span> <span class="nc">PrototypeAST</span> <span class="p">{</span>
+  <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">Name</span><span class="p">;</span>
+  <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">></span> <span class="n">Args</span><span class="p">;</span>
+<span class="nl">public:</span>
+  <span class="n">PrototypeAST</span><span class="p">(</span><span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="o">&</span><span class="n">name</span><span class="p">,</span> <span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">></span> <span class="o">&</span><span class="n">args</span><span class="p">)</span>
+    <span class="o">:</span> <span class="n">Name</span><span class="p">(</span><span class="n">name</span><span class="p">),</span> <span class="n">Args</span><span class="p">(</span><span class="n">args</span><span class="p">)</span> <span class="p">{}</span>
+  
+<span class="p">};</span>
+
+<span class="c1">/// FunctionAST - This class represents a function definition itself.</span>
+<span class="k">class</span> <span class="nc">FunctionAST</span> <span class="p">{</span>
+<span class="nl">public:</span>
+  <span class="n">FunctionAST</span><span class="p">(</span><span class="n">PrototypeAST</span> <span class="o">*</span><span class="n">proto</span><span class="p">,</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="n">body</span><span class="p">)</span> <span class="p">{}</span>
+<span class="p">};</span>
+<span class="p">}</span> <span class="c1">// end anonymous namespace</span>
+
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+<span class="c1">// Parser</span>
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+
+<span class="c1">/// CurTok/getNextToken - Provide a simple token buffer.  CurTok is the current</span>
+<span class="c1">/// token the parser is looking at.  getNextToken reads another token from the</span>
+<span class="c1">/// lexer and updates CurTok with its results.</span>
+<span class="k">static</span> <span class="kt">int</span> <span class="n">CurTok</span><span class="p">;</span>
+<span class="k">static</span> <span class="kt">int</span> <span class="nf">getNextToken</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">return</span> <span class="n">CurTok</span> <span class="o">=</span> <span class="n">gettok</span><span class="p">();</span>
+<span class="p">}</span>
+
+<span class="c1">/// BinopPrecedence - This holds the precedence for each binary operator that is</span>
+<span class="c1">/// defined.</span>
+<span class="k">static</span> <span class="n">std</span><span class="o">::</span><span class="n">map</span><span class="o"><</span><span class="kt">char</span><span class="p">,</span> <span class="kt">int</span><span class="o">></span> <span class="n">BinopPrecedence</span><span class="p">;</span>
+
+<span class="c1">/// GetTokPrecedence - Get the precedence of the pending binary operator token.</span>
+<span class="k">static</span> <span class="kt">int</span> <span class="nf">GetTokPrecedence</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">isascii</span><span class="p">(</span><span class="n">CurTok</span><span class="p">))</span>
+    <span class="k">return</span> <span class="o">-</span><span class="mi">1</span><span class="p">;</span>
+  
+  <span class="c1">// Make sure it's a declared binop.</span>
+  <span class="kt">int</span> <span class="n">TokPrec</span> <span class="o">=</span> <span class="n">BinopPrecedence</span><span class="p">[</span><span class="n">CurTok</span><span class="p">];</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">TokPrec</span> <span class="o"><=</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="o">-</span><span class="mi">1</span><span class="p">;</span>
+  <span class="k">return</span> <span class="n">TokPrec</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="c1">/// Error* - These are little helper functions for error handling.</span>
+<span class="n">ExprAST</span> <span class="o">*</span><span class="nf">Error</span><span class="p">(</span><span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">Str</span><span class="p">)</span> <span class="p">{</span> <span class="n">fprintf</span><span class="p">(</span><span class="n">stderr</span><span class="p">,</span> <span class="s">"Error: %s</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="n">Str</span><span class="p">);</span><span class="k">return</span> <span class="mi">0</span><span class="p">;}</span>
+<span class="n">PrototypeAST</span> <span class="o">*</span><span class="nf">ErrorP</span><span class="p">(</span><span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">Str</span><span class="p">)</span> <span class="p">{</span> <span class="n">Error</span><span class="p">(</span><span class="n">Str</span><span class="p">);</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span> <span class="p">}</span>
+
+<span class="k">static</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="nf">ParseExpression</span><span class="p">();</span>
+
+<span class="c1">/// identifierexpr</span>
+<span class="c1">///   ::= identifier</span>
+<span class="c1">///   ::= identifier '(' expression* ')'</span>
+<span class="k">static</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="nf">ParseIdentifierExpr</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">IdName</span> <span class="o">=</span> <span class="n">IdentifierStr</span><span class="p">;</span>
+  
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat identifier.</span>
+  
+  <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="sc">'('</span><span class="p">)</span> <span class="c1">// Simple variable ref.</span>
+    <span class="k">return</span> <span class="k">new</span> <span class="n">VariableExprAST</span><span class="p">(</span><span class="n">IdName</span><span class="p">);</span>
+  
+  <span class="c1">// Call.</span>
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat (</span>
+  <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">ExprAST</span><span class="o">*></span> <span class="n">Args</span><span class="p">;</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="sc">')'</span><span class="p">)</span> <span class="p">{</span>
+    <span class="k">while</span> <span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="p">{</span>
+      <span class="n">ExprAST</span> <span class="o">*</span><span class="n">Arg</span> <span class="o">=</span> <span class="n">ParseExpression</span><span class="p">();</span>
+      <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">Arg</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+      <span class="n">Args</span><span class="p">.</span><span class="n">push_back</span><span class="p">(</span><span class="n">Arg</span><span class="p">);</span>
+
+      <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">==</span> <span class="sc">')'</span><span class="p">)</span> <span class="k">break</span><span class="p">;</span>
+
+      <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="sc">','</span><span class="p">)</span>
+        <span class="k">return</span> <span class="n">Error</span><span class="p">(</span><span class="s">"Expected ')' or ',' in argument list"</span><span class="p">);</span>
+      <span class="n">getNextToken</span><span class="p">();</span>
+    <span class="p">}</span>
+  <span class="p">}</span>
+
+  <span class="c1">// Eat the ')'.</span>
+  <span class="n">getNextToken</span><span class="p">();</span>
+  
+  <span class="k">return</span> <span class="k">new</span> <span class="n">CallExprAST</span><span class="p">(</span><span class="n">IdName</span><span class="p">,</span> <span class="n">Args</span><span class="p">);</span>
+<span class="p">}</span>
+
+<span class="c1">/// numberexpr ::= number</span>
+<span class="k">static</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="nf">ParseNumberExpr</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">ExprAST</span> <span class="o">*</span><span class="n">Result</span> <span class="o">=</span> <span class="k">new</span> <span class="n">NumberExprAST</span><span class="p">(</span><span class="n">NumVal</span><span class="p">);</span>
+  <span class="n">getNextToken</span><span class="p">();</span> <span class="c1">// consume the number</span>
+  <span class="k">return</span> <span class="n">Result</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="c1">/// parenexpr ::= '(' expression ')'</span>
+<span class="k">static</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="nf">ParseParenExpr</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat (.</span>
+  <span class="n">ExprAST</span> <span class="o">*</span><span class="n">V</span> <span class="o">=</span> <span class="n">ParseExpression</span><span class="p">();</span>
+  <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">V</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+  
+  <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="sc">')'</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">Error</span><span class="p">(</span><span class="s">"expected ')'"</span><span class="p">);</span>
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat ).</span>
+  <span class="k">return</span> <span class="n">V</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="c1">/// primary</span>
+<span class="c1">///   ::= identifierexpr</span>
+<span class="c1">///   ::= numberexpr</span>
+<span class="c1">///   ::= parenexpr</span>
+<span class="k">static</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="nf">ParsePrimary</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">switch</span> <span class="p">(</span><span class="n">CurTok</span><span class="p">)</span> <span class="p">{</span>
+  <span class="nl">default:</span> <span class="k">return</span> <span class="n">Error</span><span class="p">(</span><span class="s">"unknown token when expecting an expression"</span><span class="p">);</span>
+  <span class="k">case</span> <span class="n">tok_identifier</span>: <span class="k">return</span> <span class="n">ParseIdentifierExpr</span><span class="p">();</span>
+  <span class="k">case</span> <span class="n">tok_number</span>:     <span class="k">return</span> <span class="n">ParseNumberExpr</span><span class="p">();</span>
+  <span class="k">case</span> <span class="sc">'('</span>:            <span class="k">return</span> <span class="n">ParseParenExpr</span><span class="p">();</span>
+  <span class="p">}</span>
+<span class="p">}</span>
+
+<span class="c1">/// binoprhs</span>
+<span class="c1">///   ::= ('+' primary)*</span>
+<span class="k">static</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="nf">ParseBinOpRHS</span><span class="p">(</span><span class="kt">int</span> <span class="n">ExprPrec</span><span class="p">,</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="n">LHS</span><span class="p">)</span> <span class="p">{</span>
+  <span class="c1">// If this is a binop, find its precedence.</span>
+  <span class="k">while</span> <span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="p">{</span>
+    <span class="kt">int</span> <span class="n">TokPrec</span> <span class="o">=</span> <span class="n">GetTokPrecedence</span><span class="p">();</span>
+    
+    <span class="c1">// If this is a binop that binds at least as tightly as the current binop,</span>
+    <span class="c1">// consume it, otherwise we are done.</span>
+    <span class="k">if</span> <span class="p">(</span><span class="n">TokPrec</span> <span class="o"><</span> <span class="n">ExprPrec</span><span class="p">)</span>
+      <span class="k">return</span> <span class="n">LHS</span><span class="p">;</span>
+    
+    <span class="c1">// Okay, we know this is a binop.</span>
+    <span class="kt">int</span> <span class="n">BinOp</span> <span class="o">=</span> <span class="n">CurTok</span><span class="p">;</span>
+    <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat binop</span>
+    
+    <span class="c1">// Parse the primary expression after the binary operator.</span>
+    <span class="n">ExprAST</span> <span class="o">*</span><span class="n">RHS</span> <span class="o">=</span> <span class="n">ParsePrimary</span><span class="p">();</span>
+    <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">RHS</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+    
+    <span class="c1">// If BinOp binds less tightly with RHS than the operator after RHS, let</span>
+    <span class="c1">// the pending operator take RHS as its LHS.</span>
+    <span class="kt">int</span> <span class="n">NextPrec</span> <span class="o">=</span> <span class="n">GetTokPrecedence</span><span class="p">();</span>
+    <span class="k">if</span> <span class="p">(</span><span class="n">TokPrec</span> <span class="o"><</span> <span class="n">NextPrec</span><span class="p">)</span> <span class="p">{</span>
+      <span class="n">RHS</span> <span class="o">=</span> <span class="n">ParseBinOpRHS</span><span class="p">(</span><span class="n">TokPrec</span><span class="o">+</span><span class="mi">1</span><span class="p">,</span> <span class="n">RHS</span><span class="p">);</span>
+      <span class="k">if</span> <span class="p">(</span><span class="n">RHS</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+    <span class="p">}</span>
+    
+    <span class="c1">// Merge LHS/RHS.</span>
+    <span class="n">LHS</span> <span class="o">=</span> <span class="k">new</span> <span class="n">BinaryExprAST</span><span class="p">(</span><span class="n">BinOp</span><span class="p">,</span> <span class="n">LHS</span><span class="p">,</span> <span class="n">RHS</span><span class="p">);</span>
+  <span class="p">}</span>
+<span class="p">}</span>
+
+<span class="c1">/// expression</span>
+<span class="c1">///   ::= primary binoprhs</span>
+<span class="c1">///</span>
+<span class="k">static</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="nf">ParseExpression</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">ExprAST</span> <span class="o">*</span><span class="n">LHS</span> <span class="o">=</span> <span class="n">ParsePrimary</span><span class="p">();</span>
+  <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">LHS</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+  
+  <span class="k">return</span> <span class="n">ParseBinOpRHS</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">LHS</span><span class="p">);</span>
+<span class="p">}</span>
+
+<span class="c1">/// prototype</span>
+<span class="c1">///   ::= id '(' id* ')'</span>
+<span class="k">static</span> <span class="n">PrototypeAST</span> <span class="o">*</span><span class="nf">ParsePrototype</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="n">tok_identifier</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">ErrorP</span><span class="p">(</span><span class="s">"Expected function name in prototype"</span><span class="p">);</span>
+
+  <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">FnName</span> <span class="o">=</span> <span class="n">IdentifierStr</span><span class="p">;</span>
+  <span class="n">getNextToken</span><span class="p">();</span>
+  
+  <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="sc">'('</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">ErrorP</span><span class="p">(</span><span class="s">"Expected '(' in prototype"</span><span class="p">);</span>
+  
+  <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">></span> <span class="n">ArgNames</span><span class="p">;</span>
+  <span class="k">while</span> <span class="p">(</span><span class="n">getNextToken</span><span class="p">()</span> <span class="o">==</span> <span class="n">tok_identifier</span><span class="p">)</span>
+    <span class="n">ArgNames</span><span class="p">.</span><span class="n">push_back</span><span class="p">(</span><span class="n">IdentifierStr</span><span class="p">);</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="sc">')'</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">ErrorP</span><span class="p">(</span><span class="s">"Expected ')' in prototype"</span><span class="p">);</span>
+  
+  <span class="c1">// success.</span>
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat ')'.</span>
+  
+  <span class="k">return</span> <span class="k">new</span> <span class="n">PrototypeAST</span><span class="p">(</span><span class="n">FnName</span><span class="p">,</span> <span class="n">ArgNames</span><span class="p">);</span>
+<span class="p">}</span>
+
+<span class="c1">/// definition ::= 'def' prototype expression</span>
+<span class="k">static</span> <span class="n">FunctionAST</span> <span class="o">*</span><span class="nf">ParseDefinition</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat def.</span>
+  <span class="n">PrototypeAST</span> <span class="o">*</span><span class="n">Proto</span> <span class="o">=</span> <span class="n">ParsePrototype</span><span class="p">();</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">Proto</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+
+  <span class="k">if</span> <span class="p">(</span><span class="n">ExprAST</span> <span class="o">*</span><span class="n">E</span> <span class="o">=</span> <span class="n">ParseExpression</span><span class="p">())</span>
+    <span class="k">return</span> <span class="k">new</span> <span class="n">FunctionAST</span><span class="p">(</span><span class="n">Proto</span><span class="p">,</span> <span class="n">E</span><span class="p">);</span>
+  <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="c1">/// toplevelexpr ::= expression</span>
+<span class="k">static</span> <span class="n">FunctionAST</span> <span class="o">*</span><span class="nf">ParseTopLevelExpr</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">ExprAST</span> <span class="o">*</span><span class="n">E</span> <span class="o">=</span> <span class="n">ParseExpression</span><span class="p">())</span> <span class="p">{</span>
+    <span class="c1">// Make an anonymous proto.</span>
+    <span class="n">PrototypeAST</span> <span class="o">*</span><span class="n">Proto</span> <span class="o">=</span> <span class="k">new</span> <span class="n">PrototypeAST</span><span class="p">(</span><span class="s">""</span><span class="p">,</span> <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">></span><span class="p">());</span>
+    <span class="k">return</span> <span class="k">new</span> <span class="n">FunctionAST</span><span class="p">(</span><span class="n">Proto</span><span class="p">,</span> <span class="n">E</span><span class="p">);</span>
+  <span class="p">}</span>
+  <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="c1">/// external ::= 'extern' prototype</span>
+<span class="k">static</span> <span class="n">PrototypeAST</span> <span class="o">*</span><span class="nf">ParseExtern</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat extern.</span>
+  <span class="k">return</span> <span class="n">ParsePrototype</span><span class="p">();</span>
+<span class="p">}</span>
+
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+<span class="c1">// Top-Level parsing</span>
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+
+<span class="k">static</span> <span class="kt">void</span> <span class="nf">HandleDefinition</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">ParseDefinition</span><span class="p">())</span> <span class="p">{</span>
+    <span class="n">fprintf</span><span class="p">(</span><span class="n">stderr</span><span class="p">,</span> <span class="s">"Parsed a function definition.</span><span class="se">\n</span><span class="s">"</span><span class="p">);</span>
+  <span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
+    <span class="c1">// Skip token for error recovery.</span>
+    <span class="n">getNextToken</span><span class="p">();</span>
+  <span class="p">}</span>
+<span class="p">}</span>
+
+<span class="k">static</span> <span class="kt">void</span> <span class="nf">HandleExtern</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">ParseExtern</span><span class="p">())</span> <span class="p">{</span>
+    <span class="n">fprintf</span><span class="p">(</span><span class="n">stderr</span><span class="p">,</span> <span class="s">"Parsed an extern</span><span class="se">\n</span><span class="s">"</span><span class="p">);</span>
+  <span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
+    <span class="c1">// Skip token for error recovery.</span>
+    <span class="n">getNextToken</span><span class="p">();</span>
+  <span class="p">}</span>
+<span class="p">}</span>
+
+<span class="k">static</span> <span class="kt">void</span> <span class="nf">HandleTopLevelExpression</span><span class="p">()</span> <span class="p">{</span>
+  <span class="c1">// Evaluate a top-level expression into an anonymous function.</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">ParseTopLevelExpr</span><span class="p">())</span> <span class="p">{</span>
+    <span class="n">fprintf</span><span class="p">(</span><span class="n">stderr</span><span class="p">,</span> <span class="s">"Parsed a top-level expr</span><span class="se">\n</span><span class="s">"</span><span class="p">);</span>
+  <span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
+    <span class="c1">// Skip token for error recovery.</span>
+    <span class="n">getNextToken</span><span class="p">();</span>
+  <span class="p">}</span>
+<span class="p">}</span>
+
+<span class="c1">/// top ::= definition | external | expression | ';'</span>
+<span class="k">static</span> <span class="kt">void</span> <span class="nf">MainLoop</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">while</span> <span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="p">{</span>
+    <span class="n">fprintf</span><span class="p">(</span><span class="n">stderr</span><span class="p">,</span> <span class="s">"ready> "</span><span class="p">);</span>
+    <span class="k">switch</span> <span class="p">(</span><span class="n">CurTok</span><span class="p">)</span> <span class="p">{</span>
+    <span class="k">case</span> <span class="n">tok_eof</span>:    <span class="k">return</span><span class="p">;</span>
+    <span class="k">case</span> <span class="sc">';'</span>:        <span class="n">getNextToken</span><span class="p">();</span> <span class="k">break</span><span class="p">;</span>  <span class="c1">// ignore top-level semicolons.</span>
+    <span class="k">case</span> <span class="n">tok_def</span>:    <span class="n">HandleDefinition</span><span class="p">();</span> <span class="k">break</span><span class="p">;</span>
+    <span class="k">case</span> <span class="n">tok_extern</span>: <span class="n">HandleExtern</span><span class="p">();</span> <span class="k">break</span><span class="p">;</span>
+    <span class="nl">default:</span>         <span class="n">HandleTopLevelExpression</span><span class="p">();</span> <span class="k">break</span><span class="p">;</span>
+    <span class="p">}</span>
+  <span class="p">}</span>
+<span class="p">}</span>
+
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+<span class="c1">// Main driver code.</span>
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+
+<span class="kt">int</span> <span class="nf">main</span><span class="p">()</span> <span class="p">{</span>
+  <span class="c1">// Install standard binary operators.</span>
+  <span class="c1">// 1 is lowest precedence.</span>
+  <span class="n">BinopPrecedence</span><span class="p">[</span><span class="sc">'<'</span><span class="p">]</span> <span class="o">=</span> <span class="mi">10</span><span class="p">;</span>
+  <span class="n">BinopPrecedence</span><span class="p">[</span><span class="sc">'+'</span><span class="p">]</span> <span class="o">=</span> <span class="mi">20</span><span class="p">;</span>
+  <span class="n">BinopPrecedence</span><span class="p">[</span><span class="sc">'-'</span><span class="p">]</span> <span class="o">=</span> <span class="mi">20</span><span class="p">;</span>
+  <span class="n">BinopPrecedence</span><span class="p">[</span><span class="sc">'*'</span><span class="p">]</span> <span class="o">=</span> <span class="mi">40</span><span class="p">;</span>  <span class="c1">// highest.</span>
+
+  <span class="c1">// Prime the first token.</span>
+  <span class="n">fprintf</span><span class="p">(</span><span class="n">stderr</span><span class="p">,</span> <span class="s">"ready> "</span><span class="p">);</span>
+  <span class="n">getNextToken</span><span class="p">();</span>
+
+  <span class="c1">// Run the main "interpreter loop" now.</span>
+  <span class="n">MainLoop</span><span class="p">();</span>
+
+  <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<p><a class="reference external" href="LangImpl3.html">Next: Implementing Code Generation to LLVM IR</a></p>
+</div>
+</div>
+
+
+          </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="LangImpl3.html" title="3. Kaleidoscope: Code generation to LLVM IR"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="LangImpl1.html" title="1. Kaleidoscope: Tutorial Introduction and the Lexer"
+             >previous</a> |</li>
+  <li><a href="http://llvm.org/">LLVM Home</a> | </li>
+  <li><a href="../index.html">Documentation</a>»</li>
+
+          <li><a href="index.html" >LLVM Tutorial: Table of Contents</a> »</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        © Copyright 2003-2013, LLVM Project.
+      Last updated on 2014-05-06.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
+    </div>
+  </body>
+</html>
\ No newline at end of file

Added: www-releases/trunk/3.4.1/docs/tutorial/LangImpl3.html
URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/3.4.1/docs/tutorial/LangImpl3.html?rev=208244&view=auto
==============================================================================
--- www-releases/trunk/3.4.1/docs/tutorial/LangImpl3.html (added)
+++ www-releases/trunk/3.4.1/docs/tutorial/LangImpl3.html Wed May  7 15:09:32 2014
@@ -0,0 +1,1188 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>3. Kaleidoscope: Code generation to LLVM IR — LLVM 3.4 documentation</title>
+    
+    <link rel="stylesheet" href="../_static/llvm-theme.css" type="text/css" />
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '3.4',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../_static/jquery.js"></script>
+    <script type="text/javascript" src="../_static/underscore.js"></script>
+    <script type="text/javascript" src="../_static/doctools.js"></script>
+    <link rel="top" title="LLVM 3.4 documentation" href="../index.html" />
+    <link rel="up" title="LLVM Tutorial: Table of Contents" href="index.html" />
+    <link rel="next" title="4. Kaleidoscope: Adding JIT and Optimizer Support" href="LangImpl4.html" />
+    <link rel="prev" title="2. Kaleidoscope: Implementing a Parser and AST" href="LangImpl2.html" />
+<style type="text/css">
+  table.right { float: right; margin-left: 20px; }
+  table.right td { border: 1px solid #ccc; }
+</style>
+
+  </head>
+  <body>
+<div class="logo">
+  <a href="../index.html">
+    <img src="../_static/logo.png"
+         alt="LLVM Logo" width="250" height="88"/></a>
+</div>
+
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="LangImpl4.html" title="4. Kaleidoscope: Adding JIT and Optimizer Support"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="LangImpl2.html" title="2. Kaleidoscope: Implementing a Parser and AST"
+             accesskey="P">previous</a> |</li>
+  <li><a href="http://llvm.org/">LLVM Home</a> | </li>
+  <li><a href="../index.html">Documentation</a>»</li>
+
+          <li><a href="index.html" accesskey="U">LLVM Tutorial: Table of Contents</a> »</li> 
+      </ul>
+    </div>
+
+
+    <div class="document">
+      <div class="documentwrapper">
+          <div class="body">
+            
+  <div class="section" id="kaleidoscope-code-generation-to-llvm-ir">
+<h1>3. Kaleidoscope: Code generation to LLVM IR<a class="headerlink" href="#kaleidoscope-code-generation-to-llvm-ir" title="Permalink to this headline">¶</a></h1>
+<div class="contents local topic" id="contents">
+<ul class="simple">
+<li><a class="reference internal" href="#chapter-3-introduction" id="id1">Chapter 3 Introduction</a></li>
+<li><a class="reference internal" href="#code-generation-setup" id="id2">Code Generation Setup</a></li>
+<li><a class="reference internal" href="#expression-code-generation" id="id3">Expression Code Generation</a></li>
+<li><a class="reference internal" href="#function-code-generation" id="id4">Function Code Generation</a></li>
+<li><a class="reference internal" href="#driver-changes-and-closing-thoughts" id="id5">Driver Changes and Closing Thoughts</a></li>
+<li><a class="reference internal" href="#full-code-listing" id="id6">Full Code Listing</a></li>
+</ul>
+</div>
+<div class="section" id="chapter-3-introduction">
+<h2><a class="toc-backref" href="#id1">3.1. Chapter 3 Introduction</a><a class="headerlink" href="#chapter-3-introduction" title="Permalink to this headline">¶</a></h2>
+<p>Welcome to Chapter 3 of the “<a class="reference external" href="index.html">Implementing a language with
+LLVM</a>” tutorial. This chapter shows you how to transform
+the <a class="reference external" href="LangImpl2.html">Abstract Syntax Tree</a>, built in Chapter 2, into
+LLVM IR. This will teach you a little bit about how LLVM does things, as
+well as demonstrate how easy it is to use. It’s much more work to build
+a lexer and parser than it is to generate LLVM IR code. :)</p>
+<p><strong>Please note</strong>: the code in this chapter and later require LLVM 2.2 or
+later. LLVM 2.1 and before will not work with it. Also note that you
+need to use a version of this tutorial that matches your LLVM release:
+If you are using an official LLVM release, use the version of the
+documentation included with your release or on the <a class="reference external" href="http://llvm.org/releases/">llvm.org releases
+page</a>.</p>
+</div>
+<div class="section" id="code-generation-setup">
+<h2><a class="toc-backref" href="#id2">3.2. Code Generation Setup</a><a class="headerlink" href="#code-generation-setup" title="Permalink to this headline">¶</a></h2>
+<p>In order to generate LLVM IR, we want some simple setup to get started.
+First we define virtual code generation (codegen) methods in each AST
+class:</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="c1">/// ExprAST - Base class for all expression nodes.</span>
+<span class="k">class</span> <span class="nc">ExprAST</span> <span class="p">{</span>
+<span class="nl">public:</span>
+  <span class="k">virtual</span> <span class="o">~</span><span class="n">ExprAST</span><span class="p">()</span> <span class="p">{}</span>
+  <span class="k">virtual</span> <span class="n">Value</span> <span class="o">*</span><span class="n">Codegen</span><span class="p">()</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<span class="p">};</span>
+
+<span class="c1">/// NumberExprAST - Expression class for numeric literals like "1.0".</span>
+<span class="k">class</span> <span class="nc">NumberExprAST</span> <span class="o">:</span> <span class="k">public</span> <span class="n">ExprAST</span> <span class="p">{</span>
+  <span class="kt">double</span> <span class="n">Val</span><span class="p">;</span>
+<span class="nl">public:</span>
+  <span class="n">NumberExprAST</span><span class="p">(</span><span class="kt">double</span> <span class="n">val</span><span class="p">)</span> <span class="o">:</span> <span class="n">Val</span><span class="p">(</span><span class="n">val</span><span class="p">)</span> <span class="p">{}</span>
+  <span class="k">virtual</span> <span class="n">Value</span> <span class="o">*</span><span class="n">Codegen</span><span class="p">();</span>
+<span class="p">};</span>
+<span class="p">...</span>
+</pre></div>
+</div>
+<p>The Codegen() method says to emit IR for that AST node along with all
+the things it depends on, and they all return an LLVM Value object.
+“Value” is the class used to represent a “<a class="reference external" href="http://en.wikipedia.org/wiki/Static_single_assignment_form">Static Single Assignment
+(SSA)</a>
+register” or “SSA value” in LLVM. The most distinct aspect of SSA values
+is that their value is computed as the related instruction executes, and
+it does not get a new value until (and if) the instruction re-executes.
+In other words, there is no way to “change” an SSA value. For more
+information, please read up on <a class="reference external" href="http://en.wikipedia.org/wiki/Static_single_assignment_form">Static Single
+Assignment</a>
+- the concepts are really quite natural once you grok them.</p>
+<p>Note that instead of adding virtual methods to the ExprAST class
+hierarchy, it could also make sense to use a <a class="reference external" href="http://en.wikipedia.org/wiki/Visitor_pattern">visitor
+pattern</a> or some other
+way to model this. Again, this tutorial won’t dwell on good software
+engineering practices: for our purposes, adding a virtual method is
+simplest.</p>
+<p>The second thing we want is an “Error” method like we used for the
+parser, which will be used to report errors found during code generation
+(for example, use of an undeclared parameter):</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="n">Value</span> <span class="o">*</span><span class="nf">ErrorV</span><span class="p">(</span><span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">Str</span><span class="p">)</span> <span class="p">{</span> <span class="n">Error</span><span class="p">(</span><span class="n">Str</span><span class="p">);</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span> <span class="p">}</span>
+
+<span class="k">static</span> <span class="n">Module</span> <span class="o">*</span><span class="n">TheModule</span><span class="p">;</span>
+<span class="k">static</span> <span class="n">IRBuilder</span><span class="o"><></span> <span class="n">Builder</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">());</span>
+<span class="k">static</span> <span class="n">std</span><span class="o">::</span><span class="n">map</span><span class="o"><</span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="p">,</span> <span class="n">Value</span><span class="o">*></span> <span class="n">NamedValues</span><span class="p">;</span>
+</pre></div>
+</div>
+<p>The static variables will be used during code generation. <tt class="docutils literal"><span class="pre">TheModule</span></tt>
+is the LLVM construct that contains all of the functions and global
+variables in a chunk of code. In many ways, it is the top-level
+structure that the LLVM IR uses to contain code.</p>
+<p>The <tt class="docutils literal"><span class="pre">Builder</span></tt> object is a helper object that makes it easy to generate
+LLVM instructions. Instances of the
+<tt class="docutils literal"><span class="pre">`IRBuilder</span></tt> <<a class="reference external" href="http://llvm.org/doxygen/IRBuilder_8h-source.html">http://llvm.org/doxygen/IRBuilder_8h-source.html</a>>`_
+class template keep track of the current place to insert instructions
+and has methods to create new instructions.</p>
+<p>The <tt class="docutils literal"><span class="pre">NamedValues</span></tt> map keeps track of which values are defined in the
+current scope and what their LLVM representation is. (In other words, it
+is a symbol table for the code). In this form of Kaleidoscope, the only
+things that can be referenced are function parameters. As such, function
+parameters will be in this map when generating code for their function
+body.</p>
+<p>With these basics in place, we can start talking about how to generate
+code for each expression. Note that this assumes that the <tt class="docutils literal"><span class="pre">Builder</span></tt>
+has been set up to generate code <em>into</em> something. For now, we’ll assume
+that this has already been done, and we’ll just use it to emit code.</p>
+</div>
+<div class="section" id="expression-code-generation">
+<h2><a class="toc-backref" href="#id3">3.3. Expression Code Generation</a><a class="headerlink" href="#expression-code-generation" title="Permalink to this headline">¶</a></h2>
+<p>Generating LLVM code for expression nodes is very straightforward: less
+than 45 lines of commented code for all four of our expression nodes.
+First we’ll do numeric literals:</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="n">Value</span> <span class="o">*</span><span class="n">NumberExprAST</span><span class="o">::</span><span class="n">Codegen</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">return</span> <span class="n">ConstantFP</span><span class="o">::</span><span class="n">get</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">(),</span> <span class="n">APFloat</span><span class="p">(</span><span class="n">Val</span><span class="p">));</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<p>In the LLVM IR, numeric constants are represented with the
+<tt class="docutils literal"><span class="pre">ConstantFP</span></tt> class, which holds the numeric value in an <tt class="docutils literal"><span class="pre">APFloat</span></tt>
+internally (<tt class="docutils literal"><span class="pre">APFloat</span></tt> has the capability of holding floating point
+constants of Arbitrary Precision). This code basically just creates
+and returns a <tt class="docutils literal"><span class="pre">ConstantFP</span></tt>. Note that in the LLVM IR that constants
+are all uniqued together and shared. For this reason, the API uses the
+“foo::get(...)” idiom instead of “new foo(..)” or “foo::Create(..)”.</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="n">Value</span> <span class="o">*</span><span class="n">VariableExprAST</span><span class="o">::</span><span class="n">Codegen</span><span class="p">()</span> <span class="p">{</span>
+  <span class="c1">// Look this variable up in the function.</span>
+  <span class="n">Value</span> <span class="o">*</span><span class="n">V</span> <span class="o">=</span> <span class="n">NamedValues</span><span class="p">[</span><span class="n">Name</span><span class="p">];</span>
+  <span class="k">return</span> <span class="n">V</span> <span class="o">?</span> <span class="n">V</span> <span class="o">:</span> <span class="n">ErrorV</span><span class="p">(</span><span class="s">"Unknown variable name"</span><span class="p">);</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<p>References to variables are also quite simple using LLVM. In the simple
+version of Kaleidoscope, we assume that the variable has already been
+emitted somewhere and its value is available. In practice, the only
+values that can be in the <tt class="docutils literal"><span class="pre">NamedValues</span></tt> map are function arguments.
+This code simply checks to see that the specified name is in the map (if
+not, an unknown variable is being referenced) and returns the value for
+it. In future chapters, we’ll add support for <a class="reference external" href="LangImpl5.html#for">loop induction
+variables</a> in the symbol table, and for <a class="reference external" href="LangImpl7.html#localvars">local
+variables</a>.</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="n">Value</span> <span class="o">*</span><span class="n">BinaryExprAST</span><span class="o">::</span><span class="n">Codegen</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">Value</span> <span class="o">*</span><span class="n">L</span> <span class="o">=</span> <span class="n">LHS</span><span class="o">-></span><span class="n">Codegen</span><span class="p">();</span>
+  <span class="n">Value</span> <span class="o">*</span><span class="n">R</span> <span class="o">=</span> <span class="n">RHS</span><span class="o">-></span><span class="n">Codegen</span><span class="p">();</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">L</span> <span class="o">==</span> <span class="mi">0</span> <span class="o">||</span> <span class="n">R</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+
+  <span class="k">switch</span> <span class="p">(</span><span class="n">Op</span><span class="p">)</span> <span class="p">{</span>
+  <span class="k">case</span> <span class="sc">'+'</span>: <span class="k">return</span> <span class="n">Builder</span><span class="p">.</span><span class="n">CreateFAdd</span><span class="p">(</span><span class="n">L</span><span class="p">,</span> <span class="n">R</span><span class="p">,</span> <span class="s">"addtmp"</span><span class="p">);</span>
+  <span class="k">case</span> <span class="sc">'-'</span>: <span class="k">return</span> <span class="n">Builder</span><span class="p">.</span><span class="n">CreateFSub</span><span class="p">(</span><span class="n">L</span><span class="p">,</span> <span class="n">R</span><span class="p">,</span> <span class="s">"subtmp"</span><span class="p">);</span>
+  <span class="k">case</span> <span class="sc">'*'</span>: <span class="k">return</span> <span class="n">Builder</span><span class="p">.</span><span class="n">CreateFMul</span><span class="p">(</span><span class="n">L</span><span class="p">,</span> <span class="n">R</span><span class="p">,</span> <span class="s">"multmp"</span><span class="p">);</span>
+  <span class="k">case</span> <span class="sc">'<'</span>:
+    <span class="n">L</span> <span class="o">=</span> <span class="n">Builder</span><span class="p">.</span><span class="n">CreateFCmpULT</span><span class="p">(</span><span class="n">L</span><span class="p">,</span> <span class="n">R</span><span class="p">,</span> <span class="s">"cmptmp"</span><span class="p">);</span>
+    <span class="c1">// Convert bool 0/1 to double 0.0 or 1.0</span>
+    <span class="k">return</span> <span class="n">Builder</span><span class="p">.</span><span class="n">CreateUIToFP</span><span class="p">(</span><span class="n">L</span><span class="p">,</span> <span class="n">Type</span><span class="o">::</span><span class="n">getDoubleTy</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">()),</span>
+                                <span class="s">"booltmp"</span><span class="p">);</span>
+  <span class="nl">default:</span> <span class="k">return</span> <span class="nf">ErrorV</span><span class="p">(</span><span class="s">"invalid binary operator"</span><span class="p">);</span>
+  <span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<p>Binary operators start to get more interesting. The basic idea here is
+that we recursively emit code for the left-hand side of the expression,
+then the right-hand side, then we compute the result of the binary
+expression. In this code, we do a simple switch on the opcode to create
+the right LLVM instruction.</p>
+<p>In the example above, the LLVM builder class is starting to show its
+value. IRBuilder knows where to insert the newly created instruction,
+all you have to do is specify what instruction to create (e.g. with
+<tt class="docutils literal"><span class="pre">CreateFAdd</span></tt>), which operands to use (<tt class="docutils literal"><span class="pre">L</span></tt> and <tt class="docutils literal"><span class="pre">R</span></tt> here) and
+optionally provide a name for the generated instruction.</p>
+<p>One nice thing about LLVM is that the name is just a hint. For instance,
+if the code above emits multiple “addtmp” variables, LLVM will
+automatically provide each one with an increasing, unique numeric
+suffix. Local value names for instructions are purely optional, but it
+makes it much easier to read the IR dumps.</p>
+<p><a class="reference external" href="../LangRef.html#instref">LLVM instructions</a> are constrained by strict
+rules: for example, the Left and Right operators of an <a class="reference external" href="../LangRef.html#i_add">add
+instruction</a> must have the same type, and the
+result type of the add must match the operand types. Because all values
+in Kaleidoscope are doubles, this makes for very simple code for add,
+sub and mul.</p>
+<p>On the other hand, LLVM specifies that the <a class="reference external" href="../LangRef.html#i_fcmp">fcmp
+instruction</a> always returns an ‘i1’ value (a
+one bit integer). The problem with this is that Kaleidoscope wants the
+value to be a 0.0 or 1.0 value. In order to get these semantics, we
+combine the fcmp instruction with a <a class="reference external" href="../LangRef.html#i_uitofp">uitofp
+instruction</a>. This instruction converts its
+input integer into a floating point value by treating the input as an
+unsigned value. In contrast, if we used the <a class="reference external" href="../LangRef.html#i_sitofp">sitofp
+instruction</a>, the Kaleidoscope ‘<’ operator
+would return 0.0 and -1.0, depending on the input value.</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="n">Value</span> <span class="o">*</span><span class="n">CallExprAST</span><span class="o">::</span><span class="n">Codegen</span><span class="p">()</span> <span class="p">{</span>
+  <span class="c1">// Look up the name in the global module table.</span>
+  <span class="n">Function</span> <span class="o">*</span><span class="n">CalleeF</span> <span class="o">=</span> <span class="n">TheModule</span><span class="o">-></span><span class="n">getFunction</span><span class="p">(</span><span class="n">Callee</span><span class="p">);</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">CalleeF</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">ErrorV</span><span class="p">(</span><span class="s">"Unknown function referenced"</span><span class="p">);</span>
+
+  <span class="c1">// If argument mismatch error.</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">CalleeF</span><span class="o">-></span><span class="n">arg_size</span><span class="p">()</span> <span class="o">!=</span> <span class="n">Args</span><span class="p">.</span><span class="n">size</span><span class="p">())</span>
+    <span class="k">return</span> <span class="n">ErrorV</span><span class="p">(</span><span class="s">"Incorrect # arguments passed"</span><span class="p">);</span>
+
+  <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">Value</span><span class="o">*></span> <span class="n">ArgsV</span><span class="p">;</span>
+  <span class="k">for</span> <span class="p">(</span><span class="kt">unsigned</span> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> <span class="n">e</span> <span class="o">=</span> <span class="n">Args</span><span class="p">.</span><span class="n">size</span><span class="p">();</span> <span class="n">i</span> <span class="o">!=</span> <span class="n">e</span><span class="p">;</span> <span class="o">++</span><span class="n">i</span><span class="p">)</span> <span class="p">{</span>
+    <span class="n">ArgsV</span><span class="p">.</span><span class="n">push_back</span><span class="p">(</span><span class="n">Args</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">-></span><span class="n">Codegen</span><span class="p">());</span>
+    <span class="k">if</span> <span class="p">(</span><span class="n">ArgsV</span><span class="p">.</span><span class="n">back</span><span class="p">()</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+  <span class="p">}</span>
+
+  <span class="k">return</span> <span class="n">Builder</span><span class="p">.</span><span class="n">CreateCall</span><span class="p">(</span><span class="n">CalleeF</span><span class="p">,</span> <span class="n">ArgsV</span><span class="p">,</span> <span class="s">"calltmp"</span><span class="p">);</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<p>Code generation for function calls is quite straightforward with LLVM.
+The code above initially does a function name lookup in the LLVM
+Module’s symbol table. Recall that the LLVM Module is the container that
+holds all of the functions we are JIT’ing. By giving each function the
+same name as what the user specifies, we can use the LLVM symbol table
+to resolve function names for us.</p>
+<p>Once we have the function to call, we recursively codegen each argument
+that is to be passed in, and create an LLVM <a class="reference external" href="../LangRef.html#i_call">call
+instruction</a>. Note that LLVM uses the native C
+calling conventions by default, allowing these calls to also call into
+standard library functions like “sin” and “cos”, with no additional
+effort.</p>
+<p>This wraps up our handling of the four basic expressions that we have so
+far in Kaleidoscope. Feel free to go in and add some more. For example,
+by browsing the <a class="reference external" href="../LangRef.html">LLVM language reference</a> you’ll find
+several other interesting instructions that are really easy to plug into
+our basic framework.</p>
+</div>
+<div class="section" id="function-code-generation">
+<h2><a class="toc-backref" href="#id4">3.4. Function Code Generation</a><a class="headerlink" href="#function-code-generation" title="Permalink to this headline">¶</a></h2>
+<p>Code generation for prototypes and functions must handle a number of
+details, which make their code less beautiful than expression code
+generation, but allows us to illustrate some important points. First,
+lets talk about code generation for prototypes: they are used both for
+function bodies and external function declarations. The code starts
+with:</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="n">Function</span> <span class="o">*</span><span class="n">PrototypeAST</span><span class="o">::</span><span class="n">Codegen</span><span class="p">()</span> <span class="p">{</span>
+  <span class="c1">// Make the function type:  double(double,double) etc.</span>
+  <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">Type</span><span class="o">*></span> <span class="n">Doubles</span><span class="p">(</span><span class="n">Args</span><span class="p">.</span><span class="n">size</span><span class="p">(),</span>
+                             <span class="n">Type</span><span class="o">::</span><span class="n">getDoubleTy</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">()));</span>
+  <span class="n">FunctionType</span> <span class="o">*</span><span class="n">FT</span> <span class="o">=</span> <span class="n">FunctionType</span><span class="o">::</span><span class="n">get</span><span class="p">(</span><span class="n">Type</span><span class="o">::</span><span class="n">getDoubleTy</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">()),</span>
+                                       <span class="n">Doubles</span><span class="p">,</span> <span class="nb">false</span><span class="p">);</span>
+
+  <span class="n">Function</span> <span class="o">*</span><span class="n">F</span> <span class="o">=</span> <span class="n">Function</span><span class="o">::</span><span class="n">Create</span><span class="p">(</span><span class="n">FT</span><span class="p">,</span> <span class="n">Function</span><span class="o">::</span><span class="n">ExternalLinkage</span><span class="p">,</span> <span class="n">Name</span><span class="p">,</span> <span class="n">TheModule</span><span class="p">);</span>
+</pre></div>
+</div>
+<p>This code packs a lot of power into a few lines. Note first that this
+function returns a “Function*” instead of a “Value*”. Because a
+“prototype” really talks about the external interface for a function
+(not the value computed by an expression), it makes sense for it to
+return the LLVM Function it corresponds to when codegen’d.</p>
+<p>The call to <tt class="docutils literal"><span class="pre">FunctionType::get</span></tt> creates the <tt class="docutils literal"><span class="pre">FunctionType</span></tt> that
+should be used for a given Prototype. Since all function arguments in
+Kaleidoscope are of type double, the first line creates a vector of “N”
+LLVM double types. It then uses the <tt class="docutils literal"><span class="pre">Functiontype::get</span></tt> method to
+create a function type that takes “N” doubles as arguments, returns one
+double as a result, and that is not vararg (the false parameter
+indicates this). Note that Types in LLVM are uniqued just like Constants
+are, so you don’t “new” a type, you “get” it.</p>
+<p>The final line above actually creates the function that the prototype
+will correspond to. This indicates the type, linkage and name to use, as
+well as which module to insert into. “<a class="reference external" href="../LangRef.html#linkage">external
+linkage</a>” means that the function may be
+defined outside the current module and/or that it is callable by
+functions outside the module. The Name passed in is the name the user
+specified: since “<tt class="docutils literal"><span class="pre">TheModule</span></tt>” is specified, this name is registered
+in “<tt class="docutils literal"><span class="pre">TheModule</span></tt>“s symbol table, which is used by the function call
+code above.</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="c1">// If F conflicted, there was already something named 'Name'.  If it has a</span>
+<span class="c1">// body, don't allow redefinition or reextern.</span>
+<span class="k">if</span> <span class="p">(</span><span class="n">F</span><span class="o">-></span><span class="n">getName</span><span class="p">()</span> <span class="o">!=</span> <span class="n">Name</span><span class="p">)</span> <span class="p">{</span>
+  <span class="c1">// Delete the one we just made and get the existing one.</span>
+  <span class="n">F</span><span class="o">-></span><span class="n">eraseFromParent</span><span class="p">();</span>
+  <span class="n">F</span> <span class="o">=</span> <span class="n">TheModule</span><span class="o">-></span><span class="n">getFunction</span><span class="p">(</span><span class="n">Name</span><span class="p">);</span>
+</pre></div>
+</div>
+<p>The Module symbol table works just like the Function symbol table when
+it comes to name conflicts: if a new function is created with a name
+that was previously added to the symbol table, the new function will get
+implicitly renamed when added to the Module. The code above exploits
+this fact to determine if there was a previous definition of this
+function.</p>
+<p>In Kaleidoscope, I choose to allow redefinitions of functions in two
+cases: first, we want to allow ‘extern’ing a function more than once, as
+long as the prototypes for the externs match (since all arguments have
+the same type, we just have to check that the number of arguments
+match). Second, we want to allow ‘extern’ing a function and then
+defining a body for it. This is useful when defining mutually recursive
+functions.</p>
+<p>In order to implement this, the code above first checks to see if there
+is a collision on the name of the function. If so, it deletes the
+function we just created (by calling <tt class="docutils literal"><span class="pre">eraseFromParent</span></tt>) and then
+calling <tt class="docutils literal"><span class="pre">getFunction</span></tt> to get the existing function with the specified
+name. Note that many APIs in LLVM have “erase” forms and “remove” forms.
+The “remove” form unlinks the object from its parent (e.g. a Function
+from a Module) and returns it. The “erase” form unlinks the object and
+then deletes it.</p>
+<div class="highlight-c++"><div class="highlight"><pre>  <span class="c1">// If F already has a body, reject this.</span>
+  <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">F</span><span class="o">-></span><span class="n">empty</span><span class="p">())</span> <span class="p">{</span>
+    <span class="n">ErrorF</span><span class="p">(</span><span class="s">"redefinition of function"</span><span class="p">);</span>
+    <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+  <span class="p">}</span>
+
+  <span class="c1">// If F took a different number of args, reject.</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">F</span><span class="o">-></span><span class="n">arg_size</span><span class="p">()</span> <span class="o">!=</span> <span class="n">Args</span><span class="p">.</span><span class="n">size</span><span class="p">())</span> <span class="p">{</span>
+    <span class="n">ErrorF</span><span class="p">(</span><span class="s">"redefinition of function with different # args"</span><span class="p">);</span>
+    <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+  <span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<p>In order to verify the logic above, we first check to see if the
+pre-existing function is “empty”. In this case, empty means that it has
+no basic blocks in it, which means it has no body. If it has no body, it
+is a forward declaration. Since we don’t allow anything after a full
+definition of the function, the code rejects this case. If the previous
+reference to a function was an ‘extern’, we simply verify that the
+number of arguments for that definition and this one match up. If not,
+we emit an error.</p>
+<div class="highlight-c++"><div class="highlight"><pre>  <span class="c1">// Set names for all arguments.</span>
+  <span class="kt">unsigned</span> <span class="n">Idx</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+  <span class="k">for</span> <span class="p">(</span><span class="n">Function</span><span class="o">::</span><span class="n">arg_iterator</span> <span class="n">AI</span> <span class="o">=</span> <span class="n">F</span><span class="o">-></span><span class="n">arg_begin</span><span class="p">();</span> <span class="n">Idx</span> <span class="o">!=</span> <span class="n">Args</span><span class="p">.</span><span class="n">size</span><span class="p">();</span>
+       <span class="o">++</span><span class="n">AI</span><span class="p">,</span> <span class="o">++</span><span class="n">Idx</span><span class="p">)</span> <span class="p">{</span>
+    <span class="n">AI</span><span class="o">-></span><span class="n">setName</span><span class="p">(</span><span class="n">Args</span><span class="p">[</span><span class="n">Idx</span><span class="p">]);</span>
+
+    <span class="c1">// Add arguments to variable symbol table.</span>
+    <span class="n">NamedValues</span><span class="p">[</span><span class="n">Args</span><span class="p">[</span><span class="n">Idx</span><span class="p">]]</span> <span class="o">=</span> <span class="n">AI</span><span class="p">;</span>
+  <span class="p">}</span>
+  <span class="k">return</span> <span class="n">F</span><span class="p">;</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<p>The last bit of code for prototypes loops over all of the arguments in
+the function, setting the name of the LLVM Argument objects to match,
+and registering the arguments in the <tt class="docutils literal"><span class="pre">NamedValues</span></tt> map for future use
+by the <tt class="docutils literal"><span class="pre">VariableExprAST</span></tt> AST node. Once this is set up, it returns the
+Function object to the caller. Note that we don’t check for conflicting
+argument names here (e.g. “extern foo(a b a)”). Doing so would be very
+straight-forward with the mechanics we have already used above.</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="n">Function</span> <span class="o">*</span><span class="n">FunctionAST</span><span class="o">::</span><span class="n">Codegen</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">NamedValues</span><span class="p">.</span><span class="n">clear</span><span class="p">();</span>
+
+  <span class="n">Function</span> <span class="o">*</span><span class="n">TheFunction</span> <span class="o">=</span> <span class="n">Proto</span><span class="o">-></span><span class="n">Codegen</span><span class="p">();</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">TheFunction</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span>
+    <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+</pre></div>
+</div>
+<p>Code generation for function definitions starts out simply enough: we
+just codegen the prototype (Proto) and verify that it is ok. We then
+clear out the <tt class="docutils literal"><span class="pre">NamedValues</span></tt> map to make sure that there isn’t anything
+in it from the last function we compiled. Code generation of the
+prototype ensures that there is an LLVM Function object that is ready to
+go for us.</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="c1">// Create a new basic block to start insertion into.</span>
+<span class="n">BasicBlock</span> <span class="o">*</span><span class="n">BB</span> <span class="o">=</span> <span class="n">BasicBlock</span><span class="o">::</span><span class="n">Create</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">(),</span> <span class="s">"entry"</span><span class="p">,</span> <span class="n">TheFunction</span><span class="p">);</span>
+<span class="n">Builder</span><span class="p">.</span><span class="n">SetInsertPoint</span><span class="p">(</span><span class="n">BB</span><span class="p">);</span>
+
+<span class="k">if</span> <span class="p">(</span><span class="n">Value</span> <span class="o">*</span><span class="n">RetVal</span> <span class="o">=</span> <span class="n">Body</span><span class="o">-></span><span class="n">Codegen</span><span class="p">())</span> <span class="p">{</span>
+</pre></div>
+</div>
+<p>Now we get to the point where the <tt class="docutils literal"><span class="pre">Builder</span></tt> is set up. The first line
+creates a new <a class="reference external" href="http://en.wikipedia.org/wiki/Basic_block">basic block</a>
+(named “entry”), which is inserted into <tt class="docutils literal"><span class="pre">TheFunction</span></tt>. The second line
+then tells the builder that new instructions should be inserted into the
+end of the new basic block. Basic blocks in LLVM are an important part
+of functions that define the <a class="reference external" href="http://en.wikipedia.org/wiki/Control_flow_graph">Control Flow
+Graph</a>. Since we
+don’t have any control flow, our functions will only contain one block
+at this point. We’ll fix this in <a class="reference external" href="LangImpl5.html">Chapter 5</a> :).</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="k">if</span> <span class="p">(</span><span class="n">Value</span> <span class="o">*</span><span class="n">RetVal</span> <span class="o">=</span> <span class="n">Body</span><span class="o">-></span><span class="n">Codegen</span><span class="p">())</span> <span class="p">{</span>
+  <span class="c1">// Finish off the function.</span>
+  <span class="n">Builder</span><span class="p">.</span><span class="n">CreateRet</span><span class="p">(</span><span class="n">RetVal</span><span class="p">);</span>
+
+  <span class="c1">// Validate the generated code, checking for consistency.</span>
+  <span class="n">verifyFunction</span><span class="p">(</span><span class="o">*</span><span class="n">TheFunction</span><span class="p">);</span>
+
+  <span class="k">return</span> <span class="n">TheFunction</span><span class="p">;</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<p>Once the insertion point is set up, we call the <tt class="docutils literal"><span class="pre">CodeGen()</span></tt> method for
+the root expression of the function. If no error happens, this emits
+code to compute the expression into the entry block and returns the
+value that was computed. Assuming no error, we then create an LLVM <a class="reference external" href="../LangRef.html#i_ret">ret
+instruction</a>, which completes the function.
+Once the function is built, we call <tt class="docutils literal"><span class="pre">verifyFunction</span></tt>, which is
+provided by LLVM. This function does a variety of consistency checks on
+the generated code, to determine if our compiler is doing everything
+right. Using this is important: it can catch a lot of bugs. Once the
+function is finished and validated, we return it.</p>
+<div class="highlight-c++"><div class="highlight"><pre>  <span class="c1">// Error reading body, remove function.</span>
+  <span class="n">TheFunction</span><span class="o">-></span><span class="n">eraseFromParent</span><span class="p">();</span>
+  <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<p>The only piece left here is handling of the error case. For simplicity,
+we handle this by merely deleting the function we produced with the
+<tt class="docutils literal"><span class="pre">eraseFromParent</span></tt> method. This allows the user to redefine a function
+that they incorrectly typed in before: if we didn’t delete it, it would
+live in the symbol table, with a body, preventing future redefinition.</p>
+<p>This code does have a bug, though. Since the <tt class="docutils literal"><span class="pre">PrototypeAST::Codegen</span></tt>
+can return a previously defined forward declaration, our code can
+actually delete a forward declaration. There are a number of ways to fix
+this bug, see what you can come up with! Here is a testcase:</p>
+<div class="highlight-python"><pre>extern foo(a b);     # ok, defines foo.
+def foo(a b) c;      # error, 'c' is invalid.
+def bar() foo(1, 2); # error, unknown function "foo"</pre>
+</div>
+</div>
+<div class="section" id="driver-changes-and-closing-thoughts">
+<h2><a class="toc-backref" href="#id5">3.5. Driver Changes and Closing Thoughts</a><a class="headerlink" href="#driver-changes-and-closing-thoughts" title="Permalink to this headline">¶</a></h2>
+<p>For now, code generation to LLVM doesn’t really get us much, except that
+we can look at the pretty IR calls. The sample code inserts calls to
+Codegen into the “<tt class="docutils literal"><span class="pre">HandleDefinition</span></tt>”, “<tt class="docutils literal"><span class="pre">HandleExtern</span></tt>” etc
+functions, and then dumps out the LLVM IR. This gives a nice way to look
+at the LLVM IR for simple functions. For example:</p>
+<div class="highlight-python"><pre>ready> 4+5;
+Read top-level expression:
+define double @0() {
+entry:
+  ret double 9.000000e+00
+}</pre>
+</div>
+<p>Note how the parser turns the top-level expression into anonymous
+functions for us. This will be handy when we add <a class="reference external" href="LangImpl4.html#jit">JIT
+support</a> in the next chapter. Also note that the
+code is very literally transcribed, no optimizations are being performed
+except simple constant folding done by IRBuilder. We will <a class="reference external" href="LangImpl4.html#trivialconstfold">add
+optimizations</a> explicitly in the next
+chapter.</p>
+<div class="highlight-python"><pre>ready> def foo(a b) a*a + 2*a*b + b*b;
+Read function definition:
+define double @foo(double %a, double %b) {
+entry:
+  %multmp = fmul double %a, %a
+  %multmp1 = fmul double 2.000000e+00, %a
+  %multmp2 = fmul double %multmp1, %b
+  %addtmp = fadd double %multmp, %multmp2
+  %multmp3 = fmul double %b, %b
+  %addtmp4 = fadd double %addtmp, %multmp3
+  ret double %addtmp4
+}</pre>
+</div>
+<p>This shows some simple arithmetic. Notice the striking similarity to the
+LLVM builder calls that we use to create the instructions.</p>
+<div class="highlight-python"><pre>ready> def bar(a) foo(a, 4.0) + bar(31337);
+Read function definition:
+define double @bar(double %a) {
+entry:
+  %calltmp = call double @foo(double %a, double 4.000000e+00)
+  %calltmp1 = call double @bar(double 3.133700e+04)
+  %addtmp = fadd double %calltmp, %calltmp1
+  ret double %addtmp
+}</pre>
+</div>
+<p>This shows some function calls. Note that this function will take a long
+time to execute if you call it. In the future we’ll add conditional
+control flow to actually make recursion useful :).</p>
+<div class="highlight-python"><pre>ready> extern cos(x);
+Read extern:
+declare double @cos(double)
+
+ready> cos(1.234);
+Read top-level expression:
+define double @1() {
+entry:
+  %calltmp = call double @cos(double 1.234000e+00)
+  ret double %calltmp
+}</pre>
+</div>
+<p>This shows an extern for the libm “cos” function, and a call to it.</p>
+<div class="highlight-python"><pre>ready> ^D
+; ModuleID = 'my cool jit'
+
+define double @0() {
+entry:
+  %addtmp = fadd double 4.000000e+00, 5.000000e+00
+  ret double %addtmp
+}
+
+define double @foo(double %a, double %b) {
+entry:
+  %multmp = fmul double %a, %a
+  %multmp1 = fmul double 2.000000e+00, %a
+  %multmp2 = fmul double %multmp1, %b
+  %addtmp = fadd double %multmp, %multmp2
+  %multmp3 = fmul double %b, %b
+  %addtmp4 = fadd double %addtmp, %multmp3
+  ret double %addtmp4
+}
+
+define double @bar(double %a) {
+entry:
+  %calltmp = call double @foo(double %a, double 4.000000e+00)
+  %calltmp1 = call double @bar(double 3.133700e+04)
+  %addtmp = fadd double %calltmp, %calltmp1
+  ret double %addtmp
+}
+
+declare double @cos(double)
+
+define double @1() {
+entry:
+  %calltmp = call double @cos(double 1.234000e+00)
+  ret double %calltmp
+}</pre>
+</div>
+<p>When you quit the current demo, it dumps out the IR for the entire
+module generated. Here you can see the big picture with all the
+functions referencing each other.</p>
+<p>This wraps up the third chapter of the Kaleidoscope tutorial. Up next,
+we’ll describe how to <a class="reference external" href="LangImpl4.html">add JIT codegen and optimizer
+support</a> to this so we can actually start running
+code!</p>
+</div>
+<div class="section" id="full-code-listing">
+<h2><a class="toc-backref" href="#id6">3.6. Full Code Listing</a><a class="headerlink" href="#full-code-listing" title="Permalink to this headline">¶</a></h2>
+<p>Here is the complete code listing for our running example, enhanced with
+the LLVM code generator. Because this uses the LLVM libraries, we need
+to link them in. To do this, we use the
+<a class="reference external" href="http://llvm.org/cmds/llvm-config.html">llvm-config</a> tool to inform
+our makefile/command line about which options to use:</p>
+<div class="highlight-bash"><div class="highlight"><pre><span class="c"># Compile</span>
+clang++ -g -O3 toy.cpp <span class="sb">`</span>llvm-config --cppflags --ldflags --libs core<span class="sb">`</span> -o toy
+<span class="c"># Run</span>
+./toy
+</pre></div>
+</div>
+<p>Here is the code:</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="cp">#include "llvm/Analysis/Verifier.h"</span>
+<span class="cp">#include "llvm/IR/DerivedTypes.h"</span>
+<span class="cp">#include "llvm/IR/IRBuilder.h"</span>
+<span class="cp">#include "llvm/IR/LLVMContext.h"</span>
+<span class="cp">#include "llvm/IR/Module.h"</span>
+<span class="cp">#include <cctype></span>
+<span class="cp">#include <cstdio></span>
+<span class="cp">#include <map></span>
+<span class="cp">#include <string></span>
+<span class="cp">#include <vector></span>
+<span class="k">using</span> <span class="k">namespace</span> <span class="n">llvm</span><span class="p">;</span>
+
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+<span class="c1">// Lexer</span>
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+
+<span class="c1">// The lexer returns tokens [0-255] if it is an unknown character, otherwise one</span>
+<span class="c1">// of these for known things.</span>
+<span class="k">enum</span> <span class="n">Token</span> <span class="p">{</span>
+  <span class="n">tok_eof</span> <span class="o">=</span> <span class="o">-</span><span class="mi">1</span><span class="p">,</span>
+
+  <span class="c1">// commands</span>
+  <span class="n">tok_def</span> <span class="o">=</span> <span class="o">-</span><span class="mi">2</span><span class="p">,</span> <span class="n">tok_extern</span> <span class="o">=</span> <span class="o">-</span><span class="mi">3</span><span class="p">,</span>
+
+  <span class="c1">// primary</span>
+  <span class="n">tok_identifier</span> <span class="o">=</span> <span class="o">-</span><span class="mi">4</span><span class="p">,</span> <span class="n">tok_number</span> <span class="o">=</span> <span class="o">-</span><span class="mi">5</span>
+<span class="p">};</span>
+
+<span class="k">static</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">IdentifierStr</span><span class="p">;</span>  <span class="c1">// Filled in if tok_identifier</span>
+<span class="k">static</span> <span class="kt">double</span> <span class="n">NumVal</span><span class="p">;</span>              <span class="c1">// Filled in if tok_number</span>
+
+<span class="c1">/// gettok - Return the next token from standard input.</span>
+<span class="k">static</span> <span class="kt">int</span> <span class="nf">gettok</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">static</span> <span class="kt">int</span> <span class="n">LastChar</span> <span class="o">=</span> <span class="sc">' '</span><span class="p">;</span>
+
+  <span class="c1">// Skip any whitespace.</span>
+  <span class="k">while</span> <span class="p">(</span><span class="n">isspace</span><span class="p">(</span><span class="n">LastChar</span><span class="p">))</span>
+    <span class="n">LastChar</span> <span class="o">=</span> <span class="n">getchar</span><span class="p">();</span>
+
+  <span class="k">if</span> <span class="p">(</span><span class="n">isalpha</span><span class="p">(</span><span class="n">LastChar</span><span class="p">))</span> <span class="p">{</span> <span class="c1">// identifier: [a-zA-Z][a-zA-Z0-9]*</span>
+    <span class="n">IdentifierStr</span> <span class="o">=</span> <span class="n">LastChar</span><span class="p">;</span>
+    <span class="k">while</span> <span class="p">(</span><span class="n">isalnum</span><span class="p">((</span><span class="n">LastChar</span> <span class="o">=</span> <span class="n">getchar</span><span class="p">())))</span>
+      <span class="n">IdentifierStr</span> <span class="o">+=</span> <span class="n">LastChar</span><span class="p">;</span>
+
+    <span class="k">if</span> <span class="p">(</span><span class="n">IdentifierStr</span> <span class="o">==</span> <span class="s">"def"</span><span class="p">)</span> <span class="k">return</span> <span class="n">tok_def</span><span class="p">;</span>
+    <span class="k">if</span> <span class="p">(</span><span class="n">IdentifierStr</span> <span class="o">==</span> <span class="s">"extern"</span><span class="p">)</span> <span class="k">return</span> <span class="n">tok_extern</span><span class="p">;</span>
+    <span class="k">return</span> <span class="n">tok_identifier</span><span class="p">;</span>
+  <span class="p">}</span>
+
+  <span class="k">if</span> <span class="p">(</span><span class="n">isdigit</span><span class="p">(</span><span class="n">LastChar</span><span class="p">)</span> <span class="o">||</span> <span class="n">LastChar</span> <span class="o">==</span> <span class="sc">'.'</span><span class="p">)</span> <span class="p">{</span>   <span class="c1">// Number: [0-9.]+</span>
+    <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">NumStr</span><span class="p">;</span>
+    <span class="k">do</span> <span class="p">{</span>
+      <span class="n">NumStr</span> <span class="o">+=</span> <span class="n">LastChar</span><span class="p">;</span>
+      <span class="n">LastChar</span> <span class="o">=</span> <span class="n">getchar</span><span class="p">();</span>
+    <span class="p">}</span> <span class="k">while</span> <span class="p">(</span><span class="n">isdigit</span><span class="p">(</span><span class="n">LastChar</span><span class="p">)</span> <span class="o">||</span> <span class="n">LastChar</span> <span class="o">==</span> <span class="sc">'.'</span><span class="p">);</span>
+
+    <span class="n">NumVal</span> <span class="o">=</span> <span class="n">strtod</span><span class="p">(</span><span class="n">NumStr</span><span class="p">.</span><span class="n">c_str</span><span class="p">(),</span> <span class="mi">0</span><span class="p">);</span>
+    <span class="k">return</span> <span class="n">tok_number</span><span class="p">;</span>
+  <span class="p">}</span>
+
+  <span class="k">if</span> <span class="p">(</span><span class="n">LastChar</span> <span class="o">==</span> <span class="sc">'#'</span><span class="p">)</span> <span class="p">{</span>
+    <span class="c1">// Comment until end of line.</span>
+    <span class="k">do</span> <span class="n">LastChar</span> <span class="o">=</span> <span class="n">getchar</span><span class="p">();</span>
+    <span class="k">while</span> <span class="p">(</span><span class="n">LastChar</span> <span class="o">!=</span> <span class="n">EOF</span> <span class="o">&&</span> <span class="n">LastChar</span> <span class="o">!=</span> <span class="sc">'\n'</span> <span class="o">&&</span> <span class="n">LastChar</span> <span class="o">!=</span> <span class="sc">'\r'</span><span class="p">);</span>
+    
+    <span class="k">if</span> <span class="p">(</span><span class="n">LastChar</span> <span class="o">!=</span> <span class="n">EOF</span><span class="p">)</span>
+      <span class="k">return</span> <span class="n">gettok</span><span class="p">();</span>
+  <span class="p">}</span>
+  
+  <span class="c1">// Check for end of file.  Don't eat the EOF.</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">LastChar</span> <span class="o">==</span> <span class="n">EOF</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">tok_eof</span><span class="p">;</span>
+
+  <span class="c1">// Otherwise, just return the character as its ascii value.</span>
+  <span class="kt">int</span> <span class="n">ThisChar</span> <span class="o">=</span> <span class="n">LastChar</span><span class="p">;</span>
+  <span class="n">LastChar</span> <span class="o">=</span> <span class="n">getchar</span><span class="p">();</span>
+  <span class="k">return</span> <span class="n">ThisChar</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+<span class="c1">// Abstract Syntax Tree (aka Parse Tree)</span>
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+<span class="k">namespace</span> <span class="p">{</span>
+<span class="c1">/// ExprAST - Base class for all expression nodes.</span>
+<span class="k">class</span> <span class="nc">ExprAST</span> <span class="p">{</span>
+<span class="nl">public:</span>
+  <span class="k">virtual</span> <span class="o">~</span><span class="n">ExprAST</span><span class="p">()</span> <span class="p">{}</span>
+  <span class="k">virtual</span> <span class="n">Value</span> <span class="o">*</span><span class="n">Codegen</span><span class="p">()</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<span class="p">};</span>
+
+<span class="c1">/// NumberExprAST - Expression class for numeric literals like "1.0".</span>
+<span class="k">class</span> <span class="nc">NumberExprAST</span> <span class="o">:</span> <span class="k">public</span> <span class="n">ExprAST</span> <span class="p">{</span>
+  <span class="kt">double</span> <span class="n">Val</span><span class="p">;</span>
+<span class="nl">public:</span>
+  <span class="n">NumberExprAST</span><span class="p">(</span><span class="kt">double</span> <span class="n">val</span><span class="p">)</span> <span class="o">:</span> <span class="n">Val</span><span class="p">(</span><span class="n">val</span><span class="p">)</span> <span class="p">{}</span>
+  <span class="k">virtual</span> <span class="n">Value</span> <span class="o">*</span><span class="n">Codegen</span><span class="p">();</span>
+<span class="p">};</span>
+
+<span class="c1">/// VariableExprAST - Expression class for referencing a variable, like "a".</span>
+<span class="k">class</span> <span class="nc">VariableExprAST</span> <span class="o">:</span> <span class="k">public</span> <span class="n">ExprAST</span> <span class="p">{</span>
+  <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">Name</span><span class="p">;</span>
+<span class="nl">public:</span>
+  <span class="n">VariableExprAST</span><span class="p">(</span><span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="o">&</span><span class="n">name</span><span class="p">)</span> <span class="o">:</span> <span class="n">Name</span><span class="p">(</span><span class="n">name</span><span class="p">)</span> <span class="p">{}</span>
+  <span class="k">virtual</span> <span class="n">Value</span> <span class="o">*</span><span class="n">Codegen</span><span class="p">();</span>
+<span class="p">};</span>
+
+<span class="c1">/// BinaryExprAST - Expression class for a binary operator.</span>
+<span class="k">class</span> <span class="nc">BinaryExprAST</span> <span class="o">:</span> <span class="k">public</span> <span class="n">ExprAST</span> <span class="p">{</span>
+  <span class="kt">char</span> <span class="n">Op</span><span class="p">;</span>
+  <span class="n">ExprAST</span> <span class="o">*</span><span class="n">LHS</span><span class="p">,</span> <span class="o">*</span><span class="n">RHS</span><span class="p">;</span>
+<span class="nl">public:</span>
+  <span class="n">BinaryExprAST</span><span class="p">(</span><span class="kt">char</span> <span class="n">op</span><span class="p">,</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="n">lhs</span><span class="p">,</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="n">rhs</span><span class="p">)</span> 
+    <span class="o">:</span> <span class="n">Op</span><span class="p">(</span><span class="n">op</span><span class="p">),</span> <span class="n">LHS</span><span class="p">(</span><span class="n">lhs</span><span class="p">),</span> <span class="n">RHS</span><span class="p">(</span><span class="n">rhs</span><span class="p">)</span> <span class="p">{}</span>
+  <span class="k">virtual</span> <span class="n">Value</span> <span class="o">*</span><span class="n">Codegen</span><span class="p">();</span>
+<span class="p">};</span>
+
+<span class="c1">/// CallExprAST - Expression class for function calls.</span>
+<span class="k">class</span> <span class="nc">CallExprAST</span> <span class="o">:</span> <span class="k">public</span> <span class="n">ExprAST</span> <span class="p">{</span>
+  <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">Callee</span><span class="p">;</span>
+  <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">ExprAST</span><span class="o">*></span> <span class="n">Args</span><span class="p">;</span>
+<span class="nl">public:</span>
+  <span class="n">CallExprAST</span><span class="p">(</span><span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="o">&</span><span class="n">callee</span><span class="p">,</span> <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">ExprAST</span><span class="o">*></span> <span class="o">&</span><span class="n">args</span><span class="p">)</span>
+    <span class="o">:</span> <span class="n">Callee</span><span class="p">(</span><span class="n">callee</span><span class="p">),</span> <span class="n">Args</span><span class="p">(</span><span class="n">args</span><span class="p">)</span> <span class="p">{}</span>
+  <span class="k">virtual</span> <span class="n">Value</span> <span class="o">*</span><span class="n">Codegen</span><span class="p">();</span>
+<span class="p">};</span>
+
+<span class="c1">/// PrototypeAST - This class represents the "prototype" for a function,</span>
+<span class="c1">/// which captures its name, and its argument names (thus implicitly the number</span>
+<span class="c1">/// of arguments the function takes).</span>
+<span class="k">class</span> <span class="nc">PrototypeAST</span> <span class="p">{</span>
+  <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">Name</span><span class="p">;</span>
+  <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">></span> <span class="n">Args</span><span class="p">;</span>
+<span class="nl">public:</span>
+  <span class="n">PrototypeAST</span><span class="p">(</span><span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="o">&</span><span class="n">name</span><span class="p">,</span> <span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">></span> <span class="o">&</span><span class="n">args</span><span class="p">)</span>
+    <span class="o">:</span> <span class="n">Name</span><span class="p">(</span><span class="n">name</span><span class="p">),</span> <span class="n">Args</span><span class="p">(</span><span class="n">args</span><span class="p">)</span> <span class="p">{}</span>
+  
+  <span class="n">Function</span> <span class="o">*</span><span class="n">Codegen</span><span class="p">();</span>
+<span class="p">};</span>
+
+<span class="c1">/// FunctionAST - This class represents a function definition itself.</span>
+<span class="k">class</span> <span class="nc">FunctionAST</span> <span class="p">{</span>
+  <span class="n">PrototypeAST</span> <span class="o">*</span><span class="n">Proto</span><span class="p">;</span>
+  <span class="n">ExprAST</span> <span class="o">*</span><span class="n">Body</span><span class="p">;</span>
+<span class="nl">public:</span>
+  <span class="n">FunctionAST</span><span class="p">(</span><span class="n">PrototypeAST</span> <span class="o">*</span><span class="n">proto</span><span class="p">,</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="n">body</span><span class="p">)</span>
+    <span class="o">:</span> <span class="n">Proto</span><span class="p">(</span><span class="n">proto</span><span class="p">),</span> <span class="n">Body</span><span class="p">(</span><span class="n">body</span><span class="p">)</span> <span class="p">{}</span>
+  
+  <span class="n">Function</span> <span class="o">*</span><span class="n">Codegen</span><span class="p">();</span>
+<span class="p">};</span>
+<span class="p">}</span> <span class="c1">// end anonymous namespace</span>
+
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+<span class="c1">// Parser</span>
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+
+<span class="c1">/// CurTok/getNextToken - Provide a simple token buffer.  CurTok is the current</span>
+<span class="c1">/// token the parser is looking at.  getNextToken reads another token from the</span>
+<span class="c1">/// lexer and updates CurTok with its results.</span>
+<span class="k">static</span> <span class="kt">int</span> <span class="n">CurTok</span><span class="p">;</span>
+<span class="k">static</span> <span class="kt">int</span> <span class="nf">getNextToken</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">return</span> <span class="n">CurTok</span> <span class="o">=</span> <span class="n">gettok</span><span class="p">();</span>
+<span class="p">}</span>
+
+<span class="c1">/// BinopPrecedence - This holds the precedence for each binary operator that is</span>
+<span class="c1">/// defined.</span>
+<span class="k">static</span> <span class="n">std</span><span class="o">::</span><span class="n">map</span><span class="o"><</span><span class="kt">char</span><span class="p">,</span> <span class="kt">int</span><span class="o">></span> <span class="n">BinopPrecedence</span><span class="p">;</span>
+
+<span class="c1">/// GetTokPrecedence - Get the precedence of the pending binary operator token.</span>
+<span class="k">static</span> <span class="kt">int</span> <span class="nf">GetTokPrecedence</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">isascii</span><span class="p">(</span><span class="n">CurTok</span><span class="p">))</span>
+    <span class="k">return</span> <span class="o">-</span><span class="mi">1</span><span class="p">;</span>
+  
+  <span class="c1">// Make sure it's a declared binop.</span>
+  <span class="kt">int</span> <span class="n">TokPrec</span> <span class="o">=</span> <span class="n">BinopPrecedence</span><span class="p">[</span><span class="n">CurTok</span><span class="p">];</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">TokPrec</span> <span class="o"><=</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="o">-</span><span class="mi">1</span><span class="p">;</span>
+  <span class="k">return</span> <span class="n">TokPrec</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="c1">/// Error* - These are little helper functions for error handling.</span>
+<span class="n">ExprAST</span> <span class="o">*</span><span class="nf">Error</span><span class="p">(</span><span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">Str</span><span class="p">)</span> <span class="p">{</span> <span class="n">fprintf</span><span class="p">(</span><span class="n">stderr</span><span class="p">,</span> <span class="s">"Error: %s</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="n">Str</span><span class="p">);</span><span class="k">return</span> <span class="mi">0</span><span class="p">;}</span>
+<span class="n">PrototypeAST</span> <span class="o">*</span><span class="nf">ErrorP</span><span class="p">(</span><span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">Str</span><span class="p">)</span> <span class="p">{</span> <span class="n">Error</span><span class="p">(</span><span class="n">Str</span><span class="p">);</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span> <span class="p">}</span>
+<span class="n">FunctionAST</span> <span class="o">*</span><span class="nf">ErrorF</span><span class="p">(</span><span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">Str</span><span class="p">)</span> <span class="p">{</span> <span class="n">Error</span><span class="p">(</span><span class="n">Str</span><span class="p">);</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span> <span class="p">}</span>
+
+<span class="k">static</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="nf">ParseExpression</span><span class="p">();</span>
+
+<span class="c1">/// identifierexpr</span>
+<span class="c1">///   ::= identifier</span>
+<span class="c1">///   ::= identifier '(' expression* ')'</span>
+<span class="k">static</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="nf">ParseIdentifierExpr</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">IdName</span> <span class="o">=</span> <span class="n">IdentifierStr</span><span class="p">;</span>
+  
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat identifier.</span>
+  
+  <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="sc">'('</span><span class="p">)</span> <span class="c1">// Simple variable ref.</span>
+    <span class="k">return</span> <span class="k">new</span> <span class="n">VariableExprAST</span><span class="p">(</span><span class="n">IdName</span><span class="p">);</span>
+  
+  <span class="c1">// Call.</span>
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat (</span>
+  <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">ExprAST</span><span class="o">*></span> <span class="n">Args</span><span class="p">;</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="sc">')'</span><span class="p">)</span> <span class="p">{</span>
+    <span class="k">while</span> <span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="p">{</span>
+      <span class="n">ExprAST</span> <span class="o">*</span><span class="n">Arg</span> <span class="o">=</span> <span class="n">ParseExpression</span><span class="p">();</span>
+      <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">Arg</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+      <span class="n">Args</span><span class="p">.</span><span class="n">push_back</span><span class="p">(</span><span class="n">Arg</span><span class="p">);</span>
+
+      <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">==</span> <span class="sc">')'</span><span class="p">)</span> <span class="k">break</span><span class="p">;</span>
+
+      <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="sc">','</span><span class="p">)</span>
+        <span class="k">return</span> <span class="n">Error</span><span class="p">(</span><span class="s">"Expected ')' or ',' in argument list"</span><span class="p">);</span>
+      <span class="n">getNextToken</span><span class="p">();</span>
+    <span class="p">}</span>
+  <span class="p">}</span>
+
+  <span class="c1">// Eat the ')'.</span>
+  <span class="n">getNextToken</span><span class="p">();</span>
+  
+  <span class="k">return</span> <span class="k">new</span> <span class="n">CallExprAST</span><span class="p">(</span><span class="n">IdName</span><span class="p">,</span> <span class="n">Args</span><span class="p">);</span>
+<span class="p">}</span>
+
+<span class="c1">/// numberexpr ::= number</span>
+<span class="k">static</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="nf">ParseNumberExpr</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">ExprAST</span> <span class="o">*</span><span class="n">Result</span> <span class="o">=</span> <span class="k">new</span> <span class="n">NumberExprAST</span><span class="p">(</span><span class="n">NumVal</span><span class="p">);</span>
+  <span class="n">getNextToken</span><span class="p">();</span> <span class="c1">// consume the number</span>
+  <span class="k">return</span> <span class="n">Result</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="c1">/// parenexpr ::= '(' expression ')'</span>
+<span class="k">static</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="nf">ParseParenExpr</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat (.</span>
+  <span class="n">ExprAST</span> <span class="o">*</span><span class="n">V</span> <span class="o">=</span> <span class="n">ParseExpression</span><span class="p">();</span>
+  <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">V</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+  
+  <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="sc">')'</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">Error</span><span class="p">(</span><span class="s">"expected ')'"</span><span class="p">);</span>
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat ).</span>
+  <span class="k">return</span> <span class="n">V</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="c1">/// primary</span>
+<span class="c1">///   ::= identifierexpr</span>
+<span class="c1">///   ::= numberexpr</span>
+<span class="c1">///   ::= parenexpr</span>
+<span class="k">static</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="nf">ParsePrimary</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">switch</span> <span class="p">(</span><span class="n">CurTok</span><span class="p">)</span> <span class="p">{</span>
+  <span class="nl">default:</span> <span class="k">return</span> <span class="n">Error</span><span class="p">(</span><span class="s">"unknown token when expecting an expression"</span><span class="p">);</span>
+  <span class="k">case</span> <span class="n">tok_identifier</span>: <span class="k">return</span> <span class="n">ParseIdentifierExpr</span><span class="p">();</span>
+  <span class="k">case</span> <span class="n">tok_number</span>:     <span class="k">return</span> <span class="n">ParseNumberExpr</span><span class="p">();</span>
+  <span class="k">case</span> <span class="sc">'('</span>:            <span class="k">return</span> <span class="n">ParseParenExpr</span><span class="p">();</span>
+  <span class="p">}</span>
+<span class="p">}</span>
+
+<span class="c1">/// binoprhs</span>
+<span class="c1">///   ::= ('+' primary)*</span>
+<span class="k">static</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="nf">ParseBinOpRHS</span><span class="p">(</span><span class="kt">int</span> <span class="n">ExprPrec</span><span class="p">,</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="n">LHS</span><span class="p">)</span> <span class="p">{</span>
+  <span class="c1">// If this is a binop, find its precedence.</span>
+  <span class="k">while</span> <span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="p">{</span>
+    <span class="kt">int</span> <span class="n">TokPrec</span> <span class="o">=</span> <span class="n">GetTokPrecedence</span><span class="p">();</span>
+    
+    <span class="c1">// If this is a binop that binds at least as tightly as the current binop,</span>
+    <span class="c1">// consume it, otherwise we are done.</span>
+    <span class="k">if</span> <span class="p">(</span><span class="n">TokPrec</span> <span class="o"><</span> <span class="n">ExprPrec</span><span class="p">)</span>
+      <span class="k">return</span> <span class="n">LHS</span><span class="p">;</span>
+    
+    <span class="c1">// Okay, we know this is a binop.</span>
+    <span class="kt">int</span> <span class="n">BinOp</span> <span class="o">=</span> <span class="n">CurTok</span><span class="p">;</span>
+    <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat binop</span>
+    
+    <span class="c1">// Parse the primary expression after the binary operator.</span>
+    <span class="n">ExprAST</span> <span class="o">*</span><span class="n">RHS</span> <span class="o">=</span> <span class="n">ParsePrimary</span><span class="p">();</span>
+    <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">RHS</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+    
+    <span class="c1">// If BinOp binds less tightly with RHS than the operator after RHS, let</span>
+    <span class="c1">// the pending operator take RHS as its LHS.</span>
+    <span class="kt">int</span> <span class="n">NextPrec</span> <span class="o">=</span> <span class="n">GetTokPrecedence</span><span class="p">();</span>
+    <span class="k">if</span> <span class="p">(</span><span class="n">TokPrec</span> <span class="o"><</span> <span class="n">NextPrec</span><span class="p">)</span> <span class="p">{</span>
+      <span class="n">RHS</span> <span class="o">=</span> <span class="n">ParseBinOpRHS</span><span class="p">(</span><span class="n">TokPrec</span><span class="o">+</span><span class="mi">1</span><span class="p">,</span> <span class="n">RHS</span><span class="p">);</span>
+      <span class="k">if</span> <span class="p">(</span><span class="n">RHS</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+    <span class="p">}</span>
+    
+    <span class="c1">// Merge LHS/RHS.</span>
+    <span class="n">LHS</span> <span class="o">=</span> <span class="k">new</span> <span class="n">BinaryExprAST</span><span class="p">(</span><span class="n">BinOp</span><span class="p">,</span> <span class="n">LHS</span><span class="p">,</span> <span class="n">RHS</span><span class="p">);</span>
+  <span class="p">}</span>
+<span class="p">}</span>
+
+<span class="c1">/// expression</span>
+<span class="c1">///   ::= primary binoprhs</span>
+<span class="c1">///</span>
+<span class="k">static</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="nf">ParseExpression</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">ExprAST</span> <span class="o">*</span><span class="n">LHS</span> <span class="o">=</span> <span class="n">ParsePrimary</span><span class="p">();</span>
+  <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">LHS</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+  
+  <span class="k">return</span> <span class="n">ParseBinOpRHS</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">LHS</span><span class="p">);</span>
+<span class="p">}</span>
+
+<span class="c1">/// prototype</span>
+<span class="c1">///   ::= id '(' id* ')'</span>
+<span class="k">static</span> <span class="n">PrototypeAST</span> <span class="o">*</span><span class="nf">ParsePrototype</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="n">tok_identifier</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">ErrorP</span><span class="p">(</span><span class="s">"Expected function name in prototype"</span><span class="p">);</span>
+
+  <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">FnName</span> <span class="o">=</span> <span class="n">IdentifierStr</span><span class="p">;</span>
+  <span class="n">getNextToken</span><span class="p">();</span>
+  
+  <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="sc">'('</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">ErrorP</span><span class="p">(</span><span class="s">"Expected '(' in prototype"</span><span class="p">);</span>
+  
+  <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">></span> <span class="n">ArgNames</span><span class="p">;</span>
+  <span class="k">while</span> <span class="p">(</span><span class="n">getNextToken</span><span class="p">()</span> <span class="o">==</span> <span class="n">tok_identifier</span><span class="p">)</span>
+    <span class="n">ArgNames</span><span class="p">.</span><span class="n">push_back</span><span class="p">(</span><span class="n">IdentifierStr</span><span class="p">);</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="sc">')'</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">ErrorP</span><span class="p">(</span><span class="s">"Expected ')' in prototype"</span><span class="p">);</span>
+  
+  <span class="c1">// success.</span>
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat ')'.</span>
+  
+  <span class="k">return</span> <span class="k">new</span> <span class="n">PrototypeAST</span><span class="p">(</span><span class="n">FnName</span><span class="p">,</span> <span class="n">ArgNames</span><span class="p">);</span>
+<span class="p">}</span>
+
+<span class="c1">/// definition ::= 'def' prototype expression</span>
+<span class="k">static</span> <span class="n">FunctionAST</span> <span class="o">*</span><span class="nf">ParseDefinition</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat def.</span>
+  <span class="n">PrototypeAST</span> <span class="o">*</span><span class="n">Proto</span> <span class="o">=</span> <span class="n">ParsePrototype</span><span class="p">();</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">Proto</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+
+  <span class="k">if</span> <span class="p">(</span><span class="n">ExprAST</span> <span class="o">*</span><span class="n">E</span> <span class="o">=</span> <span class="n">ParseExpression</span><span class="p">())</span>
+    <span class="k">return</span> <span class="k">new</span> <span class="n">FunctionAST</span><span class="p">(</span><span class="n">Proto</span><span class="p">,</span> <span class="n">E</span><span class="p">);</span>
+  <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="c1">/// toplevelexpr ::= expression</span>
+<span class="k">static</span> <span class="n">FunctionAST</span> <span class="o">*</span><span class="nf">ParseTopLevelExpr</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">ExprAST</span> <span class="o">*</span><span class="n">E</span> <span class="o">=</span> <span class="n">ParseExpression</span><span class="p">())</span> <span class="p">{</span>
+    <span class="c1">// Make an anonymous proto.</span>
+    <span class="n">PrototypeAST</span> <span class="o">*</span><span class="n">Proto</span> <span class="o">=</span> <span class="k">new</span> <span class="n">PrototypeAST</span><span class="p">(</span><span class="s">""</span><span class="p">,</span> <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">></span><span class="p">());</span>
+    <span class="k">return</span> <span class="k">new</span> <span class="n">FunctionAST</span><span class="p">(</span><span class="n">Proto</span><span class="p">,</span> <span class="n">E</span><span class="p">);</span>
+  <span class="p">}</span>
+  <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="c1">/// external ::= 'extern' prototype</span>
+<span class="k">static</span> <span class="n">PrototypeAST</span> <span class="o">*</span><span class="nf">ParseExtern</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat extern.</span>
+  <span class="k">return</span> <span class="n">ParsePrototype</span><span class="p">();</span>
+<span class="p">}</span>
+
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+<span class="c1">// Code Generation</span>
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+
+<span class="k">static</span> <span class="n">Module</span> <span class="o">*</span><span class="n">TheModule</span><span class="p">;</span>
+<span class="k">static</span> <span class="n">IRBuilder</span><span class="o"><></span> <span class="n">Builder</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">());</span>
+<span class="k">static</span> <span class="n">std</span><span class="o">::</span><span class="n">map</span><span class="o"><</span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="p">,</span> <span class="n">Value</span><span class="o">*></span> <span class="n">NamedValues</span><span class="p">;</span>
+
+<span class="n">Value</span> <span class="o">*</span><span class="nf">ErrorV</span><span class="p">(</span><span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">Str</span><span class="p">)</span> <span class="p">{</span> <span class="n">Error</span><span class="p">(</span><span class="n">Str</span><span class="p">);</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span> <span class="p">}</span>
+
+<span class="n">Value</span> <span class="o">*</span><span class="n">NumberExprAST</span><span class="o">::</span><span class="n">Codegen</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">return</span> <span class="n">ConstantFP</span><span class="o">::</span><span class="n">get</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">(),</span> <span class="n">APFloat</span><span class="p">(</span><span class="n">Val</span><span class="p">));</span>
+<span class="p">}</span>
+
+<span class="n">Value</span> <span class="o">*</span><span class="n">VariableExprAST</span><span class="o">::</span><span class="n">Codegen</span><span class="p">()</span> <span class="p">{</span>
+  <span class="c1">// Look this variable up in the function.</span>
+  <span class="n">Value</span> <span class="o">*</span><span class="n">V</span> <span class="o">=</span> <span class="n">NamedValues</span><span class="p">[</span><span class="n">Name</span><span class="p">];</span>
+  <span class="k">return</span> <span class="n">V</span> <span class="o">?</span> <span class="n">V</span> <span class="o">:</span> <span class="n">ErrorV</span><span class="p">(</span><span class="s">"Unknown variable name"</span><span class="p">);</span>
+<span class="p">}</span>
+
+<span class="n">Value</span> <span class="o">*</span><span class="n">BinaryExprAST</span><span class="o">::</span><span class="n">Codegen</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">Value</span> <span class="o">*</span><span class="n">L</span> <span class="o">=</span> <span class="n">LHS</span><span class="o">-></span><span class="n">Codegen</span><span class="p">();</span>
+  <span class="n">Value</span> <span class="o">*</span><span class="n">R</span> <span class="o">=</span> <span class="n">RHS</span><span class="o">-></span><span class="n">Codegen</span><span class="p">();</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">L</span> <span class="o">==</span> <span class="mi">0</span> <span class="o">||</span> <span class="n">R</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+  
+  <span class="k">switch</span> <span class="p">(</span><span class="n">Op</span><span class="p">)</span> <span class="p">{</span>
+  <span class="k">case</span> <span class="sc">'+'</span>: <span class="k">return</span> <span class="n">Builder</span><span class="p">.</span><span class="n">CreateFAdd</span><span class="p">(</span><span class="n">L</span><span class="p">,</span> <span class="n">R</span><span class="p">,</span> <span class="s">"addtmp"</span><span class="p">);</span>
+  <span class="k">case</span> <span class="sc">'-'</span>: <span class="k">return</span> <span class="n">Builder</span><span class="p">.</span><span class="n">CreateFSub</span><span class="p">(</span><span class="n">L</span><span class="p">,</span> <span class="n">R</span><span class="p">,</span> <span class="s">"subtmp"</span><span class="p">);</span>
+  <span class="k">case</span> <span class="sc">'*'</span>: <span class="k">return</span> <span class="n">Builder</span><span class="p">.</span><span class="n">CreateFMul</span><span class="p">(</span><span class="n">L</span><span class="p">,</span> <span class="n">R</span><span class="p">,</span> <span class="s">"multmp"</span><span class="p">);</span>
+  <span class="k">case</span> <span class="sc">'<'</span>:
+    <span class="n">L</span> <span class="o">=</span> <span class="n">Builder</span><span class="p">.</span><span class="n">CreateFCmpULT</span><span class="p">(</span><span class="n">L</span><span class="p">,</span> <span class="n">R</span><span class="p">,</span> <span class="s">"cmptmp"</span><span class="p">);</span>
+    <span class="c1">// Convert bool 0/1 to double 0.0 or 1.0</span>
+    <span class="k">return</span> <span class="n">Builder</span><span class="p">.</span><span class="n">CreateUIToFP</span><span class="p">(</span><span class="n">L</span><span class="p">,</span> <span class="n">Type</span><span class="o">::</span><span class="n">getDoubleTy</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">()),</span>
+                                <span class="s">"booltmp"</span><span class="p">);</span>
+  <span class="nl">default:</span> <span class="k">return</span> <span class="nf">ErrorV</span><span class="p">(</span><span class="s">"invalid binary operator"</span><span class="p">);</span>
+  <span class="p">}</span>
+<span class="p">}</span>
+
+<span class="n">Value</span> <span class="o">*</span><span class="n">CallExprAST</span><span class="o">::</span><span class="n">Codegen</span><span class="p">()</span> <span class="p">{</span>
+  <span class="c1">// Look up the name in the global module table.</span>
+  <span class="n">Function</span> <span class="o">*</span><span class="n">CalleeF</span> <span class="o">=</span> <span class="n">TheModule</span><span class="o">-></span><span class="n">getFunction</span><span class="p">(</span><span class="n">Callee</span><span class="p">);</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">CalleeF</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">ErrorV</span><span class="p">(</span><span class="s">"Unknown function referenced"</span><span class="p">);</span>
+  
+  <span class="c1">// If argument mismatch error.</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">CalleeF</span><span class="o">-></span><span class="n">arg_size</span><span class="p">()</span> <span class="o">!=</span> <span class="n">Args</span><span class="p">.</span><span class="n">size</span><span class="p">())</span>
+    <span class="k">return</span> <span class="n">ErrorV</span><span class="p">(</span><span class="s">"Incorrect # arguments passed"</span><span class="p">);</span>
+
+  <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">Value</span><span class="o">*></span> <span class="n">ArgsV</span><span class="p">;</span>
+  <span class="k">for</span> <span class="p">(</span><span class="kt">unsigned</span> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> <span class="n">e</span> <span class="o">=</span> <span class="n">Args</span><span class="p">.</span><span class="n">size</span><span class="p">();</span> <span class="n">i</span> <span class="o">!=</span> <span class="n">e</span><span class="p">;</span> <span class="o">++</span><span class="n">i</span><span class="p">)</span> <span class="p">{</span>
+    <span class="n">ArgsV</span><span class="p">.</span><span class="n">push_back</span><span class="p">(</span><span class="n">Args</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">-></span><span class="n">Codegen</span><span class="p">());</span>
+    <span class="k">if</span> <span class="p">(</span><span class="n">ArgsV</span><span class="p">.</span><span class="n">back</span><span class="p">()</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+  <span class="p">}</span>
+  
+  <span class="k">return</span> <span class="n">Builder</span><span class="p">.</span><span class="n">CreateCall</span><span class="p">(</span><span class="n">CalleeF</span><span class="p">,</span> <span class="n">ArgsV</span><span class="p">,</span> <span class="s">"calltmp"</span><span class="p">);</span>
+<span class="p">}</span>
+
+<span class="n">Function</span> <span class="o">*</span><span class="n">PrototypeAST</span><span class="o">::</span><span class="n">Codegen</span><span class="p">()</span> <span class="p">{</span>
+  <span class="c1">// Make the function type:  double(double,double) etc.</span>
+  <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">Type</span><span class="o">*></span> <span class="n">Doubles</span><span class="p">(</span><span class="n">Args</span><span class="p">.</span><span class="n">size</span><span class="p">(),</span>
+                             <span class="n">Type</span><span class="o">::</span><span class="n">getDoubleTy</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">()));</span>
+  <span class="n">FunctionType</span> <span class="o">*</span><span class="n">FT</span> <span class="o">=</span> <span class="n">FunctionType</span><span class="o">::</span><span class="n">get</span><span class="p">(</span><span class="n">Type</span><span class="o">::</span><span class="n">getDoubleTy</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">()),</span>
+                                       <span class="n">Doubles</span><span class="p">,</span> <span class="nb">false</span><span class="p">);</span>
+  
+  <span class="n">Function</span> <span class="o">*</span><span class="n">F</span> <span class="o">=</span> <span class="n">Function</span><span class="o">::</span><span class="n">Create</span><span class="p">(</span><span class="n">FT</span><span class="p">,</span> <span class="n">Function</span><span class="o">::</span><span class="n">ExternalLinkage</span><span class="p">,</span> <span class="n">Name</span><span class="p">,</span> <span class="n">TheModule</span><span class="p">);</span>
+  
+  <span class="c1">// If F conflicted, there was already something named 'Name'.  If it has a</span>
+  <span class="c1">// body, don't allow redefinition or reextern.</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">F</span><span class="o">-></span><span class="n">getName</span><span class="p">()</span> <span class="o">!=</span> <span class="n">Name</span><span class="p">)</span> <span class="p">{</span>
+    <span class="c1">// Delete the one we just made and get the existing one.</span>
+    <span class="n">F</span><span class="o">-></span><span class="n">eraseFromParent</span><span class="p">();</span>
+    <span class="n">F</span> <span class="o">=</span> <span class="n">TheModule</span><span class="o">-></span><span class="n">getFunction</span><span class="p">(</span><span class="n">Name</span><span class="p">);</span>
+    
+    <span class="c1">// If F already has a body, reject this.</span>
+    <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">F</span><span class="o">-></span><span class="n">empty</span><span class="p">())</span> <span class="p">{</span>
+      <span class="n">ErrorF</span><span class="p">(</span><span class="s">"redefinition of function"</span><span class="p">);</span>
+      <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+    <span class="p">}</span>
+    
+    <span class="c1">// If F took a different number of args, reject.</span>
+    <span class="k">if</span> <span class="p">(</span><span class="n">F</span><span class="o">-></span><span class="n">arg_size</span><span class="p">()</span> <span class="o">!=</span> <span class="n">Args</span><span class="p">.</span><span class="n">size</span><span class="p">())</span> <span class="p">{</span>
+      <span class="n">ErrorF</span><span class="p">(</span><span class="s">"redefinition of function with different # args"</span><span class="p">);</span>
+      <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+    <span class="p">}</span>
+  <span class="p">}</span>
+  
+  <span class="c1">// Set names for all arguments.</span>
+  <span class="kt">unsigned</span> <span class="n">Idx</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+  <span class="k">for</span> <span class="p">(</span><span class="n">Function</span><span class="o">::</span><span class="n">arg_iterator</span> <span class="n">AI</span> <span class="o">=</span> <span class="n">F</span><span class="o">-></span><span class="n">arg_begin</span><span class="p">();</span> <span class="n">Idx</span> <span class="o">!=</span> <span class="n">Args</span><span class="p">.</span><span class="n">size</span><span class="p">();</span>
+       <span class="o">++</span><span class="n">AI</span><span class="p">,</span> <span class="o">++</span><span class="n">Idx</span><span class="p">)</span> <span class="p">{</span>
+    <span class="n">AI</span><span class="o">-></span><span class="n">setName</span><span class="p">(</span><span class="n">Args</span><span class="p">[</span><span class="n">Idx</span><span class="p">]);</span>
+    
+    <span class="c1">// Add arguments to variable symbol table.</span>
+    <span class="n">NamedValues</span><span class="p">[</span><span class="n">Args</span><span class="p">[</span><span class="n">Idx</span><span class="p">]]</span> <span class="o">=</span> <span class="n">AI</span><span class="p">;</span>
+  <span class="p">}</span>
+  
+  <span class="k">return</span> <span class="n">F</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="n">Function</span> <span class="o">*</span><span class="n">FunctionAST</span><span class="o">::</span><span class="n">Codegen</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">NamedValues</span><span class="p">.</span><span class="n">clear</span><span class="p">();</span>
+  
+  <span class="n">Function</span> <span class="o">*</span><span class="n">TheFunction</span> <span class="o">=</span> <span class="n">Proto</span><span class="o">-></span><span class="n">Codegen</span><span class="p">();</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">TheFunction</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span>
+    <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+  
+  <span class="c1">// Create a new basic block to start insertion into.</span>
+  <span class="n">BasicBlock</span> <span class="o">*</span><span class="n">BB</span> <span class="o">=</span> <span class="n">BasicBlock</span><span class="o">::</span><span class="n">Create</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">(),</span> <span class="s">"entry"</span><span class="p">,</span> <span class="n">TheFunction</span><span class="p">);</span>
+  <span class="n">Builder</span><span class="p">.</span><span class="n">SetInsertPoint</span><span class="p">(</span><span class="n">BB</span><span class="p">);</span>
+  
+  <span class="k">if</span> <span class="p">(</span><span class="n">Value</span> <span class="o">*</span><span class="n">RetVal</span> <span class="o">=</span> <span class="n">Body</span><span class="o">-></span><span class="n">Codegen</span><span class="p">())</span> <span class="p">{</span>
+    <span class="c1">// Finish off the function.</span>
+    <span class="n">Builder</span><span class="p">.</span><span class="n">CreateRet</span><span class="p">(</span><span class="n">RetVal</span><span class="p">);</span>
+
+    <span class="c1">// Validate the generated code, checking for consistency.</span>
+    <span class="n">verifyFunction</span><span class="p">(</span><span class="o">*</span><span class="n">TheFunction</span><span class="p">);</span>
+
+    <span class="k">return</span> <span class="n">TheFunction</span><span class="p">;</span>
+  <span class="p">}</span>
+  
+  <span class="c1">// Error reading body, remove function.</span>
+  <span class="n">TheFunction</span><span class="o">-></span><span class="n">eraseFromParent</span><span class="p">();</span>
+  <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+<span class="c1">// Top-Level parsing and JIT Driver</span>
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+
+<span class="k">static</span> <span class="kt">void</span> <span class="n">HandleDefinition</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">FunctionAST</span> <span class="o">*</span><span class="n">F</span> <span class="o">=</span> <span class="n">ParseDefinition</span><span class="p">())</span> <span class="p">{</span>
+    <span class="k">if</span> <span class="p">(</span><span class="n">Function</span> <span class="o">*</span><span class="n">LF</span> <span class="o">=</span> <span class="n">F</span><span class="o">-></span><span class="n">Codegen</span><span class="p">())</span> <span class="p">{</span>
+      <span class="n">fprintf</span><span class="p">(</span><span class="n">stderr</span><span class="p">,</span> <span class="s">"Read function definition:"</span><span class="p">);</span>
+      <span class="n">LF</span><span class="o">-></span><span class="n">dump</span><span class="p">();</span>
+    <span class="p">}</span>
+  <span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
+    <span class="c1">// Skip token for error recovery.</span>
+    <span class="n">getNextToken</span><span class="p">();</span>
+  <span class="p">}</span>
+<span class="p">}</span>
+
+<span class="k">static</span> <span class="kt">void</span> <span class="n">HandleExtern</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">PrototypeAST</span> <span class="o">*</span><span class="n">P</span> <span class="o">=</span> <span class="n">ParseExtern</span><span class="p">())</span> <span class="p">{</span>
+    <span class="k">if</span> <span class="p">(</span><span class="n">Function</span> <span class="o">*</span><span class="n">F</span> <span class="o">=</span> <span class="n">P</span><span class="o">-></span><span class="n">Codegen</span><span class="p">())</span> <span class="p">{</span>
+      <span class="n">fprintf</span><span class="p">(</span><span class="n">stderr</span><span class="p">,</span> <span class="s">"Read extern: "</span><span class="p">);</span>
+      <span class="n">F</span><span class="o">-></span><span class="n">dump</span><span class="p">();</span>
+    <span class="p">}</span>
+  <span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
+    <span class="c1">// Skip token for error recovery.</span>
+    <span class="n">getNextToken</span><span class="p">();</span>
+  <span class="p">}</span>
+<span class="p">}</span>
+
+<span class="k">static</span> <span class="kt">void</span> <span class="n">HandleTopLevelExpression</span><span class="p">()</span> <span class="p">{</span>
+  <span class="c1">// Evaluate a top-level expression into an anonymous function.</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">FunctionAST</span> <span class="o">*</span><span class="n">F</span> <span class="o">=</span> <span class="n">ParseTopLevelExpr</span><span class="p">())</span> <span class="p">{</span>
+    <span class="k">if</span> <span class="p">(</span><span class="n">Function</span> <span class="o">*</span><span class="n">LF</span> <span class="o">=</span> <span class="n">F</span><span class="o">-></span><span class="n">Codegen</span><span class="p">())</span> <span class="p">{</span>
+      <span class="n">fprintf</span><span class="p">(</span><span class="n">stderr</span><span class="p">,</span> <span class="s">"Read top-level expression:"</span><span class="p">);</span>
+      <span class="n">LF</span><span class="o">-></span><span class="n">dump</span><span class="p">();</span>
+    <span class="p">}</span>
+  <span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
+    <span class="c1">// Skip token for error recovery.</span>
+    <span class="n">getNextToken</span><span class="p">();</span>
+  <span class="p">}</span>
+<span class="p">}</span>
+
+<span class="c1">/// top ::= definition | external | expression | ';'</span>
+<span class="k">static</span> <span class="kt">void</span> <span class="n">MainLoop</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">while</span> <span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="p">{</span>
+    <span class="n">fprintf</span><span class="p">(</span><span class="n">stderr</span><span class="p">,</span> <span class="s">"ready> "</span><span class="p">);</span>
+    <span class="k">switch</span> <span class="p">(</span><span class="n">CurTok</span><span class="p">)</span> <span class="p">{</span>
+    <span class="k">case</span> <span class="n">tok_eof</span>:    <span class="k">return</span><span class="p">;</span>
+    <span class="k">case</span> <span class="sc">';'</span>:        <span class="n">getNextToken</span><span class="p">();</span> <span class="k">break</span><span class="p">;</span>  <span class="c1">// ignore top-level semicolons.</span>
+    <span class="k">case</span> <span class="n">tok_def</span>:    <span class="n">HandleDefinition</span><span class="p">();</span> <span class="k">break</span><span class="p">;</span>
+    <span class="k">case</span> <span class="n">tok_extern</span>: <span class="n">HandleExtern</span><span class="p">();</span> <span class="k">break</span><span class="p">;</span>
+    <span class="nl">default:</span>         <span class="n">HandleTopLevelExpression</span><span class="p">();</span> <span class="k">break</span><span class="p">;</span>
+    <span class="p">}</span>
+  <span class="p">}</span>
+<span class="p">}</span>
+
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+<span class="c1">// "Library" functions that can be "extern'd" from user code.</span>
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+
+<span class="c1">/// putchard - putchar that takes a double and returns 0.</span>
+<span class="k">extern</span> <span class="s">"C"</span> 
+<span class="kt">double</span> <span class="n">putchard</span><span class="p">(</span><span class="kt">double</span> <span class="n">X</span><span class="p">)</span> <span class="p">{</span>
+  <span class="n">putchar</span><span class="p">((</span><span class="kt">char</span><span class="p">)</span><span class="n">X</span><span class="p">);</span>
+  <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+<span class="c1">// Main driver code.</span>
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+
+<span class="kt">int</span> <span class="n">main</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">LLVMContext</span> <span class="o">&</span><span class="n">Context</span> <span class="o">=</span> <span class="n">getGlobalContext</span><span class="p">();</span>
+
+  <span class="c1">// Install standard binary operators.</span>
+  <span class="c1">// 1 is lowest precedence.</span>
+  <span class="n">BinopPrecedence</span><span class="p">[</span><span class="sc">'<'</span><span class="p">]</span> <span class="o">=</span> <span class="mi">10</span><span class="p">;</span>
+  <span class="n">BinopPrecedence</span><span class="p">[</span><span class="sc">'+'</span><span class="p">]</span> <span class="o">=</span> <span class="mi">20</span><span class="p">;</span>
+  <span class="n">BinopPrecedence</span><span class="p">[</span><span class="sc">'-'</span><span class="p">]</span> <span class="o">=</span> <span class="mi">20</span><span class="p">;</span>
+  <span class="n">BinopPrecedence</span><span class="p">[</span><span class="sc">'*'</span><span class="p">]</span> <span class="o">=</span> <span class="mi">40</span><span class="p">;</span>  <span class="c1">// highest.</span>
+
+  <span class="c1">// Prime the first token.</span>
+  <span class="n">fprintf</span><span class="p">(</span><span class="n">stderr</span><span class="p">,</span> <span class="s">"ready> "</span><span class="p">);</span>
+  <span class="n">getNextToken</span><span class="p">();</span>
+
+  <span class="c1">// Make the module, which holds all the code.</span>
+  <span class="n">TheModule</span> <span class="o">=</span> <span class="k">new</span> <span class="n">Module</span><span class="p">(</span><span class="s">"my cool jit"</span><span class="p">,</span> <span class="n">Context</span><span class="p">);</span>
+
+  <span class="c1">// Run the main "interpreter loop" now.</span>
+  <span class="n">MainLoop</span><span class="p">();</span>
+
+  <span class="c1">// Print out all of the generated code.</span>
+  <span class="n">TheModule</span><span class="o">-></span><span class="n">dump</span><span class="p">();</span>
+
+  <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<p><a class="reference external" href="LangImpl4.html">Next: Adding JIT and Optimizer Support</a></p>
+</div>
+</div>
+
+
+          </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="LangImpl4.html" title="4. Kaleidoscope: Adding JIT and Optimizer Support"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="LangImpl2.html" title="2. Kaleidoscope: Implementing a Parser and AST"
+             >previous</a> |</li>
+  <li><a href="http://llvm.org/">LLVM Home</a> | </li>
+  <li><a href="../index.html">Documentation</a>»</li>
+
+          <li><a href="index.html" >LLVM Tutorial: Table of Contents</a> »</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        © Copyright 2003-2013, LLVM Project.
+      Last updated on 2014-05-06.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
+    </div>
+  </body>
+</html>
\ No newline at end of file

Added: www-releases/trunk/3.4.1/docs/tutorial/LangImpl4.html
URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/3.4.1/docs/tutorial/LangImpl4.html?rev=208244&view=auto
==============================================================================
--- www-releases/trunk/3.4.1/docs/tutorial/LangImpl4.html (added)
+++ www-releases/trunk/3.4.1/docs/tutorial/LangImpl4.html Wed May  7 15:09:32 2014
@@ -0,0 +1,1104 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>4. Kaleidoscope: Adding JIT and Optimizer Support — LLVM 3.4 documentation</title>
+    
+    <link rel="stylesheet" href="../_static/llvm-theme.css" type="text/css" />
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '3.4',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../_static/jquery.js"></script>
+    <script type="text/javascript" src="../_static/underscore.js"></script>
+    <script type="text/javascript" src="../_static/doctools.js"></script>
+    <link rel="top" title="LLVM 3.4 documentation" href="../index.html" />
+    <link rel="up" title="LLVM Tutorial: Table of Contents" href="index.html" />
+    <link rel="next" title="5. Kaleidoscope: Extending the Language: Control Flow" href="LangImpl5.html" />
+    <link rel="prev" title="3. Kaleidoscope: Code generation to LLVM IR" href="LangImpl3.html" />
+<style type="text/css">
+  table.right { float: right; margin-left: 20px; }
+  table.right td { border: 1px solid #ccc; }
+</style>
+
+  </head>
+  <body>
+<div class="logo">
+  <a href="../index.html">
+    <img src="../_static/logo.png"
+         alt="LLVM Logo" width="250" height="88"/></a>
+</div>
+
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="LangImpl5.html" title="5. Kaleidoscope: Extending the Language: Control Flow"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="LangImpl3.html" title="3. Kaleidoscope: Code generation to LLVM IR"
+             accesskey="P">previous</a> |</li>
+  <li><a href="http://llvm.org/">LLVM Home</a> | </li>
+  <li><a href="../index.html">Documentation</a>»</li>
+
+          <li><a href="index.html" accesskey="U">LLVM Tutorial: Table of Contents</a> »</li> 
+      </ul>
+    </div>
+
+
+    <div class="document">
+      <div class="documentwrapper">
+          <div class="body">
+            
+  <div class="section" id="kaleidoscope-adding-jit-and-optimizer-support">
+<h1>4. Kaleidoscope: Adding JIT and Optimizer Support<a class="headerlink" href="#kaleidoscope-adding-jit-and-optimizer-support" title="Permalink to this headline">¶</a></h1>
+<div class="contents local topic" id="contents">
+<ul class="simple">
+<li><a class="reference internal" href="#chapter-4-introduction" id="id1">Chapter 4 Introduction</a></li>
+<li><a class="reference internal" href="#trivial-constant-folding" id="id2">Trivial Constant Folding</a></li>
+<li><a class="reference internal" href="#llvm-optimization-passes" id="id3">LLVM Optimization Passes</a></li>
+<li><a class="reference internal" href="#adding-a-jit-compiler" id="id4">Adding a JIT Compiler</a></li>
+<li><a class="reference internal" href="#full-code-listing" id="id5">Full Code Listing</a></li>
+</ul>
+</div>
+<div class="section" id="chapter-4-introduction">
+<h2><a class="toc-backref" href="#id1">4.1. Chapter 4 Introduction</a><a class="headerlink" href="#chapter-4-introduction" title="Permalink to this headline">¶</a></h2>
+<p>Welcome to Chapter 4 of the “<a class="reference external" href="index.html">Implementing a language with
+LLVM</a>” tutorial. Chapters 1-3 described the implementation
+of a simple language and added support for generating LLVM IR. This
+chapter describes two new techniques: adding optimizer support to your
+language, and adding JIT compiler support. These additions will
+demonstrate how to get nice, efficient code for the Kaleidoscope
+language.</p>
+</div>
+<div class="section" id="trivial-constant-folding">
+<h2><a class="toc-backref" href="#id2">4.2. Trivial Constant Folding</a><a class="headerlink" href="#trivial-constant-folding" title="Permalink to this headline">¶</a></h2>
+<p>Our demonstration for Chapter 3 is elegant and easy to extend.
+Unfortunately, it does not produce wonderful code. The IRBuilder,
+however, does give us obvious optimizations when compiling simple code:</p>
+<div class="highlight-python"><pre>ready> def test(x) 1+2+x;
+Read function definition:
+define double @test(double %x) {
+entry:
+        %addtmp = fadd double 3.000000e+00, %x
+        ret double %addtmp
+}</pre>
+</div>
+<p>This code is not a literal transcription of the AST built by parsing the
+input. That would be:</p>
+<div class="highlight-python"><pre>ready> def test(x) 1+2+x;
+Read function definition:
+define double @test(double %x) {
+entry:
+        %addtmp = fadd double 2.000000e+00, 1.000000e+00
+        %addtmp1 = fadd double %addtmp, %x
+        ret double %addtmp1
+}</pre>
+</div>
+<p>Constant folding, as seen above, in particular, is a very common and
+very important optimization: so much so that many language implementors
+implement constant folding support in their AST representation.</p>
+<p>With LLVM, you don’t need this support in the AST. Since all calls to
+build LLVM IR go through the LLVM IR builder, the builder itself checked
+to see if there was a constant folding opportunity when you call it. If
+so, it just does the constant fold and return the constant instead of
+creating an instruction.</p>
+<p>Well, that was easy :). In practice, we recommend always using
+<tt class="docutils literal"><span class="pre">IRBuilder</span></tt> when generating code like this. It has no “syntactic
+overhead” for its use (you don’t have to uglify your compiler with
+constant checks everywhere) and it can dramatically reduce the amount of
+LLVM IR that is generated in some cases (particular for languages with a
+macro preprocessor or that use a lot of constants).</p>
+<p>On the other hand, the <tt class="docutils literal"><span class="pre">IRBuilder</span></tt> is limited by the fact that it does
+all of its analysis inline with the code as it is built. If you take a
+slightly more complex example:</p>
+<div class="highlight-python"><pre>ready> def test(x) (1+2+x)*(x+(1+2));
+ready> Read function definition:
+define double @test(double %x) {
+entry:
+        %addtmp = fadd double 3.000000e+00, %x
+        %addtmp1 = fadd double %x, 3.000000e+00
+        %multmp = fmul double %addtmp, %addtmp1
+        ret double %multmp
+}</pre>
+</div>
+<p>In this case, the LHS and RHS of the multiplication are the same value.
+We’d really like to see this generate “<tt class="docutils literal"><span class="pre">tmp</span> <span class="pre">=</span> <span class="pre">x+3;</span> <span class="pre">result</span> <span class="pre">=</span> <span class="pre">tmp*tmp;</span></tt>”
+instead of computing “<tt class="docutils literal"><span class="pre">x+3</span></tt>” twice.</p>
+<p>Unfortunately, no amount of local analysis will be able to detect and
+correct this. This requires two transformations: reassociation of
+expressions (to make the add’s lexically identical) and Common
+Subexpression Elimination (CSE) to delete the redundant add instruction.
+Fortunately, LLVM provides a broad range of optimizations that you can
+use, in the form of “passes”.</p>
+</div>
+<div class="section" id="llvm-optimization-passes">
+<h2><a class="toc-backref" href="#id3">4.3. LLVM Optimization Passes</a><a class="headerlink" href="#llvm-optimization-passes" title="Permalink to this headline">¶</a></h2>
+<p>LLVM provides many optimization passes, which do many different sorts of
+things and have different tradeoffs. Unlike other systems, LLVM doesn’t
+hold to the mistaken notion that one set of optimizations is right for
+all languages and for all situations. LLVM allows a compiler implementor
+to make complete decisions about what optimizations to use, in which
+order, and in what situation.</p>
+<p>As a concrete example, LLVM supports both “whole module” passes, which
+look across as large of body of code as they can (often a whole file,
+but if run at link time, this can be a substantial portion of the whole
+program). It also supports and includes “per-function” passes which just
+operate on a single function at a time, without looking at other
+functions. For more information on passes and how they are run, see the
+<a class="reference external" href="../WritingAnLLVMPass.html">How to Write a Pass</a> document and the
+<a class="reference external" href="../Passes.html">List of LLVM Passes</a>.</p>
+<p>For Kaleidoscope, we are currently generating functions on the fly, one
+at a time, as the user types them in. We aren’t shooting for the
+ultimate optimization experience in this setting, but we also want to
+catch the easy and quick stuff where possible. As such, we will choose
+to run a few per-function optimizations as the user types the function
+in. If we wanted to make a “static Kaleidoscope compiler”, we would use
+exactly the code we have now, except that we would defer running the
+optimizer until the entire file has been parsed.</p>
+<p>In order to get per-function optimizations going, we need to set up a
+<a class="reference external" href="../WritingAnLLVMPass.html#passmanager">FunctionPassManager</a> to hold
+and organize the LLVM optimizations that we want to run. Once we have
+that, we can add a set of optimizations to run. The code looks like
+this:</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="n">FunctionPassManager</span> <span class="nf">OurFPM</span><span class="p">(</span><span class="n">TheModule</span><span class="p">);</span>
+
+<span class="c1">// Set up the optimizer pipeline.  Start with registering info about how the</span>
+<span class="c1">// target lays out data structures.</span>
+<span class="n">OurFPM</span><span class="p">.</span><span class="n">add</span><span class="p">(</span><span class="k">new</span> <span class="n">DataLayout</span><span class="p">(</span><span class="o">*</span><span class="n">TheExecutionEngine</span><span class="o">-></span><span class="n">getDataLayout</span><span class="p">()));</span>
+<span class="c1">// Provide basic AliasAnalysis support for GVN.</span>
+<span class="n">OurFPM</span><span class="p">.</span><span class="n">add</span><span class="p">(</span><span class="n">createBasicAliasAnalysisPass</span><span class="p">());</span>
+<span class="c1">// Do simple "peephole" optimizations and bit-twiddling optzns.</span>
+<span class="n">OurFPM</span><span class="p">.</span><span class="n">add</span><span class="p">(</span><span class="n">createInstructionCombiningPass</span><span class="p">());</span>
+<span class="c1">// Reassociate expressions.</span>
+<span class="n">OurFPM</span><span class="p">.</span><span class="n">add</span><span class="p">(</span><span class="n">createReassociatePass</span><span class="p">());</span>
+<span class="c1">// Eliminate Common SubExpressions.</span>
+<span class="n">OurFPM</span><span class="p">.</span><span class="n">add</span><span class="p">(</span><span class="n">createGVNPass</span><span class="p">());</span>
+<span class="c1">// Simplify the control flow graph (deleting unreachable blocks, etc).</span>
+<span class="n">OurFPM</span><span class="p">.</span><span class="n">add</span><span class="p">(</span><span class="n">createCFGSimplificationPass</span><span class="p">());</span>
+
+<span class="n">OurFPM</span><span class="p">.</span><span class="n">doInitialization</span><span class="p">();</span>
+
+<span class="c1">// Set the global so the code gen can use this.</span>
+<span class="n">TheFPM</span> <span class="o">=</span> <span class="o">&</span><span class="n">OurFPM</span><span class="p">;</span>
+
+<span class="c1">// Run the main "interpreter loop" now.</span>
+<span class="n">MainLoop</span><span class="p">();</span>
+</pre></div>
+</div>
+<p>This code defines a <tt class="docutils literal"><span class="pre">FunctionPassManager</span></tt>, “<tt class="docutils literal"><span class="pre">OurFPM</span></tt>”. It requires a
+pointer to the <tt class="docutils literal"><span class="pre">Module</span></tt> to construct itself. Once it is set up, we use
+a series of “add” calls to add a bunch of LLVM passes. The first pass is
+basically boilerplate, it adds a pass so that later optimizations know
+how the data structures in the program are laid out. The
+“<tt class="docutils literal"><span class="pre">TheExecutionEngine</span></tt>” variable is related to the JIT, which we will
+get to in the next section.</p>
+<p>In this case, we choose to add 4 optimization passes. The passes we
+chose here are a pretty standard set of “cleanup” optimizations that are
+useful for a wide variety of code. I won’t delve into what they do but,
+believe me, they are a good starting place :).</p>
+<p>Once the PassManager is set up, we need to make use of it. We do this by
+running it after our newly created function is constructed (in
+<tt class="docutils literal"><span class="pre">FunctionAST::Codegen</span></tt>), but before it is returned to the client:</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="k">if</span> <span class="p">(</span><span class="n">Value</span> <span class="o">*</span><span class="n">RetVal</span> <span class="o">=</span> <span class="n">Body</span><span class="o">-></span><span class="n">Codegen</span><span class="p">())</span> <span class="p">{</span>
+  <span class="c1">// Finish off the function.</span>
+  <span class="n">Builder</span><span class="p">.</span><span class="n">CreateRet</span><span class="p">(</span><span class="n">RetVal</span><span class="p">);</span>
+
+  <span class="c1">// Validate the generated code, checking for consistency.</span>
+  <span class="n">verifyFunction</span><span class="p">(</span><span class="o">*</span><span class="n">TheFunction</span><span class="p">);</span>
+
+  <span class="c1">// Optimize the function.</span>
+  <span class="n">TheFPM</span><span class="o">-></span><span class="n">run</span><span class="p">(</span><span class="o">*</span><span class="n">TheFunction</span><span class="p">);</span>
+
+  <span class="k">return</span> <span class="n">TheFunction</span><span class="p">;</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<p>As you can see, this is pretty straightforward. The
+<tt class="docutils literal"><span class="pre">FunctionPassManager</span></tt> optimizes and updates the LLVM Function* in
+place, improving (hopefully) its body. With this in place, we can try
+our test above again:</p>
+<div class="highlight-python"><pre>ready> def test(x) (1+2+x)*(x+(1+2));
+ready> Read function definition:
+define double @test(double %x) {
+entry:
+        %addtmp = fadd double %x, 3.000000e+00
+        %multmp = fmul double %addtmp, %addtmp
+        ret double %multmp
+}</pre>
+</div>
+<p>As expected, we now get our nicely optimized code, saving a floating
+point add instruction from every execution of this function.</p>
+<p>LLVM provides a wide variety of optimizations that can be used in
+certain circumstances. Some <a class="reference external" href="../Passes.html">documentation about the various
+passes</a> is available, but it isn’t very complete.
+Another good source of ideas can come from looking at the passes that
+<tt class="docutils literal"><span class="pre">Clang</span></tt> runs to get started. The “<tt class="docutils literal"><span class="pre">opt</span></tt>” tool allows you to
+experiment with passes from the command line, so you can see if they do
+anything.</p>
+<p>Now that we have reasonable code coming out of our front-end, lets talk
+about executing it!</p>
+</div>
+<div class="section" id="adding-a-jit-compiler">
+<h2><a class="toc-backref" href="#id4">4.4. Adding a JIT Compiler</a><a class="headerlink" href="#adding-a-jit-compiler" title="Permalink to this headline">¶</a></h2>
+<p>Code that is available in LLVM IR can have a wide variety of tools
+applied to it. For example, you can run optimizations on it (as we did
+above), you can dump it out in textual or binary forms, you can compile
+the code to an assembly file (.s) for some target, or you can JIT
+compile it. The nice thing about the LLVM IR representation is that it
+is the “common currency” between many different parts of the compiler.</p>
+<p>In this section, we’ll add JIT compiler support to our interpreter. The
+basic idea that we want for Kaleidoscope is to have the user enter
+function bodies as they do now, but immediately evaluate the top-level
+expressions they type in. For example, if they type in “1 + 2;”, we
+should evaluate and print out 3. If they define a function, they should
+be able to call it from the command line.</p>
+<p>In order to do this, we first declare and initialize the JIT. This is
+done by adding a global variable and a call in <tt class="docutils literal"><span class="pre">main</span></tt>:</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="k">static</span> <span class="n">ExecutionEngine</span> <span class="o">*</span><span class="n">TheExecutionEngine</span><span class="p">;</span>
+<span class="p">...</span>
+<span class="kt">int</span> <span class="n">main</span><span class="p">()</span> <span class="p">{</span>
+  <span class="p">..</span>
+  <span class="c1">// Create the JIT.  This takes ownership of the module.</span>
+  <span class="n">TheExecutionEngine</span> <span class="o">=</span> <span class="n">EngineBuilder</span><span class="p">(</span><span class="n">TheModule</span><span class="p">).</span><span class="n">create</span><span class="p">();</span>
+  <span class="p">..</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<p>This creates an abstract “Execution Engine” which can be either a JIT
+compiler or the LLVM interpreter. LLVM will automatically pick a JIT
+compiler for you if one is available for your platform, otherwise it
+will fall back to the interpreter.</p>
+<p>Once the <tt class="docutils literal"><span class="pre">ExecutionEngine</span></tt> is created, the JIT is ready to be used.
+There are a variety of APIs that are useful, but the simplest one is the
+“<tt class="docutils literal"><span class="pre">getPointerToFunction(F)</span></tt>” method. This method JIT compiles the
+specified LLVM Function and returns a function pointer to the generated
+machine code. In our case, this means that we can change the code that
+parses a top-level expression to look like this:</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="k">static</span> <span class="kt">void</span> <span class="nf">HandleTopLevelExpression</span><span class="p">()</span> <span class="p">{</span>
+  <span class="c1">// Evaluate a top-level expression into an anonymous function.</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">FunctionAST</span> <span class="o">*</span><span class="n">F</span> <span class="o">=</span> <span class="n">ParseTopLevelExpr</span><span class="p">())</span> <span class="p">{</span>
+    <span class="k">if</span> <span class="p">(</span><span class="n">Function</span> <span class="o">*</span><span class="n">LF</span> <span class="o">=</span> <span class="n">F</span><span class="o">-></span><span class="n">Codegen</span><span class="p">())</span> <span class="p">{</span>
+      <span class="n">LF</span><span class="o">-></span><span class="n">dump</span><span class="p">();</span>  <span class="c1">// Dump the function for exposition purposes.</span>
+
+      <span class="c1">// JIT the function, returning a function pointer.</span>
+      <span class="kt">void</span> <span class="o">*</span><span class="n">FPtr</span> <span class="o">=</span> <span class="n">TheExecutionEngine</span><span class="o">-></span><span class="n">getPointerToFunction</span><span class="p">(</span><span class="n">LF</span><span class="p">);</span>
+
+      <span class="c1">// Cast it to the right type (takes no arguments, returns a double) so we</span>
+      <span class="c1">// can call it as a native function.</span>
+      <span class="kt">double</span> <span class="p">(</span><span class="o">*</span><span class="n">FP</span><span class="p">)()</span> <span class="o">=</span> <span class="p">(</span><span class="kt">double</span> <span class="p">(</span><span class="o">*</span><span class="p">)())(</span><span class="kt">intptr_t</span><span class="p">)</span><span class="n">FPtr</span><span class="p">;</span>
+      <span class="n">fprintf</span><span class="p">(</span><span class="n">stderr</span><span class="p">,</span> <span class="s">"Evaluated to %f</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="n">FP</span><span class="p">());</span>
+    <span class="p">}</span>
+</pre></div>
+</div>
+<p>Recall that we compile top-level expressions into a self-contained LLVM
+function that takes no arguments and returns the computed double.
+Because the LLVM JIT compiler matches the native platform ABI, this
+means that you can just cast the result pointer to a function pointer of
+that type and call it directly. This means, there is no difference
+between JIT compiled code and native machine code that is statically
+linked into your application.</p>
+<p>With just these two changes, lets see how Kaleidoscope works now!</p>
+<div class="highlight-python"><pre>ready> 4+5;
+Read top-level expression:
+define double @0() {
+entry:
+  ret double 9.000000e+00
+}
+
+Evaluated to 9.000000</pre>
+</div>
+<p>Well this looks like it is basically working. The dump of the function
+shows the “no argument function that always returns double” that we
+synthesize for each top-level expression that is typed in. This
+demonstrates very basic functionality, but can we do more?</p>
+<div class="highlight-python"><pre>ready> def testfunc(x y) x + y*2;
+Read function definition:
+define double @testfunc(double %x, double %y) {
+entry:
+  %multmp = fmul double %y, 2.000000e+00
+  %addtmp = fadd double %multmp, %x
+  ret double %addtmp
+}
+
+ready> testfunc(4, 10);
+Read top-level expression:
+define double @1() {
+entry:
+  %calltmp = call double @testfunc(double 4.000000e+00, double 1.000000e+01)
+  ret double %calltmp
+}
+
+Evaluated to 24.000000</pre>
+</div>
+<p>This illustrates that we can now call user code, but there is something
+a bit subtle going on here. Note that we only invoke the JIT on the
+anonymous functions that <em>call testfunc</em>, but we never invoked it on
+<em>testfunc</em> itself. What actually happened here is that the JIT scanned
+for all non-JIT’d functions transitively called from the anonymous
+function and compiled all of them before returning from
+<tt class="docutils literal"><span class="pre">getPointerToFunction()</span></tt>.</p>
+<p>The JIT provides a number of other more advanced interfaces for things
+like freeing allocated machine code, rejit’ing functions to update them,
+etc. However, even with this simple code, we get some surprisingly
+powerful capabilities - check this out (I removed the dump of the
+anonymous functions, you should get the idea by now :) :</p>
+<div class="highlight-python"><pre>ready> extern sin(x);
+Read extern:
+declare double @sin(double)
+
+ready> extern cos(x);
+Read extern:
+declare double @cos(double)
+
+ready> sin(1.0);
+Read top-level expression:
+define double @2() {
+entry:
+  ret double 0x3FEAED548F090CEE
+}
+
+Evaluated to 0.841471
+
+ready> def foo(x) sin(x)*sin(x) + cos(x)*cos(x);
+Read function definition:
+define double @foo(double %x) {
+entry:
+  %calltmp = call double @sin(double %x)
+  %multmp = fmul double %calltmp, %calltmp
+  %calltmp2 = call double @cos(double %x)
+  %multmp4 = fmul double %calltmp2, %calltmp2
+  %addtmp = fadd double %multmp, %multmp4
+  ret double %addtmp
+}
+
+ready> foo(4.0);
+Read top-level expression:
+define double @3() {
+entry:
+  %calltmp = call double @foo(double 4.000000e+00)
+  ret double %calltmp
+}
+
+Evaluated to 1.000000</pre>
+</div>
+<p>Whoa, how does the JIT know about sin and cos? The answer is
+surprisingly simple: in this example, the JIT started execution of a
+function and got to a function call. It realized that the function was
+not yet JIT compiled and invoked the standard set of routines to resolve
+the function. In this case, there is no body defined for the function,
+so the JIT ended up calling “<tt class="docutils literal"><span class="pre">dlsym("sin")</span></tt>” on the Kaleidoscope
+process itself. Since “<tt class="docutils literal"><span class="pre">sin</span></tt>” is defined within the JIT’s address
+space, it simply patches up calls in the module to call the libm version
+of <tt class="docutils literal"><span class="pre">sin</span></tt> directly.</p>
+<p>The LLVM JIT provides a number of interfaces (look in the
+<tt class="docutils literal"><span class="pre">ExecutionEngine.h</span></tt> file) for controlling how unknown functions get
+resolved. It allows you to establish explicit mappings between IR
+objects and addresses (useful for LLVM global variables that you want to
+map to static tables, for example), allows you to dynamically decide on
+the fly based on the function name, and even allows you to have the JIT
+compile functions lazily the first time they’re called.</p>
+<p>One interesting application of this is that we can now extend the
+language by writing arbitrary C++ code to implement operations. For
+example, if we add:</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="c1">/// putchard - putchar that takes a double and returns 0.</span>
+<span class="k">extern</span> <span class="s">"C"</span>
+<span class="kt">double</span> <span class="n">putchard</span><span class="p">(</span><span class="kt">double</span> <span class="n">X</span><span class="p">)</span> <span class="p">{</span>
+  <span class="n">putchar</span><span class="p">((</span><span class="kt">char</span><span class="p">)</span><span class="n">X</span><span class="p">);</span>
+  <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<p>Now we can produce simple output to the console by using things like:
+“<tt class="docutils literal"><span class="pre">extern</span> <span class="pre">putchard(x);</span> <span class="pre">putchard(120);</span></tt>”, which prints a lowercase ‘x’
+on the console (120 is the ASCII code for ‘x’). Similar code could be
+used to implement file I/O, console input, and many other capabilities
+in Kaleidoscope.</p>
+<p>This completes the JIT and optimizer chapter of the Kaleidoscope
+tutorial. At this point, we can compile a non-Turing-complete
+programming language, optimize and JIT compile it in a user-driven way.
+Next up we’ll look into <a class="reference external" href="LangImpl5.html">extending the language with control flow
+constructs</a>, tackling some interesting LLVM IR issues
+along the way.</p>
+</div>
+<div class="section" id="full-code-listing">
+<h2><a class="toc-backref" href="#id5">4.5. Full Code Listing</a><a class="headerlink" href="#full-code-listing" title="Permalink to this headline">¶</a></h2>
+<p>Here is the complete code listing for our running example, enhanced with
+the LLVM JIT and optimizer. To build this example, use:</p>
+<div class="highlight-bash"><div class="highlight"><pre><span class="c"># Compile</span>
+clang++ -g toy.cpp <span class="sb">`</span>llvm-config --cppflags --ldflags --libs core jit native<span class="sb">`</span> -O3 -o toy
+<span class="c"># Run</span>
+./toy
+</pre></div>
+</div>
+<p>If you are compiling this on Linux, make sure to add the “-rdynamic”
+option as well. This makes sure that the external functions are resolved
+properly at runtime.</p>
+<p>Here is the code:</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="cp">#include "llvm/Analysis/Passes.h"</span>
+<span class="cp">#include "llvm/Analysis/Verifier.h"</span>
+<span class="cp">#include "llvm/ExecutionEngine/ExecutionEngine.h"</span>
+<span class="cp">#include "llvm/ExecutionEngine/JIT.h"</span>
+<span class="cp">#include "llvm/IR/DataLayout.h"</span>
+<span class="cp">#include "llvm/IR/DerivedTypes.h"</span>
+<span class="cp">#include "llvm/IR/IRBuilder.h"</span>
+<span class="cp">#include "llvm/IR/LLVMContext.h"</span>
+<span class="cp">#include "llvm/IR/Module.h"</span>
+<span class="cp">#include "llvm/PassManager.h"</span>
+<span class="cp">#include "llvm/Support/TargetSelect.h"</span>
+<span class="cp">#include "llvm/Transforms/Scalar.h"</span>
+<span class="cp">#include <cctype></span>
+<span class="cp">#include <cstdio></span>
+<span class="cp">#include <map></span>
+<span class="cp">#include <string></span>
+<span class="cp">#include <vector></span>
+<span class="k">using</span> <span class="k">namespace</span> <span class="n">llvm</span><span class="p">;</span>
+
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+<span class="c1">// Lexer</span>
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+
+<span class="c1">// The lexer returns tokens [0-255] if it is an unknown character, otherwise one</span>
+<span class="c1">// of these for known things.</span>
+<span class="k">enum</span> <span class="n">Token</span> <span class="p">{</span>
+  <span class="n">tok_eof</span> <span class="o">=</span> <span class="o">-</span><span class="mi">1</span><span class="p">,</span>
+
+  <span class="c1">// commands</span>
+  <span class="n">tok_def</span> <span class="o">=</span> <span class="o">-</span><span class="mi">2</span><span class="p">,</span> <span class="n">tok_extern</span> <span class="o">=</span> <span class="o">-</span><span class="mi">3</span><span class="p">,</span>
+
+  <span class="c1">// primary</span>
+  <span class="n">tok_identifier</span> <span class="o">=</span> <span class="o">-</span><span class="mi">4</span><span class="p">,</span> <span class="n">tok_number</span> <span class="o">=</span> <span class="o">-</span><span class="mi">5</span>
+<span class="p">};</span>
+
+<span class="k">static</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">IdentifierStr</span><span class="p">;</span>  <span class="c1">// Filled in if tok_identifier</span>
+<span class="k">static</span> <span class="kt">double</span> <span class="n">NumVal</span><span class="p">;</span>              <span class="c1">// Filled in if tok_number</span>
+
+<span class="c1">/// gettok - Return the next token from standard input.</span>
+<span class="k">static</span> <span class="kt">int</span> <span class="nf">gettok</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">static</span> <span class="kt">int</span> <span class="n">LastChar</span> <span class="o">=</span> <span class="sc">' '</span><span class="p">;</span>
+
+  <span class="c1">// Skip any whitespace.</span>
+  <span class="k">while</span> <span class="p">(</span><span class="n">isspace</span><span class="p">(</span><span class="n">LastChar</span><span class="p">))</span>
+    <span class="n">LastChar</span> <span class="o">=</span> <span class="n">getchar</span><span class="p">();</span>
+
+  <span class="k">if</span> <span class="p">(</span><span class="n">isalpha</span><span class="p">(</span><span class="n">LastChar</span><span class="p">))</span> <span class="p">{</span> <span class="c1">// identifier: [a-zA-Z][a-zA-Z0-9]*</span>
+    <span class="n">IdentifierStr</span> <span class="o">=</span> <span class="n">LastChar</span><span class="p">;</span>
+    <span class="k">while</span> <span class="p">(</span><span class="n">isalnum</span><span class="p">((</span><span class="n">LastChar</span> <span class="o">=</span> <span class="n">getchar</span><span class="p">())))</span>
+      <span class="n">IdentifierStr</span> <span class="o">+=</span> <span class="n">LastChar</span><span class="p">;</span>
+
+    <span class="k">if</span> <span class="p">(</span><span class="n">IdentifierStr</span> <span class="o">==</span> <span class="s">"def"</span><span class="p">)</span> <span class="k">return</span> <span class="n">tok_def</span><span class="p">;</span>
+    <span class="k">if</span> <span class="p">(</span><span class="n">IdentifierStr</span> <span class="o">==</span> <span class="s">"extern"</span><span class="p">)</span> <span class="k">return</span> <span class="n">tok_extern</span><span class="p">;</span>
+    <span class="k">return</span> <span class="n">tok_identifier</span><span class="p">;</span>
+  <span class="p">}</span>
+
+  <span class="k">if</span> <span class="p">(</span><span class="n">isdigit</span><span class="p">(</span><span class="n">LastChar</span><span class="p">)</span> <span class="o">||</span> <span class="n">LastChar</span> <span class="o">==</span> <span class="sc">'.'</span><span class="p">)</span> <span class="p">{</span>   <span class="c1">// Number: [0-9.]+</span>
+    <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">NumStr</span><span class="p">;</span>
+    <span class="k">do</span> <span class="p">{</span>
+      <span class="n">NumStr</span> <span class="o">+=</span> <span class="n">LastChar</span><span class="p">;</span>
+      <span class="n">LastChar</span> <span class="o">=</span> <span class="n">getchar</span><span class="p">();</span>
+    <span class="p">}</span> <span class="k">while</span> <span class="p">(</span><span class="n">isdigit</span><span class="p">(</span><span class="n">LastChar</span><span class="p">)</span> <span class="o">||</span> <span class="n">LastChar</span> <span class="o">==</span> <span class="sc">'.'</span><span class="p">);</span>
+
+    <span class="n">NumVal</span> <span class="o">=</span> <span class="n">strtod</span><span class="p">(</span><span class="n">NumStr</span><span class="p">.</span><span class="n">c_str</span><span class="p">(),</span> <span class="mi">0</span><span class="p">);</span>
+    <span class="k">return</span> <span class="n">tok_number</span><span class="p">;</span>
+  <span class="p">}</span>
+
+  <span class="k">if</span> <span class="p">(</span><span class="n">LastChar</span> <span class="o">==</span> <span class="sc">'#'</span><span class="p">)</span> <span class="p">{</span>
+    <span class="c1">// Comment until end of line.</span>
+    <span class="k">do</span> <span class="n">LastChar</span> <span class="o">=</span> <span class="n">getchar</span><span class="p">();</span>
+    <span class="k">while</span> <span class="p">(</span><span class="n">LastChar</span> <span class="o">!=</span> <span class="n">EOF</span> <span class="o">&&</span> <span class="n">LastChar</span> <span class="o">!=</span> <span class="sc">'\n'</span> <span class="o">&&</span> <span class="n">LastChar</span> <span class="o">!=</span> <span class="sc">'\r'</span><span class="p">);</span>
+    
+    <span class="k">if</span> <span class="p">(</span><span class="n">LastChar</span> <span class="o">!=</span> <span class="n">EOF</span><span class="p">)</span>
+      <span class="k">return</span> <span class="n">gettok</span><span class="p">();</span>
+  <span class="p">}</span>
+  
+  <span class="c1">// Check for end of file.  Don't eat the EOF.</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">LastChar</span> <span class="o">==</span> <span class="n">EOF</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">tok_eof</span><span class="p">;</span>
+
+  <span class="c1">// Otherwise, just return the character as its ascii value.</span>
+  <span class="kt">int</span> <span class="n">ThisChar</span> <span class="o">=</span> <span class="n">LastChar</span><span class="p">;</span>
+  <span class="n">LastChar</span> <span class="o">=</span> <span class="n">getchar</span><span class="p">();</span>
+  <span class="k">return</span> <span class="n">ThisChar</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+<span class="c1">// Abstract Syntax Tree (aka Parse Tree)</span>
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+<span class="k">namespace</span> <span class="p">{</span>
+<span class="c1">/// ExprAST - Base class for all expression nodes.</span>
+<span class="k">class</span> <span class="nc">ExprAST</span> <span class="p">{</span>
+<span class="nl">public:</span>
+  <span class="k">virtual</span> <span class="o">~</span><span class="n">ExprAST</span><span class="p">()</span> <span class="p">{}</span>
+  <span class="k">virtual</span> <span class="n">Value</span> <span class="o">*</span><span class="n">Codegen</span><span class="p">()</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<span class="p">};</span>
+
+<span class="c1">/// NumberExprAST - Expression class for numeric literals like "1.0".</span>
+<span class="k">class</span> <span class="nc">NumberExprAST</span> <span class="o">:</span> <span class="k">public</span> <span class="n">ExprAST</span> <span class="p">{</span>
+  <span class="kt">double</span> <span class="n">Val</span><span class="p">;</span>
+<span class="nl">public:</span>
+  <span class="n">NumberExprAST</span><span class="p">(</span><span class="kt">double</span> <span class="n">val</span><span class="p">)</span> <span class="o">:</span> <span class="n">Val</span><span class="p">(</span><span class="n">val</span><span class="p">)</span> <span class="p">{}</span>
+  <span class="k">virtual</span> <span class="n">Value</span> <span class="o">*</span><span class="n">Codegen</span><span class="p">();</span>
+<span class="p">};</span>
+
+<span class="c1">/// VariableExprAST - Expression class for referencing a variable, like "a".</span>
+<span class="k">class</span> <span class="nc">VariableExprAST</span> <span class="o">:</span> <span class="k">public</span> <span class="n">ExprAST</span> <span class="p">{</span>
+  <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">Name</span><span class="p">;</span>
+<span class="nl">public:</span>
+  <span class="n">VariableExprAST</span><span class="p">(</span><span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="o">&</span><span class="n">name</span><span class="p">)</span> <span class="o">:</span> <span class="n">Name</span><span class="p">(</span><span class="n">name</span><span class="p">)</span> <span class="p">{}</span>
+  <span class="k">virtual</span> <span class="n">Value</span> <span class="o">*</span><span class="n">Codegen</span><span class="p">();</span>
+<span class="p">};</span>
+
+<span class="c1">/// BinaryExprAST - Expression class for a binary operator.</span>
+<span class="k">class</span> <span class="nc">BinaryExprAST</span> <span class="o">:</span> <span class="k">public</span> <span class="n">ExprAST</span> <span class="p">{</span>
+  <span class="kt">char</span> <span class="n">Op</span><span class="p">;</span>
+  <span class="n">ExprAST</span> <span class="o">*</span><span class="n">LHS</span><span class="p">,</span> <span class="o">*</span><span class="n">RHS</span><span class="p">;</span>
+<span class="nl">public:</span>
+  <span class="n">BinaryExprAST</span><span class="p">(</span><span class="kt">char</span> <span class="n">op</span><span class="p">,</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="n">lhs</span><span class="p">,</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="n">rhs</span><span class="p">)</span> 
+    <span class="o">:</span> <span class="n">Op</span><span class="p">(</span><span class="n">op</span><span class="p">),</span> <span class="n">LHS</span><span class="p">(</span><span class="n">lhs</span><span class="p">),</span> <span class="n">RHS</span><span class="p">(</span><span class="n">rhs</span><span class="p">)</span> <span class="p">{}</span>
+  <span class="k">virtual</span> <span class="n">Value</span> <span class="o">*</span><span class="n">Codegen</span><span class="p">();</span>
+<span class="p">};</span>
+
+<span class="c1">/// CallExprAST - Expression class for function calls.</span>
+<span class="k">class</span> <span class="nc">CallExprAST</span> <span class="o">:</span> <span class="k">public</span> <span class="n">ExprAST</span> <span class="p">{</span>
+  <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">Callee</span><span class="p">;</span>
+  <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">ExprAST</span><span class="o">*></span> <span class="n">Args</span><span class="p">;</span>
+<span class="nl">public:</span>
+  <span class="n">CallExprAST</span><span class="p">(</span><span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="o">&</span><span class="n">callee</span><span class="p">,</span> <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">ExprAST</span><span class="o">*></span> <span class="o">&</span><span class="n">args</span><span class="p">)</span>
+    <span class="o">:</span> <span class="n">Callee</span><span class="p">(</span><span class="n">callee</span><span class="p">),</span> <span class="n">Args</span><span class="p">(</span><span class="n">args</span><span class="p">)</span> <span class="p">{}</span>
+  <span class="k">virtual</span> <span class="n">Value</span> <span class="o">*</span><span class="n">Codegen</span><span class="p">();</span>
+<span class="p">};</span>
+
+<span class="c1">/// PrototypeAST - This class represents the "prototype" for a function,</span>
+<span class="c1">/// which captures its name, and its argument names (thus implicitly the number</span>
+<span class="c1">/// of arguments the function takes).</span>
+<span class="k">class</span> <span class="nc">PrototypeAST</span> <span class="p">{</span>
+  <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">Name</span><span class="p">;</span>
+  <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">></span> <span class="n">Args</span><span class="p">;</span>
+<span class="nl">public:</span>
+  <span class="n">PrototypeAST</span><span class="p">(</span><span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="o">&</span><span class="n">name</span><span class="p">,</span> <span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">></span> <span class="o">&</span><span class="n">args</span><span class="p">)</span>
+    <span class="o">:</span> <span class="n">Name</span><span class="p">(</span><span class="n">name</span><span class="p">),</span> <span class="n">Args</span><span class="p">(</span><span class="n">args</span><span class="p">)</span> <span class="p">{}</span>
+  
+  <span class="n">Function</span> <span class="o">*</span><span class="n">Codegen</span><span class="p">();</span>
+<span class="p">};</span>
+
+<span class="c1">/// FunctionAST - This class represents a function definition itself.</span>
+<span class="k">class</span> <span class="nc">FunctionAST</span> <span class="p">{</span>
+  <span class="n">PrototypeAST</span> <span class="o">*</span><span class="n">Proto</span><span class="p">;</span>
+  <span class="n">ExprAST</span> <span class="o">*</span><span class="n">Body</span><span class="p">;</span>
+<span class="nl">public:</span>
+  <span class="n">FunctionAST</span><span class="p">(</span><span class="n">PrototypeAST</span> <span class="o">*</span><span class="n">proto</span><span class="p">,</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="n">body</span><span class="p">)</span>
+    <span class="o">:</span> <span class="n">Proto</span><span class="p">(</span><span class="n">proto</span><span class="p">),</span> <span class="n">Body</span><span class="p">(</span><span class="n">body</span><span class="p">)</span> <span class="p">{}</span>
+  
+  <span class="n">Function</span> <span class="o">*</span><span class="n">Codegen</span><span class="p">();</span>
+<span class="p">};</span>
+<span class="p">}</span> <span class="c1">// end anonymous namespace</span>
+
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+<span class="c1">// Parser</span>
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+
+<span class="c1">/// CurTok/getNextToken - Provide a simple token buffer.  CurTok is the current</span>
+<span class="c1">/// token the parser is looking at.  getNextToken reads another token from the</span>
+<span class="c1">/// lexer and updates CurTok with its results.</span>
+<span class="k">static</span> <span class="kt">int</span> <span class="n">CurTok</span><span class="p">;</span>
+<span class="k">static</span> <span class="kt">int</span> <span class="nf">getNextToken</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">return</span> <span class="n">CurTok</span> <span class="o">=</span> <span class="n">gettok</span><span class="p">();</span>
+<span class="p">}</span>
+
+<span class="c1">/// BinopPrecedence - This holds the precedence for each binary operator that is</span>
+<span class="c1">/// defined.</span>
+<span class="k">static</span> <span class="n">std</span><span class="o">::</span><span class="n">map</span><span class="o"><</span><span class="kt">char</span><span class="p">,</span> <span class="kt">int</span><span class="o">></span> <span class="n">BinopPrecedence</span><span class="p">;</span>
+
+<span class="c1">/// GetTokPrecedence - Get the precedence of the pending binary operator token.</span>
+<span class="k">static</span> <span class="kt">int</span> <span class="nf">GetTokPrecedence</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">isascii</span><span class="p">(</span><span class="n">CurTok</span><span class="p">))</span>
+    <span class="k">return</span> <span class="o">-</span><span class="mi">1</span><span class="p">;</span>
+  
+  <span class="c1">// Make sure it's a declared binop.</span>
+  <span class="kt">int</span> <span class="n">TokPrec</span> <span class="o">=</span> <span class="n">BinopPrecedence</span><span class="p">[</span><span class="n">CurTok</span><span class="p">];</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">TokPrec</span> <span class="o"><=</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="o">-</span><span class="mi">1</span><span class="p">;</span>
+  <span class="k">return</span> <span class="n">TokPrec</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="c1">/// Error* - These are little helper functions for error handling.</span>
+<span class="n">ExprAST</span> <span class="o">*</span><span class="nf">Error</span><span class="p">(</span><span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">Str</span><span class="p">)</span> <span class="p">{</span> <span class="n">fprintf</span><span class="p">(</span><span class="n">stderr</span><span class="p">,</span> <span class="s">"Error: %s</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="n">Str</span><span class="p">);</span><span class="k">return</span> <span class="mi">0</span><span class="p">;}</span>
+<span class="n">PrototypeAST</span> <span class="o">*</span><span class="nf">ErrorP</span><span class="p">(</span><span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">Str</span><span class="p">)</span> <span class="p">{</span> <span class="n">Error</span><span class="p">(</span><span class="n">Str</span><span class="p">);</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span> <span class="p">}</span>
+<span class="n">FunctionAST</span> <span class="o">*</span><span class="nf">ErrorF</span><span class="p">(</span><span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">Str</span><span class="p">)</span> <span class="p">{</span> <span class="n">Error</span><span class="p">(</span><span class="n">Str</span><span class="p">);</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span> <span class="p">}</span>
+
+<span class="k">static</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="nf">ParseExpression</span><span class="p">();</span>
+
+<span class="c1">/// identifierexpr</span>
+<span class="c1">///   ::= identifier</span>
+<span class="c1">///   ::= identifier '(' expression* ')'</span>
+<span class="k">static</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="nf">ParseIdentifierExpr</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">IdName</span> <span class="o">=</span> <span class="n">IdentifierStr</span><span class="p">;</span>
+  
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat identifier.</span>
+  
+  <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="sc">'('</span><span class="p">)</span> <span class="c1">// Simple variable ref.</span>
+    <span class="k">return</span> <span class="k">new</span> <span class="n">VariableExprAST</span><span class="p">(</span><span class="n">IdName</span><span class="p">);</span>
+  
+  <span class="c1">// Call.</span>
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat (</span>
+  <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">ExprAST</span><span class="o">*></span> <span class="n">Args</span><span class="p">;</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="sc">')'</span><span class="p">)</span> <span class="p">{</span>
+    <span class="k">while</span> <span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="p">{</span>
+      <span class="n">ExprAST</span> <span class="o">*</span><span class="n">Arg</span> <span class="o">=</span> <span class="n">ParseExpression</span><span class="p">();</span>
+      <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">Arg</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+      <span class="n">Args</span><span class="p">.</span><span class="n">push_back</span><span class="p">(</span><span class="n">Arg</span><span class="p">);</span>
+
+      <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">==</span> <span class="sc">')'</span><span class="p">)</span> <span class="k">break</span><span class="p">;</span>
+
+      <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="sc">','</span><span class="p">)</span>
+        <span class="k">return</span> <span class="n">Error</span><span class="p">(</span><span class="s">"Expected ')' or ',' in argument list"</span><span class="p">);</span>
+      <span class="n">getNextToken</span><span class="p">();</span>
+    <span class="p">}</span>
+  <span class="p">}</span>
+
+  <span class="c1">// Eat the ')'.</span>
+  <span class="n">getNextToken</span><span class="p">();</span>
+  
+  <span class="k">return</span> <span class="k">new</span> <span class="n">CallExprAST</span><span class="p">(</span><span class="n">IdName</span><span class="p">,</span> <span class="n">Args</span><span class="p">);</span>
+<span class="p">}</span>
+
+<span class="c1">/// numberexpr ::= number</span>
+<span class="k">static</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="nf">ParseNumberExpr</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">ExprAST</span> <span class="o">*</span><span class="n">Result</span> <span class="o">=</span> <span class="k">new</span> <span class="n">NumberExprAST</span><span class="p">(</span><span class="n">NumVal</span><span class="p">);</span>
+  <span class="n">getNextToken</span><span class="p">();</span> <span class="c1">// consume the number</span>
+  <span class="k">return</span> <span class="n">Result</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="c1">/// parenexpr ::= '(' expression ')'</span>
+<span class="k">static</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="nf">ParseParenExpr</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat (.</span>
+  <span class="n">ExprAST</span> <span class="o">*</span><span class="n">V</span> <span class="o">=</span> <span class="n">ParseExpression</span><span class="p">();</span>
+  <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">V</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+  
+  <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="sc">')'</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">Error</span><span class="p">(</span><span class="s">"expected ')'"</span><span class="p">);</span>
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat ).</span>
+  <span class="k">return</span> <span class="n">V</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="c1">/// primary</span>
+<span class="c1">///   ::= identifierexpr</span>
+<span class="c1">///   ::= numberexpr</span>
+<span class="c1">///   ::= parenexpr</span>
+<span class="k">static</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="nf">ParsePrimary</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">switch</span> <span class="p">(</span><span class="n">CurTok</span><span class="p">)</span> <span class="p">{</span>
+  <span class="nl">default:</span> <span class="k">return</span> <span class="n">Error</span><span class="p">(</span><span class="s">"unknown token when expecting an expression"</span><span class="p">);</span>
+  <span class="k">case</span> <span class="n">tok_identifier</span>: <span class="k">return</span> <span class="n">ParseIdentifierExpr</span><span class="p">();</span>
+  <span class="k">case</span> <span class="n">tok_number</span>:     <span class="k">return</span> <span class="n">ParseNumberExpr</span><span class="p">();</span>
+  <span class="k">case</span> <span class="sc">'('</span>:            <span class="k">return</span> <span class="n">ParseParenExpr</span><span class="p">();</span>
+  <span class="p">}</span>
+<span class="p">}</span>
+
+<span class="c1">/// binoprhs</span>
+<span class="c1">///   ::= ('+' primary)*</span>
+<span class="k">static</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="nf">ParseBinOpRHS</span><span class="p">(</span><span class="kt">int</span> <span class="n">ExprPrec</span><span class="p">,</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="n">LHS</span><span class="p">)</span> <span class="p">{</span>
+  <span class="c1">// If this is a binop, find its precedence.</span>
+  <span class="k">while</span> <span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="p">{</span>
+    <span class="kt">int</span> <span class="n">TokPrec</span> <span class="o">=</span> <span class="n">GetTokPrecedence</span><span class="p">();</span>
+    
+    <span class="c1">// If this is a binop that binds at least as tightly as the current binop,</span>
+    <span class="c1">// consume it, otherwise we are done.</span>
+    <span class="k">if</span> <span class="p">(</span><span class="n">TokPrec</span> <span class="o"><</span> <span class="n">ExprPrec</span><span class="p">)</span>
+      <span class="k">return</span> <span class="n">LHS</span><span class="p">;</span>
+    
+    <span class="c1">// Okay, we know this is a binop.</span>
+    <span class="kt">int</span> <span class="n">BinOp</span> <span class="o">=</span> <span class="n">CurTok</span><span class="p">;</span>
+    <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat binop</span>
+    
+    <span class="c1">// Parse the primary expression after the binary operator.</span>
+    <span class="n">ExprAST</span> <span class="o">*</span><span class="n">RHS</span> <span class="o">=</span> <span class="n">ParsePrimary</span><span class="p">();</span>
+    <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">RHS</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+    
+    <span class="c1">// If BinOp binds less tightly with RHS than the operator after RHS, let</span>
+    <span class="c1">// the pending operator take RHS as its LHS.</span>
+    <span class="kt">int</span> <span class="n">NextPrec</span> <span class="o">=</span> <span class="n">GetTokPrecedence</span><span class="p">();</span>
+    <span class="k">if</span> <span class="p">(</span><span class="n">TokPrec</span> <span class="o"><</span> <span class="n">NextPrec</span><span class="p">)</span> <span class="p">{</span>
+      <span class="n">RHS</span> <span class="o">=</span> <span class="n">ParseBinOpRHS</span><span class="p">(</span><span class="n">TokPrec</span><span class="o">+</span><span class="mi">1</span><span class="p">,</span> <span class="n">RHS</span><span class="p">);</span>
+      <span class="k">if</span> <span class="p">(</span><span class="n">RHS</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+    <span class="p">}</span>
+    
+    <span class="c1">// Merge LHS/RHS.</span>
+    <span class="n">LHS</span> <span class="o">=</span> <span class="k">new</span> <span class="n">BinaryExprAST</span><span class="p">(</span><span class="n">BinOp</span><span class="p">,</span> <span class="n">LHS</span><span class="p">,</span> <span class="n">RHS</span><span class="p">);</span>
+  <span class="p">}</span>
+<span class="p">}</span>
+
+<span class="c1">/// expression</span>
+<span class="c1">///   ::= primary binoprhs</span>
+<span class="c1">///</span>
+<span class="k">static</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="nf">ParseExpression</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">ExprAST</span> <span class="o">*</span><span class="n">LHS</span> <span class="o">=</span> <span class="n">ParsePrimary</span><span class="p">();</span>
+  <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">LHS</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+  
+  <span class="k">return</span> <span class="n">ParseBinOpRHS</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">LHS</span><span class="p">);</span>
+<span class="p">}</span>
+
+<span class="c1">/// prototype</span>
+<span class="c1">///   ::= id '(' id* ')'</span>
+<span class="k">static</span> <span class="n">PrototypeAST</span> <span class="o">*</span><span class="nf">ParsePrototype</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="n">tok_identifier</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">ErrorP</span><span class="p">(</span><span class="s">"Expected function name in prototype"</span><span class="p">);</span>
+
+  <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">FnName</span> <span class="o">=</span> <span class="n">IdentifierStr</span><span class="p">;</span>
+  <span class="n">getNextToken</span><span class="p">();</span>
+  
+  <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="sc">'('</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">ErrorP</span><span class="p">(</span><span class="s">"Expected '(' in prototype"</span><span class="p">);</span>
+  
+  <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">></span> <span class="n">ArgNames</span><span class="p">;</span>
+  <span class="k">while</span> <span class="p">(</span><span class="n">getNextToken</span><span class="p">()</span> <span class="o">==</span> <span class="n">tok_identifier</span><span class="p">)</span>
+    <span class="n">ArgNames</span><span class="p">.</span><span class="n">push_back</span><span class="p">(</span><span class="n">IdentifierStr</span><span class="p">);</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="sc">')'</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">ErrorP</span><span class="p">(</span><span class="s">"Expected ')' in prototype"</span><span class="p">);</span>
+  
+  <span class="c1">// success.</span>
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat ')'.</span>
+  
+  <span class="k">return</span> <span class="k">new</span> <span class="n">PrototypeAST</span><span class="p">(</span><span class="n">FnName</span><span class="p">,</span> <span class="n">ArgNames</span><span class="p">);</span>
+<span class="p">}</span>
+
+<span class="c1">/// definition ::= 'def' prototype expression</span>
+<span class="k">static</span> <span class="n">FunctionAST</span> <span class="o">*</span><span class="nf">ParseDefinition</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat def.</span>
+  <span class="n">PrototypeAST</span> <span class="o">*</span><span class="n">Proto</span> <span class="o">=</span> <span class="n">ParsePrototype</span><span class="p">();</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">Proto</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+
+  <span class="k">if</span> <span class="p">(</span><span class="n">ExprAST</span> <span class="o">*</span><span class="n">E</span> <span class="o">=</span> <span class="n">ParseExpression</span><span class="p">())</span>
+    <span class="k">return</span> <span class="k">new</span> <span class="n">FunctionAST</span><span class="p">(</span><span class="n">Proto</span><span class="p">,</span> <span class="n">E</span><span class="p">);</span>
+  <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="c1">/// toplevelexpr ::= expression</span>
+<span class="k">static</span> <span class="n">FunctionAST</span> <span class="o">*</span><span class="nf">ParseTopLevelExpr</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">ExprAST</span> <span class="o">*</span><span class="n">E</span> <span class="o">=</span> <span class="n">ParseExpression</span><span class="p">())</span> <span class="p">{</span>
+    <span class="c1">// Make an anonymous proto.</span>
+    <span class="n">PrototypeAST</span> <span class="o">*</span><span class="n">Proto</span> <span class="o">=</span> <span class="k">new</span> <span class="n">PrototypeAST</span><span class="p">(</span><span class="s">""</span><span class="p">,</span> <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">></span><span class="p">());</span>
+    <span class="k">return</span> <span class="k">new</span> <span class="n">FunctionAST</span><span class="p">(</span><span class="n">Proto</span><span class="p">,</span> <span class="n">E</span><span class="p">);</span>
+  <span class="p">}</span>
+  <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="c1">/// external ::= 'extern' prototype</span>
+<span class="k">static</span> <span class="n">PrototypeAST</span> <span class="o">*</span><span class="nf">ParseExtern</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat extern.</span>
+  <span class="k">return</span> <span class="n">ParsePrototype</span><span class="p">();</span>
+<span class="p">}</span>
+
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+<span class="c1">// Code Generation</span>
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+
+<span class="k">static</span> <span class="n">Module</span> <span class="o">*</span><span class="n">TheModule</span><span class="p">;</span>
+<span class="k">static</span> <span class="n">IRBuilder</span><span class="o"><></span> <span class="n">Builder</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">());</span>
+<span class="k">static</span> <span class="n">std</span><span class="o">::</span><span class="n">map</span><span class="o"><</span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="p">,</span> <span class="n">Value</span><span class="o">*></span> <span class="n">NamedValues</span><span class="p">;</span>
+<span class="k">static</span> <span class="n">FunctionPassManager</span> <span class="o">*</span><span class="n">TheFPM</span><span class="p">;</span>
+
+<span class="n">Value</span> <span class="o">*</span><span class="nf">ErrorV</span><span class="p">(</span><span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">Str</span><span class="p">)</span> <span class="p">{</span> <span class="n">Error</span><span class="p">(</span><span class="n">Str</span><span class="p">);</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span> <span class="p">}</span>
+
+<span class="n">Value</span> <span class="o">*</span><span class="n">NumberExprAST</span><span class="o">::</span><span class="n">Codegen</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">return</span> <span class="n">ConstantFP</span><span class="o">::</span><span class="n">get</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">(),</span> <span class="n">APFloat</span><span class="p">(</span><span class="n">Val</span><span class="p">));</span>
+<span class="p">}</span>
+
+<span class="n">Value</span> <span class="o">*</span><span class="n">VariableExprAST</span><span class="o">::</span><span class="n">Codegen</span><span class="p">()</span> <span class="p">{</span>
+  <span class="c1">// Look this variable up in the function.</span>
+  <span class="n">Value</span> <span class="o">*</span><span class="n">V</span> <span class="o">=</span> <span class="n">NamedValues</span><span class="p">[</span><span class="n">Name</span><span class="p">];</span>
+  <span class="k">return</span> <span class="n">V</span> <span class="o">?</span> <span class="n">V</span> <span class="o">:</span> <span class="n">ErrorV</span><span class="p">(</span><span class="s">"Unknown variable name"</span><span class="p">);</span>
+<span class="p">}</span>
+
+<span class="n">Value</span> <span class="o">*</span><span class="n">BinaryExprAST</span><span class="o">::</span><span class="n">Codegen</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">Value</span> <span class="o">*</span><span class="n">L</span> <span class="o">=</span> <span class="n">LHS</span><span class="o">-></span><span class="n">Codegen</span><span class="p">();</span>
+  <span class="n">Value</span> <span class="o">*</span><span class="n">R</span> <span class="o">=</span> <span class="n">RHS</span><span class="o">-></span><span class="n">Codegen</span><span class="p">();</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">L</span> <span class="o">==</span> <span class="mi">0</span> <span class="o">||</span> <span class="n">R</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+  
+  <span class="k">switch</span> <span class="p">(</span><span class="n">Op</span><span class="p">)</span> <span class="p">{</span>
+  <span class="k">case</span> <span class="sc">'+'</span>: <span class="k">return</span> <span class="n">Builder</span><span class="p">.</span><span class="n">CreateFAdd</span><span class="p">(</span><span class="n">L</span><span class="p">,</span> <span class="n">R</span><span class="p">,</span> <span class="s">"addtmp"</span><span class="p">);</span>
+  <span class="k">case</span> <span class="sc">'-'</span>: <span class="k">return</span> <span class="n">Builder</span><span class="p">.</span><span class="n">CreateFSub</span><span class="p">(</span><span class="n">L</span><span class="p">,</span> <span class="n">R</span><span class="p">,</span> <span class="s">"subtmp"</span><span class="p">);</span>
+  <span class="k">case</span> <span class="sc">'*'</span>: <span class="k">return</span> <span class="n">Builder</span><span class="p">.</span><span class="n">CreateFMul</span><span class="p">(</span><span class="n">L</span><span class="p">,</span> <span class="n">R</span><span class="p">,</span> <span class="s">"multmp"</span><span class="p">);</span>
+  <span class="k">case</span> <span class="sc">'<'</span>:
+    <span class="n">L</span> <span class="o">=</span> <span class="n">Builder</span><span class="p">.</span><span class="n">CreateFCmpULT</span><span class="p">(</span><span class="n">L</span><span class="p">,</span> <span class="n">R</span><span class="p">,</span> <span class="s">"cmptmp"</span><span class="p">);</span>
+    <span class="c1">// Convert bool 0/1 to double 0.0 or 1.0</span>
+    <span class="k">return</span> <span class="n">Builder</span><span class="p">.</span><span class="n">CreateUIToFP</span><span class="p">(</span><span class="n">L</span><span class="p">,</span> <span class="n">Type</span><span class="o">::</span><span class="n">getDoubleTy</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">()),</span>
+                                <span class="s">"booltmp"</span><span class="p">);</span>
+  <span class="nl">default:</span> <span class="k">return</span> <span class="nf">ErrorV</span><span class="p">(</span><span class="s">"invalid binary operator"</span><span class="p">);</span>
+  <span class="p">}</span>
+<span class="p">}</span>
+
+<span class="n">Value</span> <span class="o">*</span><span class="n">CallExprAST</span><span class="o">::</span><span class="n">Codegen</span><span class="p">()</span> <span class="p">{</span>
+  <span class="c1">// Look up the name in the global module table.</span>
+  <span class="n">Function</span> <span class="o">*</span><span class="n">CalleeF</span> <span class="o">=</span> <span class="n">TheModule</span><span class="o">-></span><span class="n">getFunction</span><span class="p">(</span><span class="n">Callee</span><span class="p">);</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">CalleeF</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">ErrorV</span><span class="p">(</span><span class="s">"Unknown function referenced"</span><span class="p">);</span>
+  
+  <span class="c1">// If argument mismatch error.</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">CalleeF</span><span class="o">-></span><span class="n">arg_size</span><span class="p">()</span> <span class="o">!=</span> <span class="n">Args</span><span class="p">.</span><span class="n">size</span><span class="p">())</span>
+    <span class="k">return</span> <span class="n">ErrorV</span><span class="p">(</span><span class="s">"Incorrect # arguments passed"</span><span class="p">);</span>
+
+  <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">Value</span><span class="o">*></span> <span class="n">ArgsV</span><span class="p">;</span>
+  <span class="k">for</span> <span class="p">(</span><span class="kt">unsigned</span> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> <span class="n">e</span> <span class="o">=</span> <span class="n">Args</span><span class="p">.</span><span class="n">size</span><span class="p">();</span> <span class="n">i</span> <span class="o">!=</span> <span class="n">e</span><span class="p">;</span> <span class="o">++</span><span class="n">i</span><span class="p">)</span> <span class="p">{</span>
+    <span class="n">ArgsV</span><span class="p">.</span><span class="n">push_back</span><span class="p">(</span><span class="n">Args</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">-></span><span class="n">Codegen</span><span class="p">());</span>
+    <span class="k">if</span> <span class="p">(</span><span class="n">ArgsV</span><span class="p">.</span><span class="n">back</span><span class="p">()</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+  <span class="p">}</span>
+  
+  <span class="k">return</span> <span class="n">Builder</span><span class="p">.</span><span class="n">CreateCall</span><span class="p">(</span><span class="n">CalleeF</span><span class="p">,</span> <span class="n">ArgsV</span><span class="p">,</span> <span class="s">"calltmp"</span><span class="p">);</span>
+<span class="p">}</span>
+
+<span class="n">Function</span> <span class="o">*</span><span class="n">PrototypeAST</span><span class="o">::</span><span class="n">Codegen</span><span class="p">()</span> <span class="p">{</span>
+  <span class="c1">// Make the function type:  double(double,double) etc.</span>
+  <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">Type</span><span class="o">*></span> <span class="n">Doubles</span><span class="p">(</span><span class="n">Args</span><span class="p">.</span><span class="n">size</span><span class="p">(),</span>
+                             <span class="n">Type</span><span class="o">::</span><span class="n">getDoubleTy</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">()));</span>
+  <span class="n">FunctionType</span> <span class="o">*</span><span class="n">FT</span> <span class="o">=</span> <span class="n">FunctionType</span><span class="o">::</span><span class="n">get</span><span class="p">(</span><span class="n">Type</span><span class="o">::</span><span class="n">getDoubleTy</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">()),</span>
+                                       <span class="n">Doubles</span><span class="p">,</span> <span class="nb">false</span><span class="p">);</span>
+  
+  <span class="n">Function</span> <span class="o">*</span><span class="n">F</span> <span class="o">=</span> <span class="n">Function</span><span class="o">::</span><span class="n">Create</span><span class="p">(</span><span class="n">FT</span><span class="p">,</span> <span class="n">Function</span><span class="o">::</span><span class="n">ExternalLinkage</span><span class="p">,</span> <span class="n">Name</span><span class="p">,</span> <span class="n">TheModule</span><span class="p">);</span>
+  
+  <span class="c1">// If F conflicted, there was already something named 'Name'.  If it has a</span>
+  <span class="c1">// body, don't allow redefinition or reextern.</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">F</span><span class="o">-></span><span class="n">getName</span><span class="p">()</span> <span class="o">!=</span> <span class="n">Name</span><span class="p">)</span> <span class="p">{</span>
+    <span class="c1">// Delete the one we just made and get the existing one.</span>
+    <span class="n">F</span><span class="o">-></span><span class="n">eraseFromParent</span><span class="p">();</span>
+    <span class="n">F</span> <span class="o">=</span> <span class="n">TheModule</span><span class="o">-></span><span class="n">getFunction</span><span class="p">(</span><span class="n">Name</span><span class="p">);</span>
+    
+    <span class="c1">// If F already has a body, reject this.</span>
+    <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">F</span><span class="o">-></span><span class="n">empty</span><span class="p">())</span> <span class="p">{</span>
+      <span class="n">ErrorF</span><span class="p">(</span><span class="s">"redefinition of function"</span><span class="p">);</span>
+      <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+    <span class="p">}</span>
+    
+    <span class="c1">// If F took a different number of args, reject.</span>
+    <span class="k">if</span> <span class="p">(</span><span class="n">F</span><span class="o">-></span><span class="n">arg_size</span><span class="p">()</span> <span class="o">!=</span> <span class="n">Args</span><span class="p">.</span><span class="n">size</span><span class="p">())</span> <span class="p">{</span>
+      <span class="n">ErrorF</span><span class="p">(</span><span class="s">"redefinition of function with different # args"</span><span class="p">);</span>
+      <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+    <span class="p">}</span>
+  <span class="p">}</span>
+  
+  <span class="c1">// Set names for all arguments.</span>
+  <span class="kt">unsigned</span> <span class="n">Idx</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+  <span class="k">for</span> <span class="p">(</span><span class="n">Function</span><span class="o">::</span><span class="n">arg_iterator</span> <span class="n">AI</span> <span class="o">=</span> <span class="n">F</span><span class="o">-></span><span class="n">arg_begin</span><span class="p">();</span> <span class="n">Idx</span> <span class="o">!=</span> <span class="n">Args</span><span class="p">.</span><span class="n">size</span><span class="p">();</span>
+       <span class="o">++</span><span class="n">AI</span><span class="p">,</span> <span class="o">++</span><span class="n">Idx</span><span class="p">)</span> <span class="p">{</span>
+    <span class="n">AI</span><span class="o">-></span><span class="n">setName</span><span class="p">(</span><span class="n">Args</span><span class="p">[</span><span class="n">Idx</span><span class="p">]);</span>
+    
+    <span class="c1">// Add arguments to variable symbol table.</span>
+    <span class="n">NamedValues</span><span class="p">[</span><span class="n">Args</span><span class="p">[</span><span class="n">Idx</span><span class="p">]]</span> <span class="o">=</span> <span class="n">AI</span><span class="p">;</span>
+  <span class="p">}</span>
+  
+  <span class="k">return</span> <span class="n">F</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="n">Function</span> <span class="o">*</span><span class="n">FunctionAST</span><span class="o">::</span><span class="n">Codegen</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">NamedValues</span><span class="p">.</span><span class="n">clear</span><span class="p">();</span>
+  
+  <span class="n">Function</span> <span class="o">*</span><span class="n">TheFunction</span> <span class="o">=</span> <span class="n">Proto</span><span class="o">-></span><span class="n">Codegen</span><span class="p">();</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">TheFunction</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span>
+    <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+  
+  <span class="c1">// Create a new basic block to start insertion into.</span>
+  <span class="n">BasicBlock</span> <span class="o">*</span><span class="n">BB</span> <span class="o">=</span> <span class="n">BasicBlock</span><span class="o">::</span><span class="n">Create</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">(),</span> <span class="s">"entry"</span><span class="p">,</span> <span class="n">TheFunction</span><span class="p">);</span>
+  <span class="n">Builder</span><span class="p">.</span><span class="n">SetInsertPoint</span><span class="p">(</span><span class="n">BB</span><span class="p">);</span>
+  
+  <span class="k">if</span> <span class="p">(</span><span class="n">Value</span> <span class="o">*</span><span class="n">RetVal</span> <span class="o">=</span> <span class="n">Body</span><span class="o">-></span><span class="n">Codegen</span><span class="p">())</span> <span class="p">{</span>
+    <span class="c1">// Finish off the function.</span>
+    <span class="n">Builder</span><span class="p">.</span><span class="n">CreateRet</span><span class="p">(</span><span class="n">RetVal</span><span class="p">);</span>
+
+    <span class="c1">// Validate the generated code, checking for consistency.</span>
+    <span class="n">verifyFunction</span><span class="p">(</span><span class="o">*</span><span class="n">TheFunction</span><span class="p">);</span>
+
+    <span class="c1">// Optimize the function.</span>
+    <span class="n">TheFPM</span><span class="o">-></span><span class="n">run</span><span class="p">(</span><span class="o">*</span><span class="n">TheFunction</span><span class="p">);</span>
+    
+    <span class="k">return</span> <span class="n">TheFunction</span><span class="p">;</span>
+  <span class="p">}</span>
+  
+  <span class="c1">// Error reading body, remove function.</span>
+  <span class="n">TheFunction</span><span class="o">-></span><span class="n">eraseFromParent</span><span class="p">();</span>
+  <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+<span class="c1">// Top-Level parsing and JIT Driver</span>
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+
+<span class="k">static</span> <span class="n">ExecutionEngine</span> <span class="o">*</span><span class="n">TheExecutionEngine</span><span class="p">;</span>
+
+<span class="k">static</span> <span class="kt">void</span> <span class="nf">HandleDefinition</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">FunctionAST</span> <span class="o">*</span><span class="n">F</span> <span class="o">=</span> <span class="n">ParseDefinition</span><span class="p">())</span> <span class="p">{</span>
+    <span class="k">if</span> <span class="p">(</span><span class="n">Function</span> <span class="o">*</span><span class="n">LF</span> <span class="o">=</span> <span class="n">F</span><span class="o">-></span><span class="n">Codegen</span><span class="p">())</span> <span class="p">{</span>
+      <span class="n">fprintf</span><span class="p">(</span><span class="n">stderr</span><span class="p">,</span> <span class="s">"Read function definition:"</span><span class="p">);</span>
+      <span class="n">LF</span><span class="o">-></span><span class="n">dump</span><span class="p">();</span>
+    <span class="p">}</span>
+  <span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
+    <span class="c1">// Skip token for error recovery.</span>
+    <span class="n">getNextToken</span><span class="p">();</span>
+  <span class="p">}</span>
+<span class="p">}</span>
+
+<span class="k">static</span> <span class="kt">void</span> <span class="nf">HandleExtern</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">PrototypeAST</span> <span class="o">*</span><span class="n">P</span> <span class="o">=</span> <span class="n">ParseExtern</span><span class="p">())</span> <span class="p">{</span>
+    <span class="k">if</span> <span class="p">(</span><span class="n">Function</span> <span class="o">*</span><span class="n">F</span> <span class="o">=</span> <span class="n">P</span><span class="o">-></span><span class="n">Codegen</span><span class="p">())</span> <span class="p">{</span>
+      <span class="n">fprintf</span><span class="p">(</span><span class="n">stderr</span><span class="p">,</span> <span class="s">"Read extern: "</span><span class="p">);</span>
+      <span class="n">F</span><span class="o">-></span><span class="n">dump</span><span class="p">();</span>
+    <span class="p">}</span>
+  <span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
+    <span class="c1">// Skip token for error recovery.</span>
+    <span class="n">getNextToken</span><span class="p">();</span>
+  <span class="p">}</span>
+<span class="p">}</span>
+
+<span class="k">static</span> <span class="kt">void</span> <span class="nf">HandleTopLevelExpression</span><span class="p">()</span> <span class="p">{</span>
+  <span class="c1">// Evaluate a top-level expression into an anonymous function.</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">FunctionAST</span> <span class="o">*</span><span class="n">F</span> <span class="o">=</span> <span class="n">ParseTopLevelExpr</span><span class="p">())</span> <span class="p">{</span>
+    <span class="k">if</span> <span class="p">(</span><span class="n">Function</span> <span class="o">*</span><span class="n">LF</span> <span class="o">=</span> <span class="n">F</span><span class="o">-></span><span class="n">Codegen</span><span class="p">())</span> <span class="p">{</span>
+      <span class="c1">// JIT the function, returning a function pointer.</span>
+      <span class="kt">void</span> <span class="o">*</span><span class="n">FPtr</span> <span class="o">=</span> <span class="n">TheExecutionEngine</span><span class="o">-></span><span class="n">getPointerToFunction</span><span class="p">(</span><span class="n">LF</span><span class="p">);</span>
+      
+      <span class="c1">// Cast it to the right type (takes no arguments, returns a double) so we</span>
+      <span class="c1">// can call it as a native function.</span>
+      <span class="kt">double</span> <span class="p">(</span><span class="o">*</span><span class="n">FP</span><span class="p">)()</span> <span class="o">=</span> <span class="p">(</span><span class="kt">double</span> <span class="p">(</span><span class="o">*</span><span class="p">)())(</span><span class="kt">intptr_t</span><span class="p">)</span><span class="n">FPtr</span><span class="p">;</span>
+      <span class="n">fprintf</span><span class="p">(</span><span class="n">stderr</span><span class="p">,</span> <span class="s">"Evaluated to %f</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="n">FP</span><span class="p">());</span>
+    <span class="p">}</span>
+  <span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
+    <span class="c1">// Skip token for error recovery.</span>
+    <span class="n">getNextToken</span><span class="p">();</span>
+  <span class="p">}</span>
+<span class="p">}</span>
+
+<span class="c1">/// top ::= definition | external | expression | ';'</span>
+<span class="k">static</span> <span class="kt">void</span> <span class="nf">MainLoop</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">while</span> <span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="p">{</span>
+    <span class="n">fprintf</span><span class="p">(</span><span class="n">stderr</span><span class="p">,</span> <span class="s">"ready> "</span><span class="p">);</span>
+    <span class="k">switch</span> <span class="p">(</span><span class="n">CurTok</span><span class="p">)</span> <span class="p">{</span>
+    <span class="k">case</span> <span class="n">tok_eof</span>:    <span class="k">return</span><span class="p">;</span>
+    <span class="k">case</span> <span class="sc">';'</span>:        <span class="n">getNextToken</span><span class="p">();</span> <span class="k">break</span><span class="p">;</span>  <span class="c1">// ignore top-level semicolons.</span>
+    <span class="k">case</span> <span class="n">tok_def</span>:    <span class="n">HandleDefinition</span><span class="p">();</span> <span class="k">break</span><span class="p">;</span>
+    <span class="k">case</span> <span class="n">tok_extern</span>: <span class="n">HandleExtern</span><span class="p">();</span> <span class="k">break</span><span class="p">;</span>
+    <span class="nl">default:</span>         <span class="n">HandleTopLevelExpression</span><span class="p">();</span> <span class="k">break</span><span class="p">;</span>
+    <span class="p">}</span>
+  <span class="p">}</span>
+<span class="p">}</span>
+
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+<span class="c1">// "Library" functions that can be "extern'd" from user code.</span>
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+
+<span class="c1">/// putchard - putchar that takes a double and returns 0.</span>
+<span class="k">extern</span> <span class="s">"C"</span> 
+<span class="kt">double</span> <span class="n">putchard</span><span class="p">(</span><span class="kt">double</span> <span class="n">X</span><span class="p">)</span> <span class="p">{</span>
+  <span class="n">putchar</span><span class="p">((</span><span class="kt">char</span><span class="p">)</span><span class="n">X</span><span class="p">);</span>
+  <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+<span class="c1">// Main driver code.</span>
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+
+<span class="kt">int</span> <span class="n">main</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">InitializeNativeTarget</span><span class="p">();</span>
+  <span class="n">LLVMContext</span> <span class="o">&</span><span class="n">Context</span> <span class="o">=</span> <span class="n">getGlobalContext</span><span class="p">();</span>
+
+  <span class="c1">// Install standard binary operators.</span>
+  <span class="c1">// 1 is lowest precedence.</span>
+  <span class="n">BinopPrecedence</span><span class="p">[</span><span class="sc">'<'</span><span class="p">]</span> <span class="o">=</span> <span class="mi">10</span><span class="p">;</span>
+  <span class="n">BinopPrecedence</span><span class="p">[</span><span class="sc">'+'</span><span class="p">]</span> <span class="o">=</span> <span class="mi">20</span><span class="p">;</span>
+  <span class="n">BinopPrecedence</span><span class="p">[</span><span class="sc">'-'</span><span class="p">]</span> <span class="o">=</span> <span class="mi">20</span><span class="p">;</span>
+  <span class="n">BinopPrecedence</span><span class="p">[</span><span class="sc">'*'</span><span class="p">]</span> <span class="o">=</span> <span class="mi">40</span><span class="p">;</span>  <span class="c1">// highest.</span>
+
+  <span class="c1">// Prime the first token.</span>
+  <span class="n">fprintf</span><span class="p">(</span><span class="n">stderr</span><span class="p">,</span> <span class="s">"ready> "</span><span class="p">);</span>
+  <span class="n">getNextToken</span><span class="p">();</span>
+
+  <span class="c1">// Make the module, which holds all the code.</span>
+  <span class="n">TheModule</span> <span class="o">=</span> <span class="k">new</span> <span class="n">Module</span><span class="p">(</span><span class="s">"my cool jit"</span><span class="p">,</span> <span class="n">Context</span><span class="p">);</span>
+
+  <span class="c1">// Create the JIT.  This takes ownership of the module.</span>
+  <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">ErrStr</span><span class="p">;</span>
+  <span class="n">TheExecutionEngine</span> <span class="o">=</span> <span class="n">EngineBuilder</span><span class="p">(</span><span class="n">TheModule</span><span class="p">).</span><span class="n">setErrorStr</span><span class="p">(</span><span class="o">&</span><span class="n">ErrStr</span><span class="p">).</span><span class="n">create</span><span class="p">();</span>
+  <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">TheExecutionEngine</span><span class="p">)</span> <span class="p">{</span>
+    <span class="n">fprintf</span><span class="p">(</span><span class="n">stderr</span><span class="p">,</span> <span class="s">"Could not create ExecutionEngine: %s</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="n">ErrStr</span><span class="p">.</span><span class="n">c_str</span><span class="p">());</span>
+    <span class="n">exit</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span>
+  <span class="p">}</span>
+
+  <span class="n">FunctionPassManager</span> <span class="n">OurFPM</span><span class="p">(</span><span class="n">TheModule</span><span class="p">);</span>
+
+  <span class="c1">// Set up the optimizer pipeline.  Start with registering info about how the</span>
+  <span class="c1">// target lays out data structures.</span>
+  <span class="n">OurFPM</span><span class="p">.</span><span class="n">add</span><span class="p">(</span><span class="k">new</span> <span class="n">DataLayout</span><span class="p">(</span><span class="o">*</span><span class="n">TheExecutionEngine</span><span class="o">-></span><span class="n">getDataLayout</span><span class="p">()));</span>
+  <span class="c1">// Provide basic AliasAnalysis support for GVN.</span>
+  <span class="n">OurFPM</span><span class="p">.</span><span class="n">add</span><span class="p">(</span><span class="n">createBasicAliasAnalysisPass</span><span class="p">());</span>
+  <span class="c1">// Do simple "peephole" optimizations and bit-twiddling optzns.</span>
+  <span class="n">OurFPM</span><span class="p">.</span><span class="n">add</span><span class="p">(</span><span class="n">createInstructionCombiningPass</span><span class="p">());</span>
+  <span class="c1">// Reassociate expressions.</span>
+  <span class="n">OurFPM</span><span class="p">.</span><span class="n">add</span><span class="p">(</span><span class="n">createReassociatePass</span><span class="p">());</span>
+  <span class="c1">// Eliminate Common SubExpressions.</span>
+  <span class="n">OurFPM</span><span class="p">.</span><span class="n">add</span><span class="p">(</span><span class="n">createGVNPass</span><span class="p">());</span>
+  <span class="c1">// Simplify the control flow graph (deleting unreachable blocks, etc).</span>
+  <span class="n">OurFPM</span><span class="p">.</span><span class="n">add</span><span class="p">(</span><span class="n">createCFGSimplificationPass</span><span class="p">());</span>
+
+  <span class="n">OurFPM</span><span class="p">.</span><span class="n">doInitialization</span><span class="p">();</span>
+
+  <span class="c1">// Set the global so the code gen can use this.</span>
+  <span class="n">TheFPM</span> <span class="o">=</span> <span class="o">&</span><span class="n">OurFPM</span><span class="p">;</span>
+
+  <span class="c1">// Run the main "interpreter loop" now.</span>
+  <span class="n">MainLoop</span><span class="p">();</span>
+
+  <span class="n">TheFPM</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+
+  <span class="c1">// Print out all of the generated code.</span>
+  <span class="n">TheModule</span><span class="o">-></span><span class="n">dump</span><span class="p">();</span>
+
+  <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<p><a class="reference external" href="LangImpl5.html">Next: Extending the language: control flow</a></p>
+</div>
+</div>
+
+
+          </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="LangImpl5.html" title="5. Kaleidoscope: Extending the Language: Control Flow"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="LangImpl3.html" title="3. Kaleidoscope: Code generation to LLVM IR"
+             >previous</a> |</li>
+  <li><a href="http://llvm.org/">LLVM Home</a> | </li>
+  <li><a href="../index.html">Documentation</a>»</li>
+
+          <li><a href="index.html" >LLVM Tutorial: Table of Contents</a> »</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        © Copyright 2003-2013, LLVM Project.
+      Last updated on 2014-05-06.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
+    </div>
+  </body>
+</html>
\ No newline at end of file

Added: www-releases/trunk/3.4.1/docs/tutorial/LangImpl5.html
URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/3.4.1/docs/tutorial/LangImpl5.html?rev=208244&view=auto
==============================================================================
--- www-releases/trunk/3.4.1/docs/tutorial/LangImpl5.html (added)
+++ www-releases/trunk/3.4.1/docs/tutorial/LangImpl5.html Wed May  7 15:09:32 2014
@@ -0,0 +1,1637 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>5. Kaleidoscope: Extending the Language: Control Flow — LLVM 3.4 documentation</title>
+    
+    <link rel="stylesheet" href="../_static/llvm-theme.css" type="text/css" />
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '3.4',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../_static/jquery.js"></script>
+    <script type="text/javascript" src="../_static/underscore.js"></script>
+    <script type="text/javascript" src="../_static/doctools.js"></script>
+    <link rel="top" title="LLVM 3.4 documentation" href="../index.html" />
+    <link rel="up" title="LLVM Tutorial: Table of Contents" href="index.html" />
+    <link rel="next" title="6. Kaleidoscope: Extending the Language: User-defined Operators" href="LangImpl6.html" />
+    <link rel="prev" title="4. Kaleidoscope: Adding JIT and Optimizer Support" href="LangImpl4.html" />
+<style type="text/css">
+  table.right { float: right; margin-left: 20px; }
+  table.right td { border: 1px solid #ccc; }
+</style>
+
+  </head>
+  <body>
+<div class="logo">
+  <a href="../index.html">
+    <img src="../_static/logo.png"
+         alt="LLVM Logo" width="250" height="88"/></a>
+</div>
+
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="LangImpl6.html" title="6. Kaleidoscope: Extending the Language: User-defined Operators"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="LangImpl4.html" title="4. Kaleidoscope: Adding JIT and Optimizer Support"
+             accesskey="P">previous</a> |</li>
+  <li><a href="http://llvm.org/">LLVM Home</a> | </li>
+  <li><a href="../index.html">Documentation</a>»</li>
+
+          <li><a href="index.html" accesskey="U">LLVM Tutorial: Table of Contents</a> »</li> 
+      </ul>
+    </div>
+
+
+    <div class="document">
+      <div class="documentwrapper">
+          <div class="body">
+            
+  <div class="section" id="kaleidoscope-extending-the-language-control-flow">
+<h1>5. Kaleidoscope: Extending the Language: Control Flow<a class="headerlink" href="#kaleidoscope-extending-the-language-control-flow" title="Permalink to this headline">¶</a></h1>
+<div class="contents local topic" id="contents">
+<ul class="simple">
+<li><a class="reference internal" href="#chapter-5-introduction" id="id1">Chapter 5 Introduction</a></li>
+<li><a class="reference internal" href="#if-then-else" id="id2">If/Then/Else</a><ul>
+<li><a class="reference internal" href="#lexer-extensions-for-if-then-else" id="id3">Lexer Extensions for If/Then/Else</a></li>
+<li><a class="reference internal" href="#ast-extensions-for-if-then-else" id="id4">AST Extensions for If/Then/Else</a></li>
+<li><a class="reference internal" href="#parser-extensions-for-if-then-else" id="id5">Parser Extensions for If/Then/Else</a></li>
+<li><a class="reference internal" href="#llvm-ir-for-if-then-else" id="id6">LLVM IR for If/Then/Else</a></li>
+<li><a class="reference internal" href="#code-generation-for-if-then-else" id="id7">Code Generation for If/Then/Else</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#for-loop-expression" id="id8">‘for’ Loop Expression</a><ul>
+<li><a class="reference internal" href="#lexer-extensions-for-the-for-loop" id="id9">Lexer Extensions for the ‘for’ Loop</a></li>
+<li><a class="reference internal" href="#ast-extensions-for-the-for-loop" id="id10">AST Extensions for the ‘for’ Loop</a></li>
+<li><a class="reference internal" href="#parser-extensions-for-the-for-loop" id="id11">Parser Extensions for the ‘for’ Loop</a></li>
+<li><a class="reference internal" href="#llvm-ir-for-the-for-loop" id="id12">LLVM IR for the ‘for’ Loop</a></li>
+<li><a class="reference internal" href="#code-generation-for-the-for-loop" id="id13">Code Generation for the ‘for’ Loop</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#full-code-listing" id="id14">Full Code Listing</a></li>
+</ul>
+</div>
+<div class="section" id="chapter-5-introduction">
+<h2><a class="toc-backref" href="#id1">5.1. Chapter 5 Introduction</a><a class="headerlink" href="#chapter-5-introduction" title="Permalink to this headline">¶</a></h2>
+<p>Welcome to Chapter 5 of the “<a class="reference external" href="index.html">Implementing a language with
+LLVM</a>” tutorial. Parts 1-4 described the implementation of
+the simple Kaleidoscope language and included support for generating
+LLVM IR, followed by optimizations and a JIT compiler. Unfortunately, as
+presented, Kaleidoscope is mostly useless: it has no control flow other
+than call and return. This means that you can’t have conditional
+branches in the code, significantly limiting its power. In this episode
+of “build that compiler”, we’ll extend Kaleidoscope to have an
+if/then/else expression plus a simple ‘for’ loop.</p>
+</div>
+<div class="section" id="if-then-else">
+<h2><a class="toc-backref" href="#id2">5.2. If/Then/Else</a><a class="headerlink" href="#if-then-else" title="Permalink to this headline">¶</a></h2>
+<p>Extending Kaleidoscope to support if/then/else is quite straightforward.
+It basically requires adding support for this “new” concept to the
+lexer, parser, AST, and LLVM code emitter. This example is nice, because
+it shows how easy it is to “grow” a language over time, incrementally
+extending it as new ideas are discovered.</p>
+<p>Before we get going on “how” we add this extension, lets talk about
+“what” we want. The basic idea is that we want to be able to write this
+sort of thing:</p>
+<div class="highlight-python"><pre>def fib(x)
+  if x < 3 then
+    1
+  else
+    fib(x-1)+fib(x-2);</pre>
+</div>
+<p>In Kaleidoscope, every construct is an expression: there are no
+statements. As such, the if/then/else expression needs to return a value
+like any other. Since we’re using a mostly functional form, we’ll have
+it evaluate its conditional, then return the ‘then’ or ‘else’ value
+based on how the condition was resolved. This is very similar to the C
+”?:” expression.</p>
+<p>The semantics of the if/then/else expression is that it evaluates the
+condition to a boolean equality value: 0.0 is considered to be false and
+everything else is considered to be true. If the condition is true, the
+first subexpression is evaluated and returned, if the condition is
+false, the second subexpression is evaluated and returned. Since
+Kaleidoscope allows side-effects, this behavior is important to nail
+down.</p>
+<p>Now that we know what we “want”, lets break this down into its
+constituent pieces.</p>
+<div class="section" id="lexer-extensions-for-if-then-else">
+<h3><a class="toc-backref" href="#id3">5.2.1. Lexer Extensions for If/Then/Else</a><a class="headerlink" href="#lexer-extensions-for-if-then-else" title="Permalink to this headline">¶</a></h3>
+<p>The lexer extensions are straightforward. First we add new enum values
+for the relevant tokens:</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="c1">// control</span>
+<span class="n">tok_if</span> <span class="o">=</span> <span class="o">-</span><span class="mi">6</span><span class="p">,</span> <span class="n">tok_then</span> <span class="o">=</span> <span class="o">-</span><span class="mi">7</span><span class="p">,</span> <span class="n">tok_else</span> <span class="o">=</span> <span class="o">-</span><span class="mi">8</span><span class="p">,</span>
+</pre></div>
+</div>
+<p>Once we have that, we recognize the new keywords in the lexer. This is
+pretty simple stuff:</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="p">...</span>
+<span class="k">if</span> <span class="p">(</span><span class="n">IdentifierStr</span> <span class="o">==</span> <span class="s">"def"</span><span class="p">)</span> <span class="k">return</span> <span class="n">tok_def</span><span class="p">;</span>
+<span class="k">if</span> <span class="p">(</span><span class="n">IdentifierStr</span> <span class="o">==</span> <span class="s">"extern"</span><span class="p">)</span> <span class="k">return</span> <span class="n">tok_extern</span><span class="p">;</span>
+<span class="k">if</span> <span class="p">(</span><span class="n">IdentifierStr</span> <span class="o">==</span> <span class="s">"if"</span><span class="p">)</span> <span class="k">return</span> <span class="n">tok_if</span><span class="p">;</span>
+<span class="k">if</span> <span class="p">(</span><span class="n">IdentifierStr</span> <span class="o">==</span> <span class="s">"then"</span><span class="p">)</span> <span class="k">return</span> <span class="n">tok_then</span><span class="p">;</span>
+<span class="k">if</span> <span class="p">(</span><span class="n">IdentifierStr</span> <span class="o">==</span> <span class="s">"else"</span><span class="p">)</span> <span class="k">return</span> <span class="n">tok_else</span><span class="p">;</span>
+<span class="k">return</span> <span class="n">tok_identifier</span><span class="p">;</span>
+</pre></div>
+</div>
+</div>
+<div class="section" id="ast-extensions-for-if-then-else">
+<h3><a class="toc-backref" href="#id4">5.2.2. AST Extensions for If/Then/Else</a><a class="headerlink" href="#ast-extensions-for-if-then-else" title="Permalink to this headline">¶</a></h3>
+<p>To represent the new expression we add a new AST node for it:</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="c1">/// IfExprAST - Expression class for if/then/else.</span>
+<span class="k">class</span> <span class="nc">IfExprAST</span> <span class="o">:</span> <span class="k">public</span> <span class="n">ExprAST</span> <span class="p">{</span>
+  <span class="n">ExprAST</span> <span class="o">*</span><span class="n">Cond</span><span class="p">,</span> <span class="o">*</span><span class="n">Then</span><span class="p">,</span> <span class="o">*</span><span class="n">Else</span><span class="p">;</span>
+<span class="nl">public:</span>
+  <span class="n">IfExprAST</span><span class="p">(</span><span class="n">ExprAST</span> <span class="o">*</span><span class="n">cond</span><span class="p">,</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="n">then</span><span class="p">,</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="n">_else</span><span class="p">)</span>
+    <span class="o">:</span> <span class="n">Cond</span><span class="p">(</span><span class="n">cond</span><span class="p">),</span> <span class="n">Then</span><span class="p">(</span><span class="n">then</span><span class="p">),</span> <span class="n">Else</span><span class="p">(</span><span class="n">_else</span><span class="p">)</span> <span class="p">{}</span>
+  <span class="k">virtual</span> <span class="n">Value</span> <span class="o">*</span><span class="n">Codegen</span><span class="p">();</span>
+<span class="p">};</span>
+</pre></div>
+</div>
+<p>The AST node just has pointers to the various subexpressions.</p>
+</div>
+<div class="section" id="parser-extensions-for-if-then-else">
+<h3><a class="toc-backref" href="#id5">5.2.3. Parser Extensions for If/Then/Else</a><a class="headerlink" href="#parser-extensions-for-if-then-else" title="Permalink to this headline">¶</a></h3>
+<p>Now that we have the relevant tokens coming from the lexer and we have
+the AST node to build, our parsing logic is relatively straightforward.
+First we define a new parsing function:</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="c1">/// ifexpr ::= 'if' expression 'then' expression 'else' expression</span>
+<span class="k">static</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="nf">ParseIfExpr</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat the if.</span>
+
+  <span class="c1">// condition.</span>
+  <span class="n">ExprAST</span> <span class="o">*</span><span class="n">Cond</span> <span class="o">=</span> <span class="n">ParseExpression</span><span class="p">();</span>
+  <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">Cond</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+
+  <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="n">tok_then</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">Error</span><span class="p">(</span><span class="s">"expected then"</span><span class="p">);</span>
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat the then</span>
+
+  <span class="n">ExprAST</span> <span class="o">*</span><span class="n">Then</span> <span class="o">=</span> <span class="n">ParseExpression</span><span class="p">();</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">Then</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+
+  <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="n">tok_else</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">Error</span><span class="p">(</span><span class="s">"expected else"</span><span class="p">);</span>
+
+  <span class="n">getNextToken</span><span class="p">();</span>
+
+  <span class="n">ExprAST</span> <span class="o">*</span><span class="n">Else</span> <span class="o">=</span> <span class="n">ParseExpression</span><span class="p">();</span>
+  <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">Else</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+
+  <span class="k">return</span> <span class="k">new</span> <span class="n">IfExprAST</span><span class="p">(</span><span class="n">Cond</span><span class="p">,</span> <span class="n">Then</span><span class="p">,</span> <span class="n">Else</span><span class="p">);</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<p>Next we hook it up as a primary expression:</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="k">static</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="nf">ParsePrimary</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">switch</span> <span class="p">(</span><span class="n">CurTok</span><span class="p">)</span> <span class="p">{</span>
+  <span class="nl">default:</span> <span class="k">return</span> <span class="n">Error</span><span class="p">(</span><span class="s">"unknown token when expecting an expression"</span><span class="p">);</span>
+  <span class="k">case</span> <span class="n">tok_identifier</span>: <span class="k">return</span> <span class="n">ParseIdentifierExpr</span><span class="p">();</span>
+  <span class="k">case</span> <span class="n">tok_number</span>:     <span class="k">return</span> <span class="n">ParseNumberExpr</span><span class="p">();</span>
+  <span class="k">case</span> <span class="sc">'('</span>:            <span class="k">return</span> <span class="n">ParseParenExpr</span><span class="p">();</span>
+  <span class="k">case</span> <span class="n">tok_if</span>:         <span class="k">return</span> <span class="n">ParseIfExpr</span><span class="p">();</span>
+  <span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+</div>
+<div class="section" id="llvm-ir-for-if-then-else">
+<h3><a class="toc-backref" href="#id6">5.2.4. LLVM IR for If/Then/Else</a><a class="headerlink" href="#llvm-ir-for-if-then-else" title="Permalink to this headline">¶</a></h3>
+<p>Now that we have it parsing and building the AST, the final piece is
+adding LLVM code generation support. This is the most interesting part
+of the if/then/else example, because this is where it starts to
+introduce new concepts. All of the code above has been thoroughly
+described in previous chapters.</p>
+<p>To motivate the code we want to produce, lets take a look at a simple
+example. Consider:</p>
+<div class="highlight-python"><pre>extern foo();
+extern bar();
+def baz(x) if x then foo() else bar();</pre>
+</div>
+<p>If you disable optimizations, the code you’ll (soon) get from
+Kaleidoscope looks like this:</p>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="k">declare</span> <span class="kt">double</span> <span class="vg">@foo</span><span class="p">()</span>
+
+<span class="k">declare</span> <span class="kt">double</span> <span class="vg">@bar</span><span class="p">()</span>
+
+<span class="k">define</span> <span class="kt">double</span> <span class="vg">@baz</span><span class="p">(</span><span class="kt">double</span> <span class="nv">%x</span><span class="p">)</span> <span class="p">{</span>
+<span class="nl">entry:</span>
+  <span class="nv">%ifcond</span> <span class="p">=</span> <span class="k">fcmp</span> <span class="k">one</span> <span class="kt">double</span> <span class="nv">%x</span><span class="p">,</span> <span class="m">0.000000e+00</span>
+  <span class="k">br</span> <span class="k">i1</span> <span class="nv">%ifcond</span><span class="p">,</span> <span class="kt">label</span> <span class="nv">%then</span><span class="p">,</span> <span class="kt">label</span> <span class="nv">%else</span>
+
+<span class="nl">then:</span>       <span class="c">; preds = %entry</span>
+  <span class="nv">%calltmp</span> <span class="p">=</span> <span class="k">call</span> <span class="kt">double</span> <span class="vg">@foo</span><span class="p">()</span>
+  <span class="k">br</span> <span class="kt">label</span> <span class="nv">%ifcont</span>
+
+<span class="nl">else:</span>       <span class="c">; preds = %entry</span>
+  <span class="nv">%calltmp1</span> <span class="p">=</span> <span class="k">call</span> <span class="kt">double</span> <span class="vg">@bar</span><span class="p">()</span>
+  <span class="k">br</span> <span class="kt">label</span> <span class="nv">%ifcont</span>
+
+<span class="nl">ifcont:</span>     <span class="c">; preds = %else, %then</span>
+  <span class="nv">%iftmp</span> <span class="p">=</span> <span class="k">phi</span> <span class="kt">double</span> <span class="p">[</span> <span class="nv">%calltmp</span><span class="p">,</span> <span class="nv">%then</span> <span class="p">],</span> <span class="p">[</span> <span class="nv">%calltmp1</span><span class="p">,</span> <span class="nv">%else</span> <span class="p">]</span>
+  <span class="k">ret</span> <span class="kt">double</span> <span class="nv">%iftmp</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<p>To visualize the control flow graph, you can use a nifty feature of the
+LLVM ‘<a class="reference external" href="http://llvm.org/cmds/opt.html">opt</a>‘ tool. If you put this LLVM
+IR into “t.ll” and run “<tt class="docutils literal"><span class="pre">llvm-as</span> <span class="pre"><</span> <span class="pre">t.ll</span> <span class="pre">|</span> <span class="pre">opt</span> <span class="pre">-analyze</span> <span class="pre">-view-cfg</span></tt>”, <a class="reference external" href="../ProgrammersManual.html#ViewGraph">a
+window will pop up</a> and you’ll
+see this graph:</p>
+<div class="figure align-center">
+<img alt="Example CFG" src="../_images/LangImpl5-cfg.png" />
+<p class="caption">Example CFG</p>
+</div>
+<p>Another way to get this is to call “<tt class="docutils literal"><span class="pre">F->viewCFG()</span></tt>” or
+“<tt class="docutils literal"><span class="pre">F->viewCFGOnly()</span></tt>” (where F is a “<tt class="docutils literal"><span class="pre">Function*</span></tt>”) either by
+inserting actual calls into the code and recompiling or by calling these
+in the debugger. LLVM has many nice features for visualizing various
+graphs.</p>
+<p>Getting back to the generated code, it is fairly simple: the entry block
+evaluates the conditional expression (“x” in our case here) and compares
+the result to 0.0 with the “<tt class="docutils literal"><span class="pre">fcmp</span> <span class="pre">one</span></tt>” instruction (‘one’ is “Ordered
+and Not Equal”). Based on the result of this expression, the code jumps
+to either the “then” or “else” blocks, which contain the expressions for
+the true/false cases.</p>
+<p>Once the then/else blocks are finished executing, they both branch back
+to the ‘ifcont’ block to execute the code that happens after the
+if/then/else. In this case the only thing left to do is to return to the
+caller of the function. The question then becomes: how does the code
+know which expression to return?</p>
+<p>The answer to this question involves an important SSA operation: the
+<a class="reference external" href="http://en.wikipedia.org/wiki/Static_single_assignment_form">Phi
+operation</a>.
+If you’re not familiar with SSA, <a class="reference external" href="http://en.wikipedia.org/wiki/Static_single_assignment_form">the wikipedia
+article</a>
+is a good introduction and there are various other introductions to it
+available on your favorite search engine. The short version is that
+“execution” of the Phi operation requires “remembering” which block
+control came from. The Phi operation takes on the value corresponding to
+the input control block. In this case, if control comes in from the
+“then” block, it gets the value of “calltmp”. If control comes from the
+“else” block, it gets the value of “calltmp1”.</p>
+<p>At this point, you are probably starting to think “Oh no! This means my
+simple and elegant front-end will have to start generating SSA form in
+order to use LLVM!”. Fortunately, this is not the case, and we strongly
+advise <em>not</em> implementing an SSA construction algorithm in your
+front-end unless there is an amazingly good reason to do so. In
+practice, there are two sorts of values that float around in code
+written for your average imperative programming language that might need
+Phi nodes:</p>
+<ol class="arabic simple">
+<li>Code that involves user variables: <tt class="docutils literal"><span class="pre">x</span> <span class="pre">=</span> <span class="pre">1;</span> <span class="pre">x</span> <span class="pre">=</span> <span class="pre">x</span> <span class="pre">+</span> <span class="pre">1;</span></tt></li>
+<li>Values that are implicit in the structure of your AST, such as the
+Phi node in this case.</li>
+</ol>
+<p>In <a class="reference external" href="LangImpl7.html">Chapter 7</a> of this tutorial (“mutable variables”),
+we’ll talk about #1 in depth. For now, just believe me that you don’t
+need SSA construction to handle this case. For #2, you have the choice
+of using the techniques that we will describe for #1, or you can insert
+Phi nodes directly, if convenient. In this case, it is really really
+easy to generate the Phi node, so we choose to do it directly.</p>
+<p>Okay, enough of the motivation and overview, lets generate code!</p>
+</div>
+<div class="section" id="code-generation-for-if-then-else">
+<h3><a class="toc-backref" href="#id7">5.2.5. Code Generation for If/Then/Else</a><a class="headerlink" href="#code-generation-for-if-then-else" title="Permalink to this headline">¶</a></h3>
+<p>In order to generate code for this, we implement the <tt class="docutils literal"><span class="pre">Codegen</span></tt> method
+for <tt class="docutils literal"><span class="pre">IfExprAST</span></tt>:</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="n">Value</span> <span class="o">*</span><span class="n">IfExprAST</span><span class="o">::</span><span class="n">Codegen</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">Value</span> <span class="o">*</span><span class="n">CondV</span> <span class="o">=</span> <span class="n">Cond</span><span class="o">-></span><span class="n">Codegen</span><span class="p">();</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">CondV</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+
+  <span class="c1">// Convert condition to a bool by comparing equal to 0.0.</span>
+  <span class="n">CondV</span> <span class="o">=</span> <span class="n">Builder</span><span class="p">.</span><span class="n">CreateFCmpONE</span><span class="p">(</span><span class="n">CondV</span><span class="p">,</span>
+                              <span class="n">ConstantFP</span><span class="o">::</span><span class="n">get</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">(),</span> <span class="n">APFloat</span><span class="p">(</span><span class="mf">0.0</span><span class="p">)),</span>
+                                <span class="s">"ifcond"</span><span class="p">);</span>
+</pre></div>
+</div>
+<p>This code is straightforward and similar to what we saw before. We emit
+the expression for the condition, then compare that value to zero to get
+a truth value as a 1-bit (bool) value.</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="n">Function</span> <span class="o">*</span><span class="n">TheFunction</span> <span class="o">=</span> <span class="n">Builder</span><span class="p">.</span><span class="n">GetInsertBlock</span><span class="p">()</span><span class="o">-></span><span class="n">getParent</span><span class="p">();</span>
+
+<span class="c1">// Create blocks for the then and else cases.  Insert the 'then' block at the</span>
+<span class="c1">// end of the function.</span>
+<span class="n">BasicBlock</span> <span class="o">*</span><span class="n">ThenBB</span> <span class="o">=</span> <span class="n">BasicBlock</span><span class="o">::</span><span class="n">Create</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">(),</span> <span class="s">"then"</span><span class="p">,</span> <span class="n">TheFunction</span><span class="p">);</span>
+<span class="n">BasicBlock</span> <span class="o">*</span><span class="n">ElseBB</span> <span class="o">=</span> <span class="n">BasicBlock</span><span class="o">::</span><span class="n">Create</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">(),</span> <span class="s">"else"</span><span class="p">);</span>
+<span class="n">BasicBlock</span> <span class="o">*</span><span class="n">MergeBB</span> <span class="o">=</span> <span class="n">BasicBlock</span><span class="o">::</span><span class="n">Create</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">(),</span> <span class="s">"ifcont"</span><span class="p">);</span>
+
+<span class="n">Builder</span><span class="p">.</span><span class="n">CreateCondBr</span><span class="p">(</span><span class="n">CondV</span><span class="p">,</span> <span class="n">ThenBB</span><span class="p">,</span> <span class="n">ElseBB</span><span class="p">);</span>
+</pre></div>
+</div>
+<p>This code creates the basic blocks that are related to the if/then/else
+statement, and correspond directly to the blocks in the example above.
+The first line gets the current Function object that is being built. It
+gets this by asking the builder for the current BasicBlock, and asking
+that block for its “parent” (the function it is currently embedded
+into).</p>
+<p>Once it has that, it creates three blocks. Note that it passes
+“TheFunction” into the constructor for the “then” block. This causes the
+constructor to automatically insert the new block into the end of the
+specified function. The other two blocks are created, but aren’t yet
+inserted into the function.</p>
+<p>Once the blocks are created, we can emit the conditional branch that
+chooses between them. Note that creating new blocks does not implicitly
+affect the IRBuilder, so it is still inserting into the block that the
+condition went into. Also note that it is creating a branch to the
+“then” block and the “else” block, even though the “else” block isn’t
+inserted into the function yet. This is all ok: it is the standard way
+that LLVM supports forward references.</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="c1">// Emit then value.</span>
+<span class="n">Builder</span><span class="p">.</span><span class="n">SetInsertPoint</span><span class="p">(</span><span class="n">ThenBB</span><span class="p">);</span>
+
+<span class="n">Value</span> <span class="o">*</span><span class="n">ThenV</span> <span class="o">=</span> <span class="n">Then</span><span class="o">-></span><span class="n">Codegen</span><span class="p">();</span>
+<span class="k">if</span> <span class="p">(</span><span class="n">ThenV</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+
+<span class="n">Builder</span><span class="p">.</span><span class="n">CreateBr</span><span class="p">(</span><span class="n">MergeBB</span><span class="p">);</span>
+<span class="c1">// Codegen of 'Then' can change the current block, update ThenBB for the PHI.</span>
+<span class="n">ThenBB</span> <span class="o">=</span> <span class="n">Builder</span><span class="p">.</span><span class="n">GetInsertBlock</span><span class="p">();</span>
+</pre></div>
+</div>
+<p>After the conditional branch is inserted, we move the builder to start
+inserting into the “then” block. Strictly speaking, this call moves the
+insertion point to be at the end of the specified block. However, since
+the “then” block is empty, it also starts out by inserting at the
+beginning of the block. :)</p>
+<p>Once the insertion point is set, we recursively codegen the “then”
+expression from the AST. To finish off the “then” block, we create an
+unconditional branch to the merge block. One interesting (and very
+important) aspect of the LLVM IR is that it <a class="reference external" href="../LangRef.html#functionstructure">requires all basic blocks
+to be “terminated”</a> with a <a class="reference external" href="../LangRef.html#terminators">control
+flow instruction</a> such as return or
+branch. This means that all control flow, <em>including fall throughs</em> must
+be made explicit in the LLVM IR. If you violate this rule, the verifier
+will emit an error.</p>
+<p>The final line here is quite subtle, but is very important. The basic
+issue is that when we create the Phi node in the merge block, we need to
+set up the block/value pairs that indicate how the Phi will work.
+Importantly, the Phi node expects to have an entry for each predecessor
+of the block in the CFG. Why then, are we getting the current block when
+we just set it to ThenBB 5 lines above? The problem is that the “Then”
+expression may actually itself change the block that the Builder is
+emitting into if, for example, it contains a nested “if/then/else”
+expression. Because calling Codegen recursively could arbitrarily change
+the notion of the current block, we are required to get an up-to-date
+value for code that will set up the Phi node.</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="c1">// Emit else block.</span>
+<span class="n">TheFunction</span><span class="o">-></span><span class="n">getBasicBlockList</span><span class="p">().</span><span class="n">push_back</span><span class="p">(</span><span class="n">ElseBB</span><span class="p">);</span>
+<span class="n">Builder</span><span class="p">.</span><span class="n">SetInsertPoint</span><span class="p">(</span><span class="n">ElseBB</span><span class="p">);</span>
+
+<span class="n">Value</span> <span class="o">*</span><span class="n">ElseV</span> <span class="o">=</span> <span class="n">Else</span><span class="o">-></span><span class="n">Codegen</span><span class="p">();</span>
+<span class="k">if</span> <span class="p">(</span><span class="n">ElseV</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+
+<span class="n">Builder</span><span class="p">.</span><span class="n">CreateBr</span><span class="p">(</span><span class="n">MergeBB</span><span class="p">);</span>
+<span class="c1">// Codegen of 'Else' can change the current block, update ElseBB for the PHI.</span>
+<span class="n">ElseBB</span> <span class="o">=</span> <span class="n">Builder</span><span class="p">.</span><span class="n">GetInsertBlock</span><span class="p">();</span>
+</pre></div>
+</div>
+<p>Code generation for the ‘else’ block is basically identical to codegen
+for the ‘then’ block. The only significant difference is the first line,
+which adds the ‘else’ block to the function. Recall previously that the
+‘else’ block was created, but not added to the function. Now that the
+‘then’ and ‘else’ blocks are emitted, we can finish up with the merge
+code:</p>
+<div class="highlight-c++"><div class="highlight"><pre>  <span class="c1">// Emit merge block.</span>
+  <span class="n">TheFunction</span><span class="o">-></span><span class="n">getBasicBlockList</span><span class="p">().</span><span class="n">push_back</span><span class="p">(</span><span class="n">MergeBB</span><span class="p">);</span>
+  <span class="n">Builder</span><span class="p">.</span><span class="n">SetInsertPoint</span><span class="p">(</span><span class="n">MergeBB</span><span class="p">);</span>
+  <span class="n">PHINode</span> <span class="o">*</span><span class="n">PN</span> <span class="o">=</span> <span class="n">Builder</span><span class="p">.</span><span class="n">CreatePHI</span><span class="p">(</span><span class="n">Type</span><span class="o">::</span><span class="n">getDoubleTy</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">()),</span> <span class="mi">2</span><span class="p">,</span>
+                                  <span class="s">"iftmp"</span><span class="p">);</span>
+
+  <span class="n">PN</span><span class="o">-></span><span class="n">addIncoming</span><span class="p">(</span><span class="n">ThenV</span><span class="p">,</span> <span class="n">ThenBB</span><span class="p">);</span>
+  <span class="n">PN</span><span class="o">-></span><span class="n">addIncoming</span><span class="p">(</span><span class="n">ElseV</span><span class="p">,</span> <span class="n">ElseBB</span><span class="p">);</span>
+  <span class="k">return</span> <span class="n">PN</span><span class="p">;</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<p>The first two lines here are now familiar: the first adds the “merge”
+block to the Function object (it was previously floating, like the else
+block above). The second block changes the insertion point so that newly
+created code will go into the “merge” block. Once that is done, we need
+to create the PHI node and set up the block/value pairs for the PHI.</p>
+<p>Finally, the CodeGen function returns the phi node as the value computed
+by the if/then/else expression. In our example above, this returned
+value will feed into the code for the top-level function, which will
+create the return instruction.</p>
+<p>Overall, we now have the ability to execute conditional code in
+Kaleidoscope. With this extension, Kaleidoscope is a fairly complete
+language that can calculate a wide variety of numeric functions. Next up
+we’ll add another useful expression that is familiar from non-functional
+languages...</p>
+</div>
+</div>
+<div class="section" id="for-loop-expression">
+<h2><a class="toc-backref" href="#id8">5.3. ‘for’ Loop Expression</a><a class="headerlink" href="#for-loop-expression" title="Permalink to this headline">¶</a></h2>
+<p>Now that we know how to add basic control flow constructs to the
+language, we have the tools to add more powerful things. Lets add
+something more aggressive, a ‘for’ expression:</p>
+<div class="highlight-python"><pre>extern putchard(char)
+def printstar(n)
+  for i = 1, i < n, 1.0 in
+    putchard(42);  # ascii 42 = '*'
+
+# print 100 '*' characters
+printstar(100);</pre>
+</div>
+<p>This expression defines a new variable (“i” in this case) which iterates
+from a starting value, while the condition (“i < n” in this case) is
+true, incrementing by an optional step value (“1.0” in this case). If
+the step value is omitted, it defaults to 1.0. While the loop is true,
+it executes its body expression. Because we don’t have anything better
+to return, we’ll just define the loop as always returning 0.0. In the
+future when we have mutable variables, it will get more useful.</p>
+<p>As before, lets talk about the changes that we need to Kaleidoscope to
+support this.</p>
+<div class="section" id="lexer-extensions-for-the-for-loop">
+<h3><a class="toc-backref" href="#id9">5.3.1. Lexer Extensions for the ‘for’ Loop</a><a class="headerlink" href="#lexer-extensions-for-the-for-loop" title="Permalink to this headline">¶</a></h3>
+<p>The lexer extensions are the same sort of thing as for if/then/else:</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="p">...</span> <span class="n">in</span> <span class="k">enum</span> <span class="n">Token</span> <span class="p">...</span>
+<span class="c1">// control</span>
+<span class="n">tok_if</span> <span class="o">=</span> <span class="o">-</span><span class="mi">6</span><span class="p">,</span> <span class="n">tok_then</span> <span class="o">=</span> <span class="o">-</span><span class="mi">7</span><span class="p">,</span> <span class="n">tok_else</span> <span class="o">=</span> <span class="o">-</span><span class="mi">8</span><span class="p">,</span>
+<span class="n">tok_for</span> <span class="o">=</span> <span class="o">-</span><span class="mi">9</span><span class="p">,</span> <span class="n">tok_in</span> <span class="o">=</span> <span class="o">-</span><span class="mi">10</span>
+
+<span class="p">...</span> <span class="n">in</span> <span class="n">gettok</span> <span class="p">...</span>
+<span class="k">if</span> <span class="p">(</span><span class="n">IdentifierStr</span> <span class="o">==</span> <span class="s">"def"</span><span class="p">)</span> <span class="k">return</span> <span class="n">tok_def</span><span class="p">;</span>
+<span class="k">if</span> <span class="p">(</span><span class="n">IdentifierStr</span> <span class="o">==</span> <span class="s">"extern"</span><span class="p">)</span> <span class="k">return</span> <span class="n">tok_extern</span><span class="p">;</span>
+<span class="k">if</span> <span class="p">(</span><span class="n">IdentifierStr</span> <span class="o">==</span> <span class="s">"if"</span><span class="p">)</span> <span class="k">return</span> <span class="n">tok_if</span><span class="p">;</span>
+<span class="k">if</span> <span class="p">(</span><span class="n">IdentifierStr</span> <span class="o">==</span> <span class="s">"then"</span><span class="p">)</span> <span class="k">return</span> <span class="n">tok_then</span><span class="p">;</span>
+<span class="k">if</span> <span class="p">(</span><span class="n">IdentifierStr</span> <span class="o">==</span> <span class="s">"else"</span><span class="p">)</span> <span class="k">return</span> <span class="n">tok_else</span><span class="p">;</span>
+<span class="k">if</span> <span class="p">(</span><span class="n">IdentifierStr</span> <span class="o">==</span> <span class="s">"for"</span><span class="p">)</span> <span class="k">return</span> <span class="n">tok_for</span><span class="p">;</span>
+<span class="k">if</span> <span class="p">(</span><span class="n">IdentifierStr</span> <span class="o">==</span> <span class="s">"in"</span><span class="p">)</span> <span class="k">return</span> <span class="n">tok_in</span><span class="p">;</span>
+<span class="k">return</span> <span class="n">tok_identifier</span><span class="p">;</span>
+</pre></div>
+</div>
+</div>
+<div class="section" id="ast-extensions-for-the-for-loop">
+<h3><a class="toc-backref" href="#id10">5.3.2. AST Extensions for the ‘for’ Loop</a><a class="headerlink" href="#ast-extensions-for-the-for-loop" title="Permalink to this headline">¶</a></h3>
+<p>The AST node is just as simple. It basically boils down to capturing the
+variable name and the constituent expressions in the node.</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="c1">/// ForExprAST - Expression class for for/in.</span>
+<span class="k">class</span> <span class="nc">ForExprAST</span> <span class="o">:</span> <span class="k">public</span> <span class="n">ExprAST</span> <span class="p">{</span>
+  <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">VarName</span><span class="p">;</span>
+  <span class="n">ExprAST</span> <span class="o">*</span><span class="n">Start</span><span class="p">,</span> <span class="o">*</span><span class="n">End</span><span class="p">,</span> <span class="o">*</span><span class="n">Step</span><span class="p">,</span> <span class="o">*</span><span class="n">Body</span><span class="p">;</span>
+<span class="nl">public:</span>
+  <span class="n">ForExprAST</span><span class="p">(</span><span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="o">&</span><span class="n">varname</span><span class="p">,</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="n">start</span><span class="p">,</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="n">end</span><span class="p">,</span>
+             <span class="n">ExprAST</span> <span class="o">*</span><span class="n">step</span><span class="p">,</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="n">body</span><span class="p">)</span>
+    <span class="o">:</span> <span class="n">VarName</span><span class="p">(</span><span class="n">varname</span><span class="p">),</span> <span class="n">Start</span><span class="p">(</span><span class="n">start</span><span class="p">),</span> <span class="n">End</span><span class="p">(</span><span class="n">end</span><span class="p">),</span> <span class="n">Step</span><span class="p">(</span><span class="n">step</span><span class="p">),</span> <span class="n">Body</span><span class="p">(</span><span class="n">body</span><span class="p">)</span> <span class="p">{}</span>
+  <span class="k">virtual</span> <span class="n">Value</span> <span class="o">*</span><span class="n">Codegen</span><span class="p">();</span>
+<span class="p">};</span>
+</pre></div>
+</div>
+</div>
+<div class="section" id="parser-extensions-for-the-for-loop">
+<h3><a class="toc-backref" href="#id11">5.3.3. Parser Extensions for the ‘for’ Loop</a><a class="headerlink" href="#parser-extensions-for-the-for-loop" title="Permalink to this headline">¶</a></h3>
+<p>The parser code is also fairly standard. The only interesting thing here
+is handling of the optional step value. The parser code handles it by
+checking to see if the second comma is present. If not, it sets the step
+value to null in the AST node:</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="c1">/// forexpr ::= 'for' identifier '=' expr ',' expr (',' expr)? 'in' expression</span>
+<span class="k">static</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="nf">ParseForExpr</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat the for.</span>
+
+  <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="n">tok_identifier</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">Error</span><span class="p">(</span><span class="s">"expected identifier after for"</span><span class="p">);</span>
+
+  <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">IdName</span> <span class="o">=</span> <span class="n">IdentifierStr</span><span class="p">;</span>
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat identifier.</span>
+
+  <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="sc">'='</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">Error</span><span class="p">(</span><span class="s">"expected '=' after for"</span><span class="p">);</span>
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat '='.</span>
+
+
+  <span class="n">ExprAST</span> <span class="o">*</span><span class="n">Start</span> <span class="o">=</span> <span class="n">ParseExpression</span><span class="p">();</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">Start</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="sc">','</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">Error</span><span class="p">(</span><span class="s">"expected ',' after for start value"</span><span class="p">);</span>
+  <span class="n">getNextToken</span><span class="p">();</span>
+
+  <span class="n">ExprAST</span> <span class="o">*</span><span class="n">End</span> <span class="o">=</span> <span class="n">ParseExpression</span><span class="p">();</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">End</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+
+  <span class="c1">// The step value is optional.</span>
+  <span class="n">ExprAST</span> <span class="o">*</span><span class="n">Step</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">==</span> <span class="sc">','</span><span class="p">)</span> <span class="p">{</span>
+    <span class="n">getNextToken</span><span class="p">();</span>
+    <span class="n">Step</span> <span class="o">=</span> <span class="n">ParseExpression</span><span class="p">();</span>
+    <span class="k">if</span> <span class="p">(</span><span class="n">Step</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+  <span class="p">}</span>
+
+  <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="n">tok_in</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">Error</span><span class="p">(</span><span class="s">"expected 'in' after for"</span><span class="p">);</span>
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat 'in'.</span>
+
+  <span class="n">ExprAST</span> <span class="o">*</span><span class="n">Body</span> <span class="o">=</span> <span class="n">ParseExpression</span><span class="p">();</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">Body</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+
+  <span class="k">return</span> <span class="k">new</span> <span class="n">ForExprAST</span><span class="p">(</span><span class="n">IdName</span><span class="p">,</span> <span class="n">Start</span><span class="p">,</span> <span class="n">End</span><span class="p">,</span> <span class="n">Step</span><span class="p">,</span> <span class="n">Body</span><span class="p">);</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+</div>
+<div class="section" id="llvm-ir-for-the-for-loop">
+<h3><a class="toc-backref" href="#id12">5.3.4. LLVM IR for the ‘for’ Loop</a><a class="headerlink" href="#llvm-ir-for-the-for-loop" title="Permalink to this headline">¶</a></h3>
+<p>Now we get to the good part: the LLVM IR we want to generate for this
+thing. With the simple example above, we get this LLVM IR (note that
+this dump is generated with optimizations disabled for clarity):</p>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="k">declare</span> <span class="kt">double</span> <span class="vg">@putchard</span><span class="p">(</span><span class="kt">double</span><span class="p">)</span>
+
+<span class="k">define</span> <span class="kt">double</span> <span class="vg">@printstar</span><span class="p">(</span><span class="kt">double</span> <span class="nv">%n</span><span class="p">)</span> <span class="p">{</span>
+<span class="nl">entry:</span>
+  <span class="c">; initial value = 1.0 (inlined into phi)</span>
+  <span class="k">br</span> <span class="kt">label</span> <span class="nv">%loop</span>
+
+<span class="nl">loop:</span>       <span class="c">; preds = %loop, %entry</span>
+  <span class="nv">%i</span> <span class="p">=</span> <span class="k">phi</span> <span class="kt">double</span> <span class="p">[</span> <span class="m">1.000000e+00</span><span class="p">,</span> <span class="nv">%entry</span> <span class="p">],</span> <span class="p">[</span> <span class="nv">%nextvar</span><span class="p">,</span> <span class="nv">%loop</span> <span class="p">]</span>
+  <span class="c">; body</span>
+  <span class="nv">%calltmp</span> <span class="p">=</span> <span class="k">call</span> <span class="kt">double</span> <span class="vg">@putchard</span><span class="p">(</span><span class="kt">double</span> <span class="m">4.200000e+01</span><span class="p">)</span>
+  <span class="c">; increment</span>
+  <span class="nv">%nextvar</span> <span class="p">=</span> <span class="k">fadd</span> <span class="kt">double</span> <span class="nv">%i</span><span class="p">,</span> <span class="m">1.000000e+00</span>
+
+  <span class="c">; termination test</span>
+  <span class="nv">%cmptmp</span> <span class="p">=</span> <span class="k">fcmp</span> <span class="k">ult</span> <span class="kt">double</span> <span class="nv">%i</span><span class="p">,</span> <span class="nv">%n</span>
+  <span class="nv">%booltmp</span> <span class="p">=</span> <span class="k">uitofp</span> <span class="k">i1</span> <span class="nv">%cmptmp</span> <span class="k">to</span> <span class="kt">double</span>
+  <span class="nv">%loopcond</span> <span class="p">=</span> <span class="k">fcmp</span> <span class="k">one</span> <span class="kt">double</span> <span class="nv">%booltmp</span><span class="p">,</span> <span class="m">0.000000e+00</span>
+  <span class="k">br</span> <span class="k">i1</span> <span class="nv">%loopcond</span><span class="p">,</span> <span class="kt">label</span> <span class="nv">%loop</span><span class="p">,</span> <span class="kt">label</span> <span class="nv">%afterloop</span>
+
+<span class="nl">afterloop:</span>      <span class="c">; preds = %loop</span>
+  <span class="c">; loop always returns 0.0</span>
+  <span class="k">ret</span> <span class="kt">double</span> <span class="m">0.000000e+00</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<p>This loop contains all the same constructs we saw before: a phi node,
+several expressions, and some basic blocks. Lets see how this fits
+together.</p>
+</div>
+<div class="section" id="code-generation-for-the-for-loop">
+<h3><a class="toc-backref" href="#id13">5.3.5. Code Generation for the ‘for’ Loop</a><a class="headerlink" href="#code-generation-for-the-for-loop" title="Permalink to this headline">¶</a></h3>
+<p>The first part of Codegen is very simple: we just output the start
+expression for the loop value:</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="n">Value</span> <span class="o">*</span><span class="n">ForExprAST</span><span class="o">::</span><span class="n">Codegen</span><span class="p">()</span> <span class="p">{</span>
+  <span class="c1">// Emit the start code first, without 'variable' in scope.</span>
+  <span class="n">Value</span> <span class="o">*</span><span class="n">StartVal</span> <span class="o">=</span> <span class="n">Start</span><span class="o">-></span><span class="n">Codegen</span><span class="p">();</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">StartVal</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+</pre></div>
+</div>
+<p>With this out of the way, the next step is to set up the LLVM basic
+block for the start of the loop body. In the case above, the whole loop
+body is one block, but remember that the body code itself could consist
+of multiple blocks (e.g. if it contains an if/then/else or a for/in
+expression).</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="c1">// Make the new basic block for the loop header, inserting after current</span>
+<span class="c1">// block.</span>
+<span class="n">Function</span> <span class="o">*</span><span class="n">TheFunction</span> <span class="o">=</span> <span class="n">Builder</span><span class="p">.</span><span class="n">GetInsertBlock</span><span class="p">()</span><span class="o">-></span><span class="n">getParent</span><span class="p">();</span>
+<span class="n">BasicBlock</span> <span class="o">*</span><span class="n">PreheaderBB</span> <span class="o">=</span> <span class="n">Builder</span><span class="p">.</span><span class="n">GetInsertBlock</span><span class="p">();</span>
+<span class="n">BasicBlock</span> <span class="o">*</span><span class="n">LoopBB</span> <span class="o">=</span> <span class="n">BasicBlock</span><span class="o">::</span><span class="n">Create</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">(),</span> <span class="s">"loop"</span><span class="p">,</span> <span class="n">TheFunction</span><span class="p">);</span>
+
+<span class="c1">// Insert an explicit fall through from the current block to the LoopBB.</span>
+<span class="n">Builder</span><span class="p">.</span><span class="n">CreateBr</span><span class="p">(</span><span class="n">LoopBB</span><span class="p">);</span>
+</pre></div>
+</div>
+<p>This code is similar to what we saw for if/then/else. Because we will
+need it to create the Phi node, we remember the block that falls through
+into the loop. Once we have that, we create the actual block that starts
+the loop and create an unconditional branch for the fall-through between
+the two blocks.</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="c1">// Start insertion in LoopBB.</span>
+<span class="n">Builder</span><span class="p">.</span><span class="n">SetInsertPoint</span><span class="p">(</span><span class="n">LoopBB</span><span class="p">);</span>
+
+<span class="c1">// Start the PHI node with an entry for Start.</span>
+<span class="n">PHINode</span> <span class="o">*</span><span class="n">Variable</span> <span class="o">=</span> <span class="n">Builder</span><span class="p">.</span><span class="n">CreatePHI</span><span class="p">(</span><span class="n">Type</span><span class="o">::</span><span class="n">getDoubleTy</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">()),</span> <span class="mi">2</span><span class="p">,</span> <span class="n">VarName</span><span class="p">.</span><span class="n">c_str</span><span class="p">());</span>
+<span class="n">Variable</span><span class="o">-></span><span class="n">addIncoming</span><span class="p">(</span><span class="n">StartVal</span><span class="p">,</span> <span class="n">PreheaderBB</span><span class="p">);</span>
+</pre></div>
+</div>
+<p>Now that the “preheader” for the loop is set up, we switch to emitting
+code for the loop body. To begin with, we move the insertion point and
+create the PHI node for the loop induction variable. Since we already
+know the incoming value for the starting value, we add it to the Phi
+node. Note that the Phi will eventually get a second value for the
+backedge, but we can’t set it up yet (because it doesn’t exist!).</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="c1">// Within the loop, the variable is defined equal to the PHI node.  If it</span>
+<span class="c1">// shadows an existing variable, we have to restore it, so save it now.</span>
+<span class="n">Value</span> <span class="o">*</span><span class="n">OldVal</span> <span class="o">=</span> <span class="n">NamedValues</span><span class="p">[</span><span class="n">VarName</span><span class="p">];</span>
+<span class="n">NamedValues</span><span class="p">[</span><span class="n">VarName</span><span class="p">]</span> <span class="o">=</span> <span class="n">Variable</span><span class="p">;</span>
+
+<span class="c1">// Emit the body of the loop.  This, like any other expr, can change the</span>
+<span class="c1">// current BB.  Note that we ignore the value computed by the body, but don't</span>
+<span class="c1">// allow an error.</span>
+<span class="k">if</span> <span class="p">(</span><span class="n">Body</span><span class="o">-></span><span class="n">Codegen</span><span class="p">()</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span>
+  <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+</pre></div>
+</div>
+<p>Now the code starts to get more interesting. Our ‘for’ loop introduces a
+new variable to the symbol table. This means that our symbol table can
+now contain either function arguments or loop variables. To handle this,
+before we codegen the body of the loop, we add the loop variable as the
+current value for its name. Note that it is possible that there is a
+variable of the same name in the outer scope. It would be easy to make
+this an error (emit an error and return null if there is already an
+entry for VarName) but we choose to allow shadowing of variables. In
+order to handle this correctly, we remember the Value that we are
+potentially shadowing in <tt class="docutils literal"><span class="pre">OldVal</span></tt> (which will be null if there is no
+shadowed variable).</p>
+<p>Once the loop variable is set into the symbol table, the code
+recursively codegen’s the body. This allows the body to use the loop
+variable: any references to it will naturally find it in the symbol
+table.</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="c1">// Emit the step value.</span>
+<span class="n">Value</span> <span class="o">*</span><span class="n">StepVal</span><span class="p">;</span>
+<span class="k">if</span> <span class="p">(</span><span class="n">Step</span><span class="p">)</span> <span class="p">{</span>
+  <span class="n">StepVal</span> <span class="o">=</span> <span class="n">Step</span><span class="o">-></span><span class="n">Codegen</span><span class="p">();</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">StepVal</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+<span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
+  <span class="c1">// If not specified, use 1.0.</span>
+  <span class="n">StepVal</span> <span class="o">=</span> <span class="n">ConstantFP</span><span class="o">::</span><span class="n">get</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">(),</span> <span class="n">APFloat</span><span class="p">(</span><span class="mf">1.0</span><span class="p">));</span>
+<span class="p">}</span>
+
+<span class="n">Value</span> <span class="o">*</span><span class="n">NextVar</span> <span class="o">=</span> <span class="n">Builder</span><span class="p">.</span><span class="n">CreateFAdd</span><span class="p">(</span><span class="n">Variable</span><span class="p">,</span> <span class="n">StepVal</span><span class="p">,</span> <span class="s">"nextvar"</span><span class="p">);</span>
+</pre></div>
+</div>
+<p>Now that the body is emitted, we compute the next value of the iteration
+variable by adding the step value, or 1.0 if it isn’t present.
+‘<tt class="docutils literal"><span class="pre">NextVar</span></tt>‘ will be the value of the loop variable on the next
+iteration of the loop.</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="c1">// Compute the end condition.</span>
+<span class="n">Value</span> <span class="o">*</span><span class="n">EndCond</span> <span class="o">=</span> <span class="n">End</span><span class="o">-></span><span class="n">Codegen</span><span class="p">();</span>
+<span class="k">if</span> <span class="p">(</span><span class="n">EndCond</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="n">EndCond</span><span class="p">;</span>
+
+<span class="c1">// Convert condition to a bool by comparing equal to 0.0.</span>
+<span class="n">EndCond</span> <span class="o">=</span> <span class="n">Builder</span><span class="p">.</span><span class="n">CreateFCmpONE</span><span class="p">(</span><span class="n">EndCond</span><span class="p">,</span>
+                            <span class="n">ConstantFP</span><span class="o">::</span><span class="n">get</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">(),</span> <span class="n">APFloat</span><span class="p">(</span><span class="mf">0.0</span><span class="p">)),</span>
+                                <span class="s">"loopcond"</span><span class="p">);</span>
+</pre></div>
+</div>
+<p>Finally, we evaluate the exit value of the loop, to determine whether
+the loop should exit. This mirrors the condition evaluation for the
+if/then/else statement.</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="c1">// Create the "after loop" block and insert it.</span>
+<span class="n">BasicBlock</span> <span class="o">*</span><span class="n">LoopEndBB</span> <span class="o">=</span> <span class="n">Builder</span><span class="p">.</span><span class="n">GetInsertBlock</span><span class="p">();</span>
+<span class="n">BasicBlock</span> <span class="o">*</span><span class="n">AfterBB</span> <span class="o">=</span> <span class="n">BasicBlock</span><span class="o">::</span><span class="n">Create</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">(),</span> <span class="s">"afterloop"</span><span class="p">,</span> <span class="n">TheFunction</span><span class="p">);</span>
+
+<span class="c1">// Insert the conditional branch into the end of LoopEndBB.</span>
+<span class="n">Builder</span><span class="p">.</span><span class="n">CreateCondBr</span><span class="p">(</span><span class="n">EndCond</span><span class="p">,</span> <span class="n">LoopBB</span><span class="p">,</span> <span class="n">AfterBB</span><span class="p">);</span>
+
+<span class="c1">// Any new code will be inserted in AfterBB.</span>
+<span class="n">Builder</span><span class="p">.</span><span class="n">SetInsertPoint</span><span class="p">(</span><span class="n">AfterBB</span><span class="p">);</span>
+</pre></div>
+</div>
+<p>With the code for the body of the loop complete, we just need to finish
+up the control flow for it. This code remembers the end block (for the
+phi node), then creates the block for the loop exit (“afterloop”). Based
+on the value of the exit condition, it creates a conditional branch that
+chooses between executing the loop again and exiting the loop. Any
+future code is emitted in the “afterloop” block, so it sets the
+insertion position to it.</p>
+<div class="highlight-c++"><div class="highlight"><pre>  <span class="c1">// Add a new entry to the PHI node for the backedge.</span>
+  <span class="n">Variable</span><span class="o">-></span><span class="n">addIncoming</span><span class="p">(</span><span class="n">NextVar</span><span class="p">,</span> <span class="n">LoopEndBB</span><span class="p">);</span>
+
+  <span class="c1">// Restore the unshadowed variable.</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">OldVal</span><span class="p">)</span>
+    <span class="n">NamedValues</span><span class="p">[</span><span class="n">VarName</span><span class="p">]</span> <span class="o">=</span> <span class="n">OldVal</span><span class="p">;</span>
+  <span class="k">else</span>
+    <span class="n">NamedValues</span><span class="p">.</span><span class="n">erase</span><span class="p">(</span><span class="n">VarName</span><span class="p">);</span>
+
+  <span class="c1">// for expr always returns 0.0.</span>
+  <span class="k">return</span> <span class="n">Constant</span><span class="o">::</span><span class="n">getNullValue</span><span class="p">(</span><span class="n">Type</span><span class="o">::</span><span class="n">getDoubleTy</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">()));</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<p>The final code handles various cleanups: now that we have the “NextVar”
+value, we can add the incoming value to the loop PHI node. After that,
+we remove the loop variable from the symbol table, so that it isn’t in
+scope after the for loop. Finally, code generation of the for loop
+always returns 0.0, so that is what we return from
+<tt class="docutils literal"><span class="pre">ForExprAST::Codegen</span></tt>.</p>
+<p>With this, we conclude the “adding control flow to Kaleidoscope” chapter
+of the tutorial. In this chapter we added two control flow constructs,
+and used them to motivate a couple of aspects of the LLVM IR that are
+important for front-end implementors to know. In the next chapter of our
+saga, we will get a bit crazier and add <a class="reference external" href="LangImpl6.html">user-defined
+operators</a> to our poor innocent language.</p>
+</div>
+</div>
+<div class="section" id="full-code-listing">
+<h2><a class="toc-backref" href="#id14">5.4. Full Code Listing</a><a class="headerlink" href="#full-code-listing" title="Permalink to this headline">¶</a></h2>
+<p>Here is the complete code listing for our running example, enhanced with
+the if/then/else and for expressions.. To build this example, use:</p>
+<div class="highlight-bash"><div class="highlight"><pre><span class="c"># Compile</span>
+clang++ -g toy.cpp <span class="sb">`</span>llvm-config --cppflags --ldflags --libs core jit native<span class="sb">`</span> -O3 -o toy
+<span class="c"># Run</span>
+./toy
+</pre></div>
+</div>
+<p>Here is the code:</p>
+<div class="highlight-c++"><div class="highlight"><pre><span class="cp">#include "llvm/Analysis/Passes.h"</span>
+<span class="cp">#include "llvm/Analysis/Verifier.h"</span>
+<span class="cp">#include "llvm/ExecutionEngine/ExecutionEngine.h"</span>
+<span class="cp">#include "llvm/ExecutionEngine/JIT.h"</span>
+<span class="cp">#include "llvm/IR/DataLayout.h"</span>
+<span class="cp">#include "llvm/IR/DerivedTypes.h"</span>
+<span class="cp">#include "llvm/IR/IRBuilder.h"</span>
+<span class="cp">#include "llvm/IR/LLVMContext.h"</span>
+<span class="cp">#include "llvm/IR/Module.h"</span>
+<span class="cp">#include "llvm/PassManager.h"</span>
+<span class="cp">#include "llvm/Support/TargetSelect.h"</span>
+<span class="cp">#include "llvm/Transforms/Scalar.h"</span>
+<span class="cp">#include <cctype></span>
+<span class="cp">#include <cstdio></span>
+<span class="cp">#include <map></span>
+<span class="cp">#include <string></span>
+<span class="cp">#include <vector></span>
+<span class="k">using</span> <span class="k">namespace</span> <span class="n">llvm</span><span class="p">;</span>
+
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+<span class="c1">// Lexer</span>
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+
+<span class="c1">// The lexer returns tokens [0-255] if it is an unknown character, otherwise one</span>
+<span class="c1">// of these for known things.</span>
+<span class="k">enum</span> <span class="n">Token</span> <span class="p">{</span>
+  <span class="n">tok_eof</span> <span class="o">=</span> <span class="o">-</span><span class="mi">1</span><span class="p">,</span>
+
+  <span class="c1">// commands</span>
+  <span class="n">tok_def</span> <span class="o">=</span> <span class="o">-</span><span class="mi">2</span><span class="p">,</span> <span class="n">tok_extern</span> <span class="o">=</span> <span class="o">-</span><span class="mi">3</span><span class="p">,</span>
+
+  <span class="c1">// primary</span>
+  <span class="n">tok_identifier</span> <span class="o">=</span> <span class="o">-</span><span class="mi">4</span><span class="p">,</span> <span class="n">tok_number</span> <span class="o">=</span> <span class="o">-</span><span class="mi">5</span><span class="p">,</span>
+  
+  <span class="c1">// control</span>
+  <span class="n">tok_if</span> <span class="o">=</span> <span class="o">-</span><span class="mi">6</span><span class="p">,</span> <span class="n">tok_then</span> <span class="o">=</span> <span class="o">-</span><span class="mi">7</span><span class="p">,</span> <span class="n">tok_else</span> <span class="o">=</span> <span class="o">-</span><span class="mi">8</span><span class="p">,</span>
+  <span class="n">tok_for</span> <span class="o">=</span> <span class="o">-</span><span class="mi">9</span><span class="p">,</span> <span class="n">tok_in</span> <span class="o">=</span> <span class="o">-</span><span class="mi">10</span>
+<span class="p">};</span>
+
+<span class="k">static</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">IdentifierStr</span><span class="p">;</span>  <span class="c1">// Filled in if tok_identifier</span>
+<span class="k">static</span> <span class="kt">double</span> <span class="n">NumVal</span><span class="p">;</span>              <span class="c1">// Filled in if tok_number</span>
+
+<span class="c1">/// gettok - Return the next token from standard input.</span>
+<span class="k">static</span> <span class="kt">int</span> <span class="nf">gettok</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">static</span> <span class="kt">int</span> <span class="n">LastChar</span> <span class="o">=</span> <span class="sc">' '</span><span class="p">;</span>
+
+  <span class="c1">// Skip any whitespace.</span>
+  <span class="k">while</span> <span class="p">(</span><span class="n">isspace</span><span class="p">(</span><span class="n">LastChar</span><span class="p">))</span>
+    <span class="n">LastChar</span> <span class="o">=</span> <span class="n">getchar</span><span class="p">();</span>
+
+  <span class="k">if</span> <span class="p">(</span><span class="n">isalpha</span><span class="p">(</span><span class="n">LastChar</span><span class="p">))</span> <span class="p">{</span> <span class="c1">// identifier: [a-zA-Z][a-zA-Z0-9]*</span>
+    <span class="n">IdentifierStr</span> <span class="o">=</span> <span class="n">LastChar</span><span class="p">;</span>
+    <span class="k">while</span> <span class="p">(</span><span class="n">isalnum</span><span class="p">((</span><span class="n">LastChar</span> <span class="o">=</span> <span class="n">getchar</span><span class="p">())))</span>
+      <span class="n">IdentifierStr</span> <span class="o">+=</span> <span class="n">LastChar</span><span class="p">;</span>
+
+    <span class="k">if</span> <span class="p">(</span><span class="n">IdentifierStr</span> <span class="o">==</span> <span class="s">"def"</span><span class="p">)</span> <span class="k">return</span> <span class="n">tok_def</span><span class="p">;</span>
+    <span class="k">if</span> <span class="p">(</span><span class="n">IdentifierStr</span> <span class="o">==</span> <span class="s">"extern"</span><span class="p">)</span> <span class="k">return</span> <span class="n">tok_extern</span><span class="p">;</span>
+    <span class="k">if</span> <span class="p">(</span><span class="n">IdentifierStr</span> <span class="o">==</span> <span class="s">"if"</span><span class="p">)</span> <span class="k">return</span> <span class="n">tok_if</span><span class="p">;</span>
+    <span class="k">if</span> <span class="p">(</span><span class="n">IdentifierStr</span> <span class="o">==</span> <span class="s">"then"</span><span class="p">)</span> <span class="k">return</span> <span class="n">tok_then</span><span class="p">;</span>
+    <span class="k">if</span> <span class="p">(</span><span class="n">IdentifierStr</span> <span class="o">==</span> <span class="s">"else"</span><span class="p">)</span> <span class="k">return</span> <span class="n">tok_else</span><span class="p">;</span>
+    <span class="k">if</span> <span class="p">(</span><span class="n">IdentifierStr</span> <span class="o">==</span> <span class="s">"for"</span><span class="p">)</span> <span class="k">return</span> <span class="n">tok_for</span><span class="p">;</span>
+    <span class="k">if</span> <span class="p">(</span><span class="n">IdentifierStr</span> <span class="o">==</span> <span class="s">"in"</span><span class="p">)</span> <span class="k">return</span> <span class="n">tok_in</span><span class="p">;</span>
+    <span class="k">return</span> <span class="n">tok_identifier</span><span class="p">;</span>
+  <span class="p">}</span>
+
+  <span class="k">if</span> <span class="p">(</span><span class="n">isdigit</span><span class="p">(</span><span class="n">LastChar</span><span class="p">)</span> <span class="o">||</span> <span class="n">LastChar</span> <span class="o">==</span> <span class="sc">'.'</span><span class="p">)</span> <span class="p">{</span>   <span class="c1">// Number: [0-9.]+</span>
+    <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">NumStr</span><span class="p">;</span>
+    <span class="k">do</span> <span class="p">{</span>
+      <span class="n">NumStr</span> <span class="o">+=</span> <span class="n">LastChar</span><span class="p">;</span>
+      <span class="n">LastChar</span> <span class="o">=</span> <span class="n">getchar</span><span class="p">();</span>
+    <span class="p">}</span> <span class="k">while</span> <span class="p">(</span><span class="n">isdigit</span><span class="p">(</span><span class="n">LastChar</span><span class="p">)</span> <span class="o">||</span> <span class="n">LastChar</span> <span class="o">==</span> <span class="sc">'.'</span><span class="p">);</span>
+
+    <span class="n">NumVal</span> <span class="o">=</span> <span class="n">strtod</span><span class="p">(</span><span class="n">NumStr</span><span class="p">.</span><span class="n">c_str</span><span class="p">(),</span> <span class="mi">0</span><span class="p">);</span>
+    <span class="k">return</span> <span class="n">tok_number</span><span class="p">;</span>
+  <span class="p">}</span>
+
+  <span class="k">if</span> <span class="p">(</span><span class="n">LastChar</span> <span class="o">==</span> <span class="sc">'#'</span><span class="p">)</span> <span class="p">{</span>
+    <span class="c1">// Comment until end of line.</span>
+    <span class="k">do</span> <span class="n">LastChar</span> <span class="o">=</span> <span class="n">getchar</span><span class="p">();</span>
+    <span class="k">while</span> <span class="p">(</span><span class="n">LastChar</span> <span class="o">!=</span> <span class="n">EOF</span> <span class="o">&&</span> <span class="n">LastChar</span> <span class="o">!=</span> <span class="sc">'\n'</span> <span class="o">&&</span> <span class="n">LastChar</span> <span class="o">!=</span> <span class="sc">'\r'</span><span class="p">);</span>
+    
+    <span class="k">if</span> <span class="p">(</span><span class="n">LastChar</span> <span class="o">!=</span> <span class="n">EOF</span><span class="p">)</span>
+      <span class="k">return</span> <span class="n">gettok</span><span class="p">();</span>
+  <span class="p">}</span>
+  
+  <span class="c1">// Check for end of file.  Don't eat the EOF.</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">LastChar</span> <span class="o">==</span> <span class="n">EOF</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">tok_eof</span><span class="p">;</span>
+
+  <span class="c1">// Otherwise, just return the character as its ascii value.</span>
+  <span class="kt">int</span> <span class="n">ThisChar</span> <span class="o">=</span> <span class="n">LastChar</span><span class="p">;</span>
+  <span class="n">LastChar</span> <span class="o">=</span> <span class="n">getchar</span><span class="p">();</span>
+  <span class="k">return</span> <span class="n">ThisChar</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+<span class="c1">// Abstract Syntax Tree (aka Parse Tree)</span>
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+<span class="k">namespace</span> <span class="p">{</span>
+<span class="c1">/// ExprAST - Base class for all expression nodes.</span>
+<span class="k">class</span> <span class="nc">ExprAST</span> <span class="p">{</span>
+<span class="nl">public:</span>
+  <span class="k">virtual</span> <span class="o">~</span><span class="n">ExprAST</span><span class="p">()</span> <span class="p">{}</span>
+  <span class="k">virtual</span> <span class="n">Value</span> <span class="o">*</span><span class="n">Codegen</span><span class="p">()</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<span class="p">};</span>
+
+<span class="c1">/// NumberExprAST - Expression class for numeric literals like "1.0".</span>
+<span class="k">class</span> <span class="nc">NumberExprAST</span> <span class="o">:</span> <span class="k">public</span> <span class="n">ExprAST</span> <span class="p">{</span>
+  <span class="kt">double</span> <span class="n">Val</span><span class="p">;</span>
+<span class="nl">public:</span>
+  <span class="n">NumberExprAST</span><span class="p">(</span><span class="kt">double</span> <span class="n">val</span><span class="p">)</span> <span class="o">:</span> <span class="n">Val</span><span class="p">(</span><span class="n">val</span><span class="p">)</span> <span class="p">{}</span>
+  <span class="k">virtual</span> <span class="n">Value</span> <span class="o">*</span><span class="n">Codegen</span><span class="p">();</span>
+<span class="p">};</span>
+
+<span class="c1">/// VariableExprAST - Expression class for referencing a variable, like "a".</span>
+<span class="k">class</span> <span class="nc">VariableExprAST</span> <span class="o">:</span> <span class="k">public</span> <span class="n">ExprAST</span> <span class="p">{</span>
+  <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">Name</span><span class="p">;</span>
+<span class="nl">public:</span>
+  <span class="n">VariableExprAST</span><span class="p">(</span><span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="o">&</span><span class="n">name</span><span class="p">)</span> <span class="o">:</span> <span class="n">Name</span><span class="p">(</span><span class="n">name</span><span class="p">)</span> <span class="p">{}</span>
+  <span class="k">virtual</span> <span class="n">Value</span> <span class="o">*</span><span class="n">Codegen</span><span class="p">();</span>
+<span class="p">};</span>
+
+<span class="c1">/// BinaryExprAST - Expression class for a binary operator.</span>
+<span class="k">class</span> <span class="nc">BinaryExprAST</span> <span class="o">:</span> <span class="k">public</span> <span class="n">ExprAST</span> <span class="p">{</span>
+  <span class="kt">char</span> <span class="n">Op</span><span class="p">;</span>
+  <span class="n">ExprAST</span> <span class="o">*</span><span class="n">LHS</span><span class="p">,</span> <span class="o">*</span><span class="n">RHS</span><span class="p">;</span>
+<span class="nl">public:</span>
+  <span class="n">BinaryExprAST</span><span class="p">(</span><span class="kt">char</span> <span class="n">op</span><span class="p">,</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="n">lhs</span><span class="p">,</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="n">rhs</span><span class="p">)</span> 
+    <span class="o">:</span> <span class="n">Op</span><span class="p">(</span><span class="n">op</span><span class="p">),</span> <span class="n">LHS</span><span class="p">(</span><span class="n">lhs</span><span class="p">),</span> <span class="n">RHS</span><span class="p">(</span><span class="n">rhs</span><span class="p">)</span> <span class="p">{}</span>
+  <span class="k">virtual</span> <span class="n">Value</span> <span class="o">*</span><span class="n">Codegen</span><span class="p">();</span>
+<span class="p">};</span>
+
+<span class="c1">/// CallExprAST - Expression class for function calls.</span>
+<span class="k">class</span> <span class="nc">CallExprAST</span> <span class="o">:</span> <span class="k">public</span> <span class="n">ExprAST</span> <span class="p">{</span>
+  <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">Callee</span><span class="p">;</span>
+  <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">ExprAST</span><span class="o">*></span> <span class="n">Args</span><span class="p">;</span>
+<span class="nl">public:</span>
+  <span class="n">CallExprAST</span><span class="p">(</span><span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="o">&</span><span class="n">callee</span><span class="p">,</span> <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">ExprAST</span><span class="o">*></span> <span class="o">&</span><span class="n">args</span><span class="p">)</span>
+    <span class="o">:</span> <span class="n">Callee</span><span class="p">(</span><span class="n">callee</span><span class="p">),</span> <span class="n">Args</span><span class="p">(</span><span class="n">args</span><span class="p">)</span> <span class="p">{}</span>
+  <span class="k">virtual</span> <span class="n">Value</span> <span class="o">*</span><span class="n">Codegen</span><span class="p">();</span>
+<span class="p">};</span>
+
+<span class="c1">/// IfExprAST - Expression class for if/then/else.</span>
+<span class="k">class</span> <span class="nc">IfExprAST</span> <span class="o">:</span> <span class="k">public</span> <span class="n">ExprAST</span> <span class="p">{</span>
+  <span class="n">ExprAST</span> <span class="o">*</span><span class="n">Cond</span><span class="p">,</span> <span class="o">*</span><span class="n">Then</span><span class="p">,</span> <span class="o">*</span><span class="n">Else</span><span class="p">;</span>
+<span class="nl">public:</span>
+  <span class="n">IfExprAST</span><span class="p">(</span><span class="n">ExprAST</span> <span class="o">*</span><span class="n">cond</span><span class="p">,</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="n">then</span><span class="p">,</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="n">_else</span><span class="p">)</span>
+  <span class="o">:</span> <span class="n">Cond</span><span class="p">(</span><span class="n">cond</span><span class="p">),</span> <span class="n">Then</span><span class="p">(</span><span class="n">then</span><span class="p">),</span> <span class="n">Else</span><span class="p">(</span><span class="n">_else</span><span class="p">)</span> <span class="p">{}</span>
+  <span class="k">virtual</span> <span class="n">Value</span> <span class="o">*</span><span class="n">Codegen</span><span class="p">();</span>
+<span class="p">};</span>
+
+<span class="c1">/// ForExprAST - Expression class for for/in.</span>
+<span class="k">class</span> <span class="nc">ForExprAST</span> <span class="o">:</span> <span class="k">public</span> <span class="n">ExprAST</span> <span class="p">{</span>
+  <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">VarName</span><span class="p">;</span>
+  <span class="n">ExprAST</span> <span class="o">*</span><span class="n">Start</span><span class="p">,</span> <span class="o">*</span><span class="n">End</span><span class="p">,</span> <span class="o">*</span><span class="n">Step</span><span class="p">,</span> <span class="o">*</span><span class="n">Body</span><span class="p">;</span>
+<span class="nl">public:</span>
+  <span class="n">ForExprAST</span><span class="p">(</span><span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="o">&</span><span class="n">varname</span><span class="p">,</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="n">start</span><span class="p">,</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="n">end</span><span class="p">,</span>
+             <span class="n">ExprAST</span> <span class="o">*</span><span class="n">step</span><span class="p">,</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="n">body</span><span class="p">)</span>
+    <span class="o">:</span> <span class="n">VarName</span><span class="p">(</span><span class="n">varname</span><span class="p">),</span> <span class="n">Start</span><span class="p">(</span><span class="n">start</span><span class="p">),</span> <span class="n">End</span><span class="p">(</span><span class="n">end</span><span class="p">),</span> <span class="n">Step</span><span class="p">(</span><span class="n">step</span><span class="p">),</span> <span class="n">Body</span><span class="p">(</span><span class="n">body</span><span class="p">)</span> <span class="p">{}</span>
+  <span class="k">virtual</span> <span class="n">Value</span> <span class="o">*</span><span class="n">Codegen</span><span class="p">();</span>
+<span class="p">};</span>
+
+<span class="c1">/// PrototypeAST - This class represents the "prototype" for a function,</span>
+<span class="c1">/// which captures its name, and its argument names (thus implicitly the number</span>
+<span class="c1">/// of arguments the function takes).</span>
+<span class="k">class</span> <span class="nc">PrototypeAST</span> <span class="p">{</span>
+  <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">Name</span><span class="p">;</span>
+  <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">></span> <span class="n">Args</span><span class="p">;</span>
+<span class="nl">public:</span>
+  <span class="n">PrototypeAST</span><span class="p">(</span><span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="o">&</span><span class="n">name</span><span class="p">,</span> <span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">></span> <span class="o">&</span><span class="n">args</span><span class="p">)</span>
+    <span class="o">:</span> <span class="n">Name</span><span class="p">(</span><span class="n">name</span><span class="p">),</span> <span class="n">Args</span><span class="p">(</span><span class="n">args</span><span class="p">)</span> <span class="p">{}</span>
+  
+  <span class="n">Function</span> <span class="o">*</span><span class="n">Codegen</span><span class="p">();</span>
+<span class="p">};</span>
+
+<span class="c1">/// FunctionAST - This class represents a function definition itself.</span>
+<span class="k">class</span> <span class="nc">FunctionAST</span> <span class="p">{</span>
+  <span class="n">PrototypeAST</span> <span class="o">*</span><span class="n">Proto</span><span class="p">;</span>
+  <span class="n">ExprAST</span> <span class="o">*</span><span class="n">Body</span><span class="p">;</span>
+<span class="nl">public:</span>
+  <span class="n">FunctionAST</span><span class="p">(</span><span class="n">PrototypeAST</span> <span class="o">*</span><span class="n">proto</span><span class="p">,</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="n">body</span><span class="p">)</span>
+    <span class="o">:</span> <span class="n">Proto</span><span class="p">(</span><span class="n">proto</span><span class="p">),</span> <span class="n">Body</span><span class="p">(</span><span class="n">body</span><span class="p">)</span> <span class="p">{}</span>
+  
+  <span class="n">Function</span> <span class="o">*</span><span class="n">Codegen</span><span class="p">();</span>
+<span class="p">};</span>
+<span class="p">}</span> <span class="c1">// end anonymous namespace</span>
+
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+<span class="c1">// Parser</span>
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+
+<span class="c1">/// CurTok/getNextToken - Provide a simple token buffer.  CurTok is the current</span>
+<span class="c1">/// token the parser is looking at.  getNextToken reads another token from the</span>
+<span class="c1">/// lexer and updates CurTok with its results.</span>
+<span class="k">static</span> <span class="kt">int</span> <span class="n">CurTok</span><span class="p">;</span>
+<span class="k">static</span> <span class="kt">int</span> <span class="nf">getNextToken</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">return</span> <span class="n">CurTok</span> <span class="o">=</span> <span class="n">gettok</span><span class="p">();</span>
+<span class="p">}</span>
+
+<span class="c1">/// BinopPrecedence - This holds the precedence for each binary operator that is</span>
+<span class="c1">/// defined.</span>
+<span class="k">static</span> <span class="n">std</span><span class="o">::</span><span class="n">map</span><span class="o"><</span><span class="kt">char</span><span class="p">,</span> <span class="kt">int</span><span class="o">></span> <span class="n">BinopPrecedence</span><span class="p">;</span>
+
+<span class="c1">/// GetTokPrecedence - Get the precedence of the pending binary operator token.</span>
+<span class="k">static</span> <span class="kt">int</span> <span class="nf">GetTokPrecedence</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">isascii</span><span class="p">(</span><span class="n">CurTok</span><span class="p">))</span>
+    <span class="k">return</span> <span class="o">-</span><span class="mi">1</span><span class="p">;</span>
+  
+  <span class="c1">// Make sure it's a declared binop.</span>
+  <span class="kt">int</span> <span class="n">TokPrec</span> <span class="o">=</span> <span class="n">BinopPrecedence</span><span class="p">[</span><span class="n">CurTok</span><span class="p">];</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">TokPrec</span> <span class="o"><=</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="o">-</span><span class="mi">1</span><span class="p">;</span>
+  <span class="k">return</span> <span class="n">TokPrec</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="c1">/// Error* - These are little helper functions for error handling.</span>
+<span class="n">ExprAST</span> <span class="o">*</span><span class="nf">Error</span><span class="p">(</span><span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">Str</span><span class="p">)</span> <span class="p">{</span> <span class="n">fprintf</span><span class="p">(</span><span class="n">stderr</span><span class="p">,</span> <span class="s">"Error: %s</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="n">Str</span><span class="p">);</span><span class="k">return</span> <span class="mi">0</span><span class="p">;}</span>
+<span class="n">PrototypeAST</span> <span class="o">*</span><span class="nf">ErrorP</span><span class="p">(</span><span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">Str</span><span class="p">)</span> <span class="p">{</span> <span class="n">Error</span><span class="p">(</span><span class="n">Str</span><span class="p">);</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span> <span class="p">}</span>
+<span class="n">FunctionAST</span> <span class="o">*</span><span class="nf">ErrorF</span><span class="p">(</span><span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">Str</span><span class="p">)</span> <span class="p">{</span> <span class="n">Error</span><span class="p">(</span><span class="n">Str</span><span class="p">);</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span> <span class="p">}</span>
+
+<span class="k">static</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="nf">ParseExpression</span><span class="p">();</span>
+
+<span class="c1">/// identifierexpr</span>
+<span class="c1">///   ::= identifier</span>
+<span class="c1">///   ::= identifier '(' expression* ')'</span>
+<span class="k">static</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="nf">ParseIdentifierExpr</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">IdName</span> <span class="o">=</span> <span class="n">IdentifierStr</span><span class="p">;</span>
+  
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat identifier.</span>
+  
+  <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="sc">'('</span><span class="p">)</span> <span class="c1">// Simple variable ref.</span>
+    <span class="k">return</span> <span class="k">new</span> <span class="n">VariableExprAST</span><span class="p">(</span><span class="n">IdName</span><span class="p">);</span>
+  
+  <span class="c1">// Call.</span>
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat (</span>
+  <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">ExprAST</span><span class="o">*></span> <span class="n">Args</span><span class="p">;</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="sc">')'</span><span class="p">)</span> <span class="p">{</span>
+    <span class="k">while</span> <span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="p">{</span>
+      <span class="n">ExprAST</span> <span class="o">*</span><span class="n">Arg</span> <span class="o">=</span> <span class="n">ParseExpression</span><span class="p">();</span>
+      <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">Arg</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+      <span class="n">Args</span><span class="p">.</span><span class="n">push_back</span><span class="p">(</span><span class="n">Arg</span><span class="p">);</span>
+
+      <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">==</span> <span class="sc">')'</span><span class="p">)</span> <span class="k">break</span><span class="p">;</span>
+
+      <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="sc">','</span><span class="p">)</span>
+        <span class="k">return</span> <span class="n">Error</span><span class="p">(</span><span class="s">"Expected ')' or ',' in argument list"</span><span class="p">);</span>
+      <span class="n">getNextToken</span><span class="p">();</span>
+    <span class="p">}</span>
+  <span class="p">}</span>
+
+  <span class="c1">// Eat the ')'.</span>
+  <span class="n">getNextToken</span><span class="p">();</span>
+  
+  <span class="k">return</span> <span class="k">new</span> <span class="n">CallExprAST</span><span class="p">(</span><span class="n">IdName</span><span class="p">,</span> <span class="n">Args</span><span class="p">);</span>
+<span class="p">}</span>
+
+<span class="c1">/// numberexpr ::= number</span>
+<span class="k">static</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="nf">ParseNumberExpr</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">ExprAST</span> <span class="o">*</span><span class="n">Result</span> <span class="o">=</span> <span class="k">new</span> <span class="n">NumberExprAST</span><span class="p">(</span><span class="n">NumVal</span><span class="p">);</span>
+  <span class="n">getNextToken</span><span class="p">();</span> <span class="c1">// consume the number</span>
+  <span class="k">return</span> <span class="n">Result</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="c1">/// parenexpr ::= '(' expression ')'</span>
+<span class="k">static</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="nf">ParseParenExpr</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat (.</span>
+  <span class="n">ExprAST</span> <span class="o">*</span><span class="n">V</span> <span class="o">=</span> <span class="n">ParseExpression</span><span class="p">();</span>
+  <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">V</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+  
+  <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="sc">')'</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">Error</span><span class="p">(</span><span class="s">"expected ')'"</span><span class="p">);</span>
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat ).</span>
+  <span class="k">return</span> <span class="n">V</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="c1">/// ifexpr ::= 'if' expression 'then' expression 'else' expression</span>
+<span class="k">static</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="nf">ParseIfExpr</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat the if.</span>
+  
+  <span class="c1">// condition.</span>
+  <span class="n">ExprAST</span> <span class="o">*</span><span class="n">Cond</span> <span class="o">=</span> <span class="n">ParseExpression</span><span class="p">();</span>
+  <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">Cond</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+  
+  <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="n">tok_then</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">Error</span><span class="p">(</span><span class="s">"expected then"</span><span class="p">);</span>
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat the then</span>
+  
+  <span class="n">ExprAST</span> <span class="o">*</span><span class="n">Then</span> <span class="o">=</span> <span class="n">ParseExpression</span><span class="p">();</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">Then</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+  
+  <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="n">tok_else</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">Error</span><span class="p">(</span><span class="s">"expected else"</span><span class="p">);</span>
+  
+  <span class="n">getNextToken</span><span class="p">();</span>
+  
+  <span class="n">ExprAST</span> <span class="o">*</span><span class="n">Else</span> <span class="o">=</span> <span class="n">ParseExpression</span><span class="p">();</span>
+  <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">Else</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+  
+  <span class="k">return</span> <span class="k">new</span> <span class="n">IfExprAST</span><span class="p">(</span><span class="n">Cond</span><span class="p">,</span> <span class="n">Then</span><span class="p">,</span> <span class="n">Else</span><span class="p">);</span>
+<span class="p">}</span>
+
+<span class="c1">/// forexpr ::= 'for' identifier '=' expr ',' expr (',' expr)? 'in' expression</span>
+<span class="k">static</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="nf">ParseForExpr</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat the for.</span>
+
+  <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="n">tok_identifier</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">Error</span><span class="p">(</span><span class="s">"expected identifier after for"</span><span class="p">);</span>
+  
+  <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">IdName</span> <span class="o">=</span> <span class="n">IdentifierStr</span><span class="p">;</span>
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat identifier.</span>
+  
+  <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="sc">'='</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">Error</span><span class="p">(</span><span class="s">"expected '=' after for"</span><span class="p">);</span>
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat '='.</span>
+  
+  
+  <span class="n">ExprAST</span> <span class="o">*</span><span class="n">Start</span> <span class="o">=</span> <span class="n">ParseExpression</span><span class="p">();</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">Start</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="sc">','</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">Error</span><span class="p">(</span><span class="s">"expected ',' after for start value"</span><span class="p">);</span>
+  <span class="n">getNextToken</span><span class="p">();</span>
+  
+  <span class="n">ExprAST</span> <span class="o">*</span><span class="n">End</span> <span class="o">=</span> <span class="n">ParseExpression</span><span class="p">();</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">End</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+  
+  <span class="c1">// The step value is optional.</span>
+  <span class="n">ExprAST</span> <span class="o">*</span><span class="n">Step</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">==</span> <span class="sc">','</span><span class="p">)</span> <span class="p">{</span>
+    <span class="n">getNextToken</span><span class="p">();</span>
+    <span class="n">Step</span> <span class="o">=</span> <span class="n">ParseExpression</span><span class="p">();</span>
+    <span class="k">if</span> <span class="p">(</span><span class="n">Step</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+  <span class="p">}</span>
+  
+  <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="n">tok_in</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">Error</span><span class="p">(</span><span class="s">"expected 'in' after for"</span><span class="p">);</span>
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat 'in'.</span>
+  
+  <span class="n">ExprAST</span> <span class="o">*</span><span class="n">Body</span> <span class="o">=</span> <span class="n">ParseExpression</span><span class="p">();</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">Body</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+
+  <span class="k">return</span> <span class="k">new</span> <span class="n">ForExprAST</span><span class="p">(</span><span class="n">IdName</span><span class="p">,</span> <span class="n">Start</span><span class="p">,</span> <span class="n">End</span><span class="p">,</span> <span class="n">Step</span><span class="p">,</span> <span class="n">Body</span><span class="p">);</span>
+<span class="p">}</span>
+
+<span class="c1">/// primary</span>
+<span class="c1">///   ::= identifierexpr</span>
+<span class="c1">///   ::= numberexpr</span>
+<span class="c1">///   ::= parenexpr</span>
+<span class="c1">///   ::= ifexpr</span>
+<span class="c1">///   ::= forexpr</span>
+<span class="k">static</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="nf">ParsePrimary</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">switch</span> <span class="p">(</span><span class="n">CurTok</span><span class="p">)</span> <span class="p">{</span>
+  <span class="nl">default:</span> <span class="k">return</span> <span class="n">Error</span><span class="p">(</span><span class="s">"unknown token when expecting an expression"</span><span class="p">);</span>
+  <span class="k">case</span> <span class="n">tok_identifier</span>: <span class="k">return</span> <span class="n">ParseIdentifierExpr</span><span class="p">();</span>
+  <span class="k">case</span> <span class="n">tok_number</span>:     <span class="k">return</span> <span class="n">ParseNumberExpr</span><span class="p">();</span>
+  <span class="k">case</span> <span class="sc">'('</span>:            <span class="k">return</span> <span class="n">ParseParenExpr</span><span class="p">();</span>
+  <span class="k">case</span> <span class="n">tok_if</span>:         <span class="k">return</span> <span class="n">ParseIfExpr</span><span class="p">();</span>
+  <span class="k">case</span> <span class="n">tok_for</span>:        <span class="k">return</span> <span class="n">ParseForExpr</span><span class="p">();</span>
+  <span class="p">}</span>
+<span class="p">}</span>
+
+<span class="c1">/// binoprhs</span>
+<span class="c1">///   ::= ('+' primary)*</span>
+<span class="k">static</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="nf">ParseBinOpRHS</span><span class="p">(</span><span class="kt">int</span> <span class="n">ExprPrec</span><span class="p">,</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="n">LHS</span><span class="p">)</span> <span class="p">{</span>
+  <span class="c1">// If this is a binop, find its precedence.</span>
+  <span class="k">while</span> <span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="p">{</span>
+    <span class="kt">int</span> <span class="n">TokPrec</span> <span class="o">=</span> <span class="n">GetTokPrecedence</span><span class="p">();</span>
+    
+    <span class="c1">// If this is a binop that binds at least as tightly as the current binop,</span>
+    <span class="c1">// consume it, otherwise we are done.</span>
+    <span class="k">if</span> <span class="p">(</span><span class="n">TokPrec</span> <span class="o"><</span> <span class="n">ExprPrec</span><span class="p">)</span>
+      <span class="k">return</span> <span class="n">LHS</span><span class="p">;</span>
+    
+    <span class="c1">// Okay, we know this is a binop.</span>
+    <span class="kt">int</span> <span class="n">BinOp</span> <span class="o">=</span> <span class="n">CurTok</span><span class="p">;</span>
+    <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat binop</span>
+    
+    <span class="c1">// Parse the primary expression after the binary operator.</span>
+    <span class="n">ExprAST</span> <span class="o">*</span><span class="n">RHS</span> <span class="o">=</span> <span class="n">ParsePrimary</span><span class="p">();</span>
+    <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">RHS</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+    
+    <span class="c1">// If BinOp binds less tightly with RHS than the operator after RHS, let</span>
+    <span class="c1">// the pending operator take RHS as its LHS.</span>
+    <span class="kt">int</span> <span class="n">NextPrec</span> <span class="o">=</span> <span class="n">GetTokPrecedence</span><span class="p">();</span>
+    <span class="k">if</span> <span class="p">(</span><span class="n">TokPrec</span> <span class="o"><</span> <span class="n">NextPrec</span><span class="p">)</span> <span class="p">{</span>
+      <span class="n">RHS</span> <span class="o">=</span> <span class="n">ParseBinOpRHS</span><span class="p">(</span><span class="n">TokPrec</span><span class="o">+</span><span class="mi">1</span><span class="p">,</span> <span class="n">RHS</span><span class="p">);</span>
+      <span class="k">if</span> <span class="p">(</span><span class="n">RHS</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+    <span class="p">}</span>
+    
+    <span class="c1">// Merge LHS/RHS.</span>
+    <span class="n">LHS</span> <span class="o">=</span> <span class="k">new</span> <span class="n">BinaryExprAST</span><span class="p">(</span><span class="n">BinOp</span><span class="p">,</span> <span class="n">LHS</span><span class="p">,</span> <span class="n">RHS</span><span class="p">);</span>
+  <span class="p">}</span>
+<span class="p">}</span>
+
+<span class="c1">/// expression</span>
+<span class="c1">///   ::= primary binoprhs</span>
+<span class="c1">///</span>
+<span class="k">static</span> <span class="n">ExprAST</span> <span class="o">*</span><span class="nf">ParseExpression</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">ExprAST</span> <span class="o">*</span><span class="n">LHS</span> <span class="o">=</span> <span class="n">ParsePrimary</span><span class="p">();</span>
+  <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">LHS</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+  
+  <span class="k">return</span> <span class="n">ParseBinOpRHS</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">LHS</span><span class="p">);</span>
+<span class="p">}</span>
+
+<span class="c1">/// prototype</span>
+<span class="c1">///   ::= id '(' id* ')'</span>
+<span class="k">static</span> <span class="n">PrototypeAST</span> <span class="o">*</span><span class="nf">ParsePrototype</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="n">tok_identifier</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">ErrorP</span><span class="p">(</span><span class="s">"Expected function name in prototype"</span><span class="p">);</span>
+
+  <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">FnName</span> <span class="o">=</span> <span class="n">IdentifierStr</span><span class="p">;</span>
+  <span class="n">getNextToken</span><span class="p">();</span>
+  
+  <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="sc">'('</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">ErrorP</span><span class="p">(</span><span class="s">"Expected '(' in prototype"</span><span class="p">);</span>
+  
+  <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">></span> <span class="n">ArgNames</span><span class="p">;</span>
+  <span class="k">while</span> <span class="p">(</span><span class="n">getNextToken</span><span class="p">()</span> <span class="o">==</span> <span class="n">tok_identifier</span><span class="p">)</span>
+    <span class="n">ArgNames</span><span class="p">.</span><span class="n">push_back</span><span class="p">(</span><span class="n">IdentifierStr</span><span class="p">);</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">CurTok</span> <span class="o">!=</span> <span class="sc">')'</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">ErrorP</span><span class="p">(</span><span class="s">"Expected ')' in prototype"</span><span class="p">);</span>
+  
+  <span class="c1">// success.</span>
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat ')'.</span>
+  
+  <span class="k">return</span> <span class="k">new</span> <span class="n">PrototypeAST</span><span class="p">(</span><span class="n">FnName</span><span class="p">,</span> <span class="n">ArgNames</span><span class="p">);</span>
+<span class="p">}</span>
+
+<span class="c1">/// definition ::= 'def' prototype expression</span>
+<span class="k">static</span> <span class="n">FunctionAST</span> <span class="o">*</span><span class="nf">ParseDefinition</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat def.</span>
+  <span class="n">PrototypeAST</span> <span class="o">*</span><span class="n">Proto</span> <span class="o">=</span> <span class="n">ParsePrototype</span><span class="p">();</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">Proto</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+
+  <span class="k">if</span> <span class="p">(</span><span class="n">ExprAST</span> <span class="o">*</span><span class="n">E</span> <span class="o">=</span> <span class="n">ParseExpression</span><span class="p">())</span>
+    <span class="k">return</span> <span class="k">new</span> <span class="n">FunctionAST</span><span class="p">(</span><span class="n">Proto</span><span class="p">,</span> <span class="n">E</span><span class="p">);</span>
+  <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="c1">/// toplevelexpr ::= expression</span>
+<span class="k">static</span> <span class="n">FunctionAST</span> <span class="o">*</span><span class="nf">ParseTopLevelExpr</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">ExprAST</span> <span class="o">*</span><span class="n">E</span> <span class="o">=</span> <span class="n">ParseExpression</span><span class="p">())</span> <span class="p">{</span>
+    <span class="c1">// Make an anonymous proto.</span>
+    <span class="n">PrototypeAST</span> <span class="o">*</span><span class="n">Proto</span> <span class="o">=</span> <span class="k">new</span> <span class="n">PrototypeAST</span><span class="p">(</span><span class="s">""</span><span class="p">,</span> <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">></span><span class="p">());</span>
+    <span class="k">return</span> <span class="k">new</span> <span class="n">FunctionAST</span><span class="p">(</span><span class="n">Proto</span><span class="p">,</span> <span class="n">E</span><span class="p">);</span>
+  <span class="p">}</span>
+  <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="c1">/// external ::= 'extern' prototype</span>
+<span class="k">static</span> <span class="n">PrototypeAST</span> <span class="o">*</span><span class="nf">ParseExtern</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">getNextToken</span><span class="p">();</span>  <span class="c1">// eat extern.</span>
+  <span class="k">return</span> <span class="n">ParsePrototype</span><span class="p">();</span>
+<span class="p">}</span>
+
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+<span class="c1">// Code Generation</span>
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+
+<span class="k">static</span> <span class="n">Module</span> <span class="o">*</span><span class="n">TheModule</span><span class="p">;</span>
+<span class="k">static</span> <span class="n">IRBuilder</span><span class="o"><></span> <span class="n">Builder</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">());</span>
+<span class="k">static</span> <span class="n">std</span><span class="o">::</span><span class="n">map</span><span class="o"><</span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="p">,</span> <span class="n">Value</span><span class="o">*></span> <span class="n">NamedValues</span><span class="p">;</span>
+<span class="k">static</span> <span class="n">FunctionPassManager</span> <span class="o">*</span><span class="n">TheFPM</span><span class="p">;</span>
+
+<span class="n">Value</span> <span class="o">*</span><span class="nf">ErrorV</span><span class="p">(</span><span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">Str</span><span class="p">)</span> <span class="p">{</span> <span class="n">Error</span><span class="p">(</span><span class="n">Str</span><span class="p">);</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span> <span class="p">}</span>
+
+<span class="n">Value</span> <span class="o">*</span><span class="n">NumberExprAST</span><span class="o">::</span><span class="n">Codegen</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">return</span> <span class="n">ConstantFP</span><span class="o">::</span><span class="n">get</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">(),</span> <span class="n">APFloat</span><span class="p">(</span><span class="n">Val</span><span class="p">));</span>
+<span class="p">}</span>
+
+<span class="n">Value</span> <span class="o">*</span><span class="n">VariableExprAST</span><span class="o">::</span><span class="n">Codegen</span><span class="p">()</span> <span class="p">{</span>
+  <span class="c1">// Look this variable up in the function.</span>
+  <span class="n">Value</span> <span class="o">*</span><span class="n">V</span> <span class="o">=</span> <span class="n">NamedValues</span><span class="p">[</span><span class="n">Name</span><span class="p">];</span>
+  <span class="k">return</span> <span class="n">V</span> <span class="o">?</span> <span class="n">V</span> <span class="o">:</span> <span class="n">ErrorV</span><span class="p">(</span><span class="s">"Unknown variable name"</span><span class="p">);</span>
+<span class="p">}</span>
+
+<span class="n">Value</span> <span class="o">*</span><span class="n">BinaryExprAST</span><span class="o">::</span><span class="n">Codegen</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">Value</span> <span class="o">*</span><span class="n">L</span> <span class="o">=</span> <span class="n">LHS</span><span class="o">-></span><span class="n">Codegen</span><span class="p">();</span>
+  <span class="n">Value</span> <span class="o">*</span><span class="n">R</span> <span class="o">=</span> <span class="n">RHS</span><span class="o">-></span><span class="n">Codegen</span><span class="p">();</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">L</span> <span class="o">==</span> <span class="mi">0</span> <span class="o">||</span> <span class="n">R</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+  
+  <span class="k">switch</span> <span class="p">(</span><span class="n">Op</span><span class="p">)</span> <span class="p">{</span>
+  <span class="k">case</span> <span class="sc">'+'</span>: <span class="k">return</span> <span class="n">Builder</span><span class="p">.</span><span class="n">CreateFAdd</span><span class="p">(</span><span class="n">L</span><span class="p">,</span> <span class="n">R</span><span class="p">,</span> <span class="s">"addtmp"</span><span class="p">);</span>
+  <span class="k">case</span> <span class="sc">'-'</span>: <span class="k">return</span> <span class="n">Builder</span><span class="p">.</span><span class="n">CreateFSub</span><span class="p">(</span><span class="n">L</span><span class="p">,</span> <span class="n">R</span><span class="p">,</span> <span class="s">"subtmp"</span><span class="p">);</span>
+  <span class="k">case</span> <span class="sc">'*'</span>: <span class="k">return</span> <span class="n">Builder</span><span class="p">.</span><span class="n">CreateFMul</span><span class="p">(</span><span class="n">L</span><span class="p">,</span> <span class="n">R</span><span class="p">,</span> <span class="s">"multmp"</span><span class="p">);</span>
+  <span class="k">case</span> <span class="sc">'<'</span>:
+    <span class="n">L</span> <span class="o">=</span> <span class="n">Builder</span><span class="p">.</span><span class="n">CreateFCmpULT</span><span class="p">(</span><span class="n">L</span><span class="p">,</span> <span class="n">R</span><span class="p">,</span> <span class="s">"cmptmp"</span><span class="p">);</span>
+    <span class="c1">// Convert bool 0/1 to double 0.0 or 1.0</span>
+    <span class="k">return</span> <span class="n">Builder</span><span class="p">.</span><span class="n">CreateUIToFP</span><span class="p">(</span><span class="n">L</span><span class="p">,</span> <span class="n">Type</span><span class="o">::</span><span class="n">getDoubleTy</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">()),</span>
+                                <span class="s">"booltmp"</span><span class="p">);</span>
+  <span class="nl">default:</span> <span class="k">return</span> <span class="nf">ErrorV</span><span class="p">(</span><span class="s">"invalid binary operator"</span><span class="p">);</span>
+  <span class="p">}</span>
+<span class="p">}</span>
+
+<span class="n">Value</span> <span class="o">*</span><span class="n">CallExprAST</span><span class="o">::</span><span class="n">Codegen</span><span class="p">()</span> <span class="p">{</span>
+  <span class="c1">// Look up the name in the global module table.</span>
+  <span class="n">Function</span> <span class="o">*</span><span class="n">CalleeF</span> <span class="o">=</span> <span class="n">TheModule</span><span class="o">-></span><span class="n">getFunction</span><span class="p">(</span><span class="n">Callee</span><span class="p">);</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">CalleeF</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">ErrorV</span><span class="p">(</span><span class="s">"Unknown function referenced"</span><span class="p">);</span>
+  
+  <span class="c1">// If argument mismatch error.</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">CalleeF</span><span class="o">-></span><span class="n">arg_size</span><span class="p">()</span> <span class="o">!=</span> <span class="n">Args</span><span class="p">.</span><span class="n">size</span><span class="p">())</span>
+    <span class="k">return</span> <span class="n">ErrorV</span><span class="p">(</span><span class="s">"Incorrect # arguments passed"</span><span class="p">);</span>
+
+  <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">Value</span><span class="o">*></span> <span class="n">ArgsV</span><span class="p">;</span>
+  <span class="k">for</span> <span class="p">(</span><span class="kt">unsigned</span> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> <span class="n">e</span> <span class="o">=</span> <span class="n">Args</span><span class="p">.</span><span class="n">size</span><span class="p">();</span> <span class="n">i</span> <span class="o">!=</span> <span class="n">e</span><span class="p">;</span> <span class="o">++</span><span class="n">i</span><span class="p">)</span> <span class="p">{</span>
+    <span class="n">ArgsV</span><span class="p">.</span><span class="n">push_back</span><span class="p">(</span><span class="n">Args</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">-></span><span class="n">Codegen</span><span class="p">());</span>
+    <span class="k">if</span> <span class="p">(</span><span class="n">ArgsV</span><span class="p">.</span><span class="n">back</span><span class="p">()</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+  <span class="p">}</span>
+  
+  <span class="k">return</span> <span class="n">Builder</span><span class="p">.</span><span class="n">CreateCall</span><span class="p">(</span><span class="n">CalleeF</span><span class="p">,</span> <span class="n">ArgsV</span><span class="p">,</span> <span class="s">"calltmp"</span><span class="p">);</span>
+<span class="p">}</span>
+
+<span class="n">Value</span> <span class="o">*</span><span class="n">IfExprAST</span><span class="o">::</span><span class="n">Codegen</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">Value</span> <span class="o">*</span><span class="n">CondV</span> <span class="o">=</span> <span class="n">Cond</span><span class="o">-></span><span class="n">Codegen</span><span class="p">();</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">CondV</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+  
+  <span class="c1">// Convert condition to a bool by comparing equal to 0.0.</span>
+  <span class="n">CondV</span> <span class="o">=</span> <span class="n">Builder</span><span class="p">.</span><span class="n">CreateFCmpONE</span><span class="p">(</span><span class="n">CondV</span><span class="p">,</span> 
+                              <span class="n">ConstantFP</span><span class="o">::</span><span class="n">get</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">(),</span> <span class="n">APFloat</span><span class="p">(</span><span class="mf">0.0</span><span class="p">)),</span>
+                                <span class="s">"ifcond"</span><span class="p">);</span>
+  
+  <span class="n">Function</span> <span class="o">*</span><span class="n">TheFunction</span> <span class="o">=</span> <span class="n">Builder</span><span class="p">.</span><span class="n">GetInsertBlock</span><span class="p">()</span><span class="o">-></span><span class="n">getParent</span><span class="p">();</span>
+  
+  <span class="c1">// Create blocks for the then and else cases.  Insert the 'then' block at the</span>
+  <span class="c1">// end of the function.</span>
+  <span class="n">BasicBlock</span> <span class="o">*</span><span class="n">ThenBB</span> <span class="o">=</span> <span class="n">BasicBlock</span><span class="o">::</span><span class="n">Create</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">(),</span> <span class="s">"then"</span><span class="p">,</span> <span class="n">TheFunction</span><span class="p">);</span>
+  <span class="n">BasicBlock</span> <span class="o">*</span><span class="n">ElseBB</span> <span class="o">=</span> <span class="n">BasicBlock</span><span class="o">::</span><span class="n">Create</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">(),</span> <span class="s">"else"</span><span class="p">);</span>
+  <span class="n">BasicBlock</span> <span class="o">*</span><span class="n">MergeBB</span> <span class="o">=</span> <span class="n">BasicBlock</span><span class="o">::</span><span class="n">Create</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">(),</span> <span class="s">"ifcont"</span><span class="p">);</span>
+  
+  <span class="n">Builder</span><span class="p">.</span><span class="n">CreateCondBr</span><span class="p">(</span><span class="n">CondV</span><span class="p">,</span> <span class="n">ThenBB</span><span class="p">,</span> <span class="n">ElseBB</span><span class="p">);</span>
+  
+  <span class="c1">// Emit then value.</span>
+  <span class="n">Builder</span><span class="p">.</span><span class="n">SetInsertPoint</span><span class="p">(</span><span class="n">ThenBB</span><span class="p">);</span>
+  
+  <span class="n">Value</span> <span class="o">*</span><span class="n">ThenV</span> <span class="o">=</span> <span class="n">Then</span><span class="o">-></span><span class="n">Codegen</span><span class="p">();</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">ThenV</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+  
+  <span class="n">Builder</span><span class="p">.</span><span class="n">CreateBr</span><span class="p">(</span><span class="n">MergeBB</span><span class="p">);</span>
+  <span class="c1">// Codegen of 'Then' can change the current block, update ThenBB for the PHI.</span>
+  <span class="n">ThenBB</span> <span class="o">=</span> <span class="n">Builder</span><span class="p">.</span><span class="n">GetInsertBlock</span><span class="p">();</span>
+  
+  <span class="c1">// Emit else block.</span>
+  <span class="n">TheFunction</span><span class="o">-></span><span class="n">getBasicBlockList</span><span class="p">().</span><span class="n">push_back</span><span class="p">(</span><span class="n">ElseBB</span><span class="p">);</span>
+  <span class="n">Builder</span><span class="p">.</span><span class="n">SetInsertPoint</span><span class="p">(</span><span class="n">ElseBB</span><span class="p">);</span>
+  
+  <span class="n">Value</span> <span class="o">*</span><span class="n">ElseV</span> <span class="o">=</span> <span class="n">Else</span><span class="o">-></span><span class="n">Codegen</span><span class="p">();</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">ElseV</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+  
+  <span class="n">Builder</span><span class="p">.</span><span class="n">CreateBr</span><span class="p">(</span><span class="n">MergeBB</span><span class="p">);</span>
+  <span class="c1">// Codegen of 'Else' can change the current block, update ElseBB for the PHI.</span>
+  <span class="n">ElseBB</span> <span class="o">=</span> <span class="n">Builder</span><span class="p">.</span><span class="n">GetInsertBlock</span><span class="p">();</span>
+  
+  <span class="c1">// Emit merge block.</span>
+  <span class="n">TheFunction</span><span class="o">-></span><span class="n">getBasicBlockList</span><span class="p">().</span><span class="n">push_back</span><span class="p">(</span><span class="n">MergeBB</span><span class="p">);</span>
+  <span class="n">Builder</span><span class="p">.</span><span class="n">SetInsertPoint</span><span class="p">(</span><span class="n">MergeBB</span><span class="p">);</span>
+  <span class="n">PHINode</span> <span class="o">*</span><span class="n">PN</span> <span class="o">=</span> <span class="n">Builder</span><span class="p">.</span><span class="n">CreatePHI</span><span class="p">(</span><span class="n">Type</span><span class="o">::</span><span class="n">getDoubleTy</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">()),</span> <span class="mi">2</span><span class="p">,</span>
+                                  <span class="s">"iftmp"</span><span class="p">);</span>
+  
+  <span class="n">PN</span><span class="o">-></span><span class="n">addIncoming</span><span class="p">(</span><span class="n">ThenV</span><span class="p">,</span> <span class="n">ThenBB</span><span class="p">);</span>
+  <span class="n">PN</span><span class="o">-></span><span class="n">addIncoming</span><span class="p">(</span><span class="n">ElseV</span><span class="p">,</span> <span class="n">ElseBB</span><span class="p">);</span>
+  <span class="k">return</span> <span class="n">PN</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="n">Value</span> <span class="o">*</span><span class="n">ForExprAST</span><span class="o">::</span><span class="n">Codegen</span><span class="p">()</span> <span class="p">{</span>
+  <span class="c1">// Output this as:</span>
+  <span class="c1">//   ...</span>
+  <span class="c1">//   start = startexpr</span>
+  <span class="c1">//   goto loop</span>
+  <span class="c1">// loop: </span>
+  <span class="c1">//   variable = phi [start, loopheader], [nextvariable, loopend]</span>
+  <span class="c1">//   ...</span>
+  <span class="c1">//   bodyexpr</span>
+  <span class="c1">//   ...</span>
+  <span class="c1">// loopend:</span>
+  <span class="c1">//   step = stepexpr</span>
+  <span class="c1">//   nextvariable = variable + step</span>
+  <span class="c1">//   endcond = endexpr</span>
+  <span class="c1">//   br endcond, loop, endloop</span>
+  <span class="c1">// outloop:</span>
+  
+  <span class="c1">// Emit the start code first, without 'variable' in scope.</span>
+  <span class="n">Value</span> <span class="o">*</span><span class="n">StartVal</span> <span class="o">=</span> <span class="n">Start</span><span class="o">-></span><span class="n">Codegen</span><span class="p">();</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">StartVal</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+  
+  <span class="c1">// Make the new basic block for the loop header, inserting after current</span>
+  <span class="c1">// block.</span>
+  <span class="n">Function</span> <span class="o">*</span><span class="n">TheFunction</span> <span class="o">=</span> <span class="n">Builder</span><span class="p">.</span><span class="n">GetInsertBlock</span><span class="p">()</span><span class="o">-></span><span class="n">getParent</span><span class="p">();</span>
+  <span class="n">BasicBlock</span> <span class="o">*</span><span class="n">PreheaderBB</span> <span class="o">=</span> <span class="n">Builder</span><span class="p">.</span><span class="n">GetInsertBlock</span><span class="p">();</span>
+  <span class="n">BasicBlock</span> <span class="o">*</span><span class="n">LoopBB</span> <span class="o">=</span> <span class="n">BasicBlock</span><span class="o">::</span><span class="n">Create</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">(),</span> <span class="s">"loop"</span><span class="p">,</span> <span class="n">TheFunction</span><span class="p">);</span>
+  
+  <span class="c1">// Insert an explicit fall through from the current block to the LoopBB.</span>
+  <span class="n">Builder</span><span class="p">.</span><span class="n">CreateBr</span><span class="p">(</span><span class="n">LoopBB</span><span class="p">);</span>
+
+  <span class="c1">// Start insertion in LoopBB.</span>
+  <span class="n">Builder</span><span class="p">.</span><span class="n">SetInsertPoint</span><span class="p">(</span><span class="n">LoopBB</span><span class="p">);</span>
+  
+  <span class="c1">// Start the PHI node with an entry for Start.</span>
+  <span class="n">PHINode</span> <span class="o">*</span><span class="n">Variable</span> <span class="o">=</span> <span class="n">Builder</span><span class="p">.</span><span class="n">CreatePHI</span><span class="p">(</span><span class="n">Type</span><span class="o">::</span><span class="n">getDoubleTy</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">()),</span> <span class="mi">2</span><span class="p">,</span> <span class="n">VarName</span><span class="p">.</span><span class="n">c_str</span><span class="p">());</span>
+  <span class="n">Variable</span><span class="o">-></span><span class="n">addIncoming</span><span class="p">(</span><span class="n">StartVal</span><span class="p">,</span> <span class="n">PreheaderBB</span><span class="p">);</span>
+  
+  <span class="c1">// Within the loop, the variable is defined equal to the PHI node.  If it</span>
+  <span class="c1">// shadows an existing variable, we have to restore it, so save it now.</span>
+  <span class="n">Value</span> <span class="o">*</span><span class="n">OldVal</span> <span class="o">=</span> <span class="n">NamedValues</span><span class="p">[</span><span class="n">VarName</span><span class="p">];</span>
+  <span class="n">NamedValues</span><span class="p">[</span><span class="n">VarName</span><span class="p">]</span> <span class="o">=</span> <span class="n">Variable</span><span class="p">;</span>
+  
+  <span class="c1">// Emit the body of the loop.  This, like any other expr, can change the</span>
+  <span class="c1">// current BB.  Note that we ignore the value computed by the body, but don't</span>
+  <span class="c1">// allow an error.</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">Body</span><span class="o">-></span><span class="n">Codegen</span><span class="p">()</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span>
+    <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+  
+  <span class="c1">// Emit the step value.</span>
+  <span class="n">Value</span> <span class="o">*</span><span class="n">StepVal</span><span class="p">;</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">Step</span><span class="p">)</span> <span class="p">{</span>
+    <span class="n">StepVal</span> <span class="o">=</span> <span class="n">Step</span><span class="o">-></span><span class="n">Codegen</span><span class="p">();</span>
+    <span class="k">if</span> <span class="p">(</span><span class="n">StepVal</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+  <span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
+    <span class="c1">// If not specified, use 1.0.</span>
+    <span class="n">StepVal</span> <span class="o">=</span> <span class="n">ConstantFP</span><span class="o">::</span><span class="n">get</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">(),</span> <span class="n">APFloat</span><span class="p">(</span><span class="mf">1.0</span><span class="p">));</span>
+  <span class="p">}</span>
+  
+  <span class="n">Value</span> <span class="o">*</span><span class="n">NextVar</span> <span class="o">=</span> <span class="n">Builder</span><span class="p">.</span><span class="n">CreateFAdd</span><span class="p">(</span><span class="n">Variable</span><span class="p">,</span> <span class="n">StepVal</span><span class="p">,</span> <span class="s">"nextvar"</span><span class="p">);</span>
+
+  <span class="c1">// Compute the end condition.</span>
+  <span class="n">Value</span> <span class="o">*</span><span class="n">EndCond</span> <span class="o">=</span> <span class="n">End</span><span class="o">-></span><span class="n">Codegen</span><span class="p">();</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">EndCond</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="n">EndCond</span><span class="p">;</span>
+  
+  <span class="c1">// Convert condition to a bool by comparing equal to 0.0.</span>
+  <span class="n">EndCond</span> <span class="o">=</span> <span class="n">Builder</span><span class="p">.</span><span class="n">CreateFCmpONE</span><span class="p">(</span><span class="n">EndCond</span><span class="p">,</span> 
+                              <span class="n">ConstantFP</span><span class="o">::</span><span class="n">get</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">(),</span> <span class="n">APFloat</span><span class="p">(</span><span class="mf">0.0</span><span class="p">)),</span>
+                                  <span class="s">"loopcond"</span><span class="p">);</span>
+  
+  <span class="c1">// Create the "after loop" block and insert it.</span>
+  <span class="n">BasicBlock</span> <span class="o">*</span><span class="n">LoopEndBB</span> <span class="o">=</span> <span class="n">Builder</span><span class="p">.</span><span class="n">GetInsertBlock</span><span class="p">();</span>
+  <span class="n">BasicBlock</span> <span class="o">*</span><span class="n">AfterBB</span> <span class="o">=</span> <span class="n">BasicBlock</span><span class="o">::</span><span class="n">Create</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">(),</span> <span class="s">"afterloop"</span><span class="p">,</span> <span class="n">TheFunction</span><span class="p">);</span>
+  
+  <span class="c1">// Insert the conditional branch into the end of LoopEndBB.</span>
+  <span class="n">Builder</span><span class="p">.</span><span class="n">CreateCondBr</span><span class="p">(</span><span class="n">EndCond</span><span class="p">,</span> <span class="n">LoopBB</span><span class="p">,</span> <span class="n">AfterBB</span><span class="p">);</span>
+  
+  <span class="c1">// Any new code will be inserted in AfterBB.</span>
+  <span class="n">Builder</span><span class="p">.</span><span class="n">SetInsertPoint</span><span class="p">(</span><span class="n">AfterBB</span><span class="p">);</span>
+  
+  <span class="c1">// Add a new entry to the PHI node for the backedge.</span>
+  <span class="n">Variable</span><span class="o">-></span><span class="n">addIncoming</span><span class="p">(</span><span class="n">NextVar</span><span class="p">,</span> <span class="n">LoopEndBB</span><span class="p">);</span>
+  
+  <span class="c1">// Restore the unshadowed variable.</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">OldVal</span><span class="p">)</span>
+    <span class="n">NamedValues</span><span class="p">[</span><span class="n">VarName</span><span class="p">]</span> <span class="o">=</span> <span class="n">OldVal</span><span class="p">;</span>
+  <span class="k">else</span>
+    <span class="n">NamedValues</span><span class="p">.</span><span class="n">erase</span><span class="p">(</span><span class="n">VarName</span><span class="p">);</span>
+
+  
+  <span class="c1">// for expr always returns 0.0.</span>
+  <span class="k">return</span> <span class="n">Constant</span><span class="o">::</span><span class="n">getNullValue</span><span class="p">(</span><span class="n">Type</span><span class="o">::</span><span class="n">getDoubleTy</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">()));</span>
+<span class="p">}</span>
+
+<span class="n">Function</span> <span class="o">*</span><span class="n">PrototypeAST</span><span class="o">::</span><span class="n">Codegen</span><span class="p">()</span> <span class="p">{</span>
+  <span class="c1">// Make the function type:  double(double,double) etc.</span>
+  <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">Type</span><span class="o">*></span> <span class="n">Doubles</span><span class="p">(</span><span class="n">Args</span><span class="p">.</span><span class="n">size</span><span class="p">(),</span>
+                             <span class="n">Type</span><span class="o">::</span><span class="n">getDoubleTy</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">()));</span>
+  <span class="n">FunctionType</span> <span class="o">*</span><span class="n">FT</span> <span class="o">=</span> <span class="n">FunctionType</span><span class="o">::</span><span class="n">get</span><span class="p">(</span><span class="n">Type</span><span class="o">::</span><span class="n">getDoubleTy</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">()),</span>
+                                       <span class="n">Doubles</span><span class="p">,</span> <span class="nb">false</span><span class="p">);</span>
+  
+  <span class="n">Function</span> <span class="o">*</span><span class="n">F</span> <span class="o">=</span> <span class="n">Function</span><span class="o">::</span><span class="n">Create</span><span class="p">(</span><span class="n">FT</span><span class="p">,</span> <span class="n">Function</span><span class="o">::</span><span class="n">ExternalLinkage</span><span class="p">,</span> <span class="n">Name</span><span class="p">,</span> <span class="n">TheModule</span><span class="p">);</span>
+  
+  <span class="c1">// If F conflicted, there was already something named 'Name'.  If it has a</span>
+  <span class="c1">// body, don't allow redefinition or reextern.</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">F</span><span class="o">-></span><span class="n">getName</span><span class="p">()</span> <span class="o">!=</span> <span class="n">Name</span><span class="p">)</span> <span class="p">{</span>
+    <span class="c1">// Delete the one we just made and get the existing one.</span>
+    <span class="n">F</span><span class="o">-></span><span class="n">eraseFromParent</span><span class="p">();</span>
+    <span class="n">F</span> <span class="o">=</span> <span class="n">TheModule</span><span class="o">-></span><span class="n">getFunction</span><span class="p">(</span><span class="n">Name</span><span class="p">);</span>
+    
+    <span class="c1">// If F already has a body, reject this.</span>
+    <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">F</span><span class="o">-></span><span class="n">empty</span><span class="p">())</span> <span class="p">{</span>
+      <span class="n">ErrorF</span><span class="p">(</span><span class="s">"redefinition of function"</span><span class="p">);</span>
+      <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+    <span class="p">}</span>
+    
+    <span class="c1">// If F took a different number of args, reject.</span>
+    <span class="k">if</span> <span class="p">(</span><span class="n">F</span><span class="o">-></span><span class="n">arg_size</span><span class="p">()</span> <span class="o">!=</span> <span class="n">Args</span><span class="p">.</span><span class="n">size</span><span class="p">())</span> <span class="p">{</span>
+      <span class="n">ErrorF</span><span class="p">(</span><span class="s">"redefinition of function with different # args"</span><span class="p">);</span>
+      <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+    <span class="p">}</span>
+  <span class="p">}</span>
+  
+  <span class="c1">// Set names for all arguments.</span>
+  <span class="kt">unsigned</span> <span class="n">Idx</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+  <span class="k">for</span> <span class="p">(</span><span class="n">Function</span><span class="o">::</span><span class="n">arg_iterator</span> <span class="n">AI</span> <span class="o">=</span> <span class="n">F</span><span class="o">-></span><span class="n">arg_begin</span><span class="p">();</span> <span class="n">Idx</span> <span class="o">!=</span> <span class="n">Args</span><span class="p">.</span><span class="n">size</span><span class="p">();</span>
+       <span class="o">++</span><span class="n">AI</span><span class="p">,</span> <span class="o">++</span><span class="n">Idx</span><span class="p">)</span> <span class="p">{</span>
+    <span class="n">AI</span><span class="o">-></span><span class="n">setName</span><span class="p">(</span><span class="n">Args</span><span class="p">[</span><span class="n">Idx</span><span class="p">]);</span>
+    
+    <span class="c1">// Add arguments to variable symbol table.</span>
+    <span class="n">NamedValues</span><span class="p">[</span><span class="n">Args</span><span class="p">[</span><span class="n">Idx</span><span class="p">]]</span> <span class="o">=</span> <span class="n">AI</span><span class="p">;</span>
+  <span class="p">}</span>
+  
+  <span class="k">return</span> <span class="n">F</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="n">Function</span> <span class="o">*</span><span class="n">FunctionAST</span><span class="o">::</span><span class="n">Codegen</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">NamedValues</span><span class="p">.</span><span class="n">clear</span><span class="p">();</span>
+  
+  <span class="n">Function</span> <span class="o">*</span><span class="n">TheFunction</span> <span class="o">=</span> <span class="n">Proto</span><span class="o">-></span><span class="n">Codegen</span><span class="p">();</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">TheFunction</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span>
+    <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+  
+  <span class="c1">// Create a new basic block to start insertion into.</span>
+  <span class="n">BasicBlock</span> <span class="o">*</span><span class="n">BB</span> <span class="o">=</span> <span class="n">BasicBlock</span><span class="o">::</span><span class="n">Create</span><span class="p">(</span><span class="n">getGlobalContext</span><span class="p">(),</span> <span class="s">"entry"</span><span class="p">,</span> <span class="n">TheFunction</span><span class="p">);</span>
+  <span class="n">Builder</span><span class="p">.</span><span class="n">SetInsertPoint</span><span class="p">(</span><span class="n">BB</span><span class="p">);</span>
+  
+  <span class="k">if</span> <span class="p">(</span><span class="n">Value</span> <span class="o">*</span><span class="n">RetVal</span> <span class="o">=</span> <span class="n">Body</span><span class="o">-></span><span class="n">Codegen</span><span class="p">())</span> <span class="p">{</span>
+    <span class="c1">// Finish off the function.</span>
+    <span class="n">Builder</span><span class="p">.</span><span class="n">CreateRet</span><span class="p">(</span><span class="n">RetVal</span><span class="p">);</span>
+
+    <span class="c1">// Validate the generated code, checking for consistency.</span>
+    <span class="n">verifyFunction</span><span class="p">(</span><span class="o">*</span><span class="n">TheFunction</span><span class="p">);</span>
+
+    <span class="c1">// Optimize the function.</span>
+    <span class="n">TheFPM</span><span class="o">-></span><span class="n">run</span><span class="p">(</span><span class="o">*</span><span class="n">TheFunction</span><span class="p">);</span>
+    
+    <span class="k">return</span> <span class="n">TheFunction</span><span class="p">;</span>
+  <span class="p">}</span>
+  
+  <span class="c1">// Error reading body, remove function.</span>
+  <span class="n">TheFunction</span><span class="o">-></span><span class="n">eraseFromParent</span><span class="p">();</span>
+  <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+<span class="c1">// Top-Level parsing and JIT Driver</span>
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+
+<span class="k">static</span> <span class="n">ExecutionEngine</span> <span class="o">*</span><span class="n">TheExecutionEngine</span><span class="p">;</span>
+
+<span class="k">static</span> <span class="kt">void</span> <span class="nf">HandleDefinition</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">FunctionAST</span> <span class="o">*</span><span class="n">F</span> <span class="o">=</span> <span class="n">ParseDefinition</span><span class="p">())</span> <span class="p">{</span>
+    <span class="k">if</span> <span class="p">(</span><span class="n">Function</span> <span class="o">*</span><span class="n">LF</span> <span class="o">=</span> <span class="n">F</span><span class="o">-></span><span class="n">Codegen</span><span class="p">())</span> <span class="p">{</span>
+      <span class="n">fprintf</span><span class="p">(</span><span class="n">stderr</span><span class="p">,</span> <span class="s">"Read function definition:"</span><span class="p">);</span>
+      <span class="n">LF</span><span class="o">-></span><span class="n">dump</span><span class="p">();</span>
+    <span class="p">}</span>
+  <span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
+    <span class="c1">// Skip token for error recovery.</span>
+    <span class="n">getNextToken</span><span class="p">();</span>
+  <span class="p">}</span>
+<span class="p">}</span>
+
+<span class="k">static</span> <span class="kt">void</span> <span class="nf">HandleExtern</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">PrototypeAST</span> <span class="o">*</span><span class="n">P</span> <span class="o">=</span> <span class="n">ParseExtern</span><span class="p">())</span> <span class="p">{</span>
+    <span class="k">if</span> <span class="p">(</span><span class="n">Function</span> <span class="o">*</span><span class="n">F</span> <span class="o">=</span> <span class="n">P</span><span class="o">-></span><span class="n">Codegen</span><span class="p">())</span> <span class="p">{</span>
+      <span class="n">fprintf</span><span class="p">(</span><span class="n">stderr</span><span class="p">,</span> <span class="s">"Read extern: "</span><span class="p">);</span>
+      <span class="n">F</span><span class="o">-></span><span class="n">dump</span><span class="p">();</span>
+    <span class="p">}</span>
+  <span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
+    <span class="c1">// Skip token for error recovery.</span>
+    <span class="n">getNextToken</span><span class="p">();</span>
+  <span class="p">}</span>
+<span class="p">}</span>
+
+<span class="k">static</span> <span class="kt">void</span> <span class="nf">HandleTopLevelExpression</span><span class="p">()</span> <span class="p">{</span>
+  <span class="c1">// Evaluate a top-level expression into an anonymous function.</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">FunctionAST</span> <span class="o">*</span><span class="n">F</span> <span class="o">=</span> <span class="n">ParseTopLevelExpr</span><span class="p">())</span> <span class="p">{</span>
+    <span class="k">if</span> <span class="p">(</span><span class="n">Function</span> <span class="o">*</span><span class="n">LF</span> <span class="o">=</span> <span class="n">F</span><span class="o">-></span><span class="n">Codegen</span><span class="p">())</span> <span class="p">{</span>
+      <span class="c1">// JIT the function, returning a function pointer.</span>
+      <span class="kt">void</span> <span class="o">*</span><span class="n">FPtr</span> <span class="o">=</span> <span class="n">TheExecutionEngine</span><span class="o">-></span><span class="n">getPointerToFunction</span><span class="p">(</span><span class="n">LF</span><span class="p">);</span>
+      
+      <span class="c1">// Cast it to the right type (takes no arguments, returns a double) so we</span>
+      <span class="c1">// can call it as a native function.</span>
+      <span class="kt">double</span> <span class="p">(</span><span class="o">*</span><span class="n">FP</span><span class="p">)()</span> <span class="o">=</span> <span class="p">(</span><span class="kt">double</span> <span class="p">(</span><span class="o">*</span><span class="p">)())(</span><span class="kt">intptr_t</span><span class="p">)</span><span class="n">FPtr</span><span class="p">;</span>
+      <span class="n">fprintf</span><span class="p">(</span><span class="n">stderr</span><span class="p">,</span> <span class="s">"Evaluated to %f</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="n">FP</span><span class="p">());</span>
+    <span class="p">}</span>
+  <span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
+    <span class="c1">// Skip token for error recovery.</span>
+    <span class="n">getNextToken</span><span class="p">();</span>
+  <span class="p">}</span>
+<span class="p">}</span>
+
+<span class="c1">/// top ::= definition | external | expression | ';'</span>
+<span class="k">static</span> <span class="kt">void</span> <span class="nf">MainLoop</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">while</span> <span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="p">{</span>
+    <span class="n">fprintf</span><span class="p">(</span><span class="n">stderr</span><span class="p">,</span> <span class="s">"ready> "</span><span class="p">);</span>
+    <span class="k">switch</span> <span class="p">(</span><span class="n">CurTok</span><span class="p">)</span> <span class="p">{</span>
+    <span class="k">case</span> <span class="n">tok_eof</span>:    <span class="k">return</span><span class="p">;</span>
+    <span class="k">case</span> <span class="sc">';'</span>:        <span class="n">getNextToken</span><span class="p">();</span> <span class="k">break</span><span class="p">;</span>  <span class="c1">// ignore top-level semicolons.</span>
+    <span class="k">case</span> <span class="n">tok_def</span>:    <span class="n">HandleDefinition</span><span class="p">();</span> <span class="k">break</span><span class="p">;</span>
+    <span class="k">case</span> <span class="n">tok_extern</span>: <span class="n">HandleExtern</span><span class="p">();</span> <span class="k">break</span><span class="p">;</span>
+    <span class="nl">default:</span>         <span class="n">HandleTopLevelExpression</span><span class="p">();</span> <span class="k">break</span><span class="p">;</span>
+    <span class="p">}</span>
+  <span class="p">}</span>
+<span class="p">}</span>
+
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+<span class="c1">// "Library" functions that can be "extern'd" from user code.</span>
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+
+<span class="c1">/// putchard - putchar that takes a double and returns 0.</span>
+<span class="k">extern</span> <span class="s">"C"</span> 
+<span class="kt">double</span> <span class="n">putchard</span><span class="p">(</span><span class="kt">double</span> <span class="n">X</span><span class="p">)</span> <span class="p">{</span>
+  <span class="n">putchar</span><span class="p">((</span><span class="kt">char</span><span class="p">)</span><span class="n">X</span><span class="p">);</span>
+  <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+<span class="c1">// Main driver code.</span>
+<span class="c1">//===----------------------------------------------------------------------===//</span>
+
+<span class="kt">int</span> <span class="n">main</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">InitializeNativeTarget</span><span class="p">();</span>
+  <span class="n">LLVMContext</span> <span class="o">&</span><span class="n">Context</span> <span class="o">=</span> <span class="n">getGlobalContext</span><span class="p">();</span>
+
+  <span class="c1">// Install standard binary operators.</span>
+  <span class="c1">// 1 is lowest precedence.</span>
+  <span class="n">BinopPrecedence</span><span class="p">[</span><span class="sc">'<'</span><span class="p">]</span> <span class="o">=</span> <span class="mi">10</span><span class="p">;</span>
+  <span class="n">BinopPrecedence</span><span class="p">[</span><span class="sc">'+'</span><span class="p">]</span> <span class="o">=</span> <span class="mi">20</span><span class="p">;</span>
+  <span class="n">BinopPrecedence</span><span class="p">[</span><span class="sc">'-'</span><span class="p">]</span> <span class="o">=</span> <span class="mi">20</span><span class="p">;</span>
+  <span class="n">BinopPrecedence</span><span class="p">[</span><span class="sc">'*'</span><span class="p">]</span> <span class="o">=</span> <span class="mi">40</span><span class="p">;</span>  <span class="c1">// highest.</span>
+
+  <span class="c1">// Prime the first token.</span>
+  <span class="n">fprintf</span><span class="p">(</span><span class="n">stderr</span><span class="p">,</span> <span class="s">"ready> "</span><span class="p">);</span>
+  <span class="n">getNextToken</span><span class="p">();</span>
+
+  <span class="c1">// Make the module, which holds all the code.</span>
+  <span class="n">TheModule</span> <span class="o">=</span> <span class="k">new</span> <span class="n">Module</span><span class="p">(</span><span class="s">"my cool jit"</span><span class="p">,</span> <span class="n">Context</span><span class="p">);</span>
+
+  <span class="c1">// Create the JIT.  This takes ownership of the module.</span>
+  <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">ErrStr</span><span class="p">;</span>
+  <span class="n">TheExecutionEngine</span> <span class="o">=</span> <span class="n">EngineBuilder</span><span class="p">(</span><span class="n">TheModule</span><span class="p">).</span><span class="n">setErrorStr</span><span class="p">(</span><span class="o">&</span><span class="n">ErrStr</span><span class="p">).</span><span class="n">create</span><span class="p">();</span>
+  <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">TheExecutionEngine</span><span class="p">)</span> <span class="p">{</span>
+    <span class="n">fprintf</span><span class="p">(</span><span class="n">stderr</span><span class="p">,</span> <span class="s">"Could not create ExecutionEngine: %s</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="n">ErrStr</span><span class="p">.</span><span class="n">c_str</span><span class="p">());</span>
+    <span class="n">exit</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span>
+  <span class="p">}</span>
+
+  <span class="n">FunctionPassManager</span> <span class="n">OurFPM</span><span class="p">(</span><span class="n">TheModule</span><span class="p">);</span>
+
+  <span class="c1">// Set up the optimizer pipeline.  Start with registering info about how the</span>
+  <span class="c1">// target lays out data structures.</span>
+  <span class="n">OurFPM</span><span class="p">.</span><span class="n">add</span><span class="p">(</span><span class="k">new</span> <span class="n">DataLayout</span><span class="p">(</span><span class="o">*</span><span class="n">TheExecutionEngine</span><span class="o">-></span><span class="n">getDataLayout</span><span class="p">()));</span>
+  <span class="c1">// Provide basic AliasAnalysis support for GVN.</span>
+  <span class="n">OurFPM</span><span class="p">.</span><span class="n">add</span><span class="p">(</span><span class="n">createBasicAliasAnalysisPass</span><span class="p">());</span>
+  <span class="c1">// Do simple "peephole" optimizations and bit-twiddling optzns.</span>
+  <span class="n">OurFPM</span><span class="p">.</span><span class="n">add</span><span class="p">(</span><span class="n">createInstructionCombiningPass</span><span class="p">());</span>
+  <span class="c1">// Reassociate expressions.</span>
+  <span class="n">OurFPM</span><span class="p">.</span><span class="n">add</span><span class="p">(</span><span class="n">createReassociatePass</span><span class="p">());</span>
+  <span class="c1">// Eliminate Common SubExpressions.</span>
+  <span class="n">OurFPM</span><span class="p">.</span><span class="n">add</span><span class="p">(</span><span class="n">createGVNPass</span><span class="p">());</span>
+  <span class="c1">// Simplify the control flow graph (deleting unreachable blocks, etc).</span>
+  <span class="n">OurFPM</span><span class="p">.</span><span class="n">add</span><span class="p">(</span><span class="n">createCFGSimplificationPass</span><span class="p">());</span>
+
+  <span class="n">OurFPM</span><span class="p">.</span><span class="n">doInitialization</span><span class="p">();</span>
+
+  <span class="c1">// Set the global so the code gen can use this.</span>
+  <span class="n">TheFPM</span> <span class="o">=</span> <span class="o">&</span><span class="n">OurFPM</span><span class="p">;</span>
+
+  <span class="c1">// Run the main "interpreter loop" now.</span>
+  <span class="n">MainLoop</span><span class="p">();</span>
+
+  <span class="n">TheFPM</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+
+  <span class="c1">// Print out all of the generated code.</span>
+  <span class="n">TheModule</span><span class="o">-></span><span class="n">dump</span><span class="p">();</span>
+
+  <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<p><a class="reference external" href="LangImpl6.html">Next: Extending the language: user-defined operators</a></p>
+</div>
+</div>
+
+
+          </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="LangImpl6.html" title="6. Kaleidoscope: Extending the Language: User-defined Operators"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="LangImpl4.html" title="4. Kaleidoscope: Adding JIT and Optimizer Support"
+             >previous</a> |</li>
+  <li><a href="http://llvm.org/">LLVM Home</a> | </li>
+  <li><a href="../index.html">Documentation</a>»</li>
+
+          <li><a href="index.html" >LLVM Tutorial: Table of Contents</a> »</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        © Copyright 2003-2013, LLVM Project.
+      Last updated on 2014-05-06.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
+    </div>
+  </body>
+</html>
\ No newline at end of file

Added: www-releases/trunk/3.4.1/docs/tutorial/LangImpl6.html
URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/3.4.1/docs/tutorial/LangImpl6.html?rev=208244&view=auto
==============================================================================
--- www-releases/trunk/3.4.1/docs/tutorial/LangImpl6.html (added)
+++ www-releases/trunk/3.4.1/docs/tutorial/LangImpl6.html Wed May  7 15:09:32 2014
@@ -0,0 +1,1769 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>6. Kaleidoscope: Extending the Language: User-defined Operators — LLVM 3.4 documentation</title>
+    
+    <link rel="stylesheet" href="../_static/llvm-theme.css" type="text/css" />
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '3.4',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../_static/jquery.js"></script>
+    <script type="text/javascript" src="../_static/underscore.js"></script>
+    <script type="text/javascript" src="../_static/doctools.js"></script>
+    <link rel="top" title="LLVM 3.4 documentation" href="../index.html" />
+    <link rel="up" title="LLVM Tutorial: Table of Contents" href="index.html" />
+    <link rel="next" title="7. Kaleidoscope: Extending the Language: Mutable Variables" href="LangImpl7.html" />
+    <link rel="prev" title="5. Kaleidoscope: Extending the Language: Control Flow" href="LangImpl5.html" />
+<style type="text/css">
+  table.right { float: right; margin-left: 20px; }
+  table.right td { border: 1px solid #ccc; }
+</style>
+
+  </head>
+  <body>
+<div class="logo">
+  <a href="../index.html">
+    <img src="../_static/logo.png"
+         alt="LLVM Logo" width="250" height="88"/></a>
+</div>
+
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="LangImpl7.html" title="7. Kaleidoscope: Extending the Language: Mutable Variables"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="LangImpl5.html" title="5. Kaleidoscope: Extending the Language: Control Flow"
+             accesskey="P">previous</a> |</li>
+  <li><a href="http://llvm.org/">LLVM Home</a> | </li>
+  <li><a href="../index.html">Documentation</a>»</li>
+
+          <li><a href="index.html" accesskey="U">LLVM Tutorial: Table of Contents</a> »</li> 
+      </ul>
+    </div>
+
+
+    <div class="document">
+      <div class="documentwrapper">
+          <div class="body">
+            
+  <div class="section" id="kaleidoscope-extending-the-language-user-defined-operators">
+<h1>6. Kaleidoscope: Extending the Language: User-defined Operators<a class="headerlink" href="#kaleidoscope-extending-the-language-user-defined-operators" title="Permalink to this headline">¶</a></h1>
+<div class="contents local topic" id="contents">
+<ul class="simple">
+<li><a class="reference internal" href="#chapter-6-introduction" id="id1">Chapter 6 Introduction</a></li>
+<li><a class="reference internal" href="#user-defined