Philip Craig
af34f91c27
Fix debuginfo for unsized struct members
...
The member was given the size of a fat pointer, which caused
llvm to emit DWARF attributes for a 128-bit bitfield.
2016-12-22 21:16:41 +10:00
Mark Simulacrum
afc2dcd0ca
Make drop glue for unsized value pass two arguments instead of *(data, meta)
2016-12-21 12:02:09 -07:00
Ivan Molodetskikh
c461cdfdf6
Fixed fastcall not applying inreg attributes to arguments like the C/C++ fastcall.
2016-12-21 21:44:40 +03:00
Mark Simulacrum
0013d4cdf6
Fix rebase errors.
2016-12-20 20:37:19 -07:00
Mark Simulacrum
079abd0b1e
Reuse cleanup pad declared at start of block.
2016-12-20 20:04:46 -07:00
Mark Simulacrum
c1bc5e51d6
Improve cache quality for eh_personality.
2016-12-20 20:04:46 -07:00
Mark Simulacrum
a9b5c63d43
Move eh_unwind_resume into CrateContext
...
Also improves cache quality.
2016-12-20 20:04:46 -07:00
Mark Simulacrum
a811f60834
Simplify get_landing_pad by inlining UnwindKind.
2016-12-20 20:04:45 -07:00
Mark Simulacrum
654131cb53
Add unreachable() after calls to eh_unwind_resume.
2016-12-20 20:04:45 -07:00
Mark Simulacrum
07cf2a9005
Simplify callee by removing is_indirect branch.
2016-12-20 20:04:45 -07:00
Mark Simulacrum
57914f626b
Move eh_personality() onto CrateContext
2016-12-20 20:04:45 -07:00
Mark Simulacrum
3198797050
Remove outdated comment
2016-12-20 20:04:45 -07:00
Mark Simulacrum
bd009dc444
Remove fn_ty from FunctionContext
2016-12-20 20:04:44 -07:00
Mark Simulacrum
15b9b27bb0
slice_for_each gives a reference already
2016-12-20 20:04:44 -07:00
Mark Simulacrum
295ea0d6c3
Reduce coerce_unsized_into to one call
...
We cannot inline due to it being recursive.
2016-12-20 20:04:44 -07:00
Mark Simulacrum
98a13ffe44
Remove outdated comment
2016-12-20 20:04:44 -07:00
Mark Simulacrum
b9f1064760
Inline make_drop_glue
2016-12-20 20:04:44 -07:00
Mark Simulacrum
6a1ec55c47
Remove needless check
2016-12-20 20:04:43 -07:00
Mark Simulacrum
0d5a8ad110
Move get_landing_pad onto DropVal.
2016-12-20 20:04:43 -07:00
Mark Simulacrum
6f368e6da0
Use fn_ty directly
2016-12-20 20:04:43 -07:00
Mark Simulacrum
d55e73954a
Do not use BAB after calling unreachable.
...
This does not make unreachable and other terminators take self by-value
because it is deemed too difficult. We would need to create by-value
methods on BAB that call into Builder, due to the Deref to builder.
2016-12-20 20:04:43 -07:00
Mark Simulacrum
6fac0a1a84
Change *.fcx.ccx to *.ccx
2016-12-20 20:04:43 -07:00
Mark Simulacrum
15c9e5e35b
Mutate llargs instead of reconstructing it.
2016-12-20 20:04:42 -07:00
Mark Simulacrum
88202c5b83
Replace bcx.ccx() with bcx.ccx
2016-12-20 20:04:41 -07:00
Mark Simulacrum
f103ea4f89
Remove unecessary logic.
2016-12-20 20:03:36 -07:00
Mark Simulacrum
f11721a13e
Add helper function to set debug locations
2016-12-20 20:03:35 -07:00
Mark Simulacrum
22bf541e27
Clean up uses of set_personality_fn.
...
Remove gnu/msvc constructors for Funclet; these are worse for
readability than explicit Some/None.
2016-12-20 20:03:35 -07:00
Mark Simulacrum
5ef85dd57e
Change param_env to empty_param_env
2016-12-20 20:03:35 -07:00
Mark Simulacrum
7f87163071
Simplify funclets creation.
2016-12-20 20:03:35 -07:00
Mark Simulacrum
5301d380b6
Remove unused bcx from LocalAnalyzer.
2016-12-20 20:03:35 -07:00
Mark Simulacrum
0256f60461
Move debug info check into create_function_debug_context
2016-12-20 20:03:34 -07:00
Mark Simulacrum
a445199afb
Remove public ccx function on MirContext
2016-12-20 20:03:34 -07:00
Mark Simulacrum
7f5dffbb19
Make debuginfo take debug_context instead of MirContext
2016-12-20 20:03:34 -07:00
Mark Simulacrum
dd1890f7f4
Remove unreachable call to unreachable
2016-12-20 20:03:34 -07:00
Mark Simulacrum
6e3d8cda2c
Fix and cleanup callee shims
2016-12-20 20:03:34 -07:00
Mark Simulacrum
f9f1406eef
Rebase fixes
2016-12-20 20:03:33 -07:00
Mark Simulacrum
63a0d85457
Make add_incoming_to_phi call slightly less confusing.
2016-12-20 20:03:33 -07:00
Mark Simulacrum
2bda3b7acb
Inline and simplify init_cpad
2016-12-20 20:03:33 -07:00
Mark Simulacrum
4c7041ea7d
Don't special case abort/unreachable intrinsics
2016-12-20 20:03:33 -07:00
Mark Simulacrum
0a71b38803
Remove llretslotptr from FunctionContext
2016-12-20 20:03:33 -07:00
Mark Simulacrum
e10695f161
Move param_substs onto MirContext
2016-12-20 20:03:32 -07:00
Mark Simulacrum
a42a3429fe
Move param_env onto SharedCrateContext, and move functions which need the ParamEnv onto it.
2016-12-20 20:03:32 -07:00
Mark Simulacrum
2b9a0efef4
Move debug_context to MirContext from FunctionContext
2016-12-20 20:03:32 -07:00
Mark Simulacrum
fc8c280fbc
Remove lifetime parameter
2016-12-20 20:03:32 -07:00
Mark Simulacrum
a802b9f75f
Inline get_funclet
2016-12-20 20:03:31 -07:00
Mark Simulacrum
1173db0062
Inline last remaining use of Callee::call and delete unused code
2016-12-20 20:03:31 -07:00
Mark Simulacrum
97a2096e5e
Inline and cleanup build_return_block
2016-12-20 20:03:31 -07:00
Mark Simulacrum
515d14f094
Inline/Replace finish with build_return_block
2016-12-20 20:03:31 -07:00
Mark Simulacrum
b48e74b5b0
Rename 'blk and 'bcx to 'a
2016-12-20 20:03:31 -07:00
Mark Simulacrum
99816a6743
Further simplify intrinsic matching
2016-12-20 20:03:30 -07:00
Mark Simulacrum
611e90b118
Simplify intrinsic match statement
2016-12-20 20:03:30 -07:00
Mark Simulacrum
c693bcc625
Inline memfill and merge with memset_intrinsic.
2016-12-20 20:03:30 -07:00
Mark Simulacrum
f051c60d92
Reduce extensions to FunctionContext in cleanup.
2016-12-20 20:03:30 -07:00
Mark-Simulacrum
1804131b6d
Remove Ref::clone for MirContext mir
2016-12-20 20:03:30 -07:00
Mark-Simulacrum
937001a1f8
Refactor Callee::call to take bcx by-reference.
...
Also change to not return anything; nothing used the return ValueRef.
Inlines with_cond.
2016-12-20 20:03:29 -07:00
Mark-Simulacrum
9a198534e2
Remove unused imports
2016-12-20 20:03:29 -07:00
Mark-Simulacrum
21bd747948
Remove unused functions in abi
2016-12-20 20:03:29 -07:00
Mark-Simulacrum
88b2024a28
Cleanup instruction counting
2016-12-20 20:03:29 -07:00
Mark-Simulacrum
449c6d82a7
Simplify basic_block.rs
2016-12-20 20:03:29 -07:00
Mark-Simulacrum
cc1e210ee8
Inline trans_exchange_free
2016-12-20 20:03:28 -07:00
Mark-Simulacrum
9c38a54cae
Inline FunctionContext.mir
2016-12-20 20:03:28 -07:00
Mark-Simulacrum
65f040031e
Remove FunctionContext.landingpad_alloca.
2016-12-20 20:03:28 -07:00
Mark-Simulacrum
05d107d4a1
Inline validate_substs
2016-12-20 20:03:28 -07:00
Mark-Simulacrum
85ab08084d
Remove global builder
2016-12-20 20:03:28 -07:00
Mark-Simulacrum
755850f318
Merge OwnedBuilder and Builder
2016-12-20 20:03:27 -07:00
Mark-Simulacrum
8ed11209d6
Minor cleanup to context
2016-12-20 20:03:27 -07:00
Mark-Simulacrum
c4f6173af8
Replace init with get_entry_block.
2016-12-20 20:03:27 -07:00
Mark-Simulacrum
cbbdb73eb0
Remove FunctionContext::cleanup, replacing it with a Drop impl.
...
Move alloca and initial entry block creation into FunctionContext::new.
2016-12-20 20:03:27 -07:00
Mark-Simulacrum
bf8614b55a
Rename Builder::alloca to dynamic_alloca
2016-12-20 20:03:27 -07:00
Mark-Simulacrum
5262113fa6
Remove fcx.span
2016-12-20 20:03:26 -07:00
Mark-Simulacrum
820164582d
Remove DebugLoc.
2016-12-20 20:03:24 -07:00
Mark-Simulacrum
be981dce80
Start FunctionContext privatization and reduction
2016-12-20 20:02:53 -07:00
Mark-Simulacrum
bc0b172f3b
Remove BlockAndBuilder.funclet
2016-12-20 20:02:53 -07:00
Mark-Simulacrum
28f511cfbd
Remove global Builder
2016-12-20 20:02:52 -07:00
Mark-Simulacrum
e0ccc81bbf
Remove needless allows
2016-12-20 20:02:52 -07:00
Mark-Simulacrum
da23332b65
Remove remaining traces of block_arena
2016-12-20 20:02:52 -07:00
Mark-Simulacrum
5bdcc22b79
Remove FIXME
2016-12-20 20:02:52 -07:00
Mark-Simulacrum
dda6c8cf2f
Inline base::malloc_raw_dyn.
...
Move comment about not unwinding into liballoc.
2016-12-20 20:02:52 -07:00
Mark-Simulacrum
14ae76d96b
Unbox FunctionDebugContextData.
...
It is only a pointer and a Cell, which is quite small.
2016-12-20 20:02:51 -07:00
Mark-Simulacrum
b10d89a096
Move around code in cleanup for a more logical ordering, and fix comments
2016-12-20 20:02:51 -07:00
Mark-Simulacrum
c7f8b0cd81
Eagerly evaluate landing pads for cleanup scopes
2016-12-20 20:02:51 -07:00
Mark-Simulacrum
31691692a2
Deduplicate store_operand_direct and store_operand
2016-12-20 20:02:51 -07:00
Mark-Simulacrum
6710af3580
Slightly simplify tvec::slice_for_each
2016-12-20 20:02:51 -07:00
Mark-Simulacrum
6441c977cb
Remove push_ctxt
2016-12-20 20:02:50 -07:00
Mark-Simulacrum
3265afa08f
Inline and simplify Callee::call duplicates.
2016-12-20 20:02:50 -07:00
Mark-Simulacrum
cd57bbe27a
Refactor get_landing_pad to take a CleanupScope
...
It unwrapped the Option anyway, so this more closely resembles the
reality of what's happening.
2016-12-20 20:02:50 -07:00
Mark-Simulacrum
28d00e781b
Remove cleanup scope from FunctionContext
2016-12-20 20:02:50 -07:00
Mark-Simulacrum
51dfba1185
Refactor Vec<CleanupScope> into Option<CleanupScope>.
2016-12-20 20:02:50 -07:00
Mark-Simulacrum
91707dc991
Merge need_invoke and needs_invoke
2016-12-20 20:02:49 -07:00
Mark-Simulacrum
6412f3128d
Propagate CleanupScope::needs_invoke being always true
2016-12-20 20:02:49 -07:00
Mark-Simulacrum
85ef02d404
Only one DropValue per CleanupScope
2016-12-20 20:02:49 -07:00
Mark-Simulacrum
da971b7652
Pull out get_or_create landing pad to avoid issues with dynamic borrowck.
2016-12-20 20:02:49 -07:00
Mark-Simulacrum
48715a15ff
Reformatting
2016-12-20 20:02:49 -07:00
Mark-Simulacrum
2842912583
Remove DropValue.is_immediate
2016-12-20 20:02:48 -07:00
Mark-Simulacrum
ec518a0069
Remove EarlyExitLabel, it only has one variant and is as such useless
2016-12-20 20:02:48 -07:00
Mark-Simulacrum
5a36f88feb
Remove debug_loc from CleanupScope and privatize various helpers
2016-12-20 20:02:48 -07:00
Mark-Simulacrum
ed989d39a1
Simple cleanups/inlines in cleanup
2016-12-20 20:02:48 -07:00
Mark-Simulacrum
86b2bdb435
Rename LandingPad to Funclet
...
Changes internal storage to direct field values instead of Options,
since both fields are always either set or not set.
2016-12-20 20:02:48 -07:00
Mark-Simulacrum
8f3d824cc7
Remove common::Block.
2016-12-20 20:02:46 -07:00
Mark-Simulacrum
3dbd141b8c
Remove unused map_block
2016-12-20 20:01:41 -07:00