Skip to content
This repository has been archived by the owner on Feb 5, 2019. It is now read-only.

Add accessors for MCSubtargetInfo CPU and Feature tables #45

Merged
merged 1 commit into from
Jul 18, 2016

Conversation

bitshifter
Copy link

This is part of a fix for rust-lang/rust#30961. The rustc fix requires exposing some private members on MCSubtargetInfo so they can be printed from rustc.

@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @brson (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive
Copy link

warning Warning warning

  • Pull requests are usually filed against the master branch for this repo, but this one is against rust-llvm-2016-03-13. Please double check that you specified the right target!

@ranma42
Copy link

ranma42 commented Jul 16, 2016

This would also allow a cleaner implementation of the target feature detection than that used in rust-lang/rust#31709

@brson
Copy link

brson commented Jul 18, 2016

Thanks @ranma42! @alexcrichton how do you feel about carrying this patch?

@brson
Copy link

brson commented Jul 18, 2016

This is pretty tiny so presumably not hard to upstream. Maybe it's worth while implementing our feature to show that this is sufficient to do what we need to, then upstream (though of course the motivation to upstream will decrease once we've got the feature we need).

@alexcrichton
Copy link
Member

Yeah this seems harmless to me, and as @ranma42 mentioned would make #31709 much cleaner!

I think though that we'll still have to figure out how to work with non-bundled LLVM as we still want to be able to compile against an external LLVM.

@alexcrichton alexcrichton merged commit a3c12a7 into rust-lang:rust-llvm-2016-03-13 Jul 18, 2016
@bitshifter
Copy link
Author

Thanks! I'll update rust-lang/rust#34845 to point at the official rust-llvm when I get home from work.

@brson
Copy link

brson commented Jul 19, 2016

Nice work @bitshifter !

bors added a commit to rust-lang/rust that referenced this pull request Aug 11, 2016
Add help for target CPUs, features, relocation and code models.

Fix for #30961. Requires PR rust-lang/llvm#45 to be accepted first, and the .gitmodules for llvm to be updated before this can be merged.
@infinity0
Copy link

Has this been submitted upstream to LLVM? I'm asking because I'm wondering if this will make it impossible to compile against vanilla LLVM - so that we would have to add another patch to our Debian LLVM package.

@cuviper
Copy link
Member

cuviper commented Nov 3, 2016

@infinity0 That was discussed in rust-lang/rust#34845, and it should be used conditionally. This was included in Rust 1.12.0, and I don't have any problem using vanilla LLVM on Fedora.

@infinity0
Copy link

OK great, thanks! (would still be nice if it were submitted upstream, eventually)

@bitshifter
Copy link
Author

The command line options for things like --print target-cpus are disabled when using an unpatched LLVM, so it's not ideal. Hopefully one of the Rust team will upstream the patch since they deal with LLVM regularly.

TimNN pushed a commit that referenced this pull request Apr 23, 2017
Add accessors for MCSubtargetInfo CPU and Feature tables
arielb1 pushed a commit that referenced this pull request Jun 27, 2017
Add accessors for MCSubtargetInfo CPU and Feature tables
TimNN added a commit that referenced this pull request Jul 20, 2017
Add accessors for MCSubtargetInfo CPU and Feature tables
TimNN added a commit that referenced this pull request Jul 20, 2017
Add accessors for MCSubtargetInfo CPU and Feature tables
alexcrichton pushed a commit that referenced this pull request Jul 30, 2017
Add accessors for MCSubtargetInfo CPU and Feature tables
alexcrichton pushed a commit that referenced this pull request Aug 4, 2017
Add accessors for MCSubtargetInfo CPU and Feature tables
alexcrichton pushed a commit that referenced this pull request Aug 15, 2017
Add accessors for MCSubtargetInfo CPU and Feature tables
alexcrichton pushed a commit that referenced this pull request Oct 10, 2017
Add accessors for MCSubtargetInfo CPU and Feature tables
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.

7 participants