Commit Graph
18 Commits
Author SHA1 Message Date
Ryan Houdek adb9b111ca Fixes crash when SSA value has size of zero
In the case of an invalid SSA destination size, the IR validation pass
would catch it and then when printing the IR it would crash with a
divide by zero.
Fixes that.
2020-09-22 18:20:32 -07:00
Scott Mansell 0a78651cce Fix ListBegin usages that got missed.
There are still a few in interpeter and IR compaction
which are harder to fix.
2020-09-11 21:50:30 +12:00
Scott Mansell e756b46189 Allow AllNodes to iterate in reverse
We replace Dummy with the old unused BeginBlock
and pointing it at block header like EndBlock
2020-09-11 21:50:30 +12:00
Scott Mansell 3c6dbd0ade Change iterator type of IR.at
And switch over more passes to use the new interfaces.
2020-09-11 21:50:30 +12:00
Scott Mansell 6b26290b42 Switch most passes to use the new interface. 2020-09-11 21:50:27 +12:00
Scott Mansell 36afd5b1c6 Block Iterator: Use structured bindings 2020-09-11 21:48:03 +12:00
Scott Mansell 446b261f24 Iterator for blocks 2020-09-11 21:48:03 +12:00
Stefanos Kornilios Mitsis Poiitidis 8c8e6294b6 Thunks: ALTINST, OP_THUNK, basic infrastructure 2020-07-20 13:52:28 +03:00
Ryan Houdek 5569894d81 Implements fence ops
These map directly to x86 fence instructions, which have equivalent ARM
versions as well.
2020-05-26 19:04:35 -07:00
Ryan Houdek 277d0c6e22 Adds JSON IR option HasSideEffects
This will be useful for making sure our DCE pass isn't so fragile
2020-05-25 17:50:07 -07:00
Ryan Houdek 4269cef98f Adds the ability for the IR printer to dump TypeDefinition
No IR uses this currently directly but it could definitely happen.
2020-05-07 17:40:29 -07:00
Ryan Houdek 00028d41db Updates IR dumping to be easier to parse
This will allow us to lex the text
2020-05-07 17:25:44 -07:00
Ryan Houdek 3bf641dd14 Adds RA printing to the IR dumping function
If a backend has RA then this'll pass through the RAPass and will dump
the RA alongside the IR. Very useful for debugging.
2020-04-18 13:42:44 -07:00
Ryan Houdek 8d7a512b16 Move vector op RegisterSize and ElementSize values in to the header struct
Sadly this is a fairly substantial change that can't be broken in to
something smaller.
The gist of the problem is that most of the vector ops declared their
own uint8_t RegisterSize and ElementSize variables in their structs.
This was initially done because there were assumptions elsewhere in the
source that sometimes mixed up the IROp member `Size` and `Elements` as
sometimes meaning `Size` elements and `Elements` number of elements.
Other times there was an assumption that `Size` was the full register
size and `Elements` was the number of elements inside that size.
ex: `Size`: 16, `Elements` 8 would sometimes be interpreted as i8v16 OR i128v8

These assumptions are now removed and we also save on average 16bits per
vector operation. This is a necessary evil first step for upcoming IR
considerations.
This should have zero change on runtime behaviour and unit tests confirm
that.
2020-04-11 22:17:48 -07:00
Ryan Houdek 2267bc0949 Minor IR cleanup
Changes the IR register class definition to exist in the JSON file.
Removes a couple of IR ops that were unused and weren't necessary.

Changes the CPUID IR op to the new paired op which improves perf ever so
slightly.
Changes RA class handling in the RA pass to pull directly from the new
generated helper routine until it hits a complex op

Still need RA constraints to remove extraneous moves that would crop up
2020-04-10 19:16:47 -07:00
Ryan Houdek 3bb0d06a36 Adds new paired reg IR ops 2020-04-08 00:17:12 -07:00
Ryan Houdek dd3a2644de Fixes names of cond names in debug print 2020-03-15 22:31:22 -07:00
Stefanos Kornilios Mitsis Poiitidis e9ea4cbb76 FEXCore: Move to Externals/FEXCore 2020-03-06 09:07:37 +02:00