Skip to content

Commit 28f1665

Browse files
committed
merge main into amd-staging
2 parents ed6cc9a + e5bbaa9 commit 28f1665

File tree

127 files changed

+2532
-1154
lines changed

Some content is hidden

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

127 files changed

+2532
-1154
lines changed

clang/cmake/modules/ClangConfig.cmake.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ set(CLANG_EXPORTED_TARGETS "@CLANG_EXPORTS@")
1010
set(CLANG_CMAKE_DIR "@CLANG_CONFIG_CMAKE_DIR@")
1111
set(CLANG_INCLUDE_DIRS "@CLANG_CONFIG_INCLUDE_DIRS@")
1212
set(CLANG_LINK_CLANG_DYLIB "@CLANG_LINK_CLANG_DYLIB@")
13+
set(CLANG_DEFAULT_LINKER "@CLANG_DEFAULT_LINKER@")
1314

1415
# Provide all our library targets to users.
1516
@CLANG_CONFIG_INCLUDE_EXPORTS@

clang/include/clang/Basic/CodeGenOptions.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,6 @@ CODEGENOPT(TimeTrace , 1, 0, Benign) ///< Set when -ftime-trace is enabl
322322
VALUE_CODEGENOPT(TimeTraceGranularity, 32, 500, Benign) ///< Minimum time granularity (in microseconds),
323323
///< traced by time profiler
324324
CODEGENOPT(InterchangeLoops , 1, 0, Benign) ///< Run loop-interchange.
325-
CODEGENOPT(FuseLoops , 1, 0, Benign) ///< Run loop-fusion.
326325
CODEGENOPT(UnrollLoops , 1, 0, Benign) ///< Control whether loops are unrolled.
327326
CODEGENOPT(RerollLoops , 1, 0, Benign) ///< Control whether loops are rerolled.
328327
CODEGENOPT(NoUseJumpTables , 1, 0, Benign) ///< Set when -fno-jump-tables is enabled.

clang/include/clang/Driver/Options.td

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4439,10 +4439,6 @@ def floop_interchange : Flag<["-"], "floop-interchange">, Group<f_Group>,
44394439
HelpText<"Enable the loop interchange pass">, Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>;
44404440
def fno_loop_interchange: Flag<["-"], "fno-loop-interchange">, Group<f_Group>,
44414441
HelpText<"Disable the loop interchange pass">, Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>;
4442-
defm experimental_loop_fusion
4443-
: OptInCC1FFlag<"experimental-loop-fusion", "Enable", "Disable",
4444-
"Enable the loop fusion pass",
4445-
[ClangOption, FlangOption, FC1Option]>;
44464442
def funroll_loops : Flag<["-"], "funroll-loops">, Group<f_Group>,
44474443
HelpText<"Turn on loop unroller">, Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>;
44484444
def fno_unroll_loops : Flag<["-"], "fno-unroll-loops">, Group<f_Group>,

