File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
lib/Dialect/LLVMIR/Transforms Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -663,8 +663,6 @@ struct LLVMInlinerInterface : public DialectInlinerInterface {
663
663
664
664
bool isLegalToInline (Operation *call, Operation *callable,
665
665
bool wouldBeCloned) const final {
666
- if (!wouldBeCloned)
667
- return false ;
668
666
if (!isa<LLVM::CallOp>(call)) {
669
667
LLVM_DEBUG (llvm::dbgs () << " Cannot inline: call is not an '"
670
668
<< LLVM::CallOp::getOperationName () << " ' op\n " );
Original file line number Diff line number Diff line change @@ -663,3 +663,16 @@ llvm.func @caller() {
663
663
llvm.call @vararg_intrinrics () : () -> ()
664
664
llvm.return
665
665
}
666
+
667
+ // -----
668
+
669
+ llvm.func @private_func (%a : i32 ) -> i32 attributes {sym_visibility = " private" } {
670
+ llvm.return %a : i32
671
+ }
672
+
673
+ // CHECK-LABEL: func @caller
674
+ llvm.func @caller (%x : i32 ) -> i32 {
675
+ // CHECK-NOT: llvm.call @private_func
676
+ %z = llvm.call @private_func (%x ) : (i32 ) -> (i32 )
677
+ llvm.return %z : i32
678
+ }
You can’t perform that action at this time.
0 commit comments