Skip to content

Commit 6538a3a

Browse files
authored
Merge pull request #156 from QuillPusher/Add_Blogs_Page_And_Nav
Adding Blog Functionality and New Blog Posts
2 parents ad4c377 + 454e6d6 commit 6538a3a

7 files changed

+203
-138
lines changed

_layouts/blog.html

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
layout: default
3+
title: Blog
4+
---
5+
<h3>Latest Posts</h3>
6+
7+
<div>
8+
{% for post in site.posts %}
9+
<div class="well">
10+
<h3>{{ post.title }}</h3>
11+
{{ post.excerpt }}
12+
<p>Read more <a href="{{ post.url }}">here</a></p>
13+
</div>
14+
{% endfor %}
15+
</div>

_pages/blog.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: "Blog"
3+
layout: blog
4+
excerpt: "Blog Posts"
5+
sitemap: false
6+
permalink: /blog/
7+
---
8+
9+
<div id="textid" class="col-sm-12">
10+
{{ content }}
11+
</div>
12+
13+

_pages/blogs/GSoC22_M_Izvekov_Project_Experience.md renamed to _posts/2022-11-30-extend-clang-to-resugar-template-specialization-accesses.md

+39-30
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,23 @@
11
---
2-
title: "GSoC 2022 Experience of Matheus Izvekov"
3-
layout: gridlay
4-
excerpt: "GSoC 2022 Experience of Matheus Izvekov"
2+
title: "Extend Clang to Resugar Template Specialization Accesses"
3+
layout: post
4+
excerpt: "Clang is an LLVM native C/C++/Objective-C compiler, which aims to
5+
deliver amazingly fast compiles, extremely useful error and warning messages
6+
and to provide a platform for building great source level tools. The Clang
7+
Static Analyzer and clang-tidy are tools that automatically find bugs in
8+
your code, and are great examples of the sort of tools that can be built
9+
using the Clang frontend as a library to parse C/C++ code. When
10+
instantiating a template, the template arguments are canonicalized
11+
before being substituted into the template pattern. Clang does not
12+
preserve type sugar when subsequently accessing members of the instantiation.
13+
This leads to many infamous pathological errors which have haunted C++
14+
developers for decades."
515
sitemap: false
616
permalink: blogs/gsoc22_izvekov_experience_blog/
17+
date: 2022-11-30
718
---
819