clang/include/clang/Sema/Sema.h

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2819,34 +2819,35 @@ class Sema final : public SemaBase {
28192819

28202820
/// BuiltinConstantArg - Handle a check if argument ArgNum of CallExpr
28212821
/// TheCall is a constant expression.
2822-
bool BuiltinConstantArg(CallExpr *TheCall, int ArgNum, llvm::APSInt &Result);
2822+
bool BuiltinConstantArg(CallExpr *TheCall, unsigned ArgNum,
2823+
llvm::APSInt &Result);
28232824

28242825
/// BuiltinConstantArgRange - Handle a check if argument ArgNum of CallExpr
28252826
/// TheCall is a constant expression in the range [Low, High].
2826-
bool BuiltinConstantArgRange(CallExpr *TheCall, int ArgNum, int Low, int High,
2827-
bool RangeIsError = true);
2827+
bool BuiltinConstantArgRange(CallExpr *TheCall, unsigned ArgNum, int Low,
2828+
int High, bool RangeIsError = true);
28282829

28292830
/// BuiltinConstantArgMultiple - Handle a check if argument ArgNum of CallExpr
28302831
/// TheCall is a constant expression is a multiple of Num..
2831-
bool BuiltinConstantArgMultiple(CallExpr *TheCall, int ArgNum,
2832+
bool BuiltinConstantArgMultiple(CallExpr *TheCall, unsigned ArgNum,
28322833
unsigned Multiple);
28332834

28342835
/// BuiltinConstantArgPower2 - Check if argument ArgNum of TheCall is a
28352836
/// constant expression representing a power of 2.
2836-
bool BuiltinConstantArgPower2(CallExpr *TheCall, int ArgNum);
2837+
bool BuiltinConstantArgPower2(CallExpr *TheCall, unsigned ArgNum);
28372838

28382839
/// BuiltinConstantArgShiftedByte - Check if argument ArgNum of TheCall is
28392840
/// a constant expression representing an arbitrary byte value shifted left by
28402841
/// a multiple of 8 bits.
2841-
bool BuiltinConstantArgShiftedByte(CallExpr *TheCall, int ArgNum,
2842+
bool BuiltinConstantArgShiftedByte(CallExpr *TheCall, unsigned ArgNum,
28422843
unsigned ArgBits);
28432844

28442845
/// BuiltinConstantArgShiftedByteOr0xFF - Check if argument ArgNum of
28452846
/// TheCall is a constant expression representing either a shifted byte value,
28462847
/// or a value of the form 0x??FF (i.e. a member of the arithmetic progression
28472848
/// 0x00FF, 0x01FF, ..., 0xFFFF). This strange range check is needed for some
28482849
/// Arm MVE intrinsics.
2849-
bool BuiltinConstantArgShiftedByteOrXXFF(CallExpr *TheCall, int ArgNum,
2850+
bool BuiltinConstantArgShiftedByteOrXXFF(CallExpr *TheCall, unsigned ArgNum,
28502851
unsigned ArgBits);
28512852

28522853
/// Checks that a call expression's argument count is at least the desired

clang/lib/AST/ByteCode/Compiler.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2429,7 +2429,7 @@ bool Compiler<Emitter>::VisitArrayInitLoopExpr(const ArrayInitLoopExpr *E) {
24292429
// and the RHS is our SubExpr.
24302430
for (size_t I = 0; I != Size; ++I) {
24312431
ArrayIndexScope<Emitter> IndexScope(this, I);
2432-
BlockScope<Emitter> BS(this);
2432+
LocalScope<Emitter> BS(this);
24332433

24342434
if (!this->visitArrayElemInit(I, SubExpr, SubExprT))
24352435
return false;
@@ -4140,7 +4140,7 @@ bool Compiler<Emitter>::VisitCXXStdInitializerListExpr(
41404140

41414141
template <class Emitter>
41424142
bool Compiler<Emitter>::VisitStmtExpr(const StmtExpr *E) {
4143-
BlockScope<Emitter> BS(this);
4143+
LocalScope<Emitter> BS(this);
41444144
StmtExprScope<Emitter> SS(this);
41454145

41464146
const CompoundStmt *CS = E->getSubStmt();
@@ -5111,7 +5111,7 @@ bool Compiler<Emitter>::VisitCallExpr(const CallExpr *E) {
51115111
}
51125112
}
51135113

5114-
BlockScope<Emitter> CallScope(this, ScopeKind::Call);
5114+
LocalScope<Emitter> CallScope(this, ScopeKind::Call);
51155115

51165116
QualType ReturnType = E->getCallReturnType(Ctx.getASTContext());
51175117
OptPrimType T = classify(ReturnType);
@@ -5475,7 +5475,7 @@ template <class Emitter> bool Compiler<Emitter>::visitStmt(const Stmt *S) {
54755475

54765476
template <class Emitter>
54775477
bool Compiler<Emitter>::visitCompoundStmt(const CompoundStmt *S) {
5478-
BlockScope<Emitter> Scope(this);
5478+
LocalScope<Emitter> Scope(this);
54795479
for (const auto *InnerStmt : S->body())
54805480
if (!visitStmt(InnerStmt))
54815481
return false;
@@ -6211,7 +6211,7 @@ bool Compiler<Emitter>::compileConstructor(const CXXConstructorDecl *Ctor) {
62116211
InitLinkScope<Emitter> InitScope(this, InitLink::This());
62126212
for (const auto *Init : Ctor->inits()) {
62136213
// Scope needed for the initializers.
6214-
BlockScope<Emitter> Scope(this);
6214+
LocalScope<Emitter> Scope(this);
62156215

62166216
const Expr *InitExpr = Init->getInit();
62176217
if (const FieldDecl *Member = Init->getMember()) {

clang/lib/AST/ByteCode/Compiler.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -624,14 +624,6 @@ template <class Emitter> class LocalScope : public VariableScope<Emitter> {
624624
UnsignedOrNone Idx = std::nullopt;
625625
};
626626

627-
/// Scope for storage declared in a compound statement.
628-
// FIXME: Remove?
629-
template <class Emitter> class BlockScope final : public LocalScope<Emitter> {
630-
public:
631-
BlockScope(Compiler<Emitter> *Ctx, ScopeKind Kind = ScopeKind::Block)
632-
: LocalScope<Emitter>(Ctx, Kind) {}
633-
};
634-
635627
template <class Emitter> class ArrayIndexScope final {
636628
public:
637629
ArrayIndexScope(Compiler<Emitter> *Ctx, uint64_t Index) : Ctx(Ctx) {

clang/lib/CodeGen/BackendUtil.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,6 @@ void EmitAssemblyHelper::RunOptimizationPipeline(
896896
PipelineTuningOptions PTO;
897897
PTO.LoopUnrolling = CodeGenOpts.UnrollLoops;
898898
PTO.LoopInterchange = CodeGenOpts.InterchangeLoops;
899-
PTO.LoopFusion = CodeGenOpts.FuseLoops;
900899
// For historical reasons, loop interleaving is set to mirror setting for loop
901900
// unrolling.
902901
PTO.LoopInterleaving = CodeGenOpts.UnrollLoops;
@@ -1332,7 +1331,6 @@ runThinLTOBackend(CompilerInstance &CI, ModuleSummaryIndex *CombinedIndex,
13321331
Conf.SampleProfile = std::move(SampleProfile);
13331332
Conf.PTO.LoopUnrolling = CGOpts.UnrollLoops;
13341333
Conf.PTO.LoopInterchange = CGOpts.InterchangeLoops;
1335-
Conf.PTO.LoopFusion = CGOpts.FuseLoops;
13361334
// For historical reasons, loop interleaving is set to mirror setting for loop
13371335
// unrolling.
13381336
Conf.PTO.LoopInterleaving = CGOpts.UnrollLoops;

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7032,8 +7032,6 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
70327032
options::OPT_fno_unroll_loops);
70337033
Args.AddLastArg(CmdArgs, options::OPT_floop_interchange,
70347034
options::OPT_fno_loop_interchange);
7035-
Args.addOptInFlag(CmdArgs, options::OPT_fexperimental_loop_fusion,
7036-
options::OPT_fno_experimental_loop_fusion);
70377035

70387036
Args.AddLastArg(CmdArgs, options::OPT_fstrict_flex_arrays_EQ);
70397037

clang/lib/Driver/ToolChains/Flang.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,6 @@ void Flang::addCodegenOptions(const ArgList &Args,
163163
!stackArrays->getOption().matches(options::OPT_fno_stack_arrays))
164164
CmdArgs.push_back("-fstack-arrays");
165165

166-
Args.addOptInFlag(CmdArgs, options::OPT_fexperimental_loop_fusion,
167-
options::OPT_fno_experimental_loop_fusion);
168-
169166
handleInterchangeLoopsArgs(Args, CmdArgs);
170167
handleVectorizeLoopsArgs(Args, CmdArgs);
171168
handleVectorizeSLPArgs(Args, CmdArgs);

clang/lib/Frontend/CompilerInvocation.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1688,9 +1688,6 @@ void CompilerInvocationBase::GenerateCodeGenArgs(const CodeGenOptions &Opts,
16881688
else
16891689
GenerateArg(Consumer, OPT_fno_loop_interchange);
16901690

1691-
if (Opts.FuseLoops)
1692-
GenerateArg(Consumer, OPT_fexperimental_loop_fusion);
1693-
16941691
if (!Opts.BinutilsVersion.empty())
16951692
GenerateArg(Consumer, OPT_fbinutils_version_EQ, Opts.BinutilsVersion);
16961693

@@ -2012,8 +2009,6 @@ bool CompilerInvocation::ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args,
20122009
(Opts.OptimizationLevel > 1));
20132010
Opts.InterchangeLoops =
20142011
Args.hasFlag(OPT_floop_interchange, OPT_fno_loop_interchange, false);
2015-
Opts.FuseLoops = Args.hasFlag(OPT_fexperimental_loop_fusion,
2016-
OPT_fno_experimental_loop_fusion, false);
20172012
Opts.BinutilsVersion =
20182013
std::string(Args.getLastArgValue(OPT_fbinutils_version_EQ));
20192014

0 commit comments

Comments
 (0)