Changeset View
Changeset View
Standalone View
Standalone View
llvm/include/llvm/CodeGen/MachineLoopUtils.h
//=- MachineLoopUtils.h - Helper functions for manipulating loops -*- C++ -*-=// | //=- MachineLoopUtils.h - Helper functions for manipulating loops -*- C++ -*-=// | ||||
// | // | ||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||||
// See https://llvm.org/LICENSE.txt for license information. | // See https://llvm.org/LICENSE.txt for license information. | ||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||||
// | // | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
#ifndef LLVM_LIB_CODEGEN_MACHINELOOPUTILS_H | #ifndef LLVM_LIB_CODEGEN_MACHINELOOPUTILS_H | ||||
#define LLVM_LIB_CODEGEN_MACHINELOOPUTILS_H | #define LLVM_LIB_CODEGEN_MACHINELOOPUTILS_H | ||||
namespace llvm { | namespace llvm { | ||||
class MachineLoop; | |||||
class MachineBasicBlock; | class MachineBasicBlock; | ||||
class MachineRegisterInfo; | class MachineRegisterInfo; | ||||
class TargetInstrInfo; | class TargetInstrInfo; | ||||
enum LoopPeelDirection { | enum LoopPeelDirection { | ||||
LPD_Front, ///< Peel the first iteration of the loop. | LPD_Front, ///< Peel the first iteration of the loop. | ||||
LPD_Back ///< Peel the last iteration of the loop. | LPD_Back ///< Peel the last iteration of the loop. | ||||
}; | }; | ||||
Show All 10 Lines | |||||
/// clone so as to execute a single iteration. | /// clone so as to execute a single iteration. | ||||
/// | /// | ||||
/// The trip count of Loop is not updated. | /// The trip count of Loop is not updated. | ||||
MachineBasicBlock *PeelSingleBlockLoop(LoopPeelDirection Direction, | MachineBasicBlock *PeelSingleBlockLoop(LoopPeelDirection Direction, | ||||
MachineBasicBlock *Loop, | MachineBasicBlock *Loop, | ||||
MachineRegisterInfo &MRI, | MachineRegisterInfo &MRI, | ||||
const TargetInstrInfo *TII); | const TargetInstrInfo *TII); | ||||
/// Return true if PhysReg is live outside the loop, i.e. determine if it | |||||
/// is live in the loop exit blocks, and false otherwise. | |||||
bool isRegLiveInExitBlocks(MachineLoop *Loop, int PhysReg); | |||||
} // namespace llvm | } // namespace llvm | ||||
#endif // LLVM_LIB_CODEGEN_MACHINELOOPUTILS_H | #endif // LLVM_LIB_CODEGEN_MACHINELOOPUTILS_H |