Skip to content

Commit 2007865

Browse files
committed
[llvm] manual fix-ups to IDS codemod of CodeGen lib interfaces
1 parent 0fc6081 commit 2007865

File tree

8 files changed

+43
-29
lines changed

8 files changed

+43
-29
lines changed

llvm/include/llvm/CodeGen/GlobalISel/CallLowering.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,15 @@ class LLVM_ABI CallLowering {
609609
virtual bool isTypeIsValidForThisReturn(EVT Ty) const { return false; }
610610
};
611611

612+
extern template LLVM_ABI void
613+
CallLowering::setArgFlags<Function>(CallLowering::ArgInfo &Arg, unsigned OpIdx,
614+
const DataLayout &DL,
615+
const Function &FuncInfo) const;
616+
617+
extern template LLVM_ABI void
618+
CallLowering::setArgFlags<CallBase>(CallLowering::ArgInfo &Arg, unsigned OpIdx,
619+
const DataLayout &DL,
620+
const CallBase &FuncInfo) const;
612621
} // end namespace llvm
613622

614623
#endif // LLVM_CODEGEN_GLOBALISEL_CALLLOWERING_H

llvm/lib/CodeGen/GlobalMergeFunctions.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include "llvm/Analysis/ModuleSummaryAnalysis.h"
1616
#include "llvm/CGData/CodeGenData.h"
1717
#include "llvm/CGData/CodeGenDataWriter.h"
18+
#include "llvm/CodeGen/Passes.h"
1819
#include "llvm/IR/IRBuilder.h"
1920
#include "llvm/IR/StructuralHash.h"
2021
#include "llvm/InitializePasses.h"

llvm/lib/CodeGen/MachineDomTreeUpdater.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,22 @@
1414
#include "llvm/CodeGen/MachineDomTreeUpdater.h"
1515
#include "llvm/Analysis/GenericDomTreeUpdaterImpl.h"
1616
#include "llvm/CodeGen/MachinePostDominators.h"
17+
#include "llvm/Support/Compiler.h"
1718

