<!DOCTYPE html>
<html data-lt-installed="true">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body style="padding-bottom: 1px;">
<p>Hi, Sergey,</p>
<p>Thanks for the fixes! LGTM<br>
</p>
<div class="moz-cite-prefix">On 15.01.2025 16:10, Sergey Kaplun
wrote:<br>
</div>
<blockquote type="cite" cite="mid:Z4ez42ClQCy-8UGE@root">
<pre class="moz-quote-pre" wrap="">Hi, Sergey!
Thanks for the review!
Updated the commit message and force-pushed the branch.
On 14.01.25, Sergey Bronnikov wrote:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">Hi, Sergey,
thanks for the patch!
LGTM with a minor comment
Sergey
On 13.01.2025 18:17, Sergey Kaplun wrote:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">From: Mike Pall <mike>
(cherry picked from commit 0eddcbead2d67c16dcd4039a6765b9d2fc8ea631)
This patch does the following refactoring:
1) Drops optimizations for the Intel Atom CPU [1]: removes the
`JIT_F_LEA_AGU` flag and related optimizations. The considerations
for the use of LEA are complex and very CPU-specific, mostly
dependent on the number of operands. Mostly, it isn't worth it due to
the extra register pressure and/or extra instructions.
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
I would say explicitly that `JIT_F_LEA_AGU` is used in "Well, yes, that
applies to the original and obsolete Atom architecture. Today "Intel
Atom" is just a trade name for reduced-performance implementations of
the current Intel architecture."
as Mike explained in LUAJIT#24. So there are no any risks for tarantool
users
regarding performance degradation.
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
Added, as you suggested. The new commit message is the following:
| Cleanup CPU detection and tuning for old CPUs.
|
| (cherry picked from commit 0eddcbead2d67c16dcd4039a6765b9d2fc8ea631)
|
| This patch does the following refactoring:
| 1) Drops optimizations for the Intel Atom CPU [1]: removes the
| `JIT_F_LEA_AGU` flag and related optimizations. The considerations
| for the use of LEA are complex and very CPU-specific, mostly
| dependent on the number of operands. Mostly, it isn't worth it due to
| the extra register pressure and/or extra instructions.
| Be aware that it applies to the original and obsolete Atom
| architecture. Today "Intel Atom" is just a trade name for
| reduced-performance implementations of the current Intel
| architecture.
| 2) Drops optimizations for the AMD K8, K10 CPU [2][3]: removes the
| `JIT_F_PREFER_IMUL` flag and related optimizations.
| 3) Refactors JIT flags defined in the <lj_jit.h>. Now all CPU-specific
| JIT flags are defined as the left shift of `JIT_F_CPU` instead of
| hardcoded constants, similar for the optimization flags.
| 4) Adds detection of the ARM8 CPU.
| 5) Drops the check for SSE2 since the VM already presumes CPU supports
| it.
| 6) Adds checks for `__ARM_ARCH`[4] macro in <lj_arch.h>.
| 7) Drops outdated comment in the amalgamation file about memory
| requirements.
|
| Sergey Kaplun:
| * added the description for the patch
|
| [1]: <a class="moz-txt-link-freetext" href="https://en.wikipedia.org/wiki/Intel_Atom">https://en.wikipedia.org/wiki/Intel_Atom</a>
| [2]: <a class="moz-txt-link-freetext" href="https://en.wikipedia.org/wiki/AMD_K8">https://en.wikipedia.org/wiki/AMD_K8</a>
| [3]: <a class="moz-txt-link-freetext" href="https://en.wikipedia.org/wiki/AMD_K10">https://en.wikipedia.org/wiki/AMD_K10</a>
| [4]: <a class="moz-txt-link-freetext" href="https://developer.arm.com/documentation/dui0774/l/Other-Compiler-specific-Features/Predefined-macros">https://developer.arm.com/documentation/dui0774/l/Other-Compiler-specific-Features/Predefined-macros</a>
|
| Part of tarantool/tarantool#10709
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">2) Drops optimizations for the AMD K8, K10 CPU [2][3]: removes the
`JIT_F_PREFER_IMUL` flag and related optimizations.
3) Refactors JIT flags defined in the <lj_jit.h>. Now all CPU-specific
JIT flags are defined as the left shift of `JIT_F_CPU` instead of
hardcoded constants, similar for the optimization flags.
4) Adds detection of the ARM8 CPU.
5) Drops the check for SSE2 since the VM already presumes CPU supports
it.
6) Adds checks for `__ARM_ARCH`[4] macro in <lj_arch.h>.
7) Drops outdated comment in the amalgamation file about memory
requirements.
Sergey Kaplun:
* added the description for the patch
[1]:<a class="moz-txt-link-freetext" href="https://en.wikipedia.org/wiki/Intel_Atom">https://en.wikipedia.org/wiki/Intel_Atom</a>
[2]:<a class="moz-txt-link-freetext" href="https://en.wikipedia.org/wiki/AMD_K8">https://en.wikipedia.org/wiki/AMD_K8</a>
[3]:<a class="moz-txt-link-freetext" href="https://en.wikipedia.org/wiki/AMD_K10">https://en.wikipedia.org/wiki/AMD_K10</a>
[4]:<a class="moz-txt-link-freetext" href="https://developer.arm.com/documentation/dui0774/l/Other-Compiler-specific-Features/Predefined-macros">https://developer.arm.com/documentation/dui0774/l/Other-Compiler-specific-Features/Predefined-macros</a>
Part of tarantool/tarantool#10709
---
</pre>
</blockquote>
</blockquote>
<pre class="moz-quote-pre" wrap="">
<snipped>
</pre>
</blockquote>
</body>
<lt-container></lt-container>
</html>