Refactor various evaluators in Z codegen to use Scratch Register Manager
Opened this issue · 1 comments
Scratch Register Manager [1] provides a way to keep track of available virtual registers to use as scratch registers within an internal control flow in evaluators. This is a very useful API that takes a pain of manually keeping track of allocated virtual register inside control flow region and provides simple mean to attach such scratch register to post dependency condition easily. In most of our evaluators we do not use this API which may be because the API is not fully implemented / fully functional.
Talking about Z codegen evaluators, we have used scratch register manager in our various OpenJ9 evaluators (For example [2]), there are many evaluators I see in [3] and [4] which I thin can benefit from using Scratch Register Manager.
I am opening up this issue to keep track of individual evaluators that can benefit from refactoring to use Scratch Register Manager and if there are any features / enhancements we can make to scratch register manager.
[1]. https://github.com/eclipse/omr/blob/master/compiler/codegen/ScratchRegisterManager.hpp
[2]. https://github.com/eclipse-openj9/openj9/blob/master/runtime/compiler/z/codegen/J9TreeEvaluator.cpp#L4282
[3]. https://github.com/eclipse/omr/blob/master/compiler/z/codegen/OMRTreeEvaluator.cpp
[4]. https://github.com/eclipse-openj9/openj9/blob/master/runtime/compiler/z/codegen/J9TreeEvaluator.cpp
FYI @ehsankianifar