Commit 586d4c23 by Jim Stichnoth

Subzero: Improve performance by using llvm::SmallVector<>.

BUG= none R=jvoung@chromium.org Review URL: https://codereview.chromium.org/775953003
parent e3c02c26
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include "llvm/ADT/ilist.h" #include "llvm/ADT/ilist.h"
#include "llvm/ADT/ilist_node.h" #include "llvm/ADT/ilist_node.h"
#include "llvm/ADT/SmallBitVector.h" #include "llvm/ADT/SmallBitVector.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/STLExtras.h" #include "llvm/ADT/STLExtras.h"
#include "llvm/Support/Casting.h" #include "llvm/Support/Casting.h"
#include "llvm/Support/ELF.h" #include "llvm/Support/ELF.h"
......
...@@ -362,7 +362,8 @@ public: ...@@ -362,7 +362,8 @@ public:
private: private:
typedef std::pair<InstNumberT, InstNumberT> RangeElementType; typedef std::pair<InstNumberT, InstNumberT> RangeElementType;
typedef std::vector<RangeElementType> RangeType; // Assume a common case of 2 or fewer segments per live range.
typedef llvm::SmallVector<RangeElementType, 2> RangeType;
RangeType Range; RangeType Range;
RegWeight Weight; RegWeight Weight;
// TrimmedBegin is an optimization for the overlaps() computation. // TrimmedBegin is an optimization for the overlaps() computation.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment