Commit graph

5 commits

Author SHA1 Message Date
Leonardo de Moura
3eeb337423 fix(library/init/compiler/ir): phi instructions must only occur in the beggining of the block 2018-04-20 18:27:13 -07:00
Leonardo de Moura
b35be8e6b7 feat(library/init/compiler/ir): simplify phi instruction
The blockid is only needed by LLVM, and we can infer this information
when mapping to LLVM.
2018-04-20 18:27:13 -07:00
Leonardo de Moura
29ee8493c0 feat(library/init/compiler/ir): blockid validator 2018-04-20 18:27:13 -07:00
Leonardo de Moura
ba9782bc5a feat(library/init/compiler/ir): collect used variables 2018-04-20 18:27:13 -07:00
Leonardo de Moura
7260ac91ed feat(library/init/compiler/ir): declare new IR in Lean
Next steps:
- Implement more validators (e.g., blockid validator, type checker).
- Implement C++ code generator (in Lean). We can use it for testing the new
  lean_obj module implemented in C++.
- Implement interpreter (in C++) for sanity checking.
- Implement LLVM IR generator (in Lean). It just outputs a text file using LLVM
  syntax. After, we are confident we are generating valid LLVM IR, we
  can try to link LLVM with Lean.
2018-04-20 18:27:13 -07:00