mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-21 03:53:04 +02:00
[Hexagon] Remove unneeded code from HexagonShuffler
Patch by Colin LeMahieu. llvm-svn: 301947
This commit is contained in:
parent
15e1419679
commit
b00fe7bacd
@ -273,8 +273,8 @@ bool HexagonShuffler::check() {
|
|||||||
unsigned memory = 0, loads = 0, load0 = 0, stores = 0, store0 = 0, store1 = 0;
|
unsigned memory = 0, loads = 0, load0 = 0, stores = 0, store0 = 0, store1 = 0;
|
||||||
// Number of HVX loads, HVX stores.
|
// Number of HVX loads, HVX stores.
|
||||||
unsigned CVIloads = 0, CVIstores = 0;
|
unsigned CVIloads = 0, CVIstores = 0;
|
||||||
// Number of duplex insns, solo insns.
|
// Number of duplex insns
|
||||||
unsigned duplex = 0, solo = 0;
|
unsigned duplex = 0;
|
||||||
// Number of insns restricting other insns in the packet to A and X types,
|
// Number of insns restricting other insns in the packet to A and X types,
|
||||||
// which is neither A or X types.
|
// which is neither A or X types.
|
||||||
unsigned onlyAX = 0, neitherAnorX = 0;
|
unsigned onlyAX = 0, neitherAnorX = 0;
|
||||||
@ -295,12 +295,10 @@ bool HexagonShuffler::check() {
|
|||||||
for (iterator ISJ = begin(); ISJ != end(); ++ISJ) {
|
for (iterator ISJ = begin(); ISJ != end(); ++ISJ) {
|
||||||
MCInst const &ID = ISJ->getDesc();
|
MCInst const &ID = ISJ->getDesc();
|
||||||
|
|
||||||
if (HexagonMCInstrInfo::isSolo(MCII, ID))
|
if (HexagonMCInstrInfo::isSoloAX(MCII, ID))
|
||||||
solo++;
|
++onlyAX;
|
||||||
else if (HexagonMCInstrInfo::isSoloAX(MCII, ID))
|
|
||||||
onlyAX++;
|
|
||||||
else if (HexagonMCInstrInfo::isSoloAin1(MCII, ID))
|
else if (HexagonMCInstrInfo::isSoloAin1(MCII, ID))
|
||||||
onlyAin1++;
|
++onlyAin1;
|
||||||
neitherAnorX += countNeitherAnorX(MCII, ID);
|
neitherAnorX += countNeitherAnorX(MCII, ID);
|
||||||
if (HexagonMCInstrInfo::prefersSlot3(MCII, ID)) {
|
if (HexagonMCInstrInfo::prefersSlot3(MCII, ID)) {
|
||||||
++pSlot3Cnt;
|
++pSlot3Cnt;
|
||||||
@ -409,8 +407,8 @@ bool HexagonShuffler::check() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check if the packet is legal.
|
// Check if the packet is legal.
|
||||||
if ((load0 > 1 || store0 > 1 || CVIloads > 1 || CVIstores > 1) ||
|
if ((load0 > 1 || store0 > 1) ||
|
||||||
(duplex > 1 || (duplex && memory)) || (solo && size() > 1) ||
|
(duplex > 1 || (duplex && memory)) ||
|
||||||
(onlyAX && neitherAnorX > 1) || (onlyAX && xtypeFloat)) {
|
(onlyAX && neitherAnorX > 1) || (onlyAX && xtypeFloat)) {
|
||||||
reportError(llvm::Twine("invalid instruction packet"));
|
reportError(llvm::Twine("invalid instruction packet"));
|
||||||
return false;
|
return false;
|
||||||
|
@ -105,8 +105,8 @@ class HexagonInstr {
|
|||||||
public:
|
public:
|
||||||
HexagonInstr(HexagonCVIResource::TypeUnitsAndLanes *T,
|
HexagonInstr(HexagonCVIResource::TypeUnitsAndLanes *T,
|
||||||
MCInstrInfo const &MCII, MCInst const *id,
|
MCInstrInfo const &MCII, MCInst const *id,
|
||||||
MCInst const *Extender, unsigned s, bool x = false)
|
MCInst const *Extender, unsigned s)
|
||||||
: ID(id), Extender(Extender), Core(s), CVI(T, MCII, s, id) {}
|
: ID(id), Extender(Extender), Core(s), CVI(T, MCII, s, id) {};
|
||||||
|
|
||||||
MCInst const &getDesc() const { return *ID; };
|
MCInst const &getDesc() const { return *ID; };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user