On 11/05/2016 10:32 PM, Aaron Sawdey wrote:
On Fri, 2016-11-04 at 20:43 -0600, Jeff Law wrote:
So what's the motivation here? When we don't have any constants
then
I'd think we'd be better off punting into the library.
When none of the args to strncmp are constant, I'd be inclined to
agree. However the current state of affairs is that strncmp is not
expanded in the case where the length is a constant but the strings are
not. This patch allows the expansion to be attempted.
Ah. Yea, there are probably cases where we'd want to give the target
some control when the length is a known constant, but the strings are
unknowns.
For small constants (1-2 chars) the expander should probably just
inline. Beyond that we could be querying the target.
jeff