/* Convert RTL to assembler code and output it, for GNU compiler.
Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997,
- 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+ 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
This file is part of GCC.
#include "recog.h"
#include "conditions.h"
#include "flags.h"
-#include "real.h"
#include "hard-reg-set.h"
#include "output.h"
#include "except.h"
static int dialect_number;
#endif
-#ifdef HAVE_conditional_execution
/* Nonnull if the insn currently being emitted was a COND_EXEC pattern. */
rtx current_insn_predicate;
-#endif
+
+/* True if printing into -fdump-final-insns= dump. */
+bool final_insns_dump_p;
#ifdef HAVE_ATTR_length
static int asm_insn_count (rtx);
asm_str_count (const char *templ)
{
int count = 1;
-
+
if (!*templ)
return 0;
const char *templ;
bool is_stmt;
-#ifdef HAVE_conditional_execution
/* Reset this early so it is correct for ASM statements. */
current_insn_predicate = NULL_RTX;
-#endif
+
/* An INSN, JUMP_INSN or CALL_INSN.
First check for special kinds that recog doesn't recognize. */
FINAL_PRESCAN_INSN (insn, recog_data.operand, recog_data.n_operands);
#endif
-#ifdef HAVE_conditional_execution
- if (GET_CODE (PATTERN (insn)) == COND_EXEC)
+ if (targetm.have_conditional_execution ()
+ && GET_CODE (PATTERN (insn)) == COND_EXEC)
current_insn_predicate = COND_EXEC_TEST (PATTERN (insn));
-#endif
#ifdef HAVE_cc0
cc_prev_status = cc_status;
case SYMBOL_REF:
if (SYMBOL_REF_DECL (x))
- {
- mark_decl_referenced (SYMBOL_REF_DECL (x));
- assemble_external (SYMBOL_REF_DECL (x));
- }
+ assemble_external (SYMBOL_REF_DECL (x));
#ifdef ASM_OUTPUT_SYMBOL_REF
ASM_OUTPUT_SYMBOL_REF (file, x);
#else
else
{
const char *aname;
+ struct cgraph_node *node = cgraph_node (current_function_decl);
aname = (IDENTIFIER_POINTER
(DECL_ASSEMBLER_NAME (current_function_decl)));
fprintf (final_output, "\n;; Function (%s) %s\n\n", aname,
- cfun->function_frequency == FUNCTION_FREQUENCY_HOT
+ node->frequency == NODE_FREQUENCY_HOT
? " (hot)"
- : cfun->function_frequency == FUNCTION_FREQUENCY_UNLIKELY_EXECUTED
+ : node->frequency == NODE_FREQUENCY_UNLIKELY_EXECUTED
? " (unlikely executed)"
+ : node->frequency == NODE_FREQUENCY_EXECUTED_ONCE
+ ? " (executed once)"
: "");
flag_dump_noaddr = flag_dump_unnumbered = 1;
+ if (flag_compare_debug_opt || flag_compare_debug)
+ dump_flags |= TDF_NOUID;
+ final_insns_dump_p = true;
for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
if (LABEL_P (insn))
{
flag_dump_noaddr = save_noaddr;
flag_dump_unnumbered = save_unnumbered;
+ final_insns_dump_p = false;
if (fclose (final_output))
{