Skip to content

Commit

Permalink
Rename LoadStoreReduction Peephole in Z Codegen
Browse files Browse the repository at this point in the history
Rename LoadStoreReduction to include the adjective attempt
to more clearly describe that this function does not
guarantee a load store store sequence will be reduced to MVC.

Signed-off-by: Daniel Hong <daniel.hong@live.com>
  • Loading branch information
dhong44 committed Aug 10, 2018
1 parent 80d2864 commit a456077
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions compiler/z/codegen/S390Peephole.cpp
Expand Up @@ -78,7 +78,7 @@ TR_S390PreRAPeephole::perform()
{
case TR::InstOpCode::L:
{
LoadStoreReduction(TR::InstOpCode::ST, 4);
attemptLoadStoreReduction(TR::InstOpCode::ST, 4);
if (comp()->getOption(TR_TraceCG))
{
printInst();
Expand All @@ -87,7 +87,7 @@ TR_S390PreRAPeephole::perform()
}
case TR::InstOpCode::LFH:
{
LoadStoreReduction(TR::InstOpCode::STFH, 4);
attemptLoadStoreReduction(TR::InstOpCode::STFH, 4);
if (comp()->getOption(TR_TraceCG))
{
printInst();
Expand All @@ -96,7 +96,7 @@ TR_S390PreRAPeephole::perform()
}
case TR::InstOpCode::LG:
{
LoadStoreReduction(TR::InstOpCode::STG, 8);
attemptLoadStoreReduction(TR::InstOpCode::STG, 8);
if (comp()->getOption(TR_TraceCG))
{
printInst();
Expand All @@ -123,7 +123,7 @@ TR_S390PreRAPeephole::perform()
}

bool
TR_S390PreRAPeephole::LoadStoreReduction(TR::InstOpCode::Mnemonic storeOpCode, uint16_t size)
TR_S390PreRAPeephole::attemptLoadStoreReduction(TR::InstOpCode::Mnemonic storeOpCode, uint16_t size)
{
if (_cursor->getNext()->getOpCodeValue() == storeOpCode)
{
Expand Down
2 changes: 1 addition & 1 deletion compiler/z/codegen/S390Peephole.hpp
Expand Up @@ -80,7 +80,7 @@ class TR_S390PreRAPeephole : private TR_S390Peephole
* \return
* true if the reduction was successful; false otherwise.
*/
bool LoadStoreReduction(TR::InstOpCode::Mnemonic storeOpCode, uint16_t size);
bool attemptLoadStoreReduction(TR::InstOpCode::Mnemonic storeOpCode, uint16_t size);
};

class TR_S390PostRAPeephole : private TR_S390Peephole
Expand Down

0 comments on commit a456077

Please sign in to comment.