aboutsummaryrefslogtreecommitdiff
path: root/src/codegen
AgeCommit message (Collapse)Author
2024-02-28LLVM: Don't create a debug lexical block when inliningantlilja
2024-02-28Builder: Implement StrtabString and use it for Global namesantlilja
2024-02-28LLVM: Implement more efficient blob writingantlilja
2024-02-26move Zir to std.zig.ZirAndrew Kelley
Part of an effort to ship more of the compiler in source form.
2024-02-26move Zcu.LazySrcLoc to std.zig.LazySrcLocAndrew Kelley
Part of an effort to ship more of the compiler in source form.
2024-02-26compiler: decide dbg_var scoping based on AIR blocksmlugg
This commit eliminates the `dbg_block_{begin,end}` instructions from both ZIR and AIR. Instead, lexical scoping of `dbg_var_{ptr,val}` instructions is decided based on the AIR block they exist within. This is a much more robust system, and also results in a huge drop in ZIR bytes - around 7% for Sema.zig. This required some enhancements to Sema to prevent elision of blocks when they are required for debug variable scoping. This can be observed by looking at the AIR for the following simple test program with and without `-fstrip`: ```zig export fn f() void { { var a: u32 = 0; _ = &a; } { var a: u32 = 0; _ = &a; } } ``` When `-fstrip` is passed, no AIR blocks are generated. When `-fno-strip` is passed, the ZIR blocks are lowered to true AIR blocks to give correct lexical scoping to the debug vars. The changes here incidentally reolve #19060. A corresponding behavior test has been added. Resolves: #19060
2024-02-26Merge pull request #19083 from antlilja/llvm-blockinfoAndrew Kelley
LLVM reduce size of emitted bitcode
2024-02-25Merge pull request #19080 from jacobly0/llvm-per-mod-stripAndrew Kelley
llvm: implement per-module stripping
2024-02-25Merge pull request #18906 from jacobly0/x86_64-testsAndrew Kelley
x86_64: pass more tests
2024-02-25test: rework how filtering worksJacob Young
* make test names contain the fully qualified name * make test filters match the fully qualified name * allow multiple test filters, where a test is skipped if it does not match any of the specified filters
2024-02-26Builder: Reduce size of DebugLoc abbrevantlilja
2024-02-26Builder: Use BlockInfo block to reduce size of bitcodeantlilja
2024-02-25llvm: free llvm data before running llvm optimizationsJacob Young
This reduces the max memory usage.
2024-02-25llvm: implement per-module strippingJacob Young
This avoids llvm module verification errors when the strip option is different across modules.
2024-02-25Merge pull request #19074 from antlilja/llvm-debug-locJacob Young
Rework LLVM debug locations to not emit them twice
2024-02-25llvm: remork memory management in emitJacob Young
2024-02-25x86_64: implement optional comparisonsJacob Young
Closes #18959
2024-02-25Sema: implement vector coercionsJacob Young
These used to be lowered elementwise in air, and now are a single air instruction that can be lowered elementwise in the backend if necessary.
2024-02-25Builder: Fix llvm ir debug location outputantlilja
2024-02-25Builder: Improve debug location systemantlilja
Debug locations are no longer emitted twice every time
2024-02-24BitcodeWriter: cleanup type widthsJacob Young
2024-02-24Builder: fix bitcode widthsJacob Young
2024-02-24Builder: Emit metadata attachment for globalsantlilja
2024-02-23llvm: revert debug file path resolution changesJacob Young
Fixes test-stack-traces on windows.
2024-02-23Builder: fix inconsequential llvm ir flag syntaxJacob Young
2024-02-23llvm: optimize i32 constantsJacob Young
2024-02-23Builder: fix llvm ir/bc difference with allocasJacob Young
2024-02-23Builder: fix aliases in bitcodeJacob Young
2024-02-23Builder: fix x86_fp80 constants in bitcodeJacob Young
2024-02-23Builder: fix minor llvm ir syntax errorsJacob Young
2024-02-23Builder: implement opaque structs in bitcodeJacob Young
2024-02-23Builder: change tuple metadata to not be inlined in llvm irJacob Young
2024-02-23llvm: revert bad cleanupJacob Young
2024-02-23Builder: fix inconsequential llvm ir metadata syntaxJacob Young
2024-02-23Builder: sync distinct bits with previous implementationJacob Young
2024-02-23LLVM Builder: Make some Metadata no longer be distinctantlilja
2024-02-23LLVM Builder: Formattingantlilja
2024-02-23Builder: fix debug location of the first instruction in a blockJacob Young
2024-02-22Builder: fix float constants in llvm irJacob Young
2024-02-22Builder: fix bitcode strtabJacob Young
2024-02-22Builder: fix llvm ir value namesJacob Young
Hello world now verifies when not stripped.
2024-02-22LLVM: Set new debug location after inliningantlilja
2024-02-22LLVM Builder: Emit metadata kinds and function metadata attachmentsantlilja
2024-02-22LLVM Builder: Emit type for debug subprogramantlilja
2024-02-22Builder: support printing metadata in llvm irJacob Young
2024-02-22LLVM Builder: Fix on 32-bit systemsantlilja
2024-02-21LLVM Builder: Emit debug vector types with DIVector flagantlilja
2024-02-21LLVM Builder: Correctly emit debug subrangesantlilja
The bitcode abbrev was missing the subrange code
2024-02-21LLVM Builder: Rework MetadataString to not rely on Stringantlilja
This fixes a problem where empty strings where not emitted as null. This should also emit a smaller stringtab as all metadata strings were emitted in both the strtab and in the strings block inside the metadata block.
2024-02-21llvm: fix builds that don't link with libllvmJacob Young