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

Add a MLIR dialect for ghidra pcode. #2

Closed
wants to merge 36 commits into from
Closed

Add a MLIR dialect for ghidra pcode. #2

wants to merge 36 commits into from

Conversation

surovic
Copy link
Contributor

@surovic surovic commented May 15, 2024

No description provided.

@surovic surovic self-assigned this May 15, 2024
CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
ghidra_scripts/PatchestryScript.java Outdated Show resolved Hide resolved
tools/ghidra.hpp Outdated Show resolved Hide resolved
include/patchestry/Dialect/Pcode/PcodeOps.td Outdated Show resolved Hide resolved
include/patchestry/Dialect/Pcode/PcodeOps.td Outdated Show resolved Hide resolved
include/patchestry/Dialect/Pcode/PcodeOps.td Outdated Show resolved Hide resolved
include/patchestry/Dialect/Pcode/PcodeOps.td Outdated Show resolved Hide resolved
include/patchestry/Dialect/Pcode/PcodeOps.td Outdated Show resolved Hide resolved
tools/main.cpp Outdated Show resolved Hide resolved
include/patchestry/Dialect/Pcode/PcodeOps.td Outdated Show resolved Hide resolved
include/patchestry/Dialect/Pcode/PcodeOps.td Outdated Show resolved Hide resolved
include/patchestry/Ghidra/Codegen.hpp Outdated Show resolved Hide resolved
lib/patchestry/Dialect/Pcode/PcodeOps.cpp Outdated Show resolved Hide resolved
lib/patchestry/Ghidra/Codegen.cpp Show resolved Hide resolved
lib/patchestry/Ghidra/Codegen.cpp Show resolved Hide resolved
lib/patchestry/Ghidra/Codegen.cpp Outdated Show resolved Hide resolved
lib/patchestry/Ghidra/Codegen.cpp Show resolved Hide resolved
tools/main.cpp Outdated Show resolved Hide resolved
tools/main.cpp Outdated Show resolved Hide resolved
@surovic surovic marked this pull request as ready for review June 17, 2024 16:51
include/patchestry/Ghidra/Codegen.hpp Outdated Show resolved Hide resolved
struct mlir_codegen_visitor
{
mlir::OpBuilder bld;
mlir::MLIRContext *ctx;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can it be nullptr? No? Make it a ref, and introduce a type alias.

using type_t = mlir::Type;
using value_t = mlir::Value;
using string_view = std::string_view;
using values_ref = llvm::ArrayRef< value_t >;
Copy link
Contributor

Choose a reason for hiding this comment

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

Move all of these to some shared header, we are going to use them all over the place.

visit(inst);
}
return bop;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This is the same as the one above really.

Copy link
Contributor

Choose a reason for hiding this comment

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

and the one below.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you mean the cg::operator() method as a whole or just the name?

@xlauko xlauko closed this Jun 26, 2024
@xlauko xlauko deleted the pcode_dialect branch June 26, 2024 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants