mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-02 07:17:36 +00:00
Change the table datastructure to be a vector<smallvector>, instead of
vector<vector> to avoid allocations. This speeds up bcwriting of 447.dealII from 0.8276 to 0.7637s (8.4%). This concludes this round of proding the bcwriter into submission. Final speedup from 24.4s to 0.7637s (32x). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34142 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#define LLVM_ANALYSIS_SLOTCALCULATOR_H
|
||||
|
||||
#include "llvm/ADT/DenseMap.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
#include <vector>
|
||||
|
||||
namespace llvm {
|
||||
@@ -44,9 +45,10 @@ struct ModuleLevelDenseMapKeyInfo {
|
||||
|
||||
class SlotCalculator {
|
||||
const Module *TheModule;
|
||||
|
||||
public:
|
||||
typedef std::vector<const Type*> TypeList;
|
||||
typedef std::vector<const Value*> TypePlane;
|
||||
typedef SmallVector<const Value*, 16> TypePlane;
|
||||
private:
|
||||
std::vector<TypePlane> Table;
|
||||
TypeList Types;
|
||||
typedef DenseMap<const Value*, unsigned> NodeMapType;
|
||||
|
||||
Reference in New Issue
Block a user