|
26 | 26 | #include "llvm/CodeGen/MachineBasicBlock.h"
|
27 | 27 | #include "llvm/CodeGen/MachineInstr.h"
|
28 | 28 | #include "llvm/CodeGen/MachineMemOperand.h"
|
29 |
| -#include "llvm/IR/Constants.h" |
30 | 29 | #include "llvm/IR/EHPersonalities.h"
|
31 |
| -#include "llvm/IR/Instructions.h" |
32 | 30 | #include "llvm/Support/Allocator.h"
|
33 | 31 | #include "llvm/Support/ArrayRecycler.h"
|
34 | 32 | #include "llvm/Support/AtomicOrdering.h"
|
35 | 33 | #include "llvm/Support/Compiler.h"
|
36 |
| -#include "llvm/Support/MD5.h" |
37 | 34 | #include "llvm/Support/Recycler.h"
|
38 | 35 | #include "llvm/Target/TargetOptions.h"
|
39 | 36 | #include <bitset>
|
@@ -526,26 +523,7 @@ class LLVM_ABI MachineFunction {
|
526 | 523 | /// Extracts the numeric type id from the CallBase's callee_type Metadata,
|
527 | 524 | /// and sets CalleeTypeIds. This is used as type id for the indirect call in
|
528 | 525 | /// the call graph section.
|
529 |
| - CallSiteInfo(const CallBase &CB) { |
530 |
| - // Call graph section needs numeric callee_type id only for indirect |
531 |
| - // calls. |
532 |
| - if (!CB.isIndirectCall()) |
533 |
| - return; |
534 |
| - |
535 |
| - MDNode *CalleeTypeList = CB.getMetadata(LLVMContext::MD_callee_type); |
536 |
| - if (!CalleeTypeList) |
537 |
| - return; |
538 |
| - |
539 |
| - for (const MDOperand &Op : CalleeTypeList->operands()) { |
540 |
| - MDNode *TypeMD = cast<MDNode>(Op); |
541 |
| - MDString *TypeIdStr = cast<MDString>(TypeMD->getOperand(1)); |
542 |
| - // Compute numeric type id from generalized type id string |
543 |
| - uint64_t TypeIdVal = MD5Hash(TypeIdStr->getString()); |
544 |
| - IntegerType *Int64Ty = Type::getInt64Ty(CB.getContext()); |
545 |
| - CalleeTypeIds.push_back( |
546 |
| - ConstantInt::get(Int64Ty, TypeIdVal, /*IsSigned=*/false)); |
547 |
| - } |
548 |
| - } |
| 526 | + CallSiteInfo(const CallBase &CB); |
549 | 527 | };
|
550 | 528 |
|
551 | 529 | struct CalledGlobalInfo {
|
|
0 commit comments