[PATCH] D28388: Add ArgumentCopyElision MI pass

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 13 13:07:50 PST 2017


rnk added a comment.

In https://reviews.llvm.org/D28388#645541, @MatzeB wrote:

> Can you explain why this needs an own pass. My first intuition would have been that this should be simple to solve at the SelectionDAG level.


Initially I wanted it to be independent of ISel because we have 3 (!) ISel implementations. In particular, I was hoping to improve our -O0 code so that it's less bulky. However, I realized that x86 fastisel doesn't even handle arguments in memory, so I gave up on that. So, I guess it would be better to do this as part of SDAG.

Ideally, we'd do this as part of FunctionLoweringInfo::set so that the StaticAlloca map is populated with the fixed argument frame indices from the beginning of ISel, but we need to get the target to lower formal arguments first, which happens later. I could try lowering formal arguments up front, but that seemed more invasive than doing a standalone pass.


https://reviews.llvm.org/D28388





More information about the llvm-commits mailing list