blob: fb53d5ef48d790d21c05647fc78c11bb27b2368f [file] [log] [blame]
David Greene2c17c4d2007-09-06 16:18:45 +00001//===- RegisterCoalescer.cpp - Generic Register Coalescing Interface -------==//
2//
3// The LLVM Compiler Infrastructure
4//
Chris Lattner4ee451d2007-12-29 20:36:04 +00005// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
David Greene2c17c4d2007-09-06 16:18:45 +00007//
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)