1819
namespace llvm {
1920

20-
template class GenericDomTreeUpdater<
21+
template class LLVM_EXPORT_TEMPLATE GenericDomTreeUpdater<
2122
MachineDomTreeUpdater, MachineDominatorTree, MachinePostDominatorTree>;
2223

23-
template void
24+
template LLVM_EXPORT_TEMPLATE void
2425
GenericDomTreeUpdater<MachineDomTreeUpdater, MachineDominatorTree,
2526
MachinePostDominatorTree>::recalculate(MachineFunction
2627
&MF);
2728

28-
template void GenericDomTreeUpdater<
29+
template LLVM_EXPORT_TEMPLATE void GenericDomTreeUpdater<
2930
MachineDomTreeUpdater, MachineDominatorTree,
3031
MachinePostDominatorTree>::applyUpdatesImpl</*IsForward=*/true>();
31-
template void GenericDomTreeUpdater<
32+
template LLVM_EXPORT_TEMPLATE void GenericDomTreeUpdater<
3233
MachineDomTreeUpdater, MachineDominatorTree,
3334
MachinePostDominatorTree>::applyUpdatesImpl</*IsForward=*/false>();
3435

llvm/lib/CodeGen/MachineDominators.cpp

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include "llvm/Pass.h"
1818
#include "llvm/PassRegistry.h"
1919
#include "llvm/Support/CommandLine.h"
20+
#include "llvm/Support/Compiler.h"
2021
#include "llvm/Support/GenericDomTreeConstruction.h"
2122

2223
using namespace llvm;
@@ -35,23 +36,23 @@ static cl::opt<bool, true> VerifyMachineDomInfoX(
3536
cl::desc("Verify machine dominator info (time consuming)"));
3637

3738
namespace llvm {
38-
template class DomTreeNodeBase<MachineBasicBlock>;
39-
template class DominatorTreeBase<MachineBasicBlock, false>; // DomTreeBase
39+
template class LLVM_EXPORT_TEMPLATE DomTreeNodeBase<MachineBasicBlock>;
40+
template class LLVM_EXPORT_TEMPLATE DominatorTreeBase<MachineBasicBlock, false>; // DomTreeBase
4041

4142
namespace DomTreeBuilder {
42-
template void Calculate<MBBDomTree>(MBBDomTree &DT);
43-
template void CalculateWithUpdates<MBBDomTree>(MBBDomTree &DT, MBBUpdates U);
43+
template LLVM_EXPORT_TEMPLATE void Calculate<MBBDomTree>(MBBDomTree &DT);
44+
template LLVM_EXPORT_TEMPLATE void CalculateWithUpdates<MBBDomTree>(MBBDomTree &DT, MBBUpdates U);
4445

45-
template void InsertEdge<MBBDomTree>(MBBDomTree &DT, MachineBasicBlock *From,
46+
template LLVM_EXPORT_TEMPLATE void InsertEdge<MBBDomTree>(MBBDomTree &DT, MachineBasicBlock *From,
4647
MachineBasicBlock *To);
4748

48-
template void DeleteEdge<MBBDomTree>(MBBDomTree &DT, MachineBasicBlock *From,
49+
template LLVM_EXPORT_TEMPLATE void DeleteEdge<MBBDomTree>(MBBDomTree &DT, MachineBasicBlock *From,
4950
MachineBasicBlock *To);
5051

51-
template void ApplyUpdates<MBBDomTree>(MBBDomTree &DT, MBBDomTreeGraphDiff &,
52+
template LLVM_EXPORT_TEMPLATE void ApplyUpdates<MBBDomTree>(MBBDomTree &DT, MBBDomTreeGraphDiff &,
5253
MBBDomTreeGraphDiff *);
5354

54-
template bool Verify<MBBDomTree>(const MBBDomTree &DT,
55+
template LLVM_EXPORT_TEMPLATE bool Verify<MBBDomTree>(const MBBDomTree &DT,
5556
MBBDomTree::VerificationLevel VL);
5657
} // namespace DomTreeBuilder
5758
}

llvm/lib/CodeGen/MachineLoopInfo.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,14 @@
2222
#include "llvm/InitializePasses.h"
2323
#include "llvm/Pass.h"
2424
#include "llvm/PassRegistry.h"
25+
#include "llvm/Support/Compiler.h"
2526
#include "llvm/Support/GenericLoopInfoImpl.h"
2627

2728
using namespace llvm;
2829

2930
// Explicitly instantiate methods in LoopInfoImpl.h for MI-level Loops.
30-
template class llvm::LoopBase<MachineBasicBlock, MachineLoop>;
31-
template class llvm::LoopInfoBase<MachineBasicBlock, MachineLoop>;
31+
template class LLVM_EXPORT_TEMPLATE llvm::LoopBase<MachineBasicBlock, MachineLoop>;
32+
template class LLVM_EXPORT_TEMPLATE llvm::LoopInfoBase<MachineBasicBlock, MachineLoop>;
3233

3334
AnalysisKey MachineLoopAnalysis::Key;
3435

llvm/lib/CodeGen/MachinePassManager.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,20 @@
1717
#include "llvm/IR/Function.h"
1818
#include "llvm/IR/Module.h"
1919
#include "llvm/IR/PassManagerImpl.h"
20+
#include "llvm/Support/Compiler.h"
2021

2122
using namespace llvm;
2223

2324
AnalysisKey FunctionAnalysisManagerMachineFunctionProxy::Key;
2425

2526
namespace llvm {
26-
template class AnalysisManager<MachineFunction>;
27+
template class LLVM_EXPORT_TEMPLATE AnalysisManager<MachineFunction>;
2728
template class PassManager<MachineFunction>;
28-
template class InnerAnalysisManagerProxy<MachineFunctionAnalysisManager,
29+
template class LLVM_EXPORT_TEMPLATE InnerAnalysisManagerProxy<MachineFunctionAnalysisManager,
2930
Module>;
30-
template class InnerAnalysisManagerProxy<MachineFunctionAnalysisManager,
31+
template class LLVM_EXPORT_TEMPLATE InnerAnalysisManagerProxy<MachineFunctionAnalysisManager,
3132
Function>;
32-
template class OuterAnalysisManagerProxy<ModuleAnalysisManager,
33+
template class LLVM_EXPORT_TEMPLATE OuterAnalysisManagerProxy<ModuleAnalysisManager,
3334
MachineFunction>;
3435
} // namespace llvm
3536

llvm/lib/CodeGen/MachinePostDominators.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,21 @@
1818
using namespace llvm;
1919

2020
namespace llvm {
21-
template class DominatorTreeBase<MachineBasicBlock, true>; // PostDomTreeBase
21+
template class LLVM_EXPORT_TEMPLATE DominatorTreeBase<MachineBasicBlock, true>; // PostDomTreeBase
2222

2323
namespace DomTreeBuilder {
2424

25-
template void Calculate<MBBPostDomTree>(MBBPostDomTree &DT);
26-
template void InsertEdge<MBBPostDomTree>(MBBPostDomTree &DT,
25+
template LLVM_EXPORT_TEMPLATE void Calculate<MBBPostDomTree>(MBBPostDomTree &DT);
26+
template LLVM_EXPORT_TEMPLATE void InsertEdge<MBBPostDomTree>(MBBPostDomTree &DT,
2727
MachineBasicBlock *From,
2828
MachineBasicBlock *To);
29-
template void DeleteEdge<MBBPostDomTree>(MBBPostDomTree &DT,
29+
template LLVM_EXPORT_TEMPLATE void DeleteEdge<MBBPostDomTree>(MBBPostDomTree &DT,
3030
MachineBasicBlock *From,
3131
MachineBasicBlock *To);
32-
template void ApplyUpdates<MBBPostDomTree>(MBBPostDomTree &DT,
32+
template LLVM_EXPORT_TEMPLATE void ApplyUpdates<MBBPostDomTree>(MBBPostDomTree &DT,
3333
MBBPostDomTreeGraphDiff &,
3434
MBBPostDomTreeGraphDiff *);
35-
template bool Verify<MBBPostDomTree>(const MBBPostDomTree &DT,
35+
template LLVM_EXPORT_TEMPLATE bool Verify<MBBPostDomTree>(const MBBPostDomTree &DT,
3636
MBBPostDomTree::VerificationLevel VL);
3737

3838
} // namespace DomTreeBuilder

llvm/lib/CodeGen/RegAllocScore.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@
2323
#include "llvm/Support/CommandLine.h"
2424

2525
using namespace llvm;
26-
cl::opt<double> CopyWeight("regalloc-copy-weight", cl::init(0.2), cl::Hidden);
27-
cl::opt<double> LoadWeight("regalloc-load-weight", cl::init(4.0), cl::Hidden);
28-
cl::opt<double> StoreWeight("regalloc-store-weight", cl::init(1.0), cl::Hidden);
29-
cl::opt<double> CheapRematWeight("regalloc-cheap-remat-weight", cl::init(0.2),
26+
LLVM_ABI cl::opt<double> CopyWeight("regalloc-copy-weight", cl::init(0.2), cl::Hidden);
27+
LLVM_ABI cl::opt<double> LoadWeight("regalloc-load-weight", cl::init(4.0), cl::Hidden);
28+
LLVM_ABI cl::opt<double> StoreWeight("regalloc-store-weight", cl::init(1.0), cl::Hidden);
29+
LLVM_ABI cl::opt<double> CheapRematWeight("regalloc-cheap-remat-weight", cl::init(0.2),
3030
cl::Hidden);
31-
cl::opt<double> ExpensiveRematWeight("regalloc-expensive-remat-weight",
31+
LLVM_ABI cl::opt<double> ExpensiveRematWeight("regalloc-expensive-remat-weight",
3232
cl::init(1.0), cl::Hidden);
3333
#define DEBUG_TYPE "regalloc-score"
3434

0 commit comments

Comments
 (0)