9-
# Extend Clang to resugar template specialization accesses
10-
11-
**Developer:** Matheus Izvekov
12-
13-
**Mentors:** Richard Smith (Google), Vassil Vassilev (Princeton University/CERN)
14-
15-
**Funding:** [Google Summer of Code 2022](https://summerofcode.withgoogle.com/)
16-
17-
---
18-
19-
**Contact me!**
20-
21-
22-
23-
Github Username: [mizvekov](https://github.com/mizvekov)
24-
25-
**Link GSoC project proposal:** [Matheus_Izvekov_Proposal_2022](https://compiler-research.org/assets/docs/Matheus_Izvekov_Proposal_2022.pdf)
26-
27-
28-
---
29-
30-
31-
## Overview of the Project
20+
### Overview of the Project
3221

3322
Clang is an "LLVM native" C/C++/Objective-C compiler, which aims to deliver
3423
amazingly fast compiles, extremely useful error and warning messages and to
@@ -56,7 +45,7 @@ Clang has the
5645
[clang::preferred_name](https://clang.llvm.org/docs/AttributeReference.html#preferred-name)
5746
attribute to improve the situation but with limited success.
5847
59-
## My approach
48+
### My approach
6049
6150
To further enhance Clang’s expressive error diagnostics system, I implemented an
6251
eager approach to syntactic resugaring in Clang. The novel approach does not
@@ -72,7 +61,7 @@ approach, although more efficient, required some intrusive modifications on the
7261
way substitutions are represented in the AST.
7362
7463
75-
## Contributions
64+
### Contributions
7665
7766
The main contributions to this project are listed here.
7867
@@ -90,7 +79,7 @@ Pull Requests:
9079
8. [D127695 - Implement Template Specialization Resugaring](https://reviews.llvm.org/D127695)
9180
9281
93-
## Contributions
82+
### Contributions
9483
9584
1. Syntactic resugar of Non Type Template Parameters (NTTPs) is still under
9685
development. When checking template arguments, we perform substitutions on NTTPs
@@ -110,8 +99,28 @@ terms of desugared code, improving the relationship between the user's source
11099
program and the program evaluation.
111100
112101
113-
## Acknowledgements
102+
### Acknowledgements
114103
115104
I thank my mentors Richard Smith and Vassil Vasilev for their excellent
116105
support, their welcoming behavior motivated me and gave me the opportunity to
117106
increase my confidence as a developer in the LLVM open community!
107+
108+
---
109+
110+
### Credits
111+
112+
**Developer:** Matheus Izvekov
113+
114+
**Mentors:** Richard Smith (Google), Vassil Vassilev (Princeton University/CERN)
115+
116+
**Funding:** [Google Summer of Code 2022](https://summerofcode.withgoogle.com/)
117+
118+
---
119+
120+
**Contact me!**
121+
122+
123+
124+
Github Username: [mizvekov](https://github.com/mizvekov)
125+
126+
**Link GSoC project proposal:** [Matheus_Izvekov_Proposal_2022](https://compiler-research.org/assets/docs/Matheus_Izvekov_Proposal_2022.pdf)

_pages/blogs/GSoC22_J_Zhang_P_Chaudhari_Experience.md renamed to _posts/2022-12-02-recovering-from-errors-in-clang-repl-and-code-undo.md

+43-30
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,25 @@
11
---
2-
title: "Summer 2022 Experience of Jun Zhang and Purva Chaudhari"
3-
layout: gridlay
4-
excerpt: "Summer 2022 Experience of Jun Zhang and Purva Chaudhari"
2+
title: "Recovering from Errors in Clang-Repl and Code Undo"
3+
layout: post
4+
excerpt: "Incremental C++ enables exploratory programming by considering the
5+
translation unit to be an ever-growing entity. This allows implementation of
6+
interpreter-like tools such as Cling and Clang-Repl, which consume C++ code
7+
piece by piece and use the JIT infrastructure to run each piecewise. One of
8+
the challenges of Incremental C++ is the reliable recovery from errors which
9+
allows the session to continue after faulty user code. Supporting reliable
10+
error recovery requires splitting the translation unit into a sequence of
11+
Partial Translation Units (PTUs). Each declaration is associated with a
12+
unique PTU that owns it. Owning PTU isn’t always the “active” (most recent)
13+
PTU and it isn’t always the PTU that the declaration comes from. Even a new
14+
declaration that isn’t a declaration or or specialization of anything
15+
belongs to the active PTU. However, in case of a template specialization,
16+
it can be pulled into a more recent PTU by its template arguments."
517
sitemap: false
618
permalink: blogs/gsoc22_zhang_chaudhari_experience_blog/
19+
date: 2022-12-02
720
---
821

9-
# Recovering from Errors in Clang-Repl and Code Undo
10-
11-
**Developers:** Jun Zhang (Software Engineering, Anhui Normal University, WuHu,
12-
China) and Purva Chaudhari (California State University Northridge, Northridge
13-
CA, USA)
14-
15-
**Mentor:** Vassil Vassilev (Princeton University/CERN)
16-
17-
---
18-
19-
**Contact us!**
20-
21-
22-
23-
GitHub username: [junaire](https://github.com/junaire)
24-
25-
26-
Purva: [Webpage](https://purva-chaudhari.github.io/My-Portfolio/)
27-
28-
GitHub username: [Purva-Chaudhari](https://github.com/Purva-Chaudhari)
29-
30-
---
31-
32-
## Overview of the Project
22+
### Overview of the Project
3323

3424
Incremental C++ enables exploratory programming by considering the translation
3525
unit to be an ever-growing entity. This allows implementation of
@@ -82,7 +72,7 @@ clang-repl> float x = 24 // not an error
8272
```
8373

8474

85-
## Contributions
75+
### Contributions
8676

8777
The main contributions to this project are listed here.
8878

@@ -102,7 +92,7 @@ Pull Requests:
10292
11. [D130831 - Track DeferredDecls that have been emitted](https://reviews.llvm.org/D130831)
10393
12. [Code gen passing](https://gist.github.com/Purva-Chaudhari/1555b887618cec569b638e96056d9679)
10494

105-
## Results
95+
### Results
10696

10797
1. We implemented the initial code undo for Clang-Repl, the patch we submitted
10898
extends the functionality used to recover from errors and adds functionality to
@@ -133,11 +123,34 @@ auto r4 = printf("bar() = %d\n", bar()); // This fails before my patch. Note thi
133123
```
134124
5. We fixed some issues in lambda usage in Clang-Repl.
135125
136-
## Conclusion
126+
### Conclusion
137127
138128
During this summer, I not only improved my technical skills but also enhanced my ability to work with others and
139129
appreciate the charm of open source. I would like to thank all the people who helped me, especially my mentor Vassil,
140130
who is not only an experienced programmer but also a respected life teacher. I'm also pretty happy working with my
141131
partner Purva, who made a great effort when preparing our LLVM Dev lightning talk this year.
142132
143133
In the future, I'll continue my journey into the world of open source, and bring the code and love to all!
134+
135+
---
136+
137+
### Credits
138+
139+
**Developers:** Jun Zhang (Software Engineering, Anhui Normal University, WuHu,
140+
China) and Purva Chaudhari (California State University Northridge, Northridge
141+
CA, USA)
142+
143+
**Mentor:** Vassil Vassilev (Princeton University/CERN)
144+
145+
---
146+
147+
**Contact us!**
148+
149+
150+
151+
GitHub username: [junaire](https://github.com/junaire)
152+
153+
154+
Purva: [Webpage](https://purva-chaudhari.github.io/My-Portfolio/)
155+
156+
GitHub username: [Purva-Chaudhari](https://github.com/Purva-Chaudhari)

_pages/blogs/GSoC22_A_Ghosh_Project_Experience.md renamed to _posts/2022-12-07-shared-memory-based-jitlink-memory-manager.md

+44-36
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,21 @@
11
---
2-
title: "GSoC 2022 Experience of Anubhab Ghosh"
3-
layout: gridlay
4-
excerpt: "GSoC 2022 Experience of Anubhab Ghosh"
2+
title: "Shared Memory Based JITLink Memory Manager"
3+
layout: post
4+
excerpt: "LLVM JIT APIs include JITLink, a just-in-time linker that links
5+
together objects code units directly in memory and executes them. It uses the
6+
JITLinkMemoryManager interface to allocate and manage memory for the generated
7+
code. When the generated code is run in the same process as the linker, memory
8+
is directly allocated using OS APIs. But for code that runs in a separate
9+
executor process, an RPC scheme Executor Process Control (EPC) is used. The
10+
controller process invokes RPCs in the target or executor process to allocate
11+
memory and then when the code is generated, all the section contents are
12+
transferred through finalize calls."
513
sitemap: false
614
permalink: blogs/gsoc22_ghosh_experience_blog/
15+
date: 2022-12-07
716
---
817

9-
# Shared Memory Based JITLink Memory Manager
10-
11-
**Developer:** Anubhab Ghosh (Computer Science and Engineering, Indian Institute
12-
of Information Technology, Kalyani, India)
13-
14-
**Mentors:** Stefan Gränitz (Freelance Compiler Developer, Berlin, Deutschland),
15-
Lang Hames (Apple), Vassil Vassilev (Princeton University/CERN)
16-
17-
**Funding:** [Google Summer of Code 2022](https://summerofcode.withgoogle.com/)
18-
19-
---
20-
21-
**Contact me!**
22-
23-
24-
25-
Github Username: [argentite](https://github.com/argentite)
26-
27-
**Link to GSoC project proposal:** [Anubhab_Ghosh_Proposal_GSoC_2022](https://compiler-research.org/assets/docs/Anubhab_Ghosh_Proposal_2022.pdf)
28-
29-
**Link to GSoC project proposal:** [Anubhab_Ghosh_Final_Report_GSoC_2022](https://compiler-research.org/assets/docs/Anubhab_Ghosh_GSoC2022_Report.pdf)
30-
31-
---
32-
33-
34-
## Overview of the Project
18+
### Overview of the Project
3519
LLVM JIT APIs include JITLink, a just-in-time linker that links together objects
3620
code units directly in memory and executes them. It uses the
3721
JITLinkMemoryManager interface to allocate and manage memory for the generated
@@ -42,14 +26,14 @@ controller process invokes RPCs in the target or executor process to allocate
4226
memory and then when the code is generated, all the section contents are
4327
transferred through finalize calls.
4428

45-
### Shared Memory
29+
#### Shared Memory
4630
The main problem was that EPC runs on top of file descriptor streams like Unix
4731
pipes or TCP sockets. As all the generated code and data bytes are transferred
4832
over the EPC this has some overhead that could be avoided by using shared
4933
memory. If the two processes share the same physical memory pages then we can
5034
completely avoid extra memory copying.
5135

52-
### Small code model
36+
#### Small code model
5337
While we are at it, another goal was to introduce a simple slab-based memory
5438
manager. It would allocate a large chunk of memory in the beginning from the
5539
executor process and allocate smaller blocks from that entirely at the
@@ -97,9 +81,9 @@ Small code model is the default for most compilations so this is actually
9781
required to load ordinary precompiled code, e.g., from existing static archives.
9882

9983

100-
## My Approach
84+
### My Approach
10185

102-
### Memory Mappers
86+
#### Memory Mappers
10387
I introduced a new `MemoryMapper` abstraction for interacting with OS APIs at
10488
different situations. It has separate implementations based on whether the code
10589
will be executed in the same or different process. The `InProcessMemoryMapper`
@@ -116,7 +100,7 @@ address. Once JITLink has written the code to those mapped addresses, they are
116100
now already in place in the executor processes so finalization is just a matter
117101
of sending the memory protections.
118102

119-
### Slab-based allocator
103+
#### Slab-based allocator
120104
Furthermore, I developed a slab-based memory allocator for JITLink, reserving a
121105
large region of memory in the address space of the target process on the first
122106
allocation. All subsequent allocations result in sub-regions of that to be
@@ -125,7 +109,7 @@ involvement. Furthermore as our all the allocation are from a contiguous memory
125109
region, it also guarantees that JIT’d memory satisfies the layout constraints
126110
required by the small code model.
127111

128-
### Concurrency problems
112+
#### Concurrency problems
129113
After the implmentation, I tried JIT linking the CPython interpreter to
130114
benchmark the implementation. We discovered that our overall CPU execution time
131115
decreased by 45% but somewhat paradoxically clock time increased by 45%. In
@@ -149,9 +133,33 @@ For a more detailed description and all the patches, please consult my
149133
[GSoC final report](https://compiler-research.org/assets/docs/Anubhab_Ghosh_GSoC2022_Report.pdf).
150134

151135

152-
## Acknowledgements
136+
### Acknowledgements
153137

154138
I would like to share my gratitude for the LLVM community members and my mentors
155139
Stefan Gränitz, Lang Hames, and Vassil Vassilev, who shared their suggestions
156140
during the project development. I hope that this project will find its place in
157141
many applications.
142+
143+
---
144+
145+
### Credits
146+
147+
**Developer:** Anubhab Ghosh (Computer Science and Engineering, Indian Institute
148+
of Information Technology, Kalyani, India)
149+
150+
**Mentors:** Stefan Gränitz (Freelance Compiler Developer, Berlin, Deutschland),
151+
Lang Hames (Apple), Vassil Vassilev (Princeton University/CERN)
152+
153+
**Funding:** [Google Summer of Code 2022](https://summerofcode.withgoogle.com/)
154+
155+
---
156+
157+
**Contact me!**
158+
159+
160+
161+
Github Username: [argentite](https://github.com/argentite)
162+
163+
**Link to GSoC project proposal:** [Anubhab_Ghosh_Proposal_GSoC_2022](https://compiler-research.org/assets/docs/Anubhab_Ghosh_Proposal_2022.pdf)
164+
165+
**Link to GSoC project proposal:** [Anubhab_Ghosh_Final_Report_GSoC_2022](https://compiler-research.org/assets/docs/Anubhab_Ghosh_GSoC2022_Report.pdf)

0 commit comments

Comments
 (0)