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

Cleanup old trans #38302

Merged
merged 103 commits into from
Dec 21, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
bf7d453
Refactor Block into BlockAndBuilder
Mark-Simulacrum Dec 11, 2016
3f17ab9
Remove unreachable and terminated from Block
Mark-Simulacrum Dec 11, 2016
59ef51c
Replace build.rs with calling functions on builder directly
Mark-Simulacrum Dec 11, 2016
e77d928
Add notes regarding malloc_raw_dyn being unwind incompatible
Mark-Simulacrum Dec 11, 2016
ad0a901
Remove *_builder
Mark-Simulacrum Dec 11, 2016
fec59c5
Replace lpad().and_then(..) with None
Mark-Simulacrum Dec 11, 2016
3dbd141
Remove unused map_block
Mark-Simulacrum Dec 12, 2016
8f3d824
Remove common::Block.
Mark-Simulacrum Dec 12, 2016
86b2bdb
Rename LandingPad to Funclet
Mark-Simulacrum Dec 12, 2016
ed989d3
Simple cleanups/inlines in cleanup
Mark-Simulacrum Dec 12, 2016
5a36f88
Remove debug_loc from CleanupScope and privatize various helpers
Mark-Simulacrum Dec 12, 2016
ec518a0
Remove EarlyExitLabel, it only has one variant and is as such useless
Mark-Simulacrum Dec 12, 2016
2842912
Remove DropValue.is_immediate
Mark-Simulacrum Dec 12, 2016
48715a1
Reformatting
Mark-Simulacrum Dec 12, 2016
da971b7
Pull out get_or_create landing pad to avoid issues with dynamic borro…
Mark-Simulacrum Dec 12, 2016
85ef02d
Only one DropValue per CleanupScope
Mark-Simulacrum Dec 13, 2016
6412f31
Propagate CleanupScope::needs_invoke being always true
Mark-Simulacrum Dec 13, 2016
91707dc
Merge need_invoke and needs_invoke
Mark-Simulacrum Dec 13, 2016
51dfba1
Refactor Vec<CleanupScope> into Option<CleanupScope>.
Mark-Simulacrum Dec 13, 2016
28d00e7
Remove cleanup scope from FunctionContext
Mark-Simulacrum Dec 14, 2016
cd57bbe
Refactor get_landing_pad to take a CleanupScope
Mark-Simulacrum Dec 14, 2016
3265afa
Inline and simplify Callee::call duplicates.
Mark-Simulacrum Dec 14, 2016
6441c97
Remove push_ctxt
Mark-Simulacrum Dec 15, 2016
6710af3
Slightly simplify tvec::slice_for_each
Mark-Simulacrum Dec 15, 2016
3169169
Deduplicate store_operand_direct and store_operand
Mark-Simulacrum Dec 15, 2016
c7f8b0c
Eagerly evaluate landing pads for cleanup scopes
Mark-Simulacrum Dec 15, 2016
b10d89a
Move around code in cleanup for a more logical ordering, and fix comm…
Mark-Simulacrum Dec 15, 2016
14ae76d
Unbox FunctionDebugContextData.
Mark-Simulacrum Dec 15, 2016
dda6c8c
Inline base::malloc_raw_dyn.
Mark-Simulacrum Dec 16, 2016
5bdcc22
Remove FIXME
Mark-Simulacrum Dec 16, 2016
da23332
Remove remaining traces of block_arena
Mark-Simulacrum Dec 16, 2016
e0ccc81
Remove needless allows
Mark-Simulacrum Dec 16, 2016
28f511c
Remove global Builder
Mark-Simulacrum Dec 16, 2016
bc0b172
Remove BlockAndBuilder.funclet
Mark-Simulacrum Dec 16, 2016
be981dc
Start FunctionContext privatization and reduction
Mark-Simulacrum Dec 16, 2016
8201645
Remove DebugLoc.
Mark-Simulacrum Dec 16, 2016
5262113
Remove fcx.span
Mark-Simulacrum Dec 16, 2016
bf8614b
Rename Builder::alloca to dynamic_alloca
Mark-Simulacrum Dec 16, 2016
cbbdb73
Remove FunctionContext::cleanup, replacing it with a Drop impl.
Mark-Simulacrum Dec 16, 2016
c4f6173
Replace init with get_entry_block.
Mark-Simulacrum Dec 16, 2016
8ed1120
Minor cleanup to context
Mark-Simulacrum Dec 16, 2016
755850f
Merge OwnedBuilder and Builder
Mark-Simulacrum Dec 17, 2016
85ab080
Remove global builder
Mark-Simulacrum Dec 17, 2016
05d107d
Inline validate_substs
Mark-Simulacrum Dec 17, 2016
65f0400
Remove FunctionContext.landingpad_alloca.
Mark-Simulacrum Dec 17, 2016
9c38a54
Inline FunctionContext.mir
Mark-Simulacrum Dec 17, 2016
cc1e210
Inline trans_exchange_free
Mark-Simulacrum Dec 17, 2016
449c6d8
Simplify basic_block.rs
Mark-Simulacrum Dec 17, 2016
88b2024
Cleanup instruction counting
Mark-Simulacrum Dec 17, 2016
21bd747
Remove unused functions in abi
Mark-Simulacrum Dec 17, 2016
9a19853
Remove unused imports
Mark-Simulacrum Dec 17, 2016
937001a
Refactor Callee::call to take bcx by-reference.
Mark-Simulacrum Dec 17, 2016
1804131
Remove Ref::clone for MirContext mir
Mark-Simulacrum Dec 17, 2016
f051c60
Reduce extensions to FunctionContext in cleanup.
Mark-Simulacrum Dec 17, 2016
c693bcc
Inline memfill and merge with memset_intrinsic.
Mark-Simulacrum Dec 17, 2016
611e90b
Simplify intrinsic match statement
Mark-Simulacrum Dec 17, 2016
99816a6
Further simplify intrinsic matching
Mark-Simulacrum Dec 18, 2016
b48e74b
Rename 'blk and 'bcx to 'a
Mark-Simulacrum Dec 18, 2016
515d14f
Inline/Replace finish with build_return_block
Mark-Simulacrum Dec 18, 2016
97a2096
Inline and cleanup build_return_block
Mark-Simulacrum Dec 18, 2016
1173db0
Inline last remaining use of Callee::call and delete unused code
Mark-Simulacrum Dec 18, 2016
a802b9f
Inline get_funclet
Mark-Simulacrum Dec 18, 2016
fc8c280
Remove lifetime parameter
Mark-Simulacrum Dec 18, 2016
2b9a0ef
Move debug_context to MirContext from FunctionContext
Mark-Simulacrum Dec 18, 2016
a42a342
Move param_env onto SharedCrateContext, and move functions which need…
Mark-Simulacrum Dec 18, 2016
e10695f
Move param_substs onto MirContext
Mark-Simulacrum Dec 18, 2016
0a71b38
Remove llretslotptr from FunctionContext
Mark-Simulacrum Dec 18, 2016
4c7041e
Don't special case abort/unreachable intrinsics
Mark-Simulacrum Dec 18, 2016
2bda3b7
Inline and simplify init_cpad
Mark-Simulacrum Dec 19, 2016
63a0d85
Make add_incoming_to_phi call slightly less confusing.
Mark-Simulacrum Dec 19, 2016
f9f1406
Rebase fixes
Mark-Simulacrum Dec 19, 2016
6e3d8cd
Fix and cleanup callee shims
Mark-Simulacrum Dec 19, 2016
dd1890f
Remove unreachable call to unreachable
Mark-Simulacrum Dec 19, 2016
7f5dffb
Make debuginfo take debug_context instead of MirContext
Mark-Simulacrum Dec 19, 2016
a445199
Remove public ccx function on MirContext
Mark-Simulacrum Dec 19, 2016
0256f60
Move debug info check into create_function_debug_context
Mark-Simulacrum Dec 19, 2016
5301d38
Remove unused bcx from LocalAnalyzer.
Mark-Simulacrum Dec 19, 2016
7f87163
Simplify funclets creation.
Mark-Simulacrum Dec 19, 2016
5ef85dd
Change param_env to empty_param_env
Mark-Simulacrum Dec 19, 2016
22bf541
Clean up uses of set_personality_fn.
Mark-Simulacrum Dec 19, 2016
f11721a
Add helper function to set debug locations
Mark-Simulacrum Dec 19, 2016
f103ea4
Remove unecessary logic.
Mark-Simulacrum Dec 19, 2016
88202c5
Replace bcx.ccx() with bcx.ccx
Mark-Simulacrum Dec 19, 2016
15c9e5e
Mutate llargs instead of reconstructing it.
Mark-Simulacrum Dec 20, 2016
6fac0a1
Change *.fcx.ccx to *.ccx
Mark-Simulacrum Dec 20, 2016
d55e739
Do not use BAB after calling unreachable.
Mark-Simulacrum Dec 20, 2016
6f368e6
Use fn_ty directly
Mark-Simulacrum Dec 20, 2016
0d5a8ad
Move get_landing_pad onto DropVal.
Mark-Simulacrum Dec 20, 2016
6a1ec55
Remove needless check
Mark-Simulacrum Dec 20, 2016
b9f1064
Inline make_drop_glue
Mark-Simulacrum Dec 20, 2016
98a13ff
Remove outdated comment
Mark-Simulacrum Dec 20, 2016
295ea0d
Reduce coerce_unsized_into to one call
Mark-Simulacrum Dec 20, 2016
15b9b27
slice_for_each gives a reference already
Mark-Simulacrum Dec 20, 2016
bd009dc
Remove fn_ty from FunctionContext
Mark-Simulacrum Dec 20, 2016
3198797
Remove outdated comment
Mark-Simulacrum Dec 20, 2016
57914f6
Move eh_personality() onto CrateContext
Mark-Simulacrum Dec 20, 2016
07cf2a9
Simplify callee by removing is_indirect branch.
Mark-Simulacrum Dec 20, 2016
654131c
Add unreachable() after calls to eh_unwind_resume.
Mark-Simulacrum Dec 20, 2016
a811f60
Simplify get_landing_pad by inlining UnwindKind.
Mark-Simulacrum Dec 20, 2016
a9b5c63
Move eh_unwind_resume into CrateContext
Mark-Simulacrum Dec 20, 2016
c1bc5e5
Improve cache quality for eh_personality.
Mark-Simulacrum Dec 20, 2016
079abd0
Reuse cleanup pad declared at start of block.
Mark-Simulacrum Dec 20, 2016
0013d4c
Fix rebase errors.
Mark-Simulacrum Dec 21, 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
Prev Previous commit
Next Next commit
Replace lpad().and_then(..) with None
  • Loading branch information
Mark-Simulacrum committed Dec 21, 2016
commit fec59c5f737d044df31284090dcab2a7b678982d
42 changes: 1 addition & 41 deletions src/librustc_trans/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ pub fn malloc_raw_dyn<'blk, 'tcx>(bcx: &BlockAndBuilder<'blk, 'tcx>,
// Allocate space:
let def_id = require_alloc_fn(bcx, info_ty, ExchangeMallocFnLangItem);
let r = Callee::def(bcx.ccx(), def_id, bcx.tcx().intern_substs(&[])).reify(bcx.ccx());
bcx.pointercast(bcx.call(r, &[size, align], bcx.lpad().and_then(|b| b.bundle())), llty_ptr)
bcx.pointercast(bcx.call(r, &[size, align], None), llty_ptr)
}


Expand Down Expand Up @@ -451,38 +451,6 @@ fn cast_shift_rhs<F, G>(op: hir::BinOp_,
}
}

pub fn invoke<'blk, 'tcx>(bcx: BlockAndBuilder<'blk, 'tcx>,
llfn: ValueRef,
llargs: &[ValueRef])
-> (ValueRef, BlockAndBuilder<'blk, 'tcx>) {
let _icx = push_ctxt("invoke_");
if need_invoke(&bcx) {
debug!("invoking {:?} at {:?}", Value(llfn), bcx.llbb());
for &llarg in llargs {
debug!("arg: {:?}", Value(llarg));
}
let normal_bcx = bcx.fcx().new_block("normal-return");
let landing_pad = bcx.fcx().get_landing_pad();

let llresult = bcx.invoke(
llfn,
&llargs[..],
normal_bcx.llbb,
landing_pad,
bcx.lpad().and_then(|b| b.bundle())
);
return (llresult, normal_bcx.build());
} else {
debug!("calling {:?} at {:?}", Value(llfn), bcx.llbb());
for &llarg in llargs {
debug!("arg: {:?}", Value(llarg));
}

let llresult = bcx.call(llfn, &llargs[..], bcx.lpad().and_then(|b| b.bundle()));
return (llresult, bcx);
}
}

