1 //===-- CodeGen/MachineInstr.cpp ------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file contains the machine function pass registry for register allocators
11 // and instruction schedulers.
13 //===----------------------------------------------------------------------===//
15 #include "llvm/CodeGen/MachinePassRegistry.h"
19 void MachinePassRegistryListener::anchor() { }
21 /// Add - Adds a function pass to the registration list.
23 void MachinePassRegistry::Add(MachinePassRegistryNode *Node) {
26 if (Listener) Listener->NotifyAdd(Node->getName(),
28 Node->getDescription());
32 /// Remove - Removes a function pass from the registration list.
34 void MachinePassRegistry::Remove(MachinePassRegistryNode *Node) {
35 for (MachinePassRegistryNode **I = &List; *I; I = (*I)->getNextAddress()) {
37 if (Listener) Listener->NotifyRemove(Node->getName());