diff mbox

[1/6] Only resolve_asm_operand_names once

Message ID 1431034740-5375-2-git-send-email-rth@redhat.com
State New
Headers show

Commit Message

Richard Henderson May 7, 2015, 9:38 p.m. UTC
We do it in the front end already; no need to repeat.
---
 gcc/cfgexpand.c | 2 --
 gcc/stmt.c      | 7 ++++---
 2 files changed, 4 insertions(+), 5 deletions(-)

Comments

Jeff Law May 8, 2015, 6:11 p.m. UTC | #1
On 05/07/2015 03:38 PM, Richard Henderson wrote:
> We do it in the front end already; no need to repeat.
> ---
>   gcc/cfgexpand.c | 2 --
>   gcc/stmt.c      | 7 ++++---
>   2 files changed, 4 insertions(+), 5 deletions(-)
Any reason this shouldn't go into the tree immediately?  Seems like it 
stands on its own.

jeff
diff mbox

Patch

diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index 5905ddb..c77a4ac 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -2554,8 +2554,6 @@  expand_asm_operands (tree string, tree outputs, tree inputs,
   if (! check_operand_nalternatives (outputs, inputs))
     return;
 
-  string = resolve_asm_operand_names (string, outputs, inputs, labels);
-
   /* Collect constraints.  */
   i = 0;
   for (t = outputs; t ; t = TREE_CHAIN (t), i++)
diff --git a/gcc/stmt.c b/gcc/stmt.c
index 6c62a12..e63179f 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -562,9 +562,10 @@  check_unique_operand_names (tree outputs, tree inputs, tree labels)
   return false;
 }
 
-/* A subroutine of expand_asm_operands.  Resolve the names of the operands
-   in *POUTPUTS and *PINPUTS to numbers, and replace the name expansions in
-   STRING and in the constraints to those numbers.  */
+/* Resolve the names of the operands in *POUTPUTS and *PINPUTS to numbers,
+   and replace the name expansions in STRING and in the constraints to
+   those numbers.  This is generally done in the front end while creating
+   the ASM_EXPR generic tree that eventually becomes the GIMPLE_ASM.  */
 
 tree
 resolve_asm_operand_names (tree string, tree outputs, tree inputs, tree labels)