Deleted Added
sdiff udiff text old ( 223017 ) new ( 224145 )
full compact
1//=- llvm/CodeGen/AggressiveAntiDepBreaker.h - Anti-Dep Support -*- C++ -*-=//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 9 unchanged lines hidden (view full) ---

18#define LLVM_CODEGEN_AGGRESSIVEANTIDEPBREAKER_H
19
20#include "AntiDepBreaker.h"
21#include "llvm/CodeGen/MachineBasicBlock.h"
22#include "llvm/CodeGen/MachineFrameInfo.h"
23#include "llvm/CodeGen/MachineFunction.h"
24#include "llvm/CodeGen/MachineRegisterInfo.h"
25#include "llvm/CodeGen/ScheduleDAG.h"
26#include "llvm/Target/TargetSubtarget.h"
27#include "llvm/Target/TargetRegisterInfo.h"
28#include "llvm/ADT/BitVector.h"
29#include "llvm/ADT/SmallSet.h"
30#include <map>
31
32namespace llvm {
33 /// Class AggressiveAntiDepState
34 /// Contains all the state necessary for anti-dep breaking.
35 class AggressiveAntiDepState {
36 public:
37 /// RegisterReference - Information about a register reference
38 /// within a liverange
39 typedef struct {
40 /// Operand - The registers operand

--- 71 unchanged lines hidden (view full) ---

112
113
114 /// Class AggressiveAntiDepBreaker
115 class AggressiveAntiDepBreaker : public AntiDepBreaker {
116 MachineFunction& MF;
117 MachineRegisterInfo &MRI;
118 const TargetInstrInfo *TII;
119 const TargetRegisterInfo *TRI;
120
121 /// AllocatableSet - The set of allocatable registers.
122 /// We'll be ignoring anti-dependencies on non-allocatable registers,
123 /// because they may not be safe to break.
124 const BitVector AllocatableSet;
125
126 /// CriticalPathSet - The set of registers that should only be
127 /// renamed if they are on the critical path.
128 BitVector CriticalPathSet;
129
130 /// State - The state used to identify and rename anti-dependence
131 /// registers.
132 AggressiveAntiDepState *State;
133
134 public:
135 AggressiveAntiDepBreaker(MachineFunction& MFi,
136 TargetSubtarget::RegClassVector& CriticalPathRCs);
137 ~AggressiveAntiDepBreaker();
138
139 /// Start - Initialize anti-dep breaking for a new basic block.
140 void StartBlock(MachineBasicBlock *BB);
141
142 /// BreakAntiDependencies - Identifiy anti-dependencies along the critical
143 /// path
144 /// of the ScheduleDAG and break them by renaming registers.

--- 8 unchanged lines hidden (view full) ---

153 /// instruction, which will not be scheduled.
154 ///
155 void Observe(MachineInstr *MI, unsigned Count, unsigned InsertPosIndex);
156
157 /// Finish - Finish anti-dep breaking for a basic block.
158 void FinishBlock();
159
160 private:
161 typedef std::map<const TargetRegisterClass *,
162 TargetRegisterClass::const_iterator> RenameOrderType;
163
164 /// IsImplicitDefUse - Return true if MO represents a register
165 /// that is both implicitly used and defined in MI
166 bool IsImplicitDefUse(MachineInstr *MI, MachineOperand& MO);
167
168 /// GetPassthruRegs - If MI implicitly def/uses a register, then
169 /// return that register and all subregisters.
170 void GetPassthruRegs(MachineInstr *MI, std::set<unsigned>& PassthruRegs);

--- 15 unchanged lines hidden ---