/// Returns whether this session's target will use SEH-based unwinding.
///
/// This is only true for MSVC targets, and even then the 64-bit MSVC target
Expand All @@ -492,14 +460,6 @@ pub fn wants_msvc_seh(sess: &Session) -> bool {
sess.target.target.options.is_like_msvc
}

fn need_invoke(bcx: &BlockAndBuilder) -> bool {
if bcx.sess().no_landing_pads() || bcx.lpad().is_some() {
false
} else {
bcx.fcx().needs_invoke()
}
}

pub fn call_assume<'a, 'tcx>(b: &Builder<'a, 'tcx>, val: ValueRef) {
let assume_intrinsic = b.ccx.get_intrinsic("llvm.assume");
b.call(assume_intrinsic, &[val], None);
Expand Down
47 changes: 41 additions & 6 deletions src/librustc_trans/callee.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,10 @@ impl<'tcx> Callee<'tcx> {
/// function.
pub fn call<'a, 'blk>(self, bcx: BlockAndBuilder<'blk, 'tcx>,
args: &[ValueRef],
dest: Option<ValueRef>)
dest: Option<ValueRef>,
lpad: Option<&'blk llvm::OperandBundleDef>)
-> (BlockAndBuilder<'blk, 'tcx>, ValueRef) {
trans_call_inner(bcx, self, args, dest)
trans_call_inner(bcx, self, args, dest, lpad)
}

/// Turn the callee into a function pointer.
Expand Down Expand Up @@ -411,7 +412,7 @@ fn trans_fn_once_adapter_shim<'a, 'tcx>(
let self_scope = fcx.push_custom_cleanup_scope();
fcx.schedule_drop_mem(self_scope, llenv, closure_ty);

let bcx = callee.call(bcx, &llargs[self_idx..], dest).0;
let bcx = callee.call(bcx, &llargs[self_idx..], dest, None).0;

let bcx = fcx.pop_and_trans_custom_cleanup_scope(bcx, self_scope);

Expand Down Expand Up @@ -540,7 +541,7 @@ fn trans_fn_pointer_shim<'a, 'tcx>(
data: Fn(llfnpointer),
ty: bare_fn_ty
};
let bcx = callee.call(bcx, &llargs[(self_idx + 1)..], dest).0;
let bcx = callee.call(bcx, &llargs[(self_idx + 1)..], dest, None).0;
fcx.finish(&bcx);

ccx.fn_pointer_shims().borrow_mut().insert(bare_fn_ty_maybe_ref, llfn);
Expand Down Expand Up @@ -653,7 +654,8 @@ fn get_fn<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>,
fn trans_call_inner<'a, 'blk, 'tcx>(bcx: BlockAndBuilder<'blk, 'tcx>,
callee: Callee<'tcx>,
args: &[ValueRef],
opt_llretslot: Option<ValueRef>)
opt_llretslot: Option<ValueRef>,
lpad: Option<&'blk llvm::OperandBundleDef>)
-> (BlockAndBuilder<'blk, 'tcx>, ValueRef) {
// Introduce a temporary cleanup scope that will contain cleanups
// for the arguments while they are being evaluated. The purpose
Expand Down Expand Up @@ -707,7 +709,40 @@ fn trans_call_inner<'a, 'blk, 'tcx>(bcx: BlockAndBuilder<'blk, 'tcx>,
_ => bug!("expected fn pointer callee, found {:?}", callee)
};

let (llret, bcx) = base::invoke(bcx, llfn, &llargs);
fn need_invoke(bcx: &BlockAndBuilder, had_lpad: bool) -> bool {
if bcx.sess().no_landing_pads() || had_lpad {
false
} else {
bcx.fcx().needs_invoke()
}
}

let _icx = push_ctxt("invoke_");
let (llret, bcx) = if need_invoke(&bcx, lpad.is_some()) {
debug!("invoking {:?} at {:?}", Value(llfn), bcx.llbb());
for &llarg in &llargs {
debug!("arg: {:?}", Value(llarg));
}
let normal_bcx = bcx.fcx().new_block("normal-return");
let landing_pad = bcx.fcx().get_landing_pad();

let llresult = bcx.invoke(
llfn,
&llargs[..],
normal_bcx.llbb,
landing_pad,
lpad,
);
(llresult, normal_bcx.build())
} else {
debug!("calling {:?} at {:?}", Value(llfn), bcx.llbb());
for &llarg in &llargs {
debug!("arg: {:?}", Value(llarg));
}

let llresult = bcx.call(llfn, &llargs[..], lpad);
(llresult, bcx)
};
fn_ty.apply_attrs_callsite(llret);

// If the function we just called does not use an outpointer,
Expand Down
9 changes: 3 additions & 6 deletions src/librustc_trans/glue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ pub fn trans_exchange_free_dyn<'blk, 'tcx>(bcx: BlockAndBuilder<'blk, 'tcx>,
let def_id = langcall(bcx.tcx(), None, "", ExchangeFreeFnLangItem);
let args = [bcx.pointercast(v, Type::i8p(bcx.ccx())), size, align];
Callee::def(bcx.ccx(), def_id, bcx.tcx().intern_substs(&[]))
.call(bcx, &args, None).0
.call(bcx, &args, None, None).0
}

pub fn trans_exchange_free<'blk, 'tcx>(cx: BlockAndBuilder<'blk, 'tcx>,
Expand Down Expand Up @@ -288,8 +288,7 @@ fn trans_custom_dtor<'blk, 'tcx>(bcx: BlockAndBuilder<'blk, 'tcx>,
_ => bug!("dtor for {:?} is not an impl???", t)
};
let dtor_did = def.destructor().unwrap();
bcx = Callee::def(bcx.ccx(), dtor_did, vtbl.substs)
.call(bcx, args, None).0;
bcx = Callee::def(bcx.ccx(), dtor_did, vtbl.substs).call(bcx, args, None, None).0;

bcx.fcx().pop_and_trans_custom_cleanup_scope(bcx, contents_scope)
}
Expand Down Expand Up @@ -456,9 +455,7 @@ fn make_drop_glue<'blk, 'tcx>(bcx: BlockAndBuilder<'blk, 'tcx>,
let data_ptr = get_dataptr(&bcx, v0);
let vtable_ptr = bcx.load(get_meta(&bcx, v0));
let dtor = bcx.load(vtable_ptr);
bcx.call(dtor,
&[bcx.pointercast(bcx.load(data_ptr), Type::i8p(bcx.ccx()))],
bcx.lpad().and_then(|b| b.bundle()));
bcx.call(dtor, &[bcx.pointercast(bcx.load(data_ptr), Type::i8p(bcx.ccx()))], None);
bcx
}
ty::TyAdt(def, ..) if def.dtor_kind().is_present() && !skip_dtor => {
Expand Down
34 changes: 17 additions & 17 deletions src/librustc_trans/intrinsic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ pub fn trans_intrinsic_call<'a, 'blk, 'tcx>(bcx: &BlockAndBuilder<'blk, 'tcx>,
// These are the only intrinsic functions that diverge.
if name == "abort" {
let llfn = ccx.get_intrinsic(&("llvm.trap"));
bcx.call(llfn, &[], bcx.lpad().and_then(|b| b.bundle()));
bcx.call(llfn, &[], None);
return;
} else if name == "unreachable" {
// FIXME: do nothing?
Expand All @@ -131,23 +131,23 @@ pub fn trans_intrinsic_call<'a, 'blk, 'tcx>(bcx: &BlockAndBuilder<'blk, 'tcx>,
let simple = get_simple_intrinsic(ccx, name);
let llval = match (simple, name) {
(Some(llfn), _) => {
bcx.call(llfn, &llargs, bcx.lpad().and_then(|b| b.bundle()))
bcx.call(llfn, &llargs, None)
}
(_, "likely") => {
let expect = ccx.get_intrinsic(&("llvm.expect.i1"));
bcx.call(expect, &[llargs[0], C_bool(ccx, true)], bcx.lpad().and_then(|b| b.bundle()))
bcx.call(expect, &[llargs[0], C_bool(ccx, true)], None)
}
(_, "unlikely") => {
let expect = ccx.get_intrinsic(&("llvm.expect.i1"));
bcx.call(expect, &[llargs[0], C_bool(ccx, false)], bcx.lpad().and_then(|b| b.bundle()))
bcx.call(expect, &[llargs[0], C_bool(ccx, false)], None)
}
(_, "try") => {
try_intrinsic(bcx, llargs[0], llargs[1], llargs[2], llresult);
C_nil(ccx)
}
(_, "breakpoint") => {
let llfn = ccx.get_intrinsic(&("llvm.debugtrap"));
bcx.call(llfn, &[], bcx.lpad().and_then(|b| b.bundle()))
bcx.call(llfn, &[], None)
}
(_, "size_of") => {
let tp_ty = substs.type_at(0);
Expand Down Expand Up @@ -318,13 +318,13 @@ pub fn trans_intrinsic_call<'a, 'blk, 'tcx>(bcx: &BlockAndBuilder<'blk, 'tcx>,
"cttz" => count_zeros_intrinsic(bcx, &format!("llvm.cttz.i{}", width),
llargs[0]),
"ctpop" => bcx.call(ccx.get_intrinsic(&format!("llvm.ctpop.i{}", width)),
&llargs, bcx.lpad().and_then(|b| b.bundle())),
&llargs, None),
"bswap" => {
if width == 8 {
llargs[0] // byte swap a u8/i8 is just a no-op
} else {
bcx.call(ccx.get_intrinsic(&format!("llvm.bswap.i{}", width)),
&llargs, bcx.lpad().and_then(|b| b.bundle()))
&llargs, None)
}
}
"add_with_overflow" | "sub_with_overflow" | "mul_with_overflow" => {
Expand Down Expand Up @@ -654,7 +654,7 @@ pub fn trans_intrinsic_call<'a, 'blk, 'tcx>(bcx: &BlockAndBuilder<'blk, 'tcx>,
let f = declare::declare_cfn(ccx,
name,
Type::func(&inputs, &outputs));
bcx.call(f, &llargs, bcx.lpad().and_then(|b| b.bundle()))
bcx.call(f, &llargs, None)
}
};

Expand Down Expand Up @@ -720,7 +720,7 @@ fn copy_intrinsic<'blk, 'tcx>(bcx: &BlockAndBuilder<'blk, 'tcx>,
bcx.mul(size, count),
align,
C_bool(ccx, volatile)],
bcx.lpad().and_then(|b| b.bundle()))
None)
}

fn memset_intrinsic<'blk, 'tcx>(bcx: &BlockAndBuilder<'blk, 'tcx>,
Expand Down Expand Up @@ -748,7 +748,7 @@ fn memset_intrinsic<'blk, 'tcx>(bcx: &BlockAndBuilder<'blk, 'tcx>,
bcx.mul(size, count),
align,
C_bool(ccx, volatile)],
bcx.lpad().and_then(|b| b.bundle()))
None)
}

fn count_zeros_intrinsic(bcx: &BlockAndBuilder,
Expand All @@ -757,7 +757,7 @@ fn count_zeros_intrinsic(bcx: &BlockAndBuilder,
-> ValueRef {
let y = C_bool(bcx.ccx(), false);
let llfn = bcx.ccx().get_intrinsic(&name);
bcx.call(llfn, &[val, y], bcx.lpad().and_then(|b| b.bundle()))
bcx.call(llfn, &[val, y], None)
}

fn with_overflow_intrinsic<'blk, 'tcx>(bcx: &BlockAndBuilder<'blk, 'tcx>,
Expand All @@ -769,7 +769,7 @@ fn with_overflow_intrinsic<'blk, 'tcx>(bcx: &BlockAndBuilder<'blk, 'tcx>,
let llfn = bcx.ccx().get_intrinsic(&name);

// Convert `i1` to a `bool`, and write it to the out parameter
let val = bcx.call(llfn, &[a, b], bcx.lpad().and_then(|b| b.bundle()));
let val = bcx.call(llfn, &[a, b], None);
let result = bcx.extract_value(val, 0);
let overflow = bcx.zext(bcx.extract_value(val, 1), Type::bool(bcx.ccx()));
bcx.store(result, bcx.struct_gep(out, 0));
Expand All @@ -786,7 +786,7 @@ fn try_intrinsic<'blk, 'tcx>(
dest: ValueRef,
) {
if bcx.sess().no_landing_pads() {
bcx.call(func, &[data], bcx.lpad().and_then(|b| b.bundle()));
bcx.call(func, &[data], None);
bcx.store(C_null(Type::i8p(&bcx.ccx())), dest);
} else if wants_msvc_seh(bcx.sess()) {
trans_msvc_try(bcx, func, data, local_ptr, dest);
Expand Down Expand Up @@ -863,7 +863,7 @@ fn trans_msvc_try<'blk, 'tcx>(bcx: &BlockAndBuilder<'blk, 'tcx>,
let i64p = Type::i64(ccx).ptr_to();
let slot = bcx.fcx().alloca(i64p, "slot");
bcx.invoke(func, &[data], normal.llbb(), catchswitch.llbb(),
bcx.lpad().and_then(|b| b.bundle()));
None);

normal.ret(C_i32(ccx, 0));

Expand All @@ -890,7 +890,7 @@ fn trans_msvc_try<'blk, 'tcx>(bcx: &BlockAndBuilder<'blk, 'tcx>,

// Note that no invoke is used here because by definition this function
// can't panic (that's what it's catching).
let ret = bcx.call(llfn, &[func, data, local_ptr], bcx.lpad().and_then(|b| b.bundle()));
let ret = bcx.call(llfn, &[func, data, local_ptr], None);
bcx.store(ret, dest);
}

Expand Down Expand Up @@ -936,7 +936,7 @@ fn trans_gnu_try<'blk, 'tcx>(bcx: &BlockAndBuilder<'blk, 'tcx>,
let func = llvm::get_param(bcx.fcx().llfn, 0);
let data = llvm::get_param(bcx.fcx().llfn, 1);
let local_ptr = llvm::get_param(bcx.fcx().llfn, 2);
bcx.invoke(func, &[data], then.llbb(), catch.llbb(), bcx.lpad().and_then(|b| b.bundle()));
bcx.invoke(func, &[data], then.llbb(), catch.llbb(), None);
then.ret(C_i32(ccx, 0));

// Type indicator for the exception being thrown.
Expand All @@ -956,7 +956,7 @@ fn trans_gnu_try<'blk, 'tcx>(bcx: &BlockAndBuilder<'blk, 'tcx>,

// Note that no invoke is used here because by definition this function
// can't panic (that's what it's catching).
let ret = bcx.call(llfn, &[func, data, local_ptr], bcx.lpad().and_then(|b| b.bundle()));
let ret = bcx.call(llfn, &[func, data, local_ptr], None);
bcx.store(ret, dest);
}

Expand Down
2 changes: 1 addition & 1 deletion src/librustc_trans/meth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ pub fn trans_object_shim<'a, 'tcx>(ccx: &'a CrateContext<'a, 'tcx>,

let dest = fcx.llretslotptr.get();
let llargs = get_params(fcx.llfn);
bcx = callee.call(bcx, &llargs[fcx.fn_ty.ret.is_indirect() as usize..], dest).0;
bcx = callee.call(bcx, &llargs[fcx.fn_ty.ret.is_indirect() as usize..], dest, None).0;

fcx.finish(&bcx);

Expand Down