Skip to content

Commit 5fa3897

Browse files
committed
merge main into amd-staging
2 parents 7264c98 + 64675cc commit 5fa3897

File tree

28 files changed

+424
-222
lines changed

28 files changed

+424
-222
lines changed

clang/include/clang/AST/DeclBase.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ class alignas(8) Decl {
492492
/// perform non-Decl specific checks based on the object's type and strict
493493
/// flex array level.
494494
static bool isFlexibleArrayMemberLike(
495-
ASTContext &Context, const Decl *D, QualType Ty,
495+
const ASTContext &Context, const Decl *D, QualType Ty,
496496
LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel,
497497
bool IgnoreTemplateOrMacroSubstitution);
498498

clang/include/clang/AST/Expr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ class Expr : public ValueStmt {
542542
/// When IgnoreTemplateOrMacroSubstitution is set, it doesn't consider sizes
543543
/// resulting from the substitution of a macro or a template as special sizes.
544544
bool isFlexibleArrayMemberLike(
545-
ASTContext &Context,
545+
const ASTContext &Context,
546546
LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel,
547547
bool IgnoreTemplateOrMacroSubstitution = false) const;
548548

clang/lib/AST/DeclBase.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ bool Decl::isFileContextDecl() const {
438438
}
439439

440440
bool Decl::isFlexibleArrayMemberLike(
441-
ASTContext &Ctx, const Decl *D, QualType Ty,
441+
const ASTContext &Ctx, const Decl *D, QualType Ty,
442442
LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel,
443443
bool IgnoreTemplateOrMacroSubstitution) {
444444
// For compatibility with existing code, we treat arrays of length 0 or

clang/lib/AST/Expr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ bool Expr::isKnownToHaveBooleanValue(bool Semantic) const {
203203
}
204204

205205
bool Expr::isFlexibleArrayMemberLike(
206-
ASTContext &Ctx,
206+
const ASTContext &Ctx,
207207
LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel,
208208
bool IgnoreTemplateOrMacroSubstitution) const {
209209
const Expr *E = IgnoreParens();

flang/include/flang/Lower/AbstractConverter.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,8 @@ class AbstractConverter {
314314
mangleName(const Fortran::semantics::DerivedTypeSpec &) = 0;
315315
/// Unique a compiler generated name (add a containing scope specific prefix)
316316
virtual std::string mangleName(std::string &) = 0;
317+
/// Unique a compiler generated name (add a provided scope specific prefix)
318+
virtual std::string mangleName(std::string &, const semantics::Scope &) = 0;
317319
/// Return the field name for a derived type component inside a fir.record
318320
/// type.
319321
virtual std::string

flang/lib/Lower/Bridge.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,6 +1049,11 @@ class FirConverter : public Fortran::lower::AbstractConverter {
10491049
return Fortran::lower::mangle::mangleName(name, getCurrentScope(),
10501050
scopeBlockIdMap);
10511051
}
1052+
std::string
1053+
mangleName(std::string &name,
1054+
const Fortran::semantics::Scope &myScope) override final {
1055+
return Fortran::lower::mangle::mangleName(name, myScope, scopeBlockIdMap);
1056+
}
10521057
std::string getRecordTypeFieldName(
10531058
const Fortran::semantics::Symbol &component) override final {
10541059
return Fortran::lower::mangle::getRecordTypeFieldName(component,

flang/lib/Lower/OpenMP/OpenMP.cpp

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3148,7 +3148,51 @@ static void
31483148
genOMP(lower::AbstractConverter &converter, lower::SymMap &symTable,
31493149
semantics::SemanticsContext &semaCtx, lower::pft::Evaluation &eval,
31503150
const parser::OpenMPDeclareMapperConstruct &declareMapperConstruct) {
3151-
TODO(converter.getCurrentLocation(), "OpenMPDeclareMapperConstruct");
3151+
mlir::Location loc = converter.genLocation(declareMapperConstruct.source);
3152+
fir::FirOpBuilder &firOpBuilder = converter.getFirOpBuilder();
3153+
lower::StatementContext stmtCtx;
3154+
const auto &spec =
3155+
std::get<parser::OmpMapperSpecifier>(declareMapperConstruct.t);
3156+
const auto &mapperName{std::get<std::optional<parser::Name>>(spec.t)};
3157+
const auto &varType{std::get<parser::TypeSpec>(spec.t)};
3158+
const auto &varName{std::get<parser::Name>(spec.t)};
3159+
assert(varType.declTypeSpec->category() ==
3160+
semantics::DeclTypeSpec::Category::TypeDerived &&
3161+
"Expected derived type");
3162+
3163+
std::string mapperNameStr;
3164+
if (mapperName.has_value()) {
3165+
mapperNameStr = mapperName->ToString();
3166+
mapperNameStr =
3167+
converter.mangleName(mapperNameStr, mapperName->symbol->owner());
3168+
} else {
3169+
mapperNameStr =
3170+
varType.declTypeSpec->derivedTypeSpec().name().ToString() + ".default";
3171+
mapperNameStr = converter.mangleName(
3172+
mapperNameStr, *varType.declTypeSpec->derivedTypeSpec().GetScope());
3173+
}
3174+
3175+
// Save current insertion point before moving to the module scope to create
3176+
// the DeclareMapperOp
3177+
mlir::OpBuilder::InsertionGuard guard(firOpBuilder);
3178+
3179+
firOpBuilder.setInsertionPointToStart(converter.getModuleOp().getBody());
3180+
auto mlirType = converter.genType(varType.declTypeSpec->derivedTypeSpec());
3181+
auto declMapperOp = firOpBuilder.create<mlir::omp::DeclareMapperOp>(
3182+
loc, mapperNameStr, mlirType);
3183+
auto &region = declMapperOp.getRegion();
3184+
firOpBuilder.createBlock(&region);
3185+
auto varVal = region.addArgument(firOpBuilder.getRefType(mlirType), loc);
3186+
converter.bindSymbol(*varName.symbol, varVal);
3187+
3188+
// Populate the declareMapper region with the map information.
3189+
mlir::omp::DeclareMapperInfoOperands clauseOps;
3190+
const auto *clauseList{
3191+
parser::Unwrap<parser::OmpClauseList>(declareMapperConstruct.t)};
3192+
List<Clause> clauses = makeClauses(*clauseList, semaCtx);
3193+
ClauseProcessor cp(converter, semaCtx, clauses);
3194+
cp.processMap(loc, stmtCtx, clauseOps);
3195+
firOpBuilder.create<mlir::omp::DeclareMapperInfoOp>(loc, clauseOps.mapVars);
31523196
}
31533197

31543198
static void

flang/lib/Optimizer/OpenMP/MapInfoFinalization.cpp

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,8 @@ class MapInfoFinalizationPass
464464
for (auto *user : mapOp->getUsers()) {
465465
if (llvm::isa<mlir::omp::TargetOp, mlir::omp::TargetDataOp,
466466
mlir::omp::TargetUpdateOp, mlir::omp::TargetExitDataOp,
467-
mlir::omp::TargetEnterDataOp>(user))
467+
mlir::omp::TargetEnterDataOp,
468+
mlir::omp::DeclareMapperInfoOp>(user))
468469
return user;
469470

470471
if (auto mapUser = llvm::dyn_cast<mlir::omp::MapInfoOp>(user))
@@ -495,7 +496,9 @@ class MapInfoFinalizationPass
495496
// ourselves to the possibility of race conditions while this pass
496497
// undergoes frequent re-iteration for the near future. So we loop
497498
// over function in the module and then map.info inside of those.
498-
module->walk([&](mlir::func::FuncOp func) {
499+
getOperation()->walk([&](mlir::Operation *func) {
500+
if (!mlir::isa<mlir::func::FuncOp, mlir::omp::DeclareMapperOp>(func))
501+
return;
499502
// clear all local allocations we made for any boxes in any prior
500503
// iterations from previous function scopes.
501504
localBoxAllocas.clear();
@@ -598,7 +601,6 @@ class MapInfoFinalizationPass
598601
// if (alreadyMapped)
599602
// continue;
600603

601-
#if 1//<<<<<<< HEAD
602604
// builder.setInsertionPoint(op);
603605
// mlir::Value fieldIdxVal = builder.createIntegerConstant(
604606
// op.getLoc(), mlir::IndexType::get(builder.getContext()),
@@ -617,27 +619,6 @@ class MapInfoFinalizationPass
617619
// hlfir::Entity{fieldCoord})
618620
// .first,
619621
// /*dataExvIsAssumedSize=*/false, op.getLoc());
620-
#else//=======
621-
builder.setInsertionPoint(op);
622-
mlir::Value fieldIdxVal = builder.createIntegerConstant(
623-
op.getLoc(), mlir::IndexType::get(builder.getContext()),
624-
fieldIdx);
625-
auto fieldCoord = builder.create<fir::CoordinateOp>(
626-
op.getLoc(), builder.getRefType(memTy), op.getVarPtr(),
627-
fieldIdxVal);
628-
fir::factory::AddrAndBoundsInfo info =
629-
fir::factory::getDataOperandBaseAddr(
630-
builder, fieldCoord, /*isOptional=*/false, op.getLoc());
631-
llvm::SmallVector<mlir::Value> bounds =
632-
fir::factory::genImplicitBoundsOps<mlir::omp::MapBoundsOp,
633-
mlir::omp::MapBoundsType>(
634-
builder, info,
635-
hlfir::translateToExtendedValue(op.getLoc(), builder,
636-
hlfir::Entity{fieldCoord})
637-
.first,
638-
/*dataExvIsAssumedSize=*/false, op.getLoc());
639-
#endif//>>>>>>> ffde2687be1fcb92c0c686aee441b83e71531457
640-
641622
// mlir::omp::MapInfoOp fieldMapOp =
642623
// builder.create<mlir::omp::MapInfoOp>(
643624
// op.getLoc(), fieldCoord.getResult().getType(),

flang/test/Lower/OpenMP/Todo/omp-declare-mapper.f90

Lines changed: 0 additions & 47 deletions
This file was deleted.
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
! This test checks lowering of OpenMP declare mapper Directive.
2+
! XFAIL: *
3+
! RUN: split-file %s %t
4+
! RUN: %flang_fc1 -emit-hlfir -fopenmp -fopenmp-version=50 %t/omp-declare-mapper-1.f90 -o - | FileCheck %t/omp-declare-mapper-1.f90
5+
! RUN: %flang_fc1 -emit-hlfir -fopenmp -fopenmp-version=50 %t/omp-declare-mapper-2.f90 -o - | FileCheck %t/omp-declare-mapper-2.f90
6+
7+
!--- omp-declare-mapper-1.f90
8+
subroutine declare_mapper_1
9+
integer, parameter :: nvals = 250
10+
type my_type
11+
integer :: num_vals
12+
integer, allocatable :: values(:)
13+
end type
14+
15+
type my_type2
16+
type(my_type) :: my_type_var
17+
type(my_type) :: temp
18+
real, dimension(nvals) :: unmapped
19+
real, dimension(nvals) :: arr
20+
end type
21+
type(my_type2) :: t
22+
real :: x, y(nvals)
23+
!CHECK:omp.declare_mapper @[[MY_TYPE_MAPPER:_QQFdeclare_mapper_1my_type\.default]] : [[MY_TYPE:!fir\.type<_QFdeclare_mapper_1Tmy_type\{num_vals:i32,values:!fir\.box<!fir\.heap<!fir\.array<\?xi32>>>\}>]] {
24+
!CHECK: ^bb0(%[[VAL_0:.*]]: !fir.ref<[[MY_TYPE]]>):
25+
!CHECK: %[[VAL_1:.*]]:2 = hlfir.declare %[[VAL_0]] {uniq_name = "_QFdeclare_mapper_1Evar"} : (!fir.ref<[[MY_TYPE]]>) -> (!fir.ref<[[MY_TYPE]]>, !fir.ref<[[MY_TYPE]]>)
26+
!CHECK: %[[VAL_2:.*]] = hlfir.designate %[[VAL_1]]#0{"values"} {fortran_attrs = #fir.var_attrs<allocatable>} : (!fir.ref<[[MY_TYPE]]>) -> !fir.ref<!fir.box<!fir.heap<!fir.array<?xi32>>>>
27+
!CHECK: %[[VAL_3:.*]] = fir.load %[[VAL_2]] : !fir.ref<!fir.box<!fir.heap<!fir.array<?xi32>>>>
28+
!CHECK: %[[VAL_4:.*]] = fir.box_addr %[[VAL_3]] : (!fir.box<!fir.heap<!fir.array<?xi32>>>) -> !fir.heap<!fir.array<?xi32>>
29+
!CHECK: %[[VAL_5:.*]] = arith.constant 0 : index
30+
!CHECK: %[[VAL_6:.*]]:3 = fir.box_dims %[[VAL_3]], %[[VAL_5]] : (!fir.box<!fir.heap<!fir.array<?xi32>>>, index) -> (index, index, index)
31+
!CHECK: %[[VAL_7:.*]] = arith.constant 0 : index
32+
!CHECK: %[[VAL_8:.*]] = arith.constant 1 : index
33+
!CHECK: %[[VAL_9:.*]] = arith.constant 1 : index
34+
!CHECK: %[[VAL_10:.*]] = arith.subi %[[VAL_9]], %[[VAL_6]]#0 : index
35+
!CHECK: %[[VAL_11:.*]] = hlfir.designate %[[VAL_1]]#0{"num_vals"} : (!fir.ref<[[MY_TYPE]]>) -> !fir.ref<i32>
36+
!CHECK: %[[VAL_12:.*]] = fir.load %[[VAL_11]] : !fir.ref<i32>
37+
!CHECK: %[[VAL_13:.*]] = fir.convert %[[VAL_12]] : (i32) -> i64
38+
!CHECK: %[[VAL_14:.*]] = fir.convert %[[VAL_13]] : (i64) -> index
39+
!CHECK: %[[VAL_15:.*]] = arith.subi %[[VAL_14]], %[[VAL_6]]#0 : index
40+
!CHECK: %[[VAL_16:.*]] = omp.map.bounds lower_bound(%[[VAL_10]] : index) upper_bound(%[[VAL_15]] : index) extent(%[[VAL_6]]#1 : index) stride(%[[VAL_8]] : index) start_idx(%[[VAL_6]]#0 : index)
41+
!CHECK: %[[VAL_17:.*]] = arith.constant 1 : index
42+
!CHECK: %[[VAL_18:.*]] = fir.coordinate_of %[[VAL_1]]#0, %[[VAL_17]] : (!fir.ref<[[MY_TYPE]]>, index) -> !fir.ref<!fir.box<!fir.heap<!fir.array<?xi32>>>>
43+
!CHECK: %[[VAL_19:.*]] = omp.map.info var_ptr(%[[VAL_18]] : !fir.ref<!fir.box<!fir.heap<!fir.array<?xi32>>>>, !fir.box<!fir.heap<!fir.array<?xi32>>>) map_clauses(tofrom) capture(ByRef) bounds(%[[VAL_16]]) -> !fir.ref<!fir.box<!fir.heap<!fir.array<?xi32>>>> {name = "var%[[VAL_20:.*]](1:var%[[VAL_21:.*]])"}
44+
!CHECK: %[[VAL_22:.*]] = omp.map.info var_ptr(%[[VAL_1]]#1 : !fir.ref<[[MY_TYPE]]>, [[MY_TYPE]]) map_clauses(tofrom) capture(ByRef) members(%[[VAL_19]] : [1] : !fir.ref<!fir.box<!fir.heap<!fir.array<?xi32>>>>) -> !fir.ref<[[MY_TYPE]]> {name = "var"}
45+
!CHECK: omp.declare_mapper.info map_entries(%[[VAL_22]] : !fir.ref<[[MY_TYPE]]>)
46+
!CHECK: }
47+
!$omp declare mapper (my_type :: var) map (var, var%values (1:var%num_vals))
48+
end subroutine declare_mapper_1
49+
50+
!--- omp-declare-mapper-2.f90
51+
subroutine declare_mapper_2
52+
integer, parameter :: nvals = 250
53+
type my_type
54+
integer :: num_vals
55+
integer, allocatable :: values(:)
56+
end type
57+
58+
type my_type2
59+
type(my_type) :: my_type_var
60+
type(my_type) :: temp
61+
real, dimension(nvals) :: unmapped
62+
real, dimension(nvals) :: arr
63+
end type
64+
type(my_type2) :: t
65+
real :: x, y(nvals)
66+
!CHECK:omp.declare_mapper @[[MY_TYPE_MAPPER:_QQFdeclare_mapper_2my_mapper]] : [[MY_TYPE:!fir\.type<_QFdeclare_mapper_2Tmy_type2\{my_type_var:!fir\.type<_QFdeclare_mapper_2Tmy_type\{num_vals:i32,values:!fir\.box<!fir\.heap<!fir\.array<\?xi32>>>\}>,temp:!fir\.type<_QFdeclare_mapper_2Tmy_type\{num_vals:i32,values:!fir\.box<!fir\.heap<!fir\.array<\?xi32>>>\}>,unmapped:!fir\.array<250xf32>,arr:!fir\.array<250xf32>\}>]] {
67+
!CHECK: ^bb0(%[[VAL_0:.*]]: !fir.ref<[[MY_TYPE]]>):
68+
!CHECK: %[[VAL_1:.*]]:2 = hlfir.declare %[[VAL_0]] {uniq_name = "_QFdeclare_mapper_2Ev"} : (!fir.ref<[[MY_TYPE]]>) -> (!fir.ref<[[MY_TYPE]]>, !fir.ref<[[MY_TYPE]]>)
69+
!CHECK: %[[VAL_2:.*]] = arith.constant 250 : index
70+
!CHECK: %[[VAL_3:.*]] = fir.shape %[[VAL_2]] : (index) -> !fir.shape<1>
71+
!CHECK: %[[VAL_4:.*]] = hlfir.designate %[[VAL_1]]#0{"arr"} shape %[[VAL_3]] : (!fir.ref<[[MY_TYPE]]>, !fir.shape<1>) -> !fir.ref<!fir.array<250xf32>>
72+
!CHECK: %[[VAL_5:.*]] = arith.constant 1 : index
73+
!CHECK: %[[VAL_6:.*]] = arith.constant 0 : index
74+
!CHECK: %[[VAL_7:.*]] = arith.subi %[[VAL_2]], %[[VAL_5]] : index
75+
!CHECK: %[[VAL_8:.*]] = omp.map.bounds lower_bound(%[[VAL_6]] : index) upper_bound(%[[VAL_7]] : index) extent(%[[VAL_2]] : index) stride(%[[VAL_5]] : index) start_idx(%[[VAL_5]] : index)
76+
!CHECK: %[[VAL_9:.*]] = omp.map.info var_ptr(%[[VAL_4]] : !fir.ref<!fir.array<250xf32>>, !fir.array<250xf32>) map_clauses(tofrom) capture(ByRef) bounds(%[[VAL_8]]) -> !fir.ref<!fir.array<250xf32>> {name = "v%[[VAL_10:.*]]"}
77+
!CHECK: %[[VAL_11:.*]] = hlfir.designate %[[VAL_1]]#0{"temp"} : (!fir.ref<[[MY_TYPE]]>) -> !fir.ref<!fir.type<_QFdeclare_mapper_2Tmy_type{num_vals:i32,values:!fir.box<!fir.heap<!fir.array<?xi32>>>}>>
78+
!CHECK: %[[VAL_12:.*]] = omp.map.info var_ptr(%[[VAL_11]] : !fir.ref<!fir.type<_QFdeclare_mapper_2Tmy_type{num_vals:i32,values:!fir.box<!fir.heap<!fir.array<?xi32>>>}>>, !fir.type<_QFdeclare_mapper_2Tmy_type{num_vals:i32,values:!fir.box<!fir.heap<!fir.array<?xi32>>>}>) map_clauses(exit_release_or_enter_alloc) capture(ByRef) -> !fir.ref<!fir.type<_QFdeclare_mapper_2Tmy_type{num_vals:i32,values:!fir.box<!fir.heap<!fir.array<?xi32>>>}>> {name = "v%[[VAL_13:.*]]"}
79+
!CHECK: %[[VAL_14:.*]] = omp.map.info var_ptr(%[[VAL_1]]#1 : !fir.ref<[[MY_TYPE]]>, [[MY_TYPE]]) map_clauses(tofrom) capture(ByRef) members(%[[VAL_9]], %[[VAL_12]] : [3], [1] : !fir.ref<!fir.array<250xf32>>, !fir.ref<!fir.type<_QFdeclare_mapper_2Tmy_type{num_vals:i32,values:!fir.box<!fir.heap<!fir.array<?xi32>>>}>>) -> !fir.ref<[[MY_TYPE]]> {name = "v", partial_map = true}
80+
!CHECK: omp.declare_mapper.info map_entries(%[[VAL_14]] : !fir.ref<[[MY_TYPE]]>)
81+
!CHECK: }
82+
!$omp declare mapper (my_mapper : my_type2 :: v) map (v%arr) map (alloc : v%temp)
83+
end subroutine declare_mapper_2

llvm/lib/Analysis/InlineCost.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -795,17 +795,19 @@ class InlineCostCallAnalyzer final : public CallAnalyzer {
795795
// the given instruction was assessed.
796796
if (!PrintInstructionComments)
797797
return;
798-
InstructionCostDetailMap[I].CostBefore = Cost;
799-
InstructionCostDetailMap[I].ThresholdBefore = Threshold;
798+
auto &CostDetail = InstructionCostDetailMap[I];
799+
CostDetail.CostBefore = Cost;
800+
CostDetail.ThresholdBefore = Threshold;
800801
}
801802

802803
void onInstructionAnalysisFinish(const Instruction *I) override {
803804
// This function is called to find new values of cost and threshold after
804805
// the instruction has been assessed.
805806
if (!PrintInstructionComments)
806807
return;
807-
InstructionCostDetailMap[I].CostAfter = Cost;
808-
InstructionCostDetailMap[I].ThresholdAfter = Threshold;
808+
auto &CostDetail = InstructionCostDetailMap[I];
809+
CostDetail.CostAfter = Cost;
810+
CostDetail.ThresholdAfter = Threshold;
809811
}
810812

811813
bool isCostBenefitAnalysisEnabled() {

llvm/lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,8 +362,9 @@ static void clobberRegEntries(InlinedEntity Var, unsigned RegNo,
362362
FellowRegisters.push_back(Reg);
363363

364364
// Drop all entries that have ended.
365+
auto &Entries = LiveEntries[Var];
365366
for (auto Index : IndicesToErase)
366-
LiveEntries[Var].erase(Index);
367+
Entries.erase(Index);
367368
}
368369

369370
/// Add a new debug value for \p Var. Closes all overlapping debug values.

llvm/lib/ExecutionEngine/Orc/ELFNixPlatform.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,11 +469,12 @@ void ELFNixPlatform::pushInitializersLoop(
469469
Worklist.pop_back();
470470

471471
// If we've already visited this JITDylib on this iteration then continue.
472-
if (JDDepMap.count(DepJD))
472+
auto [It, Inserted] = JDDepMap.try_emplace(DepJD);
473+
if (!Inserted)
473474
continue;
474475

475476
// Add dep info.
476-
auto &DM = JDDepMap[DepJD];
477+
auto &DM = It->second;
477478
DepJD->withLinkOrderDo([&](const JITDylibSearchOrder &O) {
478479
for (auto &KV : O) {
479480
if (KV.first == DepJD)

llvm/lib/Target/AMDGPU/AMDGPUWaitSGPRHazards.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,13 +384,14 @@ class AMDGPUWaitSGPRHazards {
384384
}
385385
}
386386

387-
bool Changed = State != BlockState[&MBB].Out;
387+
BlockHazardState &BS = BlockState[&MBB];
388+
bool Changed = State != BS.Out;
388389
if (Emit) {
389390
assert(!Changed && "Hazard state should not change on emit pass");
390391
return Emitted;
391392
}
392393
if (Changed)
393-
BlockState[&MBB].Out = State;
394+
BS.Out = State;
394395
return Changed;
395396
}
396397

llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,8 +1174,8 @@ auto AlignVectors::realignLoadGroup(IRBuilderBase &Builder,
11741174
for (const ByteSpan::Block &B : VSpan) {
11751175
ByteSpan ASection = ASpan.section(B.Pos, B.Seg.Size);
11761176
for (const ByteSpan::Block &S : ASection) {
1177-
EarliestUser[S.Seg.Val] = std::min(
1178-
EarliestUser[S.Seg.Val], earliestUser(B.Seg.Val->uses()), isEarlier);
1177+
auto &EU = EarliestUser[S.Seg.Val];
1178+
EU = std::min(EU, earliestUser(B.Seg.Val->uses()), isEarlier);
11791179
}
11801180
}
11811181

llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXInstPrinter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ void NVPTXInstPrinter::printOperand(const MCInst *MI, unsigned OpNo,
8484
raw_ostream &O) {
8585
const MCOperand &Op = MI->getOperand(OpNo);
8686
if (Op.isReg()) {
87-
unsigned Reg = Op.getReg();
87+
MCRegister Reg = Op.getReg();
8888
printRegName(O, Reg);
8989
} else if (Op.isImm()) {
9090
markup(O, Markup::Immediate) << formatImm(Op.getImm());

0 commit comments

Comments
 (0)