Skip to content

[gardening] Standardize SILBasicBlock successor/predecessor methods that deal with blocks rather than the full successor data structure to have the suffix 'Block'. #5939

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 28, 2016

Conversation

gottesmm
Copy link
Contributor

[gardening] Standardize SILBasicBlock successor/predecessor methods that deal with blocks rather than the full successor data structure to have the suffix 'Block'.

This was already done for getSuccessorBlocks() to distinguish getting successor
blocks from getting the full list of SILSuccessors via getSuccessors(). This
commit just makes all of the successor/predecessor code follow that naming
convention.

Some examples:

getSingleSuccessor() => getSingleSuccessorBlock().
isSuccessor() => isSuccessorBlock().
getPreds() => getPredecessorBlocks().

Really, IMO, we should consider renaming SILSuccessor to a more verbose name so
that it is clear that it is more of an internal detail of SILBasicBlock's
implementation rather than something that one should consider as apart of one's
mental model of the IR when one really wants to be thinking about predecessor
and successor blocks. But that is not what this commit is trying to change, it
is just trying to eliminate a bit of technical debt by making the naming
conventions here consistent.

@gottesmm
Copy link
Contributor Author

@swift-ci Please test

@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - 274c3013550788560f4fb9b0659460255d303f36
Test requested by - @gottesmm

@gottesmm
Copy link
Contributor Author

The linux failure is a type checker issue. I do not know why it is failing with this commit which only affects SIL. I am going to try one more time to see if it is non-deterministic and then I am going to wait to see if the Linux builders hit this.

@gottesmm
Copy link
Contributor Author

@swift-ci Please test linux platform

@gottesmm
Copy link
Contributor Author

Ah ok, it is non-determinstic. CodeFi is fixing it in dfa3723.

…hat deal with blocks rather than the full successor data structure to have the suffix 'Block'.

This was already done for getSuccessorBlocks() to distinguish getting successor
blocks from getting the full list of SILSuccessors via getSuccessors(). This
commit just makes all of the successor/predecessor code follow that naming
convention.

Some examples:

getSingleSuccessor() => getSingleSuccessorBlock().
isSuccessor() => isSuccessorBlock().
getPreds() => getPredecessorBlocks().

Really, IMO, we should consider renaming SILSuccessor to a more verbose name so
that it is clear that it is more of an internal detail of SILBasicBlock's
implementation rather than something that one should consider as apart of one's
mental model of the IR when one really wants to be thinking about predecessor
and successor blocks. But that is not what this commit is trying to change, it
is just trying to eliminate a bit of technical debt by making the naming
conventions here consistent.
@gottesmm gottesmm force-pushed the standardize_silbasicblock_more branch from 274c301 to 38ec08f Compare November 27, 2016 20:33
@gottesmm
Copy link
Contributor Author

I rebased ontop of his commit. Lets do this again...

@gottesmm
Copy link
Contributor Author

@swift-ci Please test and merge

1 similar comment
@gottesmm
Copy link
Contributor Author

@swift-ci Please test and merge

@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - 274c3013550788560f4fb9b0659460255d303f36
Test requested by - @gottesmm

@CodaFi
Copy link
Contributor

CodaFi commented Nov 27, 2016

@gottesmm Anything that can be done about the LLDB test that has been failing in the full test suite for a while now?

@gottesmm
Copy link
Contributor Author

@swift-ci Please smoke test linux platform

@gottesmm
Copy link
Contributor Author

@CodaFi I imagine that it should be disabled until the LLDB team has time to look at it.

@llvm-beanz @tfiala thoughts?

@gottesmm
Copy link
Contributor Author

@swift-ci Please smoke test linux platform

@gottesmm gottesmm merged commit 04e5e11 into swiftlang:master Nov 28, 2016
@gottesmm gottesmm deleted the standardize_silbasicblock_more branch November 28, 2016 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants