Skip to content

Commit ab61775

Browse files
authored
Merge branch 'amd-staging' into amd/dev/rlieberm/FortranDrop002
2 parents 492886b + 5284972 commit ab61775

File tree

281 files changed

+5404
-2305
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

281 files changed

+5404
-2305
lines changed

amd/comgr/test-lit/comgr-sources/spirv-translator.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ int main(int argc, char *argv[]) {
1313
amd_comgr_data_t DataSpirv;
1414
amd_comgr_data_set_t DataSetSpirv, DataSetBc;
1515
amd_comgr_action_info_t DataAction;
16-
amd_comgr_status_t Status;
1716
size_t Count;
1817

1918
if (argc != 4) {

bolt/include/bolt/Core/BinaryContext.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1363,6 +1363,12 @@ class BinaryContext {
13631363
if (std::optional<uint32_t> Size = MIB->getSize(Inst))
13641364
return *Size;
13651365

1366+
if (MIB->isPseudo(Inst))
1367+
return 0;
1368+
1369+
if (std::optional<uint32_t> Size = MIB->getInstructionSize(Inst))
1370+
return *Size;
1371+
13661372
if (!Emitter)
13671373
Emitter = this->MCE.get();
13681374
SmallString<256> Code;

bolt/include/bolt/Core/MCPlusBuilder.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1204,6 +1204,11 @@ class MCPlusBuilder {
12041204
/// Get instruction size specified via annotation.
12051205
std::optional<uint32_t> getSize(const MCInst &Inst) const;
12061206

1207+
/// Get target-specific instruction size.
1208+
virtual std::optional<uint32_t> getInstructionSize(const MCInst &Inst) const {
1209+
return std::nullopt;
1210+
}
1211+
12071212
/// Set instruction size.
12081213
void setSize(MCInst &Inst, uint32_t Size) const;
12091214

bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1792,6 +1792,11 @@ class AArch64MCPlusBuilder : public MCPlusBuilder {
17921792
}
17931793

17941794
uint16_t getMinFunctionAlignment() const override { return 4; }
1795+
1796+
std::optional<uint32_t>
1797+
getInstructionSize(const MCInst &Inst) const override {
1798+
return 4;
1799+
}
17951800
};
17961801

17971802
} // end anonymous namespace

clang/docs/ReleaseNotes.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -817,6 +817,7 @@ Improvements to Clang's diagnostics
817817
scope.Unlock();
818818
require(scope); // Warning! Requires mu1.
819819
}
820+
- Diagnose invalid declarators in the declaration of constructors and destructors (#GH121706).
820821

821822
Improvements to Clang's time-trace
822823
----------------------------------

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2204,6 +2204,8 @@ def err_invalid_qualified_constructor : Error<
22042204
"'%0' qualifier is not allowed on a constructor">;
22052205
def err_ref_qualifier_constructor : Error<
22062206
"ref-qualifier '%select{&&|&}0' is not allowed on a constructor">;
2207+
def err_invalid_ctor_dtor_decl : Error<
2208+
"invalid %select{constructor|destructor}0 declaration">;
22072209

22082210
def err_constructor_return_type : Error<
22092211
"constructor cannot have a return type">;

clang/include/clang/Driver/Options.td

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6805,6 +6805,7 @@ def fbinutils_version_EQ : Joined<["-"], "fbinutils-version=">,
68056805
def fuse_ld_EQ : Joined<["-"], "fuse-ld=">, Group<f_Group>,
68066806
Flags<[LinkOption]>, Visibility<[ClangOption, FlangOption, CLOption]>;
68076807
def ld_path_EQ : Joined<["--"], "ld-path=">, Group<Link_Group>;
6808+
def fuse_lipo_EQ : Joined<["-"], "fuse-lipo=">, Group<f_clang_Group>, Flags<[LinkOption]>;
68086809

68096810
defm align_labels : BooleanFFlag<"align-labels">, Group<clang_ignored_gcc_optimization_f_Group>;
68106811
def falign_labels_EQ : Joined<["-"], "falign-labels=">, Group<clang_ignored_gcc_optimization_f_Group>;

clang/lib/CodeGen/CGExpr.cpp

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3607,18 +3607,15 @@ void CodeGenFunction::EmitCheck(
36073607
llvm::Value *RecoverableCond = nullptr;
36083608
llvm::Value *TrapCond = nullptr;
36093609
bool NoMerge = false;
3610-
for (int i = 0, n = Checked.size(); i < n; ++i) {
3611-
llvm::Value *Check = Checked[i].first;
3610+
for (auto &[Check, Ord] : Checked) {
36123611
// -fsanitize-trap= overrides -fsanitize-recover=.
3613-
llvm::Value *&Cond =
3614-
CGM.getCodeGenOpts().SanitizeTrap.has(Checked[i].second)
3615-
? TrapCond
3616-
: CGM.getCodeGenOpts().SanitizeRecover.has(Checked[i].second)
3617-
? RecoverableCond
3618-
: FatalCond;
3612+
llvm::Value *&Cond = CGM.getCodeGenOpts().SanitizeTrap.has(Ord) ? TrapCond
3613+
: CGM.getCodeGenOpts().SanitizeRecover.has(Ord)
3614+
? RecoverableCond
3615+
: FatalCond;
36193616
Cond = Cond ? Builder.CreateAnd(Cond, Check) : Check;
36203617

3621-
if (!CGM.getCodeGenOpts().SanitizeMergeHandlers.has(Checked[i].second))
3618+
if (!CGM.getCodeGenOpts().SanitizeMergeHandlers.has(Ord))
36223619
NoMerge = true;
36233620
}
36243621

clang/lib/Driver/ToolChains/Arch/ARM.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -659,13 +659,21 @@ llvm::ARM::FPUKind arm::getARMTargetFeatures(const Driver &D,
659659
CPUArgFPUKind != llvm::ARM::FK_INVALID ? CPUArgFPUKind : ArchArgFPUKind;
660660
(void)llvm::ARM::getFPUFeatures(FPUKind, Features);
661661
} else {
662+
bool Generic = true;
662663
if (!ForAS) {
663664
std::string CPU = arm::getARMTargetCPU(CPUName, ArchName, Triple);
665+
if (CPU != "generic")
666+
Generic = false;
664667
llvm::ARM::ArchKind ArchKind =
665668
arm::getLLVMArchKindForARM(CPU, ArchName, Triple);
666669
FPUKind = llvm::ARM::getDefaultFPU(CPU, ArchKind);
667670
(void)llvm::ARM::getFPUFeatures(FPUKind, Features);
668671
}
672+
if (Generic && (Triple.isOSWindows() || Triple.isOSDarwin()) &&
673+
getARMSubArchVersionNumber(Triple) >= 7) {
674+
FPUKind = llvm::ARM::parseFPU("neon");
675+
(void)llvm::ARM::getFPUFeatures(FPUKind, Features);
676+
}
669677
}
670678

671679
// Now we've finished accumulating features from arch, cpu and fpu,

clang/lib/Driver/ToolChains/Darwin.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,9 @@ void darwin::Lipo::ConstructJob(Compilation &C, const JobAction &JA,
910910
CmdArgs.push_back(II.getFilename());
911911
}
912912

913-
const char *Exec = Args.MakeArgString(getToolChain().GetProgramPath("lipo"));
913+
StringRef LipoName = Args.getLastArgValue(options::OPT_fuse_lipo_EQ, "lipo");
914+
const char *Exec =
915+
Args.MakeArgString(getToolChain().GetProgramPath(LipoName.data()));
914916
C.addCommand(std::make_unique<Command>(JA, *this, ResponseFileSupport::None(),
915917
Exec, CmdArgs, Inputs, Output));
916918
}

0 commit comments

Comments
 (0)