You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
This blog post is part of a series of blog posts from students who were funded by the LLVM Foundation to attend the 2016 LLVM Developers' Meeting in San Jose, CA. Please visit the LLVM Foundation's webpage for more information on our Travel Grants program. This post is from Piotr Padlewski on his work that he presented at the meeting: This blogpost will show how C++ devirtualization is performed i
本連載は、はてなエンジニアが、はてなのサービスを支えている技術や日頃注目している技術について解説するものです。Appleは毎年WWDCでいくつもの新規技術を発表していますが、筆者はその中でもObjective-Cの進化に特に注目していました。新たに追加されるAPIやサービスの前では、Objective-Cの進化はあまり注目されてきませんでしたが、実はここ数年の間も進化し続けていました。これにはAppleがコンパイラ技術にコミットしてきたことが大きく影響しています。今回は、Appleのコンパイラ関連技術を振り返り、Swiftにどう繋がるのかを解説します。 はじめに SwiftはAppleによって開発された全く新しいプログラミング言語です。WWDC 2014で稲妻のように現れたこのプログラミング言語は、またたく間に世界中のモバイルアプリ開発者の注目を集めました。 Swiftは衝撃的な登場だった
H2Oの内部では,数値,文字列のフォーマッタとしてsprintfが用いられています. 我々は,最近までsprintf専用ソースコード変換器, qrintfのチューニングを行っていました. 本稿ではqrintfの概要と今回適応した工夫,そして今後の課題についてまとめておきます. 1. qrintfとは? qrintfとはCコンパイラの1つであるgccのプリプロセッサのラッパーであり,snprintfを高速化するソースコード変換器です. 本稿執筆時点でのqrintfの変換対象はsprintfとsnprintfです.以下本文中では特にことわりのない限りsprintfと記述した場合sprintf, snprintfの両方を指します. qrintfはソースコードに出現するsprintfで利用するフォーマット文字列を解析し,型ごとに用意された関数呼出にコードを書き換えsprintfの高速化を行います.
[Phoronix] LLVM/Clang 3.3 Should Be Close To Building Linux Kernel LLVMLinux Bug 9254 – clang can't build iptables in Linux kernel: error: fields must have a constant size: 'variable length array in structure' extension will never be supported ClangでLinuxカーネルをビルドできる状況は、多くの勢力に望まれてきた。理由は様々だ。Clangはビルド時間が短い。静的解析による警告も優れている。ソースコードも綺麗だ。複数の独立した実装でコンパイルできるコードは、誤りを静的に発見しやすい移植性にも優れる。より優れたコピーレフトなライセンスであるGPLv
Clang/LLVM(Low Level Virtual Machine)とは、CやObjective-Cなどのコンピュータ言語のコンパイラ環境です。 最近ではiOSやMac OS X、FreeBSDなどのOSでは、デファクトスタンダードであったGCC(GNUコンパイラコレクション)からLLVM/Clangへの置き換えが進みつつあります。 本書では、Clang/LLVMの仕組みと使い方(カスタマイズ法など)、Clang/LLVM独自のライブラリの使い方などについて詳細な解説を行っています。 はじめに CHAPTER 1 LLVMとは 1 LLVMの概要 2 コンパイラの仕組み 3 特徴 4 対応プラットフォーム 5 LLVMプロジェクトの一覧 6 ライセンス CHAPTER 2 セットアップ 1 ビルド環境の準備 2 ソースコードを取得する 3 makeでビルドする 4 CMakeでビルド
Written by Mattt June 16th, 2014 This article has been translated into: 中文 Diagnostics combine logic with analytics to arrive at a conclusion. It’s science and engineering at their purest. It’s human reasoning at its most potent. Within the medical profession, a diagnosis is made through instinct backed by lab samples. For industrial manufacturing, one diagnoses a product fault through an equal ap
TranslationUnitDecl 0x1028218d0 <<invalid sloc>> |-TypedefDecl 0x102821dd0 <<invalid sloc>> __int128_t '__int128' |-TypedefDecl 0x102821e30 <<invalid sloc>> __uint128_t 'unsigned __int128' |-TypedefDecl 0x102821ec0 <<invalid sloc>> SEL 'SEL *' |-TypedefDecl 0x102821f90 <<invalid sloc>> id 'id' |-TypedefDecl 0x102822060 <<invalid sloc>> Class 'Class *' ...(省略)... | `-ParmVarDecl 0x1053064c0 <col:30
Introduction to the Clang AST¶ This document gives a gentle introduction to the mysteries of the Clang AST. It is targeted at developers who either want to contribute to Clang, or use tools that work based on Clang’s AST, like the AST matchers. Slides Introduction¶ Clang’s AST is different from ASTs produced by some other compilers in that it closely resembles both the written C++ code and the C++
I don’t remember where I first saw this mentioned so I cannot give proper credit but this is an interesting tip to try if you have five minutes. Open Source Builds of the Clang Analyzer The Clang Static Analyzer has long been integrated with Xcode and provides powerful source code analysis to detect bugs in C, C++ and Objective-C code. The analyzer is fully open source and part of the larger Clang
Introduction¶ This document describes the language extensions provided by Clang. In addition to the language extensions listed here, Clang aims to support a broad range of GCC extensions. Please see the GCC manual for more information on these extensions. Feature Checking Macros¶ Language extensions can be very useful, but only if you know you can depend on them. In order to allow fine-grain featu
This plugin use clang for accurately completing C, C++, Objective-C and Objective-C++ code. You don't need any ctags for it to work! Only clang is needed. Clang version 2.8 or higher is recommended for c++ completion. After a . , -> and :: it is automatically trying to complete the code. If you want to "force" the completion, use <C-X><C-U> which is the mapping for user defined completion. Because
ClangFormat¶ ClangFormat describes a set of tools that are built on top of LibFormat. It can support your workflow in a variety of ways including a standalone tool and editor integrations. Standalone Tool¶ clang-format is located in clang/tools/clang-format and can be used to format C/C++/Java/JavaScript/JSON/Objective-C/Protobuf/C# code. $ clang-format --help OVERVIEW: A tool to format C/C++/Java
先日llvm 3.3がリリースされました。aarch64(arm 64bit)のコードが生成できるようになったということなので、ソースからビルドして遊んでいたのですが、さりげなく凄く最適化されたコードが生成されているのに気がつきました。aarch64だと今は実行して確認できる環境が手元に無いので、普通のarmv7-aで同じことを試しました。 ここで使ったコードとその結果はgistに貼りました。 https://gist.github.com/tetsu-koba/5835724 ソースコード int sum(int x) { int sum = 0; int i; for (i = 1; i <= x; i++) { sum += i; } return sum; } 1からnまでの総和を求める関数です。1から100までの総和が5050なのはガウス少年の逸話で有名ですね。 gcc 4.8.
最近LLVMについて調べてみたのでまとめてみる。自分はコンパイラの専門家でも何でもないので間違った内容があるかもしれない。GCCとコンパイラの仕組みLLVMの前にまずはコンパイラ一般の話。コンパイラはまずソースコードを解析して内部表現にする。これはたいていツリー構造となる。このツリー構造のデータに対して文法チェックを行ったり最適化処理を行ったりした後に、オブジェクトファイルを生成する。コンパイラの内部表現だが、実際には複数の種類の内部表現を使っていることが多いらしく、GCCもそのようになっている([1]の図3)。これによるとまずはその言語固有のツリーにするようだ(C trees, C++ treesなど)。これをGENERICという形式にする。GENERICは名前のとおり言語に依存しない一般的な形式で、どの言語の場合も一度GENERICにする。GENERICはその後さらにGIMPLEという
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く