Problem in adding llvm instructions

I have a problem in llvm-pass
I wrote some commands to insert global variables and load and store instructions. Then I wrote dump command to view these values.
When I run opt command the new results of global variables added and instructions are shown in terminal as I need, but the .ll file is not modified.
What is the cause of this problem?

Can you paste in the full command-line by which you invoked opt? By
default, opt does not modify the input files "in place", but outputs a
new file containing the transformed IR (or prints it out to stdout).