Skip to content

Commit

Permalink
cg: Add DisableTailCalls, NoAlias, NoCommon, NoDebug, NoDuplicate and…
Browse files Browse the repository at this point in the history
… Convergent attributes.
  • Loading branch information
xlauko authored and Jezurko committed Nov 4, 2024
1 parent 955d6c6 commit 4bae47d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
9 changes: 8 additions & 1 deletion include/vast/CodeGen/DefaultAttrVisitor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ namespace vast::cg {
mlir_attr VisitAlignedAttr(const clang::AlignedAttr *attr);
mlir_attr VisitAlwaysInlineAttr(const clang::AlwaysInlineAttr *attr);
mlir_attr VisitArtificialAttr(const clang::ArtificialAttr *attr);
mlir_attr VisitNoInlineAttr(const clang::NoInlineAttr *attr);
mlir_attr VisitLoaderUninitializedAttr(const clang::LoaderUninitializedAttr *attr);
mlir_attr VisitNoInstrumentFunctionAttr(const clang::NoInstrumentFunctionAttr *attr);
mlir_attr VisitPackedAttr(const clang::PackedAttr *attr);
Expand Down Expand Up @@ -66,6 +65,14 @@ namespace vast::cg {
mlir_attr VisitUnavailableAttr(const clang::UnavailableAttr *attr);
mlir_attr VisitDiagnoseIfAttr(const clang::DiagnoseIfAttr *attr);
mlir_attr VisitReturnsTwiceAttr(const clang::ReturnsTwiceAttr *attr);
mlir_attr VisitDisableTailCallsAttr(const clang::DisableTailCallsAttr *attr);
mlir_attr VisitNoAliasAttr(const clang::NoAliasAttr *attr);
mlir_attr VisitNoCommonAttr(const clang::NoCommonAttr *attr);
mlir_attr VisitNoDebugAttr(const clang::NoDebugAttr *attr);
mlir_attr VisitStandaloneDebugAttr(const clang::StandaloneDebugAttr *attr);
mlir_attr VisitNoDuplicateAttr(const clang::NoDuplicateAttr *attr);
mlir_attr VisitConvergentAttr(const clang::ConvergentAttr *attr);
mlir_attr VisitNoInlineAttr(const clang::NoInlineAttr *attr);
mlir_attr VisitMayAliasAttr(const clang::MayAliasAttr *attr);
mlir_attr VisitUnusedAttr(const clang::UnusedAttr *attr);
mlir_attr VisitUsedAttr(const clang::UsedAttr *attr);
Expand Down
9 changes: 8 additions & 1 deletion include/vast/Dialect/HighLevel/HighLevelAttributes.td
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ def HighLevel_CleanupAttr : HighLevel_SymbolReferringAttr< "Cleanup", "
def HighLevel_AlignedAttr : HighLevel_Attr< "Aligned", "aligned" >;
def HighLevel_AlwaysInlineAttr : HighLevel_Attr< "AlwaysInline", "always_inline" >;
def HighLevel_ArtificialAttr : HighLevel_Attr< "Artificial", "artificial" >;
def HighLevel_NoInlineAttr : HighLevel_Attr< "NoInline", "noinline" >;
def HighLevel_ConstAttr : HighLevel_Attr< "Const", "const" >;
def HighLevel_LoaderUninitAttr : HighLevel_Attr< "LoaderUninitialized", "loader_uninitialized" >;
def HighLevel_NoInstrumentAttr : HighLevel_Attr< "NoInstrumentFunction", "no_instrument_function" >;
Expand Down Expand Up @@ -122,6 +121,14 @@ def HighLevel_UnavailableAttr : HighLevel_NameAttr< "Unavailable", "unavail
// FIXME: this is just a stub
def HighLevel_DiagnoseIfAttr : HighLevel_Attr< "DiagnoseIf", "diagnose_if" >;
def HighLevel_ReturnsTwiceAttr : HighLevel_Attr< "ReturnsTwice", "returns_twice" >;
def HighLevel_DisableTailCallsAttr : HighLevel_Attr< "DisableTailCalls", "disable_tail_calls" >;
def HighLevel_NoAliasAttr : HighLevel_Attr< "NoAlias", "noalias" >;
def HighLevel_NoCommonAttr : HighLevel_Attr< "NoCommon", "nocommon" >;
def HighLevel_NoDebugAttr : HighLevel_Attr< "NoDebug", "nodebug" >;
def HighLevel_StandaloneDebug : HighLevel_Attr< "StandaloneDebug", "standalone_debug" >;
def HighLevel_NoDuplicateAttr : HighLevel_Attr< "NoDuplicate", "noduplicate" >;
def HighLevel_ConvergentAttr : HighLevel_Attr< "Convergent", "convergent" >;
def HighLevel_NoInlineAttr : HighLevel_Attr< "NoInline", "noinline" >;
def HighLevel_MayAliasAttr : HighLevel_Attr< "MayAlias", "may_alias" >;
def HighLevel_UnusedAttr : HighLevel_Attr< "Unused", "unused" >;
def HighLevel_UsedAttr : HighLevel_Attr< "Used", "used" >;
Expand Down
4 changes: 0 additions & 4 deletions lib/vast/CodeGen/DefaultAttrVisitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@ namespace vast::cg
return make< hl::ArtificialAttr >();
}

mlir_attr default_attr_visitor::VisitNoInlineAttr(const clang::NoInlineAttr *attr) {
return make< hl::NoInlineAttr >();
}

mlir_attr default_attr_visitor::VisitLoaderUninitializedAttr(const clang::LoaderUninitializedAttr *) {
return make< hl::LoaderUninitializedAttr >();
}
Expand Down

0 comments on commit 4bae47d

Please sign in to comment.