RegisterCoalescer.cpp revision 2c17c4d8d9f232f0329786ad9abee976bc0f3d27
1//===- RegisterCoalescer.cpp - Generic Register Coalescing Interface -------==//
2//
3//                     The LLVM Compiler Infrastructure
4//
5// This file was developed by the LLVM research group and is distributed under
6// the University of Illinois Open Source License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file implements the generic RegisterCoalescer interface which
11// is used as the common interface used by all clients and
12// implementations of register coalescing.
13//
14//===----------------------------------------------------------------------===//
15
16#include "llvm/CodeGen/RegisterCoalescer.h"
17#include "llvm/CodeGen/LiveIntervalAnalysis.h"
18#include "llvm/CodeGen/MachineInstr.h"
19#include "llvm/Target/MRegisterInfo.h"
20#include "llvm/Pass.h"
21
22using namespace llvm;
23
24// Register the RegisterCoalescer interface, providing a nice name to refer to.
25namespace {
26  RegisterAnalysisGroup<RegisterCoalescer> Z("Register Coalescer");
27}
28char RegisterCoalescer::ID = 0;
29
30// RegisterCoalescer destructor: DO NOT move this to the header file
31// for RegisterCoalescer or else clients of the RegisterCoalescer
32// class may not depend on the RegisterCoalescer.o file in the current
33// .a file, causing alias analysis support to not be included in the
34// tool correctly!
35//
36RegisterCoalescer::~RegisterCoalescer() {}
37
38// Because of the way .a files work, we must force the SimpleRC
39// implementation to be pulled in if the RegisterCoalescer classes are
40// pulled in.  Otherwise we run the risk of RegisterCoalescer being
41// used, but the default implementation not being linked into the tool
42// that uses it.
43DEFINING_FILE_FOR(RegisterCoalescer)
44