Skip to content

Commit 1fd9775

Browse files
necipfazilPrabhuk
authored andcommitted
Rename OB_type to OB_callee_type.
Created using spr 1.3.6-beta.1
2 parents 3fad066 + 1f6e111 commit 1fd9775

File tree

12 files changed

+32
-30
lines changed

12 files changed

+32
-30
lines changed

llvm/include/llvm/CodeGen/MachineFunction.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ class LLVM_ABI MachineFunction {
514514
return;
515515

516516
std::optional<OperandBundleUse> Opt =
517-
CB.getOperandBundle(LLVMContext::OB_type);
517+
CB.getOperandBundle(LLVMContext::OB_callee_type);
518518
// Return if the operand bundle for call graph section cannot be found.
519519
if (!Opt)
520520
return;

llvm/include/llvm/IR/LLVMContext.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class LLVMContext {
9696
OB_ptrauth = 7, // "ptrauth"
9797
OB_kcfi = 8, // "kcfi"
9898
OB_convergencectrl = 9, // "convergencectrl"
99-
OB_type = 10, // "type"
99+
OB_callee_type = 10, // "callee_type"
100100
};
101101

102102
/// getMDKindID - Return a unique non-zero ID for the specified metadata kind.

llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3333,7 +3333,8 @@ void SelectionDAGBuilder::visitInvoke(const InvokeInst &I) {
33333333
{LLVMContext::OB_deopt, LLVMContext::OB_gc_transition,
33343334
LLVMContext::OB_gc_live, LLVMContext::OB_funclet,
33353335
LLVMContext::OB_cfguardtarget, LLVMContext::OB_ptrauth,
3336-
LLVMContext::OB_clang_arc_attachedcall, LLVMContext::OB_type}) &&
3336+
LLVMContext::OB_clang_arc_attachedcall,
3337+
LLVMContext::OB_callee_type}) &&
33373338
"Cannot lower invokes with arbitrary operand bundles yet!");
33383339

33393340
const Value *Callee(I.getCalledOperand());
@@ -3424,7 +3425,7 @@ void SelectionDAGBuilder::visitCallBr(const CallBrInst &I) {
34243425
// have to do anything here to lower funclet bundles.
34253426
assert(!I.hasOperandBundlesOtherThan({LLVMContext::OB_deopt,
34263427
LLVMContext::OB_funclet,
3427-
LLVMContext::OB_type}) &&
3428+
LLVMContext::OB_callee_type}) &&
34283429
"Cannot lower callbrs with arbitrary operand bundles yet!");
34293430

34303431
assert(I.isInlineAsm() && "Only know how to handle inlineasm callbr");
@@ -9588,7 +9589,7 @@ void SelectionDAGBuilder::visitCall(const CallInst &I) {
95889589
{LLVMContext::OB_deopt, LLVMContext::OB_funclet,
95899590
LLVMContext::OB_cfguardtarget, LLVMContext::OB_preallocated,
95909591
LLVMContext::OB_clang_arc_attachedcall, LLVMContext::OB_kcfi,
9591-
LLVMContext::OB_convergencectrl, LLVMContext::OB_type}) &&
9592+
LLVMContext::OB_convergencectrl, LLVMContext::OB_callee_type}) &&
95929593
"Cannot lower calls with arbitrary operand bundles!");
95939594

95949595
SDValue Callee = getValue(I.getCalledOperand());

llvm/lib/IR/LLVMContext.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ LLVMContext::LLVMContext() : pImpl(new LLVMContextImpl(*this)) {
8282
assert(Entry->second == BundleTagID && "operand bundle id drifted!");
8383
}
8484

85-
[[maybe_unused]] auto *TypeEntry = pImpl->getOrInsertBundleTag("type");
86-
assert(TypeEntry->second == LLVMContext::OB_type &&
87-
"type operand bundle id drifted!");
85+
[[maybe_unused]] auto *TypeEntry = pImpl->getOrInsertBundleTag("callee_type");
86+
assert(TypeEntry->second == LLVMContext::OB_callee_type &&
87+
"callee_type operand bundle id drifted!");
8888

8989
SyncScope::ID SingleThreadSSID =
9090
pImpl->getOrInsertSyncScopeID("singlethread");

