WenleiHe wrote:
> I don't understand, if you're saying the profile is accurate, then those
> functions are actually cold, so we should be able to mark them as optsize?
Accurate is not black or white. The current heuristic requires certain level of
accuracy to be effective. If you make the
@@ -0,0 +1,73 @@
+//===--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier:
aeubanks wrote:
> FWIW we've tried this with sampling PGO in the past. While on paper this
> seems like an obvious thing to do, in reality aggressively tuning down opt
> level for cold functions can lead to regression since profile isn't always
> accurate.
>
> That said, as long as this
aeubanks wrote:
> How does this relate to the existing `shouldOptimizeForSize(Function&, ...)`
> and `shouldOptimizeForSize(MachineFunction&, ...)` APIs which appear to
> provide similar functionality at a first glance. If they are the same, then
> we should have a plan in place to cleanup
WenleiHe wrote:
> > How does this relate to the existing `shouldOptimizeForSize(Function&,
> > ...)` and `shouldOptimizeForSize(MachineFunction&, ...)` APIs which appear
> > to provide similar functionality at a first glance. If they are the same,
> > then we should have a plan in place to
@@ -0,0 +1,73 @@
+//===--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier:
MatzeB wrote:
How does this relate to the existing `shouldOptimizeForSize(Function&)` and
similar APIs which appear to provide similar functionality at a first glance.
If they are the same, then we should have a plan in place to cleanup and only
have one system afterwards, if there are
@@ -0,0 +1,73 @@
+//===--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: