AndreasK (Andreas Klebinger)
User

Projects

User does not belong to any projects.

User Details

User Since
Nov 19 2016, 5:25 PM (96 w, 1 d)

Recent Activity

Fri, Sep 14

AndreasK planned changes to D4726: NCG: New code layout algorithm..

I found some slowdowns in the binary benchmarks with this patch which can be traced back to how some Cmm files are compiled in the RTS.
Not sure if the resulting code is actually worse as that depends on the actual program, but it's definitely worse for the binary benchmarks.

Fri, Sep 14, 2:46 PM

Fri, Sep 7

AndreasK added a comment to D4726: NCG: New code layout algorithm..

If this adds a big compile time overhead, perhaps it should be enabled for -O2 only?

Fri, Sep 7, 8:09 AM
AndreasK added a comment to D4784: Rename some mutable closure types for consistency.

This should probably be mentioned in the Changelog as it can break existing code. (For example it breaks the packman package).

Fri, Sep 7, 7:07 AM

Sun, Sep 2

AndreasK updated the diff for D4726: NCG: New code layout algorithm..
  • Update stats to account for OsX allocation results
Sun, Sep 2, 5:53 AM

Sat, Sep 1

AndreasK updated the diff for D4726: NCG: New code layout algorithm..
  • Rebase
  • Massive speed improvements for new code layout in edge cases.
Sat, Sep 1, 4:10 PM

Thu, Aug 30

AndreasK updated the diff for D4726: NCG: New code layout algorithm..
  • Update flag documentation
  • Remove unneccesary derived instances
Thu, Aug 30, 2:51 PM
AndreasK retitled D4726: NCG: New code layout algorithm. from DO NOT MERGE - Experimental code layout to NCG: New code layout algorithm..
Thu, Aug 30, 2:24 PM

Tue, Aug 28

AndreasK added a comment to D5086: Use -O2 as default flag for stage1..

Ideally I'd like to see this tested on more machines and platforms, but if those timings are anywhere near accurate, I'd expect those to match too.

Tue, Aug 28, 4:10 AM

Aug 23 2018

AndreasK updated the diff for D4726: NCG: New code layout algorithm..
  • Add copyright notice [skip ci]
Aug 23 2018, 3:48 AM

Aug 22 2018

AndreasK added a comment to D4990: Invert FP conditions to eliminate the explicit NaN check..

Out of curiosity, if this is a _performance_ optimisation, do we have any numbers we can leave here for posterity?

Aug 22 2018, 11:35 AM
AndreasK created D5086: Use -O2 as default flag for stage1..
Aug 22 2018, 9:22 AM

Aug 21 2018

AndreasK updated the diff for D4726: NCG: New code layout algorithm..
  • Update test allocations
Aug 21 2018, 8:42 AM

Aug 20 2018

AndreasK updated the diff for D4726: NCG: New code layout algorithm..
  • Rename test
Aug 20 2018, 11:37 AM
AndreasK updated the diff for D4726: NCG: New code layout algorithm..
  • Remove unused import
Aug 20 2018, 9:27 AM
AndreasK updated the diff for D4726: NCG: New code layout algorithm..
  • Line widths and minor refactorings that go along with it.
  • Update flag description, make vanilla default on old layout.
  • Fix info table check
  • Disable new layout code on unsupported target archs
Aug 20 2018, 8:39 AM

Aug 18 2018

AndreasK added a comment to D4990: Invert FP conditions to eliminate the explicit NaN check..

Thanks for the feedback!

Aug 18 2018, 2:30 PM
AndreasK updated the diff for D4990: Invert FP conditions to eliminate the explicit NaN check..
  • Update note
  • Add regression test
Aug 18 2018, 2:29 PM

Aug 15 2018

AndreasK added a comment to D2903: WIP: Register Allocator Loop Annotations.
Aug 15 2018, 1:09 PM
AndreasK updated the diff for D4726: NCG: New code layout algorithm..
  • Remove unused parameters/imports.
Aug 15 2018, 7:24 AM

Aug 14 2018

