[PATCH] D34862: [CGP] Relax a bit restriction for optimizeMemoryInst to extend scope

Serguei Katkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 9 20:50:45 PDT 2017


skatkov added a comment.

Good point. Meaning that if we traversed through Phi node it means that even it is in the same block, address computation is after memory instruction, otherwise it would not traverse Phi node. I will take a look into this deeper.

Side note, actually I think that the second reason for this check is to allow selection dag to use address folding. It traverses the instructions from the last one to the first one in basic block. So if addressing computation in the other basic block or after current memory instruction it will not be able to fold address computation to memory instruction...


https://reviews.llvm.org/D34862





More information about the llvm-commits mailing list