Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ cat add.c
- #include <stdint.h>
- uint16_t add(uint16_t a, uint16_t b) {
- return a+b;
- }
- $ clang-7 -S -emit-llvm add.c -o - |opt-7 -O2 -S
- ; ModuleID = '<stdin>'
- source_filename = "add.c"
- target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
- target triple = "x86_64-pc-linux-gnu"
- ; Function Attrs: noinline nounwind optnone uwtable
- }
- attributes #0 = { noinline nounwind optnone uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
- !llvm.module.flags = !{!0}
- !llvm.ident = !{!1}
- !1 = !{!"clang version 7.0.0-5 (tags/RELEASE_700/final)"}
- $ clang-7 -S -emit-llvm add.c -o - |clang-7 -O2 -S -emit-llvm -o - -x ir -
- ; ModuleID = '<stdin>'
- source_filename = "add.c"
- target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
- target triple = "x86_64-pc-linux-gnu"
- ; Function Attrs: noinline nounwind optnone uwtable
- }
- attributes #0 = { noinline nounwind optnone uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
- !llvm.module.flags = !{!0}
- !llvm.ident = !{!1}
- !1 = !{!"clang version 7.0.0-5 (tags/RELEASE_700/final)"}
- $ clang-7 -S -emit-llvm add.c -O2 -o -
- ; ModuleID = 'add.c'
- source_filename = "add.c"
- target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
- target triple = "x86_64-pc-linux-gnu"
- ; Function Attrs: norecurse nounwind readnone uwtable
- }
- attributes #0 = { norecurse nounwind readnone uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
- !llvm.module.flags = !{!0}
- !llvm.ident = !{!1}
- !1 = !{!"clang version 7.0.0-5 (tags/RELEASE_700/final)"}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement