From: Kevin Date: Fri, 5 Oct 2007 21:18:52 +0000 (+0000) Subject: new site -- the rest of it X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bc8e50fa28ac602c8858aa837076b700e4165eae;p=clang new site -- the rest of it git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42651 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/www/carbon-compile.png b/www/carbon-compile.png new file mode 100644 index 0000000000..e8516c7055 Binary files /dev/null and b/www/carbon-compile.png differ diff --git a/www/clang_video-05-25-2007.html b/www/clang_video-05-25-2007.html new file mode 100644 index 0000000000..5fb51cc66f --- /dev/null +++ b/www/clang_video-05-25-2007.html @@ -0,0 +1,28 @@ + + + + 2007 LLVM Developer's Meeting + + + + + +
+

2007 LLVM Developer's Meeting

+ Discussion about Clang at the 2007 LLVM Developer's Meeting. +

About:

+

In this video, Steve Naroff introduces the Clang project and talks about some of the goals and motivations for starting the project. +

+

Details: New LLVM C Front-end - This talk describes a new from-scratch C frontend (which is aiming to support Objective C and C++ someday) for LLVM, built as a native part of the LLVM system and in the LLVM design style. +

The Presentation:

+

You can download a copy of the presentation in mov format. However, due to the picture quality, it is recommended that you also download the lecture slides for viewing while you watch the video. +

+
+ + \ No newline at end of file diff --git a/www/clang_video-07-25-2007.html b/www/clang_video-07-25-2007.html new file mode 100644 index 0000000000..594064de9b --- /dev/null +++ b/www/clang_video-07-25-2007.html @@ -0,0 +1,31 @@ + + + + LLVM 2.0 and Beyond! + + + + + +
+

LLVM 2.0 and Beyond!

+ A Google Techtalk by Chris Lattner +

About:

+

In this video, Chris Lattner talks about some of the features of Clang, especially in regards to performance. +

+

Details: The LLVM 2.0 release brings a number of new features and capabilities to the LLVM toolset. This talk briefly describes those features, then moves on to talk about what is next: llvm 2.1, llvm-gcc 4.2, and puts a special emphasis on the 'clang' C front-end. This describes how the 'clang' preprocessor can be used to improve the scalability of distcc by up to 4.4x. +

The Presentation:

+

You can view the presentation through google video. In addition, the slides from the presentation are also available, if you wish to retain a copy. +

+

Publishing Information:

+ "LLVM 2.0 and Beyond!", Chris Lattner,
+ Google Tech Talk, Mountain View, CA, July 2007. +
+ + \ No newline at end of file diff --git a/www/content.css b/www/content.css new file mode 100644 index 0000000000..ee3559dea1 --- /dev/null +++ b/www/content.css @@ -0,0 +1,84 @@ +/* + Consulted: + http://www.w3.org/TR/CSS1 & + http://www.w3.org/TR/CSS21/ +*/ + + html, body { + margin:0px; + padding:0px; + } + p { + margin-top:0; + margin-bottom:0; + } + + ul, ol { /* Get rid of the extra space above and below all lists */ + margin-top:0; + margin-bottom:0; + } + table,tr,td { + border:.3ex solid black; + border-collapse:collapse; + padding:.4ex; + } + + + .li_desc, .li_weak_desc { /* layout + formatting */ + margin: 0 3ex; + font-size:.9em; + } + .li_weak_desc { /* color */ + color:rgb(100,100,100); + } + .weak_txt { + font-size:.9em; + color:rgb(100,100,100); + } + + .code { + font:Courier,Arial; + } + .quote { + display: block; + margin: 0 5em; + } + .key_point { + color:rgb(200,0,0); + } + .simple_list { /* simple lists that don't need to stand out */ + margin-left:0; + } + + + /* ****************** */ + /* Performance images */ + .img_container { + display:inline; + background-color:rgb(250,250,250); + width:400px; + vertical-align:top; + margin:.1em; + } + [class=img_container] { + display:inline-block; + } + .img_container img { + display:block; + } + + .img_title { + display:block; + font-weight:bold; + color:rgb(20,50,150); + } + .img_desc .img-notes { + display:block; + padding:.3em; + } + .img_notes { + font-style:italic; + color:rgb(50,50,50); + font-size:.9em; + } + /* ****************** */ \ No newline at end of file diff --git a/www/feature-compile1.png b/www/feature-compile1.png new file mode 100644 index 0000000000..cec7c48514 Binary files /dev/null and b/www/feature-compile1.png differ diff --git a/www/feature-compile2.png b/www/feature-compile2.png new file mode 100644 index 0000000000..0eb93001ff Binary files /dev/null and b/www/feature-compile2.png differ diff --git a/www/feature-diagnostics1.png b/www/feature-diagnostics1.png new file mode 100644 index 0000000000..00b0a0d719 Binary files /dev/null and b/www/feature-diagnostics1.png differ diff --git a/www/feature-memory1.png b/www/feature-memory1.png new file mode 100644 index 0000000000..29368aa838 Binary files /dev/null and b/www/feature-memory1.png differ diff --git a/www/features.html b/www/features.html new file mode 100644 index 0000000000..bc3200f7de --- /dev/null +++ b/www/features.html @@ -0,0 +1,109 @@ + + + + + Clang - Features + + + + + + +
+

