Skip to content

Commit

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

Reason: buildbot breakage
(https://lab.llvm.org/buildbot/#/builders/51/builds/7908)

CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /home/b/sanitizer-aarch64-linux/build/llvm_build0/bin/clang++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/b/sanitizer-aarch64-linux/build/build_default/tools/llvm-exegesis/lib/RISCV -I/home/b/sanitizer-aarch64-linux/build/llvm-project/llvm/tools/llvm-exegesis/lib/RISCV -I/home/b/sanitizer-aarch64-linux/build/build_default/include -I/home/b/sanitizer-aarch64-linux/build/llvm-project/llvm/include -I/home/b/sanitizer-aarch64-linux/build/llvm-project/llvm/lib/Target/RISCV -I/home/b/sanitizer-aarch64-linux/build/build_default/lib/Target/RISCV -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT tools/llvm-exegesis/lib/RISCV/CMakeFiles/LLVMExegesisRISCV.dir/Target.cpp.o -MF tools/llvm-exegesis/lib/RISCV/CMakeFiles/LLVMExegesisRISCV.dir/Target.cpp.o.d -o tools/llvm-exegesis/lib/RISCV/CMakeFiles/LLVMExegesisRISCV.dir/Target.cpp.o -c /home/b/sanitizer-aarch64-linux/build/llvm-project/llvm/tools/llvm-exegesis/lib/RISCV/Target.cpp
In file included from /home/b/sanitizer-aarch64-linux/build/llvm-project/llvm/tools/llvm-exegesis/lib/RISCV/Target.cpp:139:
/home/b/sanitizer-aarch64-linux/build/build_default/lib/Target/RISCV/RISCVGenAsmMatcher.inc:239:19: error: unused function 'MatchRegisterName' [-Werror,-Wunused-function]
  239 | static MCRegister MatchRegisterName(StringRef Name) {
      |                   ^~~~~~~~~~~~~~~~~
/home/b/sanitizer-aarch64-linux/build/build_default/lib/Target/RISCV/RISCVGenAsmMatcher.inc:568:19: error: unused function 'MatchRegisterAltName' [-Werror,-Wunused-function]
  568 | static MCRegister MatchRegisterAltName(StringRef Name) {
      |                   ^~~~~~~~~~~~~~~~~~~~
  • Loading branch information
thurstond committed Dec 18, 2024
1 parent 0e2466f commit 0884908
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 483 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/test/tools/llvm-exegesis/RISCV/lit.local.cfg

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 0884908

Please sign in to comment.