- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Kill dead code dominator code. #59811
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
            
            
          Conversation
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
    | (rust_highfive has picked a reviewer for you, use r? to override) | 
| @bors r+ rollup Good catch. This wasn't removed when the uses were removed in de4dbe5#diff-8da257dba737a2318123538f324c54ceL162 | 
| 📌 Commit 3262d1e has been approved by  | 
| r? @oli-obk | 
    
  sanxiyn 
      added a commit
        to sanxiyn/rust
      that referenced
      this pull request
    
      Apr 11, 2019 
    
    
      
  
    
      
    
  
Kill dead code dominator code.
Hi,
Whilst fiddling around in the dominator code, I found some (I think) unused code. This code *was* used at the time it was imported, but over time it seems to have become redundant.
I've tested a build up to stage 1 with no problems. Maybe the tests will turn up something though.
P.S.
There is a FIXME comment in `dominators/mod.rs`:
```
    pub fn is_dominated_by(&self, node: Node, dom: Node) -> bool {
        // FIXME -- could be optimized by using post-order-rank
        self.dominators(node).any(|n| n == dom)
    }
```
I'm not sure of the intention of this comment. The `Dominators` struct already operates over post-order rank nodes. Any ideas?
    | What about that FIXME? | 
| I'm not sure. I'm guessing it's outdated, but I haven't checked deeply | 
    
  cramertj 
      added a commit
        to cramertj/rust
      that referenced
      this pull request
    
      Apr 11, 2019 
    
    
      
  
    
      
    
  
Kill dead code dominator code.
Hi,
Whilst fiddling around in the dominator code, I found some (I think) unused code. This code *was* used at the time it was imported, but over time it seems to have become redundant.
I've tested a build up to stage 1 with no problems. Maybe the tests will turn up something though.
P.S.
There is a FIXME comment in `dominators/mod.rs`:
```
    pub fn is_dominated_by(&self, node: Node, dom: Node) -> bool {
        // FIXME -- could be optimized by using post-order-rank
        self.dominators(node).any(|n| n == dom)
    }
```
I'm not sure of the intention of this comment. The `Dominators` struct already operates over post-order rank nodes. Any ideas?
    
    
  Centril 
      added a commit
        to Centril/rust
      that referenced
      this pull request
    
      Apr 12, 2019 
    
    
      
  
    
      
    
  
Kill dead code dominator code.
Hi,
Whilst fiddling around in the dominator code, I found some (I think) unused code. This code *was* used at the time it was imported, but over time it seems to have become redundant.
I've tested a build up to stage 1 with no problems. Maybe the tests will turn up something though.
P.S.
There is a FIXME comment in `dominators/mod.rs`:
```
    pub fn is_dominated_by(&self, node: Node, dom: Node) -> bool {
        // FIXME -- could be optimized by using post-order-rank
        self.dominators(node).any(|n| n == dom)
    }
```
I'm not sure of the intention of this comment. The `Dominators` struct already operates over post-order rank nodes. Any ideas?
    
    
  bors 
      added a commit
      that referenced
      this pull request
    
      Apr 12, 2019 
    
    
      
  
    
      
    
  
Rollup of 15 pull requests Successful merges: - #59680 (Document the -Z flag to the rustc book) - #59711 (Add back the substring test) - #59806 (compiletest: Improve no_prefer_dynamic docs) - #59809 (Make trait_methods_not_found use a lock) - #59811 (Kill dead code dominator code.) - #59814 (Fix broken links on std::boxed doc page) - #59821 (improve unknown enum variant errors) - #59831 (Remove strange formatting in `Ordering` docs.) - #59836 (std::ops::Div examples: correct nominator to numerator) - #59857 (SGX target: fix cfg(test) build) - #59876 (Update TRPL to use mdbook 0.2) - #59880 (Remove note about transmute for float bitpatterns.) - #59889 (Update diagnostics.rs) - #59891 (Fix the link to sort_by_cached_key) - #59894 (save-analysis: Pull associated type definition using `qpath_def`) Failed merges: r? @ghost
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
      Labels
      
    S-waiting-on-bors
  Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Hi,
Whilst fiddling around in the dominator code, I found some (I think) unused code. This code was used at the time it was imported, but over time it seems to have become redundant.
I've tested a build up to stage 1 with no problems. Maybe the tests will turn up something though.
P.S.
There is a FIXME comment in
dominators/mod.rs:I'm not sure of the intention of this comment. The
Dominatorsstruct already operates over post-order rank nodes. Any ideas?