{"id":2961,"date":"2013-08-27T12:48:13","date_gmt":"2013-08-27T03:48:13","guid":{"rendered":"http:\/\/peta.okechan.net\/blog\/?p=2961"},"modified":"2013-08-27T12:48:13","modified_gmt":"2013-08-27T03:48:13","slug":"4-5-%e5%85%a8%e3%82%b3%e3%83%bc%e3%83%89","status":"publish","type":"post","link":"https:\/\/peta.okechan.net\/blog\/archives\/2961","title":{"rendered":"4.5. \u5168\u30b3\u30fc\u30c9"},"content":{"rendered":"<p><a href=\"https:\/\/peta.okechan.net\/blog\/archives\/2836\" title=\"LLVM\u306b\u3088\u308b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u306e\u5b9f\u88c5\">LLVM\u306b\u3088\u308b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u306e\u5b9f\u88c5\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u65e5\u672c\u8a9e\u8a33<\/a><br \/>\n\u7b2c4\u7ae0 \u4e07\u83ef\u93e1: JIT\u306e\u8ffd\u52a0\u3068\u6700\u9069\u5316\u306e\u30b5\u30dd\u30fc\u30c8<br \/>\n<a href=\"http:\/\/llvm.org\/docs\/tutorial\/LangImpl04.html#full-code-listing\" target=\"_blank\">\u7b2c5\u7bc0 \u5168\u30b3\u30fc\u30c9<\/a><\/p>\n<p>\u3053\u308c\u304c\u3001\u6211\u3005\u304c\u4f8b\u3067\u7528\u3044\u305f\u3001&#8221;LLVM JIT\u3068\u6700\u9069\u5316\u6a5f\u80fd\u306b\u3088\u3063\u3066\u78e8\u304d\u3092\u639b\u3051\u305f\u30b3\u30fc\u30c9&#8221;\u306e\u5b8c\u5168\u306a\u30ea\u30b9\u30c8\u3067\u3042\u308b\u3002<br \/>\n\u3053\u308c\u3092\u30d3\u30eb\u30c9\u3059\u308b\u306b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3059\u308b\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\"># \u30b3\u30f3\u30d1\u30a4\u30eb\r\nclang++ -g toy.cpp `llvm-config --cppflags --ldflags --libs core jit native` -O3 -o toy\r\n# \u5b9f\u884c\r\n.\/toy<\/pre>\n<p>Linux\u4e0a\u3067\u30b3\u30f3\u30d1\u30a4\u30eb\u3059\u308b\u5834\u5408\u306f\u3001-rdynamic\u30aa\u30d7\u30b7\u30e7\u30f3\u3082\u3064\u3051\u5fd8\u308c\u306a\u3044\u3088\u3046\u306b\u3059\u3079\u3057\u3002<br \/>\n\u3053\u308c\u306b\u3088\u3063\u3066\u3001\u5916\u90e8\u95a2\u6570\u306f\u5b9f\u884c\u6642\u306b\u9069\u5207\u306b\u89e3\u6c7a\u3055\u308c\u308b\u3002<\/p>\n<p>\u4ee5\u4e0b\u30b3\u30fc\u30c9\u3002<br \/>\n<em>\u8a33\u6ce8: <a href=\"http:\/\/llvm.org\/docs\/tutorial\/LangImpl04.html#full-code-listing\" target=\"_blank\">\u30b3\u30fc\u30c9\u306b\u3064\u3044\u3066\u306f\u539f\u6587\u3092\u53c2\u7167\u3055\u308c\u305f\u3057\u3002<\/a><\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p><a href=\"https:\/\/peta.okechan.net\/blog\/archives\/2836\" title=\"LLVM\u306b\u3088\u308b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u306e\u5b9f\u88c5\">LLVM\u306b\u3088\u308b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u306e\u5b9f\u88c5\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u65e5\u672c\u8a9e\u8a33<\/a><br \/>\n\u7b2c4\u7ae0 \u4e07\u83ef\u93e1: JIT\u306e\u8ffd\u52a0\u3068\u6700\u9069\u5316\u306e\u30b5\u30dd\u30fc\u30c8<br \/>\n<a href=\"http:\/\/llvm.org\/docs\/tutorial\/LangImpl04.html#full-code-listing\" target=\"_blank\">\u7b2c5\u7bc0 \u5168\u30b3\u30fc\u30c9<\/a><\/p>\n<p>\u3053\u308c\u304c\u3001\u6211\u3005\u304c\u4f8b\u3067\u7528\u3044\u305f\u3001&#8221;LLVM JIT\u3068\u6700\u9069\u5316\u6a5f\u80fd\u306b\u3088\u3063\u3066\u78e8\u304d\u3092\u639b\u3051\u305f\u30b3\u30fc\u30c9&#8221;\u306e\u5b8c\u5168\u306a\u30ea\u30b9\u30c8\u3067\u3042\u308b\u3002<br \/>\n\u3053\u308c\u3092\u30d3\u30eb\u30c9\u3059\u308b\u306b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3059\u308b\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\"># \u30b3\u30f3\u30d1\u30a4\u30eb\r\nclang++ -g toy.cpp `llvm-config --cppflags --ldflags --libs core jit native` -O3 -o toy\r\n# \u5b9f\u884c\r\n.\/toy<\/pre>\n<p>Linux\u4e0a\u3067\u30b3\u30f3\u30d1\u30a4\u30eb\u3059\u308b\u5834\u5408\u306f\u3001-rdynamic\u30aa\u30d7\u30b7\u30e7\u30f3\u3082\u3064\u3051\u5fd8\u308c\u306a\u3044\u3088\u3046\u306b\u3059\u3079\u3057\u3002<br \/>\n\u3053\u308c\u306b\u3088\u3063\u3066\u3001\u5916\u90e8\u95a2\u6570\u306f\u5b9f\u884c\u6642\u306b\u9069\u5207\u306b\u89e3\u6c7a\u3055\u308c\u308b\u3002<\/p>\n<p>\u4ee5\u4e0b\u30b3\u30fc\u30c9\u3002<br \/>\n<em>\u8a33\u6ce8: <a href=\"http:\/\/llvm.org\/docs\/tutorial\/LangImpl04.html#full-code-listing\" target=\"_blank\">\u30b3\u30fc\u30c9\u306b\u3064\u3044\u3066\u306f\u539f\u6587\u3092\u53c2\u7167\u3055\u308c\u305f\u3057\u3002<\/a><\/em><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[32],"tags":[466,467],"class_list":["post-2961","post","type-post","status-publish","format-standard","hentry","category-tech","tag-kaleidoscope","tag-llvm"],"_links":{"self":[{"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/posts\/2961","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/comments?post=2961"}],"version-history":[{"count":0,"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/posts\/2961\/revisions"}],"wp:attachment":[{"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/media?parent=2961"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/categories?post=2961"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/tags?post=2961"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}