Ecosyste.ms: OpenCollective

An open API service for software projects hosted on Open Collective.

github.com/swiftwasm/wasmtime

Standalone JIT-style runtime for WebAsssembly, using Cranelift
https://github.com/swiftwasm/wasmtime

Don't create value aliases when legalizing ABI boundaries.

When converting from ABI types to original program types, the final
conversion instruction can p...

f9d3e654194c96d2dad9d7436794db443727a18a authored over 7 years ago by Jakob Stoklund Olesen <[email protected]>
Avoid creating value aliases in legalizer/split.rs.

When we're splitting an EBB argument, we insert a iconcat/vconcat
instruction that computes the ...

c716d86c8d887a3adbc52c369264fda50d961f84 authored over 7 years ago by Jakob Stoklund Olesen <[email protected]>
Avoid creating aliases when expanding legalizer patterns.

Now that we can detach and reuse all values, there is no longer a need
to create a lot of alias ...

3ae0fe6e2bfa1fcc8d43a1b65e76f26ed2f27840 authored over 7 years ago by Jakob Stoklund Olesen <[email protected]>
Add a with_results() method to the InsertBuilder.

This makes it possible to reuse one or more result values in the
instruction that is being inser...

e58218361977b95ab692817bc4a698f35ac529b0 authored over 7 years ago by Jakob Stoklund Olesen <[email protected]>
Return the removed instruction from Cursor::remove_inst().

This is convenient for asserting that the right instruction was removed.

2e64bb88baea633ea9b340b4d875246db40353a8 authored over 7 years ago by Jakob Stoklund Olesen <[email protected]>
Add a make_inst_results_reusing() generic method.

This is a generalization of the existing make_inst_results() which lets
you provide some or all ...

8252b05b924488882522e3c15cc59523f21de59c authored over 7 years ago by Jakob Stoklund Olesen <[email protected]>
Add remove_inst() methods to Cursor and Layout.

We didn't have a way of removing instructions again.

bcb3882ef602baf54d6edf6ddaa84cddee9c71de authored over 7 years ago by Jakob Stoklund Olesen <[email protected]>
Add some safety checks for detached values.

These methods are used to reattach detached values:

- change_to_alias
- attach_result
- attach_...

e2f8924c30529ac9301a09ec5b93d06f6c7fc843 authored over 7 years ago by Jakob Stoklund Olesen <[email protected]>
Flatten the Value reference representation.

All values are now references into the value table, so drop the
distinction between direct and t...

23ae70cacf70f8419d26a11c69737e2db1fbd017 authored over 7 years ago by Jakob Stoklund Olesen <[email protected]>
Remove the first_type() methods from InstructionData.

Also remove the type field from all the variants. The type of the first
result value can be reco...

7cac9dcb413eb449d109eab7fa798e7ffe2ecb93 authored over 7 years ago by Jakob Stoklund Olesen <[email protected]>
Make tests less sensitive to specific value numbers.

0be78f970cfdca5844a0cada3a8960f9b39ac0a6 authored over 7 years ago by Jakob Stoklund Olesen <[email protected]>
Don't assume all first results are direct values.

We're about to change that.

06b52744db657d1ce12900aeea9185dfb4f45eb8 authored over 7 years ago by Jakob Stoklund Olesen <[email protected]>
Stop calling Value::new_direct.

We only ever create table values now.

Simplify legalizer::legalize_inst_results. Instead of cal...

b9808bedc4e590961bd8b73ff9ab2692596c00cf authored over 7 years ago by Jakob Stoklund Olesen <[email protected]>
Stop linking result values together.

Since results are in a value list, they don't need to form a linked
list any longer.

- Simplify...

00ee850e33a7ea405867639bbe0fe239a5ee1dba authored over 7 years ago by Jakob Stoklund Olesen <[email protected]>
Move the ctrl_typevar function into dfg.

Soon, InstructionData won't have sufficient information to compute this.

Give TargetIsa::encode...