llvm/lib/IR/Verifier.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3722,13 +3722,13 @@ void Verifier::visitCallBase(CallBase &Call) {
37223722
visitIntrinsicCall(ID, Call);
37233723

37243724
// Verify that a callsite has at most one operand bundle for each of the
3725-
// following: "deopt", "funclet", "gc-transition", "cfguardtarget", "type",
3726-
// "preallocated", and "ptrauth".
3725+
// following: "deopt", "funclet", "gc-transition", "cfguardtarget",
3726+
// "callee_type", "preallocated", and "ptrauth".
37273727
bool FoundDeoptBundle = false, FoundFuncletBundle = false,
37283728
FoundGCTransitionBundle = false, FoundCFGuardTargetBundle = false,
37293729
FoundPreallocatedBundle = false, FoundGCLiveBundle = false,
37303730
FoundPtrauthBundle = false, FoundKCFIBundle = false,
3731-
FoundAttachedCallBundle = false, FoundTypeBundle = false;
3731+
FoundAttachedCallBundle = false, FoundCalleeTypeBundle = false;
37323732
for (unsigned i = 0, e = Call.getNumOperandBundles(); i < e; ++i) {
37333733
OperandBundleUse BU = Call.getOperandBundleAt(i);
37343734
uint32_t Tag = BU.getTagID();
@@ -3791,9 +3791,10 @@ void Verifier::visitCallBase(CallBase &Call) {
37913791
"Multiple \"clang.arc.attachedcall\" operand bundles", Call);
37923792
FoundAttachedCallBundle = true;
37933793
verifyAttachedCallBundle(Call, BU);
3794-
} else if (Tag == LLVMContext::OB_type) {
3795-
Check(!FoundTypeBundle, "Multiple \"type\" operand bundles", Call);
3796-
FoundTypeBundle = true;
3794+
} else if (Tag == LLVMContext::OB_callee_type) {
3795+
Check(!FoundCalleeTypeBundle, "Multiple \"callee_type\" operand bundles",
3796+
Call);
3797+
FoundCalleeTypeBundle = true;
37973798
}
37983799
}
37993800

llvm/test/CodeGen/AArch64/call-site-info-typeid.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ entry:
2121
; CHECK: callSites:
2222
; CHECK-NEXT: - { bb: {{.*}}, offset: {{.*}}, fwdArgRegs: [], typeId:
2323
; CHECK-NEXT: 7854600665770582568 }
24-
call void %0(i8 signext 97) [ "type"(metadata !"_ZTSFvcE.generalized") ]
24+
call void %0(i8 signext 97) [ "callee_type"(metadata !"_ZTSFvcE.generalized") ]
2525
ret i32 0
2626
}
2727

llvm/test/CodeGen/ARM/call-site-info-typeid.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ entry:
2121
; CHECK: callSites:
2222
; CHECK-NEXT: - { bb: {{.*}}, offset: {{.*}}, fwdArgRegs: [], typeId:
2323
; CHECK-NEXT: 7854600665770582568 }
24-
call void %0(i8 signext 97) [ "type"(metadata !"_ZTSFvcE.generalized") ]
24+
call void %0(i8 signext 97) [ "callee_type"(metadata !"_ZTSFvcE.generalized") ]
2525
ret i32 0
2626
}
2727

llvm/test/CodeGen/MIR/X86/call-site-info-typeid.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ entry:
9494
store i32 0, ptr %retval, align 4
9595
store ptr @foo, ptr %fp, align 8
9696
%0 = load ptr, ptr %fp, align 8
97-
call void %0(i8 signext 97) [ "type"(metadata !"_ZTSFvcE.generalized") ]
97+
call void %0(i8 signext 97) [ "callee_type"(metadata !"_ZTSFvcE.generalized") ]
9898
ret i32 0
9999
}
100100

llvm/test/CodeGen/Mips/call-site-info-typeid.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ entry:
2121
; CHECK: callSites:
2222
; CHECK-NEXT: - { bb: {{.*}}, offset: {{.*}}, fwdArgRegs: [], typeId:
2323
; CHECK-NEXT: 7854600665770582568 }
24-
call void %0(i8 signext 97) [ "type"(metadata !"_ZTSFvcE.generalized") ]
24+
call void %0(i8 signext 97) [ "callee_type"(metadata !"_ZTSFvcE.generalized") ]
2525
ret i32 0
2626
}
2727

llvm/test/CodeGen/X86/call-site-info-typeid.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ entry:
2121
; CHECK: callSites:
2222
; CHECK-NEXT: - { bb: {{.*}}, offset: {{.*}}, fwdArgRegs: [], typeId:
2323
; CHECK-NEXT: 7854600665770582568 }
24-
call void %0(i8 signext 97) [ "type"(metadata !"_ZTSFvcE.generalized") ]
24+
call void %0(i8 signext 97) [ "callee_type"(metadata !"_ZTSFvcE.generalized") ]
2525
ret i32 0
2626
}
2727

0 commit comments

Comments
 (0)