Commit graph

335 commits

Author SHA1 Message Date
Andrea Corallo
7359f9e363 * comp.el: Fix missing rx require 2020-03-15 10:27:02 +00:00
Adam Porter
46a4ca4774 comp.el: Minor improvements
Change: (comp-start-async-worker) Refactor slightly

Change: (comp-start-async-worker) Inline (comp-to-file-p)

Change: (comp-source-files) Rename from comp-src-pool

Add: (comp-start-async-worker) Assertion

Change: (comp-async-processes) Rename from comp-prc-pool

Tidy: (native-compile)

Rename variables, improve docstring, adjust log message, simplify
filename code.

Tidy: (batch-native-compile) Docstring

Tidy: whitespace-cleanup

Tidy: (comp-start-async-worker) Use () instead of nil

Tidy: (comp-files-queue) Rename from comp-source-files

Change: (native-compile-async) Improve paths support

Tidy: Comment

Save a line for one word.  :)

Change: (comp-log) Rewrite without macro, follow tail

Change: (native-compile-async) Use end-of-string in filename regexps

Change: (native-compile-async) Use cl-loop instead of dotimes

Add/Change: (comp-log-to-buffer) And use in comp-log

Comment: Tidy comment

Fix: (configure.ac) Option description

Fix: (comp-log) Argument

Fix: (comp-start-async-worker) Variable name

Change: Undo whitespace changes

Some of them included incorrect indentation because the
macros' (declare (indent)) forms were not loaded.  The
whitespace-cleanup should be run from Emacs 27+ with the file loaded.
2020-03-15 10:24:08 +00:00
Andrea Corallo
144e8f64b6 Prefix native compilation folders with "eln-" 2020-03-13 22:21:08 +00:00
Andrea Corallo
ab8fed0a96 * Do not produce .eln files when a byte compilation error happen
Have the byte compiler signal an error when compilation fails to stop
native compilation too.
2020-03-13 08:22:29 +00:00
AndreaCorallo
f21e1dfc9f * Set relocation class as ephemeral in `comp-limplify-top-level' 2020-03-10 10:42:56 +00:00
AndreaCorallo
1f3ba658fc * Do not crash if the output directory is created in the meanwhile 2020-03-03 23:06:46 +00:00
AndreaCorallo
43b6f05dfb Hash eln ABI once and add it to the output compilation path 2020-03-03 22:23:41 +00:00
AndreaCorallo
bf4f620b2f * ; Clean-up out of date comment 2020-03-01 21:10:49 +00:00
AndreaCorallo
2dae7e1b69 Add system-configuration in the compilation output path 2020-02-06 20:23:14 +00:00
Andrea Corallo
0cef208cc3 * Reorganize passes
- Make propagate responsible for keeping SSA up to date.

- Run propagate-alloc as very last before final not to risk bothering
  with mvar array allocation during previous tranformations.

- Fix SSA if TCO modify the CFG.
2020-03-01 19:22:27 +00:00
Andrea Corallo
f60cb02cdf * Allow for multiple SSA runs
Add function ssa-status as `comp-func' slot and have `comp-clean-ssa'
to run when necessary.
2020-03-01 19:22:27 +00:00
AndreaCorallo
b41d76fa5e Remove relocation index form LIMPLE setimm
Given that every object identify a relocation class simplify setimm too.
2020-03-01 19:22:27 +00:00
Andrea Corallo
5543338b0c Optimize relocation classes for object duplication
Merge duplicated  objects during final. Precendece is:
1 d-default
2 d-impure
3 d-ephemeral

