summaryrefslogtreecommitdiff
path: root/lib/Target/Hexagon/MCTargetDesc/HexagonMCShuffler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/Hexagon/MCTargetDesc/HexagonMCShuffler.cpp')
-rw-r--r--lib/Target/Hexagon/MCTargetDesc/HexagonMCShuffler.cpp23
1 files changed, 14 insertions, 9 deletions
diff --git a/lib/Target/Hexagon/MCTargetDesc/HexagonMCShuffler.cpp b/lib/Target/Hexagon/MCTargetDesc/HexagonMCShuffler.cpp
index b2c7f1569380..7bd54fdfa3d5 100644
--- a/lib/Target/Hexagon/MCTargetDesc/HexagonMCShuffler.cpp
+++ b/lib/Target/Hexagon/MCTargetDesc/HexagonMCShuffler.cpp
@@ -17,10 +17,14 @@
#include "MCTargetDesc/HexagonMCShuffler.h"
#include "Hexagon.h"
#include "MCTargetDesc/HexagonMCInstrInfo.h"
-#include "MCTargetDesc/HexagonMCTargetDesc.h"
+#include "MCTargetDesc/HexagonShuffler.h"
+#include "llvm/MC/MCInst.h"
+#include "llvm/MC/MCInstrDesc.h"
+#include "llvm/MC/MCInstrInfo.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
+#include <cassert>
using namespace llvm;
@@ -109,9 +113,10 @@ bool llvm::HexagonMCShuffle(MCContext &Context, bool Fatal,
if (!HexagonMCInstrInfo::bundleSize(MCB)) {
// There once was a bundle:
- // BUNDLE %D2<imp-def>, %R4<imp-def>, %R5<imp-def>, %D7<imp-def>, ...
- // * %D2<def> = IMPLICIT_DEF; flags:
- // * %D7<def> = IMPLICIT_DEF; flags:
+ // BUNDLE implicit-def %d2, implicit-def %r4, implicit-def %r5,
+ // implicit-def %d7, ...
+ // * %d2 = IMPLICIT_DEF; flags:
+ // * %d7 = IMPLICIT_DEF; flags:
// After the IMPLICIT_DEFs were removed by the asm printer, the bundle
// became empty.
DEBUG(dbgs() << "Skipping empty bundle");
@@ -128,15 +133,15 @@ bool
llvm::HexagonMCShuffle(MCContext &Context, MCInstrInfo const &MCII,
MCSubtargetInfo const &STI, MCInst &MCB,
SmallVector<DuplexCandidate, 8> possibleDuplexes) {
-
if (DisableShuffle)
return false;
if (!HexagonMCInstrInfo::bundleSize(MCB)) {
// There once was a bundle:
- // BUNDLE %D2<imp-def>, %R4<imp-def>, %R5<imp-def>, %D7<imp-def>, ...
- // * %D2<def> = IMPLICIT_DEF; flags:
- // * %D7<def> = IMPLICIT_DEF; flags:
+ // BUNDLE implicit-def %d2, implicit-def %r4, implicit-def %r5,
+ // implicit-def %d7, ...
+ // * %d2 = IMPLICIT_DEF; flags:
+ // * %d7 = IMPLICIT_DEF; flags:
// After the IMPLICIT_DEFs were removed by the asm printer, the bundle
// became empty.
DEBUG(dbgs() << "Skipping empty bundle");
@@ -165,7 +170,7 @@ llvm::HexagonMCShuffle(MCContext &Context, MCInstrInfo const &MCII,
break;
}
- if (doneShuffling == false) {
+ if (!doneShuffling) {
HexagonMCShuffler MCS(Context, false, MCII, STI, MCB);
doneShuffling = MCS.reshuffleTo(MCB); // shuffle
}