68 changes: 34 additions & 34 deletions clang/test/Headers/wasm.c

Large diffs are not rendered by default.

159 changes: 0 additions & 159 deletions llvm/include/llvm/Transforms/Utils/InferCallsiteAttrs.h

This file was deleted.

14 changes: 2 additions & 12 deletions llvm/lib/Transforms/IPO/FunctionAttrs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/IPO.h"
#include "llvm/Transforms/Utils/InferCallsiteAttrs.h"
#include "llvm/Transforms/Utils/Local.h"
#include <cassert>
#include <iterator>
Expand All @@ -69,7 +68,6 @@ using namespace llvm;

#define DEBUG_TYPE "function-attrs"


STATISTIC(NumMemoryAttr, "Number of functions with improved memory attribute");
STATISTIC(NumNoCapture, "Number of arguments marked nocapture");
STATISTIC(NumReturned, "Number of arguments marked returned");
Expand Down Expand Up @@ -640,7 +638,7 @@ determinePointerAccessAttrs(Argument *A,
if (Visited.insert(&UU).second)
Worklist.push_back(&UU);
}

if (CB.doesNotAccessMemory())
continue;

Expand Down Expand Up @@ -1747,7 +1745,7 @@ deriveAttrsInPostOrder(ArrayRef<Function *> Functions, AARGetterT &&AARGetter) {
addNoRecurseAttrs(Nodes.SCCNodes, Changed);
}

// Infer the maximal set of attributes from the ones we've inferred
// Finally, infer the maximal set of attributes from the ones we've inferred
// above. This is handling the cases where one attribute on a signature
// implies another, but for implementation reasons the inference rule for
// the later is missing (or simply less sophisticated).
Expand All @@ -1756,14 +1754,6 @@ deriveAttrsInPostOrder(ArrayRef<Function *> Functions, AARGetterT &&AARGetter) {
if (inferAttributesFromOthers(*F))
Changed.insert(F);

// Finally, propagate the functions attributes to all the callsites inside of
// it.
InferCallsiteAttrs ICA;
for (Function *F : Nodes.SCCNodes)
if (F)
if (ICA.processFunction(F))
Changed.insert(F);

return Changed;
}

Expand Down
1 change: 0 additions & 1 deletion llvm/lib/Transforms/Utils/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ add_llvm_component_library(LLVMTransformUtils
GlobalStatus.cpp
GuardUtils.cpp
HelloWorld.cpp
InferCallsiteAttrs.cpp
InlineFunction.cpp
InjectTLIMappings.cpp
InstructionNamer.cpp
Expand Down
725 changes: 0 additions & 725 deletions llvm/lib/Transforms/Utils/InferCallsiteAttrs.cpp

This file was deleted.

2 changes: 1 addition & 1 deletion llvm/test/Other/cgscc-devirt-iteration.ll
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ entry:
; This indirect call is the first to be resolved, allowing us to deduce
; readonly but not (yet) readnone.
call void %f1(ptr %ignore)
; CHECK: call void @readnone_with_arg(ptr
; CHECK: call void @readnone_with_arg(ptr %ignore)

; Bogus call to test2_b to make this a cycle.
call void @test2_b()
Expand Down
6 changes: 3 additions & 3 deletions llvm/test/Transforms/FunctionAttrs/nonnull.ll
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ define void @parent1(ptr %a, ptr %b, ptr %c) {
define void @parent2(ptr %a, ptr %b, ptr %c) {
; FNATTR-LABEL: @parent2(ptr nonnull %a, ptr nonnull %b, ptr nonnull %c)
; FNATTR-NEXT: call void @use3nonnull(ptr %b, ptr %c, ptr %a)
; FNATTR-NEXT: call void @use3(ptr nonnull %c, ptr nonnull %a, ptr nonnull %b)
; FNATTR-NEXT: call void @use3(ptr %c, ptr %a, ptr %b)


; FNATTR-NEXT: ret void
Expand All @@ -371,7 +371,7 @@ define void @parent2(ptr %a, ptr %b, ptr %c) {
define void @parent3(ptr %a, ptr %b, ptr %c) {
; FNATTR-LABEL: @parent3(ptr nonnull %a, ptr %b, ptr %c)
; FNATTR-NEXT: call void @use1nonnull(ptr %a)
; FNATTR-NEXT: call void @use3(ptr %c, ptr %b, ptr nonnull %a)
; FNATTR-NEXT: call void @use3(ptr %c, ptr %b, ptr %a)


; FNATTR-NEXT: ret void
Expand Down Expand Up @@ -437,7 +437,7 @@ define i8 @parent6(ptr %a, ptr %b) {

define i8 @parent7(ptr %a) {
; FNATTR-LABEL: @parent7(ptr nonnull %a)
; FNATTR-NEXT: [[RET:%.*]] = call i8 @use1safecall(ptr nonnull %a)
; FNATTR-NEXT: [[RET:%.*]] = call i8 @use1safecall(ptr %a)
; FNATTR-NEXT: call void @use1nonnull(ptr %a)


Expand Down
4 changes: 2 additions & 2 deletions llvm/test/Transforms/FunctionAttrs/readattrs.ll
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ define void @test4_2(ptr %p) {
; CHECK: Function Attrs: nofree memory(read)
; CHECK-LABEL: define {{[^@]+}}@test4_2
; CHECK-SAME: (ptr nocapture readonly [[P:%.*]]) #[[ATTR3:[0-9]+]] {
; CHECK-NEXT: call void @test4_1(ptr readonly [[P]])
; CHECK-NEXT: call void @test4_1(ptr [[P]])
; CHECK-NEXT: ret void
;
call void @test4_1(ptr %p)
Expand Down Expand Up @@ -115,7 +115,7 @@ define void @test8_2(ptr %p) {
; CHECK-LABEL: define {{[^@]+}}@test8_2
; CHECK-SAME: (ptr writeonly [[P:%.*]]) #[[ATTR4]] {
; CHECK-NEXT: entry:
; CHECK-NEXT: [[CALL:%.*]] = call ptr @test8_1(ptr writeonly [[P]])
; CHECK-NEXT: [[CALL:%.*]] = call ptr @test8_1(ptr [[P]])
; CHECK-NEXT: store i32 10, ptr [[CALL]], align 4
; CHECK-NEXT: ret void
;
Expand Down
24 changes: 12 additions & 12 deletions llvm/test/Transforms/FunctionAttrs/willreturn-callsites.ll
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ declare void @decl_unknown()
define void @test_fn_mustprogress(ptr %ptr) mustprogress {
; CHECK: Function Attrs: mustprogress
; CHECK-LABEL: @test_fn_mustprogress(
; CHECK: call void @decl_readonly() #
; CHECK: call void @decl_readnone() #
; CHECK: call void @decl_unknown() #
; CHECK: call void @decl_argmemonly(ptr [[PTR:%.*]]) #
; CHECK-NOT: call void @decl_readonly() #
; CHECK-NOT: call void @decl_readnone() #
; CHECK-NOT: call void @decl_unknown() #
; CHECK-NOT: call void @decl_argmemonly(ptr [[PTR:%.*]]) #
; CHECK: ret void
;
call void @decl_readonly()
Expand All @@ -24,10 +24,10 @@ define void @test_fn_mustprogress(ptr %ptr) mustprogress {
define void @test_fn_willreturn(ptr %ptr) willreturn {
; CHECK: Function Attrs: mustprogress willreturn
; CHECK-LABEL: @test_fn_willreturn(
; CHECK: call void @decl_readonly() #
; CHECK: call void @decl_readnone() #
; CHECK: call void @decl_unknown() #
; CHECK: call void @decl_argmemonly(ptr [[PTR:%.*]]) #
; CHECK-NOT: call void @decl_readonly() #
; CHECK-NOT: call void @decl_readnone() #
; CHECK-NOT: call void @decl_unknown() #
; CHECK-NOT: call void @decl_argmemonly(ptr [[PTR:%.*]]) #
; CHECK: ret void
;
call void @decl_readonly()
Expand All @@ -40,8 +40,8 @@ define void @test_fn_willreturn(ptr %ptr) willreturn {
define void @test_fn_mustprogress_readonly_calls(ptr %ptr) mustprogress {
; CHECK: Function Attrs: mustprogress nofree willreturn memory(read)
; CHECK-LABEL: @test_fn_mustprogress_readonly_calls(
; CHECK: call void @decl_readonly() #
; CHECK: call void @decl_readnone() #
; CHECK-NOT: call void @decl_readonly() #
; CHECK-NOT: call void @decl_readnone() #
; CHECK: ret void
;
call void @decl_readonly()
Expand All @@ -52,8 +52,8 @@ define void @test_fn_mustprogress_readonly_calls(ptr %ptr) mustprogress {
define void @test_fn_mustprogress_readonly_calls_but_stores(ptr %ptr) mustprogress {
; CHECK: Function Attrs: mustprogress nofree
; CHECK-LABEL: @test_fn_mustprogress_readonly_calls_but_stores(
; CHECK: call void @decl_readonly() #
; CHECK: call void @decl_readnone() #
; CHECK-NOT: call void @decl_readonly() #
; CHECK-NOT: call void @decl_readnone() #
; CHECK: store i32 0, ptr [[PTR:%.*]], align 4
; CHECK-NEXT: ret void
;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ define i32 @maxB(i32 %x, i32 %y) !dbg !34 {

; OPTIMIZATION_LEVEL_2: define i32 @maxB(i32 %x, i32 %y)
; OPTIMIZATION_LEVEL_2-NEXT: entry:
; OPTIMIZATION_LEVEL_2-NEXT: call void @llvm.dbg.value(metadata i32 %x, metadata !{{[0-9]+}}, metadata !DIExpression()) #{{[0-9]+}}, !dbg !{{[0-9]+}}
; OPTIMIZATION_LEVEL_2-NEXT: call void @llvm.dbg.value(metadata i32 %y, metadata !{{[0-9]+}}, metadata !DIExpression()) #{{[0-9]+}}, !dbg !{{[0-9]+}}
; OPTIMIZATION_LEVEL_2-NEXT: call void @llvm.dbg.value(metadata i32 %x, metadata !{{[0-9]+}}, metadata !DIExpression()), !dbg !{{[0-9]+}}
; OPTIMIZATION_LEVEL_2-NEXT: call void @llvm.dbg.value(metadata i32 %y, metadata !{{[0-9]+}}, metadata !DIExpression()), !dbg !{{[0-9]+}}
; OPTIMIZATION_LEVEL_2-NEXT: %0 = tail call i32 @maxA(i32 %x, i32 %y) #{{[0-9]+}}, !dbg !{{[0-9]+}}
; OPTIMIZATION_LEVEL_2-NEXT: ret i32 %0, !dbg !{{[0-9]+}}
; OPTIMIZATION_LEVEL_2-NEXT: }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ define i32 @cttz(i32 %n, ptr %p1) {
; ALL-LABEL: @cttz(
; ALL-NEXT: entry:
; ALL-NEXT: [[TMP0:%.*]] = shl i32 [[N:%.*]], 1
; ALL-NEXT: [[TMP1:%.*]] = tail call i32 @llvm.cttz.i32(i32 [[TMP0]], i1 false) #[[ATTR2:[0-9]+]], !range [[RNG0:![0-9]+]]
; ALL-NEXT: [[TMP1:%.*]] = tail call i32 @llvm.cttz.i32(i32 [[TMP0]], i1 false), !range [[RNG0:![0-9]+]]
; ALL-NEXT: [[TMP2:%.*]] = sub nuw nsw i32 32, [[TMP1]]
; ALL-NEXT: [[TMP3:%.*]] = sub nuw nsw i32 75, [[TMP1]]
; ALL-NEXT: store i32 [[TMP3]], ptr [[P1:%.*]], align 4
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/PhaseOrdering/memset-tail.ll
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ define void @PR47852(ptr noundef %d, i32 noundef %c) {
; CHECK-NEXT: br i1 [[CMP_NOT1]], label [[WHILE_END:%.*]], label [[WHILE_BODY_PREHEADER:%.*]]
; CHECK: while.body.preheader:
; CHECK-NEXT: [[TMP0:%.*]] = zext i32 [[C]] to i64
; CHECK-NEXT: tail call void @llvm.memset.p0.i64(ptr noundef align 1 [[D:%.*]], i8 0, i64 [[TMP0]], i1 false)
; CHECK-NEXT: tail call void @llvm.memset.p0.i64(ptr align 1 [[D:%.*]], i8 0, i64 [[TMP0]], i1 false)
; CHECK-NEXT: br label [[WHILE_END]]
; CHECK: while.end:
; CHECK-NEXT: ret void
Expand Down