9c6a36d36d49cb10374c2ece53848ad0b157d51d authored over 7 years ago by Jakob Stoklund Olesen <[email protected]>
Add detach_results(), attach_result(), and append_result() methods.

These low-level methods for manipulating instruction result value lists
will replace the existin...

96cc0242a6209d2c626e73619d1bca1d0589cb16 authored over 7 years ago by Jakob Stoklund Olesen <[email protected]>
Don't attach a first result in make_inst().

That is now the job of make_inst_results().

08b4c5f52415b5dbd3dfedd4daa48d27b9139869 authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Remove the second_result field from instructions.

Now that result values are stored in value lists in the DFG, these
head-of-list pointers are no ...

8b840e0a9ae7fb52b5d2e15d07e9edd32c36e0d8 authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Simplify the back-end of InstBuilder.

We don't want to distinguish between single-result and multiple-result
instructions any longer.
...

69180a2f84394ed7360529e888e4eb145780257d authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Change dfg.inst_results to return a slice.

Now we can access instruction results and arguments as well as EBB
arguments as slices.

Delete ...

3c99dc0eb48bee1bc2bbbec53632eb7ba46225c2 authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Add EntityList::first().

This is the same as slice::first(), except it returns the first element
by value.

The implement...

35d52872d9ac734638c27cdd0c8fd1e458d2cea9 authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Maintain a ValueList with the results of each instruction.

This is the first step of a larger refactoring to represent instruction
results as value lists i...

7d47053645f0e0399adcf795f31e343db732bf9b authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Make the dfg.insts table private again.

- Add a dfg.is_inst_valid() method for the verifier.
- Use the inst_args_mut() method when rewri...

84be6706443084291f299bc72c0f8feb840e1eb0 authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Stop maintaining a linked list of EBB arguments.

Now that we have a value list of the arguments, we can get rid of:

- The first_arg and last_arg...

20ca22f6eb41e9f98be59f6b07c9aa625fb24e8d authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Return the whole value list from detach_ebb_args().

Rather than returning the head of a linked list of EBB arguments, just
return the whole value li...

77a26b43456aab25fd411fe9ce7df6dc499f9017 authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Keep EBB arguments in a ValueList.

This is the first step of the value list refactoring which will replace
linked lists of values w...

ccba325b6ccbc84e8fa53908c199a428a2cbbc36 authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Add RISC-V call instruction encodings.

Calls are jal with a fixed %x1 link register.

1c890f317dfe4f177f8466ff34a4ee1520f6982a authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Extending loads and truncating stores

ca448d4ede5030b341dc385bbf1a5f49d6a681ef authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Add load and store instructions.

Define a MemFlags class, currently holding a notrap and aligned flag.

9d9807688c58db5020f278365c7fa7d24adf6e58 authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Ensure that the docs examples verify as Cretonne IL.

Any *.cton files in the docs directory are now included when running the
test-all.sh script. Thi...

46f03934170c33b51e1cf173965ca4118246609a authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Add heap_load, heap_store, and heap_addr instructions.

These are used when lowering WebAssembly sandbox code.

b5237b6a4afe49b771582608e283f762bee21037 authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Add a Uoffset32 immediate operand kind.

WebAssembly memory instructions encode a 32-bit unsigned offset that is
used to compute an effec...

ca12a683ac6976c9db14435e61fecc7eeae03d1e authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Define stack_load, stack_store, and stack_addr instructions.

c52e3e0b3f1dce0837fa0da8da54c961ad16d3a8 authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Add Offset32 support to the parser.

af2516e996a48ae8c89447a39195d6f51388d610 authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Add an Offset32 immediate operand kind.

This will be used to represent an immediate 32-bit signed address offset
for load/store instruct...

ab1e51002d20a22104a353d4f3209c71566c3ccc authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Syntax tweak: Omit comma after an initial enum immediate.

This affects the comparison instructions which now read "icmp ult a, b".
This mimics LLVM's styl...

13b0046ed754731ce6262273c2db1bff56d0669b authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Add jump encodings to RISC-V.

Fix a bug in gen_encoding.py when dealing with non-polymorphic
instructions where the type varia...

d2f575b54ab9b59c0280e104790fbf052eca8f60 authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Add a fallthrough instruction.

Change jumps to fallthroughs in the branch relaxation pass before
computing the EBB offsets.

e5e5b30315098c7f382c7cc873866921fd0bef3c authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Add an iterators module with extra Iterator methods.

Start with an adjacent_pairs() iterator adapter.

c6e027207c64bd6da431982a12217c29556d32bd authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Use EBB offsets for encoding RISC-V branches.

Stop emitting EBB relocations. Use the offsets computed by
relax_branches() to encode the correc...

1440b673fc0088ff3c35731c2f09fd26bf85813e authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Fix a bug in the binemit file test.

Only emit each instruction once, or the offset computations go all
wrong.

e56482d0fdfd4e229e5d4fca61232c4c8b13bc22 authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Add a branch relaxation pass for #72.

Compute exact EBB header offsets and check that branches are in range.

Not implemented yet: Rel...

b5c74fdc25614a73565a68bceb70e1437d570941 authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Add encoding size information to EncInfo.

Two new pieces of information are available for all encoding recipes:

- The size in bytes of an...

eb1052718bf0d2997724b3f6a0b18aeea2052272 authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Move encoding-related information into an EncInfo struct.

The tables returned by recipe_names() and recipe_constraints() are now
collected into an EncInfo...

6ab35e54b89227e7f3fde7dc9c6ee1c371f9b500 authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Add a CodeOffset type and CodeSink::offset() method.

We need to keep track of code offsets in order to compute accurate
branch displacements.

847c8045fd121c17ddd39d71cada2c0ae175a86f authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
rustfmt 0.8.1

8353651559b3db82bac49c306855f015c7713226 authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Add RISC-V encodings for brz and brnz.

These branches compare a register to zero. RISC-V implements this with
the %x0 hard-coded zero r...

3a47b40ff8232202aa484912e8f40744e696b5db authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Add conditional branch encodings for RISC-V.

Not all br_icmp opcodes are present in the ISA. The missing ones can be
reached by commuting ope...

39e102b155b192fcfdbcb6515f90545ba90b19dd authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Add the br_icmp instruction.

This instruction behaves like icmp fused with brnz, and it can be used
to represent fused compar...

d2ddc700a82f7c2033aac4b555792f03ec771c40 authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Add RISC-V encodings for lui.

This instruction can materialize constants with the low 12 bits clear.

175b26976006309d85a22c552eae1502e23ac97b authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Add icmp_imm encodings for RISC-V.

The ISA has icmp_imm slt/ult with 12-bit signed immediate operands.

c13c318ec4745310a9893cf9b0aa793a1c4acb54 authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Give singleton type variables the type's doc string.

This reads better than "typeof(b1)".

d4d76c8d7695712d7ce6525db6795da3899b843a authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Use the right operand when documenting type variable inference.

The meaning of format.typevar_operand changes recently to be relative to
value operands only ins...

ec29283abb0c18921d70402e6b01215d3af16c1c authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Add an icmp_imm instruction.

Compare a scalar integer to an immediate constant. Both Intel and RISC-V
ISAs have this operatio...

2e45365ee11b66a9bb23a1f6e20839bc44245e48 authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Skip the Python checks if the Python files haven't changed.

6532cbab6cc2636bd6af8023670d4f18dcede343 authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Emit Rshamt-type instructions for RISC-V.

These are the shift-by-immediate instructions.

8187fd73719a02064f055ba6efd3b64c895588d1 authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Emit I-type instructions for RISC-V.

These are the BinaryImm formats.

7c9d187b6dbd71a25f89adac3fe020589d4af37c authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Add RISC-V encodings for supported icmp variants.

Only slt and ult variants are in the instruction set. Other condition
codes must be synthesized.

