FreeBSD Daily Topics 2010å¹´4æ19æ¥FreeBSD GCCãç½®ãæããLLVM Clangãåºããã¹ãå¼ã³ãã src ClangBSD - LLVM Clang Call for Test Roman Divackyæ°ãã¡ã¼ãªã³ã°ãªã¹ãã«ããã¦LLVM Clangã®FreeBSDçµ±åãä¸å®ã®ã¬ãã«ã«éããã¨ãã¦ã³ãã¥ããã£ã«åºããã¹ããå¼ã³ããã¦ãã¾ããLLVM Clangãã»ã«ããã¹ãã«å°éãããã¨ãClangã®C++ãµãã¼ããåä¸ãããã¨ãi386/amd64ã®ã·ã¹ãã ã¨ã«ã¼ãã«ã®ãã«ãã¨æåãã¦ãããã¨ãªã©ãèæ¯ã«ããã¾ãã ãã¹ãã¯ClangBSDã®ãã©ã³ããåå¾ãã¦ãã«ããããã¨ã§å®æ½ã§ãã¾ããä½æ¥ã®è©³ããæ¹æ³ã¯BuildingFreeBSDWithClang - FreeBSD Wikiã«ã¾ã¨ã¾ã£ã¦ãã¾ãããã¤ãã©ã®ã¿ã¤ãã³ã°ã§ã¡ã¤ã³ãã©ã³ãã«åãè¾¼
ããããã® ã¦ã¤ã³ãã¦ãºClang ãã¦ã«ããããï¼ http://isocpp.org/blog/2014/01/llvm-3.4 clang3.4ããWindowsãã¤ãã£ããåããã¤ããªãä½ããããã«ãªãã¾ããã ãã¦ã³ãã¼ã http://llvm.org/releases/download.html#3.4 Windowsã¤ã³ã¹ãã¼ã©ã¼ãç¨æããã¾ããã®ã§ãã¦ã³ãã¼ããã¦ã¤ã³ã¹ãã¼ã«ãã¾ãã clang-cl clangèªä½ã«Windowsç¨ã®ãã¤ããªãã¯ãåºãã¢ã¼ããã¤ãã¾ãããããæ軽ã«ä½¿ããããã«ãclang-clãã¨ããå°ç¨ã®å®è¡ãã¡ã¤ã«ãããã¾ãã®ã§ããã使ãã¾ãã ãclang-clãã¯VCã®ã³ã³ãã¤ã©ã§ãããcl.exeãã¨äºæãããããã«ä½ããã¦ãã¦ããªãã·ã§ã³ã»ABIäºæãããããã§ãã ãã®ä»£ãããclang-clã®C++11/14対å¿ã¯VCã¨é²åº¦ãåããã¦ã
VSCodeã«C++ã®ç°å¢ãä½ãã®ã«æããã£ã¦ãã人ããã£ã±ã観測ã㦠ãã®ã¾ã¾ããåºãããªã(å®æç)ã¨æã£ãã®ã§æ¸ãã¦ã¿ã¾ãã ç°å¢ã¯Surface Pro 2017 , Windows10ã§ã VSCodeã¤ã³ã¹ãã¼ã« code.visualstudio.com ãããã ä¸çªå·¦ãé¸æ ã¤ã³ã¹ãã¼ã©ã¼ããã¦ã³ãã¼ããããã®ã§ãããå®è¡ æ°é·ã«å¾ ã¡ã¾ããã èµ·åã§ãã¾ãã MinGWã¨LLVM-clangã®ã¤ã³ã¹ãã¼ã« MinGWã¯C/C++ã®ã³ã³ãã¤ã«ç¨ã« LLVM-clangã¯VSCodeã®è£å®ã«ä½¿ãã¾ã ãã¡ãã®ãã¼ã¸ãã¨ã¦ãåèã«ãªãã¾ãã yohshiy.blog.fc2.com ãããããæ¬é¡ã§ã ã¾ãMinGWã§ã MinGWã®ã¤ã³ã¹ãã¼ã«ã«ã¤ãã¦ã¯æ å ±ããããµãã¾ãã£ã¦ããã®ã§ ãã¡ããåèã«ããã»ããããã¨æãã¾ã Cè¨èªå ¥é - MinGW - gcc ã®ã¤ã³ã¹ãã¼
LLVMããã¸ã§ã¯ãã¯3æ5æ¥(ç±³å½æé)ããLLVM Project Blog: Clang is now used to build Chrome for Windowsãã«ããã¦ãGoogle Chrome 64ããWindowsçChromeã®ãã«ãã«ã¯LLVM Clangã使ããã¦ããã¨ä¼ãããããã§Chromeã¯WindowsãmacOSãLinuxãChrome OSãAndroidã¨ãã¹ã¦ã®ãã©ãããã©ã¼ã ã§ãLLVM Clangã使ã£ã¦ãã«ããè¡ãããããã«ãªã£ããã¨ã«ãªãã LLVM Clangã¯Microsoft Visual C++ (MSVC)ã¨äºææ§ããããMSVCã³ã³ãã¤ã©ã§ãã«ãããããã°ã©ã ã¨LLVM Clangã§ãã«ãããããã°ã©ã ããªã³ã¯ãã¦å©ç¨ãããã¨ãã§ãããLLVM ClangãVisual Studioã®ä»£æ¿ã¨ããããããVisual Stud
Clangã¯å ¬å¼ãµã¤ãã§Windowsç¨ã®ãã¤ããªãé å¸ããã¦ãã¾ããããã®ãã¤ããªã¯ç¹å®ãã¼ã¸ã§ã³ã®Visual Studio(以åã¯MinGW gcc)ã«ä¾åãã¦ããããå°å ¥ãé¢åã§ããé å¸ããã¦ãããã¤ããªã¯å©ç¨ããã«ãMsys2ã®ããã±ã¼ã¸ã¨ãã¦Clangãã¤ã³ã¹ãã¼ã«ããã¨ä¾åé¢ä¿ãåæã«è§£æ±ºãã¦ãããã®ã§æ¥½ã§ãã¾ããããã§ã¯Msys2ã®å°å ¥ããClangã§ã³ã³ãã¤ã«ã§ããããã«ãªãã¾ã§ã®æé ããã£ãã説æãã¾ãã Msys2ãã¤ã³ã¹ãã¼ã«ãã Msys2ã¯Windowsä¸ã§åãunixã©ã¤ã¯ãªéçºç°å¢ã§ãã å ¬å¼ãµã¤ãã«å¾ããMsys2ãã¤ã³ã¹ãã¼ã«ãã¦ãã ããã Clangãã¤ã³ã¹ãã¼ã«ãã Clangã¯Msys2ã®ããã±ã¼ã¸ããã¼ã¸ã£ã¼pacmanã§ã¤ã³ã¹ãã¼ã«ãã¾ãã ãã£ã¨ c:\msys64 ã«ããmsys2_shell.cmdãèµ·åãã次ã®ã³ãã³ããå ¥åãã¦ãã ãã
LLVM ã Windows ã§ä½¿ã(clang ç·¨) 2012å¹´09æ17æ¥(æ)00æ49å ãclangãã§ãï½.sããã¡ã¤ã«ãä½ã åã åãã¤ã³ã¿ããªã¿ç·¨ãã¨ååãEXE ãã¡ã¤ã«çæç·¨ãã§ã¯ãLLVM ç¨ã®ä¸éè¨èªã§æ¸ããããï½.sããã¡ã¤ã«ãå®è¡ããæ¹æ³ã«ã¤ãã¦èª¿ã¹ã¾ããã ããã¯ããããããããªãªã¸ãã«ãªèªä½ããã°ã©ãã³ã°è¨èªãä½ã£ã¦ã¿ãããã¨ããå¦æ³ããå§ã¾ã£ã¦ããããï½.sããã¡ã¤ã«ã¯èªåã§ä½ãã¨ããåæããã£ãããã§ãã ã§ãã®ã§ã次ã¯ãã®ãï½.sããã¡ã¤ã«ãããªãã¡ãLLVM ç¨ä¸éè¨èªã§ã®ã½ã¼ã¹ã³ã¼ããã®æ¸ãæ¹ãç¥ãå¿ è¦ãããããã§ããããã®ããã«ãã¨ããããæ £ãã¦ããCè¨èªã§æ¸ããããããï½.sããã¡ã¤ã«ã§ã¯ã©ããªãã®ãï¼ã確èªã§ããã°ä¾¿å©ã§ãã ã¨ãããã¨ã§ãCè¨èªã C++ ã§æ¸ãããã½ã¼ã¹ã LLVM ç¨ä¸éè¨èªã«å¤æã§ããã³ã³ãã¤ã©ã§ãããclangãã使
å¾ æã®C/C++ IDEãCLionã¨ãã¦å ¬éè´ãã¾ãï¼ JetBrainsã¯ã½ããã¦ã§ã¢éçºãçç£çã§æ¥½ãããã®ã«ãããã常ã«æ³¨åãã¦ãã¾ããJavaã®ã·ã³ãã«ãªãªãã¡ã¯ã¿ãªã³ã°ãã¼ã«ã«å§ã¾ããJavaã.NETãPythonãRuby/Ruby on RailsãPHPãJavaScriptãHTMLãObjective-Cãªã©æ§ã ãªè¨èªããã©ãããã©ã¼ã ã«å¯¾å¿ãã¦ãã¾ããã JetBrainsã®ã¹ãã¼ããªãã¼ã«ç¾¤ã¯ã³ã¼ãã®å質ãé«ããããå¹çè¯ããªãã¡ã¯ã¿ãªã³ã°ãããã³ã¼ãã£ã³ã°åºæ¥ããã¨ã§åºãç¥ããã¦ãã¾ãã Cã¨C++ã¯ããã°ã©ãã³ã°è¨èªã®ä¸ã§ãç¹ã«æ´å²ãé·ããåå§ã¹ã¼ã(primordial soup)ã®ä¸ã§ãæ ¹å¼·ãçãæ®ã£ã¦ããã®è¨èªã¨ãã¦èªèããã¦ãã¾ããããã§JetBrainsã¯ä¿¡å¿µã«åºã¥ããC/C++ãããããã®ä½æ¥ãããå¹ççãªãã®ã¨ããããå°ç¨ã®IDEããªãªã¼ã¹ãã
PerformanceWe conducted extensive A/B testing of performance. Performance telemetry numbers are about the same for MSVC-built and clang-built Chrome â some metrics get better, some get worse, but all of them are within 5% of each other. The official MSVC builds used LTCG and PGO, while the Clang builds currently use neither of these. This is potential for improvement that we look forward to explor
(注ï¼2017/07/06ãããã ãããã£ã¼ãããã¯ãå ã«ç¿»è¨³ãä¿®æ£ãããã¾ããã) ãã®è¨äºã¯ã LLVM ã³ã³ãã¤ã©åºç¤ã使ã£ã¦ãªãµã¼ãããã人ã®ããã®å ¥éæ¸ã§ãããããèªãã°ãã³ã³ãã¤ã©ã«å ¨ãèå³ã®ãªã大å¦é¢çãã楽ãã¿ãªããLLVMã使ã£ã¦åªããå績ããããããããã«ãªãã§ãããã LLVMã¨ã¯ä½ãï¼ LLVMã¯é常ã«åªãã¦ãã¦ãããã¯ãããããCè¨èªãC++ã®ãããªâãã¤ãã£ãâè¨èªåãã®ãæ代ã®å 端ãè¡ãã³ã³ãã¤ã©ã§ãã LLVMã®ç´ æ´ãããã«é¢ãã¦ã¯ä»ã«ãæ§ã ãªè©±ãèãã®ã§ã¯ãªãã§ããããï¼JITã³ã³ãã¤ã©ã¨ãã¦ã使ããã¨ããCè¨èªç³»å以å¤ã®æ§ã ãªè¨èªãå¼·åã§ããã¨ãã App Storeããã®æ°ããé ä¿¡å½¢æ ã§ããã¨ãããªã©ãªã©)ããã¡ããå ¨é¨æ¬å½ã®ãã¨ã§ãããä»åã®è¨äºã®ç®çã¨ãã¦ã¯ãä¸è¿°ã®å®ç¾©ãéè¦ã§ãã LLVMãä»ã®ã³ã³ãã¤ã©ã¨å·®å¥åãããçç±ã«ã¯ãããã¤ãã®å¤§ããª
C, C++ è¨èªã®ã³ã³ãã¤ã©ã¼ã¨ããã°ã Windows ã§ã¯ Visual Studio ã Unix ç³»ã§ã¯ gcc(g++) ã¨ããã®ãå¤ãã§ãã ãããªä¸ãæè¿ Clang ããã¡ãã¡ã§ä½¿ããå§ããããã«ãªã£ã¦ãã¾ããã ä»åã¯ãã® Clang ã® Windows ã¸ã®ã¤ã³ã¹ãã¼ã«æ¹æ³ã¨ä½¿ãæ¹ã«ã¤ãã¦èª¬æãã¾ãã Clang ã¨ã¯ Clang 㯠LLVM ã§ä½ããã C, C++, Objective-C, Objective-C++ ã®ã³ã³ãã¤ã©ã¼ã§ãã LLVM(Clang) ã®éçºã«ã¯ Apple ã Google ãªã©ã®ä¼æ¥ãåå ãè³éæä¾ãã¦ãã¾ãã Clang ã¯gcc ã®ä»£æ¿ãçã£ã¦ããã Apple ã®å¾æ¼ãã大ããã Mac ã§ã¯ãã§ã«ä¸»è¦ãªã³ã³ãã¤ã©ã¼ã¨ãªã£ã¦ãããããã§ããããã« Mac ã ãã§ãªããUnix ã Windows ãªã©ã¯ãã¹ãã©ãããã¼ã ã§
ã¯ããã« LLVMããã¼ã¹ã«ããC/C++ãObjective-C/C++ã®ã³ã³ãã¤ã©ããã³ãã¨ã³ãã¨ãã¦Clangãããã¾ãã Clangããã¸ã§ã¯ãã§ã¯ãã³ã³ãã¤ã©ã ãã§ãªããéç解æãã¼ã«ãéçºãã¦ãã¾ãã ä»åã¯ããã®éç解æãã¼ã«ã§ãããscan-buildã«ã¤ãã¦ç´¹ä»ãã¾ãã scan-buildãã¤ã³ã¹ãã¼ã«ããã 以ä¸ã«Ubuntu 14.04 LTSï¼Trustyï¼ã§ã®ã¤ã³ã¹ãã¼ã«æé ã示ãã¾ããTrustyã§ã¯ãclang-3.3ãclang-3.4ãããã¯clang-3.5ãã¤ã³ã¹ãã¼ã«ã§ãã¾ãã scan-buildã¯clangããã±ã¼ã¸ã«å«ã¾ãã¦ããã®ã§ãä»åã¯æ°ããã®ãã¼ã¸ã§ã³ã§ããclang-3.5ãã¤ã³ã¹ãã¼ã«ãããã¨ã«ãã¾ãã1 % sudo apt-get install clang-3.5 scan-buildã使ã£ã¦ã¿ãã scan-buildãã¤ã³
Clang ([ËklæÅ]ï¼ã¯ã©ã³ã®ããã«çºé³[5]) ã¯ãããã°ã©ãã³ã°è¨èª CãC++ãObjective-CãObjective-C++ åãã®ã³ã³ãã¤ã©ããã³ãã¨ã³ãï¼è±èªçï¼ã§ãããOpenMPãã£ã¬ã¯ãã£ã[6]ããOpenCL C/C++ã«ã¼ãã«è¨èª[7]ãæ£å¼ãµãã¼ããã¦ãããããã¯ã¨ã³ãã«LLVMã®ã³ã³ãã¤ã©åºç¤ã使ç¨ãã¦ãããLLVM 2.6以éã¯LLVMã®ãªãªã¼ã¹ãµã¤ã¯ã«ã«çµã¿è¾¼ã¾ãã¦ããã Clang/LLVMãã¼ã¹ã®æ´¾çããã¸ã§ã¯ãã¨ãã¦ãRenderScriptï¼è±èªçï¼ãCUDAã®NVCC[8]ãROCmï¼è±èªçï¼ã®HIP-Clang[9]ã¨ãã£ããCã©ã¤ã¯ãªãã¡ã¤ã³åºæè¨èª (DSL) ãçµã¿è¾¼ãã GPGPUãã¬ã¼ã ã¯ã¼ã¯ã«ãããã³ã³ãã¤ã©ããã³ãã¨ã³ãã¨ãã¦ãæ¡ç¨ããã¦ããã ããã¸ã§ã¯ãã®ç®æ¨ã¯ãGNUã³ã³ãã¤ã©ã³ã¬ã¯ã·ã§ã³ (GCC) ãç½®ãæããã
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
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}