1 //===---------------- lib/CodeGen/CalcSpillWeights.h ------------*- C++ -*-===//
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 //===----------------------------------------------------------------------===//
11 #ifndef LLVM_CODEGEN_CALCSPILLWEIGHTS_H
12 #define LLVM_CODEGEN_CALCSPILLWEIGHTS_H
14 #include "llvm/CodeGen/MachineFunctionPass.h"
20 /// CalculateSpillWeights - Compute spill weights for all virtual register
22 class CalculateSpillWeights : public MachineFunctionPass {
26 CalculateSpillWeights() : MachineFunctionPass(&ID) {}
28 virtual void getAnalysisUsage(AnalysisUsage &au) const;
30 virtual bool runOnMachineFunction(MachineFunction &fn);
33 /// Returns true if the given live interval is zero length.
34 bool isZeroLengthInterval(LiveInterval *li) const;
39 #endif // LLVM_CODEGEN_CALCSPILLWEIGHTS_H