39fc0eb3cf7514c351dac81768a3356f3946afa2 authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Add InstructionFormat.imm_fields.

Consolidate the imm_members and imm_kinds into this list so the
FormatField is the single defini...

89ff979d75306cff5aa4e55ba0777d3cc58f3af3 authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Allow for instructions with operands in encodings.

When defining an instruction encoding, allow part of the instruction
predicate to be provided as...

ebc418d25ebfbafd31b70904c078067a7b0add43 authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Add Apply.inst_predicate().

Compute an instruction predicate from any constant values given as
arguments for the immediate o...

3c3d06837966e3de8975782f30db88602c9dd392 authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Add an IsEqual FieldPredicate.

Compare an immediate operand to a constant value.

b31ca83b919f4724e9054ccfb6fb3ea7eeeb71d9 authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Add a mypy.ini file and enable some more warnings.

Also require all Python functions to have a type declaration.

3b0ac20ce20c80c26ed0b1461d9f103031822a3e authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Add mypy types for gen_settings.py.

a9ec28ab7c9526c3dfa477e3460a4c68326ad8d3 authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Add mypy types for gen_encoding.py.

49766bae1215dfd2cbef489680aca16d044b1ac4 authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Add mypy types for gen_instr.py.

Declare the Instruction.number opcode number field.

