[InlineCost] Add cl::opt for target attributes compatibility check. NFC
authorAnna Thomas <anna@azul.com>
Fri, 11 Mar 2022 21:47:40 +0000 (16:47 -0500)
committerAnna Thomas <anna@azul.com>
Fri, 11 Mar 2022 23:05:16 +0000 (18:05 -0500)
commita4aa97d57849113a7ccf60a156ee24b5da88e5d5
tree242353c6bc69bdd7521bfe7dab843b96bd264a5b
parent46626bc87382cad7a0c5ba497b3454337c45faa8
[InlineCost] Add cl::opt for target attributes compatibility check. NFC

This patch adds a CL option for avoiding the attribute compatibility
check between caller and callee in TTI. TTI attribute compatibility
checks for target CPU and target features.
In our downstream compiler, this attribute always remains the same
between callee and caller. By avoiding the addition of this attribute to
each of our inline candidate (and then checking them here during inline
cost), we save some compile time.

The option is kept false, so this change is an NFC upstream.
llvm/lib/Analysis/InlineCost.cpp