summaryrefslogtreecommitdiff
path: root/lib/CodeGen/AggressiveAntiDepBreaker.h
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2010-07-15 06:04:38 +0000
committerBill Wendling <isanbard@gmail.com>2010-07-15 06:04:38 +0000
commite010409cab2ccb7c812edaf072da2c1169ddb0da (patch)
treeb54a6df2f2c167895b8f3dcf3c13612f8a8f8dfa /lib/CodeGen/AggressiveAntiDepBreaker.h
parentf7f72bc1eaf01bfc6f09094d200e6aea35921f65 (diff)
downloadllvm-e010409cab2ccb7c812edaf072da2c1169ddb0da.tar.gz
llvm-e010409cab2ccb7c812edaf072da2c1169ddb0da.tar.bz2
llvm-e010409cab2ccb7c812edaf072da2c1169ddb0da.tar.xz
Use std::vector instead of a hard-coded array. The length of that array could
get *very* large, but we only need it to be the size of the number of pregs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108412 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AggressiveAntiDepBreaker.h')
-rw-r--r--lib/CodeGen/AggressiveAntiDepBreaker.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/CodeGen/AggressiveAntiDepBreaker.h b/lib/CodeGen/AggressiveAntiDepBreaker.h
index 91ebb850d1..f49ffcb0ab 100644
--- a/lib/CodeGen/AggressiveAntiDepBreaker.h
+++ b/lib/CodeGen/AggressiveAntiDepBreaker.h
@@ -24,12 +24,14 @@
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/ScheduleDAG.h"
#include "llvm/Target/TargetSubtarget.h"
-#include "llvm/Target/TargetRegisterInfo.h"
#include "llvm/ADT/BitVector.h"
#include "llvm/ADT/SmallSet.h"
#include <map>
+#include <vector>
namespace llvm {
+ class TargetRegisterInfo;
+
/// Class AggressiveAntiDepState
/// Contains all the state necessary for anti-dep breaking.
class AggressiveAntiDepState {
@@ -59,27 +61,27 @@ namespace llvm {
/// currently representing the group that the register belongs to.
/// Register 0 is always represented by the 0 group, a group
/// composed of registers that are not eligible for anti-aliasing.
- unsigned GroupNodeIndices[TargetRegisterInfo::FirstVirtualRegister];
+ std::vector<unsigned> GroupNodeIndices;
/// RegRefs - Map registers to all their references within a live range.
std::multimap<unsigned, RegisterReference> RegRefs;
/// KillIndices - The index of the most recent kill (proceding bottom-up),
/// or ~0u if the register is not live.
- unsigned KillIndices[TargetRegisterInfo::FirstVirtualRegister];
+ std::vector<unsigned> KillIndices;
/// DefIndices - The index of the most recent complete def (proceding bottom
/// up), or ~0u if the register is live.
- unsigned DefIndices[TargetRegisterInfo::FirstVirtualRegister];
+ std::vector<unsigned> DefIndices;
public:
AggressiveAntiDepState(const unsigned TargetRegs, MachineBasicBlock *BB);
/// GetKillIndices - Return the kill indices.
- unsigned *GetKillIndices() { return KillIndices; }
+ std::vector<unsigned> &GetKillIndices() { return KillIndices; }
/// GetDefIndices - Return the define indices.
- unsigned *GetDefIndices() { return DefIndices; }
+ std::vector<unsigned> &GetDefIndices() { return DefIndices; }
/// GetRegRefs - Return the RegRefs map.
std::multimap<unsigned, RegisterReference>& GetRegRefs() { return RegRefs; }