[PATCH] D41826: use external template to suppres OptBisect::shouldRunPass() instantiation
Li Jinpei via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 8 10:18:52 PST 2018
lijinpei created this revision.
Herald added a subscriber: llvm-commits.
There are explicit instantiations for OptBisect::shouldRunPass() in lib/IR/OptBiset.cpp, so we can add extern template declarations in include/llvm/IR/OptBiset.h to suppress template instantiations in every .c file.
Repository:
rL LLVM
https://reviews.llvm.org/D41826
Files:
include/llvm/IR/OptBisect.h
Index: include/llvm/IR/OptBisect.h
===================================================================
--- include/llvm/IR/OptBisect.h
+++ include/llvm/IR/OptBisect.h
@@ -20,6 +20,12 @@
namespace llvm {
class Pass;
+class Module;
+class Function;
+class BasicBlock;
+class Loop;
+class CallGraphSCC;
+class Region;
/// This class implements a mechanism to disable passes and individual
/// optimizations at compile time based on a command line option
@@ -58,6 +64,13 @@
unsigned LastBisectNum = 0;
};
+extern template bool OptBisect::shouldRunPass(const Pass *, const Module &);
+extern template bool OptBisect::shouldRunPass(const Pass *, const Function &);
+extern template bool OptBisect::shouldRunPass(const Pass *, const BasicBlock &);
+extern template bool OptBisect::shouldRunPass(const Pass *, const Loop &);
+extern template bool OptBisect::shouldRunPass(const Pass *, const CallGraphSCC &);
+extern template bool OptBisect::shouldRunPass(const Pass *, const Region &);
+
} // end namespace llvm
#endif // LLVM_IR_OPTBISECT_H
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41826.128949.patch
Type: text/x-patch
Size: 1053 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180108/1718d75b/attachment.bin>
More information about the llvm-commits
mailing list