Skip to content

Commit

Permalink
Merge from 'main' to 'sycl-web'
Browse files Browse the repository at this point in the history
  • Loading branch information
iclsrc committed Dec 24, 2024
2 parents 3534bc4 + 93d4b1f commit 49fd7d4
Show file tree
Hide file tree
Showing 131 changed files with 6,477 additions and 842 deletions.
10 changes: 8 additions & 2 deletions clang/include/clang/Basic/BuiltinsHexagon.def
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@
# define TARGET_BUILTIN(ID, TYPE, ATTRS, FEATURE) BUILTIN(ID, TYPE, ATTRS)
#endif

#pragma push_macro("V79")
#define V79 "v79"
#pragma push_macro("V75")
#define V75 "v75"
#define V75 "v75|" V79
#pragma push_macro("V73")
#define V73 "v73|" V75
#pragma push_macro("V71")
Expand All @@ -42,8 +44,10 @@
#pragma push_macro("V5")
#define V5 "v5|" V55

#pragma push_macro("HVXV79")
#define HVXV79 "hvxv79"
#pragma push_macro("HVXV75")
#define HVXV75 "hvxv75"
#define HVXV75 "hvxv75|" HVXV79
#pragma push_macro("HVXV73")
#define HVXV73 "hvxv73|" HVXV75
#pragma push_macro("HVXV71")
Expand Down Expand Up @@ -148,6 +152,7 @@ TARGET_BUILTIN(__builtin_HEXAGON_V6_vrmpyub_rtt_acc_128B,"V64iV64iV32iLLi","", "
#pragma pop_macro("HVXV71")
#pragma pop_macro("HVXV73")
#pragma pop_macro("HVXV75")
#pragma pop_macro("HVXV79")

#pragma pop_macro("V5")
#pragma pop_macro("V55")
Expand All @@ -161,6 +166,7 @@ TARGET_BUILTIN(__builtin_HEXAGON_V6_vrmpyub_rtt_acc_128B,"V64iV64iV32iLLi","", "
#pragma pop_macro("V71")
#pragma pop_macro("V73")
#pragma pop_macro("V75")
#pragma pop_macro("V79")

#undef BUILTIN
#undef TARGET_BUILTIN
Expand Down
2 changes: 2 additions & 0 deletions clang/include/clang/Driver/Options.td
Original file line number Diff line number Diff line change
Expand Up @@ -6329,6 +6329,8 @@ def mv73 : Flag<["-"], "mv73">, Group<m_hexagon_Features_Group>,
Alias<mcpu_EQ>, AliasArgs<["hexagonv73"]>;
def mv75 : Flag<["-"], "mv75">, Group<m_hexagon_Features_Group>,
Alias<mcpu_EQ>, AliasArgs<["hexagonv75"]>;
def mv79 : Flag<["-"], "mv79">, Group<m_hexagon_Features_Group>,
Alias<mcpu_EQ>, AliasArgs<["hexagonv79"]>;
def mhexagon_hvx : Flag<["-"], "mhvx">, Group<m_hexagon_Features_HVX_Group>,
HelpText<"Enable Hexagon Vector eXtensions">;
def mhexagon_hvx_EQ : Joined<["-"], "mhvx=">,
Expand Down
4 changes: 4 additions & 0 deletions clang/lib/Basic/Targets/Hexagon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ void HexagonTargetInfo::getTargetDefines(const LangOptions &Opts,
} else if (CPU == "hexagonv75") {
Builder.defineMacro("__HEXAGON_V75__");
Builder.defineMacro("__HEXAGON_ARCH__", "75");
} else if (CPU == "hexagonv79") {
Builder.defineMacro("__HEXAGON_V79__");
Builder.defineMacro("__HEXAGON_ARCH__", "79");
}

if (hasFeature("hvx-length64b")) {
Expand Down Expand Up @@ -239,6 +242,7 @@ static constexpr CPUSuffix Suffixes[] = {
{{"hexagonv68"}, {"68"}}, {{"hexagonv69"}, {"69"}},
{{"hexagonv71"}, {"71"}}, {{"hexagonv71t"}, {"71t"}},
{{"hexagonv73"}, {"73"}}, {{"hexagonv75"}, {"75"}},
{{"hexagonv79"}, {"79"}},
};

std::optional<unsigned> HexagonTargetInfo::getHexagonCPURev(StringRef Name) {
Expand Down
4 changes: 3 additions & 1 deletion clang/lib/Basic/Targets/OSTargets.h
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,9 @@ template <typename Target>
class LLVM_LIBRARY_VISIBILITY UEFITargetInfo : public OSTargetInfo<Target> {
protected:
void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
MacroBuilder &Builder) const override {}
MacroBuilder &Builder) const override {
Builder.defineMacro("__UEFI__");
}

public:
UEFITargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
Expand Down
12 changes: 6 additions & 6 deletions clang/lib/Driver/ToolChains/CommonArgs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1567,8 +1567,6 @@ collectSanitizerRuntimes(const ToolChain &TC, const ArgList &Args,
StaticRuntimes.push_back("ubsan_minimal");
} else {
StaticRuntimes.push_back("ubsan_standalone");
if (SanArgs.linkCXXRuntimes())
StaticRuntimes.push_back("ubsan_standalone_cxx");
}
}
if (SanArgs.needsSafeStackRt()) {
Expand All @@ -1578,11 +1576,13 @@ collectSanitizerRuntimes(const ToolChain &TC, const ArgList &Args,
if (!(SanArgs.needsSharedRt() && SanArgs.needsUbsanRt())) {
if (SanArgs.needsCfiRt())
StaticRuntimes.push_back("cfi");
if (SanArgs.needsCfiDiagRt()) {
if (SanArgs.needsCfiDiagRt())
StaticRuntimes.push_back("cfi_diag");
if (SanArgs.linkCXXRuntimes())
StaticRuntimes.push_back("ubsan_standalone_cxx");
}
}
if (SanArgs.linkCXXRuntimes() && !SanArgs.requiresMinimalRuntime() &&
((!SanArgs.needsSharedRt() && SanArgs.needsUbsanRt()) ||
SanArgs.needsCfiDiagRt())) {
StaticRuntimes.push_back("ubsan_standalone_cxx");
}
if (SanArgs.needsStatsRt()) {
NonWholeStaticRuntimes.push_back("stats");
Expand Down
Loading

0 comments on commit 49fd7d4

Please sign in to comment.