re PR target/68256 (Defining TARGET_USE_CONSTANT_BLOCKS_P causes go bootstrap failure...
authorVladimir Mezentsev <vladimir.mezentsev@oracle.com>
Thu, 15 Mar 2018 08:55:04 +0000 (08:55 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 15 Mar 2018 08:55:04 +0000 (08:55 +0000)
2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

        PR target/68256
        * varasm.c (hash_section): Return an unchangeble hash value
        * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
        Return !aarch64_can_use_per_function_literal_pools_p ().

From-SVN: r258553

gcc/ChangeLog
gcc/config/aarch64/aarch64.c
gcc/varasm.c

index 07999ed4662c33c1837c23a078a35f365ef0427b..0d6855d9ec5b94a829bd5d8dd56d025eda74b48f 100644 (file)
@@ -1,3 +1,10 @@
+2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
+
+       PR target/68256
+       * varasm.c (hash_section): Return an unchangeble hash value
+       * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
+       Return !aarch64_can_use_per_function_literal_pools_p ().
+
 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
 
        PR target/84860
index 07c55b132a7a8c4ceeaf9f406ac8c3c9d7b6bb20..4b5183b602b8786307deb8e3d8056323028b50a2 100644 (file)
@@ -7733,11 +7733,9 @@ aarch64_can_use_per_function_literal_pools_p (void)
 static bool
 aarch64_use_blocks_for_constant_p (machine_mode, const_rtx)
 {
-  /* Fixme:: In an ideal world this would work similar
-     to the logic in aarch64_select_rtx_section but this
-     breaks bootstrap in gcc go.  For now we workaround
-     this by returning false here.  */
-  return false;
+  /* We can't use blocks for constants when we're using a per-function
+     constant pool.  */
+  return !aarch64_can_use_per_function_literal_pools_p ();
 }
 
 /* Select appropriate section for constants depending
index 6e345d39d31ff48e2080ac62707640bc94c1253e..2b5c70c8e570be8f1302faf7315093cdb282f5c7 100644 (file)
@@ -225,7 +225,7 @@ hash_section (section *sect)
 {
   if (sect->common.flags & SECTION_NAMED)
     return htab_hash_string (sect->named.name);
-  return sect->common.flags;
+  return sect->common.flags & ~SECTION_DECLARED;
 }
 
 /* Helper routines for maintaining object_block_htab.  */