1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-14 09:39:42 +00:00
Commit Graph

347 Commits

Author SHA1 Message Date
Andrea Corallo
ef30feb554 * comp.el: Add missing require 2020-03-22 15:57:00 +00:00
Andrea Corallo
e05a62a968 Have a fast build option triggered by env var NATIVE_FAST_BOOT 2020-03-22 15:50:58 +00:00
Andrea Corallo
64a6709f64 * comp.el (comp-async-jobs-number): Fix customize type. 2020-03-19 18:37:32 +00:00
Andrea Corallo
b070571f93 * comp.el (comp-run-async-workers): Load only if compilation succeed 2020-03-19 16:49:23 +00:00
Andrea Corallo
7565a4a117 Command late load when deferring compilation 2020-03-19 13:50:25 +00:00
Andrea Corallo
c3e640bfa6 * comp.el: Extend `native-compile-async' for load and late-load 2020-03-19 13:50:25 +00:00
Andrea Corallo
034d9b319c * comp.el: late-load support optional as `native-compile' parameter 2020-03-19 08:38:10 +00:00
Andrea Corallo
f2c437761f * comp.el: Have the compiler generates 'late_top_level_run' 2020-03-19 08:37:40 +00:00
Andrea Corallo
159f61baa9 Trigger native compilation when loading bytecode
Introduce a first mechanism to trigger compilation when lex elc files
are loaded.  This is off by default and has to be better tested.
2020-03-16 23:08:34 +00:00
Andrea Corallo
ea8864fb67 * comp.el: (native-compile-async) do not duplicate queue entries 2020-03-16 22:56:36 +00:00
Andrea Corallo
0b28bf0529 * comp.el: Estimate async worker number using system CPU number
This only when `comp-async-jobs-number' is 0 (default).
2020-03-16 22:56:36 +00:00
Andrea Corallo
92fdfa4b5a * comp.el: Make compilation logic to be dynamically controllable
Introduce `comp-async-jobs-number' to control async job number, this
can be now adjusted dynamically.

Also make `native-compile-async' able to dynamically queue new
compilations.
2020-03-16 22:56:14 +00:00
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