Commit Graph

75 Commits

Author SHA1 Message Date
bjorn3
1a99ac6b4a Always use extern crate std in cranelift-frontend 2019-10-02 11:50:44 -07:00
Joshua Nelson
a1f6457e8a Allow building without std (#1069)
Closes https://github.com/CraneStation/cranelift/issues/1067
2019-09-26 18:00:03 +02:00
Erin Power
5426e42a27 Revert "Remove FunctionBuilderContext from API, and change FunctionBuilder API"
This reverts commit 39e638af99dbe6537bc935bfb1a74669b62877b3.
2019-09-17 08:58:46 +02:00
Wander Lairson Costa
a51606bfeb [frontend] Add message for pristine assertion violation
After we add any instruction to an EBB, we can't add EBB parameters
anymore. There is an assertion in `append_ebb_param` to detect this
error, but the backtrace generated doesn't give any hint what happened.

We add an error message to the assertion so the user can understand what
is wrong.

fixes #1003
2019-09-16 14:55:19 +02:00
Nicolas B. Pierron
abb157315b Basic Blocks: Fix frontend::sample_function test case. (#1007) 2019-09-10 15:02:11 -06:00
Julian Seward
c6a4c60a0f EbbHeaderBlockData::predecessors: use SmallVec instead of Vec
Allocations associated with pushes to EbbHeaderBlockData::predecessors account
for 4.9% of all heap allocation (calls) in CL.  This change avoids almost all
of them by changing it to be a SmallVec<[PredBlock; 4]>.  Dynamic instruction
count falls by 0.15%.
2019-09-09 11:37:04 +02:00
Aaron Power
8fd1128990 Remove FunctionBuilderContext from API, and change FunctionBuilder API 2019-09-07 14:43:07 -07:00
Nicolas B. Pierron
1c5711c12b Basic Block: Fix IR builder library example. (#989) 2019-09-06 14:27:02 -06:00
Nicolas B. Pierron
891944dba1 Generate basic-blocks instead of Ebb in frontend::switch. (#981) 2019-09-06 14:07:06 -06:00
Pat Hickey
89d741f8ae upgrade to target-lexicon 0.8.0
* the target-lexicon crate no longer has or needs the std feature
  in cargo, so we can delete all default-features=false, any mentions
  of its std feature, and the nostd configs in many lib.rs files
* the representation of arm architectures has changed, so some case
  statements needed refactoring
2019-09-04 15:12:17 -07:00
Joshua Nelson
bf77985e25 Fix broken links using rustdoc nightly
Uses cross-crate documentation links so that rustdoc does the hard work
of making relative links for us.

Requires nightly version of rustdoc in order to generate links based on
path names, see
https://github.com/rust-lang/rfcs/blob/master/text/1946-intra-rustdoc-links.md
for details.
2019-08-19 11:48:37 +02:00
Carmen Kwan
19257f80c1 Add reference types R32 and R64
-Add resumable_trap, safepoint, isnull, and null instructions
-Add Stackmap struct and StackmapSink trait

Co-authored-by: Mir Ahmed <mirahmed753@gmail.com>
Co-authored-by: Dan Gohman <sunfish@mozilla.com>
2019-08-16 11:35:16 -07:00
Sean Stangl
70c91f913d Produce more helpful basic block errors in cranelift-frontend.
Previously, the error just notified that there was a failure.
The new-style error says specifically in which ebb, on which instruction.
2019-07-23 07:58:57 -06:00
Sean Stangl
ffa9d315e6 Add some comments to the frontend code. 2019-07-23 07:58:57 -06:00
Sean Stangl
8efaeec502 Verify that FunctionBuilder blocks are basic blocks in debug mode (#857)
To use, enable the "basic-blocks" feature on cranelift-frontend.
2019-07-19 09:52:05 -06:00
Mark McCaskey
f856b124fd Use Default trait for Position and DisplayFunctionAnnotations (#843) 2019-07-12 11:21:00 +02:00
Benjamin Bouvier
d7d48d5cc6 Add the dyn keyword before trait objects; 2019-06-24 11:42:26 +02:00
bjorn3
c27b0a0c3e Add note about needing to call func.dfg.collect_debug_info for set_val_label to have any effect 2019-05-15 09:26:16 +02:00
Yury Delendik
8f95c51730 Reconstruct locations of the original source variable 2019-05-09 00:35:44 -07:00
bjorn3
45efbf7973 Optimize switch codegen and improve docs (#712) 2019-03-26 11:04:02 +01:00
bjorn3
b4608c02c7 Fixed test 2019-03-05 06:19:46 -08:00
Dan Gohman
395de457c0 Add more tests for emit_small_memset and emit_small_memcpy. (#1) 2019-03-05 06:19:46 -08:00
bjorn3
2d2b041766 Fix emit_small_memset 2019-03-05 06:19:46 -08:00
Rett Berg
084722a118 fix typos in cranelift-frontend/src/lib.rs 2019-02-06 20:31:01 -08:00
lazypassion
747ad3c4c5 moved crates in lib/ to src/, renamed crates, modified some files' text (#660)
moved crates in lib/ to src/, renamed crates, modified some files' text (#660)
2019-01-28 15:56:54 -08:00