mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 11:41:05 +01:00
Note I'm mostly trying to capture [the docs](https://docs.google.com/document/d/1RRYMm42osyqhI2LyjrjockYCutQ5dOf8Abu50kTrkX0/edit?resourcekey=0-kHyqOESbOHmzZphUbtLrTw&tab=t.0) as they exist today, not fixing issues with the docs. I think the doc itself hasn't changed much lately (i.e., for months). Trying to organize it a little better though, particularly so that it shows up reasonably when looking in github or the website. --------- Co-authored-by: Geoff Romer <gromer@google.com>
26 lines
671 B
Markdown
26 lines
671 B
Markdown
# Lower
|
|
|
|
<!--
|
|
Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
|
Exceptions. See /LICENSE for license information.
|
|
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
-->
|
|
|
|
<!-- toc -->
|
|
|
|
## Table of contents
|
|
|
|
- [Overview](#overview)
|
|
|
|
<!-- tocstop -->
|
|
|
|
## Overview
|
|
|
|
Lowering takes the SemIR and produces LLVM IR. At present, this is done in a
|
|
single pass, although it's possible we may need to do a second pass so that we
|
|
can first generate type information for function arguments.
|
|
|
|
Lowering is done per `SemIR::InstBlock`. This minimizes changes to the
|
|
`IRBuilder` insertion point, something that is both expensive and potentially
|
|
fragile.
|