summaryrefslogtreecommitdiffstats
path: root/llvm/test/Other/cgscc-observe-devirt.ll
diff options
context:
space:
mode:
authorPhilip Reames <listmail@philipreames.com>2021-04-01 11:34:43 -0700
committerPhilip Reames <listmail@philipreames.com>2021-04-01 11:37:34 -0700
commit6ef4505298be08b8cb4243c7d28751e0e315370a (patch)
tree36b9509b1bbac226689a76a091bab0c6503578b8 /llvm/test/Other/cgscc-observe-devirt.ll
parent2d733923b8d32230d5af777dd1d84ae2c7fc968d (diff)
[funcattrs] Infer nosync from readnone and non-convergent
This implements the most basic possible nosync inference. The choice of inference rule is taken from the comments in attributor and the discussion on the review of the change which introduced the nosync attribute (0626367202c). This is deliberately minimal. As noted in code comments, I do plan to add a more robust inference which actually scans the function IR directly, but a) I need to do some refactoring of the attributor code to use common interfaces, and b) I wanted to get something in. I also wanted to minimize the "interesting" analysis discussion since that's time intensive. Context: This combines with existing nofree attribute inference to help prove dereferenceability in the ongoing deref-at-point semantics work. Differential Revision: https://reviews.llvm.org/D99749
Diffstat (limited to 'llvm/test/Other/cgscc-observe-devirt.ll')
-rw-r--r--llvm/test/Other/cgscc-observe-devirt.ll4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/test/Other/cgscc-observe-devirt.ll b/llvm/test/Other/cgscc-observe-devirt.ll
index 3b35f0edc120..67d630b23a33 100644
--- a/llvm/test/Other/cgscc-observe-devirt.ll
+++ b/llvm/test/Other/cgscc-observe-devirt.ll
@@ -10,7 +10,7 @@
; without requiring the outer manager to iterate doesn't break any invariant.
; RUN: opt -aa-pipeline=basic-aa -passes='cgscc(function-attrs,function(gvn),function-attrs)' -S < %s | FileCheck %s --check-prefix=AFTER
-declare void @readnone() readnone
+declare void @readnone() nosync readnone
declare void @unknown()
; The @test1_* checks that if we refine an indirect call to a direct call and
@@ -103,4 +103,4 @@ define void @test2_b3() {
ret void
}
-; CHECK: attributes #0 = { readnone }
+; CHECK: attributes #0 = { nosync readnone }