Upgrade to Pro — share decks privately, control downloads, hide ads and more …

LLVMやっていってる

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on.
Avatar for giginet giginet PRO
January 29, 2019

 LLVMやっていってる

Avatar for giginet

giginet PRO

January 29, 2019
Tweet

More Decks by giginet

Other Decks in Programming

Transcript

  1. ୭ • @giginet(Twi+er/GitHub) • ๺ւಓവؗࢢग़਎ • 2009/4 ๺ւಓେֶ޻ֶ෦ • 2013/4

    ๺ւಓେֶେֶӃɹ৘ใՊֶݚڀՊ • 2015/4 ΫοΫύουגࣜձࣾ৽ଔೖࣾ • ϞόΠϧج൫෦ͰiOSͷج൫։ൃ͍ͯ͠·͢ • झຯ͸ήʔϜ։ൃͰ͢ • ֶੜ࣌୅ͷࢥ͍ग़ɿ೑νϟʔɺδϯύɺ࣌ؗ 1
  2. ; ModuleID = 'hello.c' source_filename = "hello.c" target datalayout =

    "e-m:o-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-apple-macosx10.14.0" @.str = private unnamed_addr constant [12 x i8] c"Hello World\00", align 1 ; Function Attrs: noinline nounwind optnone ssp uwtable define i32 @main() #0 { %1 = alloca i32, align 4 store i32 0, i32* %1, align 4 %2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i32 0, i32 0)) ret i32 0 } declare i32 @printf(i8*, ...) #1 !llvm.module.flags = !{!0, !1} !llvm.ident = !{!2} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 7, !"PIC Level", i32 2} !2 = !{!"Apple LLVM version 10.0.0 (clang-1000.11.45.5)"} 10
  3. define double @test(double %x) { entry: %addtmp = fadd double

    2.000000e+00, 1.000000e+00 %addtmp1 = fadd double %addtmp, %x ret double %addtmp1 } 13