6
2015. 8. 27. 나는 C++: LLVM Introduction http://hownote.blogspot.kr/2013/10/llvmintroduction.html 1/6 나는 C++ 20131019일 토요일 LLVM Introduction Introduction to the LLVM Compiler System. http://llvm.org/pubs/20081004ACATLLVMIntro.pdf 2008 년 문서로 추정된다. LLVM 에대한 개념을 설명한 문서다. LLVM Project 란 무엇인가? New compiler architecture built with reusable components. 다음과 같은 여러가지 컴파일러 기술로 이루어져있다. Optimizer , Code Generator llvmgcc, Clang Front ends 그외 기타등등... http://llvm.org 그런데, ? 그런데, 왜 이 시점에 뜬금없이 C 컴파일러를 또 만든단 말인가? 이미 세상에는 GCC, Xcode, Visual Studio ... 등등 수 많은 C 컴파일러가 있는데.. . 하필이면. C 컴파일러란 말인가? 그 이유는. 1. 기존 오픈소스 C Compiler 가 침체되었다고 보기 때문이다. 그렇게 보는 이유는 다음과 같다. 수십년된 code generation 기술을 기반으로 한다. crossfile optimization 과 같은 현대적 기술을 사용하지 않는다. code base 가 오래되서, 배우기 어렵고, 대대적인 변경이 어렵다. 이 블로그 검색 0 boost (1) C++ (2) clang (1) Code::Block (2) COM (1) gcc (2) googletest (1) LLVM (2) log (1) MinGW (7) mingw32make (1) MinGW64 (1) svn (1) TDMGCC (1) wxSmith (1) wxWidget (6) 태그 2014 (1) 2013 (2) 11(1) 10(1) LLVM Introduction 2012 (13) 2011 (2) 블로그 보관함 내 블로그 목록 페이지 MinGW 설치 C++ 프로그 는 생명이다 opensourc 특성을 가진 MinGW 뿐이다. 처음에는 명성과 편리함에 가려서 ... LLVM Intro Introductio Compiler S http://llvm. 04ACATL 2008 년 문서로 추정된다 념을 설명한 문서다.... Code::Bloc 참조: Insta from sourc http://wiki.codeblocks.or 가장 많이 본 글 0 더보기 랜덤 블로그» [email protected].

2015. 8. 27. 나는 C++: LLVM Introductionblog.tcltk.co.kr/.../uploads/2015/08/LLVM-Introduction.pdf · 2015-08-27 · 2015. 8. 27. 나는 C++: LLVM Introduction introduction.html

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: 2015. 8. 27. 나는 C++: LLVM Introductionblog.tcltk.co.kr/.../uploads/2015/08/LLVM-Introduction.pdf · 2015-08-27 · 2015. 8. 27. 나는 C++: LLVM Introduction introduction.html

2015. 8. 27. 나는 C++: LLVM Introduction

http://hownote.blogspot.kr/2013/10/llvmintroduction.html 1/6

나는 C++2013년 10월 19일 토요일

LLVM Introduction

Introduction to the LLVM Compiler System.

http://llvm.org/pubs/20081004ACATLLVMIntro.pdf

2008 년 문서로 추정된다.

LLVM 에대한 개념을 설명한 문서다.

LLVM Project 란 무엇인가?

New compiler architecture built with reusable components.

다음과 같은 여러가지 컴파일러 기술로 이루어져있다. Optimizer , Code Generator llvmgcc, Clang Front ends 그외 기타등등...

http://llvm.org

그런데, 왜?

그런데, 왜 이 시점에 뜬금없이 C 컴파일러를 또 만든단 말인가?

이미 세상에는 GCC, Xcode, Visual Studio ... 등등 수 많은 C 컴파일러가 있는데..

왜. 하필이면. 또 C 컴파일러란 말인가?

그 이유는.

1. 기존 오픈소스 C Compiler 가 침체되었다고 보기 때문이다.

그렇게 보는 이유는 다음과 같다.

 수십년된 code generation 기술을 기반으로 한다. crossfile optimization 과 같은 현대적 기술을 사용하지 않는다. code base 가 오래되서, 배우기 어렵고, 대대적인 변경이 어렵다.

