LLVM is a robust system, particularly well suited for developing new mid-level language-independent analyses and optimizations.

11月6日から7日(米国時間)にかけてサンフランシスコで開催された「2013 LLVM Developers' Meeting」におけるプレゼンテーションのようすがサイトにアップロードされた。Sony Computer EntertainmentのPaul T. Robinson氏がPlayStation 4の開発環境について発表しており、コンパイラインフラストラクチャとしてLLVM Clangを採用していること、採用に至るまでの検討事項や、結果としてどのような利点が得られたかを説明している。

PlayStation 4の開発にはLLVM Clangが採用されている。ツールチェーンはWindows 7以降のオペレーティングシステムおよびVisual Studioで使用できるようになっており、開発からデバッグまでを統合的に実施できる。PlayStation 3まではGCCをベースとした開発環境が提供されてきたが、複数の理由からLLVM Clangへ移行したと説明されている。

LLVM Clang採用の当初の理由は純粋に技術的な要因ではなく、コミュニティなども含めた複数の理由があるとされている。採用後に得られた経験なども含めLLVM Clangの利点としてあげられているのは次のとおり。

  • コンパイル時間が短い
  • リンク時間が短い
  • 出力されるコンパイルエラーメッセージが理解しやすい
  • 出力されるコードの性能がよい
  • C++の標準規約に準拠している
  • LLVM Clangコミュニティの反応がよい

特に開発者からはGCC for PlayStation 3と比較してClang for PlayStation 4ではコンパイル時間やリンク時間がきわめて短くなったことが高く評価されている。SCEに限らずLLVM Clangを開発に採用している企業は自社の成果物をLLVM Clangの本体へマージしている。PlayStation 4ではオペレーティングシステムとしてFreeBSDを採用しているが、FreeBSDプロジェクトもFreeBSD 10.0からデフォルトのコンパイラをLLVM Clangへ変更しており、改善などの成果物をLLVM Clangプロジェクトへ提供している。

Developer Toolchain for the PlayStation4 - Paul T. Robinson, Sony Computer Entertainment Americaより抜粋

Developer Toolchain for the PlayStation4 - Paul T. Robinson, Sony Computer Entertainment Americaより抜粋

Developer Toolchain for the PlayStation4 - Paul T. Robinson, Sony Computer Entertainment Americaより抜粋

Developer Toolchain for the PlayStation4 - Paul T. Robinson, Sony Computer Entertainment Americaより抜粋

Developer Toolchain for the PlayStation4 - Paul T. Robinson, Sony Computer Entertainment Americaより抜粋

Developer Toolchain for the PlayStation4 - Paul T. Robinson, Sony Computer Entertainment Americaより抜粋

Developer Toolchain for the PlayStation4 - Paul T. Robinson, Sony Computer Entertainment Americaより抜粋

Developer Toolchain for the PlayStation4 - Paul T. Robinson, Sony Computer Entertainment Americaより抜粋