Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Refactor RyuJIT/x86 long decomposition code #6202

Merged
merged 1 commit into from
Jul 11, 2016

Conversation

BruceForstall
Copy link

All decomposition code is now in decompose.cpp, in a Decompose class.
Each node type that is decomposed has its own member function to do
the decomposition. Various helpers have been added to reduce code
duplication. In general, though, the code is as it was before.

Fixes #5866

@BruceForstall
Copy link
Author

@adiaaida @CarolEidt @mikedn PTAL
cc @dotnet/jit-contrib

{
for (GenTree* stmt = block->bbTreeList; stmt != nullptr; stmt = stmt->gtNext)
{
if (stmt->gtFlags & GTF_STMT_SKIP_LOWER)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Side note: this is incorrect. Should be fixed when we deal with duplicate decomposition caused by embedded temporary creation logic.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll remove the check

@mikedn
Copy link

mikedn commented Jul 9, 2016

Looks great. Though I would have called it LargeInt instead of Decompose :)

if (!gtLong->gtOp.gtOp2->OperIsLeaf())
{
// REVIEW: should we also use CreateEmbeddedFormTemp() here?
GenTreeStmt* dataHighStmt = comp->fgInsertEmbeddedFormTemp(&gtLong->gtOp.gtOp2);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we also use CreateEmbeddedFormTemp() here?

IMO yes. As explained in the GT_NEG PR that logic isn't necessary here but I don't think it helps to avoid using CreateEmbeddedFormTemp, quite the contrary.

@BruceForstall
Copy link
Author

Though I would have called it LargeInt instead of Decompose :)

I think I'll rename the class (and files) to DecomposeLongs to be more explicit.

All decomposition code is now in decompose.cpp, in a Decompose class.
Each node type that is decomposed has its own member function to do
the decomposition. Various helpers have been added to reduce code
duplication. In general, though, the code is as it was before.
@BruceForstall
Copy link
Author

@mmitche the Ubuntu x64 checked run failed with Doule failure reporting on flowRuns. What is a "doule failure"? Is that supposed to say "double"? (Not that it would be any clearer to me spelled that way).

@BruceForstall
Copy link
Author

@dotnet-bot test Ubuntu x64 Checked Build and Test

DecomposeStoreInd(ppTree, data);
break;

case GT_STORE_LCL_FLD:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we put these in their own functions too, so that when we fill them in, we just fill out the function? (here, GT_IND, for sure. Not sure on the arithmetic operations, because those may be morphed into helper calls in morph rather than handled in Decomp, like some div/mul operations already are).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume you're referring to the NYI. Yes, they should be put in their own functions when filled in. Since i didn't know if they would share functions or how they would be structured, I didn't want to waste time on creating function shells now.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's what I meant. And that makes sense.

@michellemcdaniel
Copy link

Otherwise, looks good to me.

@mmitche
Copy link
Member

mmitche commented Jul 11, 2016

@BruceForstall Because the Linux/OSX runs require multiple jobs, the top job fails if any subjob fails. This failure analysis ensures that we don't end up with a bunch of unknown failures. If you look at the page, you'll see the _tst sub project failed. Clicking on that, I see a test failure in the PAL tests:

http://dotnet-ci.cloudapp.net/job/dotnet_coreclr/job/master/job/checked_ubuntu_flow_prtest/3897/
http://dotnet-ci.cloudapp.net/job/dotnet_coreclr/job/master/job/checked_ubuntu_tst_prtest/3166/

@BruceForstall BruceForstall merged commit c99eaa4 into dotnet:master Jul 11, 2016
@BruceForstall BruceForstall deleted the RefactorDecomp branch July 11, 2016 17:20
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
Refactor RyuJIT/x86 long decomposition code

Commit migrated from dotnet/coreclr@c99eaa4
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants