[LLVMdev] Why total number of store instructions increased in case of gvn with reg2mem?

Abhinash Jain omnia at mailinator.com
Sat Sep 21 21:17:24 PDT 2013


Below are the 4 cases out of which for the first 3 cases am able to
understand the variation on total number of store inst.
But 
when -gvn parameters is passed (in case 4) , why does the total number of
strore Instruction present on the attached file increases (instead of
decrease).

Please explain considering that use of -reg2mem pass is mandatory.

eg.     
clang -emit-llvm bzip.c -c -o bzip1.bc

1. opt -load /home/honey/llvm/build/Debug+Asserts/lib/loadInstruction.so
-storeInstruction < bzip1.bc
   output :-  Total Store Instruction  3115

2. opt -reg2mem -load
/home/honey/llvm/build/Debug+Asserts/lib/loadInstruction.so
-storeInstruction < bzip1.bc
   output :-  Total Store Instruction  3174

3. opt -dse -dce -reg2mem -load
/home/xxx/llvm/build/Debug+Asserts/lib/loadInstruction.so -storeInstruction
< bzip1.bc
   output :-  Total Store Instruction  3171

4. opt -gvn -dse -dce -reg2mem -load
/home/xxx/llvm/build/Debug+Asserts/lib/loadInstruction.so -storeInstruction
< bzip1.bc
   output :-  Total Store Instruction  4489

bzip.c <http://llvm.1065342.n5.nabble.com/file/n61412/bzip.c>  



--
View this message in context: http://llvm.1065342.n5.nabble.com/Why-total-number-of-store-instructions-increased-in-case-of-gvn-with-reg2mem-tp61412.html
Sent from the LLVM - Dev mailing list archive at Nabble.com.



More information about the llvm-dev mailing list