Skip to content

Commit

Permalink
Minor edits after rebasing
Browse files Browse the repository at this point in the history
upstream git tag 2403398
  • Loading branch information
dikang committed Nov 3, 2023
1 parent 2403398 commit 90b9233
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 30 deletions.
9 changes: 6 additions & 3 deletions clang/include/clang/Driver/Options.td
Original file line number Diff line number Diff line change
Expand Up @@ -3258,14 +3258,17 @@ def fomit_frame_pointer : Flag<["-"], "fomit-frame-pointer">, Group<f_Group>,
"Some stack unwinding cases, such as profilers and sanitizers, may prefer specifying -fno-omit-frame-pointer. "
"On many targets, -O1 and higher omit the frame pointer by default. "
"-m[no-]omit-leaf-frame-pointer takes precedence for leaf functions">;
def fft : Flag<["-"], "fft">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused]>,
def fft : Flag<["-"], "fft">, Group<f_Group>, Flags<[NoArgumentUnused]>,
Visibility<[ClangOption, CC1Option]>,
HelpText<"Parse FT pragmas and generate fault tolerant code.">;
def fno_ft : Flag<["-"], "fno-ft">, Group<f_Group>, Flags<[NoArgumentUnused]>;
def fft_debug_mode : Flag<["-"], "fft-debug-mode">, Group<f_Group>,
Flags<[CC1Option, NoArgumentUnused]>,
Flags<[NoArgumentUnused]>,
Visibility<[ClangOption, CC1Option]>,
HelpText<"Display debug meesage of FT pragmas.">;
def fft_nodebug_mode : Flag<["-"], "fft-nodebug-mode">, Group<f_Group>,
Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
Flags<[NoArgumentUnused, HelpHidden]>,
Visibility<[ClangOption, CC1Option]>;
def fopenmp : Flag<["-"], "fopenmp">, Group<f_Group>,
Flags<[NoArgumentUnused]>,
Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>,
Expand Down
4 changes: 2 additions & 2 deletions clang/lib/Frontend/CompilerInvocation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3490,10 +3490,10 @@ void CompilerInvocationBase::GenerateLangArgs(const LangOptions &Opts,

// FT was requested via '-fft'
if (Opts.FT) {
GenerateArg(Args, OPT_fft, SA);
GenerateArg(Consumer, OPT_fft);
}
if (Opts.FTDebugMode) {
GenerateArg(Args, OPT_fft_debug_mode, SA);
GenerateArg(Consumer, OPT_fft_debug_mode);
}

// OpenMP was requested via '-fopenmp', not implied by '-fopenmp-simd' or
Expand Down
13 changes: 0 additions & 13 deletions clang/tools/libclang/CIndex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2261,7 +2261,6 @@ class EnqueueVisitor : public ConstStmtVisitor<EnqueueVisitor, void>,
void EnqueueChildren(const OMPClause *S);
void EnqueueChildren(const FTClause *S);
void EnqueueChildren(const AnnotateAttr *A);
void EnqueueChildren(const FTClause *S);
};
} // namespace

Expand Down Expand Up @@ -2825,18 +2824,6 @@ void EnqueueVisitor::EnqueueChildren(const AnnotateAttr *A) {
std::reverse(I, E);
}

void EnqueueVisitor::EnqueueChildren(const FTClause *S) {
unsigned size = WL.size();
FTClauseEnqueue Visitor(this);
Visitor.Visit(S);
if (size == WL.size())
return;
// Now reverse the entries we just added. This will match the DFS
// ordering performed by the worklist.
VisitorWorkList::iterator I = WL.begin() + size, E = WL.end();
std::reverse(I, E);
}

void EnqueueVisitor::VisitAddrLabelExpr(const AddrLabelExpr *E) {
WL.push_back(LabelRefVisit(E->getLabel(), E->getLabelLoc(), Parent));
}
Expand Down
21 changes: 10 additions & 11 deletions llvm/include/llvm/Frontend/FT/FTKinds.def
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,29 @@
#endif

#define __FT_TYPE(VarName) FT_TYPE(VarName, Type::get##VarName##Ty(Ctx))
#define __FT_PTR_TYPE(VarName) FT_TYPE(VarName, PointerType::get(Ctx, 0))

__FT_TYPE(Void)
__FT_TYPE(Int1)
__FT_TYPE(Int8)
__FT_TYPE(Int16)
__FT_TYPE(Int32)
__FT_TYPE(Int64)
__FT_TYPE(Int8Ptr)
__FT_TYPE(Int16Ptr)
__FT_TYPE(Int32Ptr)
__FT_TYPE(Int64Ptr)
__FT_PTR_TYPE(Int8Ptr)
__FT_PTR_TYPE(Int16Ptr)
__FT_PTR_TYPE(Int32Ptr)
__FT_PTR_TYPE(Int64Ptr)
__FT_TYPE(Double)

FT_TYPE(SizeTy, M.getDataLayout().getIntPtrType(Ctx))
FT_TYPE(Int63, Type::getIntNTy(Ctx, 63))

#define __FT_PTR_TYPE(NAME, BASE) FT_TYPE(NAME, BASE->getPointerTo())
__FT_PTR_TYPE(VoidPtr)
__FT_PTR_TYPE(VoidPtrPtr)
__FT_PTR_TYPE(VoidPtrPtrPtr)

__FT_PTR_TYPE(VoidPtr, Int8)
__FT_PTR_TYPE(VoidPtrPtr, VoidPtr)
__FT_PTR_TYPE(VoidPtrPtrPtr, VoidPtrPtr)

__FT_PTR_TYPE(Int8PtrPtr, Int8Ptr)
__FT_PTR_TYPE(Int8PtrPtrPtr, Int8PtrPtr)
__FT_PTR_TYPE(Int8PtrPtr)
__FT_PTR_TYPE(Int8PtrPtrPtr)

#undef __FT_PTR_TYPE

Expand Down
1 change: 0 additions & 1 deletion llvm/lib/Frontend/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ add_subdirectory(OpenACC)
add_subdirectory(OpenMP)
add_subdirectory(FT)
add_subdirectory(Offloading)
add_subdirectory(FT)

0 comments on commit 90b9233

Please sign in to comment.