AndreasK (Andreas Klebinger)
User

Projects

User does not belong to any projects.

User Details

User Since
Nov 19 2016, 5:25 PM (79 w, 2 h)

Recent Activity

Today

AndreasK created D4740: Check if both branches of an Cmm if have the same target..
Sat, May 26, 2:00 PM

Thu, May 24

AndreasK added a comment to D4726: DO NOT MERGE - Experimental code layout.

Full nofib log:

Thu, May 24, 10:55 AM
AndreasK updated the diff for D4327: WIP: Add likelyhood to alternatives from stg onwards.
  • rebase
Thu, May 24, 3:46 AM
AndreasK added a comment to D4726: DO NOT MERGE - Experimental code layout.

I've run nofib this night and results actually look quite good after a bit of tweaking!

Thu, May 24, 3:19 AM
AndreasK updated the diff for D4726: DO NOT MERGE - Experimental code layout.

Some adjustments to the weights.

Thu, May 24, 2:49 AM

Wed, May 23

AndreasK planned changes to D4726: DO NOT MERGE - Experimental code layout.

As it stands performance is about the same but compile times are slightly worse.

Wed, May 23, 6:26 PM
AndreasK created D4726: DO NOT MERGE - Experimental code layout.
Wed, May 23, 4:07 PM

Mon, May 21

AndreasK added a comment to D4705: Don't use binary output for real/eff..

Looks reasonable to me.

I am rather surprised that marking the output as binary gave problems though. Usually it's binary output declared as text that is the problem.

Mon, May 21, 3:36 PM
AndreasK updated the summary of D4705: Don't use binary output for real/eff..
Mon, May 21, 10:46 AM

Wed, May 16

AndreasK updated the diff for D4706: Allow aligning of cmm procs at specific boundry.

Rebase

Wed, May 16, 8:57 PM
AndreasK created D4706: Allow aligning of cmm procs at specific boundry.
Wed, May 16, 8:51 PM
AndreasK created D4705: Don't use binary output for real/eff..
Wed, May 16, 8:24 PM
AndreasK added a comment to D4632: An overhaul of the SRT representation.

I think this covers the case in Trac #15126?

Wed, May 16, 8:25 AM
AndreasK updated the summary of D4597: Optimizations for CmmBlockElim..
Wed, May 16, 3:20 AM
AndreasK updated the diff for D4597: Optimizations for CmmBlockElim..
  • Add TrieMap instance for LabelMap.
Wed, May 16, 3:18 AM
AndreasK created D4697: Add pprTraceM to Outputable as analog to traceM..
Wed, May 16, 2:14 AM

Wed, May 9

AndreasK added a comment to D4679: RTS: Auto-size the allocation area depending on CPU cache size.

Have you tested the performance implications?
I remember some programs in nofib actually getting slower with larger allocation sizes.

Wed, May 9, 7:40 AM

Mon, May 7

AndreasK updated the diff for D4327: WIP: Add likelyhood to alternatives from stg onwards.

This my latest changeset for likelyhood in GHC.

Mon, May 7, 2:56 PM

Mon, Apr 30

AndreasK added a comment to D4595: Change jump targets in JMP_TBL from blocks to X86.JumpDest..

For now I simply removed the comments with the invariant.

Mon, Apr 30, 8:50 AM
AndreasK updated the diff for D4595: Change jump targets in JMP_TBL from blocks to X86.JumpDest..
  • Remove comment with invariant.
Mon, Apr 30, 8:47 AM
AndreasK updated the diff for D4595: Change jump targets in JMP_TBL from blocks to X86.JumpDest..
  • Remove comment with invariant, panic in case JMP_TBL contains non label destination during static table generation.
Mon, Apr 30, 8:43 AM
AndreasK updated the Trac tickets for D4595: Change jump targets in JMP_TBL from blocks to X86.JumpDest..
Mon, Apr 30, 8:18 AM
AndreasK updated the Trac tickets for D4597: Optimizations for CmmBlockElim..
Mon, Apr 30, 7:27 AM

Fri, Apr 27

AndreasK updated the diff for D4327: WIP: Add likelyhood to alternatives from stg onwards.

This is a WIP patch. The main things it does are:

Fri, Apr 27, 3:40 AM

Apr 24 2018

AndreasK updated the diff for D4618: Split TrieMap into a general (TrieMap) and core specific (CoreTrieMap) module..
  • Rename: CoreTrieMap -> CoreMap
