Skip to content
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

Rollup of 8 pull requests #32209

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
7f3491c
Fix name resolution in lexical scopes
jseyfried Mar 8, 2016
210109c
Include the crate root in the ribs
jseyfried Feb 26, 2016
87708b7
Refactor away check_ribs
jseyfried Mar 8, 2016
e742da0
Add regression test
jseyfried Mar 8, 2016
37efeae
Define AVX broadcast intrinsics
ruuda Mar 8, 2016
51b5300
Define AVX conversion intrinsics
ruuda Mar 8, 2016
c306853
Regenerate x86 platform intrinsics
ruuda Mar 9, 2016
ae7fca1
Check for `doc(inline)` instead of `.*(inline)`
mitaa Mar 9, 2016
59279b5
Do not report errors from regionck if other errors were already
nikomatsakis Mar 9, 2016
a20e6bb
Consider `doc(hidden)` for crate-local inlining
mitaa Mar 10, 2016
7c98399
Remove `feature(globs)` since they are stable
mitaa Mar 8, 2016
1b6d284
refactor derive-no-std test, add empty struct/enum
durka Mar 2, 2016
2321994
derive: emit intrinsics::unreachable for impls on empty enums
durka Mar 3, 2016
0ddc17d
Add comment explaining purpose of test
nikomatsakis Mar 10, 2016
700b226
derive: assume enum repr defaults to i64
durka Mar 3, 2016
c1c363a
add #[derive(Hash)] test for #21714
durka Mar 5, 2016
7074a88
fix #21714 by using discriminant_value in #[derive(Hash)]
durka Mar 7, 2016
bc53d91
fix FIXME(#6449) in #[derive(PartialOrd, Ord)]
durka Mar 7, 2016
fe999e3
derive: remove most __ strings FIXME(#2810)
durka Mar 8, 2016
c12e906
derive: improve hygiene for type parameters (see #2810)
durka Mar 8, 2016
8cccdd0
deriving: factor out discriminant_value construction
durka Mar 10, 2016
e926f28
Comment `resolve_item_in_lexical_scope`
jseyfried Mar 11, 2016
b308ed0
Removed integer suffixes in libsyntax crate
srinivasreddy Mar 10, 2016
7ca8fad
Rollup merge of #32139 - durka:derive-fix, r=alexcrichton
Manishearth Mar 12, 2016
773af25
Rollup merge of #32140 - ruud-v-a:avx-intrinsics, r=alexcrichton
Manishearth Mar 12, 2016
a128b31
Rollup merge of #32141 - jseyfried:fix_resolution_in_lexical_scopes, …
Manishearth Mar 12, 2016
5d443c6
Rollup merge of #32142 - mitaa:rdoc-maybe-inline-local, r=alexcrichton
Manishearth Mar 12, 2016
23f042c
Rollup merge of #32164 - nikomatsakis:fewer-errors, r=eddyb
Manishearth Mar 12, 2016
bd5aff4
Rollup merge of #32179 - srinivasreddy:remove_int_suffix, r=steveklabnik
Manishearth Mar 12, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions src/etc/platform-intrinsics/x86/avx.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,69 @@
"ret": "f(32-64)",
"args": ["0", "0"]
},
{
"intrinsic": "256_broadcast_{0.data_type}",
"width": [256],
"llvm": "vbroadcastf128.{0.data_type}.256",
"ret": "f(32-64)",
"args": ["s8SPc"]
},
{
"intrinsic": "256_cvtepi32_pd",
"width": [256],
"llvm": "cvtdq2.pd.256",
"ret": "f64",
"args": ["s32h"]
},
{
"intrinsic": "256_cvtepi32_ps",
"width": [256],
"llvm": "cvtdq2.ps.256",
"ret": "f32",
"args": ["s32"]
},
{
"intrinsic": "256_cvtpd_epi32",
"width": [256],
"llvm": "cvt.pd2dq.256",
"ret": "s32h",
"args": ["f64"]
},
{
"intrinsic": "256_cvtpd_ps",
"width": [256],
"llvm": "cvt.pd2.ps.256",
"ret": "f32h",
"args": ["f64"]
},
{
"intrinsic": "256_cvtps_epi32",
"width": [256],
"llvm": "cvt.ps2dq.256",
"ret": "s32",
"args": ["f32"]
},
{
"intrinsic": "256_cvtps_pd",
"width": [256],
"llvm": "cvt.ps2.pd.256",
"ret": "f64",
"args": ["f32h"]
},
{
"intrinsic": "256_cvttpd_epi32",
"width": [256],
"llvm": "cvtt.pd2dq.256",
"ret": "s32h",
"args": ["f64"]
},
{
"intrinsic": "256_cvttps_epi32",
"width": [256],
"llvm": "cvtt.ps2dq.256",
"ret": "s32",
"args": ["f32"]
},
{
"intrinsic": "256_dp_ps",
"width": [256],
Expand Down
15 changes: 13 additions & 2 deletions src/librustc/middle/infer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1120,11 +1120,15 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
.map(|method| resolve_ty(method.ty)))
}

pub fn errors_since_creation(&self) -> bool {
self.tcx.sess.err_count() - self.err_count_on_creation != 0
}

pub fn node_type(&self, id: ast::NodeId) -> Ty<'tcx> {
match self.tables.borrow().node_types.get(&id) {
Some(&t) => t,
// FIXME
None if self.tcx.sess.err_count() - self.err_count_on_creation != 0 =>
None if self.errors_since_creation() =>
self.tcx.types.err,
None => {
self.tcx.sess.bug(
Expand All @@ -1147,7 +1151,14 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
free_regions: &FreeRegionMap,
subject_node_id: ast::NodeId) {
let errors = self.region_vars.resolve_regions(free_regions, subject_node_id);
self.report_region_errors(&errors); // see error_reporting.rs
if !self.errors_since_creation() {
// As a heuristic, just skip reporting region errors
// altogether if other errors have been reported while
// this infcx was in use. This is totally hokey but
// otherwise we have a hard time separating legit region
// errors from silly ones.
self.report_region_errors(&errors); // see error_reporting.rs
}
}

pub fn ty_to_string(&self, t: Ty<'tcx>) -> String {
Expand Down
50 changes: 50 additions & 0 deletions src/librustc_platform_intrinsics/x86.rs
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,56 @@ pub fn find<'tcx>(_tcx: &TyCtxt<'tcx>, name: &str) -> Option<Intrinsic> {
output: v(f(64), 4),
definition: Named("llvm.x86.avx.addsub.pd.256")
},
"256_broadcast_ps" => Intrinsic {
inputs: vec![p(true, i(8), None)],
output: v(f(32), 8),
definition: Named("llvm.x86.avx.vbroadcastf128.ps.256")
},
"256_broadcast_pd" => Intrinsic {
inputs: vec![p(true, i(8), None)],
output: v(f(64), 4),
definition: Named("llvm.x86.avx.vbroadcastf128.pd.256")
},
"256_cvtepi32_pd" => Intrinsic {
inputs: vec![v(i(32), 4)],
output: v(f(64), 4),
definition: Named("llvm.x86.avx.cvtdq2.pd.256")
},
"256_cvtepi32_ps" => Intrinsic {
inputs: vec![v(i(32), 8)],
output: v(f(32), 8),
definition: Named("llvm.x86.avx.cvtdq2.ps.256")
},
"256_cvtpd_epi32" => Intrinsic {
inputs: vec![v(f(64), 4)],
output: v(i(32), 4),
definition: Named("llvm.x86.avx.cvt.pd2dq.256")
},
"256_cvtpd_ps" => Intrinsic {
inputs: vec![v(f(64), 4)],
output: v(f(32), 4),
definition: Named("llvm.x86.avx.cvt.pd2.ps.256")
},
"256_cvtps_epi32" => Intrinsic {
inputs: vec![v(f(32), 8)],
output: v(i(32), 8),
definition: Named("llvm.x86.avx.cvt.ps2dq.256")
},
"256_cvtps_pd" => Intrinsic {
inputs: vec![v(f(32), 4)],
output: v(f(64), 4),
definition: Named("llvm.x86.avx.cvt.ps2.pd.256")
},
"256_cvttpd_epi32" => Intrinsic {
inputs: vec![v(f(64), 4)],
output: v(i(32), 4),
definition: Named("llvm.x86.avx.cvtt.pd2dq.256")
},
"256_cvttps_epi32" => Intrinsic {
inputs: vec![v(f(32), 8)],
output: v(i(32), 8),
definition: Named("llvm.x86.avx.cvtt.ps2dq.256")
},
"256_dp_ps" => Intrinsic {
inputs: vec![v(f(32), 8), v(f(32), 8), i_(32, 8)],
output: v(f(32), 8),
Expand Down
Loading