aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/spirv.zig
AgeCommit message (Collapse)Author
2021-11-30allocgate: std Allocator interface refactorLee Cannon
2021-11-01Fix ensureTotalCapacity calls that should be ensureUnusedCapacity callsRyan Liptak
If these functions are called more than once, then the array list would no longer be guaranteed to have enough capacity during the appendAssumeCapacity calls. With ensureUnusedCapacity, they will always be guaranteed to have enough capacity regardless of how many times the function is called.
2021-10-21stage2: more division supportAndrew Kelley
AIR: * div is renamed to div_trunc. * Add div_float, div_floor, div_exact. - Implemented in Sema and LLVM codegen. C backend has a stub. Improvements to std.math.big.Int: * Add `eqZero` function to `Mutable`. * Fix incorrect results for `divFloor`. Compiler-rt: * Add muloti4 to the stage2 section.
2021-10-02Delete Module.Scope, move Block into SemaMartin Wickham
2021-10-02Remove my dumb "namespace decl" hackMartin Wickham
2021-09-24Spelling corrections (#9833)Josh Soref
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
2021-09-19Update all ensureCapacity calls to the relevant non-deprecated versionRyan Liptak
2021-07-20stage2: update LLVM backend to new AIR memory layoutAndrew Kelley
Also fix compile errors when not using -Dskip-non-native
2021-07-20stage2: Air and Liveness are passed ephemerallyAndrew Kelley
to the link infrastructure, instead of being stored with Module.Fn. This moves towards a strategy to make more efficient use of memory by not storing Air or Liveness data in the Fn struct, but computing it on demand, immediately sending it to the backend, and then immediately freeing it. Backends which want to defer codegen until flush() such as SPIR-V must move the Air/Liveness data upon `updateFunc` being called and keep track of that data in the backend implementation itself.
2021-07-20stage2: first pass over Module.zig for AIR memory layoutAndrew Kelley
2021-07-20stage2: update Liveness, SPIR-V for new AIR memory layoutAndrew Kelley
also do the inline assembly instruction
2021-07-20stage2: rework AIR memory layoutAndrew Kelley
This commit changes the AIR file and the documentation of the memory layout. The actual work of modifying the surrounding code (in Sema and codegen) is not yet done.
2021-07-12C backend: TypedefMap is now ArrayHashMapAndrew Kelley
The C backend depends on insertion order into this map so that type definitions will be declared before they are used.
2021-06-21std, src, doc, test: remove unused variablesJacob G-W
2021-06-10zig fmtAndrew Kelley
2021-06-03Breaking hash map changes for 0.8.0Martin Wickham
- hash/eql functions moved into a Context object - *Context functions pass an explicit context - *Adapted functions pass specialized keys and contexts - new getPtr() function returns a pointer to value - remove functions renamed to fetchRemove - new remove functions return bool - removeAssertDiscard deleted, use assert(remove(...)) instead - Keys and values are stored in separate arrays - Entry is now {*K, *V}, the new KV is {K, V} - BufSet/BufMap functions renamed to match other set/map types - fixed iterating-while-modifying bug in src/link/C.zig
2021-05-22Merge pull request #8852 from Snektron/spirvAndrew Kelley
SPIR-V: More codegen
2021-05-22stage2: rename ir.zig to air.zigAndrew Kelley
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.
2021-05-22SPIR-V: Make functions which always return a null result return void insteadRobin Voetter
2021-05-22SPIR-V: Generate locals at the start of a functionRobin Voetter
2021-05-22SPIR-V: Debug line info/source infoRobin Voetter
2021-05-22SPIR-V: DeclGen constructor/destructorRobin Voetter
2021-05-22SPIR-V: branchingRobin Voetter
2021-05-22SPIR-V: Pass source location to genType and genConstant for better error ↵Robin Voetter
reporting
2021-05-22SPIR-V: Preliminary alloc/store/load generationRobin Voetter
2021-05-22SPIR-V: Split out genCmp from genBinOpRobin Voetter
2021-05-22SPIR-V: Preliminary integer constant encodingRobin Voetter
2021-05-22SPIR-V: ResultId and Word aliases to improve code clarityRobin Voetter
2021-05-22SPIR-V: Put types in SPIRVModule, some general restructuringRobin Voetter
2021-05-22SPIR-V: Use Value.toFloat instead of switching on value tag when generating ↵Robin Voetter
float constants
2021-05-17Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgenAndrew Kelley
Conflicts: * src/codegen/spirv.zig * src/link/SpirV.zig We're going to want to improve the stage2 test harness to print the source file name when a compile error occurs otherwise std lib contributors are going to see some confusing CI failures when they cause stage2 AstGen compile errors.
2021-05-16SPIR-V: Unary not operationRobin Voetter
2021-05-16SPIR-V: bool binary operationsRobin Voetter
2021-05-16SPIR-V: comparison and equality operationsRobin Voetter
2021-05-16SPIR-V: More bitwise binary operationsRobin Voetter
2021-05-16SPIR-V: More binary operationsRobin Voetter
2021-05-16SPIR-V: genBinOp setupRobin Voetter
2021-05-16SPIR-V: Some initial floating point constant generationRobin Voetter
2021-05-16SPIR-V: Some instructions + constant generation setupRobin Voetter
2021-05-16SPIR-V: Function parameter generationRobin Voetter
2021-05-16SPIR-V: OpFunction/OpFunctionEnd generationRobin Voetter
2021-05-16SPIR-V: Proper floating point type generationRobin Voetter
2021-05-16SPIR-V: Function prototype generationRobin Voetter
2021-05-16SPIR-V: Compute backing integer bitsRobin Voetter
2021-05-16SPIR-V: Restructure codegen a bitRobin Voetter
2021-05-15Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgenAndrew Kelley
Conflicts: * build.zig * src/Compilation.zig * src/codegen/spirv/spec.zig * src/link/SpirV.zig * test/stage2/darwin.zig - this one might be problematic; start.zig looks for `main` in the root source file, not `_main`. Not sure why there is an underscore there in master branch.
2021-05-14SPIR-V: Begin generating typesRobin Voetter
2021-02-24zig fmt src/Andrew Kelley
2021-01-19SPIR-V: Use free list for result id generationRobin Voetter
2021-01-19SPIR-V: OpMemoryModel and basic capability generationRobin Voetter