Skip to content

Commit abfcb9c

Browse files
committed
Reorder commits.
Created using spr 1.3.6-beta.1
2 parents 8f53618 + a794047 commit abfcb9c

File tree

14 files changed

+17
-686
lines changed

14 files changed

+17
-686
lines changed

clang/docs/CallGraphSection.rst

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

clang/lib/CodeGen/CGCall.cpp

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
#include "clang/AST/Decl.h"
2626
#include "clang/AST/DeclCXX.h"
2727
#include "clang/AST/DeclObjC.h"
28-
#include "clang/AST/Type.h"
2928
#include "clang/Basic/CodeGenOptions.h"
3029
#include "clang/Basic/TargetInfo.h"
3130
#include "clang/CodeGen/CGFunctionInfo.h"
@@ -5078,11 +5077,6 @@ static unsigned getMaxVectorWidth(const llvm::Type *Ty) {
50785077
return MaxVectorWidth;
50795078
}
50805079

5081-
static bool isCXXDeclType(const FunctionDecl *FD) {
5082-
return isa<CXXConstructorDecl>(FD) || isa<CXXMethodDecl>(FD) ||
5083-
isa<CXXDestructorDecl>(FD);
5084-
}
5085-
50865080
RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo,
50875081
const CGCallee &Callee,
50885082
ReturnValueSlot ReturnValue,
@@ -5771,38 +5765,6 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo,
57715765
AllocAlignAttrEmitter AllocAlignAttrEmitter(*this, TargetDecl, CallArgs);
57725766
Attrs = AllocAlignAttrEmitter.TryEmitAsCallSiteAttribute(Attrs);
57735767

5774-
if (CGM.getCodeGenOpts().CallGraphSection) {
5775-
// Create operand bundle only for indirect calls, not for all
5776-
if (callOrInvoke && *callOrInvoke && (*callOrInvoke)->isIndirectCall()) {
5777-
5778-
assert((TargetDecl && TargetDecl->getFunctionType() ||
5779-
Callee.getAbstractInfo().getCalleeFunctionProtoType()) &&
5780-
"cannot find callsite type");
5781-
5782-
QualType CST;
5783-
if (TargetDecl && TargetDecl->getFunctionType())
5784-
CST = QualType(TargetDecl->getFunctionType(), 0);
5785-
else if (const auto *FPT =
5786-
Callee.getAbstractInfo().getCalleeFunctionProtoType())
5787-
CST = QualType(FPT, 0);
5788-
5789-
if (!CST.isNull()) {
5790-
auto *TypeIdMD = CGM.CreateMetadataIdentifierGeneralized(CST);
5791-
auto *TypeIdMDVal =
5792-
llvm::MetadataAsValue::get(getLLVMContext(), TypeIdMD);
5793-
BundleList.emplace_back("type", TypeIdMDVal);
5794-
}
5795-
5796-
// Set type identifier metadata of indirect calls for call graph section.
5797-
if (const FunctionDecl *FD = dyn_cast_or_null<FunctionDecl>(TargetDecl)) {
5798-
// Type id metadata is set only for C/C++ contexts.
5799-
if (isCXXDeclType(FD)) {
5800-
CGM.CreateFunctionTypeMetadataForIcall(FD->getType(), *callOrInvoke);
5801-
}
5802-
}
5803-
}
5804-
}
5805-
58065768
// Emit the actual call/invoke instruction.
58075769
llvm::CallBase *CI;
58085770
if (!InvokeDest) {

clang/lib/CodeGen/CGExpr.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6173,12 +6173,6 @@ RValue CodeGenFunction::EmitCall(QualType CalleeType,
61736173
if (CallOrInvoke)
61746174
*CallOrInvoke = LocalCallOrInvoke;
61756175

6176-
// Set type identifier metadata of indirect calls for call graph section.
6177-
if (CGM.getCodeGenOpts().CallGraphSection && LocalCallOrInvoke &&
6178-
LocalCallOrInvoke->isIndirectCall())
6179-
CGM.CreateFunctionTypeMetadataForIcall(QualType(FnType, 0),
6180-
LocalCallOrInvoke);
6181-
61826176
return Call;
61836177
}
61846178

clang/lib/CodeGen/CGObjCMac.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2214,8 +2214,9 @@ CGObjCCommonMac::EmitMessageSend(CodeGen::CodeGenFunction &CGF,
22142214

22152215
llvm::CallBase *CallSite;
22162216
CGCallee Callee = CGCallee::forDirect(BitcastFn);
2217-
RValue rvalue =
2218-
CGF.EmitCall(MSI.CallInfo, Callee, Return, ActualArgs, &CallSite);
2217+
RValue rvalue = CGF.EmitCall(MSI.CallInfo, Callee, Return, ActualArgs,
2218+
&CallSite);
2219+
22192220
// Mark the call as noreturn if the method is marked noreturn and the
22202221
// receiver cannot be null.
22212222
if (Method && Method->hasAttr<NoReturnAttr>() && !ReceiverCanBeNull) {

0 commit comments

Comments
 (0)