The LLVMLinux Project
This is a modal window.
The media could not be loaded, either because the server or network failed or because the format is not supported.
Formal Metadata
Title |
| |
Title of Series | ||
Number of Parts | 90 | |
Author | ||
License | CC Attribution 2.0 Belgium: You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor. | |
Identifiers | 10.5446/40333 (DOI) | |
Publisher | ||
Release Date | ||
Language |
Content Metadata
Subject Area | ||
Genre | ||
Abstract |
|
FOSDEM 20138 / 90
2
5
8
10
12
13
14
15
17
19
21
24
25
28
29
31
32
34
36
39
40
43
44
46
50
51
52
54
55
57
58
62
65
66
67
78
79
87
88
00:00
GoogolLine (geometry)Projective planeCompilerFeedbackKernel (computing)Lecture/Conference
00:56
GoogolCodeFunction (mathematics)Line (geometry)Kernel (computing)CodeError messageGoogolFunction (mathematics)CASE <Informatik>Product (business)InformationSource codeUML
01:48
InformationLecture/Conference
02:04
Source codeCurvatureLink (knot theory)Error messageThermal expansionFunction (mathematics)Macro (computer science)Macro (computer science)Pairwise comparisonPosition operatorStatement (computer science)Condition numberFunction (mathematics)Pointer (computer programming)Error messageNetwork topologySource code
03:25
Level (video gaming)CompilerBranch (computer science)DataflowCodeKernel (computing)Mathematical analysisInformationSource code
04:27
Android (robot)NP-hardArmDevice driverOpen setCompilerKernel (computing)Software testingMeta elementArchitecturePatch (Unix)Software developerKernel (computing)INTEGRALMereologyIntermediate languageMultiplicationAndroid (robot)Projective planePatch (Unix)Stress (mechanics)QuicksortCompilerComputer architectureLatent heatMathematical optimizationArmScripting languageCodeVolumenvisualisierungForceRepresentation (politics)Source codeComputer animation
07:33
Meta elementPatch (Unix)Set (mathematics)Projective planeLine (geometry)Shape (magazine)ProgrammschleifeHydraulic jumpKernel (computing)Queue (abstract data type)Lecture/Conference
08:23
WebsiteWeb pageElectronic mailing listInformationArchitectureProjective planeWhiteboardLink (knot theory)Coefficient of determinationWeb pageInformationKernel (computing)
08:55
TrailSoftware developerSlide ruleComputer architecturePatch (Unix)Lecture/Conference
09:23
Electronic mailing listTelecommunicationWebsiteQR codeElectronic mailing listSlide ruleEmailRight angleCodeComputer animation
10:06
CloningScripting languagePatch (Unix)BuildingKernel (computing)Computer-generated imageryEmulationLinker (computing)Assembly languageSoftware frameworkCloningArmSoftware frameworkSoftware testingPhysical systemScripting languageKernel (computing)MathematicsPatch (Unix)MaizeComputer fileCodeSet (mathematics)Just-in-Time-CompilerLecture/ConferenceComputer animation
11:43
Patch (Unix)Cycle (graph theory)Software testingBootingRootMathematicsLecture/Conference
12:19
Revision controlBootingPatch (Unix)Kernel (computing)Software frameworkHill differential equationExpressionBootingExpressionBitWhiteboardPhysical systemSoftware testingCASE <Informatik>Just-in-Time-CompilerComputer animation
13:14
Adaptive behaviorRevision controlBoom (sailing)Kernel (computing)Template (C++)Lecture/Conference
13:47
ExpressionSoftware frameworkDisintegrationAssembly languageKernel (computing)WebsiteAsynchronous Transfer ModeReal numberRewritingLine (geometry)Function (mathematics)CodeDifferent (Kate Ryan album)Computer animation
14:40
Drop (liquid)Right angleLecture/Conference
Transcript: English(auto-generated)
00:01
Yeah, hello everyone and thanks for joining this talk so I want to present the LLVM Linux project and we were at the last plumbers and exclusively for FOSDEM We can present the t-shirt. Yeah, because
00:21
The feedback was really nice, but you have no t-shirt. So here it is So, what's this project about First of all, well, why do we want to compile the kernel with Clang? Yeah, we have GCC
00:41
We have a compiler. So why? well one reason Is we get a few more diagnostics out of Clang, yeah In the first line you see the output from GCC in this case for two and
01:04
And the second line that's the same error for Clang and you get more informative output With Clang, that's also the reason why for example Google they built their
01:21
huge code base Side by side with GCC and Clang they use GCC in production But they built with Clang for the diagnostics. Yeah So that's one example why that could be interesting for the kernel Well, we have a lot of such
01:40
warnings errors and so on So that can be quite noisy and we have to find out. Okay, what's useful now and not but still we get a lot of information out of this and more informative hints on what What might be wrong at this?
02:02
Place also we get more informative hints on what to do what to fix so Even you see here those nice carrot pointers so Clang knows how
02:23
More detail not just something went wrong and this statement so it went wrong at this position. So that's One of the strength of Clang
02:42
Comparison for the macros in GCC you just get an error. Well we have in this macro we have An error or invalid operands In Clang we get the macro expanded so you get to know
03:00
Where in the maybe daisy chain macros the bad condition happened? Yeah, so It's not then up to you to dig through maybe multiple macros and find the The spot where the back is you get a more detailed output here another thing which is
03:29
Interesting here. Is that Clang allows? More things like we have a static analyzer Where we can create
03:41
An analysis of our code flow and we can also get Detailed information on what goes wrong for example in this branch here We are currently working on
04:03
adding this analyzer with the checker to Our compilation to the Linux kernel. It's still in early stage and of course the kernel is a huge code base, but we are working on this and We are curious to see what we will find here. What can be improved?
04:30
so What else? LLVM is also part of a few more projects for example. It's an integral part of render script in Android
04:44
it's part of the Gallium 3d engine in multiple ways and This for example also full build of Debian with Clang
05:02
Tomorrow Sylvester will have his talk and he will Talk about this in more detail. So that's where Clang is already in use There's also FreeBSD port and and also Minix 3 is using it So that's quite interesting
05:24
So now back to the Linux kernel back to our LLVM Linux project So well, of course, our goal is to build the Linux kernel with Clang
05:42
For as much architectures we can reach Clang is actually inherently a cross compiler Clang uses a kind of intermediate representation. So You parse the you parse your your code get it into an intermediate
06:05
Representation can do all sorts of optimization on that intermediate Representation and finally you dump it into the Architecture specific code. So apparently Clang is a sort of a cross compiler already
06:25
So targeting multiple architectures is actually quite easy So what we want to do is we want to enable building the kernel with feeling Currently we reach that on arm x86
06:42
We are looking into MIPS, but that doesn't have a lot of traction right now now The Goal of the project is also to find anything that's kind of a blocker So we have a few spots where kind of the kernel Tends to use a really GCC specific. Yeah and see Lang
07:05
Maybe because of its architecture cannot do that. Yes There are a few things where we have to find what's what's what's the blocker here? And actually where do we solve it? Yeah, be it a kernel or be it ceiling?
07:24
We are we are no fork of the kernel or Clang yeah, we are kind of aggregating patches for both projects and we are Contributing them back to the upstream to Clang and to the Linux kernel currently for Clang and LLVM
07:43
Our patch set is quite small. It's and it's like five for each LLVM and Clang So that's kind of up to ten for the kernel. Our patch queue is quite bigger Because we have especially on x86 a few spots where
08:02
We have to kind of jump through a few hoops loops to get it working And We want to kind of Get those patches in a shape where we can move them into mainline. So
08:25
You can find information about the project here LLVM dot Linux foundation org We have Their project status page we have the roadmap there and
08:42
You can find also our links to the build board there we have a build board running which continuously builds against kernel Clang LLVM upstream Of course with our patch set on top so we are actively
09:05
Tracking the development hat so we can we can enable the the work on upstreaming the patches Architecture supported I will Go into more details in the next slides
09:27
So website you can reach us on IRC. So we are on the channel LLVM Linux on OFTC You can reach me on my NIC DL9PF there. So just drop by the channel
09:42
If you have any questions Or if you need support if you want to try it out. We have a mailing list LLVM Linux So you can post and subscribe to that list if that was too fast to note it down take a
10:02
quick shot on the QR code I will Presented on the last slide too. All right now show me the code Just go to JIT dot Linux foundation org slash LLVM Linux dot JIT
10:24
So what do you get? So it's it's no clone of the kernel It's no clone of the LLVM and Clang what you get there is a Kind of Make framework Yeah, it's a set of make files
10:41
It will download the kernel download LLVM download C lang apply all patches and then build it So in the end you get a compiled kernel kernel compiled with clang out We still we are working on
11:01
Support for cable so we want to make all those nifty changes and all those nitty-gritty workarounds we want to Make them available in the kernels cable system. So actually we can kind of throw away our
11:22
Our scripts sooner or later So that's hosted there We also do testing in this framework So for example for the arm targets, we have a QM system arm target where you just can kind of go to the
11:47
Go to the subfolder hit make and it will build everything and even boot a root FS and test it Yeah, so complete we can Do the complete cycle until it runs so that's what we actually use
12:02
What's our tool for our work in kind of getting the patches working getting everything? working and kind of for tracking upstream and for pushing our Changes upstream just an example on how to use it. So
12:29
Could go to targets via Express and The simple case would just you you hit make. Yeah this will do everything for you and
12:41
it will it will even it allows you even to boot a target boot a test system with kyamu and Verify it works There are a few targets we have the versatile Express but also
13:00
There's a target for the MSM boards I 586 x86 64 Raspberry Pi, I think we will merge Beadle board target in the next days if it's not merged yet but that's pretty rough, but
13:20
Well, it's quite easy to set up your own target. Yeah, it's just copy the template make a few adaptions and Boom you have your own target. So it's quite easy to Create your own versions create your own adaptions
13:41
x86 currently we are the only working target here is kernel 3.3 Because we have currently huge problems on on mainline That's because we had some rewrites in the in the real mode code and
14:02
That's still making troubles right now But we are working on that okay, so What what do we have to do? Flace is a big problem for us We are debugging segment differences. So if you compile with GCC and if you compile with clang the output has different
14:27
Style of linking so that's what we are debugging moving x86 to mainline So If you have any more questions
14:42
drop by on ISC check it out and build it We are always happy if you just ask Hey, I have this blob problem or what's going on ask us on ISC. We are there. All right