이 블로그 검색

0

boost (1)

C++ (2)

clang (1)

Code::Block (2)

COM (1)

gcc (2)

googletest (1)

LLVM (2)

log (1)

MinGW (7)

mingw32make (1)

MinGW64 (1)

svn (1)

TDMGCC (1)

wxSmith (1)

wxWidget (6)

태그

►  2014 (1)

▼  2013 (2)

►  11월 (1)

▼  10월 (1)

LLVM Introduction

►  2012 (13)

►  2011 (2)

블로그 보관함

내 블로그 목록

페이지

MinGW 설치C++ 프로그래머에게 컴파일러는 생명이다. opensource, freelicense 의특성을 가진 컴파일러는

MinGW 뿐이다. 처음에는 VisualStudio 의명성과 편리함에 가려서 MinGW 가 잘 보이지...

LLVM IntroductionIntroduction to the LLVMCompiler System.http://llvm.org/pubs/20081004ACATLLVMIntro.pdf

2008 년 문서로 추정된다. 념을 설명한 문서다....

Code::Block 빌드참조: Installing Code::Blocksfrom source on Windows

http://wiki.codeblocks.org/index.php?

가장 많이 본 글

0   더보기    랜덤 블로그» [email protected]

Page 2: 2015. 8. 27. 나는 C++: LLVM Introductionblog.tcltk.co.kr/.../uploads/2015/08/LLVM-Introduction.pdf · 2015-08-27 · 2015. 8. 27. 나는 C++: LLVM Introduction introduction.html

2015. 8. 27. 나는 C++: LLVM Introduction

http://hownote.blogspot.kr/2013/10/llvmintroduction.html 2/6

 다른 응용프로그램에서 컴파일러기술을 재사용하기 어렵다. 새로운 버전이 릴리스될때마다 속도가 더욱 느려진다.

(음... 일리 있네..)

그래서 현대적기술을 사용하여 컴파일러 요소기술을 만들었고,

이것을 모듈화 시킨것이 LLVM 이다.

이것이 좋다는것을 증명하려면, 이 요소기술위에서 돌아가는 컴파일러가 있어야 한다.

그래서, LLVM 개발자는 LLVMGCC 4.2 를 만들었다.

LLVMGCC 4.2 는 다음과 같은 특징을 가진다.

 C, C++, Objective C, Ada and Fortran Standard GCC command line option ....

즉, LLVMGCC 4.2 는 C Frontend 는 GCC 4.2 를 쓰고, Optimizer 와 Code Generator 는 LLVM 을 쓰는 물건이다.

( 이걸 왜 이렇게 복잡하게 섞어 놓는거지..? )

이걸 이렇게 섞어서 LLVM 을 쓰면 다음과 같은 좋은 점이 생긴다.

1. 기존에는 없었던, Link Time Optimization 이라는 새로운 기능이 가능해진다.

2. 컴파일 시간이 줄어든다.

title=Installing_Code::Blocks_from_source_on_Win...

wxWidgets 빌드wxWidgets 는 소스코드형태로 제공되므로, C++ 개발자가빌드해야한다. 압축을 풀고, 그 아래의

"\build\msw" 디렉토리로 이동한다. 터에서 디렉토리위치는 다음과 같이 표현된...

wxWidget 빌드 에러 (wxMSW2.8.12 )wxWidgets ("wxMSW2.8.12")  를 MinGW 로 빌드하다가 "Memory exhausted" 

러가 났다. 이 오류는 다음...

boost 를 MinGW 로 빌드하기boost 를 MinGW 로 빌드하기참조: http://www.boost.org/

http://sourceforge.net/apps/trac/mingww64/wiki/Building%20Boosthttp://www.boost...

logC++ 프로젝트를 시작할때, logging 을 먼저준비하는것이 중요하다. http://log4cpp.sourceforge.net/ http://log4cplus.sourceforge...

wxWidgetwxWidget http://www.wxwidgets.org/  )main 함수가 보이지 않는다.앞으로 어찌해야 하나. 

compilers that support precompi...

Code::Block 빌드 성공참조: 1. 