AndreasK updated the diff for D4726: NCG: New code layout algorithm..
  • Be more aggresive in removing dead code.
  • Add last2 to get last two elements from list efficiently
  • Invert cond branch jump order at the asm level in order to eliminate one.
  • Decouple conditional branch weights from cmm branch order..
Aug 14 2018, 9:27 AM

Aug 9 2018

AndreasK updated the diff for D4990: Invert FP conditions to eliminate the explicit NaN check..
  • Remove space after assert
Aug 9 2018, 8:01 AM

Jul 30 2018

AndreasK updated the diff for D4726: NCG: New code layout algorithm..
  • Only print nodes not covered by edges explicitly
  • Small improvements from jmcts review
  • Assert include fixup
  • Remove unused bindings
Jul 30 2018, 10:25 AM
AndreasK added a comment to D4953: Support for deprecating exports.

Orthogonal to the issue at hand. But please keep within the line length limit unless there are good reasons not to do so.

Jul 30 2018, 3:41 AM

Jul 24 2018

AndreasK added inline comments to D4989: Adjust normal runtimes for nofib along with related changes..
Jul 24 2018, 12:40 PM

Jul 21 2018

AndreasK updated the diff for D4990: Invert FP conditions to eliminate the explicit NaN check..
  • ASSERT that comparisons have been swapped as expected.
Jul 21 2018, 4:43 AM
AndreasK retitled D4990: Invert FP conditions to eliminate the explicit NaN check. from WIP: While the idea is sound there is still a bug in here. [skip ci]Invert FP conditions to reduce conditional instruction count. to Invert FP conditions to eliminate the explicit NaN check..
Jul 21 2018, 2:51 AM

Jul 20 2018

AndreasK updated the diff for D4990: Invert FP conditions to eliminate the explicit NaN check..
  • Fix a leftover GTT/GE mixup.
Jul 20 2018, 12:15 PM
AndreasK retitled D4990: Invert FP conditions to eliminate the explicit NaN check. from WIP: While the idea is sound there is still a bug in here. [skip ci] Invert FP conditions to reduce conditional instruction count. to WIP: While the idea is sound there is still a bug in here. [skip ci]Invert FP conditions to reduce conditional instruction count..
Jul 20 2018, 9:25 AM
AndreasK updated the diff for D4990: Invert FP conditions to eliminate the explicit NaN check..
x < y == y > x instead of x < y == y >= x.
Jul 20 2018, 3:24 AM

Jul 19 2018

AndreasK added a comment to D4990: Invert FP conditions to eliminate the explicit NaN check..

At least imaginary/paraffins is still wrong with this patch.

Jul 19 2018, 7:15 PM
AndreasK created D4990: Invert FP conditions to eliminate the explicit NaN check..
Jul 19 2018, 7:11 PM
AndreasK updated the summary of D4952: Don't warn about tabs.
Jul 19 2018, 3:47 PM
AndreasK updated the summary of D4989: Adjust normal runtimes for nofib along with related changes..
Jul 19 2018, 12:29 PM
AndreasK created D4989: Adjust normal runtimes for nofib along with related changes..
Jul 19 2018, 12:19 PM

Jul 15 2018

AndreasK updated the diff for D4726: NCG: New code layout algorithm..
  • Allow to dynamically specify cfg weights for benchmarking (temporary)
Jul 15 2018, 3:27 AM

Jul 12 2018

AndreasK updated the diff for D4929: Replace most occurences of foldl with foldl'..
  • Layout
Jul 12 2018, 6:24 PM
AndreasK added a comment to D4929: Replace most occurences of foldl with foldl'..

Do you think that the compile time reduction at -O2 are real? I'm a bit suspicious given that allocations are unchanged.

Jul 12 2018, 6:24 PM
AndreasK updated the diff for D4726: NCG: New code layout algorithm..
  • Trim edges in chain linking passes.
  • Explain branch weights, add backedge detection.
  • Refactor where we look for loops
  • Refactor some aspects of the layout algorithm and code.
  • Change CFG weights, refactor CFG creation slightly.
  • Ignore info tables
  • Use edge weights for old algorithm too
Jul 12 2018, 10:29 AM

Jul 10 2018

AndreasK added inline comments to D4917: stack: fix stack allocations on Windows.
Jul 10 2018, 4:00 PM
AndreasK created D4952: Don't warn about tabs.
Jul 10 2018, 9:14 AM