Now every object identify uniquely a relocation class.  Because of
this there's no need to keep the reloc class into m-var.
2020-03-01 19:22:27 +00:00
Andrea Corallo
b7f3624924 * Rename comp-emit-set-const -> comp-emit-setimm 2020-03-01 19:22:27 +00:00
AndreaCorallo
86cc9377ce * ; Add a TODO for a future optimization 2020-02-26 12:57:45 +00:00
AndreaCorallo
6898161a2b Rename d-base allocation classe into d-default 2020-02-26 10:40:29 +00:00
AndreaCorallo
94dcb69256 Add ephemeral relocation data class
Add a new class of relocated objects that is in use just during load
process.  This in order to avoid having to maintain them in the heap
and traverse them at every GC.
2020-02-26 10:40:29 +00:00
Andrea Corallo
f0daf1292c * Two grammar fixes into async hooks doc 2020-02-26 10:40:00 +00:00
Andrea Corallo
48b131c6d1 * Add two hooks for async native compilation 2020-02-23 16:50:15 +00:00
Andrea Corallo
1dc237f280 Make build process robust against interruptions
During boo-strap we produce both the .eln and the .elc together.
Because the make target is the later this has to be produced as last
to be resilient to build interruptions.
2020-02-23 16:50:15 +00:00
AndreaCorallo
3a7aa06d15 Emit 'top_level_run' objects as impure 2020-02-21 16:05:53 +00:00
AndreaCorallo
d8e4ba2693 Reorder m-var slots 2020-02-21 15:26:45 +00:00
Andrea Corallo
81c34a35aa Update copyright years plus two style nits 2020-02-16 18:34:22 +01:00
Andrea Corallo
8c108ce607 Add a simple pass for self TCO 2020-02-16 18:11:43 +01:00
Andrea Corallo
5bd485340f Introduce comp-dry-run 2020-02-16 10:31:46 +00:00
Andrea Corallo
2a8a3a9f28 Use `sxhash-eq' to generate mvar SSA ids 2020-02-16 08:46:30 +00:00
AndreaCorallo
4b4c7535a0 Speed 2 goes default 2020-02-15 10:17:08 +01:00
AndreaCorallo
3b3525b916 Backward propagate only once 2020-02-15 10:17:08 +01:00
Andrea Corallo
c27394da7e Rework frame layout
Every function call by reference gets use one unique array of
arguments.
2020-02-15 10:17:08 +01:00
Andrea Corallo
fe9e4c42b3 Better function naming for comp-function-call-maybe-remove 2020-02-14 23:26:20 +01:00
Andrea Corallo
9e08edf98f Extend propagation to a wider set of (non pure) functions 2020-01-21 22:06:19 +00:00
Andrea Corallo
fce1333c22 Clean-up unnecessary member usage 2020-01-20 19:30:24 +00:00
Andrea Corallo
c1d034fc27 Split relocated data into two separate arrays
Rework the functionality of the previous commit to be more efficient.
2020-01-12 13:22:30 +01:00
Andrea Corallo
93ed2c32df Move function reloc data into pure space during bootstrap 2020-01-11 14:34:58 +01:00
Andrea Corallo
5a228fefb6 Prevent false warning emission 2020-01-03 17:47:09 +01:00
Andrea Corallo
b18f92a942 rework predicates to be homogeneous 2020-01-01 11:38:18 +01:00
Andrea Corallo
6c77a9e046 do not crash compilation trying to optimize wrong code 2020-01-01 11:38:18 +01:00
Andrea Corallo
976b7fcc8c fix aliased function names trampoline removal 2020-01-01 11:38:18 +01:00
Andrea Corallo
f0290502f3 disable propagation when non locals are present 2020-01-01 11:38:18 +01:00
Andrea Corallo
037b9897a4 add batch-byte-native-compile-for-bootstrap 2020-01-01 11:38:18 +01:00
Andrea Corallo
e666bf781f add customize comp-never-optimize-functions 2020-01-01 11:38:18 +01:00
Andrea Corallo
00f7fd7d42 fix non local propagation handling 2020-01-01 11:38:18 +01:00
Andrea Corallo
e678021f0c add batch-native-compile 2020-01-01 11:38:16 +01:00
Andrea Corallo
2ccce1bc39 some style fixes 2020-01-01 11:38:16 +01:00
Andrea Corallo
ca8d5ed6ec add disassemble support for native compiled functions 2020-01-01 11:38:15 +01:00
Andrea Corallo
42362d9914 remove load_handle_stack and use the implementation one 2020-01-01 11:38:14 +01:00
Andrea Corallo
a647a97320 better scratch slot support 2020-01-01 11:38:13 +01:00
Andrea Corallo
ac08a7f26c clean-up old function relocation code 2020-01-01 11:38:13 +01:00
Andrea Corallo
6c9acd13d0 single function native compilation doc + interactive support + tests 2020-01-01 11:38:12 +01:00
Andrea Corallo
a248dfe2c3 native compile interactive functions support 2020-01-01 11:38:12 +01:00