Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] View of /branches/vis15/src/compiler/FIXME.md
ViewVC logotype

View of /branches/vis15/src/compiler/FIXME.md

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5584 - (download) (annotate)
Sun Aug 5 19:54:36 2018 UTC (12 months, 2 weeks ago) by jhr
File size: 6898 byte(s)
  Improvements to the C/C++ code generation infrastructure.  Added
  support for enumeration type definitions and switch statements to
  AST and fixed the printing of C/C++ types.
# FIXME issues
Organized by source directory.  We use the following command to find the FIXMEs:

````
bbfind --gui --name-pattern "*.in" --name-pattern "*.sml" FIXME .
````

High priority items are marked with a "🔥" symbol.

## Compiler issues

### `ast`

  * handle UTF-8 multi-byte-character sequences when parsing command-line string
    constants

  * be consistent about terminology for the various kinds of types (concrete, value, etc.)

### `basis`

  * additional basis operations:
    - overload "^" on integer/integer arguments (`basis-vars.sml`)
    - sum reduction on arbitrary tensors. (`basis-vars.sml`)
    - variance reduction (`basis.sml`)

### `cfg-ir`

  * add additional checking (`check-ir-fn.sml`)
    - check the types of `SEQ` elements
    - check `EINAPP` bodies
    - check application of user-defined functions

  * handle fused `MAPREDUCE` in global-variable promotion (`promote-fn.sml`)

  * avoid redundancy of setting bindings for variables (`translate-fn.sml` and
    `census-fn.sml`)

  * delete `APPLY` when function is pure and the result is unused (`unused-elim-fn.sml`)

  * delete `MAPREDUCE` when body is pure and the result is unused (`unused-elim-fn.sml`)

### `codegen`

  * factor out common type-translation code between `GenLibraryInterface` and
    `GenLibraryJSON` (`gen-library-interface.sml` and `gen-library-json.sml`)

  * set `strandConstr` field to `false` for strands that do not need C++ initialization
    of their state

### `common`

  * determine kernel continuity from kernel definitions (`kernel.sml`)

### `cxx-util`

  * various issues when synthesizing types and operations (`gen-tys-and-ops.sml`)
    - generating types and printing code for tuple

  * many issues in translating Tree IR to C++ (`tree-to-cxx.sml`)
    - liveness analysis to enable *in situ* dynamic sequence operations
    - add `vload_aligned` and `vpack_aligned` operations
    - refactor common code out of `trAssign` and `trDecl` functions

  * handle tuple types in `trQType` and `trType` (`type-to-cxx.sml`)

### `driver`

  * check AST for consistency (`main.sml` and `../ast`)

### `ein`

No issues.

### `fields`

No issues.

### `global-env`

No issues.

### `high-ir`

No issues.

### `high-opt`

  * improve efficiency of doRHS by doing one pass of substitutions (`normalize.sml`)

### `high-to-mid`

  * Expand integer powers into multiplications (`high-to-mid.sml`)

### `inputs`

No issues.

### `low-ir`

No issues.

### `low-opt`

No issues.

### `low-to-tree`

  * many issues in translating Low IR to Tree IR (`low-to-tree.sml`)
    - add support for output globals in `mkGlobalVar`

### `mid-ir`

No issues.

### `mid-opt`

No issues.

### `mid-to-low`

No issues.

### `mlton`

No issues.

### `nrrd`

No issues.

### `options`

No issues.

### `parse-tree`

No issues.

### `parser`

  * Need better support for tuning error messages (this problem is really a weakness in
    the **ml-antlr** tool) (`parser.sml`)

### `simple`

  * Invariant checking for Simple AST representation (`check-simple.sml`)

  * Pretty-printing for fused map-reduce (`simple-pp.sml`)

### `simple-opt`

  * Support fusion of reductions (`map-reduce-opt.sml`)

  * Analyze user-defined functions for purity (`simple-contract.sml`)

### `simplify`

  * Add a logical negate operation on AST expressions to support better if-then-else
    translations (`simplify.sml`)

  * Handle `AST.E_ParallelMap` expressions outside of reductions (`simplify.sml`)

  * Support for `variance` reductions over strand sets and sequences (`simplify.sml` and `util.sml`)

### `target-cpu`

  * switch to building an AST once CLang supports `const` functions (`gen-strand.sml`)

#### `fragments`

  * invoke new on allocated strands when necessary (`par-sarr-indirect.in` and
    `par-sarr-dual-indirect.in`)

  * dead strand compaction in `finish_step` (`par-sarr-*.in`)

  * parallel kd-tree construction (`par-worker.in`)

  * parallel reductions in `world::global_update()` (`par-worker.in`)

### `translate`

  * Support for `E_Tuple` and `E_Project` (`translate.sml`)

  * Check possible issues with global initialization and conditionals (`translate.sml`)

### `tree-ir`

  * Many issues in checking the Tree IR (`check-tree.sml`)
    - Parameterize the `check` function by the target's vector layout rules and
      check for valid layouts
    - Finish checking for `S_MAssign` statements
    - Check body of map-reduce
    - Checking for `S_LoadNrrd` statements
    - Check return type of user-defined functions

### `tree-opt`

No issues.

### `typechecker`

  * Evaluation of constant tensor slice (`check-const.sml`)

  * Check optional frame argument to `create_array` (once feature is enabled)

  * Many issues in typechecking expressions (`check-expr.sml`)
    - improved efficiency of overload resolution
    - resulting differentiation for inner, outer, and colon products
    - check index against shape of tensor for subscripting/slicing
    - check for sequences of non-concrete types (*e.g.*, sequences of fields)
    - non-literal constant string expressions

  * Support numeric escape sequences and UTF-8 characters in command-line
    string constants (`check-globals.sml`)

  * Allow strands without outputs, once we have global outputs (`check-strand.sml`)

  * Check for globals and state variables that are not initialized in
    their respective initialization sections (`check-var-uses.sml`)

  * If a variable is assigned to, but never read, then the unused message
    should reflect that fact (`check-var-uses.sml`)

  * don't report the `pos` state variable as unused when there are spatial
    queries (`check-var-uses.sml`)

  * Check for situation where `initially` method has call to `stabilize` (`check-var-uses.sml`)

  * Constants that are solely used to initialize other constants are reported
    unused (`check-var-uses.sml`)

  * Unification of differentiation bounds (`unify.sml`)

## Runtime system issues

### `common`

  * figure out a mechanism to pass warnings back up the call chain, instead of printing
    them from library code (`world.cxx`)

### `include/diderot`

  * For programs that do not use `new` or `die`, we can allocate less space for the
    KD-tree partitions (`kdtree-inst.hxx`)

# Questions

We use the following command to find the FIXMEs:

````
bbfind --gui --name-pattern "*.in" --name-pattern "*.sml" QUESTION .
````

#### `ein`

  * should the `int` be `IntInf.int`?  (`ein/ein.sml`)
    - Not sure CC

  * why is this `index_kind` list and not `index_id` list? (`ein/ein.sml`)
    - They are both ints, but one is a variable index
      and the other binds the ranges of the variable indices.

  * should we move the `init_consts` code into a constructor for the
    `globals` struct and make `init_globals` a member of the `world` struct?
    (`target-cpu/gen-globals.sml` and `target-cpu/gen.sml`)

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0