Apr 24 2018, 3:32 PM
AndreasK updated the Trac tickets for D4618: Split TrieMap into a general (TrieMap) and core specific (CoreTrieMap) module..
Apr 24 2018, 8:59 AM
AndreasK requested review of D4618: Split TrieMap into a general (TrieMap) and core specific (CoreTrieMap) module..
Apr 24 2018, 2:25 AM

Apr 22 2018

AndreasK planned changes to D4327: WIP: Add likelyhood to alternatives from stg onwards.

How is this going, @AndreasK?

Apr 22 2018, 4:53 PM

Apr 20 2018

AndreasK added inline comments to D4595: Change jump targets in JMP_TBL from blocks to X86.JumpDest..
Apr 20 2018, 11:45 AM
AndreasK added a comment to D4605: Algebraically simplify add/sub with carry/overflow.
In D4605#127683, @sgraf wrote:

Note that this needs D4592 to land first.

Apr 20 2018, 2:31 AM

Apr 19 2018

AndreasK requested review of D4597: Optimizations for CmmBlockElim..

@AndreasK, do you think you could clean up the commit message a bit? It's a bit hard to follow what is going on here.

Apr 19 2018, 3:45 PM
AndreasK updated the summary of D4597: Optimizations for CmmBlockElim..
Apr 19 2018, 3:15 PM

Apr 17 2018

AndreasK added a comment to D4597: Optimizations for CmmBlockElim..

Maybe you can add the missing TrieMap instance?

Apr 17 2018, 4:21 PM
AndreasK updated the summary of D4597: Optimizations for CmmBlockElim..
Apr 17 2018, 10:32 AM
AndreasK updated the diff for D4597: Optimizations for CmmBlockElim..
  • Use leave compression.
Apr 17 2018, 10:15 AM

Apr 16 2018

AndreasK updated the diff for D4597: Optimizations for CmmBlockElim..

Remove unused type variable.

Apr 16 2018, 12:44 PM
AndreasK requested review of D4597: Optimizations for CmmBlockElim..
Apr 16 2018, 6:18 AM
AndreasK planned changes to D4597: Optimizations for CmmBlockElim..

Since this is an optimization, how much is it worth?

Apr 16 2018, 6:17 AM
AndreasK updated the diff for D4597: Optimizations for CmmBlockElim..
  • Revert back to using ListTrieMap.
Apr 16 2018, 6:06 AM

Apr 15 2018

AndreasK updated the diff for D4597: Optimizations for CmmBlockElim..
  • Pretty up the code slightly.
Apr 15 2018, 6:28 PM
AndreasK retitled D4597: Optimizations for CmmBlockElim. from Use toBlockList instead of revPostorder in CmmBlockElim. to Optimizations for CmmBlockElim..
Apr 15 2018, 11:59 AM
AndreasK updated the diff for D4597: Optimizations for CmmBlockElim..
  • Replace TrieMap with regular Map in CmmCommBlockElim
Apr 15 2018, 10:05 AM
AndreasK requested review of D4597: Optimizations for CmmBlockElim..
Apr 15 2018, 9:43 AM

Apr 14 2018

AndreasK requested review of D4595: Change jump targets in JMP_TBL from blocks to X86.JumpDest..

Updating the references in JMP_TBL was introduced in https://phabricator.haskell.org/D4595.

Apr 14 2018, 10:21 AM

Apr 11 2018

AndreasK requested review of D4585: Omit ways depending on rts flags for #12870 related tests..
Apr 11 2018, 7:23 PM
AndreasK added a comment to D4583: Use newtype deriving for Hoopl code.

Are you sure you based this on the right commit? The Diff doesn't seem to show what you're claiming it does.

Apr 11 2018, 3:10 PM
AndreasK retitled D4583: Use newtype deriving for Hoopl code from Take advantage of newtype deriving for Hoopl code to Use newtype deriving for Hoopl code.
Apr 11 2018, 3:09 PM
AndreasK requested review of D4583: Use newtype deriving for Hoopl code.
Apr 11 2018, 11:57 AM

Apr 8 2018

AndreasK added inline comments to D4566: Update JMP_TBL targets during shortcutting in X86 NCG..
Apr 8 2018, 8:52 AM
AndreasK updated the diff for D4566: Update JMP_TBL targets during shortcutting in X86 NCG..

Inline shortcutJumpTable.

Apr 8 2018, 8:51 AM

Apr 5 2018

AndreasK requested review of D4566: Update JMP_TBL targets during shortcutting in X86 NCG..
Apr 5 2018, 4:08 AM

Apr 2 2018

AndreasK added a comment to D4555: Make shortcutting at the asm stage toggleable and default for O2..

It's also worth pointing out that running the pass changes code layout even when it doesn't remove jumps.
Which at least for nofib probably makes this impossible to benchmark.

Apr 2 2018, 3:36 PM
AndreasK added a comment to D4555: Make shortcutting at the asm stage toggleable and default for O2..

Sure, the jumps are eliminated but do we have evidence that this actually helps performance?

Apr 2 2018, 3:14 PM

Apr 1 2018

AndreasK requested review of D4555: Make shortcutting at the asm stage toggleable and default for O2..
Apr 1 2018, 7:18 PM

Mar 18 2018

AndreasK added inline comments to D3194: Combine identical case alternatives in CSE.
Mar 18 2018, 4:17 PM

Mar 17 2018

AndreasK added a comment to D4327: WIP: Add likelyhood to alternatives from stg onwards.

In a discussion with alexbiehl about code being placed inside of loops I realized we could take advantage of the occurrence checker to find simple loops and mark looping branches as likely.

Mar 17 2018, 4:49 AM
AndreasK added a comment to D4306: Handle the likely:True case in CmmContFlowOpt.
Mar 17 2018, 4:48 AM
AndreasK updated the diff for D4327: WIP: Add likelyhood to alternatives from stg onwards.
  • Optionally balance the switchplan tree by branch weight.
  • Rebase
Mar 17 2018, 4:31 AM

Mar 12 2018

AndreasK added a comment to D4327: WIP: Add likelyhood to alternatives from stg onwards.

I've run nofib overnight and the results were a bit underwhelming. As it stands it's most likely not worth merging.

Andreas, this is good work. I'm inclined to agree that it's not worth adding all this extra code if the perf payoff is very small. That's disappointing.

