summaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
diff options
context:
space:
mode:
authorShoaib Meenai <smeenai@fb.com>2023-05-05 14:19:18 -0700
committerShoaib Meenai <smeenai@fb.com>2023-05-05 14:26:57 -0700
commit0e2b4b2dbac3ae878098003940274d3396b46e18 (patch)
tree6fcdedbef4498e89d0fd01588f25d3e24c1474d3 /llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
parent141be5c062ecf22bd287afffd310e8ac4711444a (diff)
Revert "[ArgumentPromotion] Bail if any callers are minsize"
This reverts commit 8b8466fd31e5a194fd8ba7a73a0f23d32f164318. This is causing size regressions with -Oz and FullLTO. Revert while I come up with a repro.
Diffstat (limited to 'llvm/lib/Transforms/IPO/ArgumentPromotion.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/ArgumentPromotion.cpp9
1 files changed, 0 insertions, 9 deletions
diff --git a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp b/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
index 6d0cd21cbe92..8c6c0728097c 100644
--- a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
+++ b/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
@@ -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;
}