Move isLCSSAForm, isLoopInvariant, getCanonicalInductionVariable,

and related functions out of LoopBase and into Loop, since they
are specific to BasicBlock-based loops. This also allows the code
to be moved out-of-line.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75523 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman
2009-07-13 22:02:44 +00:00
parent 6761c5d609
commit 16a2c927e9
4 changed files with 230 additions and 222 deletions

View File

@@ -35,45 +35,6 @@
namespace llvm {
class MachineLoop;
// Provide overrides for Loop methods that don't make sense for machine loops.
template<> inline
PHINode *
LoopBase<MachineBasicBlock, MachineLoop>::getCanonicalInductionVariable() const {
assert(0 && "getCanonicalInductionVariable not supported for machine loops!");
return 0;
}
template<> inline Instruction*
LoopBase<MachineBasicBlock,
MachineLoop>::getCanonicalInductionVariableIncrement() const {
assert(0 &&
"getCanonicalInductionVariableIncrement not supported for machine loops!");
return 0;
}
template<>
inline bool
LoopBase<MachineBasicBlock, MachineLoop>::isLoopInvariant(Value *V) const {
assert(0 && "isLoopInvariant not supported for machine loops!");
return false;
}
template<>
inline Value *
LoopBase<MachineBasicBlock, MachineLoop>::getTripCount() const {
assert(0 && "getTripCount not supported for machine loops!");
return 0;
}
template<>
inline bool
LoopBase<MachineBasicBlock, MachineLoop>::isLCSSAForm() const {
assert(0 && "isLCSSAForm not supported for machine loops");
return false;
}
class MachineLoop : public LoopBase<MachineBasicBlock, MachineLoop> {
public:
MachineLoop();