-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[RISCV] Remove Last Traces of User Interrupts #129300
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
Conversation
These were left over from when Craig removed `__attribute__((interrupt("user")))` support in 05d0cae. The tests change "interrupt"="user" into "interrupt"="machine" as they are still intending to be interrupt tests. ISelLowering will now reject "interrupt"="user". The docs no longer mention "user" as a possible interrupt attribute argument.
@llvm/pr-subscribers-clang Author: Sam Elliott (lenary) ChangesThese were left over from when Craig removed The tests change "interrupt"="user" into "interrupt"="machine" as they are still intending to be interrupt tests. ISelLowering will now reject "interrupt"="user". The docs no longer mention "user" as a possible interrupt attribute argument. Full diff: https://github.com/llvm/llvm-project/pull/129300.diff 4 Files Affected:
diff --git a/clang/include/clang/Basic/AttrDocs.td b/clang/include/clang/Basic/AttrDocs.td
index d6d43df44fb21..6e0932f82be20 100644
--- a/clang/include/clang/Basic/AttrDocs.td
+++ b/clang/include/clang/Basic/AttrDocs.td
@@ -2828,8 +2828,8 @@ targets. This attribute may be attached to a function definition and instructs
the backend to generate appropriate function entry/exit code so that it can be
used directly as an interrupt service routine.
-Permissible values for this parameter are ``user``, ``supervisor``,
-and ``machine``. If there is no parameter, then it defaults to machine.
+Permissible values for this parameter are ``supervisor`` and ``machine``. If
+there is no parameter, then it defaults to ``machine``.
Repeated interrupt attribute on the same declaration will cause a warning
to be emitted. In case of repeated declarations, the last one prevails.
diff --git a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
index 4e6b3a224b79b..99977f713d2a0 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -20777,7 +20777,7 @@ SDValue RISCVTargetLowering::LowerFormalArguments(
StringRef Kind =
MF.getFunction().getFnAttribute("interrupt").getValueAsString();
- if (!(Kind == "user" || Kind == "supervisor" || Kind == "machine"))
+ if (!(Kind == "supervisor" || Kind == "machine"))
report_fatal_error(
"Function interrupt attribute argument not supported!");
}
diff --git a/llvm/test/CodeGen/RISCV/lpad.ll b/llvm/test/CodeGen/RISCV/lpad.ll
index f5d06f0924c54..93eda6f10eedb 100644
--- a/llvm/test/CodeGen/RISCV/lpad.ll
+++ b/llvm/test/CodeGen/RISCV/lpad.ll
@@ -279,7 +279,7 @@ define internal void @internal2() {
}
; Check interrupt function does not need landing pad.
-define void @interrupt() "interrupt"="user" {
+define void @interrupt() "interrupt"="machine" {
; CHECK-LABEL: interrupt:
; CHECK: # %bb.0:
; CHECK-NEXT: mret
diff --git a/llvm/test/CodeGen/RISCV/push-pop-popret.ll b/llvm/test/CodeGen/RISCV/push-pop-popret.ll
index 1fbdaa76dfb68..65f58d0ecbf24 100644
--- a/llvm/test/CodeGen/RISCV/push-pop-popret.ll
+++ b/llvm/test/CodeGen/RISCV/push-pop-popret.ll
@@ -1769,7 +1769,7 @@ define void @alloca(i32 %n) {
declare i32 @foo_test_irq(...)
@var_test_irq = global [32 x i32] zeroinitializer
-define void @foo_with_irq() "interrupt"="user" {
+define void @foo_with_irq() "interrupt"="machine" {
; RV32IZCMP-LABEL: foo_with_irq:
; RV32IZCMP: # %bb.0:
; RV32IZCMP-NEXT: cm.push {ra}, -64
@@ -2273,7 +2273,7 @@ define void @foo_no_irq() {
ret void
}
-define void @callee_with_irq() "interrupt"="user" {
+define void @callee_with_irq() "interrupt"="machine" {
; RV32IZCMP-LABEL: callee_with_irq:
; RV32IZCMP: # %bb.0:
; RV32IZCMP-NEXT: cm.push {ra, s0-s11}, -112
|
@llvm/pr-subscribers-backend-risc-v Author: Sam Elliott (lenary) ChangesThese were left over from when Craig removed The tests change "interrupt"="user" into "interrupt"="machine" as they are still intending to be interrupt tests. ISelLowering will now reject "interrupt"="user". The docs no longer mention "user" as a possible interrupt attribute argument. Full diff: https://github.com/llvm/llvm-project/pull/129300.diff 4 Files Affected:
diff --git a/clang/include/clang/Basic/AttrDocs.td b/clang/include/clang/Basic/AttrDocs.td
index d6d43df44fb21..6e0932f82be20 100644
--- a/clang/include/clang/Basic/AttrDocs.td
+++ b/clang/include/clang/Basic/AttrDocs.td
@@ -2828,8 +2828,8 @@ targets. This attribute may be attached to a function definition and instructs
the backend to generate appropriate function entry/exit code so that it can be
used directly as an interrupt service routine.
-Permissible values for this parameter are ``user``, ``supervisor``,
-and ``machine``. If there is no parameter, then it defaults to machine.
+Permissible values for this parameter are ``supervisor`` and ``machine``. If
+there is no parameter, then it defaults to ``machine``.
Repeated interrupt attribute on the same declaration will cause a warning
to be emitted. In case of repeated declarations, the last one prevails.
diff --git a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
index 4e6b3a224b79b..99977f713d2a0 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -20777,7 +20777,7 @@ SDValue RISCVTargetLowering::LowerFormalArguments(
StringRef Kind =
MF.getFunction().getFnAttribute("interrupt").getValueAsString();
- if (!(Kind == "user" || Kind == "supervisor" || Kind == "machine"))
+ if (!(Kind == "supervisor" || Kind == "machine"))
report_fatal_error(
"Function interrupt attribute argument not supported!");
}
diff --git a/llvm/test/CodeGen/RISCV/lpad.ll b/llvm/test/CodeGen/RISCV/lpad.ll
index f5d06f0924c54..93eda6f10eedb 100644
--- a/llvm/test/CodeGen/RISCV/lpad.ll
+++ b/llvm/test/CodeGen/RISCV/lpad.ll
@@ -279,7 +279,7 @@ define internal void @internal2() {
}
; Check interrupt function does not need landing pad.
-define void @interrupt() "interrupt"="user" {
+define void @interrupt() "interrupt"="machine" {
; CHECK-LABEL: interrupt:
; CHECK: # %bb.0:
; CHECK-NEXT: mret
diff --git a/llvm/test/CodeGen/RISCV/push-pop-popret.ll b/llvm/test/CodeGen/RISCV/push-pop-popret.ll
index 1fbdaa76dfb68..65f58d0ecbf24 100644
--- a/llvm/test/CodeGen/RISCV/push-pop-popret.ll
+++ b/llvm/test/CodeGen/RISCV/push-pop-popret.ll
@@ -1769,7 +1769,7 @@ define void @alloca(i32 %n) {
declare i32 @foo_test_irq(...)
@var_test_irq = global [32 x i32] zeroinitializer
-define void @foo_with_irq() "interrupt"="user" {
+define void @foo_with_irq() "interrupt"="machine" {
; RV32IZCMP-LABEL: foo_with_irq:
; RV32IZCMP: # %bb.0:
; RV32IZCMP-NEXT: cm.push {ra}, -64
@@ -2273,7 +2273,7 @@ define void @foo_no_irq() {
ret void
}
-define void @callee_with_irq() "interrupt"="user" {
+define void @callee_with_irq() "interrupt"="machine" {
; RV32IZCMP-LABEL: callee_with_irq:
; RV32IZCMP: # %bb.0:
; RV32IZCMP-NEXT: cm.push {ra, s0-s11}, -112
|
ping? |
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
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/55/builds/7915 Here is the relevant piece of the build log for the reference
|
These were left over from when Craig removed `__attribute__((interrupt("user")))` support in 05d0cae. The tests change "interrupt"="user" into "interrupt"="machine" as they are still intending to be interrupt tests. ISelLowering will now reject "interrupt"="user". The docs no longer mention "user" as a possible interrupt attribute argument.
These were left over from when Craig removed
__attribute__((interrupt("user")))
support in 05d0cae.The tests change "interrupt"="user" into "interrupt"="machine" as they are still intending to be interrupt tests. ISelLowering will now reject "interrupt"="user". The docs no longer mention "user" as a possible interrupt attribute argument.