summaryrefslogtreecommitdiff
path: root/compiler/codeGen/StgCmmExpr.hs
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2018-11-26 17:21:12 -0500
committerBen Gamari <ben@smart-cactus.org>2018-11-27 14:25:03 -0500
commit730ac880c5dc23e0f32a2f08d89d4e5d2a583512 (patch)
treeaa85ded8d0edd3d465963c8b3870b8270628ae30 /compiler/codeGen/StgCmmExpr.hs
parentdf570d920fa66db631f936fa377e598fe92bd2a1 (diff)
downloadhaskell-wip/kill-obj-splitter.tar.gz
Rip out object splittingwip/kill-obj-splitter
The splitter is an evil Perl script that processes assembler code. Its job can be done better by the linker's --gc-sections flag. GHC passes this flag to the linker whenever -split-sections is passed on the command line. This is based on @DemiMarie's D2768. Fixes Trac #11315 Fixes Trac #9832 Fixes Trac #8964 Fixes Trac #8685 Fixes Trac #8629
Diffstat (limited to 'compiler/codeGen/StgCmmExpr.hs')
-rw-r--r--compiler/codeGen/StgCmmExpr.hs11
1 files changed, 3 insertions, 8 deletions
diff --git a/compiler/codeGen/StgCmmExpr.hs b/compiler/codeGen/StgCmmExpr.hs
index ea64e456ce..ccaeb4a0f0 100644
--- a/compiler/codeGen/StgCmmExpr.hs
+++ b/compiler/codeGen/StgCmmExpr.hs
@@ -740,19 +740,14 @@ cgIdApp fun_id args = do
dflags <- getDynFlags
fun_info <- getCgIdInfo fun_id
self_loop_info <- getSelfLoop
- let cg_fun_id = cg_id fun_info
- -- NB: use (cg_id fun_info) instead of fun_id, because
- -- the former may be externalised for -split-objs.
- -- See Note [Externalise when splitting] in StgCmmMonad
-
- fun_arg = StgVarArg cg_fun_id
- fun_name = idName cg_fun_id
+ let fun_arg = StgVarArg fun_id
+ fun_name = idName fun_id
fun = idInfoToAmode fun_info
lf_info = cg_lf fun_info
n_args = length args
v_args = length $ filter (isVoidTy . stgArgType) args
node_points dflags = nodeMustPointToIt dflags lf_info
- case getCallMethod dflags fun_name cg_fun_id lf_info n_args v_args (cg_loc fun_info) self_loop_info of
+ case getCallMethod dflags fun_name fun_id lf_info n_args v_args (cg_loc fun_info) self_loop_info of
-- A value in WHNF, so we can just return it.
ReturnIt
| isVoidTy (idType fun_id) -> emitReturn []