mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
Add code to resize the CSEMap hash table. This doesn't speedup codegen of
kimwitu, but seems like a good idea from a "avoid performance cliffs" standpoint :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29675 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -46,12 +46,16 @@ class SelectionDAG {
|
||||
MachineFunction &MF;
|
||||
MachineDebugInfo *DI;
|
||||
|
||||
// Root - The root of the entire DAG. EntryNode - The starting token.
|
||||
/// Root - The root of the entire DAG. EntryNode - The starting token.
|
||||
SDOperand Root, EntryNode;
|
||||
|
||||
// AllNodes - A linked list of nodes in the current DAG.
|
||||
/// AllNodes - A linked list of nodes in the current DAG.
|
||||
ilist<SDNode> AllNodes;
|
||||
|
||||
/// CSEMap - This structure is used to memoize nodes, automatically performing
|
||||
/// CSE with existing nodes with a duplicate is requested.
|
||||
SelectionDAGCSEMap CSEMap;
|
||||
|
||||
public:
|
||||
SelectionDAG(TargetLowering &tli, MachineFunction &mf, MachineDebugInfo *di)
|
||||
: TLI(tli), MF(mf), DI(di) {
|
||||
@@ -464,7 +468,6 @@ private:
|
||||
std::map<std::string, SDNode*> ExternalSymbols;
|
||||
std::map<std::string, SDNode*> TargetExternalSymbols;
|
||||
std::map<std::string, StringSDNode*> StringNodes;
|
||||
SelectionDAGCSEMap CSEMap;
|
||||
};
|
||||
|
||||
template <> struct GraphTraits<SelectionDAG*> : public GraphTraits<SDNode*> {
|
||||
|
@@ -117,8 +117,10 @@ namespace llvm {
|
||||
|
||||
private:
|
||||
SDNode *GetNextPtr(void *NextInBucketPtr);
|
||||
SDNode *GetNextPtr(void *NextInBucketPtr, void **Buckets, unsigned NumBuck);
|
||||
void **GetBucketPtr(void *NextInBucketPtr);
|
||||
void **GetBucketFor(const NodeID &ID) const;
|
||||
void GrowHashTable();
|
||||
};
|
||||
} // end namespace llvm
|
||||
|
||||
|
@@ -719,6 +719,7 @@ class SDNode {
|
||||
public:
|
||||
virtual ~SDNode() {
|
||||
assert(NumOperands == 0 && "Operand list not cleared before deletion");
|
||||
assert(NextInBucket == 0 && "Still in CSEMap?");
|
||||
NodeType = ISD::DELETED_NODE;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user