How to run "always-inline" pass using new pass manager and opt

I have added a print statement in AlwaysInline.cpp file . I want to run this “always-inline” pass using new pass manger .

What would be the command in opt to get the output from AlwaysInline.cpp . My main aim is to disable passes of O3 level one by one . However , I want to get the print statement after running the pass -‘always-inline’

Can I get help .

Do you want the IR output from always-inline, or the print to stdout?

I want stdoit from always online pass

On Thu, May 25, 2023, 4:47 AM Henrik G. Olsson via LLVM Discussion Forums <notifications@llvm.discoursemail.com> wrote:

hnrklssn
May 25

Do you want the IR output from always-inline, or the print to stdout?


Visit Topic or reply to this email to respond.

To unsubscribe from these emails, click here.

I want to get output from ‘always-inline’ pass . I have put some print statements in that pass and want to get the output after running it .

On Thu, May 25, 2023, 5:01 AM soma pal <soma.pal1@gmail.com> wrote:

I want stdoit from always online pass

On Thu, May 25, 2023, 4:47 AM Henrik G. Olsson via LLVM Discussion Forums <notifications@llvm.discoursemail.com> wrote:

hnrklssn
May 25

Do you want the IR output from always-inline, or the print to stdout?


Visit Topic or reply to this email to respond.

To unsubscribe from these emails, click here.

You should not have to do anything special to get the output from printing to stdout.

but I am not getting any output .
How to run this pass to see the output .

On Thu, May 25, 2023 at 9:23 AM Henrik G. Olsson via LLVM Discussion Forums <notifications@llvm.discoursemail.com> wrote:

hnrklssn
May 25

You should not have to do anything special to get the output from printing to stdout.


Visit Topic or reply to this email to respond.

To unsubscribe from these emails, click here.

Hi @soma_p, please can you provide the print statement you’ve added?

Running
opt -S --passes=always-inline source.ll
will execute the pass, but you may need to add a "-debug’ flag if you’re using the LLVM_DEBUG macro to wrap your print e.g.

LLVM_DEBUG(dbgs() << "Hello debug world.");

Thanks for your response . I will try that .

On Thu, May 25, 2023 at 10:22 AM Chris Jackson via LLVM Discussion Forums <notifications@llvm.discoursemail.com> wrote:

chrisjbris
May 25

Hi @soma_p, please can you provide the print statement you’ve added?

Running ‘opt -S --passes=always-inline source.ll’ will run the pass, but you may need to add a "-debug’ flag if you’re using the LLVM_DEBUG macro to wrap your print e.g.

LLVM_DEBUG(dbgs() << "Hello debug world.");


Visit Topic or reply to this email to respond.

To unsubscribe from these emails, click here.