Skip to content

Commit 59433e2

Browse files
committed
---
yaml --- r: 68475 b: refs/heads/auto c: 647b4a6 h: refs/heads/master i: 68473: 50a7c59 68471: 0e61586 v: v3
1 parent 75ad623 commit 59433e2

File tree

26 files changed

+288
-502
lines changed

26 files changed

+288
-502
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: 9340fd5ce0d7bd0f1bbfbda73944920bcc1364eb
17+
refs/heads/auto: 647b4a6bcd921507943a60fcc413f4ae69b2609c
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1919
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c

branches/auto/Makefile.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ endif
141141
CFG_GIT_DIR := $(CFG_SRC_DIR).git
142142
CFG_RELEASE = 0.7-pre
143143
CFG_VERSION = $(CFG_RELEASE)
144+
# windows exe's need numeric versions - don't use anything but
145+
# numbers and dots here
146+
CFG_VERSION_WIN = 0.7
144147

145148
ifneq ($(wildcard $(CFG_GIT)),)
146149
ifneq ($(wildcard $(CFG_GIT_DIR)),)
@@ -311,6 +314,7 @@ $(foreach host,$(CFG_HOST_TRIPLES), \
311314
export CFG_SRC_DIR
312315
export CFG_BUILD_DIR
313316
export CFG_VERSION
317+
export CFG_VERSION_WIN
314318
export CFG_BUILD_TRIPLE
315319
export CFG_LLVM_ROOT
316320
export CFG_ENABLE_MINGW_CROSS

branches/auto/mk/dist.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ LICENSE.txt: $(S)COPYRIGHT $(S)LICENSE-APACHE $(S)LICENSE-MIT
5757
cp $< $@
5858

5959
$(PKG_EXE): rust.iss modpath.iss LICENSE.txt rust-logo.ico \
60-
$(PKG_FILES) all rustc-stage3
60+
$(PKG_FILES) $(CSREQ3_T_$(CFG_BUILD_TRIPLE)_H_$(CFG_BUILD_TRIPLE))
6161
@$(call E, ISCC: $@)
6262
$(Q)"$(CFG_ISCC)" $<
6363
endif

branches/auto/mk/tools.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,8 @@ $(foreach host,$(CFG_HOST_TRIPLES), \
191191
$(foreach target,$(CFG_TARGET_TRIPLES), \
192192
$(eval $(call TOOLS_STAGE_N_TARGET,0,1,$(host),$(target))) \
193193
$(eval $(call TOOLS_STAGE_N_TARGET,1,2,$(host),$(target))) \
194-
$(eval $(call TOOLS_STAGE_N_TARGET,2,3,$(host),$(target)))))
194+
$(eval $(call TOOLS_STAGE_N_TARGET,2,3,$(host),$(target))) \
195+
$(eval $(call TOOLS_STAGE_N_TARGET,3,bogus,$(host),$(target)))))
195196

