[FuncSpec] Don't run the solver if there's nothing to do
authorSjoerd Meijer <sjoerd.meijer@arm.com>
Tue, 12 Oct 2021 14:37:21 +0000 (15:37 +0100)
committerSjoerd Meijer <sjoerd.meijer@arm.com>
Wed, 13 Oct 2021 18:05:19 +0000 (19:05 +0100)
commit67a58fa3a687ec7463511f8e447e9ae8a26037fc
treed62f67ca3232247742c50a99d52dfafb3e98c7b1
parent621d7a75b16dd2e00fe4acc6c1e2c33d91114d96
[FuncSpec] Don't run the solver if there's nothing to do

Even if there are no interesting functions, the SCCP solver would still run
before bailing. Now bail earlier, avoid running the solver for nothing.

Differential Revision: https://reviews.llvm.org/D111645
llvm/lib/Transforms/IPO/FunctionSpecialization.cpp
llvm/test/Transforms/FunctionSpecialization/function-specialization-nothing-todo.ll [new file with mode: 0644]