tjakway (Thomas Jakway)
User

Projects

User does not belong to any projects.

User Details

User Since
Oct 20 2016, 10:58 AM (164 w, 3 d)

Recent Activity

Oct 16 2017

tjakway planned changes to D2903: WIP: Register Allocator Loop Annotations.

TODO: add a flag -fno-spill-costs to allow current behavior and update docs

Oct 16 2017, 1:50 PM
tjakway added a comment to D2903: WIP: Register Allocator Loop Annotations.

Yay! I'm happy to see you pick this up again.

Patch with loop annotations had a slightly worse mean runtime (-4.1%) vs. patch without loop annotations (-4.3%) but a slightly better min (-51.6% vs. -50.3%). Not sure if this is close enough to be definitive.

Interesting. Were there significant regressions due to the annotations?

Oct 16 2017, 1:50 PM

Oct 15 2017

tjakway updated the diff for D2903: WIP: Register Allocator Loop Annotations.
  • fix 'Defined but not used: ‘reading’'
Oct 15 2017, 3:28 PM
tjakway added a comment to D2903: WIP: Register Allocator Loop Annotations.

Also: will need to verify this, but it shouldn't slow down compilation if -O <2 because the spillQuickly path will be taken through linearSpill which preserves the behavior of HEAD (i.e. spill whichever reg we find first without performing any cost measures).

Oct 15 2017, 2:54 PM
tjakway added a comment to D2903: WIP: Register Allocator Loop Annotations.

I ran benchmarks comparing this patch vs. master (2be55b85):

  • with no flags
  • with -fannotate-loops (linear allocator + enable optimization)
  • with -fregs-graph -fannotate-loops (graph allocator + enable optimization)
Oct 15 2017, 2:32 PM
tjakway updated the diff for D2903: WIP: Register Allocator Loop Annotations.

This patch was dormant for months because I couldn't figure out why the testsuite was failing and was busy with other things. I figured it out as I was writing an email to update ghc-devs [1] and set to work again. I've since written more tests and re-run the benchmarks.

Oct 15 2017, 2:07 PM

Jun 1 2017

tjakway added a comment to D2903: WIP: Register Allocator Loop Annotations.

RegAlloc unit tests are failing right now

Jun 1 2017, 5:23 PM
tjakway updated the diff for D2903: WIP: Register Allocator Loop Annotations.
  • now exporting SpillLoc constructors
  • converted LoopInfo from a tuple to a record type
  • UniqFM -> UniqSet transition
  • fixed type annotation for linearSpillResult
  • wrote assertLinearSpills
  • wrote testSpillSingleCandidate
  • not testing unassigned regs because there might be unassigned regs that still aren't free
  • added stack map check and RegAllocStats check
  • renamed assertVRegSpilled -> checkVRegSpilled because it doesnt use assertIO
  • wrote assertEither and genCandidatesInBoth
  • added type annotations to top level filenames
  • refactored SpillCost data type and plusSpillCost into their own module SpillCostType
  • fixed haddock comment in canFallThrough
  • fixed haddock comment in annotateLoop
  • changed foldr -> foldl' in annotateLoop
  • explaining why we drop head
  • made spacing more consistent with GHC (4 spaces from the left)
Jun 1 2017, 5:23 PM

Feb 7 2017

tjakway updated the diff for D2903: WIP: Register Allocator Loop Annotations.
  • fixed comment
Feb 7 2017, 8:42 PM
tjakway updated the diff for D2903: WIP: Register Allocator Loop Annotations.
  • fixed bug in pickSpill
  • fixed warnings
Feb 7 2017, 2:44 PM
tjakway updated the diff for D2903: WIP: Register Allocator Loop Annotations.
  • updated todos
Feb 7 2017, 2:13 PM
tjakway updated the diff for D2903: WIP: Register Allocator Loop Annotations.
  • removed unused imports
  • applying lint suggestions
Feb 7 2017, 8:28 AM

Feb 4 2017

tjakway updated the diff for D2903: WIP: Register Allocator Loop Annotations.
  • updated todos
Feb 4 2017, 7:13 PM
tjakway updated the diff for D2903: WIP: Register Allocator Loop Annotations.
  • refactored NcgImpl into its own module to eliminate AsmCodeGen.hs-boot
Feb 4 2017, 12:57 PM

Feb 3 2017

tjakway updated the diff for D2903: WIP: Register Allocator Loop Annotations.
  • fixing line length warnings
Feb 3 2017, 3:39 PM

Jan 28 2017

tjakway updated the diff for D2903: WIP: Register Allocator Loop Annotations.

Now collecting loop annotations and spill costs in Linear.RegAllocStats so they can be used for unit tests

Jan 28 2017, 10:40 AM

Jan 26 2017

tjakway updated the diff for D2903: WIP: Register Allocator Loop Annotations.

instead of dying on error now returning the first element if we dont have spill costs

Jan 26 2017, 12:57 PM
tjakway updated the diff for D2903: WIP: Register Allocator Loop Annotations.

choosing which register to spill using minimumBy instead of sortOn

Jan 26 2017, 11:26 AM

Jan 25 2017

tjakway updated the diff for D2903: WIP: Register Allocator Loop Annotations.

fixed filtering for registers we can spill in chooseSpillSlowly

Jan 25 2017, 4:16 PM

Jan 24 2017

tjakway updated the diff for D2903: WIP: Register Allocator Loop Annotations.

Added more comments

Jan 24 2017, 8:17 PM
tjakway updated the diff for D2903: WIP: Register Allocator Loop Annotations.

Integrating loop annotations with the linear register allocator plus general improvements.

Jan 24 2017, 4:37 PM

Jan 17 2017

tjakway added a comment to D2903: WIP: Register Allocator Loop Annotations.

Do you plan on fixing the graph allocator at some point?

Jan 17 2017, 4:10 PM

Jan 16 2017

tjakway added a comment to D2903: WIP: Register Allocator Loop Annotations.

@simonmar @DemiMarie Instead of fixing the graph allocator in this patch I've been working on integrating loop annotations with the linear allocator (to be enabled with -O2). This has turned out to be a larger task than I expected and I didn't want to send really rough code to phab. I'll clean it up & update this patch soon.
I think fixing the graph allocator should be its own patch.

Jan 16 2017, 4:19 PM

Jan 13 2017

tjakway added a comment to D2903: WIP: Register Allocator Loop Annotations.

@tjakway, are you aware of the outstanding problems with the graph-colouring allocator, in Trac #7679? It would be a shame to do this work if it can't be used due to other unresolved issues.

Jan 13 2017, 5:27 PM

Jan 10 2017

tjakway updated the diff for D2903: WIP: Register Allocator Loop Annotations.

Fixed the testLoop unit test
Changed SpillCost to track writes, reads, and instrs in loops
Changed loopMultiplier to reflect the other changes in SpillCost
Fixed bug in annotateLoop where we built up path backwards & forgot to reverse it

Jan 10 2017, 12:43 PM

Jan 5 2017

tjakway added a comment to D2903: WIP: Register Allocator Loop Annotations.

Bumping out of review queue for now.

Jan 5 2017, 4:34 PM

Jan 3 2017

tjakway added a comment to D2903: WIP: Register Allocator Loop Annotations.

Let me know when you'd like a review of this, @tjakway! Thanks for getting this up on Phab!

Jan 3 2017, 2:33 PM

Jan 2 2017

tjakway updated the diff for D2903: WIP: Register Allocator Loop Annotations.

Checking in first unit test.

Jan 2 2017, 5:43 PM

Dec 31 2016

tjakway updated the diff for D2903: WIP: Register Allocator Loop Annotations.

changed SpillCost.hs to count instructions inside loops

Dec 31 2016, 8:11 PM
tjakway added a comment to D2903: WIP: Register Allocator Loop Annotations.

Current problem: since vregs aren't associated with loop information we're waiting until we have to spill something then multiplying everything by the loopMultiplier... which of course doesn't help with picking the right one.
Need to either be more specific with spill costs or change where we spill. The former is more practical--changing spill locations would require backtracking and might make the graph uncolorable (I think? someone else is welcome to weigh in on how this might affect graph colorability)
The goal now is to figure out which variables are used in a loop then spill the ones that aren't. This will be an application of the information we've already gathered, the hard work of finding loops is done (I think--need test cases).

Dec 31 2016, 7:00 PM

Dec 28 2016

tjakway retitled D2903: WIP: Register Allocator Loop Annotations from WIP: Register Allocator - restored unit tests to WIP: Register Allocator Loop Annotations.
Dec 28 2016, 6:54 PM
tjakway added a comment to D2903: WIP: Register Allocator Loop Annotations.