Features of Clang

+This page outlines the main goals of Clang, as well as some compelling reasons why you should consider using Clang. In the "Goals" section below, you will find a brief, bulletted overview of the goals and features that we are striving for in the development of Clang. However, in the "Key Features" section you will find a more detailed presentation on what we believe are some key drawing points for the LLVM front-end. If you are new to Clang and the LLVM front-end, and you want a reason for considering working on or using the new front-end, then make sure you check out the "Key Features" section. +

Goals

+ +

Key Features

+There are several key features which we believe will make Clang a compelling alternative. These features are designed to make things easier for both the compiler developer (people working on Clang and derivative products) and the application developer (those who use Clang/LLVM). +

Library based architecture

+A major design concept for the LLVM front-end involves using a library based architecture. In this library based architecture, various parts of the front-end can be cleanly divided into separate libraries which can then be mixed up for different needs and uses. In addition, the library based approach makes it much easier for new developers to get involved and extend LLVM to do new and unique things. In the words of Chris, +
"The world needs better compiler tools, tools which are built as libraries. This design point allows reuse of the tools in new and novel ways. However, building the tools as libraries isn't enough: they must have clean APIs, be as decoupled from each other as possible, and be easy to modify/extend. This requires clean layering, decent design, and avoiding tying the libraries to a specific use."
+Currently, the LLVM front-end is divided into the following libraries: + +As an example of the power of this library based design.... If you wanted to build a preprocessor, you would take the Basic and Lexer libraries. If you want an indexer, you would take the previous two and add the Parser library and some actions for indexing. If you want a refactoring, static analysis, or source-to-source compiler tool, you would then add the AST building and semantic analyzer libraries. +In the end, LLVM's library based design will provide developers with many more possibilities. + +

Speed & Memory

+Another major focus of LLVM's frontend is speed (for all libraries). Even at this early stage, the LLVM front-end is quicker than gcc and uses less memory.
+
+
Memory:
+ +
This test was run using Mac OS X's Carbon.h header, which is 12.3MB spread across 558 files! + Although this is one of the worst case scenarios for GCC, it shows how clang's implemenation is significantly more memory efficient. +
+
Notes: + Most of the additional memory used by GCC is due to extra data that is added in, which is not needed by the Clang front-end. +
+
+
+
Performance:
+ +
Even at this early stage, the C parser for Clang is able to achieve significantly better performance. +
+
+
+
Performance:
+ +
By moving to distributed compiling using distcc, the performance improvement also becomes noticeable.
+
Notes: + These are SPEC2006 benchmarks using Distcc.
+
+ +

More Expressive Diagnostics

+The design of the Clang driver (one of the LLVM front_end libraries) provies more detailed diagnostic information.
+
+
Clang vs GCC:
+ +
There are several things to take note of in this example: +
    +
  • The error messages from Clang are more detailed. +
  • Clang shows you exactly where the error is, plus the range it has a problem with. +
