-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RISCV][llvm-exegesis] Disable pseudo instructions in allowAsBackToBack. #122986
Conversation
Prevents crashes trying to encode pseudo instuctions. Tested on HiFive Premier P550.
@llvm/pr-subscribers-tools-llvm-exegesis Author: Craig Topper (topperc) ChangesPrevents crashes trying to encode pseudo instuctions. Tested on HiFive Premier P550. Fixes #122974 Full diff: https://github.com/llvm/llvm-project/pull/122986.diff 1 Files Affected:
diff --git a/llvm/tools/llvm-exegesis/lib/RISCV/Target.cpp b/llvm/tools/llvm-exegesis/lib/RISCV/Target.cpp
index 5636782bdf7f6f..911713d4e0aa59 100644
--- a/llvm/tools/llvm-exegesis/lib/RISCV/Target.cpp
+++ b/llvm/tools/llvm-exegesis/lib/RISCV/Target.cpp
@@ -124,6 +124,10 @@ class ExegesisRISCVTarget : public ExegesisTarget {
ArrayRef<unsigned> getUnavailableRegisters() const override;
+ bool allowAsBackToBack(const Instruction &Instr) const override {
+ return !Instr.Description.isPseudo();
+ }
+
Error randomizeTargetMCOperand(const Instruction &Instr, const Variable &Var,
MCOperand &AssignedValue,
const BitVector &ForbiddenRegs) const override;
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also fixes the issue on the banana pi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Wondering if we should rename allowAsBackToBack
to something more clear to those implementing targets... Anyways, that's besides the point and I can clean it up later if it makes sense.
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/73/builds/11738 Here is the relevant piece of the build log for the reference
|
…ck. (llvm#122986) Prevents crashes trying to encode pseudo instuctions. Tested on HiFive Premier P550. Fixes llvm#122974
…ck. (llvm#122986) Prevents crashes trying to encode pseudo instuctions. Tested on HiFive Premier P550. Fixes llvm#122974
Prevents crashes trying to encode pseudo instuctions. Tested on HiFive Premier P550.
Fixes #122974