very much a work in progress, but thought I'd put it up on Phab sooner rather than later

Dec 28 2016, 4:37 PM
tjakway updated the diff for D2903: WIP: Register Allocator Loop Annotations.
  • removed unused file
Dec 28 2016, 4:37 PM
tjakway updated the diff for D2903: WIP: Register Allocator Loop Annotations.

accidentally only sent HEAD, needed arc to squash everything together

Dec 28 2016, 4:32 PM
tjakway retitled D2903: WIP: Register Allocator Loop Annotations from to restored unit tests.
Dec 28 2016, 4:28 PM

Nov 8 2016

tjakway updated the diff for D2638: Test for unnecessary register spills.

Moved banner comment

Nov 8 2016, 2:03 PM
tjakway updated the diff for D2638: Test for unnecessary register spills.

Added explanation for test exports in AsmCodeGen.hs

Nov 8 2016, 1:52 PM
tjakway updated the diff for D2638: Test for unnecessary register spills.

Added overall explanation to the top of the file and comments throughout.

Nov 8 2016, 1:47 PM

Oct 31 2016

tjakway updated the diff for D2638: Test for unnecessary register spills.
Oct 31 2016, 8:33 AM

Oct 30 2016

tjakway updated the diff for D2638: Test for unnecessary register spills.

Trying to get harbormaster to fire

Oct 30 2016, 2:36 PM

Oct 27 2016

tjakway updated the diff for D2638: Test for unnecessary register spills.

Removed unused variables.

Oct 27 2016, 11:01 AM
tjakway updated the diff for D2638: Test for unnecessary register spills.

Fixed accidental comma

Oct 27 2016, 10:59 AM
tjakway updated the diff for D2638: Test for unnecessary register spills.

Added haddock sections to AsmCodeGen and fixed test comments

Oct 27 2016, 10:56 AM
tjakway added a comment to D2638: Test for unnecessary register spills.

Any ideas on how to write getNcgImpl? Like

Oct 27 2016, 10:39 AM
tjakway added a comment to D2638: Test for unnecessary register spills.

Todo: write getNcgImpl in AsmCodeGen.hs, add it to the export list instead of x86NcgImpl, and document:

Oct 27 2016, 7:18 AM
tjakway updated the diff for D2638: Test for unnecessary register spills.

Removed Opt_KeepRegallocIntermediates in favor of Opt_D_dump_asm_stats and ignore_stderr

Oct 27 2016, 7:17 AM

Oct 26 2016

tjakway updated D2638: Test for unnecessary register spills.
Oct 26 2016, 11:05 AM
tjakway added a comment to D2638: Test for unnecessary register spills.

Any suggestions for making this platform-agnostic without exposing too much of the guts of AsmCodeGen.hs?

Oct 26 2016, 10:49 AM
tjakway updated the diff for D2638: Test for unnecessary register spills.

Fixed line length warning

Oct 26 2016, 10:47 AM
tjakway retitled D2638: Test for unnecessary register spills from to Test for unnecessary register spills.
Oct 26 2016, 10:43 AM
tjakway abandoned D2621: Compile cmm file for register allocator stats.
Oct 26 2016, 10:25 AM

Oct 20 2016

tjakway updated the diff for D2621: Compile cmm file for register allocator stats.
Oct 20 2016, 8:06 PM
tjakway added a comment to D2621: Compile cmm file for register allocator stats.

@mpickering There was a discussion about this in IRC GHC. I used git diff master..HEAD, uploaded via the Phabricator web interface, and managed to (accidentally) evade the hook. It has since been fixed. Sorry about that.

Oct 20 2016, 7:49 PM
tjakway updated the diff for D2621: Compile cmm file for register allocator stats.
Oct 20 2016, 7:47 PM
tjakway updated D2621: Compile cmm file for register allocator stats.
Oct 20 2016, 7:36 PM
tjakway updated D2621: Compile cmm file for register allocator stats.
Oct 20 2016, 4:58 PM
tjakway set the repository for D2621: Compile cmm file for register allocator stats to rGHC Glasgow Haskell Compiler.
Oct 20 2016, 4:47 PM
tjakway retitled D2621: Compile cmm file for register allocator stats from to Compile cmm file for register allocator stats.
Oct 20 2016, 4:25 PM