+
+
Notes:The first results are from clang; the second results are from gcc.
+
+

Better Integration with IDEs

+Another benefit of Clang is that it was designed to integrate better with IDEs. In IDEs, the more information the IDE can get to, the better. The clang driver already provides more detailed (and useful) information than gcc. However, because of the library based design of LLVM, you can access additional information by mixing and matching parts of the library to create specialized development and debug tools. In this sense, LLVM is friendlier towards IDEs. +
+ + \ No newline at end of file diff --git a/www/get_involved.html b/www/get_involved.html new file mode 100644 index 0000000000..ed2bdf7173 --- /dev/null +++ b/www/get_involved.html @@ -0,0 +1,136 @@ + + + + Clang - Get Involved + + + + + +
+

Getting Involved

+There are many tasks that are open to new developers who want to get involved with the Clang project. Below, you will find details on how to get started with Clang, plus a few tasks that we need help with.
+
+Please note that the information provided here is not completely thorough. This is intentional. If you plan to work on Clang, we would like you to get involved with the other developers. This will allow us to work together better and will give you a better feel for how things are done. +You can talk with other developers at the following mailing list: cfe-dev mailing list. (On the other hand, if you feel uncomfortable getting involved in a public mailing list right away, and you just want to ask a few questions to begin with, then you can contact Chris personally, until you feel comfortable moving to the mailing list.) + +

Getting Started

+

A word of warning

+While this work aims to provide a fully functional C/C++/ObjC front- end, it is *still very early work*. In particular, there is no real C++ support yet (this is obviously a big project), and C/ObjC support is still missing some features. Some of the more notable missing pieces of C support are: +
    +
  1. The semantic analyzer does not produce all of the warnings and errors it should. +
  2. The LLVM code generator is still very early on. It does not support many important things, like any support for structs and unions. That said, it does handle scalar operations and vectors. +
  3. We don't consider the API to be stable yet, and reserve the right to change fundamental things :) +
+Our plan is to continue chipping away at these issues until C works really well, but we'd love help from other interested contributors. +

Follow what's going on

+To avoid spamming the main LLVM mailing list, two lists were setup just for Clang. Please take all Clang related discussion to these two lists. (Note: If all you care about is the Clang front-end, and not the overall LLVM Compiler project, then the two CFE lists are all that you need.)
+ +

Building clang / working with the code

+If you would like to check out and build the project, the current scheme is:
+
    +
  1. Check out llvm +
      +
    • cd llvm/tools +
    • svn co http://llvm.org/svn/llvm-project/cfe/trunk clang +
    +
  2. Non-mac users: Paths to system header files are currently hard coded into the tool; as a result, non-Mac users will need to change the path in one of the files. +
      +
    • 'touch empty.c; gcc -v empty.c -fsyntax-only' to get the path. +
    • change clang/Driver/clang.cpp:606 to include that path +
    +
  3. Build llvm +
      +
    • cd clang +
    • make +
    +
+

Note that the C front-end uses libsupport and libsystem. You don't need llvm-gcc :) +

We will eventually integrate this better as a sub-project, but for now it builds a single tool named 'clang'.
+Once llvm is built in this way, you can compile C code. +

Examples of using clang

