Commit f0ab91c7 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

amd64: Add peephole pass.

parent 6ed04f3f
/*
* This file is part of libFirm.
* Copyright (C) 2016 University of Karlsruhe.
*/
/**
* @file
* @brief Peephole optimizations.
*/
#include "amd64_optimize.h"
#include "bepeephole.h"
void amd64_peephole_optimization(ir_graph *const irg)
{
ir_clear_opcodes_generic_func();
be_peephole_opt(irg);
}
/*
* This file is part of libFirm.
* Copyright (C) 2016 University of Karlsruhe.
*/
/**
* @file
* @brief Peephole optimizations.
*/
#ifndef FIRM_BE_AMD64_AMD64_OPTIMIZE_H
#define FIRM_BE_AMD64_AMD64_OPTIMIZE_H
#include "firm_types.h"
/**
* Perform peephole optimizations an a graph.
*
* @param irg the graph
*/
void amd64_peephole_optimization(ir_graph *irg);
#endif
......@@ -10,6 +10,7 @@
#include "amd64_emitter.h"
#include "amd64_finish.h"
#include "amd64_new_nodes.h"
#include "amd64_optimize.h"
#include "amd64_transform.h"
#include "amd64_varargs.h"
#include "bearch_amd64_t.h"
......@@ -639,6 +640,8 @@ static void amd64_finish_and_emit(ir_graph *irg)
amd64_simulate_graph_x87(irg);
amd64_peephole_optimization(irg);
/* emit code */
be_timer_push(T_EMIT);
amd64_emit_function(irg);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment