Skip to content

Commit 1b1270f

Browse files
authored
[FMV][GlobalOpt] Enable static resolution of non-FMV callers. (#124314)
The undetectable FMV features predres and ls64 have been removed, therefore the optimization is now re-enabled. The llvm testsuite Graviton4 bots are expected to remain green.
1 parent 95d993a commit 1b1270f

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

llvm/lib/Transforms/IPO/GlobalOpt.cpp

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -95,20 +95,11 @@ STATISTIC(NumIFuncsDeleted, "Number of IFuncs removed");
9595
STATISTIC(NumGlobalArraysPadded,
9696
"Number of global arrays padded to alignment boundary");
9797

98-
// FIXME:
99-
// Optimizing non-FMV callers is causing a regression in the llvm test suite,
100-
// specifically a 'predres' version is unexpectedly trapping on GravitonG4.
101-
// My explanation is that when the caller in not a versioned function, the
102-
// compiler exclusively relies on the command line option, or target attribute
103-
// to deduce whether a feature is available. However, there is no guarantee
104-
// that in reality the host supports those implied features, which arguably
105-
// is a user error. This option allows disabling the optimization as a short
106-
// term workaround to keep the bots green.
10798
static cl::opt<bool>
10899
OptimizeNonFMVCallers("optimize-non-fmv-callers",
109100
cl::desc("Statically resolve calls to versioned "
110101
"functions from non-versioned callers."),
111-
cl::init(false), cl::Hidden);
102+
cl::init(true), cl::Hidden);
112103

113104
static cl::opt<bool>
114105
EnableColdCCStressTest("enable-coldcc-stress-test",

llvm/test/Transforms/GlobalOpt/resolve-fmv-ifunc.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ resolver_entry:
221221
define i32 @caller4() #8 {
222222
; CHECK-LABEL: define i32 @caller4(
223223
; CHECK-SAME: ) local_unnamed_addr #[[ATTR7:[0-9]+]] {
224-
; CHECK: [[CALL:%.*]] = tail call i32 @test_non_fmv_caller()
224+
; CHECK: [[CALL:%.*]] = tail call i32 @test_non_fmv_caller._Maes()
225225
;
226226
entry:
227227
%call = tail call i32 @test_non_fmv_caller()

0 commit comments

Comments
 (0)