Skip to content

[RISCV] Move VLDSX0Pred from RISCVSchedSiFive7.td to RISCVScheduleV.td. NFC #106671

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

Merged
merged 1 commit into from
Sep 2, 2024

Conversation

topperc
Copy link
Collaborator

@topperc topperc commented Aug 30, 2024

This predicate isn't bound to the scheduler model and and we may want to reuse it in the future. We already moved it to reuse it in our downstream.

…d. NFC

This predicate isn't bound to the scheduler model and and we may
want to reuse it in the future. We already moved it to reuse it in
our downstream.
@llvmbot
Copy link
Member

llvmbot commented Aug 30, 2024

@llvm/pr-subscribers-backend-risc-v

Author: Craig Topper (topperc)

Changes

This predicate isn't bound to the scheduler model and and we may want to reuse it in the future. We already moved it to reuse it in our downstream.


Full diff: https://github.com/llvm/llvm-project/pull/106671.diff

2 Files Affected:

  • (modified) llvm/lib/Target/RISCV/RISCVSchedSiFive7.td (-4)
  • (modified) llvm/lib/Target/RISCV/RISCVScheduleV.td (+4)
diff --git a/llvm/lib/Target/RISCV/RISCVSchedSiFive7.td b/llvm/lib/Target/RISCV/RISCVSchedSiFive7.td
index 0b0ac0c368d070..3f2e8dee76fd66 100644
--- a/llvm/lib/Target/RISCV/RISCVSchedSiFive7.td
+++ b/llvm/lib/Target/RISCV/RISCVSchedSiFive7.td
@@ -479,10 +479,6 @@ foreach mx = SchedMxList in {
 // resource, we do not need to use LMULSEWXXX constructors. However, we do
 // use the SEW from the name to determine the number of Cycles.
 
-// This predicate is true when the rs2 operand of vlse or vsse is x0, false
-// otherwise.
-def VLDSX0Pred : MCSchedPredicate<CheckRegOperand<3, X0>>;
-
 foreach mx = SchedMxList in {
   defvar VLDSX0Cycles = SiFive7GetCyclesDefault<mx>.c;
   defvar Cycles = SiFive7GetCyclesOnePerElement<mx, 8>.c;
diff --git a/llvm/lib/Target/RISCV/RISCVScheduleV.td b/llvm/lib/Target/RISCV/RISCVScheduleV.td
index 95fde1e53c805f..ee041ea142b94c 100644
--- a/llvm/lib/Target/RISCV/RISCVScheduleV.td
+++ b/llvm/lib/Target/RISCV/RISCVScheduleV.td
@@ -9,6 +9,10 @@
 //===----------------------------------------------------------------------===//
 /// Define scheduler resources associated with def operands.
 
+// This predicate is true when the rs2 operand of vlse or vsse is x0, false
+// otherwise.
+def VLDSX0Pred : MCSchedPredicate<CheckRegOperand<3, X0>>;
+
 defvar SchedMxList = ["MF8", "MF4", "MF2", "M1", "M2", "M4", "M8"];
 // Used for widening and narrowing instructions as it doesn't contain M8.
 defvar SchedMxListW = !listremove(SchedMxList, ["M8"]);

@topperc topperc merged commit c74cc73 into llvm:main Sep 2, 2024
10 checks passed
@topperc topperc deleted the pr/vldsx0pred branch September 2, 2024 04:02
@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 2, 2024

LLVM Buildbot has detected a new failure on builder lldb-aarch64-ubuntu running on linaro-lldb-aarch64-ubuntu while building llvm at step 6 "test".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/59/builds/4170

Here is the relevant piece of the build log for the reference
Step 6 (test) failure: build (failure)
...
UNSUPPORTED: lldb-shell :: BuildScript/toolchain-msvc.test (1219 of 2019)
PASS: lldb-shell :: BuildScript/toolchain-clang.test (1220 of 2019)
PASS: lldb-shell :: Commands/CommandScriptImmediateOutput/CommandScriptImmediateOutputConsole.test (1221 of 2019)
PASS: lldb-shell :: BuildScript/modes.test (1222 of 2019)
PASS: lldb-shell :: Commands/CommandScriptImmediateOutput/CommandScriptImmediateOutputFile.test (1223 of 2019)
PASS: lldb-shell :: Commands/command-backtrace-parser-1.test (1224 of 2019)
PASS: lldb-shell :: Commands/command-backtrace-parser-2.test (1225 of 2019)
PASS: lldb-shell :: Commands/command-disassemble-aarch64-color.s (1226 of 2019)
PASS: lldb-shell :: Commands/command-disassemble-aarch64-extensions.s (1227 of 2019)
UNRESOLVED: lldb-api :: tools/lldb-server/TestGdbRemoteKill.py (1228 of 2019)
******************** TEST 'lldb-api :: tools/lldb-server/TestGdbRemoteKill.py' FAILED ********************
Script:
--
/usr/bin/python3.10 /home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/llvm-project/lldb/test/API/dotest.py -u CXXFLAGS -u CFLAGS --env ARCHIVER=/usr/local/bin/llvm-ar --env OBJCOPY=/usr/bin/llvm-objcopy --env LLVM_LIBS_DIR=/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/./lib --env LLVM_INCLUDE_DIR=/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/include --env LLVM_TOOLS_DIR=/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/./bin --arch aarch64 --build-dir /home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/lldb-test-build.noindex --lldb-module-cache-dir /home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/lldb-test-build.noindex/module-cache-lldb/lldb-api --clang-module-cache-dir /home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/lldb-test-build.noindex/module-cache-clang/lldb-api --executable /home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/./bin/lldb --compiler /home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/./bin/clang --dsymutil /home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/./bin/dsymutil --llvm-tools-dir /home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/./bin --lldb-obj-root /home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/tools/lldb --lldb-libs-dir /home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/./lib /home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/llvm-project/lldb/test/API/tools/lldb-server -p TestGdbRemoteKill.py
--
Exit Code: 1

Command Output (stdout):
--
lldb version 20.0.0git (https://github.com/llvm/llvm-project.git revision c74cc73f2bfc1a82c2c68c2bfe9c4d70299aa060)
  clang revision c74cc73f2bfc1a82c2c68c2bfe9c4d70299aa060
  llvm revision c74cc73f2bfc1a82c2c68c2bfe9c4d70299aa060
Skipping the following test categories: ['libc++', 'dsym', 'gmodules', 'debugserver', 'objc']

--
Command Output (stderr):
--
UNSUPPORTED: LLDB (/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/bin/clang-aarch64) :: test_attach_commandline_kill_after_initial_stop_debugserver (TestGdbRemoteKill.TestGdbRemoteKill) (test case does not fall in any category of interest for this run) 
Program aborted due to an unhandled Error:
Operation not permitted
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.	Program arguments: /home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/bin/lldb-server gdbserver --attach=2339670 --reverse-connect [127.0.0.1]:40193
 #0 0x0000aaaab719a084 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/bin/lldb-server+0xb6a084)
 #1 0x0000aaaab71980b4 llvm::sys::RunSignalHandlers() (/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/bin/lldb-server+0xb680b4)
 #2 0x0000aaaab719a794 SignalHandler(int) Signals.cpp:0:0
 #3 0x0000ffffbba8a7dc (linux-vdso.so.1+0x7dc)
 #4 0x0000ffffbb28f200 __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
 #5 0x0000ffffbb24a67c gsignal ./signal/../sysdeps/posix/raise.c:27:6
 #6 0x0000ffffbb237130 abort ./stdlib/abort.c:81:7
 #7 0x0000aaaab7144124 llvm::Error::fatalUncheckedError() const (/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/bin/lldb-server+0xb14124)
 #8 0x0000aaaab71cee7c lldb_private::process_linux::NativeProcessLinux::Attach(int) (/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/bin/lldb-server+0xb9ee7c)
 #9 0x0000aaaab71ce3b0 lldb_private::process_linux::NativeProcessLinux::Manager::Attach(unsigned long, lldb_private::NativeProcessProtocol::NativeDelegate&) (/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/bin/lldb-server+0xb9e3b0)
#10 0x0000aaaab7247de8 lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::AttachToProcess(unsigned long) (/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/bin/lldb-server+0xc17de8)
#11 0x0000aaaab712437c handle_attach(lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) (/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/bin/lldb-server+0xaf437c)
#12 0x0000aaaab7126238 main_gdbserver(int, char**) (/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/bin/lldb-server+0xaf6238)
#13 0x0000aaaab712b248 main (/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/bin/lldb-server+0xafb248)
#14 0x0000ffffbb2373fc __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:74:3
#15 0x0000ffffbb2374cc call_init ./csu/../csu/libc-start.c:128:20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants