Skip to content

Latest commit

 

History

History
172 lines (172 loc) · 7.5 KB

TODO.md

File metadata and controls

172 lines (172 loc) · 7.5 KB

Features

  • https://hackage.haskell.org/package/containers-0.7/docs/Data-Sequence.html#v:cycleTaking (cycle til')
  • Use arc4random_buf and also arc4random_uniform, random, drand48
  • special case for 𝔯 0 1 :: float etc.
  • 𝔯 0 1 :: Arr sh int special case, apply bitmask over array?
  • folds/scans shouldn't take seeds
  • allow type signatures in lambdas?
  • mko executable - compile expression into .o file, with some name
  • random number generation
  • lift constants out of loops (precompute)
  • tuples idk.
    • float tuple return
  • reshape arrays
  • clz? (count leading zeroes = floor(log) -> digits)
  • flatness check (arrays)
  • generalize "diagonal"?
  • fold-along-diagonal for poly mult. https://code.jsoftware.com/wiki/Vocabulary/slashdot

Syntax

Optimization

  • arrays in assembler: register indirection?
T13 = A_0
T16 = T13.dim[0]
  • Break dependency chains: use e.g. four accumulators per loop cycle when summing float array (see agner fog)

Performance

  • consolidate move-zero for floats and ints
    eor x5, x5, x5                           a5 00 05 ca
    fmov d2, x5                              a2 00 67 9e
    eor x5, x5, x5                           a5 00 05 ca
    
  • think of a better way to handle functions of tuples (internally)
    • πe which places in registers?
  • map-of-gen. idiom
  • bitmask immediates for and on aarch64
  • Use Word64 for sets of registers
  • Modify state (+1) instead of using lazy list to supply e.g. temps

Bugs

  • {. ⟨⟨1,1.0⟩,⟨2,3⟩⟩ type
  • segfault when aso is called pre-register allocation (arm)
  • Should display constraints
 > :ty (+)
a → a → a
 > :ty (⋉)
o → o → o
  • > (𝔯 _10 10) :: int 26
  • :asm [x(%.)(y::Arr(iConsjConsNil)float)] type inference??
  • xmm0 and xmm1 incorrectly marked as clobbered when return value is not actually in xmm0/xmm1 or whatever
  • fsin instruction requires reduction module 2pi or w/e
  • beta-reduction with 'rand' or w/e (needs to be llet ... in)
  • Pass over to ensure everything is monomorphized
  • itof (:xs) - would prefer w/o parens?
  • it would be nice to write _x%y instead of (_x)%y (parse precedence)
  • match doesn't check constraints on annotations
  • check in assembler phase for labels not being duplicate

Type system

  • Check that bindings are not too polymorphic
    • after inlining
    • add a pass to prevent arrays of tuples of arrays
  • indexing with tuples (3-tuple for rank 3 array...)

Checks/Passes

  • Warn if irange or frange will exceed?

Examples

Debug

  • sanity check negative dims