aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/llvm.zig
AgeCommit message (Collapse)Author
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-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: Improve debug location systemantlilja
Debug locations are no longer emitted twice every time
2024-02-23llvm: revert debug file path resolution changesJacob Young
Fixes test-stack-traces on windows.
2024-02-23llvm: optimize i32 constantsJacob Young
2024-02-23llvm: revert bad cleanupJacob 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-22Builder: support printing metadata in llvm irJacob Young
2024-02-21LLVM Builder: Emit debug vector types with DIVector flagantlilja
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
2024-02-21LLVM: Remove use of LLVM in Builderantlilja
2024-02-21codegen/llvm: Remove use of DIBuilder and output bin by parsing bitcodeantlilja
2024-02-21LLVM: Emit bitcode even if libllvm is not presentantlilja
2024-02-21LLVM: Make sure child types get added firstantlilja
The LLVM bitcode requires all type references in structs to be to earlier defined types. We make sure types are ordered in the builder itself in order to avoid having to iterate the types multiple times and changing the values of type indicies.
2024-02-20llvm: fix c abi for structs not passed in registersJacob Young
Closes #18916
2024-02-16InternPool: make more use of `NullTerminatedString.Slice`Jacob Young
This should avoid the random pointer invalidation crashes. Closes #18954
2024-02-15llvm: fix lowering of recursive debug infoJacob Young
This change allows recursing over types that are currently being resolved fully with a second pass of forward resolution. Closes #16414
2024-02-12x86_64: implement c abi for bool vectorsJacob Young
2024-02-05compiler: rename value.zig to Value.zigAndrew Kelley
This commit only does the file rename to be friendlier to version control conflicts.
2024-02-05spirv: basic shader supportAli Chraghi
2024-02-02InternPool: use separate key for slicesmlugg
This change eliminates some problematic recursive logic in InternPool, and provides a safer API.
2024-01-29llvm: ensure returned undef is 0xaa bytes when runtime safety is enabledVeikka Tuominen
Closes #13178
2024-01-29Merge pull request #18729 from Vexu/fixesAndrew Kelley
Fix some generic{Reader,Writer} related issues
2024-01-29llvm: revert bad array access optimizationVeikka Tuominen
Closes #18723
2024-01-29llvm: fix alignment of array ptr when bitcasting vectorVeikka Tuominen
Closes #17996
2024-01-16Skip all dbg instructionsocrap7
2024-01-15Sema: fix `@extern` declsJacob Young
Closes #18550
2024-01-11LLVM: fix lowering of extern anyopaqueAndrew Kelley
closes #18461
2024-01-08llvm: optional slices cannot be passed in parts when they allowzeroVeikka Tuominen
Closes #18428
2024-01-01fix population of builtin.zig not making the parent dirAndrew Kelley
2024-01-01fix remaining compile errors except oneAndrew Kelley
2024-01-01move dll_export_fns and rdynamic to Compilation.ConfigAndrew Kelley
2024-01-01update codegen.llvm references to bin_file.optionsAndrew Kelley
2024-01-01update bin_file.options references in SemaAndrew Kelley
mainly pertaining to error return tracing
2024-01-01fix a round of compile errors caused by this branchAndrew Kelley
2024-01-01compiler: miscellaneous branch progressAndrew Kelley
implement builtin.zig file population for all modules rather than assuming there is only one global builtin.zig module. move some fields from link.File to Compilation move some fields from Module to Compilation compute debug_format in global Compilation config resolution wire up C compilation to the concept of owner modules make whole cache mode call link.File.createEmpty() instead of link.File.open()
2024-01-01compiler: update many references to bin_file.optionsAndrew Kelley
2024-01-01update bin_file.options references in Module (Zcu)Andrew Kelley
2024-01-01update references to module (to be renamed to zcu)Andrew Kelley
2024-01-01linkers: update references to "options" fieldAndrew Kelley
2024-01-01compiler: update references to single_threadedAndrew Kelley
2024-01-01move a large chunk of linker logic away from "options"Andrew Kelley
These options are only supposed to be provided to the initialization functions, resolved, and then computed values stored in the appropriate place (base struct or the object-format-specific structs). Many more to go...
2024-01-01WIP: move many global settings to become per-ModuleAndrew Kelley
Much of the logic from Compilation.create() is extracted into Compilation.Config.resolve() which accepts many optional settings and produces concrete settings. This separate step is needed by API users of Compilation so that they can pass the resolved global settings to the Module creation function, which itself needs to resolve per-Module settings. Since the target and other things are no longer global settings, I did not want them stored in link.File (in the `options` field). That options field was already a kludge; those options should be resolved into concrete settings. This commit also starts to work on that, deleting link.Options, moving the fields into Compilation and ObjectFormat-specific structs instead. Some fields were ephemeral and should not have been stored at all, such as symbol_size_hint. The link.File object of Compilation is now a `?*link.File` and `null` when -fno-emit-bin is passed. It is now arena-allocated along with Compilation itself, avoiding some messy cleanup code that was there before. On the command line, it is now possible to configure the standard library itself by using `--mod std` just like any other module. This meant that the CLI needed to create the standard library module rather than having Compilation create it. There are a lot of changes in this commit and it's still not done. I didn't realize how quickly this changeset was going to balloon out of control, and there are still many lines that need to be changed before it even compiles successfully. * introduce std.Build.Cache.HashHelper.oneShot * add error_tracing to std.Build.Module * extract build.zig file generation into src/Builtin.zig * each CSourceFile and RcSourceFile now has a Module owner, which determines some of the C compiler flags.
2024-01-01Compilation: cleanup hashmap usageJacob Young
2023-12-22use `casted_rhs` instead of `rhs` so `icmp` works correctly for `airShlSat`Stefan Su