Jul 9 2018

AndreasK updated the diff for D4929: Replace most occurences of foldl with foldl'..
  • Remove redundant import(s)
  • Replace a few more foldl instances.
  • Use X namespace in GhcPrelude
  • Incorporate phab feedback
Jul 9 2018, 12:24 PM
AndreasK added a comment to D4946: Release notes about source plugins.

Great patch.

Jul 9 2018, 10:08 AM

Jul 6 2018

AndreasK added a comment to D4922: Enrich Xmm register with Length Width and datatype information.

I tried adding the Length, Width and data type information without keeping it a Maybe but it was proving to be almost impossible.

Jul 6 2018, 6:13 PM
AndreasK added inline comments to D4922: Enrich Xmm register with Length Width and datatype information.
Jul 6 2018, 8:22 AM

Jul 4 2018

AndreasK planned changes to D4929: Replace most occurences of foldl with foldl'..

I plan to address the inline notes and incorporate the changes from the other foldl' patch.

Jul 4 2018, 4:46 PM
AndreasK abandoned D4847: UniqFM: Use foldl' instead of fold.

Abandoned in favour of D4929

Jul 4 2018, 3:25 PM

Jul 3 2018

AndreasK updated the diff for D4929: Replace most occurences of foldl with foldl'..
  • Remove redundant import
Jul 3 2018, 10:23 AM
AndreasK created D4929: Replace most occurences of foldl with foldl'..
Jul 3 2018, 7:12 AM

Jul 2 2018

AndreasK added a comment to D4726: NCG: New code layout algorithm..
In D4726#135331, @jmct wrote:

This is cool work! I have a few questions,

What's the justification of the different weights? I can see the intuition, but I don't have a good understanding of how changing those weights would affect the results of the algorithm. Direct jumps being 100 makes intuitive sense, but what about the others? For example, why 10/90 and not 20/80?

Jul 2 2018, 8:37 AM

Jul 1 2018

AndreasK updated the summary of D4847: UniqFM: Use foldl' instead of fold.
Jul 1 2018, 7:25 AM
AndreasK updated the summary of D4847: UniqFM: Use foldl' instead of fold.
Jul 1 2018, 7:25 AM
AndreasK updated the diff for D4847: UniqFM: Use foldl' instead of fold.
  • Remove unused import
Jul 1 2018, 7:25 AM
AndreasK commandeered D4847: UniqFM: Use foldl' instead of fold.
Jul 1 2018, 7:06 AM
AndreasK added a comment to D4917: stack: fix stack allocations on Windows.

and as soon as I get the time I will look at the liveliness analysis. I find it highly unlikely that simple Cabal function requires ~2200 spill slots.

Jul 1 2018, 7:06 AM

Jun 30 2018

AndreasK added inline comments to D4813: [WIP] Add support for SIMD operations in the NCG.
Jun 30 2018, 8:11 AM

Jun 28 2018

AndreasK added a comment to D4726: NCG: New code layout algorithm..
In D4726#135105, @jmct wrote:

Here are the results on the Ryzen 7 I am able to access. I ran it on a quiet headless machine with NoFibRuns=30. The results differ a bit. It could be noise though.

NoFib Results

--------------------------------------------------------------------------------
        Program           Size    Allocs   Runtime   Elapsed  TotalMem
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
            Min          -0.6%     -0.0%    -12.9%    -12.9%     -0.9%
            Max          -0.2%     +0.1%     +5.0%     +5.0%    +10.5%
 Geometric Mean          -0.3%     +0.0%     -1.2%     -1.2%     +0.1%
Jun 28 2018, 5:32 AM

Jun 22 2018

AndreasK added a comment to D4726: NCG: New code layout algorithm..

I've run nofib on a Xeon E3-1220 which jmct has provided me for a bench build and the results seem to hold up.

Jun 22 2018, 3:03 AM

Jun 21 2018

AndreasK updated the diff for D4327: WIP: Add likelyhood to alternatives from stg onwards.
  • Rebase
Jun 21 2018, 2:54 PM
AndreasK updated the diff for D4726: NCG: New code layout algorithm..
  • Rebase.
Jun 21 2018, 1:00 PM
AndreasK added a comment to D4882: WIP Add support for SIMD integer instructions.

I figured I'm going to need to figure out how gcc compiles code into assembly to inform me of the kind of assembly I should be generating, so I put together a small Github project where I can drop C files and have then compiled into assembly:

Jun 21 2018, 8:53 AM

Jun 20 2018

AndreasK added inline comments to D4813: [WIP] Add support for SIMD operations in the NCG.
Jun 20 2018, 4:05 PM
AndreasK added inline comments to D4813: [WIP] Add support for SIMD operations in the NCG.
Jun 20 2018, 9:38 AM
AndreasK added inline comments to D4813: [WIP] Add support for SIMD operations in the NCG.
Jun 20 2018, 5:43 AM
AndreasK retitled D4879: Explain why opt-cmm is not dumped by ddump-cmm-verbose. from Explain that dopt-cmm is not implied by ddump-cmm-verbose. to Explain why opt-cmm is not dumped by ddump-cmm-verbose..
Jun 20 2018, 5:25 AM
AndreasK updated the diff for D4879: Explain why opt-cmm is not dumped by ddump-cmm-verbose..

Rewording [skip-ci]

Jun 20 2018, 5:24 AM
AndreasK abandoned D4787: Dump the NCG Cmm->Cmm optimization pass when -ddump-cmm-verbose is enabled.

Abandoned in favour of D4879.

Jun 20 2018, 5:22 AM
AndreasK created D4879: Explain why opt-cmm is not dumped by ddump-cmm-verbose..
Jun 20 2018, 5:21 AM
AndreasK retitled D4847: UniqFM: Use foldl' instead of fold from UniqFM: Be more strict in several functions to UniqFM: Use foldl' instead of fold.
Jun 20 2018, 4:59 AM
AndreasK accepted D4847: UniqFM: Use foldl' instead of fold.
Jun 20 2018, 4:58 AM
AndreasK updated the diff for D4847: UniqFM: Use foldl' instead of fold.
  • Revert back to using a fold for list insertion
Jun 20 2018, 4:57 AM

Jun 19 2018

AndreasK added a comment to D4813: [WIP] Add support for SIMD operations in the NCG.

Good progress.

Jun 19 2018, 10:26 AM

Jun 15 2018

AndreasK requested changes to D4813: [WIP] Add support for SIMD operations in the NCG.
Jun 15 2018, 5:15 AM
AndreasK added inline comments to D4813: [WIP] Add support for SIMD operations in the NCG.
Jun 15 2018, 5:15 AM

Jun 14 2018

AndreasK added inline comments to D4847: UniqFM: Use foldl' instead of fold.
Jun 14 2018, 11:59 AM
AndreasK added a comment to D4847: UniqFM: Use foldl' instead of fold.

[14-Jun-18 16:07:59] <sjakobi> With the strictness changes in UniqFM, I'm actually getting a few "stat not good enough" failures for
[14-Jun-18 16:07:59] <sjakobi> TEST="T12227 T12545 T3064 T5030 T5321Fun T5631 T9872a T9872b T9872c"

Jun 14 2018, 11:54 AM
AndreasK requested changes to D4847: UniqFM: Use foldl' instead of fold.

This currently increases allocation. sjakobi was so nice to upload the patch so I can check why.

Jun 14 2018, 10:17 AM
AndreasK added a comment to D4832: WIP: Implement cmov support..

More things to consider:

  • CMOV doesn't support 8 bit operands.
  • CMOV with a memory address does NOT perform a conditional load. But a load followed from a conditional move.
    • Some simple cases could be better encoded using things like setcc.
Jun 14 2018, 7:26 AM
AndreasK added a comment to D4840: Update user manual sections for -rtsopts and -with-rtsopts.
In D4840#133605, @osa1 wrote:

@AndreasK any other concerns?

Jun 14 2018, 5:15 AM
AndreasK accepted D4840: Update user manual sections for -rtsopts and -with-rtsopts.
Jun 14 2018, 5:15 AM

Jun 13 2018

