Skip to content

Commit

Permalink
Revert "[Exegesis][RISCV] Add RISCV support for llvm-exegesis (#89047)"
Browse files Browse the repository at this point in the history
This reverts commit bc3eee1.

These tests are failing because of no `REQUIRES`.
  • Loading branch information
wangpc-pp committed Dec 18, 2024
1 parent 2fa4b50 commit bf62ea4
Show file tree
Hide file tree
Showing 12 changed files with 33 additions and 486 deletions.
59 changes: 0 additions & 59 deletions llvm/test/tools/llvm-exegesis/RISCV/latency-by-extension-A.s

This file was deleted.

48 changes: 0 additions & 48 deletions llvm/test/tools/llvm-exegesis/RISCV/latency-by-extension-C.s

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions llvm/tools/llvm-exegesis/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ endif()
if (LLVM_TARGETS_TO_BUILD MATCHES "Mips")
list(APPEND LLVM_EXEGESIS_TARGETS "Mips")
endif()
if(LLVM_TARGETS_TO_BUILD MATCHES "RISCV")
list(APPEND LLVM_EXEGESIS_TARGETS "RISCV")
endif()

set(LLVM_EXEGESIS_TARGETS ${LLVM_EXEGESIS_TARGETS} PARENT_SCOPE)

Expand Down
18 changes: 3 additions & 15 deletions llvm/tools/llvm-exegesis/lib/MCInstrDescView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,11 @@ Instruction::Instruction(const MCInstrDesc *Description, StringRef Name,
const BitVector *ImplDefRegs,
const BitVector *ImplUseRegs,
const BitVector *AllDefRegs,
const BitVector *AllUseRegs,
const BitVector *NonMemoryRegs)
const BitVector *AllUseRegs)
: Description(*Description), Name(Name), Operands(std::move(Operands)),
Variables(std::move(Variables)), ImplDefRegs(*ImplDefRegs),
ImplUseRegs(*ImplUseRegs), AllDefRegs(*AllDefRegs),
AllUseRegs(*AllUseRegs), NonMemoryRegs(*NonMemoryRegs) {}
AllUseRegs(*AllUseRegs) {}

std::unique_ptr<Instruction>
Instruction::create(const MCInstrInfo &InstrInfo,
Expand Down Expand Up @@ -167,8 +166,6 @@ Instruction::create(const MCInstrInfo &InstrInfo,
BitVector ImplUseRegs = RATC.emptyRegisters();
BitVector AllDefRegs = RATC.emptyRegisters();
BitVector AllUseRegs = RATC.emptyRegisters();
BitVector NonMemoryRegs = RATC.emptyRegisters();

for (const auto &Op : Operands) {
if (Op.isReg()) {
const auto &AliasingBits = Op.getRegisterAliasing().aliasedBits();
Expand All @@ -180,8 +177,6 @@ Instruction::create(const MCInstrInfo &InstrInfo,
ImplDefRegs |= AliasingBits;
if (Op.isUse() && Op.isImplicit())
ImplUseRegs |= AliasingBits;
if (Op.isUse() && !Op.isMemory())
NonMemoryRegs |= AliasingBits;
}
}
// Can't use make_unique because constructor is private.
Expand All @@ -190,8 +185,7 @@ Instruction::create(const MCInstrInfo &InstrInfo,
std::move(Variables), BVC.getUnique(std::move(ImplDefRegs)),
BVC.getUnique(std::move(ImplUseRegs)),
BVC.getUnique(std::move(AllDefRegs)),
BVC.getUnique(std::move(AllUseRegs)),
BVC.getUnique(std::move(NonMemoryRegs))));
BVC.getUnique(std::move(AllUseRegs))));
}

const Operand &Instruction::getPrimaryOperand(const Variable &Var) const {
Expand Down Expand Up @@ -246,12 +240,6 @@ bool Instruction::hasAliasingRegisters(
ForbiddenRegisters);
}

bool Instruction::hasAliasingNotMemoryRegisters(
const BitVector &ForbiddenRegisters) const {
return anyCommonExcludingForbidden(AllDefRegs, NonMemoryRegs,
ForbiddenRegisters);
}

bool Instruction::hasOneUseOrOneDef() const {
return AllDefRegs.count() || AllUseRegs.count();
}
Expand Down
11 changes: 1 addition & 10 deletions llvm/tools/llvm-exegesis/lib/MCInstrDescView.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,6 @@ struct Instruction {
// aliasing Use and Def registers.
bool hasAliasingRegisters(const BitVector &ForbiddenRegisters) const;

// Whether this instruction is self aliasing through some registers.
// Repeating this instruction may execute sequentially by picking aliasing
// Def and Not Memory Use registers. It may also execute in parallel by
// picking non aliasing Def and Not Memory Use registers.
bool hasAliasingNotMemoryRegisters(const BitVector &ForbiddenRegisters) const;

// Whether this instruction's registers alias with OtherInstr's registers.
bool hasAliasingRegistersThrough(const Instruction &OtherInstr,
const BitVector &ForbiddenRegisters) const;
Expand Down Expand Up @@ -166,15 +160,12 @@ struct Instruction {
const BitVector &ImplUseRegs; // The set of aliased implicit use registers.
const BitVector &AllDefRegs; // The set of all aliased def registers.
const BitVector &AllUseRegs; // The set of all aliased use registers.
// The set of all aliased not memory use registers.
const BitVector &NonMemoryRegs;

private:
Instruction(const MCInstrDesc *Description, StringRef Name,
SmallVector<Operand, 8> Operands,
SmallVector<Variable, 4> Variables, const BitVector *ImplDefRegs,
const BitVector *ImplUseRegs, const BitVector *AllDefRegs,
const BitVector *AllUseRegs, const BitVector *NonMemoryRegs);
const BitVector *AllUseRegs);
};

// Instructions are expensive to instantiate. This class provides a cache of
Expand Down
22 changes: 0 additions & 22 deletions llvm/tools/llvm-exegesis/lib/RISCV/CMakeLists.txt

This file was deleted.

Loading

0 comments on commit bf62ea4

Please sign in to comment.