Skip to content

Commit

Permalink
Major refactoring of all datapath classes.
Browse files Browse the repository at this point in the history
There is now a new class called BaseNode that stores all attributes about an
execution node, which replaces the 10+ separate vectors and maps we had
originally. All references to the old vectors and data structures have been
removed.

opcode_func.cpp has been moved into the BaseNode class, so that the
is_<type>_op functions are now more like "attributes" of the node.

All of the init<Property> functions are now called just once, and their values
are stored into the new BaseNode structure.

One characteristic of the refactored code is that whenever possible, I have
replaced iterating by node_ids by iterating over the nodes themselves. Nodes
can now be directly compared to one another, and accessing properties like the
vertices is just a memory operation.

This refactoring passes all unit tests (and thank god we had those or this
would have been impossible to debug), but this commit only handles the common
datapaths and not the gem5 datapaths yet, so gem5 will not compile yet.

TESTED=unit

Change-Id: I7ab3faee25836fa0a2980627cd49600464895fd4
  • Loading branch information
xyzsam committed Oct 12, 2016
1 parent 232ea7f commit d41183a
Show file tree
Hide file tree
Showing 11 changed files with 874 additions and 555 deletions.
4 changes: 2 additions & 2 deletions .clang-format
Expand Up @@ -11,7 +11,7 @@ AlwaysBreakTemplateDeclarations: false
AlwaysBreakBeforeMultilineStrings: false
BreakBeforeBinaryOperators: false
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: true
BreakConstructorInitializersBeforeComma: false
BinPackParameters: false
ColumnLimit: 80
ConstructorInitializerAllOnOneLineOrOnePerLine: false
Expand All @@ -26,7 +26,7 @@ PenaltyBreakComment: 1000
PenaltyBreakString: 1000
PenaltyBreakFirstLessLess: 120
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PenaltyReturnTypeOnItsOwnLine: 10000
PointerBindsToType: true
SpacesBeforeTrailingComments: 2
Cpp11BracedListStyle: false
Expand Down

0 comments on commit d41183a

Please sign in to comment.