Alyssa Rosenzweig
aa3a92aa60
OpcodeDispatcher: merge asr impls
...
so we can DRY the next patch
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-05-23 08:27:13 -04:00
Mai
5497240a25
Merge pull request #3655 from alyssarosenzweig/opt/wacky-imul
...
Optimize large sign-extended constants
2024-05-22 23:27:09 -04:00
Alyssa Rosenzweig
b33788e765
Arm64Emitter: handle another class of constants
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-05-22 22:50:20 -04:00
Alyssa Rosenzweig
53567a6526
OpcodeDispatcher: optimize movsxd
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-05-22 21:00:25 -04:00
Alyssa Rosenzweig
90fb5f038b
OpcodeDispatcher: optimize movsx
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-05-22 21:00:25 -04:00
Ryan Houdek
c90036aeea
Merge pull request #3649 from alyssarosenzweig/ra/validate-less-hard
...
Simplify/fix our validation passes
2024-05-21 17:12:49 -07:00
Alyssa Rosenzweig
6e0f5eccb3
RAValidation: fix spillregister validation
...
It doesn't write to its node. Fixes spurious
%7: Arg[0] expects reg0 to contain %4, but it actually contains %16
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-05-21 19:34:31 -04:00
Alyssa Rosenzweig
579fb42458
RAValidation: allow filling the same slot multiple times
...
This can be a reasonable thing to do!
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-05-21 19:34:31 -04:00
Alyssa Rosenzweig
f4b487352c
RAValidation: defeature control flow analysis
...
now that we've eliminated cross block liveness, we can do our validation locally
too for a massive simplification.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-05-21 19:34:31 -04:00
Alyssa Rosenzweig
4448f84f29
IRValidation: merge in ValueDominanceValidation
...
All we actually need to validate is that each source has been previously defined
within the block. That checks everything we care about now.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-05-21 19:34:31 -04:00
Ryan Houdek
ca70e387ec
Merge pull request #3648 from alyssarosenzweig/ra/pair-extract
...
Slightly improve pair coalescing + memcpy fix from RA branch
2024-05-21 16:19:35 -07:00
Ryan Houdek
9a483107e3
Merge pull request #3647 from alyssarosenzweig/ir/pass-simpler
...
ConstProp, RCLSE: simplifications
2024-05-21 16:11:36 -07:00
Ryan Houdek
3bac767866
Merge pull request #3645 from neobrain/refactor_aotir
...
AOTIR: Refactor interfaces to clarify ownership flow
2024-05-21 16:03:06 -07:00
Ryan Houdek
7b4e48480b
Merge pull request #3646 from alyssarosenzweig/opt/minor-disp
...
OpcodeDispatcher: eliminate some Bfe's
2024-05-21 15:57:52 -07:00
Alyssa Rosenzweig
a31c3c1c15
OpcodeDispatcher: use ExtractPair
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-05-21 17:14:57 -04:00
Alyssa Rosenzweig
1a18e392f8
OpcodeDispatcher: add ExtractPair helper
...
terser and will aid coalescing, as well as eventual transition to multidest
extracts which is what we'll actually want.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-05-21 17:14:57 -04:00
Alyssa Rosenzweig
4c7595c68a
JIT: allow coalescing ExtractElementPair
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-05-21 17:14:57 -04:00
Alyssa Rosenzweig
1a467f0ebd
IR: reduce memcpy worstcase reg pressure
...
This avoids a bunch of sharp edges for RA at a small cost when obscure
segment registers are used.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-05-21 16:54:06 -04:00
Alyssa Rosenzweig
06e7360f4c
RCLSE: only run once, do not DCE
...
From a theoretical perspective, we should not need to run RCLSE more than once.
If there are convergence issues with the current implementation, they should be
fixed instead of bandaged around. Fortunately, this has no instcountci changes.
Brings RCLSE cost down from like 12% to 5%.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-05-21 16:46:44 -04:00
Alyssa Rosenzweig
ec3b72e17e
ConstProp: drop select folding
...
no instcountci changes.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-05-21 16:46:44 -04:00
Alyssa Rosenzweig
259e1b75a4
ConstProp: rm printfs
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-05-21 16:46:44 -04:00
Alyssa Rosenzweig
f9642cba7a
ConstProp: rm pointless opcode casts
...
Just use the headers directly
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-05-21 16:46:44 -04:00
Alyssa Rosenzweig
50e56358c3
OpcodeDispatcher: eliminate Bfe's with cmpxchg
...
ConstProp was catching these but they're pointless.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-05-21 16:39:00 -04:00
Alyssa Rosenzweig
465dbc260f
OpcodeDispatcher: eliminate Bfe's with lea
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-05-21 16:39:00 -04:00
Tony Wasserka
9f291f3adb
AOTIR: Remove obsolete fields from serialized data
2024-05-21 17:54:28 +02:00
Tony Wasserka
f2acc3da4c
Core: Clean up ownership management for IRListView and RegisterAllocationData
...
IRListView is now purely a view type. Instead, ownership is managed on-demand
by a separate interface (IRStorageBase). Materialization of IRListViews to
owning types is moved to this interface as well.
This also avoids unneeded copies of the data.
2024-05-21 17:51:17 +02:00
Tony Wasserka
f8f165d96d
AOTIR: Remove redundant variable declarations
...
This code was already using structured bindings anyway and just reassigned
the values to different variables.
2024-05-21 17:38:41 +02:00
Tony Wasserka
baef95992c
AOTIR: Drop unneeded local variable
2024-05-21 17:38:41 +02:00
Tony Wasserka
97e18c8469
AOTIR: Drop effectively unused parameter from PreGenerateIRFetch
2024-05-21 17:38:41 +02:00
Tony Wasserka
6e04f7368b
AOT: Use std::optional to replace a validity boolean in PreGenerateIRFetch
2024-05-21 17:38:41 +02:00
Tony Wasserka
55a835ebb8
AOTIR: Clarify serialization code
...
The comments weren't too helpful. Using the struct types directly conveys the
same information more clearly.
2024-05-21 17:38:41 +02:00
Alyssa Rosenzweig
85776c2537
Merge pull request #3643 from alyssarosenzweig/opt/shift-garbage
...
Allow garbage on more shifts
2024-05-21 11:05:47 -04:00
Alyssa Rosenzweig
769b2c2a46
OpcodeDispatcher: allow garbage on shift dests
...
doesn't matter for left shifts (we mask off the garbage), or 32-bit shifts, or
shifts where we explicitly sbfe after.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-05-20 10:33:15 -04:00
Alyssa Rosenzweig
3b2100307e
OpcodeDispatcher: allow garbage on more shifts
...
we're masking anyway
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-05-20 10:33:15 -04:00
Alyssa Rosenzweig
3c0f243a2d
JIT: dedupe MapCC
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-05-20 10:25:56 -04:00
Alyssa Rosenzweig
bbf1563f80
JIT/ALUOps: extract DEF_BINOP_WITH_CONSTANT
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-05-20 10:25:56 -04:00
Alyssa Rosenzweig
ed6b1011f9
JIT/VectorOps: deduplicate common implementations
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-05-20 10:25:55 -04:00
Ryan Houdek
e3e7f0279c
Merge pull request #3644 from alyssarosenzweig/clang-format/left
...
clang-format: left-align escaped newlines
2024-05-20 07:12:50 -07:00
Alyssa Rosenzweig
a10f984b1c
clang-format: left-align escaped newlines
...
alternative to #3638 . this is theoretically better for side-by-side diffs. in
practice it may make other diffs worse since all the \'s change when part of the
macro change.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-05-20 09:47:21 -04:00
Ryan Houdek
b83cbcb33c
ConstProp: Bandage fix for instcountci
...
Fixed offset x86 code doesn't quite solve the issue, so adjust this
heuristic just to get instcounci to stop flaking.
This code is going to heavily change soon anyway so +50 doesn't change
much.
2024-05-18 18:06:25 -07:00
Ryan Houdek
048c8ded88
Merge pull request #3622 from Sonicadvance1/move_emitter
2024-05-17 10:41:51 -07:00
Alyssa Rosenzweig
bb064c7334
JIT/AtomicOps: factor out elementsize
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-05-16 17:28:58 -04:00
Alyssa Rosenzweig
2d3d49b900
JIT/ConversionOps: use ConvertSubRegSize*
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-05-16 17:18:59 -04:00
Alyssa Rosenzweig
ea7096ed5b
JIT/MemoryOps: use ConvertSubRegSize8
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-05-16 17:16:12 -04:00
Alyssa Rosenzweig
7a0f6c0a80
JIT: factor ConvertSize helper
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-05-16 17:13:00 -04:00
Alyssa Rosenzweig
e4ee35a925
JIT: factor out sub reg size conversion
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-05-16 15:56:05 -04:00
Ryan Houdek
926eefc86c
Merge pull request #3635 from alyssarosenzweig/opt/flag-store
...
OpcodeDispatcher: reorder some moves
2024-05-16 10:58:40 -07:00
Ryan Houdek
3eb7a5b998
Merge pull request #3632 from pmatos/RemoveBlocks
...
Use erase-remove idiom to remove element
2024-05-16 10:50:50 -07:00
Ryan Houdek
58614ff131
Merge pull request #3634 from alyssarosenzweig/constprop/leftover
...
ConstProp: remove x86 jit leftover
2024-05-16 10:48:31 -07:00
Alyssa Rosenzweig
bf3a09e5e3
ConstProp: remove x86 jit leftover
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-05-16 09:21:41 -04:00