How to print cfg in LLVM-16?

I’m trying to use this cmd to print .dot for cfg. But Nothing happened:

opt -passes="dot-cfg" ./1.ll

1.ll:

; ModuleID = './inputs/input_for_hello.c'
source_filename = "./inputs/input_for_hello.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"

; Function Attrs: noinline nounwind optnone uwtable
define dso_local i32 @foo(i32 %0) #0 {
  %2 = alloca i32, align 4
  store i32 %0, i32* %2, align 4
  %3 = load i32, i32* %2, align 4
  %4 = mul nsw i32 %3, 2
  ret i32 %4
}

; Function Attrs: noinline nounwind optnone uwtable
define dso_local i32 @bar(i32 %0, i32 %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  store i32 %0, i32* %3, align 4
  store i32 %1, i32* %4, align 4
  %5 = load i32, i32* %3, align 4
  %6 = load i32, i32* %4, align 4
  %7 = call i32 @foo(i32 %6)
  %8 = mul nsw i32 %7, 2
  %9 = add nsw i32 %5, %8
  ret i32 %9
}

; Function Attrs: noinline nounwind optnone uwtable
define dso_local i32 @fez(i32 %0, i32 %1, i32 %2) #0 {
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  store i32 %0, i32* %4, align 4
  store i32 %1, i32* %5, align 4
  store i32 %2, i32* %6, align 4
  %7 = load i32, i32* %4, align 4
  %8 = load i32, i32* %4, align 4
  %9 = load i32, i32* %5, align 4
  %10 = call i32 @bar(i32 %8, i32 %9)
  %11 = mul nsw i32 %10, 2
  %12 = add nsw i32 %7, %11
  %13 = load i32, i32* %6, align 4
  %14 = mul nsw i32 %13, 3
  %15 = add nsw i32 %12, %14
  ret i32 %15
}

; Function Attrs: noinline nounwind optnone uwtable
define dso_local i32 @main(i32 %0, i8** %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i8**, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  store i32 0, i32* %3, align 4
  store i32 %0, i32* %4, align 4
  store i8** %1, i8*** %5, align 8
  store i32 123, i32* %6, align 4
  store i32 0, i32* %7, align 4
  %8 = load i32, i32* %6, align 4
  %9 = call i32 @foo(i32 %8)
  %10 = load i32, i32* %7, align 4
  %11 = add nsw i32 %10, %9
  store i32 %11, i32* %7, align 4
  %12 = load i32, i32* %6, align 4
  %13 = load i32, i32* %7, align 4
  %14 = call i32 @bar(i32 %12, i32 %13)
  %15 = load i32, i32* %7, align 4
  %16 = add nsw i32 %15, %14
  store i32 %16, i32* %7, align 4
  %17 = load i32, i32* %6, align 4
  %18 = load i32, i32* %7, align 4
  %19 = call i32 @fez(i32 %17, i32 %18, i32 123)
  %20 = load i32, i32* %7, align 4
  %21 = add nsw i32 %20, %19
  store i32 %21, i32* %7, align 4
  %22 = load i32, i32* %7, align 4
  ret i32 %22
}

attributes #0 = { noinline nounwind optnone uwtable "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" "unsafe-fp-math"="false" "use-soft-float"="false" }

!llvm.module.flags = !{!0}
!llvm.ident = !{!1}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"Ubuntu clang version 12.0.1-19ubuntu3"}

My guess is optnone is stopping it from working

yeah. you are right. Here is the debug info. When realizing it, I remove all the optnone in the line started at ; Function Attrs to make it work.

> opt -passes="dot-cfg" -debug-pass-manager ./1.ll          
WARNING: You're attempting to print out a bitcode file.
This is inadvisable as it may cause display problems. If
you REALLY want to taste LLVM bitcode first-hand, you
can force output with the `-f' option.

Running analysis: InnerAnalysisManagerProxy<FunctionAnalysisManager, Module> on [module]
Skipping pass CFGPrinterPass on foo due to optnone attribute
Skipping pass: CFGPrinterPass on foo
Skipping pass CFGPrinterPass on bar due to optnone attribute
Skipping pass: CFGPrinterPass on bar
Skipping pass CFGPrinterPass on fez due to optnone attribute
Skipping pass: CFGPrinterPass on fez
Skipping pass CFGPrinterPass on main due to optnone attribute
Skipping pass: CFGPrinterPass on main
Running pass: VerifierPass on [module]
Running analysis: VerifierAnalysis on [module]