But if you decide to park this, please add your long comment, with perf numbers, to the ticket. And probably commit your work to a wip branch of the main GHC repository, so that someone else could easily pick it up at a future date. (Add the branch id to the ticket of course, so it's discoverable.)

Thanks!

Simon

Mar 12 2018, 12:02 PM

Mar 8 2018

AndreasK created D4486: Update tests for #12870 to pass with a slow run of the testsuite..
Mar 8 2018, 1:16 PM

Feb 22 2018

AndreasK updated the summary of D4327: WIP: Add likelyhood to alternatives from stg onwards.
Feb 22 2018, 5:48 AM
AndreasK added a comment to D4327: WIP: Add likelyhood to alternatives from stg onwards.

I've run nofib overnight and the results were a bit underwhelming.
As it stands it's most likely not worth merging.

Feb 22 2018, 5:47 AM

Feb 21 2018

AndreasK updated the diff for D4327: WIP: Add likelyhood to alternatives from stg onwards.

Use branche weights when constructing a plan from a SwitchPlan.

Feb 21 2018, 3:02 PM

Feb 20 2018

AndreasK added a comment to D4424: Don't inline top-level primitive string literals.

I run nofib a couple of time and it's hard to see anything among the noise P175. I don't *think* I have cpu scaling on, is usually less noisy for other people?

Feb 20 2018, 6:42 AM
AndreasK created D4429: Introduce the flag -dsuppress-timestamps to avoid timestamps in dumps..
Feb 20 2018, 6:07 AM

Feb 19 2018

AndreasK added inline comments to D4419: Combine the CoreAlts with the most common RHS.
Feb 19 2018, 12:56 PM

Feb 11 2018

AndreasK updated the diff for D4327: WIP: Add likelyhood to alternatives from stg onwards.
  • Remove unneccesary llvm metadata constructors
Feb 11 2018, 4:12 AM
AndreasK updated the diff for D4327: WIP: Add likelyhood to alternatives from stg onwards.
  • Make unlikely bottoms a flag
  • Rename Freq to BranchWeight, Add Note, Make Weight newtype.
  • Expanded comments some more
  • Lint/Wall fixes
  • Remove last todofs
  • Lint suggestions applied
  • Rebased on master
Feb 11 2018, 4:01 AM
AndreasK updated the diff for D4327: WIP: Add likelyhood to alternatives from stg onwards.
  • Remove all TODOF's.
  • Incorporate feedback from Phab review.
  • Make Freq a newtype and rename it to BranchWeight.
  • Output weights as llvm metadata
Feb 11 2018, 3:47 AM

Feb 10 2018

AndreasK added inline comments to D4327: WIP: Add likelyhood to alternatives from stg onwards.
Feb 10 2018, 5:18 PM

Feb 8 2018

AndreasK accepted D4398: Be more selective in which conditionals we invert.
Feb 8 2018, 10:09 AM
AndreasK requested changes to D4398: Be more selective in which conditionals we invert.

I think the comment is much improved already but still slightly misleading.

Feb 8 2018, 4:53 AM

Feb 5 2018

AndreasK added a comment to D4324: Add likely annotation to cmm files in a few obvious places..

Yeah, I'm suspicious of that change to CmmSink as I noted in the comment: https://phabricator.haskell.org/rGHC6d14c1485cb570cbd183bcdc0f858d9a6dc1eb31#inline-626

Feb 5 2018, 9:43 AM

Feb 1 2018

AndreasK added a comment to D4324: Add likely annotation to cmm files in a few obvious places..

Regarding the assembly difference:

Feb 1 2018, 2:15 PM
AndreasK added a comment to D4324: Add likely annotation to cmm files in a few obvious places..

Woah, I'm too late to the party to review this, but this is deeply suspicious:

For the compacting GC (Compacting.cmm) the results for
nofib/gc/mutstore1 10000000 +RTS -c -s were:

Without likely infoWith likely info

------------|-------------------------|-------------------------|
Total time | 47.250s ( 50.583s wall) | 45.656s ( 48.359s wall) |

because Compact.cmm has nothing to do with compacting GC, it's for compact regions (see the Data.Compact API). So I'm not sure where this difference came from? Perhaps from the changes in primops or updates?

Feb 1 2018, 1:45 PM

Jan 30 2018

AndreasK added a comment to D4327: WIP: Add likelyhood to alternatives from stg onwards.

Generally fine, thanks, but a few more signposts would be really helpful.

Jan 30 2018, 7:08 AM

Jan 29 2018

AndreasK updated the summary of D4324: Add likely annotation to cmm files in a few obvious places..
Jan 29 2018, 6:39 PM
AndreasK updated the diff for D4348: Mark xmm6 as caller saved in the register allocator for windows..
  • Test case comment, remove unsafeCoerce
  • Expanded comments.
Jan 29 2018, 4:10 PM
AndreasK retitled D4327: WIP: Add likelyhood to alternatives from stg onwards from WIP: Add likelyhood to alternatives throughout all passes.. to WIP: Add likelyhood to alternatives from stg onwards.
Jan 29 2018, 5:12 AM
AndreasK updated the diff for D4327: WIP: Add likelyhood to alternatives from stg onwards.
  • Move likeliness out of core for now.
  • Remove more TODOF's.
Jan 29 2018, 5:11 AM

Jan 28 2018

AndreasK updated the diff for D4348: Mark xmm6 as caller saved in the register allocator for windows..
  • Update comment
Jan 28 2018, 2:54 PM
AndreasK updated the diff for D4348: Mark xmm6 as caller saved in the register allocator for windows..
  • Add Testcase
Jan 28 2018, 2:52 PM
AndreasK updated the diff for D4348: Mark xmm6 as caller saved in the register allocator for windows..
  • Expand comment
Jan 28 2018, 2:18 PM
AndreasK added a comment to D4348: Mark xmm6 as caller saved in the register allocator for windows..

Make sure to include the test case from Trac #14619!

Jan 28 2018, 2:17 PM
AndreasK updated the diff for D4348: Mark xmm6 as caller saved in the register allocator for windows..
  • Mark xmm6 AND ABOVE as callee saves
  • Respect Win64 ABI (save xmm6-15) in StgRun.
Jan 28 2018, 8:00 AM
AndreasK updated the diff for D4348: Mark xmm6 as caller saved in the register allocator for windows..

Mixed up caller/callee in the comment.

Jan 28 2018, 7:10 AM
AndreasK created D4348: Mark xmm6 as caller saved in the register allocator for windows..
Jan 28 2018, 3:57 AM

Jan 26 2018

AndreasK removed a dependency for D4294: Cmm switch on two alts + def uses two equality tests instead of range checks.: D4295: Simplify guard in createSwitchPlan..
Jan 26 2018, 1:37 PM
AndreasK updated the diff for D4294: Cmm switch on two alts + def uses two equality tests instead of range checks..
  • Rebased onto master.
Jan 26 2018, 1:37 PM
AndreasK removed a dependent revision for D4295: Simplify guard in createSwitchPlan.: D4294: Cmm switch on two alts + def uses two equality tests instead of range checks..
Jan 26 2018, 1:37 PM
AndreasK added a comment to D4327: WIP: Add likelyhood to alternatives from stg onwards.

Pushing the use of exprIsBottom to find unlikely branches back to the Core-to-STG pass sounds better.

One idea I have is using pragmas to inform the compiler about likely branches.

case checkInput of
  ParseError {-# CHANCE rare -} 	-> printSuggestions
  ValueError {-# CHANCE unlikely -}     -> printConstraints
  Valid      {-# CHANCE likely -} 	-> runComputation

Have you considered how these annotations would behave under simplification (for instance, case-of-case)? It's not entirely clear to me how this should work.

Jan 26 2018, 3:58 AM

Jan 25 2018

AndreasK retitled D4306: Handle the likely:True case in CmmContFlowOpt from Respect the Cmm likely flag in the native x86 codegen. to Handle the likely:True case in CmmContFlowOpt.
Jan 25 2018, 12:20 PM
AndreasK added a comment to D4306: Handle the likely:True case in CmmContFlowOpt.

I've removed the isNothing condition.

Jan 25 2018, 12:13 PM
AndreasK updated the diff for D4306: Handle the likely:True case in CmmContFlowOpt.
  • Move inversion of conditional for likely:True to CmmContFlowOpt
Jan 25 2018, 11:21 AM
AndreasK added a comment to D4327: WIP: Add likelyhood to alternatives from stg onwards.

Thanks for trying this. If that 0.8% is real, it's pretty good.

I'm really quite reluctant to turn Core case alternatives into a 4-tuple. As you found, it's a pretty invasive change. STG is another matter; I'm fine with that.

Since we have exprIsBottom why not use it to identify infrequent branches in the core-to-STG pass? That way Core is unchanged and the patch is far far less invasive.

Jan 25 2018, 8:09 AM
AndreasK added a comment to D4306: Handle the likely:True case in CmmContFlowOpt.

Yes, I think swapcond_last is actually wrong, thanks for pointing it out. Looks like it was changed in D2688, cc @alexbiehl

I propose this condition:

| CmmCondBranch cond t f l <- shortcut_last
, hasOnePredecessor t -- inverting will make t a fallthrough
, likelyTrue l || (isNothing l && numPreds f > 1)
, Just cond' <- maybeInvertCmmExpr cond
= CmmCondBranch cond' f t (invertLikeliness l)

To paraphrase, we'll invert the condition if:

  • the inverted condition will be a fallthrough, and
  • the true branch is likely (so we make the likely branch the fallthrough) OR we have no likeliness information and the false branch might not be a fallthrough (so we make the code simpler by creating a fallthrough)
Jan 25 2018, 4:09 AM

Jan 24 2018

AndreasK added a comment to D4306: Handle the likely:True case in CmmContFlowOpt.

Comparison with transform on False (baseline) and transform on Nothing

. Run with NoFibRuns=30.

Jan 24 2018, 1:32 PM
AndreasK accepted D4330: Linker: ignore empty paths in addEnvPaths.

Make sure to add the working_dir behaviour to the summary so that it appears in the commit message.

Jan 24 2018, 7:37 AM

Jan 23 2018

AndreasK added a comment to D4306: Handle the likely:True case in CmmContFlowOpt.

I've looked into it a bit more.

Jan 23 2018, 1:55 PM

Jan 22 2018

AndreasK added a comment to D4306: Handle the likely:True case in CmmContFlowOpt.

Not sure about this. We already have code to do something similar here:

https://phabricator.haskell.org/diffusion/GHC/browse/master/compiler/cmm/CmmContFlowOpt.hs;24e56ebd010846683b236b6ef3678c2217640120$286-300

and indeed the version in ContFlowOpt is better because it takes into account the number of predecessors of the branch targets.

Jan 22 2018, 4:08 PM