Commits on Source (17)
-
Ben Gamari authored
The interfaces to {save,load}ThreadState were quite messy due to the need to pass in local registers (produced with draws from a unique supply) since they were used from both FCode and UniqSM. This, however, is entirely unnecessary as we already have an abstraction to capture this effect: MonadUnique. Use it.
-
If a procedure has an info table we should also assume that its first block does lest it will not get the necessary offset to ensure that C-debugging tools find valid debug information. This was manifested as backtrace acquisition entering an infinite loop while attempting to unwind `stg_forceIO`, which had invalid call frame information on account this bug. Test Plan: Validate Reviewers: scpmw, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1532
-
Ben Gamari authored
-
Ben Gamari authored
Previously we can only use unwind information at the beginning of a block since we otherwise have no label to apply it to. This, of course, isn't nearly expressive enough to properly encode unwinding for general programs. For this reason, we want to be able to include unwind information at arbitrary points within a block. This is a first step in this direction, ensuring that all unwind nodes We accomplish this by making `CmmUnwind` carry a label, which the NCG will emit into the block and which the Dwarf generator can refer to in the unwind tables it produces.
-
Ben Gamari authored
-
Ben Gamari authored
Fixes #11337.
-
Ben Gamari authored
This actually just gives us the *ability* to produce unwind information. The unwind information itself will be implemented next.
-
Ben Gamari authored
-
Ben Gamari authored
-
Ben Gamari authored
-
Ben Gamari authored
-
Ben Gamari authored
Otherwise we might end up with a reference to a block that was eliminated during flow control. Ideally we would just ensure that these unwindings are dropped along with the block itself.
-
Ben Gamari authored
-
Ben Gamari authored
We now wrap the set of unwinding points within a block in a newtype to mark the fact that they must be sorted by the order that the labels occur in the block. Moreover, we fix an oversight in the previous design where unwind information would be duplicated while propagating unwinding information from predecessor blocks.
-
Ben Gamari authored
-
Ben Gamari authored
This ends up being important since there is a subtle difference between two CmmUnwinds and one in the presence of the (-1) offset applied to frame information for blocks with info tables. This is because the offset will only be applied to the first CmmUnwind within a block, even if the two nodes apply to the same address.
-
Ben Gamari authored
Showing
- compiler/cmm/BlockId.hs 5 additions, 0 deletionscompiler/cmm/BlockId.hs
- compiler/cmm/CmmCommonBlockElim.hs 1 addition, 1 deletioncompiler/cmm/CmmCommonBlockElim.hs
- compiler/cmm/CmmLayoutStack.hs 78 additions, 43 deletionscompiler/cmm/CmmLayoutStack.hs
- compiler/cmm/CmmNode.hs 15 additions, 6 deletionscompiler/cmm/CmmNode.hs
- compiler/cmm/CmmParse.y 9 additions, 2 deletionscompiler/cmm/CmmParse.y
- compiler/cmm/Debug.hs 74 additions, 26 deletionscompiler/cmm/Debug.hs
- compiler/cmm/MkGraph.hs 4 additions, 1 deletioncompiler/cmm/MkGraph.hs
- compiler/cmm/PprCmm.hs 2 additions, 1 deletioncompiler/cmm/PprCmm.hs
- compiler/codeGen/StgCmmExtCode.hs 7 additions, 4 deletionscompiler/codeGen/StgCmmExtCode.hs
- compiler/codeGen/StgCmmForeign.hs 79 additions, 56 deletionscompiler/codeGen/StgCmmForeign.hs
- compiler/codeGen/StgCmmMonad.hs 12 additions, 6 deletionscompiler/codeGen/StgCmmMonad.hs
- compiler/codeGen/StgCmmUtils.hs 3 additions, 2 deletionscompiler/codeGen/StgCmmUtils.hs
- compiler/nativeGen/Dwarf.hs 23 additions, 11 deletionscompiler/nativeGen/Dwarf.hs
- compiler/nativeGen/Dwarf/Constants.hs 2 additions, 1 deletioncompiler/nativeGen/Dwarf/Constants.hs
- compiler/nativeGen/Dwarf/Types.hs 33 additions, 22 deletionscompiler/nativeGen/Dwarf/Types.hs
- compiler/nativeGen/X86/CodeGen.hs 4 additions, 3 deletionscompiler/nativeGen/X86/CodeGen.hs
- compiler/nativeGen/X86/Instr.hs 5 additions, 0 deletionscompiler/nativeGen/X86/Instr.hs
- compiler/nativeGen/X86/Ppr.hs 3 additions, 0 deletionscompiler/nativeGen/X86/Ppr.hs
- rts/StgStartup.cmm 2 additions, 2 deletionsrts/StgStartup.cmm