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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Abhinash Jain
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
Reply | Threaded
Open this post in threaded view
|

Re: Why total number of store instructions increased in case of gvn with reg2mem?

Henrique Santos
Might have to do with GVN's PRE (partial redundancy elimination), which tends to increase code size.

H.

 

----- Original Message -----

From: Abhinash Jain

Sent: 09/22/13 01:17 AM

To: [hidden email]

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

 
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. 
_______________________________________________ 
LLVM Developers mailing list 
[hidden email]         http://llvm.cs.uiuc.edu 
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

 


_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev