Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(WIP) Move codegen.cpp to a native Julia pipeline using the C interface + MLIR.jl #22

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

femtomc
Copy link
Collaborator

@femtomc femtomc commented Apr 25, 2021

  • Generating code for multiple test cases:
    • code without Pi and Phi (simple single blocks, no type conversion)
    • code with Pi and Phi
    • tests cases in Brutus
  • Executing code for multiple test cases:
    • code without Pi and Phi (simple single blocks, no type conversion)
    • code with Pi and Phi
    • tests cases in Brutus

function emit_value(b::JLIRBuilder, loc::JLIR.Location,
value, ::Type)
type = typeof(value)
jlir_type = convert_type_to_jlirtype(b.ctx, type)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of snake case, either convert(JLIRType, type, b.ctx) or JLIRType(b.ctx, type)

function emit_value(b::JLIRBuilder, loc::JLIR.Location,
value::Core.Argument, type::Type)
idx = value.n
arg = JLIR.get_arg(b.blocks[1], idx - 1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

arguments(b.blocks[1])[idx-1] or b.blocks[1][idx-1]?

@femtomc femtomc marked this pull request as draft April 25, 2021 20:01
@femtomc femtomc changed the title Move codegen.cpp to a native Julia pipeline using the C interface + MLIR.jl (WIP) Move codegen.cpp to a native Julia pipeline using the C interface + MLIR.jl Apr 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants