Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion llvm/lib/Transforms/IPO/Attributor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3931,7 +3931,8 @@ static bool runAttributorLightOnFunctions(InformationCache &InfoCache,
&AANoFree::ID, &AANoReturn::ID, &AAMemoryLocation::ID,
&AAMemoryBehavior::ID, &AAUnderlyingObjects::ID, &AANoCapture::ID,
&AAInterFnReachability::ID, &AAIntraFnReachability::ID, &AACallEdges::ID,
&AANoFPClass::ID, &AAMustProgress::ID, &AANonNull::ID});
&AANoFPClass::ID, &AAMustProgress::ID, &AANonNull::ID,
&AADenormalFPMath::ID, &AAIsDead::ID});
AC.Allowed = &Allowed;
AC.UseLiveness = false;

Expand Down
1 change: 1 addition & 0 deletions llvm/test/Transforms/Attributor/denormal-fp-math.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-attributes --check-globals --version 2
; RUN: opt -S -passes=attributor < %s | FileCheck %s
; RUN: opt -S -passes=attributor-light < %s | FileCheck %s

; Keep the attribute checks clean by disabling inference of anything else.
declare void @call_of_mystery()
Expand Down
4 changes: 0 additions & 4 deletions llvm/test/Transforms/FunctionAttrs/argmemonly.ll
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,6 @@ define void @test_recursive_argmem_read(ptr %p) {
; ATTRIBUTOR-LABEL: define void @test_recursive_argmem_read
; ATTRIBUTOR-SAME: (ptr nofree nonnull readonly captures(none) [[P:%.*]]) #[[ATTR15:[0-9]+]] {
; ATTRIBUTOR-NEXT: [[PVAL:%.*]] = load ptr, ptr [[P]], align 8
; ATTRIBUTOR-NEXT: call void @test_recursive_argmem_read(ptr nofree readonly captures(none) [[PVAL]]) #[[ATTR15]]
; ATTRIBUTOR-NEXT: ret void
;
%pval = load ptr, ptr %p
Expand Down Expand Up @@ -444,7 +443,6 @@ define void @test_recursive_argmem_read_alloca(ptr %p) {
; ATTRIBUTOR-SAME: (ptr nofree nonnull readonly captures(none) [[P:%.*]]) #[[ATTR17:[0-9]+]] {
; ATTRIBUTOR-NEXT: [[A:%.*]] = alloca ptr, align 8
; ATTRIBUTOR-NEXT: [[TMP1:%.*]] = load i32, ptr [[P]], align 4
; ATTRIBUTOR-NEXT: call void @test_recursive_argmem_read_alloca(ptr nofree nonnull readonly captures(none) [[A]]) #[[ATTR15]]
; ATTRIBUTOR-NEXT: ret void
;
%a = alloca ptr
Expand All @@ -465,7 +463,6 @@ define void @test_scc_argmem_read_1(ptr %p) {
; ATTRIBUTOR-LABEL: define void @test_scc_argmem_read_1
; ATTRIBUTOR-SAME: (ptr nofree nonnull readonly captures(none) [[P:%.*]]) #[[ATTR15]] {
; ATTRIBUTOR-NEXT: [[PVAL:%.*]] = load ptr, ptr [[P]], align 8
; ATTRIBUTOR-NEXT: call void @test_scc_argmem_read_2(ptr nofree readonly captures(none) [[PVAL]]) #[[ATTR15]]
; ATTRIBUTOR-NEXT: ret void
;
%pval = load ptr, ptr %p
Expand All @@ -483,7 +480,6 @@ define void @test_scc_argmem_read_2(ptr %p) {
; ATTRIBUTOR: Function Attrs: nofree nosync nounwind memory(read)
; ATTRIBUTOR-LABEL: define void @test_scc_argmem_read_2
; ATTRIBUTOR-SAME: (ptr nofree readonly captures(none) [[P:%.*]]) #[[ATTR15]] {
; ATTRIBUTOR-NEXT: call void @test_scc_argmem_read_1(ptr nofree readonly captures(none) [[P]]) #[[ATTR15]]
; ATTRIBUTOR-NEXT: ret void
;
call void @test_scc_argmem_read_1(ptr %p)
Expand Down
14 changes: 5 additions & 9 deletions llvm/test/Transforms/FunctionAttrs/nocapture.ll
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,6 @@ define void @readonly_nounwind_not_willreturn(ptr %p) {
; ATTRIBUTOR: Function Attrs: nosync nounwind memory(read)
; ATTRIBUTOR-LABEL: define void @readonly_nounwind_not_willreturn
; ATTRIBUTOR-SAME: (ptr readonly captures(none) [[P:%.*]]) #[[ATTR7:[0-9]+]] {
; ATTRIBUTOR-NEXT: call void @external_not_willreturn(ptr readonly captures(none) [[P]]) #[[ATTR4]]
; ATTRIBUTOR-NEXT: ret void
;
call void @external_not_willreturn(ptr %p)
Expand All @@ -389,7 +388,6 @@ define void @readonly_nounwind_willreturn(ptr %p) {
; ATTRIBUTOR: Function Attrs: mustprogress nosync nounwind willreturn memory(read)
; ATTRIBUTOR-LABEL: define void @readonly_nounwind_willreturn
; ATTRIBUTOR-SAME: (ptr readonly captures(none) [[P:%.*]]) #[[ATTR9:[0-9]+]] {
; ATTRIBUTOR-NEXT: call void @external_willreturn(ptr readonly captures(none) [[P]]) #[[ATTR24:[0-9]+]]
; ATTRIBUTOR-NEXT: ret void
;
call void @external_willreturn(ptr %p)
Expand All @@ -405,7 +403,6 @@ define void @callsite_readonly_nounwind_not_willreturn(ptr %f, ptr %p) {
;
; ATTRIBUTOR-LABEL: define void @callsite_readonly_nounwind_not_willreturn
; ATTRIBUTOR-SAME: (ptr nofree nonnull captures(none) [[F:%.*]], ptr [[P:%.*]]) {
; ATTRIBUTOR-NEXT: call void [[F]](ptr [[P]]) #[[ATTR6:[0-9]+]]
; ATTRIBUTOR-NEXT: call void [[F]](ptr captures(none) [[P]])
; ATTRIBUTOR-NEXT: ret void
;
Expand All @@ -423,7 +420,6 @@ define void @callsite_readonly_nounwind_willreturn(ptr %f, ptr %p) {
;
; ATTRIBUTOR-LABEL: define void @callsite_readonly_nounwind_willreturn
; ATTRIBUTOR-SAME: (ptr nofree nonnull captures(none) [[F:%.*]], ptr [[P:%.*]]) {
; ATTRIBUTOR-NEXT: call void [[F]](ptr [[P]]) #[[ATTR8:[0-9]+]]
; ATTRIBUTOR-NEXT: call void [[F]](ptr captures(none) [[P]])
; ATTRIBUTOR-NEXT: ret void
;
Expand Down Expand Up @@ -570,7 +566,7 @@ define void @test4_1(ptr %x4_1, i1 %c) {
; ATTRIBUTOR: Function Attrs: nofree nosync nounwind memory(write)
; ATTRIBUTOR-LABEL: define void @test4_1
; ATTRIBUTOR-SAME: (ptr nofree readnone captures(none) [[X4_1:%.*]], i1 [[C:%.*]]) #[[ATTR10]] {
; ATTRIBUTOR-NEXT: [[TMP1:%.*]] = call ptr @test4_2(ptr nofree readnone captures(none) [[X4_1]], ptr nofree readnone [[X4_1]], ptr nofree readnone captures(none) [[X4_1]], i1 [[C]]) #[[ATTR10]]
; ATTRIBUTOR-NEXT: [[TMP1:%.*]] = call ptr @test4_2(ptr nofree readnone captures(none) undef, ptr nofree readnone [[X4_1]], ptr nofree readnone captures(none) undef, i1 [[C]]) #[[ATTR10]]
; ATTRIBUTOR-NEXT: store ptr null, ptr @g, align 8
; ATTRIBUTOR-NEXT: ret void
;
Expand Down Expand Up @@ -732,7 +728,7 @@ define void @nocaptureLaunder(ptr %p) {
; ATTRIBUTOR-LABEL: define void @nocaptureLaunder
; ATTRIBUTOR-SAME: (ptr nofree captures(none) [[P:%.*]]) #[[ATTR12:[0-9]+]] {
; ATTRIBUTOR-NEXT: entry:
; ATTRIBUTOR-NEXT: [[B:%.*]] = call ptr @llvm.launder.invariant.group.p0(ptr [[P]]) #[[ATTR25:[0-9]+]]
; ATTRIBUTOR-NEXT: [[B:%.*]] = call ptr @llvm.launder.invariant.group.p0(ptr [[P]]) #[[ATTR24:[0-9]+]]
; ATTRIBUTOR-NEXT: store i8 42, ptr [[B]], align 1
; ATTRIBUTOR-NEXT: ret void
;
Expand All @@ -754,7 +750,7 @@ define void @captureLaunder(ptr %p) {
; ATTRIBUTOR: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn
; ATTRIBUTOR-LABEL: define void @captureLaunder
; ATTRIBUTOR-SAME: (ptr nofree [[P:%.*]]) #[[ATTR5]] {
; ATTRIBUTOR-NEXT: [[B:%.*]] = call ptr @llvm.launder.invariant.group.p0(ptr [[P]]) #[[ATTR25]]
; ATTRIBUTOR-NEXT: [[B:%.*]] = call ptr @llvm.launder.invariant.group.p0(ptr [[P]]) #[[ATTR24]]
; ATTRIBUTOR-NEXT: store ptr [[B]], ptr @g2, align 8
; ATTRIBUTOR-NEXT: ret void
;
Expand All @@ -776,7 +772,7 @@ define void @nocaptureStrip(ptr %p) {
; ATTRIBUTOR-LABEL: define void @nocaptureStrip
; ATTRIBUTOR-SAME: (ptr nofree writeonly captures(none) [[P:%.*]]) #[[ATTR13:[0-9]+]] {
; ATTRIBUTOR-NEXT: entry:
; ATTRIBUTOR-NEXT: [[B:%.*]] = call ptr @llvm.strip.invariant.group.p0(ptr [[P]]) #[[ATTR22]]
; ATTRIBUTOR-NEXT: [[B:%.*]] = call ptr @llvm.strip.invariant.group.p0(ptr [[P]]) #[[ATTR25:[0-9]+]]
; ATTRIBUTOR-NEXT: store i8 42, ptr [[B]], align 1
; ATTRIBUTOR-NEXT: ret void
;
Expand All @@ -798,7 +794,7 @@ define void @captureStrip(ptr %p) {
; ATTRIBUTOR: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(write)
; ATTRIBUTOR-LABEL: define void @captureStrip
; ATTRIBUTOR-SAME: (ptr nofree writeonly [[P:%.*]]) #[[ATTR1]] {
; ATTRIBUTOR-NEXT: [[B:%.*]] = call ptr @llvm.strip.invariant.group.p0(ptr [[P]]) #[[ATTR22]]
; ATTRIBUTOR-NEXT: [[B:%.*]] = call ptr @llvm.strip.invariant.group.p0(ptr [[P]]) #[[ATTR25]]
; ATTRIBUTOR-NEXT: store ptr [[B]], ptr @g3, align 8
; ATTRIBUTOR-NEXT: ret void
;
Expand Down
Loading
Loading