AndreasK added inline comments to D4840: Update user manual sections for -rtsopts and -with-rtsopts.
Jun 13 2018, 5:22 AM
AndreasK added inline comments to D4840: Update user manual sections for -rtsopts and -with-rtsopts.
Jun 13 2018, 4:38 AM
AndreasK requested changes to D4840: Update user manual sections for -rtsopts and -with-rtsopts.

Seems I was a bit sloppy with updating the docs when I extended rtsopts thanks a lot for cleaning this up!

Jun 13 2018, 4:36 AM
AndreasK added a comment to D4839: Fix some of the failures in sanity way.

Sounds sensible.

Jun 13 2018, 3:57 AM

Jun 12 2018

AndreasK planned changes to D4832: WIP: Implement cmov support..
Jun 12 2018, 7:23 AM
AndreasK added a comment to D4832: WIP: Implement cmov support..
  • Allocations are still far too high so there is some need for optimization.
  • Currently only deals with integer conditions
  • Assignments which read from memory should be directly translated to cmovs. Currently they also require an intermediate register.
Jun 12 2018, 7:23 AM
AndreasK updated the diff for D4832: WIP: Implement cmov support..
  • Some refactoring.
  • Also tackle branching code where one branch is empty.
Jun 12 2018, 7:20 AM
AndreasK updated the diff for D4832: WIP: Implement cmov support..
  • Refactor CmmCondAssign type.
Jun 12 2018, 4:37 AM
AndreasK added a comment to D4832: WIP: Implement cmov support..

There is a bit of noise in the results but here are the nofib measurements.
Individual benchmarks listed are these where cmov was generated and
it made a difference.

Jun 12 2018, 4:33 AM

Jun 11 2018

AndreasK added a comment to D4787: Dump the NCG Cmm->Cmm optimization pass when -ddump-cmm-verbose is enabled.

I don't feel strong about this either way.
But I think we should either dump this with verbose,
or otherwise change the userguide to mention the fact that there is another pass which isn't dumped.

Jun 11 2018, 1:48 PM
AndreasK created D4832: WIP: Implement cmov support..
Jun 11 2018, 1:48 PM
AndreasK added a comment to D4779: 1. Modify the StgCmmPrim bridge to remove the wasted register zeroing 2. Add some vector register utils like making temporary virtual registers 3. Add the width hardcoded version of braodcast 4. Add the entire pretty printing logic for the 3....

Assuming all changes in here are also in the other diff you could abandon this one to make it clear.

Jun 11 2018, 3:42 AM
AndreasK created D4829: Set -O2 via NoFibHcOpts instead of individual Makefiles..
Jun 11 2018, 3:31 AM

Jun 10 2018

AndreasK retitled D4756: Use /usr/bin/env to get perl path instead of using a hardcoded path. from Use /usr/bin/env to get perl path to Use /usr/bin/env to get perl path instead of using a hardcoded path..
Jun 10 2018, 1:00 PM
AndreasK added a comment to D4813: [WIP] Add support for SIMD operations in the NCG.

It's nice how much duplication disappeared with that change. Good job :)

Jun 10 2018, 7:09 AM

Jun 9 2018

AndreasK added inline comments to D4813: [WIP] Add support for SIMD operations in the NCG.
Jun 9 2018, 4:39 PM
AndreasK added inline comments to D4813: [WIP] Add support for SIMD operations in the NCG.
Jun 9 2018, 3:45 PM
AndreasK added inline comments to D4822: Preserve parenthesis in function application in typechecker.
Jun 9 2018, 8:49 AM

Jun 8 2018

AndreasK added inline comments to D4813: [WIP] Add support for SIMD operations in the NCG.
Jun 8 2018, 2:54 AM

Jun 7 2018

AndreasK added a comment to D4787: Dump the NCG Cmm->Cmm optimization pass when -ddump-cmm-verbose is enabled.

I'm a tad confused; why not just use -ddump-opt-cmm directly? I'm not entirely keen on tying together dump flags unnecessarily.

Jun 7 2018, 1:53 PM

Jun 6 2018

AndreasK added a reviewer for D4327: WIP: Add likelyhood to alternatives from stg onwards: carter.
Jun 6 2018, 5:31 PM