Add devtools utility set
This commit is contained in:
parent
92f7616ed1
commit
628598ad8b
|
@ -35,6 +35,7 @@ option(SERENE_ENABLE_THINLTO "Enable ThisLTO." ON)
|
|||
option(SERENE_ENABLE_DOCS "Enable document generation" OFF)
|
||||
option(SERENE_ENABLE_TIDY "Enable clang tidy check" OFF)
|
||||
option(SERENE_DISABLE_CCACHE "Disable automatic ccache integration" OFF)
|
||||
option(SERENE_ENABLE_DEVTOOLS "Enable the devtools build" OFF)
|
||||
|
||||
# libserene
|
||||
option(SERENE_SHARED_LIB "Build libserene as a shared library" ON)
|
||||
|
@ -242,6 +243,8 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
|
|||
# The compiled library code is here
|
||||
add_subdirectory(libserene)
|
||||
|
||||
add_subdirectory(devtools)
|
||||
|
||||
|
||||
if (SERENE_ENABLE_DOCS)
|
||||
add_subdirectory(docs)
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
include "mlir/IR/OpBase.td"
|
||||
include "mlir/IR/OpAsmInterface.td"
|
||||
include "mlir/IR/SymbolInterfaces.td"
|
||||
include "mlir/IR/AttrTypeBase.td"
|
||||
include "mlir/Interfaces/SideEffectInterfaces.td"
|
||||
include "mlir/Interfaces/CallInterfaces.td"
|
||||
include "mlir/Interfaces/CastInterfaces.td"
|
||||
|
@ -22,7 +23,12 @@ def Serene_Dialect : Dialect {
|
|||
This dialect tries to map the special forms of a lisp into
|
||||
IR level operations.
|
||||
}];
|
||||
|
||||
// All the types have to define a mnemonic
|
||||
let useDefaultTypePrinterParser = 1;
|
||||
|
||||
// All the attributes have to define a mnemonic
|
||||
let useDefaultAttributePrinterParser = 1;
|
||||
}
|
||||
|
||||
// Base class for Serene dialect operations. This operation inherits from the base
|
||||
|
@ -33,7 +39,7 @@ def Serene_Dialect : Dialect {
|
|||
class Serene_Op<string mnemonic, list<Trait> traits = []> :
|
||||
Op<Serene_Dialect, mnemonic, traits>;
|
||||
|
||||
|
||||
// TODO: break up the types into their own file
|
||||
// All of the types will extend this class.
|
||||
class Serene_Type<string name> : TypeDef<Serene_Dialect, name> { }
|
||||
|
||||
|
@ -52,8 +58,6 @@ def SereneSymbol : Serene_Type<"Symbol"> {
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
def ValueOp: Serene_Op<"value"> {
|
||||
|
||||
let summary = "This operation represent a value";
|
||||
|
|
Loading…
Reference in New Issue