DescriptionSubzero: Refactor some common TargetLowering initializations.
Each TargetLowering subclass has several fields (generally register allocation related) that are initialized to the same values every time a TargetLowering object is created. These fields are essentially const once initialized, so there is no reason to repeatedly initialize them.
The solution is to make them static fields, and statically initialize them at program startup.
This also makes it practical to access such fields without needing a TargetLowering object.
There are likely more items that should also get this treatment, but those can be changed later.
The staticInit() method needs a run-once guard because the unit tests actually cause it to be called more than once.
BUG= none
R=kschimpf@google.com
Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=94844f1290d7fae68ad4f9e9b9e3543639e44a15
Patch Set 1 #Patch Set 2 : Move static field definitions into .cpp files #
Total comments: 6
Patch Set 3 : Code review changes #
Messages
Total messages: 9 (3 generated)
|