Skip to content

Commit

Permalink
Revert "[ArgumentPromotion] Bail if any callers are minsize"
Browse files Browse the repository at this point in the history
This reverts commit 8b8466f.

This is causing size regressions with -Oz and FullLTO. Revert while I
come up with a repro.
  • Loading branch information
smeenai committed May 5, 2023
1 parent 141be5c commit 0e2b4b2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 72 deletions.
9 changes: 0 additions & 9 deletions llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
Expand Up @@ -764,15 +764,6 @@ static Function *promoteArguments(Function *F, FunctionAnalysisManager &FAM,
if (CB->isMustTailCall())
return nullptr;

// If the caller is marked minsize, this transformation may increase code
// size. We assume that there is more than one call to this function since
// otherwise this function would be inlined or is dead.
// TODO: compare the number of loads/stores removed from the function with
// the number of introduced loads in callees to see if this is profitable
// code-size-wise.
if (CB->getFunction()->hasMinSize())
return nullptr;

if (CB->getFunction() == F)
IsRecursive = true;
}
Expand Down
63 changes: 0 additions & 63 deletions llvm/test/Transforms/ArgumentPromotion/minsize.ll

This file was deleted.

0 comments on commit 0e2b4b2

Please sign in to comment.