+2015-03-22 Martin Liska <mliska@suse.cz>
+
+ Jakub Jelinek <jakub@redhat.com>
+
+ * config/i386/i386.c (def_builtin): Set deferred_isa_values for
+ masks that can potentially include a builtin.
+ (ix86_add_new_builtins): Introduce fast filter for isa values
+ that cannot trigger builtin inclusion.
+
2015-03-22 Martin Liska <mliska@suse.cz>
* ipa-icf.c (sem_item::update_hash_by_addr_refs): New function.
static struct builtin_isa ix86_builtins_isa[(int) IX86_BUILTIN_MAX];
+/* Bits that can still enable any inclusion of a builtin. */
+static HOST_WIDE_INT deferred_isa_values = 0;
/* Add an ix86 target builtin function with CODE, NAME and TYPE. Save the MASK
of which isa_flags to use in the ix86_builtins_isa array. Stores the
}
else
{
+ /* Just a MASK where set_and_not_built_p == true can potentially
+ include a builtin. */
+ deferred_isa_values |= mask;
ix86_builtins[(int) code] = NULL_TREE;
ix86_builtins_isa[(int) code].tcode = tcode;
ix86_builtins_isa[(int) code].name = name;
static void
ix86_add_new_builtins (HOST_WIDE_INT isa)
{
+ if ((isa & deferred_isa_values) == 0)
+ return;
+
+ /* Bits in ISA value can be removed from potential isa values. */
+ deferred_isa_values &= ~isa;
+
int i;
tree saved_current_target_pragma = current_target_pragma;
current_target_pragma = NULL_TREE;