+The clang driver takes a lot of GCC compatible options, which you can see with 'clang --help'. Here are a few examples: + +
+$ cat ~/t.c
+
+typedef float V __attribute__((vector_size(16)));
+V foo(V a, V b) { return a+b*a; }
+
+
+Preprocessing:
+$ clang ~/t.c -E
+# 1 "/Users/sabre/t.c" 1
+
+typedef float V __attribute__((vector_size(16)));
+
+V foo(V a, V b) { return a+b*a; }
+
+
+Type checking:
+$ clang -fsyntax-only ~/t.c
+
+
+GCC options:
+$ clang -fsyntax-only ~/t.c -pedantic
+/Users/sabre/t.c:2:17: warning: extension used
+typedef float V __attribute__((vector_size(16)));
+                 ^
+1 diagnostic generated.
+
+
+
+Pretty printing from the AST:
+$ clang ~/t.c -parse-ast-print
+typedef float V __attribute__(( vector_size(16) ));
+
+V foo(V a, V b) {
+   return a + b * a;
+}
+
+
+LLVM code generation:
+$ clang ~/t.c -emit-llvm | llvm-as | opt -std-compile-opts | llvm-dis
+define <4 x float> @foo(<4 x float> %a, <4 x float> %b) {
+entry:
+         %mul = mul <4 x float> %b, %a           ; <<4 x float>>  
+[#uses=1]
+         %add = add <4 x float> %mul, %a         ; <<4 x float>>  
+[#uses=1]
+         ret <4 x float> %add
+}
+$ clang ~/t.c -emit-llvm | llvm-as | opt -std-compile-opts | llc - 
+march=ppc32 -mcpu=g5
+..
+_foo:
+         vmaddfp v2, v3, v2, v2
+         blr
+$ clang ~/t.c -emit-llvm | llvm-as | opt -std-compile-opts | llc - 
+march=x86 -mcpu=yonah
+..
+_foo:
+         mulps %xmm0, %xmm1
+         addps %xmm0, %xmm1
+         movaps %xmm1, %xmm0
+         ret
+
+

Available tasks

+Here are a few tasks that are currently available for newcomers to work on: + +

Final words

+In any case, we welcome questions, comments, and especially patches :). +

+Thanks! +

+-Chris +
+ + \ No newline at end of file diff --git a/www/menu.css b/www/menu.css new file mode 100644 index 0000000000..da688dce29 --- /dev/null +++ b/www/menu.css @@ -0,0 +1,64 @@ +/* + Consulted: + http://www.w3.org/TR/CSS1 & + http://www.w3.org/TR/CSS21/ +*/ + +/***************/ +/* page layout */ +/***************/ + +/***IE***/ +#menu { + float:left; +} +#content { + float:left; + margin-left:1ex; +} +/***W3C***/ +[id=menu] { + position:fixed; +} +[id=content] { + padding-left:16ex; /* ***** EDIT THIS VALUE IF CONTENT OVERLAPS MENU ***** */ +} + +/****************/ +/* menu display */ +/****************/ +label, #menu a { + display:block; + padding:.05em .3em; +} +#menu * { + display:block; +} +#quick_links { + padding-top:1em; +} +a { + margin:.05em; +} + +/**************/ +/* menu style */ +/**************/ +label { + font-size:.8em; +} +#menu a { + background-color:rgb(244,250,255); +} +#menu label { + background-color:rgb(244,255,250); +} +#menu { + padding: 0 .2em .2em 0; + border-color: rgb(240,240,240); + border-width: 0 .1em 0 0; + border-style: solid; +} +#menu a:visited { + color:rgb(130,50,100); +} \ No newline at end of file diff --git a/www/menu.html.incl b/www/menu.html.incl new file mode 100644 index 0000000000..71a8a792db --- /dev/null +++ b/www/menu.html.incl @@ -0,0 +1,28 @@ + + \ No newline at end of file diff --git a/www/status.html b/www/status.html new file mode 100644 index 0000000000..acd6182281 --- /dev/null +++ b/www/status.html @@ -0,0 +1,132 @@ + + + + Status of Clang + + + + + +
+

Status of Clang

+ Here is a rundown of the current status of Clang as of September 2007. +

By Language:

+ + + + + + + + + + + + + + + + + + + + + + +
CBasic Status
+
    +
  • Add some notes here. +
  • Add some notes here. +
+
Obj CBasic Status
+
    +
  • Add some notes here. +
  • Add some notes here. +
+
C++Basic Status
+
    +
  • Add some notes here. +
  • Add some notes here. +
+
+

By library:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
LibraryCObj CC++
libsupportBasic StatusBasic StatusBasic Status
libsystemBasic StatusBasic StatusBasic Status
libbasic
libast
liblex
libparse
libsema
libcodegen
clang
+

Status History (notes):

+

October 5, 2007

+ +

July 17, 2007

+ +
+ + \ No newline at end of file