Commit 79dee75b1c

Andrew Kelley <andrew@ziglang.org>
2021-05-22 23:27:56
stage2: rename ir.zig to air.zig
We've settled on the nomenclature for the artifacts the compiler pipeline produces: 1. Tokens 2. AST (Abstract Syntax Tree) 3. ZIR (Zig Intermediate Representation) 4. AIR (Analyzed Intermediate Representation) 5. Machine Code Renaming `ir` identifiers to `air` will come with the inevitable air-memory-layout branch that I plan to start after the 0.8.0 release.
1 parent 9d311e9
src/codegen/c.zig
@@ -6,7 +6,7 @@ const log = std.log.scoped(.c);
 const link = @import("../link.zig");
 const Module = @import("../Module.zig");
 const Compilation = @import("../Compilation.zig");
-const ir = @import("../ir.zig");
+const ir = @import("../air.zig");
 const Inst = ir.Inst;
 const Value = @import("../value.zig").Value;
 const Type = @import("../type.zig").Type;
src/codegen/llvm.zig
@@ -9,7 +9,7 @@ const math = std.math;
 
 const Module = @import("../Module.zig");
 const TypedValue = @import("../TypedValue.zig");
-const ir = @import("../ir.zig");
+const ir = @import("../air.zig");
 const Inst = ir.Inst;
 
 const Value = @import("../value.zig").Value;
src/codegen/spirv.zig
@@ -11,7 +11,7 @@ const Decl = Module.Decl;
 const Type = @import("../type.zig").Type;
 const Value = @import("../value.zig").Value;
 const LazySrcLoc = Module.LazySrcLoc;
-const ir = @import("../ir.zig");
+const ir = @import("../air.zig");
 const Inst = ir.Inst;
 
 pub const TypeMap = std.HashMap(Type, u32, Type.hash, Type.eql, std.hash_map.default_max_load_percentage);
src/codegen/wasm.zig
@@ -9,7 +9,7 @@ const wasm = std.wasm;
 
 const Module = @import("../Module.zig");
 const Decl = Module.Decl;
-const ir = @import("../ir.zig");
+const ir = @import("../air.zig");
 const Inst = ir.Inst;
 const Type = @import("../type.zig").Type;
 const Value = @import("../value.zig").Value;
src/link/Elf.zig
@@ -10,7 +10,7 @@ const log = std.log.scoped(.link);
 const DW = std.dwarf;
 const leb128 = std.leb;
 
-const ir = @import("../ir.zig");
+const ir = @import("../air.zig");
 const Module = @import("../Module.zig");
 const Compilation = @import("../Compilation.zig");
 const codegen = @import("../codegen.zig");
src/ir.zig → src/air.zig
File renamed without changes
src/codegen.zig
@@ -2,7 +2,7 @@ const std = @import("std");
 const mem = std.mem;
 const math = std.math;
 const assert = std.debug.assert;
-const ir = @import("ir.zig");
+const ir = @import("air.zig");
 const Type = @import("type.zig").Type;
 const Value = @import("value.zig").Value;
 const TypedValue = @import("TypedValue.zig");
src/liveness.zig
@@ -1,5 +1,5 @@
 const std = @import("std");
-const ir = @import("ir.zig");
+const ir = @import("air.zig");
 const trace = @import("tracy.zig").trace;
 const log = std.log.scoped(.liveness);
 
src/Module.zig
@@ -21,7 +21,7 @@ const Type = @import("type.zig").Type;
 const TypedValue = @import("TypedValue.zig");
 const Package = @import("Package.zig");
 const link = @import("link.zig");
-const ir = @import("ir.zig");
+const ir = @import("air.zig");
 const Zir = @import("Zir.zig");
 const trace = @import("tracy.zig").trace;
 const AstGen = @import("AstGen.zig");
src/register_manager.zig
@@ -3,7 +3,7 @@ const math = std.math;
 const mem = std.mem;
 const assert = std.debug.assert;
 const Allocator = std.mem.Allocator;
-const ir = @import("ir.zig");
+const ir = @import("air.zig");
 const Type = @import("type.zig").Type;
 const Module = @import("Module.zig");
 const LazySrcLoc = Module.LazySrcLoc;
src/Sema.zig
@@ -52,7 +52,7 @@ const Sema = @This();
 const Value = @import("value.zig").Value;
 const Type = @import("type.zig").Type;
 const TypedValue = @import("TypedValue.zig");
-const ir = @import("ir.zig");
+const ir = @import("air.zig");
 const Zir = @import("Zir.zig");
 const Module = @import("Module.zig");
 const Inst = ir.Inst;
src/value.zig
@@ -7,7 +7,7 @@ const BigIntMutable = std.math.big.int.Mutable;
 const Target = std.Target;
 const Allocator = std.mem.Allocator;
 const Module = @import("Module.zig");
-const ir = @import("ir.zig");
+const ir = @import("air.zig");
 
 /// This is the raw data, with no bookkeeping, no memory awareness,
 /// no de-duplication, and no type system awareness.
src/Zir.zig
@@ -22,7 +22,7 @@ const Zir = @This();
 const Type = @import("type.zig").Type;
 const Value = @import("value.zig").Value;
 const TypedValue = @import("TypedValue.zig");
-const ir = @import("ir.zig");
+const ir = @import("air.zig");
 const Module = @import("Module.zig");
 const LazySrcLoc = Module.LazySrcLoc;
 
CMakeLists.txt
@@ -554,7 +554,7 @@ set(ZIG_STAGE2_SOURCES
     "${CMAKE_SOURCE_DIR}/src/codegen/x86_64.zig"
     "${CMAKE_SOURCE_DIR}/src/glibc.zig"
     "${CMAKE_SOURCE_DIR}/src/introspect.zig"
-    "${CMAKE_SOURCE_DIR}/src/ir.zig"
+    "${CMAKE_SOURCE_DIR}/src/air.zig"
     "${CMAKE_SOURCE_DIR}/src/libc_installation.zig"
     "${CMAKE_SOURCE_DIR}/src/libcxx.zig"
     "${CMAKE_SOURCE_DIR}/src/libtsan.zig"