Skip to content

Commit 1602708

Browse files
SC llvm teamSC llvm team
SC llvm team
authored and
SC llvm team
committed
Merged main:707367621679 into origin/amd-gfx:4cab0b6fa1ab
Local branch origin/amd-gfx 4cab0b6 Merged main:01bc672b8a41 into origin/amd-gfx:9191a26f4d41 Remote branch main 7073676 [NFC][LLVM][DirectX] Cleanup pass initialization for DirectX (llvm#134419)
2 parents 4cab0b6 + 7073676 commit 1602708

File tree

55 files changed

+611
-323
lines changed

Some content is hidden

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

55 files changed

+611
-323
lines changed

clang/lib/Sema/TreeTransform.h

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7765,17 +7765,23 @@ QualType TreeTransform<Derived>::TransformDependentTemplateSpecializationType(
77657765
NewTemplateArgs.setLAngleLoc(TL.getLAngleLoc());
77667766
NewTemplateArgs.setRAngleLoc(TL.getRAngleLoc());
77677767

7768-
typedef TemplateArgumentLocContainerIterator<
7769-
DependentTemplateSpecializationTypeLoc> ArgIterator;
7770-
if (getDerived().TransformTemplateArguments(ArgIterator(TL, 0),
7771-
ArgIterator(TL, TL.getNumArgs()),
7772-
NewTemplateArgs))
7768+
auto ArgsRange = llvm::make_range<TemplateArgumentLocContainerIterator<
7769+
DependentTemplateSpecializationTypeLoc>>({TL, 0}, {TL, TL.getNumArgs()});
7770+
7771+
if (getDerived().TransformTemplateArguments(ArgsRange.begin(),
7772+
ArgsRange.end(), NewTemplateArgs))
77737773
return QualType();
7774+
bool TemplateArgumentsChanged = !llvm::equal(
7775+
ArgsRange, NewTemplateArgs.arguments(),
7776+
[](const TemplateArgumentLoc &A, const TemplateArgumentLoc &B) {
7777+
return A.getArgument().structurallyEquals(B.getArgument());
7778+
});
77747779

77757780
const DependentTemplateStorage &DTN = T->getDependentTemplateName();
77767781

77777782
QualType Result = TL.getType();
7778-
if (getDerived().AlwaysRebuild() || SS.getScopeRep() != DTN.getQualifier()) {
7783+
if (getDerived().AlwaysRebuild() || SS.getScopeRep() != DTN.getQualifier() ||
7784+
TemplateArgumentsChanged) {
77797785
TemplateName Name = getDerived().RebuildTemplateName(
77807786
SS, TL.getTemplateKeywordLoc(), DTN.getName(), TL.getTemplateNameLoc(),
77817787
/*ObjectType=*/QualType(), /*FirstQualifierInScope=*/nullptr,

clang/test/SemaTemplate/dependent-names.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,3 +458,12 @@ namespace PR37680 {
458458
};
459459
int f(b<a> ba) { return ba.add<0>(); }
460460
}
461+
462+
namespace TransformDependentTemplates {
463+
template <class T> struct Test1 {
464+
template <class T2>
465+
using Arg = typename T::template Arg<T2>;
466+
void f(Arg<void>);
467+
void f(Arg<int>);
468+
};
469+
} // namespace TransformDependentTemplates
Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,7 @@
1-
lldb_tablegen(DynamicLoaderDarwinProperties.inc -gen-lldb-property-defs
2-
SOURCE DynamicLoaderDarwinProperties.td
3-
TARGET LLDBPluginDynamicLoaderDarwinPropertiesGen)
4-
5-
lldb_tablegen(DynamicLoaderDarwinPropertiesEnum.inc -gen-lldb-property-enum-defs
6-
SOURCE DynamicLoaderDarwinProperties.td
7-
TARGET LLDBPluginDynamicLoaderDarwinPropertiesEnumGen)
8-
91
add_lldb_library(lldbPluginDynamicLoaderMacOSXDYLD PLUGIN
102
DynamicLoaderMacOSXDYLD.cpp
113
DynamicLoaderMacOS.cpp
124
DynamicLoaderDarwin.cpp
13-
DynamicLoaderDarwinProperties.cpp
145

156
LINK_LIBS
167
lldbBreakpoint
@@ -25,7 +16,3 @@ add_lldb_library(lldbPluginDynamicLoaderMacOSXDYLD PLUGIN
2516
Support
2617
TargetParser
2718
)
28-
29-
add_dependencies(lldbPluginDynamicLoaderMacOSXDYLD
30-
LLDBPluginDynamicLoaderDarwinPropertiesGen
31-
LLDBPluginDynamicLoaderDarwinPropertiesEnumGen)

lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
#include "DynamicLoaderDarwin.h"
1010

11-
#include "DynamicLoaderDarwinProperties.h"
1211
#include "lldb/Breakpoint/StoppointCallbackContext.h"
1312
#include "lldb/Core/Debugger.h"
1413
#include "lldb/Core/Module.h"
@@ -79,17 +78,6 @@ void DynamicLoaderDarwin::DidLaunch() {
7978
SetNotificationBreakpoint();
8079
}
8180

82-
void DynamicLoaderDarwin::CreateSettings(lldb_private::Debugger &debugger) {
83-
if (!PluginManager::GetSettingForDynamicLoaderPlugin(
84-
debugger, DynamicLoaderDarwinProperties::GetSettingName())) {
85-
const bool is_global_setting = true;
86-
PluginManager::CreateSettingForDynamicLoaderPlugin(
87-
debugger,
88-
DynamicLoaderDarwinProperties::GetGlobal().GetValueProperties(),
89-
"Properties for the DynamicLoaderDarwin plug-in.", is_global_setting);
90-
}
91-
}
92-
9381
// Clear out the state of this class.
9482
void DynamicLoaderDarwin::Clear(bool clear_process) {
9583
std::lock_guard<std::recursive_mutex> guard(m_mutex);
@@ -670,8 +658,7 @@ DynamicLoaderDarwin::PreloadModulesFromImageInfos(
670658
image_info, FindTargetModuleForImageInfo(image_info, true, nullptr));
671659
};
672660
auto it = image_infos.begin();
673-
bool is_parallel_load =
674-
DynamicLoaderDarwinProperties::GetGlobal().GetEnableParallelImageLoad();
661+
bool is_parallel_load = m_process->GetTarget().GetParallelModuleLoad();
675662
if (is_parallel_load) {
676663
llvm::ThreadPoolTaskGroup taskGroup(Debugger::GetThreadPool());
677664
for (size_t i = 0; i < size; ++i, ++it) {

lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ class DynamicLoaderDarwin : public lldb_private::DynamicLoader {
5858

5959
std::optional<lldb_private::Address> GetStartAddress() override;
6060

61-
static void CreateSettings(lldb_private::Debugger &debugger);
62-
6361
protected:
6462
void PrivateInitialize(lldb_private::Process *process);
6563

lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwinProperties.cpp

Lines changed: 0 additions & 53 deletions
This file was deleted.

lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwinProperties.h

Lines changed: 0 additions & 34 deletions
This file was deleted.

lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwinProperties.td

Lines changed: 0 additions & 8 deletions
This file was deleted.

lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1149,8 +1149,7 @@ bool DynamicLoaderMacOSXDYLD::IsFullyInitialized() {
11491149

11501150
void DynamicLoaderMacOSXDYLD::Initialize() {
11511151
PluginManager::RegisterPlugin(GetPluginNameStatic(),
1152-
GetPluginDescriptionStatic(), CreateInstance,
1153-
DebuggerInitialize);
1152+
GetPluginDescriptionStatic(), CreateInstance);
11541153
DynamicLoaderMacOS::Initialize();
11551154
}
11561155

@@ -1159,11 +1158,6 @@ void DynamicLoaderMacOSXDYLD::Terminate() {
11591158
PluginManager::UnregisterPlugin(CreateInstance);
11601159
}
11611160

1162-
void DynamicLoaderMacOSXDYLD::DebuggerInitialize(
1163-
lldb_private::Debugger &debugger) {
1164-
CreateSettings(debugger);
1165-
}
1166-
11671161
llvm::StringRef DynamicLoaderMacOSXDYLD::GetPluginDescriptionStatic() {
11681162
return "Dynamic loader plug-in that watches for shared library loads/unloads "
11691163
"in MacOSX user processes.";

lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ class DynamicLoaderMacOSXDYLD : public lldb_private::DynamicLoaderDarwin {
5050
static lldb_private::DynamicLoader *
5151
CreateInstance(lldb_private::Process *process, bool force);
5252

53-
static void DebuggerInitialize(lldb_private::Debugger &debugger);
54-
5553
/// Called after attaching a process.
5654
///
5755
/// Allow DynamicLoader plug-ins to execute some code after

llvm/include/llvm/Config/llvm-config.h.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
/* Indicate that this is LLVM compiled from the amd-gfx branch. */
1818
#define LLVM_HAVE_BRANCH_AMD_GFX
19-
#define LLVM_MAIN_REVISION 533286
19+
#define LLVM_MAIN_REVISION 533299
2020

2121
/* Define if LLVM_ENABLE_DUMP is enabled */
2222
#cmakedefine LLVM_ENABLE_DUMP

llvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ ImmutablePass *llvm::createAMDGPUExternalAAWrapperPass() {
3838
return new AMDGPUExternalAAWrapper();
3939
}
4040

41-
AMDGPUAAWrapperPass::AMDGPUAAWrapperPass() : ImmutablePass(ID) {
42-
initializeAMDGPUAAWrapperPassPass(*PassRegistry::getPassRegistry());
43-
}
41+
AMDGPUAAWrapperPass::AMDGPUAAWrapperPass() : ImmutablePass(ID) {}
4442

4543
void AMDGPUAAWrapperPass::getAnalysisUsage(AnalysisUsage &AU) const {
4644
AU.setPreservesAll();

llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,12 @@
1717
#include "llvm/CodeGen/TargetPassConfig.h"
1818
#include "llvm/IR/IntrinsicsAMDGPU.h"
1919
#include "llvm/IR/IntrinsicsR600.h"
20+
#include "llvm/InitializePasses.h"
2021
#include "llvm/Target/TargetMachine.h"
2122
#include "llvm/Transforms/IPO/Attributor.h"
2223

2324
#define DEBUG_TYPE "amdgpu-attributor"
2425

25-
namespace llvm {
26-
void initializeCycleInfoWrapperPassPass(PassRegistry &);
27-
} // namespace llvm
28-
2926
using namespace llvm;
3027

3128
static cl::opt<unsigned> KernargPreloadCount(

llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -336,9 +336,7 @@ class AMDGPUCodeGenPrepareImpl
336336
class AMDGPUCodeGenPrepare : public FunctionPass {
337337
public:
338338
static char ID;
339-
AMDGPUCodeGenPrepare() : FunctionPass(ID) {
340-
initializeAMDGPUCodeGenPreparePass(*PassRegistry::getPassRegistry());
341-
}
339+
AMDGPUCodeGenPrepare() : FunctionPass(ID) {}
342340
void getAnalysisUsage(AnalysisUsage &AU) const override {
343341
AU.addRequired<AssumptionCacheTracker>();
344342
AU.addRequired<UniformityInfoWrapperPass>();

llvm/lib/Target/AMDGPU/AMDGPUExportClustering.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,7 @@ void ExportClustering::apply(ScheduleDAGInstrs *DAG) {
139139

140140
} // end namespace
141141

142-
namespace llvm {
143-
144-
std::unique_ptr<ScheduleDAGMutation> createAMDGPUExportClusteringDAGMutation() {
142+
std::unique_ptr<ScheduleDAGMutation>
143+
llvm::createAMDGPUExportClusteringDAGMutation() {
145144
return std::make_unique<ExportClustering>();
146145
}
147-
148-
} // end namespace llvm

llvm/lib/Target/AMDGPU/AMDGPUGlobalISelDivergenceLowering.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,7 @@ class AMDGPUGlobalISelDivergenceLowering : public MachineFunctionPass {
3434
static char ID;
3535

3636
public:
37-
AMDGPUGlobalISelDivergenceLowering() : MachineFunctionPass(ID) {
38-
initializeAMDGPUGlobalISelDivergenceLoweringPass(
39-
*PassRegistry::getPassRegistry());
40-
}
37+
AMDGPUGlobalISelDivergenceLowering() : MachineFunctionPass(ID) {}
4138

4239
bool runOnMachineFunction(MachineFunction &MF) override;
4340

llvm/lib/Target/AMDGPU/AMDGPUIGroupLP.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2696,16 +2696,12 @@ bool IGroupLPDAGMutation::initIGLPOpt(SUnit &SU) {
26962696

26972697
} // namespace
26982698

2699-
namespace llvm {
2700-
27012699
/// \p Phase specifes whether or not this is a reentry into the
27022700
/// IGroupLPDAGMutation. Since there may be multiple scheduling passes on the
27032701
/// same scheduling region (e.g. pre and post-RA scheduling / multiple
27042702
/// scheduling "phases"), we can reenter this mutation framework more than once
27052703
/// for a given region.
27062704
std::unique_ptr<ScheduleDAGMutation>
2707-
createIGroupLPDAGMutation(AMDGPU::SchedulingPhase Phase) {
2705+
llvm::createIGroupLPDAGMutation(AMDGPU::SchedulingPhase Phase) {
27082706
return std::make_unique<IGroupLPDAGMutation>(Phase);
27092707
}
2710-
2711-
} // end namespace llvm

llvm/lib/Target/AMDGPU/AMDGPULowerBufferFatPointers.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2312,10 +2312,7 @@ class AMDGPULowerBufferFatPointers : public ModulePass {
23122312
public:
23132313
static char ID;
23142314

2315-
AMDGPULowerBufferFatPointers() : ModulePass(ID) {
2316-
initializeAMDGPULowerBufferFatPointersPass(
2317-
*PassRegistry::getPassRegistry());
2318-
}
2315+
AMDGPULowerBufferFatPointers() : ModulePass(ID) {}
23192316

23202317
bool run(Module &M, const TargetMachine &TM);
23212318
bool runOnModule(Module &M) override;

llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1502,10 +1502,8 @@ class AMDGPULowerModuleLDSLegacy : public ModulePass {
15021502
const AMDGPUTargetMachine *TM;
15031503
static char ID;
15041504

1505-
AMDGPULowerModuleLDSLegacy(const AMDGPUTargetMachine *TM_ = nullptr)
1506-
: ModulePass(ID), TM(TM_) {
1507-
initializeAMDGPULowerModuleLDSLegacyPass(*PassRegistry::getPassRegistry());
1508-
}
1505+
AMDGPULowerModuleLDSLegacy(const AMDGPUTargetMachine *TM = nullptr)
1506+
: ModulePass(ID), TM(TM) {}
15091507

15101508
void getAnalysisUsage(AnalysisUsage &AU) const override {
15111509
if (!TM)

llvm/lib/Target/AMDGPU/AMDGPUMachineModuleInfo.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include "AMDGPUMachineModuleInfo.h"
1616
#include "llvm/IR/Module.h"
1717

18-
namespace llvm {
18+
using namespace llvm;
1919

2020
AMDGPUMachineModuleInfo::AMDGPUMachineModuleInfo(const MachineModuleInfo &MMI)
2121
: MachineModuleInfoELF(MMI) {
@@ -34,5 +34,3 @@ AMDGPUMachineModuleInfo::AMDGPUMachineModuleInfo(const MachineModuleInfo &MMI)
3434
SingleThreadOneAddressSpaceSSID =
3535
CTX.getOrInsertSyncScopeID("singlethread-one-as");
3636
}
37-
38-
} // end namespace llvm

llvm/lib/Target/AMDGPU/AMDGPUMarkLastScratchLoad.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,7 @@ class AMDGPUMarkLastScratchLoadLegacy : public MachineFunctionPass {
4242
public:
4343
static char ID;
4444

45-
AMDGPUMarkLastScratchLoadLegacy() : MachineFunctionPass(ID) {
46-
initializeAMDGPUMarkLastScratchLoadLegacyPass(
47-
*PassRegistry::getPassRegistry());
48-
}
45+
AMDGPUMarkLastScratchLoadLegacy() : MachineFunctionPass(ID) {}
4946

5047
bool runOnMachineFunction(MachineFunction &MF) override;
5148

0 commit comments

Comments
 (0)