http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows MinGW 를 설치하고,wxWidget2.8.12 소스...

MinGW 에서 COM 사용  (COM Wrapper)MinGW            opensource 컴파일러(GCC) Code::Block    opensource IDEboost             opensource crossplatform라이브러리 ( thread, ip...

Page 3: 2015. 8. 27. 나는 C++: LLVM Introductionblog.tcltk.co.kr/.../uploads/2015/08/LLVM-Introduction.pdf · 2015-08-27 · 2015. 8. 27. 나는 C++: LLVM Introduction introduction.html

2015. 8. 27. 나는 C++: LLVM Introduction

http://hownote.blogspot.kr/2013/10/llvmintroduction.html 3/6

3. 실행시간이 빨라진다.

결론은 장점이 분명 존재한다.

기타 다음과 같은 LLVM 의 특징과 장점이 있다.

 새로운 언어를 만들때 LLVM 을 target 으로 쓸수있다. JustInTime optimization 과 compillation 을 제공한다. Better tools for source level analysis of C/C++ program

LLVM 기술로 만들어진것중에 Clang 이란것이 있다.

Clang 은 이런것이다. C, ObjectiveC, and C++ frontend. GCC 와 호환성 유지. 컴파일 속도 향상. 알아보기 편한, 컴파일러 에러메시지.

( 별거아니네. 뭐야, GCC 랑 똑같은건가..? )

컴파일 속도는 GCC 보다 Clang 이 좀 빠른가 보네.

Page 4: 2015. 8. 27. 나는 C++: LLVM Introductionblog.tcltk.co.kr/.../uploads/2015/08/LLVM-Introduction.pdf · 2015-08-27 · 2015. 8. 27. 나는 C++: LLVM Introduction introduction.html

2015. 8. 27. 나는 C++: LLVM Introduction

http://hownote.blogspot.kr/2013/10/llvmintroduction.html 4/6

 C++11 support 에서도 Clang 은 뛰어나다.

    C++11 compiler support shootout: Visual Studio, GCC, Clang, Intel   ( http://cpprocks.com/c11compilersupportshootoutvisualstudiogccclangintel/ )

 이렇게 좋은 Clang 인데... Visual Studio 에서는, MinGW 에서는...

   ...  Windows 에서는 아직 찬밥이라는 현실.

( http://llvm.org/docs/GettingStarted.html )

Windows8 에서 MinGW64 로는 빌드가 되지 않는다.

(  MinGW32 로는 빌드가 된다. )

Page 5: 2015. 8. 27. 나는 C++: LLVM Introductionblog.tcltk.co.kr/.../uploads/2015/08/LLVM-Introduction.pdf · 2015-08-27 · 2015. 8. 27. 나는 C++: LLVM Introduction introduction.html

2015. 8. 27. 나는 C++: LLVM Introduction

http://hownote.blogspot.kr/2013/10/llvmintroduction.html 5/6

최근 게시물 이전 게시물홈

피드 구독하기: 댓글 (Atom)

작성자: sobahoko 시간: 오전 12:01   

라벨: LLVM

 LLVM, Clang 은 완료된 프로젝트가 아니다.  현재, 개발 진행중인 프로젝트다.  뭔가, 안되거나 없으면 정상이다.

  예를 들어 Clang 링커가 없다면, 정상이다.  지금 개발 중이다.

The lld project aims to to be the builtin linker for clang/llvm. Currently, clang must invoke the system linker to produce executables.

현재로서는, MinGW 에 있는 링커 또는 Visual Studio 에 있는 링커를 써야한다.

Google에 이 URL 추천

댓글 쓰기

링크 생성

댓글 없음:

이 게시물에 대한 링크

Page 6: 2015. 8. 27. 나는 C++: LLVM Introductionblog.tcltk.co.kr/.../uploads/2015/08/LLVM-Introduction.pdf · 2015-08-27 · 2015. 8. 27. 나는 C++: LLVM Introduction introduction.html

2015. 8. 27. 나는 C++: LLVM Introduction

http://hownote.blogspot.kr/2013/10/llvmintroduction.html 6/6

Blogger 제공.