[PATCH] D61286: Skip functions with inallocas in argpromotion

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 30 14:40:48 PDT 2019


rnk added a comment.

In D61286#1485024 <https://reviews.llvm.org/D61286#1485024>, @inglorion wrote:

> Yeah, I kind of wanted to do the least intrusive thing that would fix the problem I observed and then think about the larger picture. But given that we're thinking about removing the inalloca attribute, the way I would like to do that is remove it in globalopt and then we can perform further optimizations (in globalopt and here) predicated on no inalloca being present. That takes care of half the FIXME for inalloca in globalopt, so after that it becomes really tempting to do follow-up with the other half and hoist the alloca to the entry block.


I approve of this plan to do the removal in globalopt and make the later passes more conservative around inalloca. :)



================
Comment at: llvm/test/Transforms/ArgumentPromotion/inalloca.ll:1-2
-; RUN: opt %s -argpromotion -sroa -S | FileCheck %s
-; RUN: opt %s -passes='argpromotion,function(sroa)' -S | FileCheck %s
 
----------------
I would say, keep this test case as is, but once you've improved globalopt, test that the combination of globalopt + argpromotion + sroa is able to do this transform successfully. It's a bit of an integration test, but we need a few of those than we have today anyway.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61286/new/

https://reviews.llvm.org/D61286





More information about the llvm-commits mailing list