196197
$(foreach host,$(CFG_HOST_TRIPLES), \
197198
$(eval $(call TOOLS_STAGE_N_HOST,0,1,$(host),$(host))) \

branches/auto/src/etc/pkg/rust.iss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#define CFG_VERSION GetEnv("CFG_VERSION")
2+
#define CFG_VERSION_WIN GetEnv("CFG_VERSION_WIN")
23

34
[Setup]
45

@@ -8,7 +9,7 @@ AppVersion={#CFG_VERSION}
89
AppCopyright=Copyright (C) 2006-2013 Mozilla Foundation, MIT license
910
AppPublisher=Mozilla Foundation
1011
AppPublisherURL=http://www.rust-lang.org
11-
VersionInfoVersion={#CFG_VERSION}
12+
VersionInfoVersion={#CFG_VERSION_WIN}
1213
LicenseFile=LICENSE.txt
1314

1415
DisableWelcomePage=true

branches/auto/src/librustc/back/passes.rs

Lines changed: 87 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -60,90 +60,109 @@ impl PassManager {
6060
}
6161
}
6262

63-
pub fn create_standard_passes(level:OptLevel) -> ~[~str] {
64-
let mut passes = ~[~"strip-dead-prototypes"];
65-
66-
if level == No {
67-
passes.push(~"always-inline");
68-
return passes;
63+
pub fn create_standard_passes(level: OptLevel) -> ~[~str] {
64+
let mut passes = ~[];
65+
66+
// mostly identical to clang 3.3, all differences are documented with comments
67+
68+
if level != No {
69+
passes.push(~"targetlibinfo");
70+
passes.push(~"no-aa");
71+
// "tbaa" omitted, we don't emit clang-style type-based alias analysis information
72+
passes.push(~"basicaa");
73+
passes.push(~"globalopt");
74+
passes.push(~"ipsccp");
75+
passes.push(~"deadargelim");
76+
passes.push(~"instcombine");
77+
passes.push(~"simplifycfg");
6978
}
7079

71-
passes.push(~"targetlibinfo");
72-
73-
passes.push(~"scev-aa");
74-
passes.push(~"basicaa");
75-
76-
passes.push(~"instcombine");
77-
passes.push(~"simplifycfg");
78-
passes.push(~"scalarrepl-ssa");
79-
passes.push(~"early-cse");
80-
81-
passes.push(~"globalopt");
82-
passes.push(~"ipsccp");
83-
passes.push(~"deadargelim");
84-
passes.push(~"instcombine");
85-
passes.push(~"simplifycfg");
80+
passes.push(~"basiccg");
8681

87-
passes.push(~"prune-eh");
88-
89-
passes.push(~"inline");
90-
91-
passes.push(~"functionattrs");
92-
93-
if level == Aggressive {
94-
passes.push(~"argpromotion");
82+
if level != No {
83+
passes.push(~"prune-eh");
9584
}
9685

97-
passes.push(~"scalarrepl-ssa");
98-
passes.push(~"early-cse");
99-
passes.push(~"simplify-libcalls");
100-
passes.push(~"jump-threading");
101-
passes.push(~"correlated-propagation");
102-
passes.push(~"simplifycfg");
103-
passes.push(~"instcombine");
104-
105-
passes.push(~"tailcallelim");
106-
passes.push(~"simplifycfg");
107-
passes.push(~"reassociate");
108-
passes.push(~"loop-rotate");
109-
passes.push(~"licm");
110-
111-
passes.push(~"lcssa");
112-
passes.push(~"loop-unswitch");
86+
passes.push(~"inline-cost");
11387

114-
passes.push(~"instcombine");
115-
passes.push(~"indvars");
116-
passes.push(~"loop-idiom");
117-
passes.push(~"loop-deletion");
118-
119-
if level == Aggressive {
120-
passes.push(~"loop-vectorize");
88+
if level == No || level == Less {
89+
passes.push(~"always-inline");
90+
} else {
91+
passes.push(~"inline");
12192
}
12293

123-
passes.push(~"loop-unroll");
124-
125-
if level != Less {
126-
passes.push(~"gvn");
94+
if level != No {
95+
passes.push(~"functionattrs");
96+
if level == Aggressive {
97+
passes.push(~"argpromotion");
98+
}
99+
passes.push(~"sroa");
100+
passes.push(~"domtree");
101+
passes.push(~"early-cse");
102+
passes.push(~"simplify-libcalls");
103+
passes.push(~"lazy-value-info");
104+
passes.push(~"jump-threading");
105+
passes.push(~"correlated-propagation");
106+
passes.push(~"simplifycfg");
107+
passes.push(~"instcombine");
108+
passes.push(~"tailcallelim");
109+
passes.push(~"simplifycfg");
110+
passes.push(~"reassociate");
111+
passes.push(~"domtree");
112+
passes.push(~"loops");
113+
passes.push(~"loop-simplify");
114+
passes.push(~"lcssa");
115+
passes.push(~"loop-rotate");
116+
passes.push(~"licm");
117+
passes.push(~"lcssa");
118+
passes.push(~"loop-unswitch");
119+
passes.push(~"instcombine");
120+
passes.push(~"scalar-evolution");
121+
passes.push(~"loop-simplify");
122+
passes.push(~"lcssa");
123+
passes.push(~"indvars");
124+
passes.push(~"loop-idiom");
125+
passes.push(~"loop-deletion");
126+
if level == Aggressive {
127+
passes.push(~"loop-simplify");
128+
passes.push(~"lcssa");
129+
passes.push(~"loop-vectorize");
130+
passes.push(~"loop-simplify");
131+
passes.push(~"lcssa");
132+
passes.push(~"scalar-evolution");
133+
passes.push(~"loop-simplify");
134+
passes.push(~"lcssa");
135+
}
136+
if level != Less {
137+
passes.push(~"loop-unroll");
138+
passes.push(~"memdep");
139+
passes.push(~"gvn");
140+
}
141+
passes.push(~"memdep");
142+
passes.push(~"memcpyopt");
143+
passes.push(~"sccp");
144+
passes.push(~"instcombine");
145+
passes.push(~"lazy-value-info");
146+
passes.push(~"jump-threading");
147+
passes.push(~"correlated-propagation");
148+
passes.push(~"domtree");
149+
passes.push(~"memdep");
150+
passes.push(~"dse");
151+
passes.push(~"adce");
152+
passes.push(~"simplifycfg");
153+
passes.push(~"instcombine");
154+
// clang does `strip-dead-prototypes` here, since it does not emit them
127155
}
128156

129-
passes.push(~"memcpyopt");
130-
passes.push(~"sccp");
131-
132-
passes.push(~"instcombine");
133-
passes.push(~"jump-threading");
134-
passes.push(~"correlated-propagation");
135-
passes.push(~"dse");
136-
137-
passes.push(~"adce");
138-
passes.push(~"simplifycfg");
139-
passes.push(~"instsimplify");
157+
// rustc emits dead prototypes, so always ask LLVM to strip them
158+
passes.push(~"strip-dead-prototypes");
140159

141160
if level != Less {
142161
passes.push(~"globaldce");
143162
passes.push(~"constmerge");
144163
}
145164

146-
return passes;
165+
passes
147166
}
148167

149168
pub fn populate_pass_manager(sess: Session, pm: &mut PassManager, pass_list:&[~str]) {

branches/auto/src/librustc/lib/llvm.rs

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2149,24 +2149,18 @@ impl TypeNames {
21492149
self.named_types.find_equiv(&s).map_consume(|x| Type::from_ref(*x))
21502150
}
21512151

2152-
// We have a depth count, because we seem to make infinite types.
2153-
pub fn type_to_str_depth(&self, ty: Type, depth: int) -> ~str {
2152+
pub fn type_to_str(&self, ty: Type) -> ~str {
21542153
match self.find_name(&ty) {
21552154
option::Some(name) => return name.to_owned(),
21562155
None => ()
21572156
}
21582157

2159-
if depth == 0 {
2160-
return ~"###";
2161-
}
2162-
21632158
unsafe {
21642159
let kind = ty.kind();
21652160

21662161
match kind {
21672162
Void => ~"Void",
21682163
Half => ~"Half",
2169-
Float => ~"Float",
21702164
Double => ~"Double",
21712165
X86_FP80 => ~"X86_FP80",
21722166
FP128 => ~"FP128",
@@ -2181,36 +2175,31 @@ impl TypeNames {
21812175
Function => {
21822176
let out_ty = ty.return_type();
21832177
let args = ty.func_params();
2184-
let args =
2185-
args.map(|&ty| self.type_to_str_depth(ty, depth-1)).connect(", ");
2186-
let out_ty = self.type_to_str_depth(out_ty, depth-1);
2178+
let args = args.map(|&ty| self.type_to_str(ty)).connect(", ");
2179+
let out_ty = self.type_to_str(out_ty);
21872180
fmt!("fn(%s) -> %s", args, out_ty)
21882181
}
21892182
Struct => {
21902183
let tys = ty.field_types();
2191-
let tys = tys.map(|&ty| self.type_to_str_depth(ty, depth-1)).connect(", ");
2184+
let tys = tys.map(|&ty| self.type_to_str(ty)).connect(", ");
21922185
fmt!("{%s}", tys)
21932186
}
21942187
Array => {
21952188
let el_ty = ty.element_type();
2196-
let el_ty = self.type_to_str_depth(el_ty, depth-1);
2189+
let el_ty = self.type_to_str(el_ty);
21972190
let len = ty.array_length();
21982191
fmt!("[%s x %u]", el_ty, len)
21992192
}
22002193
Pointer => {
22012194
let el_ty = ty.element_type();
2202-
let el_ty = self.type_to_str_depth(el_ty, depth-1);
2195+
let el_ty = self.type_to_str(el_ty);
22032196
fmt!("*%s", el_ty)
22042197
}
22052198
_ => fail!("Unknown Type Kind (%u)", kind as uint)
22062199
}
22072200
}
22082201
}
22092202

2210-
pub fn type_to_str(&self, ty: Type) -> ~str {
2211-
self.type_to_str_depth(ty, 30)
2212-
}
2213-
22142203
pub fn val_to_str(&self, val: ValueRef) -> ~str {
22152204
unsafe {
22162205
let ty = Type::from_ref(llvm::LLVMTypeOf(val));

branches/auto/src/librustc/middle/astencode.rs

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -599,10 +599,8 @@ fn encode_vtable_res(ecx: &e::EncodeContext,
599599
// ty::t doesn't work, and there is no way (atm) to have
600600
// hand-written encoding routines combine with auto-generated
601601
// ones. perhaps we should fix this.
602-
do ebml_w.emit_from_vec(*dr) |ebml_w, param_tables| {
603-
do ebml_w.emit_from_vec(**param_tables) |ebml_w, vtable_origin| {
604-
encode_vtable_origin(ecx, ebml_w, vtable_origin)
605-
}
602+
do ebml_w.emit_from_vec(*dr) |ebml_w, vtable_origin| {
603+
encode_vtable_origin(ecx, ebml_w, vtable_origin)
606604
}
607605
}
608606

@@ -634,13 +632,6 @@ fn encode_vtable_origin(ecx: &e::EncodeContext,
634632
}
635633
}
636634
}
637-
typeck::vtable_self(def_id) => {
638-
do ebml_w.emit_enum_variant("vtable_self", 2u, 1u) |ebml_w| {
639-
do ebml_w.emit_enum_variant_arg(0u) |ebml_w| {
640-
ebml_w.emit_def_id(def_id)
641-
}
642-
}
643-
}
644635
}
645636
}
646637
}
@@ -655,17 +646,13 @@ trait vtable_decoder_helpers {
655646
impl vtable_decoder_helpers for reader::Decoder {
656647
fn read_vtable_res(&mut self, xcx: @ExtendedDecodeContext)
657648
-> typeck::vtable_res {
658-
@self.read_to_vec(|this|
659-
@this.read_to_vec(|this|
660-
this.read_vtable_origin(xcx)))
649+
@self.read_to_vec(|this| this.read_vtable_origin(xcx))
661650
}
662651

663652
fn read_vtable_origin(&mut self, xcx: @ExtendedDecodeContext)
664653
-> typeck::vtable_origin {
665654
do self.read_enum("vtable_origin") |this| {
666-
do this.read_enum_variant(["vtable_static",
667-
"vtable_param",
668-
"vtable_self"])
655+
do this.read_enum_variant(["vtable_static", "vtable_param"])
669656
|this, i| {
670657
match i {
671658
0 => {
@@ -691,13 +678,6 @@ impl vtable_decoder_helpers for reader::Decoder {
691678
}
692679
)
693680
}
694-
2 => {
695-
typeck::vtable_self(
696-
do this.read_enum_variant_arg(0u) |this| {
697-
this.read_def_id(xcx)
698-
}
699-
)
700-
}
701681
// hard to avoid - user input
702682
_ => fail!("bad enum variant")
703683
}

0 commit comments

Comments
 (0)