LLVM API Documentation
00001 //===- RegisterCoalescer.cpp - Generic Register Coalescing Interface -------==// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file is distributed under the University of Illinois Open Source 00006 // License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 // 00010 // This file implements the generic RegisterCoalescer interface which 00011 // is used as the common interface used by all clients and 00012 // implementations of register coalescing. 00013 // 00014 //===----------------------------------------------------------------------===// 00015 00016 #include "llvm/CodeGen/RegisterCoalescer.h" 00017 #include "llvm/CodeGen/LiveIntervalAnalysis.h" 00018 #include "llvm/CodeGen/MachineInstr.h" 00019 #include "llvm/Target/TargetRegisterInfo.h" 00020 #include "llvm/Pass.h" 00021 00022 using namespace llvm; 00023 00024 // Register the RegisterCoalescer interface, providing a nice name to refer to. 00025 static RegisterAnalysisGroup<RegisterCoalescer> Z("Register Coalescer"); 00026 char RegisterCoalescer::ID = 0; 00027 00028 // RegisterCoalescer destructor: DO NOT move this to the header file 00029 // for RegisterCoalescer or else clients of the RegisterCoalescer 00030 // class may not depend on the RegisterCoalescer.o file in the current 00031 // .a file, causing alias analysis support to not be included in the 00032 // tool correctly! 00033 // 00034 RegisterCoalescer::~RegisterCoalescer() {} 00035 00036 // Because of the way .a files work, we must force the SimpleRC 00037 // implementation to be pulled in if the RegisterCoalescer classes are 00038 // pulled in. Otherwise we run the risk of RegisterCoalescer being 00039 // used, but the default implementation not being linked into the tool 00040 // that uses it. 00041 DEFINING_FILE_FOR(RegisterCoalescer)