c5f2ef8edba802bf52c22854eeb4cbf02fcc625d authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Verify integrity of the existing control flow graph of the context. (#70)

* Verify integrity of the existing control flow graph of the context.

* Make checking more th...

b94d01f892644f8ac92861251298498ed82bcab4 authored almost 8 years ago by Angus Holder <[email protected]>
Add more mypy annotations.

a82e521291b336fafd4dee46bcf00ba715b3e119 authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Add mypy annotations to cdsl.predicates, settings.

Wherein we learned that only BoolSettings can be used as predicates.

ae12c94d04307c0c5f8cebd7d684295374ffb525 authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Allow dot syntax notation for enumerated immediate operands.

The meta language patterns sometimes need to refer to specific values of
enumerated immediate op...

d2eb745265b0fdbe68f1f47938affd51be58b73a authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Use pretty_verifier_error in runone too.

ffeeba7c93ad3764312b6ba6b0534053aafa4c6f authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Run verifier after legalizer and regalloc file tests.

Run the verify_contexti() function after invoking the legalize() and
regalloc() context function...

e1711f42f6891a5faaf804b0ed25eb9d31e9ddc2 authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Allow vector types for isplit and iconcat.

These two instructions make sense for vector types by simply performing
the same operation on ea...

de543bb30843cffd20516b23fb0c2f8ceeecdc06 authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Fix a type error in the legalizer patterns.

The carry and borrow values are boolean, so we have to convert them to
an integer type with bint...

62641d4553b7cc673cd1543f92b32ef0f8ebe2d5 authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Test binary encodings of some RV32I instructions.

These are the R-format instructions in RV32I.

a5d483900240872f60669830c769a38c9b1d1a7a authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Add Vim syntax support for Name and HexSequence tokens.

Also disable spell checking for .cton files. They tend to contain very
few words, and even comme...

f968c607242e31899182e03a46a4c785700afe1f authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Type checking and Dominator Tree integrity checks in Verifier (#66)

* Verify that a recomputed dominator tree is identical to the existing one.
* The verifier now ...

b5fda64b49e5bf889344360ae459658680519b2b authored almost 8 years ago by Angus Holder <[email protected]>
Allow for unencoded instructions in the binemit tests.

If an instruction doesn't have an associated encoding, use the standard
TargetIsa hook to encode...

1d6049b8f839039b44d2134ffe572902b2aae66d authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Add a binemit test command.

This makes it possible to write file tests that verify the binary
encoding of machine code.

36eb39a1f8a5f6ceb756e285b70ba0c01b36c371 authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Generate binemit::emit_inst() functions.

Use the meta language encoding recipes to generate an emit_inst()
function for each ISA. The gen...

ca2b1c79d7337e1efa23778fd720e961b66292ef authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Start the binemit module.

This module will provide supporting code for emitting binary machine
code with relocations.

bbbae4dc47484f93bfb934c281bd517915f7e51e authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Add dfg.inst_args(_mut) methods.

A shortcut for calling arguments() directly that goes with the existing
inst_results() method.

f710f139493c5ef46ea751c699189dc98d7d5c81 authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Legalize EBBs in a reverse post-order.

This means that whenever we need to split a value, it is either already
defined by a concatenati...

c5c9f211df2ec9c6e2cf51f41f24799bbc3a20fd authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Remove spurious shell redirections from install commands.

cd52b671e6f81a85bb797f357a10115919d3cd95 authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Simplify branch arguments after splitting EBB arguments.

The EBB argument splitting may generate concat-split dependencies when
it repairs branch argumen...

12b2af3f8a4a60a6fccbd2fe2a6fbc0962e07131 authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Limit type inference for controlling type variables in write.rs

07740b5e3cc14428ec3cd4be8c3ba662665bf19c authored almost 8 years ago by Keith Yeung <[email protected]>
Fix weird indentation.

098a48e3324f6c652f9cdecdea29a91d3a9e83b2 authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Iteratively split EBB arguments.

When the legalizer splits a value into halves, it would previously stop
if the value was an EBB ...

19db81f6a81fc9a4f960b4be928afc2e05d61548 authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Add a DataFlowGraph::replace_ebb_arg() method.

This is needed for rewriting EBB arguments with legalized types.

2ebbc78f74b50e5526afc58609bfd4c1ff597b0e authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Add a ControlFlowGraph argument to legalize_function.

Legalizing some instructions may require modifications to the control
flow graph, and some opera...

e941a7db5f1c934b0c1f3f12d3c23fa5e2e737fd authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Rename the 'cfg' module to 'flowgraph'.

The 'cfg' name was easy to confuse with 'configuration'.

f84e218a932bf76220d7cc0a10fba2375af212ed authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Avoid generating value split instructions.

The legalizer often splits values into parts with the vsplit and
isplit_lohi instructions. Avoid...

22334bcb54bcce89abc2d4161c7c5279504869d6 authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Strip the _lohi suffix from the isplit instructions.

For symmetry with the vector splitting instructions, we now have:

isplit iconcat
vsplit...

a44a4d2718af4f513eed2114d45278b607ad377a authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Move ABI boundary legalization into a sub-module.

Keep things organized.

159486c70735a87bbc4297dc5350b47ffe314c0d authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Add OpcodeConstraints::value_argument_constraint().

As discussed in #3.

Once we know the controlling type variable of a polymorphic instruction,
th...

90d68e0435204810bd5cb0680cf7b48010d41f0c authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Verify that values have a valid reference to either an instruction inserted in an EBB, or an EBB inserted in the layout.

298cf2ed2110473a4ac89c9ba29b09919383eec4 authored almost 8 years ago by Angus Holder <[email protected]>
Verify that values are defined by an EBB/instruction that dominates the instruction that uses them.

c596ea1ac1d94e98fc86cfeb46d980eb84001311 authored almost 8 years ago by Angus Holder <[email protected]>
Verify that all predecessors to an EBB are valid branches, and have the EBB recorded as a successor.

bb0246c8c1496dcda6441aceb058104b844fdfb9 authored almost 8 years ago by Angus Holder <[email protected]>
Fix a bug in analyze_call().

The call arguments on call_indirect should not include the fixed callee
argument.

Add legalizer...

e83cccb6fc956c59871284da3bd6544aeebcee8b authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>
Legalize return values from call instructions.

Like the entry block arguments, the return values from a call
instruction need to be converted b...

a8a7cebe8c7796870a07ec9e4c960b4ed8d5e004 authored almost 8 years ago by Jakob Stoklund Olesen <[email protected]>