summaryrefslogtreecommitdiff
path: root/compiler/nativeGen/PPC/Ppr.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/nativeGen/PPC/Ppr.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/nativeGen/PPC/Ppr.hs')
-rw-r--r--compiler/nativeGen/PPC/Ppr.hs17
1 files changed, 7 insertions, 10 deletions
diff --git a/compiler/nativeGen/PPC/Ppr.hs b/compiler/nativeGen/PPC/Ppr.hs
index 3d9077df19..648e71b31f 100644
--- a/compiler/nativeGen/PPC/Ppr.hs
+++ b/compiler/nativeGen/PPC/Ppr.hs
@@ -49,17 +49,14 @@ pprNatCmmDecl proc@(CmmProc top_info lbl _ (ListGraph blocks)) =
case topInfoTable proc of
Nothing ->
sdocWithPlatform $ \platform ->
- case blocks of
- [] -> -- special case for split markers:
- pprLabel lbl
- blocks -> -- special case for code without info table:
- pprSectionAlign (Section Text lbl) $$
- (case platformArch platform of
- ArchPPC_64 ELF_V1 -> pprFunctionDescriptor lbl
- ArchPPC_64 ELF_V2 -> pprFunctionPrologue lbl
- _ -> pprLabel lbl) $$ -- blocks guaranteed not null,
+ -- special case for code without info table:
+ pprSectionAlign (Section Text lbl) $$
+ (case platformArch platform of
+ ArchPPC_64 ELF_V1 -> pprFunctionDescriptor lbl
+ ArchPPC_64 ELF_V2 -> pprFunctionPrologue lbl
+ _ -> pprLabel lbl) $$ -- blocks guaranteed not null,
-- so label needed
- vcat (map (pprBasicBlock top_info) blocks)
+ vcat (map (pprBasicBlock top_info) blocks)
Just (Statics info_lbl _) ->
sdocWithPlatform $ \platform ->