[llvm] 3da4774 - [IR] Move CallBase::getOperandBundlesAsDefs out of line, NFC
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 24 17:25:49 PST 2020
Author: Reid Kleckner
Date: 2020-01-24T17:25:42-08:00
New Revision: 3da47749ddd0cfcaa829137a2329a67e20def937
URL: https://github.com/llvm/llvm-project/commit/3da47749ddd0cfcaa829137a2329a67e20def937
DIFF: https://github.com/llvm/llvm-project/commit/3da47749ddd0cfcaa829137a2329a67e20def937.diff
LOG: [IR] Move CallBase::getOperandBundlesAsDefs out of line, NFC
Copying operand bundles doesn't need to be inlined, and this template
instantiation shows up in ClangBuildAnalyzer.
Added:
Modified:
llvm/include/llvm/IR/InstrTypes.h
llvm/lib/IR/Instructions.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/IR/InstrTypes.h b/llvm/include/llvm/IR/InstrTypes.h
index b2cdd58a5046..31c526e8505d 100644
--- a/llvm/include/llvm/IR/InstrTypes.h
+++ b/llvm/include/llvm/IR/InstrTypes.h
@@ -1876,10 +1876,7 @@ class CallBase : public Instruction {
/// OperandBundleUser to a vector of OperandBundleDefs. Note:
/// OperandBundeUses and OperandBundleDefs are non-trivially *
diff erent*
/// representations of operand bundles (see documentation above).
- void getOperandBundlesAsDefs(SmallVectorImpl<OperandBundleDef> &Defs) const {
- for (unsigned i = 0, e = getNumOperandBundles(); i != e; ++i)
- Defs.emplace_back(getOperandBundleAt(i));
- }
+ void getOperandBundlesAsDefs(SmallVectorImpl<OperandBundleDef> &Defs) const;
/// Return the operand bundle for the operand at index OpIdx.
///
diff --git a/llvm/lib/IR/Instructions.cpp b/llvm/lib/IR/Instructions.cpp
index c264277fa53c..e93f4b302902 100644
--- a/llvm/lib/IR/Instructions.cpp
+++ b/llvm/lib/IR/Instructions.cpp
@@ -352,6 +352,12 @@ bool CallBase::hasFnAttrOnCalledFunction(StringRef Kind) const {
return false;
}
+void CallBase::getOperandBundlesAsDefs(
+ SmallVectorImpl<OperandBundleDef> &Defs) const {
+ for (unsigned i = 0, e = getNumOperandBundles(); i != e; ++i)
+ Defs.emplace_back(getOperandBundleAt(i));
+}
+
CallBase::op_iterator
CallBase::populateBundleOperandInfos(ArrayRef<OperandBundleDef> Bundles,
const unsigned BeginIndex) {
More information about the llvm-commits
mailing list