| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
This documents nondeterminism in code generation and removes
the nondeterministic ufmToList function. In the future someone
will have to use nonDetUFMToList (with proper explanation)
or pprUFMWithKeys.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ord Unique can be a source of invisible, accidental
nondeterminism as explained in Note [No Ord for Unique].
This removes it, leaving a note with rationale.
It's unfortunate that I had to write Ord instances for
codegen data structures by hand, but I believe that it's a
right trade-off here.
Test Plan: ./validate
Reviewers: simonmar, austin, bgamari
Reviewed By: simonmar
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2370
GHC Trac Issues: #4012
|
|
|
|
|
|
| |
These get annoying when `undefined` is actually used as placeholder in WIP code.
Some of these were also completely redundant (just call `deAnnotate'` instead of
`deAnnotate` etc.).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We want to remove the `Ord Unique` instance because there's
no way to implement it in deterministic way and it's too
easy to use by accident.
We sometimes compute SCC for datatypes whose Ord instance
is implemented in terms of Unique. The Ord constraint on
SCC is just an artifact of some internal data structures.
We can have an alternative implementation with a data
structure that uses Uniquable instead.
This does exactly that and I'm pleased that I didn't have
to introduce any duplication to do that.
Test Plan:
./validate
I looked at performance tests and it's a tiny bit better.
Reviewers: bgamari, simonmar, ezyang, austin, goldfire
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2359
GHC Trac Issues: #4012
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In a call to a fixed function the TOC does not need to be saved.
The linker handles TOC saving.
Refactor TOC handling by folding the two functions toc_before and
toc_after into the code generating the call sequence. This saves
repeating the case distinction in those two functions.
Test Plan: validate on PowerPC 32-bit Linux and AIX
Reviewers: hvr, simonmar, austin, erikd, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2328
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On Linux 64-bit PowerPC the first 13 floating point parameters are
passed in registers. We only passed the first 8 floating point params.
The alignment of a floating point single precision value in ELF v1.9 is
the second word of a doubleword. For ELF v2 we support only little
endian and the least significant word of a doubleword is the first word,
so no special handling is required.
Add a regression test.
Test Plan: validate on powerpc Linux and AIX
Reviewers: erikd, hvr, austin, simonmar, bgamari
Reviewed By: simonmar
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2327
GHC Trac Issues: #12134
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes #10647. Changes the error message when a SIMD size
variable is required in the native code generation backend.
Test Plan:
Try compiling the test case given in the ticket :
{-# LANGUAGE MagicHash #-}
module Foo where
import GHC.Prim
data V = V Int8X16#
GHC should give a clearer error message
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2325
GHC Trac Issues: #10647
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I planned to just say that we don't care about this part.
Turns out I was able to document away the uses in the codegenerator.
Test Plan: ./validate
Reviewers: simonmar, austin, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2307
GHC Trac Issues: #4012
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Printing STU was mixed up. The tab character must appear
after the 'x'.
Test Plan: validate on powerpc
Reviewers: bgamari, austin, erikd
Reviewed By: austin, erikd
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2214
GHC Trac Issues: #12054
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Generate a clrr[wd]i instruction to clear the tag bits in a pointer.
This saves one instruction and one temporary register.
Optimize signed comparison with zero after andi. operation This saves
one instruction when comparing a pointer tag with zero.
This reduces code size by 0.6 % in all nofib benchmarks.
Test Plan: validate on AIX and 32-bit Linux
Reviewed By: erikd, hvr
Differential Revision: https://phabricator.haskell.org/D2093
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Note [Unsound mapUniqSet] explains why it got removed.
Test Plan: build ghc
Reviewers: simonpj, austin, bgamari
Reviewed By: bgamari
Subscribers: thomie, simonmar
Differential Revision: https://phabricator.haskell.org/D2152
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The commit 28f951edfe50ea5182065144340061ec326781f5 introduced the
`-fmax-pmcheck-iterations` flag and set the default limit to 1e7
iterations.
However, this value is still high enough that it can result GHC to
exhibit memory spikes beyond 1 GiB of RAM usage (heap profile showed
several `(:)`s, as well as `THUNK_2_0`, and `PmCon` during the memory
spikes)
A value of 2e6 seems to be a safer upper bound which still manages to
let the checker not run into the limit in most cases.
Test Plan: Validate, try building a few Hackage packages
Reviewers: austin, gkaracha, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2095
|
|
|
|
|
|
|
| |
The implementation in df26b95559fd467abc0a3a4151127c95cb5011b9
wrongly assumed that all C-ABI subroutine calls would use a
'ForeignLabel' but it turns out that calls inserted via
'emitRtsCall' use 'CmmLabel's instead.
|
|
|
|
|
|
| |
Reviewed By: bgamari, trommler
Differential Revision: https://phabricator.haskell.org/D2020
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This extends the previous work to revive the unregisterised GHC build
for AIX/ppc32. Strictly speaking, AIX runs on POWER4 (and later)
hardware, but the PPC32 instructions implemented in the PPC NCG
represent a compatible subset of the POWER4 ISA.
IBM AIX follows the PowerOpen ABI (and shares many similiarites with the
Linux PPC64 ELF V1 NCG backend) but uses the rather limited XCOFF
format (compared to ELF).
This doesn't support dynamic libraries yet.
A major limiting factor is that the AIX assembler does not support the
`@ha`/`@l` relocation types nor the ha16()/lo16() functions Darwin's
assembler supports. Therefore we need to avoid emitting those. In case
of numeric literals we simply compute the functions ourselves, while for
labels we have to use local TOCs and hope everything fits into a 16bit
offset (for ppc32 this gives us at most 16384 entries per TOC section,
which is enough to compile GHC).
Another issue is that XCOFF doesn't seem to have a relocation type for
label-differences, and therefore the label-differences placed into
tables-next-to-code can't be relocated, but the linker may rearrange
different sections, so we need to place all read-only sections into the
same `.text[PR]` section to workaround this.
Finally, the PowerOpen ABI distinguishes between function-descriptors
and actualy entry-point addresses. For AIX we need to be specific when
emitting assembler code whether we want the address of the function
descriptor `printf`) or for the entry-point (`.printf`). So we let the
asm pretty-printer prefix a dot to all emitted subroutine
calls (i.e. `BL`) on AIX only. For now, STG routines' entry-point labels
are not prefixed by a label and don't have any associated
function-descriptor.
Reviewers: austin, trommler, erikd, bgamari
Reviewed By: trommler, erikd, bgamari
Differential Revision: https://phabricator.haskell.org/D2019
|
|
|
|
|
|
|
| |
Use `fcmpu 0, ...` rather than `fcmpu cr0, ...` for better
portability since some non-GNU assembler (such as IBM's `as`) tend to not
support the symbolic register name `cr0`. This matches the syntax that
GCC emits for PPC targets.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: Look at DWARF output.
Reviewers: scpmw, austin
Reviewed By: austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1734
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Overhaul the Overhauled Pattern Match Checker
* Changed the representation of Value Set Abstractions. Instead of
using a prefix tree, we now use a list of Value Vector Abstractions.
The set of constraints Delta for every Value Vector Abstraction is the
oracle state so that we solve everything only once.
* Instead of doing everything lazily, we prune at once (and in general
everything is much stricter). Hence, an example written with pattern
guards is checked in almost the same time as the equivalent with
pattern matching.
* Do not store the covered and the divergent sets at all. Since what we
only need is a yes/no (does this clause cover anything? Does it force
any thunk?) We just keep a boolean for each.
* Removed flags `-Wtoo-many-guards` and `-ffull-guard-reasoning`.
Replaced with `fmax-pmcheck-iterations=n`. Still debatable what should
the default `n` be.
* When a guard is for sure not going to contribute anything, we treat
it as such: The oracle is not called and cases `CGuard`, `UGuard` and
`DGuard` from the paper are not happening at all (the generation of a
fresh variable, the unfolding of the pattern list etc.). his combined
with the above seems to be enough to drop the memory increase for test
T783 down to 18.7%.
* Do not export function `dsPmWarn` (it is now called directly from
within `checkSingle` and `checkMatches`).
* Make `PmExprVar` hold a `Name` instead of an `Id`. The term oracle
does not handle type information so using `Id` was a waste of
time/space.
* Added testcases T11195, T11303b (data families) and T11374
The patch addresses at least the following:
Trac #11195, #11276, #11303, #11374, #11162
Test Plan: validate
Reviewers: goldfire, bgamari, hvr, austin
Subscribers: simonpj, thomie
Differential Revision: https://phabricator.haskell.org/D1795
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was broken in 4a32bf925b8aba7885d9c745769fe84a10979a53, meaning
that info tables and subsequent code are no longer guaranteed to have
the recommended alignment. Split up the section header and section
alignment printers, and print an appropriate alignment directive before
each info table.
Fixes Trac #11486
Reviewers: austin, bgamari, rwbarton
Reviewed By: bgamari, rwbarton
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1847
GHC Trac Issues: #11486
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
In the past the canonical way for constructing an SDoc string literal was the
composition `ptext . sLit`. But for some time now we have function `text` that
does the same. Plus it has some rules that optimize its runtime behaviour.
This patch takes all uses of `ptext . sLit` in the compiler and replaces them
with calls to `text`. The main benefits of this patch are clener (shorter) code
and less dependencies between module, because many modules now do not need to
import `FastString`. I don't expect any performance benefits - we mostly use
SDocs to report errors and it seems there is little to be gained here.
Test Plan: ./validate
Reviewers: bgamari, austin, goldfire, hvr, alanz
Subscribers: goldfire, thomie, mpickering
Differential Revision: https://phabricator.haskell.org/D1784
|
|
|
|
|
|
| |
Starting with GHC 7.10 and base-4.8, `Monad` implies `Applicative`,
which allows to simplify some definitions to exploit the superclass
relationship. This a first refactoring to that end.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since GHC 8.1/8.2 only needs to be bootstrap-able by GHC 7.10 and
GHC 8.0 (and GHC 8.2), we can now finally drop all that pre-AMP
compatibility CPP-mess for good!
Reviewers: austin, goldfire, bgamari
Subscribers: goldfire, thomie, erikd
Differential Revision: https://phabricator.haskell.org/D1724
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduction of two new flags, for more precise control over the new
pattern match checker's behaviour when reasoning about guards. This is
supposed to address #11195 (and maybe more performance bugs related to
the NP-Hardness of coverage checking).
Expected behaviour:
* When `-ffull-guard-reasoning` is on, run the new pattern match
checker in its full power
* When `-ffull-guard-reasoning` is off (the default), for every
match, check a metric to see whether pattern match checking for it
has high probability of being non performant (at the the moment we
check whether the number of guards is over 20 but I would like to
use a more precise measure in the future). If the probability is
high:
- Oversimplify the guards (less expressive but more performant)
and run the checker, and
- Issue a warning about the simplification that happened.
A new flag `-Wtoo-many-guards/-Wno-too-many-guards` suppresses the
warning about the simplification (useful when combined with -Werror).
Test Plan: validate
Reviewers: goldfire, austin, hvr, bgamari
Reviewed By: bgamari
Subscribers: mpickering, thomie
Differential Revision: https://phabricator.haskell.org/D1676
GHC Trac Issues: #11195
|
|
|
|
|
|
|
|
|
|
|
|
| |
Explicitly pass "--no-relax" on ArchSPARC64
(as ArchSPARC does) where gcc's default specs
set "-mrelax" which conflicts with "-Wl,-r".
Known architecture will also help extending
sparc NCG support 64-bit ABI.
Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are currently 2 different ways to test for a static or dynamic
build:
* Test if WayDyn is in ways
* Test if Opt_Static is set
The problem is that these can easily go out of sync, especially when
using the
GHC API.
This commit replaces all queries of Opt_Static with an equivalent query
of
WayDyn. This would have prevented bug #8294 and fixes #11154.
Reviewers: hvr, austin, bgamari
Reviewed By: austin, bgamari
Differential Revision: https://phabricator.haskell.org/D1607
GHC Trac Issues: #10636
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Apparently gnu as uses `.short` as a synonym for `.word`. To emit a
16-bit value one would use `.hword`. However, Darwin doesn't support
`.hword`, instead taking `.short` to mean a 16-bit value. The
insanity is nearly unbearable!
OS X reference:
https://developer.apple.com/library/mac/documentation/DeveloperTools/Ref
erence/Assembler/040-Assembler_Directives/asm_directives.html#//apple_re
f/doc/uid/TP30000823-TPXREF101
gnu as reference:
https://sourceware.org/binutils/docs/as/hword.html#hword
Test Plan: Validate
Reviewers: austin
Reviewed By: austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1602
GHC Trac Issues: #11202
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This implements the ideas originally put forward in
"System FC with Explicit Kind Equality" (ICFP'13).
There are several noteworthy changes with this patch:
* We now have casts in types. These change the kind
of a type. See new constructor `CastTy`.
* All types and all constructors can be promoted.
This includes GADT constructors. GADT pattern matches
take place in type family equations. In Core,
types can now be applied to coercions via the
`CoercionTy` constructor.
* Coercions can now be heterogeneous, relating types
of different kinds. A coercion proving `t1 :: k1 ~ t2 :: k2`
proves both that `t1` and `t2` are the same and also that
`k1` and `k2` are the same.
* The `Coercion` type has been significantly enhanced.
The documentation in `docs/core-spec/core-spec.pdf` reflects
the new reality.
* The type of `*` is now `*`. No more `BOX`.
* Users can write explicit kind variables in their code,
anywhere they can write type variables. For backward compatibility,
automatic inference of kind-variable binding is still permitted.
* The new extension `TypeInType` turns on the new user-facing
features.
* Type families and synonyms are now promoted to kinds. This causes
trouble with parsing `*`, leading to the somewhat awkward new
`HsAppsTy` constructor for `HsType`. This is dispatched with in
the renamer, where the kind `*` can be told apart from a
type-level multiplication operator. Without `-XTypeInType` the
old behavior persists. With `-XTypeInType`, you need to import
`Data.Kind` to get `*`, also known as `Type`.
* The kind-checking algorithms in TcHsType have been significantly
rewritten to allow for enhanced kinds.
* The new features are still quite experimental and may be in flux.
* TODO: Several open tickets: #11195, #11196, #11197, #11198, #11203.
* TODO: Update user manual.
Tickets addressed: #9017, #9173, #7961, #10524, #8566, #11142.
Updates Haddock submodule.
|
|
|
|
|
| |
George's new exhaustiveness checker now realizes these are impossible.
Yay!
|
|
|
|
|
|
|
|
| |
In order to accomplish this we need to ensure that emit DIEs for all
DebugBlocks, even those that have been optimized out, lest we end up
with undefined symbols of parents at link time.
Differential Revision: https://phabricator.haskell.org/D1279
|
|
|
|
| |
Differential Revision: https://phabricator.haskell.org/D1387
|
|
|
|
|
|
|
|
|
| |
We now only strip block information from DebugBlocks when compiling with
`-g1`, intended to be used when only minimal debug information is
desired. `-g2` is assumed when `-g` is passed without any integer
argument.
Differential Revision: https://phabricator.haskell.org/D1281
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After the changes, the three functions used to print type families
were identical, so they are refactored into one.
Original RHSs of data instance declarations are recreated and
printed in user error messages.
RHSs containing representation TyCons are printed in the
Coercion Axioms section in a typechecker dump.
Add vbar to the list of SDocs exported by Outputable.
Replace all text "|" docs with it.
Fixes #10839
Reviewers: goldfire, jstolarek, austin, bgamari
Reviewed By: jstolarek
Subscribers: jstolarek, thomie
Differential Revision: https://phabricator.haskell.org/D1441
GHC Trac Issues: #10839
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a flag -split-sections that does similar things to
-split-objs, but using sections in single object files instead of
relying on the Satanic Splitter and other abominations. This is very
similar to the GCC flags -ffunction-sections and -fdata-sections.
The --gc-sections linker flag, which allows unused sections to actually
be removed, is added to all link commands (if the linker supports it) so
that space savings from having base compiled with sections can be
realized.
Supported both in LLVM and the native code-gen, in theory for all
architectures, but really tested on x86 only.
In the GHC build, a new SplitSections variable enables -split-sections
for relevant parts of the build.
Test Plan: validate with both settings of SplitSections
Reviewers: dterei, Phyx, austin, simonmar, thomie, bgamari
Reviewed By: simonmar, thomie, bgamari
Subscribers: hsyl20, erikd, kgardas, thomie
Differential Revision: https://phabricator.haskell.org/D1242
GHC Trac Issues: #8405
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Arithmetic right shifts of more than 31 bits set all bits to
the sign bit on PowerPC. iThe assembler does not allow shift
amounts larger than 32 so do an arithemetic right shift of 31
bit instead.
Fixes #10870
Test Plan: validate (especially on powerpc)
Reviewers: austin, erikd, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1459
GHC Trac Issues: #10870
|
| |
|
|
|
|
|
|
|
|
|
|
| |
We will need to use these to setup proper unwinding information for the
stg_stop_thread closure. This pokes a hole in the STG abstraction,
exposing the machine's stack pointer register so that we can accomplish
this. We also expose a dummy return address register, which corresponds
to the register used to hold the DWARF return address.
Differential Revision: https://phabricator.haskell.org/D1225
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Here we add a `same_value $sp` instruction to our default unwinding
rules to ensure that the implicit `$sp = CFA` rule (which `libdw`
appears to exhibit on x86_64) doesn't overwrite it (necessary since we
don't use $sp to track our call stack).
See Phab Diff D1189 for details on how we arrived at this resolution.
Reviewers: scpmw, austin, simonmar
Reviewed By: austin, simonmar
Subscribers: thomie, simonmar
Differential Revision: https://phabricator.haskell.org/D1224
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a subWordC# primop which implements subtraction with overflow
reporting.
Reviewers: tibbe, goldfire, rwbarton, bgamari, austin, hvr
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1334
GHC Trac Issues: #10962
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The following source snippet 'module A where x */* y = 42'
when being compiled with '-g' option emits syntactically
invalid comment for GNU as:
.text
.align 8
.loc 1 3 1 /* */* */
Fixed by not emitting comments at all. We already suppress
all asm comments in 'X86/Ppr.hs'.
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
Test Plan: added test and check it works
Reviewers: scpmw, simonmar, austin, bgamari
Reviewed By: simonmar
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1386
GHC Trac Issues: #10667
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch refactors pure/(*>) and return/(>>) in MRP-friendly way, i.e.
such that the explicit definitions for `return` and `(>>)` match the
MRP-style default-implementation, i.e.
return = pure
and
(>>) = (*>)
This way, e.g. all `return = pure` definitions can easily be grepped and
removed in GHC 8.1;
Test Plan: Harbormaster
Reviewers: goldfire, alanz, bgamari, quchen, austin
Reviewed By: quchen, austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1312
|
|
|
|
|
|
| |
Comes with Haddock submodule update.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Test included.
Test Plan: Run test T10870.hs on X86/X86_64/Arm/Arm64 etc
Reviewers: bgamari, nomeata, austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1322
GHC Trac Issues: #10870
|
| |
|
|
|
|
|
|
|
|
| |
Apparently some Clang 3.6 expects these to be sorted.
Patch due to Peter Wortmann.
Fixes #10687.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement access to spill slots at offsets larger than 16 bits.
Also allocation and deallocation of spill slots was restricted to
16 bit offsets. Now 32 bit offsets are supported on all PowerPC
platforms.
The implementation of 32 bit offsets requires more than one instruction
but the native code generator wants one instruction. So we implement
pseudo-instructions that are pretty printed into multiple assembly
instructions.
With pseudo-instructions for spill slot allocation and deallocation
we can also implement handling of the back chain pointer according
to the ELF ABIs.
Test Plan: validate (especially on powerpc (32 bit))
Reviewers: bgamari, austin, erikd
Reviewed By: erikd
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1296
GHC Trac Issues: #7830
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is supposed to be encoded with ULEB128 which the previous
implementation would only guarranty with short lengths. This likely
holds in nearly all cases, but I'd really rather not take changes.
I fix this using the `.uleb128` directive. I'm not certain that this is
portable across assemblers but it makes this quite straightforward and
at the moment I value correctness over portability.
Test Plan: Compare implementation to DWARF spec
Reviewers: scpmw, austin
Reviewed By: austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1220
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: austin
Reviewed By: austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1221
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This allows the code generator to give hints to later code generation
steps about which branch is most likely to be taken. Right now it
is only taken into account in one place: a special case in
CmmContFlowOpt that swapped branches over to maximise the chance of
fallthrough, which is now disabled when there is a likelihood setting.
Test Plan: validate
Reviewers: austin, simonpj, bgamari, ezyang, tibbe
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1273
|
| |
|