Skip to content

Commit 764d6de

Browse files
committed
Revert "MergeFuncs: Transfer the function parameter attributes to the call site"
It is okay to not transfer parameter attributes. This reverts commit r242558. llvm-svn: 242646
1 parent 23a29da commit 764d6de

File tree

4 files changed

+2
-25
lines changed

4 files changed

+2
-25
lines changed

llvm/lib/Transforms/IPO/MergeFunctions.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1361,7 +1361,6 @@ void MergeFunctions::writeThunk(Function *F, Function *G) {
13611361
CallInst *CI = Builder.CreateCall(F, Args);
13621362
CI->setTailCall();
13631363
CI->setCallingConv(F->getCallingConv());
1364-
CI->setAttributes(F->getAttributes());
13651364
if (NewG->getReturnType()->isVoidTy()) {
13661365
Builder.CreateRetVoid();
13671366
} else {

llvm/test/Transforms/MergeFunc/apply_function_attributes.ll

Lines changed: 0 additions & 22 deletions
This file was deleted.

llvm/test/Transforms/MergeFunc/inttoptr-address-space.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ define internal i8* @func35(%.qux.2585 addrspace(1)* nocapture %this) align 2 {
2121
bb:
2222
; CHECK-LABEL: @func35(
2323
; CHECK: %[[V2:.+]] = bitcast %.qux.2585 addrspace(1)* %{{.*}} to %.qux.2496 addrspace(1)*
24-
; CHECK: %[[V3:.+]] = tail call i32 @func10(%.qux.2496 addrspace(1)* nocapture %[[V2]])
24+
; CHECK: %[[V3:.+]] = tail call i32 @func10(%.qux.2496 addrspace(1)* %[[V2]])
2525
; CHECK: %{{.*}} = inttoptr i32 %[[V3]] to i8*
2626
%tmp = getelementptr inbounds %.qux.2585, %.qux.2585 addrspace(1)* %this, i32 0, i32 2
2727
%tmp1 = load i8*, i8* addrspace(1)* %tmp, align 4

llvm/test/Transforms/MergeFunc/inttoptr.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ define internal i8* @func35(%.qux.2585* nocapture %this) align 2 {
4848
bb:
4949
; CHECK-LABEL: @func35(
5050
; CHECK: %[[V2:.+]] = bitcast %.qux.2585* %{{.*}} to %.qux.2496*
51-
; CHECK: %[[V3:.+]] = tail call i32 @func10(%.qux.2496* nocapture %[[V2]])
51+
; CHECK: %[[V3:.+]] = tail call i32 @func10(%.qux.2496* %[[V2]])
5252
; CHECK: %{{.*}} = inttoptr i32 %[[V3]] to i8*
5353
%tmp = getelementptr inbounds %.qux.2585, %.qux.2585* %this, i32 0, i32 2
5454
%tmp1 = load i8*, i8** %tmp, align 4

0 commit comments

Comments
 (0)