[PATCH] D85393: [IR] Adds mustprogress as a LLVM IR attribute
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 26 01:09:38 PDT 2020
nikic added inline comments.
================
Comment at: llvm/include/llvm/IR/Attributes.td:238
+/// Function is permitted to not make Forward Progress.
+def MustProgress : TypeAttr<"mustprogress">;
----------------
This comment is out of date.
================
Comment at: llvm/include/llvm/IR/Function.h:620
+ /// Determine if the function is permitted to not to make forward progress
+ bool hasMustProgress() const {
+ return hasFnAttribute(Attribute::MustProgress) ||
----------------
The doc comment here is out of date. Might also want to rename to `mustProgress()` or `isMustProgress()` as it is not a pure check of the attribute.
================
Comment at: llvm/test/Assembler/mustprogress-parse-error-2.ll:4
+; CHECK: [[@LINE+1]]:8: error: invalid use of function-only attribute
+define mustprogress 8 i32* @test_mustprogress(i8 %a) {
+ ret void
----------------
Possibly this test should be something like `define i32* @test_mustprogress(i8 %a) mustprogress 8 {`? Otherwise it runs in the "function-only" error first.
================
Comment at: llvm/test/Assembler/mustprogress-parse-error-3.ll:4
+; CHECK: [[@LINE+1]]:8: error: invalid use of function-only attribute
+define mustprogress i32* @test_mustprogress(i8 %a) {
+ ret void
----------------
How does this differ from llvm/test/Assembler/mustprogress-parse-error-1.ll?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85393/new/
https://reviews.llvm.org/D85393
More information about the llvm-commits
mailing list