name
stringlengths 1
473k
| code
stringlengths 7
647k
| asm
stringlengths 4
3.39M
| file
stringlengths 8
196
|
---|---|---|---|
clang::TreeTransform<(anonymous namespace)::ExtractTypeForDeductionGuide>::TransformOMPAtClause(clang::OMPAtClause*)
|
SourceLocation getAtKindKwLoc() const { return KindKwLoc; }
|
movl 0x10(%rsi), %eax
movl 0x14(%rsi), %edx
movl 0xc(%rsi), %r8d
movl (%rsi), %ecx
movl 0x4(%rsi), %r9d
movq (%rdi), %rsi
movq 0x2f0(%rsi), %rdi
movl %eax, %esi
jmp 0xaa30ae
nop
|
/clang/AST/OpenMPClause.h
|
clang::TreeTransform<(anonymous namespace)::ExtractTypeForDeductionGuide>::TransformReferenceType(clang::TypeLocBuilder&, clang::ReferenceTypeLoc)
|
QualType
TreeTransform<Derived>::TransformReferenceType(TypeLocBuilder &TLB,
ReferenceTypeLoc TL) {
const ReferenceType *T = TL.getTypePtr();
// Note that this works with the pointee-as-written.
QualType PointeeType = getDerived().TransformType(TLB, TL.getPointeeLoc());
if (PointeeType.isNull())
return QualType();
QualType Result = TL.getType();
if (getDerived().AlwaysRebuild() ||
PointeeType != T->getPointeeTypeAsWritten()) {
Result = getDerived().RebuildReferenceType(PointeeType,
T->isSpelledAsLValue(),
TL.getSigilLoc());
if (Result.isNull())
return QualType();
}
// Objective-C ARC can add lifetime qualifiers to the type that we're
// referring to.
TLB.TypeWasModifiedSafely(
Result->castAs<ReferenceType>()->getPointeeTypeAsWritten());
// r-value references can be rebuilt as l-value references.
ReferenceTypeLoc NewTL;
if (isa<LValueReferenceType>(Result))
NewTL = TLB.push<LValueReferenceTypeLoc>(Result);
else
NewTL = TLB.push<RValueReferenceTypeLoc>(Result);
NewTL.setSigilLoc(TL.getSigilLoc());
return Result;
}
|
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movq %rsp, %rdi
movq %rdx, (%rdi)
movq %rcx, 0x8(%rdi)
callq 0x4c622c
movq %rdx, %rcx
movq %r15, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0xbeeace
cmpq $0x10, %rax
jae 0xc08be9
xorl %r15d, %r15d
jmp 0xc08c66
movq (%r15), %rdi
cmpl $-0x1, 0x3218(%rdi)
jne 0xc08c01
cmpq 0x20(%r14), %rax
jne 0xc08c01
movq (%rsp), %r14
jmp 0xc08c2a
movzbl 0x12(%r14), %edx
shrl $0x3, %edx
andl $0x1, %edx
movq 0x8(%rsp), %rcx
movl (%rcx), %ecx
xorl %r15d, %r15d
movq %rax, %rsi
xorl %r8d, %r8d
callq 0xc798d2
movq %rax, %r14
cmpq $0x10, %rax
jb 0xc08c66
movq %r14, %r15
andq $-0x10, %r15
movq (%r15), %rdi
callq 0x4c5d10
movq (%r15), %rax
cmpb $0x29, 0x10(%rax)
jne 0xc08c4f
movq %rbx, %rdi
movq %r14, %rsi
callq 0x820b46
jmp 0xc08c5a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x820b52
movq 0x8(%rsp), %rax
movl (%rax), %eax
movl %eax, (%rdx)
movq %r14, %r15
movq %r15, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
|
/Sema/TreeTransform.h
|
clang::Sema::getTemplateInstantiationArgs(clang::NamedDecl const*, clang::DeclContext const*, bool, std::optional<llvm::ArrayRef<clang::TemplateArgument>>, bool, clang::FunctionDecl const*, bool, bool)
|
MultiLevelTemplateArgumentList Sema::getTemplateInstantiationArgs(
const NamedDecl *ND, const DeclContext *DC, bool Final,
std::optional<ArrayRef<TemplateArgument>> Innermost, bool RelativeToPrimary,
const FunctionDecl *Pattern, bool ForConstraintInstantiation,
bool SkipForSpecialization) {
assert((ND || DC) && "Can't find arguments for a decl if one isn't provided");
// Accumulate the set of template argument lists in this structure.
MultiLevelTemplateArgumentList Result;
using namespace TemplateInstArgsHelpers;
const Decl *CurDecl = ND;
if (!CurDecl)
CurDecl = Decl::castFromDeclContext(DC);
if (Innermost) {
Result.addOuterTemplateArguments(const_cast<NamedDecl *>(ND), *Innermost,
Final);
// Populate placeholder template arguments for TemplateTemplateParmDecls.
// This is essential for the case e.g.
//
// template <class> concept Concept = false;
// template <template <Concept C> class T> void foo(T<int>)
//
// where parameter C has a depth of 1 but the substituting argument `int`
// has a depth of 0.
if (const auto *TTP = dyn_cast<TemplateTemplateParmDecl>(CurDecl))
HandleDefaultTempArgIntoTempTempParam(TTP, Result);
CurDecl = Response::UseNextDecl(CurDecl).NextDecl;
}
while (!CurDecl->isFileContextDecl()) {
Response R;
if (const auto *VarTemplSpec =
dyn_cast<VarTemplateSpecializationDecl>(CurDecl)) {
R = HandleVarTemplateSpec(VarTemplSpec, Result, SkipForSpecialization);
} else if (const auto *PartialClassTemplSpec =
dyn_cast<ClassTemplatePartialSpecializationDecl>(CurDecl)) {
R = HandlePartialClassTemplateSpec(PartialClassTemplSpec, Result,
SkipForSpecialization);
} else if (const auto *ClassTemplSpec =
dyn_cast<ClassTemplateSpecializationDecl>(CurDecl)) {
R = HandleClassTemplateSpec(ClassTemplSpec, Result,
SkipForSpecialization);
} else if (const auto *Function = dyn_cast<FunctionDecl>(CurDecl)) {
R = HandleFunction(*this, Function, Result, Pattern, RelativeToPrimary,
ForConstraintInstantiation);
} else if (const auto *Rec = dyn_cast<CXXRecordDecl>(CurDecl)) {
R = HandleRecordDecl(*this, Rec, Result, Context,
ForConstraintInstantiation);
} else if (const auto *CSD =
dyn_cast<ImplicitConceptSpecializationDecl>(CurDecl)) {
R = HandleImplicitConceptSpecializationDecl(CSD, Result);
} else if (const auto *FTD = dyn_cast<FunctionTemplateDecl>(CurDecl)) {
R = HandleFunctionTemplateDecl(FTD, Result);
} else if (const auto *CTD = dyn_cast<ClassTemplateDecl>(CurDecl)) {
R = Response::ChangeDecl(CTD->getLexicalDeclContext());
} else if (!isa<DeclContext>(CurDecl)) {
R = Response::DontClearRelativeToPrimaryNextDecl(CurDecl);
if (const auto *TTP = dyn_cast<TemplateTemplateParmDecl>(CurDecl)) {
R = HandleDefaultTempArgIntoTempTempParam(TTP, Result);
}
} else {
R = HandleGenericDeclContext(CurDecl);
}
if (R.IsDone)
return Result;
if (R.ClearRelativeToPrimary)
RelativeToPrimary = false;
assert(R.NextDecl);
CurDecl = R.NextDecl;
}
return Result;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r9d, %ebp
movl %r8d, %r15d
movq %rdx, %r14
movq %rsi, 0x20(%rsp)
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
movabsq $0x400000000, %rax # imm = 0x400000000
movq %rax, 0x8(%rdi)
andl $0x0, 0x70(%rdi)
leaq 0x80(%rsp), %rbx
movq %rdi, 0x10(%rsp)
movb $0x0, 0x74(%rdi)
movq %rdx, %r12
testq %rdx, %rdx
jne 0xc0907d
movq %rcx, %rdi
callq 0xe1d8a2
movq %rax, %r12
cmpb $0x1, 0x10(%rbx)
jne 0xc090c8
movq (%rbx), %rdx
movq 0x8(%rbx), %rcx
movzbl %r15b, %r8d
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x80f6f0
testq %r12, %r12
je 0xc090bb
movl 0x1c(%r12), %eax
andl $0x7f, %eax
cmpl $0x41, %eax
jne 0xc090bb
movq %r12, %rdi
movq %rbx, %rsi
callq 0xc097e8
movq %r12, %rdi
callq 0xc09816
movq %rax, %r12
jmp 0xc090cd
movq 0x10(%rsp), %rbx
movb 0xa8(%rsp), %r15b
movb 0xa0(%rsp), %al
xorb $0x1, %al
movb %al, 0xf(%rsp)
movq %r12, %rdi
callq 0xe1c9fe
testb %al, %al
jne 0xc097d6
movl 0x1c(%r12), %eax
movl %eax, %ecx
andl $0x7e, %ecx
cmpl $0x26, %ecx
setne %cl
testq %r12, %r12
sete %dl
orb %cl, %dl
je 0xc091ee
testq %r12, %r12
sete %cl
andl $0x7f, %eax
cmpl $0x3a, %eax
setne %dl
orb %cl, %dl
je 0xc097c6
testq %r12, %r12
sete %dl
leal -0x3b(%rax), %ecx
cmpl $-0x2, %ecx
setb %sil
orb %dl, %sil
je 0xc0926c
testq %r12, %r12
sete %dl
leal -0x25(%rax), %esi
cmpl $-0x6, %esi
setb %sil
orb %dl, %sil
je 0xc092e0
testq %r12, %r12
sete %dl
cmpl $-0x3, %ecx
setb %cl
orb %dl, %cl
je 0xc0940b
testq %r12, %r12
sete %cl
cmpl $0x50, %eax
setne %dl
orb %cl, %dl
je 0xc09492
testq %r12, %r12
sete %cl
cmpl $0x44, %eax
setne %dl
orb %cl, %dl
je 0xc0956d
testq %r12, %r12
sete %cl
cmpl $0x45, %eax
setne %al
orb %cl, %al
je 0xc0960b
movq %r12, %rdi
callq 0xe1dbf8
testb %al, %al
jne 0xc0927c
movq %r12, %rdi
callq 0xc09842
movq %rdx, %r13
testq %r12, %r12
je 0xc092c3
movl 0x1c(%r12), %ecx
andl $0x7f, %ecx
cmpl $0x41, %ecx
jne 0xc092c3
movq %r12, %rdi
movq %rbx, %rsi
callq 0xc097e8
jmp 0xc092c0
movq %r12, %rdi
callq 0xbdcf52
testb %al, %al
jne 0xc092b8
movb 0x8c(%r12), %al
andb $0x7, %al
cmpb $0x2, %al
jne 0xc0921d
movl 0x1c(%r12), %eax
andl $0x7f, %eax
cmpl $0x27, %eax
jne 0xc097d6
movq %r12, %rdi
callq 0x7444b8
movq %rax, %r14
testb $0x4, %r14b
sete %al
andq $-0x8, %r14
sete %cl
orb %al, %cl
je 0xc09286
testb %r15b, %r15b
jne 0xc0925b
movq %r12, %rdi
callq 0x7444d4
movl (%rax), %ecx
leaq 0x8(%rax), %rdx
movq %rbx, %rdi
movq %r14, %rsi
xorl %r8d, %r8d
callq 0x80f6f0
movq %r14, %rdi
callq 0x743cb4
testb %al, %al
je 0xc092b8
jmp 0xc097d6
movq %r12, %rdi
callq 0xbdc4ce
testb %al, %al
je 0xc0938e
movq %r12, %rdi
callq 0xc09816
jmp 0xc092c0
testb %r15b, %r15b
jne 0xc092a7
movq %r12, %rdi
callq 0x7444d4
movl (%rax), %ecx
leaq 0x8(%rax), %rdx
movq %rbx, %rdi
movq %r14, %rsi
xorl %r8d, %r8d
callq 0x80f6f0
movq 0x50(%r14), %rax
testb $0x4, 0x98(%rax)
jne 0xc097d6
movq %r12, %rdi
callq 0xc09842
movq %rdx, %r13
testb $0x1, %r13b
jne 0xc097d6
btl $0x8, %r13d
setae %cl
andb %cl, %bpl
movq %rax, %r12
jmp 0xc090e2
testb $0x1, %bpl
je 0xc09478
movq %r12, %rdi
callq 0xe12ae2
testq %rax, %rax
je 0xc094e1
movq %rax, %rdx
addq $0x8, %rdx
movl (%rax), %ecx
movq %rbx, %rdi
movq %r12, %rsi
xorl %r8d, %r8d
callq 0x80f6f0
testb $0x1, %bpl
je 0xc0934b
movq %r12, %rdi
callq 0xe10714
cmpl $0x2, %eax
je 0xc0927c
movzwl 0x1e(%r12), %eax
testw $0x180, %ax # imm = 0x180
je 0xc0934b
movq %r12, %rdi
callq 0xe14470
movzwl 0x1e(%rax), %eax
testw $0x180, %ax # imm = 0x180
je 0xc0927c
movq %r12, %rdi
callq 0xe14470
movq %rax, %rdi
callq 0x743cb4
movl $0x101, %r13d # imm = 0x101
testb %al, %al
jne 0xc0948b
cmpb $0x0, 0xa0(%rsp)
jne 0xc094e9
leaq 0x48(%r12), %rdi
callq 0xc16ea4
testb %al, %al
jne 0xc0948b
jmp 0xc094e9
movb 0xb4(%r12), %al
andb $0x7, %al
cmpb $0x2, %al
jne 0xc093ad
movl 0x1c(%r12), %eax
andl $0x7f, %eax
cmpl $0x3a, %eax
jne 0xc09485
testb %r15b, %r15b
jne 0xc093ce
movq %r12, %rdi
callq 0x72e0b8
movl (%rax), %ecx
leaq 0x8(%rax), %rdx
movq %rbx, %rdi
movq %r12, %rsi
xorl %r8d, %r8d
callq 0x80f6f0
movq %r12, %rdi
callq 0xe349d6
movq %rax, %rdi
callq 0x743cb4
testb %al, %al
jne 0xc09485
movq %r12, %rdi
callq 0x4dc972
testb $0x4, %al
sete %cl
andq $-0x8, %rax
sete %dl
orb %cl, %dl
jne 0xc0927c
movq 0x10(%rax), %rax
jmp 0xc09610
movq %r12, %rdi
callq 0xe23014
testq %rax, %rax
je 0xc0944f
movq %rax, %rbx
movq %rax, %rdi
callq 0x743cb4
testb %al, %al
jne 0xc09466
cmpb $0x0, 0xa0(%rsp)
je 0xc0944f
movq %rbx, %rdi
callq 0xe33116
movq %rdx, %rcx
movq 0x10(%rsp), %rdi
movq %r12, %rsi
movq %rax, %rdx
xorl %r8d, %r8d
callq 0x80f6f0
movq %r12, %rdi
callq 0xe22fb2
testq %rax, %rax
je 0xc094c5
movl (%rax), %eax
andl $0x6, %eax
cmpl $0x2, %eax
jne 0xc094c5
movl $0x101, %r13d # imm = 0x101
xorl %eax, %eax
movq 0x10(%rsp), %rbx
jmp 0xc092c3
movq %r12, %rdi
callq 0xe14316
cmpl $0x2, %eax
jne 0xc094af
movl $0x101, %r13d # imm = 0x101
xorl %eax, %eax
jmp 0xc092c3
leaq 0x28(%r12), %rdx
movl 0x24(%r12), %ecx
movq %rbx, %rdi
movq %r12, %rsi
xorl %r8d, %r8d
callq 0x80f6f0
jmp 0xc0927c
movq %r12, %rdi
callq 0xe10714
cmpl $0x2, %eax
je 0xc0927c
jmp 0xc092ea
movzwl 0x1e(%r12), %eax
testw $0x180, %ax # imm = 0x180
movq 0x10(%rsp), %rbx
je 0xc095cd
xorl %eax, %eax
jmp 0xc095ed
movq %r12, %rdi
callq 0xe12d0c
movzwl 0x1e(%r12), %eax
testw $0x980, %ax # imm = 0x980
je 0xc0954a
movq %r12, %rdi
callq 0xe1db10
movzwl 0x8(%rax), %eax
andl $0x7f, %eax
cmpl $0x15, %eax
je 0xc0950d
testl %eax, %eax
jne 0xc0954a
cmpq $0x0, 0x98(%rsp)
je 0xc0960b
movq 0x98(%rsp), %rax
movq 0x10(%rax), %rcx
movq %rcx, %rax
andq $-0x8, %rax
testb $0x4, %cl
je 0xc09538
movq 0x8(%rax), %rax
movzwl 0x8(%rax), %eax
andl $0x7f, %eax
je 0xc0954a
cmpl $0x15, %eax
jne 0xc0960b
cmpb $0x0, 0xa0(%rsp)
je 0xc0927c
movzwl 0x1e(%r12), %eax
testw $0x180, %ax # imm = 0x180
jne 0xc0960b
jmp 0xc0927c
movq 0x10(%r12), %rax
movq %rax, %rdi
andq $-0x8, %rdi
movq %rdi, %rcx
andq $0x4, %rax
je 0xc09585
movq (%rdi), %rcx
movzwl 0x8(%rcx), %ecx
andl $0x7f, %ecx
addl $-0x39, %ecx
cmpl $0x2, %ecx
jb 0xc0973f
movq %r12, %rdi
callq 0xe33116
movq %rdx, %rcx
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
xorl %r8d, %r8d
callq 0x80f6f0
movq 0x30(%r12), %rax
movq 0x38(%rax), %rax
testb $0x4, %al
jne 0xc0965b
xorl %r13d, %r13d
jmp 0xc09662
movq %r12, %rdi
callq 0xe23014
testq %rax, %rax
je 0xc09624
movq %r12, %rdi
callq 0xe23014
movzwl 0x1e(%rax), %eax
testw $0x180, %ax # imm = 0x180
sete %al
orb 0xf(%rsp), %al
jne 0xc09624
movq %r12, %rdi
callq 0xe1db10
movzwl 0x8(%rax), %eax
andl $0x7f, %eax
cmpl $0x15, %eax
je 0xc0960b
testl %eax, %eax
jne 0xc09624
movq 0x10(%r12), %rax
movq %rax, %rdi
andq $-0x8, %rdi
testb $0x4, %al
jne 0xc09744
jmp 0xc09748
movq 0x80(%r12), %rax
testq %rax, %rax
je 0xc0927c
testb $0x10, 0xa(%rax)
je 0xc0927c
movq %r12, %rdi
callq 0xe22ba0
testq %rax, %rax
je 0xc09752
movl $0x100, %r13d # imm = 0x100
jmp 0xc092c3
andq $-0x8, %rax
movq (%rax), %r13
testq %r13, %r13
je 0xc0972c
testb $0x4, 0x8(%r13)
je 0xc0972c
movq 0x10(%r13), %rbx
testq %rbx, %rbx
je 0xc0972c
movl %r15d, %r14d
movq %r13, %rdi
callq 0xf40ca4
testb %al, %al
je 0xc0971c
movq %rbx, %rdi
callq 0xfa3124
testq %rax, %rax
je 0xc0971c
movq %rax, %r15
addq $0x30, %r15
movl 0x14(%rax), %ebx
movq 0x8(%rax), %rax
andq $-0x10, %rax
movq (%rax), %rdi
cmpb $0x1b, 0x10(%rdi)
jne 0xc09706
callq 0xfa1e8a
movq %rax, 0x18(%rsp)
movq %rax, %rdi
callq 0xe23014
testq %rax, %rax
je 0xc096e5
movq %rax, %rdi
callq 0xe33116
movq %rax, %r15
movq %rdx, %rbx
jmp 0xc09706
movq 0x18(%rsp), %rdi
movl 0x1c(%rdi), %eax
andl $0x7f, %eax
addl $-0x3b, %eax
cmpl $-0x2, %eax
jb 0xc09706
callq 0x72e0b8
movq %rax, %r15
movl (%rax), %ebx
addq $0x8, %r15
movq 0x10(%rsp), %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
xorl %r8d, %r8d
callq 0x80f6f0
movq 0x8(%r13), %r13
andq $-0x8, %r13
movl %r14d, %r15d
jmp 0xc09662
movq 0x10(%r12), %rdi
movl %edi, %eax
andl $0x4, %eax
andq $-0x8, %rdi
movq 0x10(%rsp), %rbx
testq %rax, %rax
je 0xc09748
movq 0x8(%rdi), %rdi
callq 0xc09834
jmp 0xc092c0
leaq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0xc16ef7
cmpb $0x0, 0xa0(%rsp)
je 0xc0927c
movq 0x28(%rsp), %r14
testq %r14, %r14
je 0xc0927c
movq %r12, %rdi
callq 0xe2288e
movq 0x30(%rsp), %rsi
movq %rax, %rdi
callq 0xc16f7f
testb %al, %al
je 0xc0927c
movq 0x38(%rsp), %rdx
movq 0x40(%rsp), %rcx
movq %rbx, %rdi
movq %r14, %rsi
xorl %r8d, %r8d
callq 0x80f6f0
movq 0x10(%r14), %rax
movq %rax, %rdi
andq $-0x8, %rdi
testb $0x4, %al
je 0xc09748
movq (%rdi), %rdi
jmp 0xc09748
testb %r15b, %r15b
jne 0xc097d6
movq %r12, %rdi
callq 0xe1c5ec
addl %eax, 0x70(%rbx)
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/Sema/SemaTemplateInstantiate.cpp
|
clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformPseudoObjectExpr(clang::PseudoObjectExpr*)
|
ExprResult
TreeTransform<Derived>::TransformPseudoObjectExpr(PseudoObjectExpr *E) {
// Rebuild the syntactic form. The original syntactic form has
// opaque-value expressions in it, so strip those away and rebuild
// the result. This is a really awful way of doing this, but the
// better solution (rebuilding the semantic expressions and
// rebinding OVEs as necessary) doesn't work; we'd need
// TreeTransform to not strip away implicit conversions.
Expr *newSyntacticForm = SemaRef.PseudoObject().recreateSyntacticForm(E);
ExprResult result = getDerived().TransformExpr(newSyntacticForm);
if (result.isInvalid()) return ExprError();
// If that gives us a pseudo-object result back, the pseudo-object
// expression must have been an lvalue-to-rvalue conversion which we
// should reapply.
if (result.get()->hasPlaceholderType(BuiltinType::PseudoObject))
result = SemaRef.PseudoObject().checkRValue(result.get());
return result;
}
|
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x300(%rax), %rdi
callq 0xb22cce
movq %rbx, %rdi
movq %rax, %rsi
callq 0xc1433e
cmpq $0x1, %rax
jne 0xc25dca
pushq $0x1
popq %r15
jmp 0xc25dfc
movq %rax, %r14
movq %rax, %r15
andq $-0x2, %r14
movq %r14, %rdi
movl $0x1ed, %esi # imm = 0x1ED
callq 0x82bc80
testb %al, %al
je 0xc25dfc
movq (%rbx), %rax
movq 0x300(%rax), %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0xb21b94
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
|
/Sema/TreeTransform.h
|
clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformOMPTargetParallelGenericLoopDirective(clang::OMPTargetParallelGenericLoopDirective*)
|
StmtResult
TreeTransform<Derived>::TransformOMPTargetParallelGenericLoopDirective(
OMPTargetParallelGenericLoopDirective *D) {
DeclarationNameInfo DirName;
getDerived().getSema().OpenMP().StartOpenMPDSABlock(
OMPD_target_parallel_loop, DirName, nullptr, D->getBeginLoc());
StmtResult Res = getDerived().TransformOMPExecutableDirective(D);
getDerived().getSema().OpenMP().EndOpenMPDSABlock(Res.get());
return Res;
}
|
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsp, %rdx
andq $0x0, (%rdx)
andl $0x0, 0x8(%rdx)
movq %rsi, %rbx
andq $0x0, 0x10(%rdx)
movq %rdi, %r14
movq (%rdi), %rax
movq 0x2f0(%rax), %rdi
movl 0xc(%rsi), %r8d
pushq $0x6d
popq %rsi
xorl %ecx, %ecx
callq 0xa82d3a
movq %r14, %rdi
movq %rbx, %rsi
callq 0xc38da8
movq %rax, %rbx
movq (%r14), %rax
movq 0x2f0(%rax), %rdi
movq %rbx, %rsi
andq $-0x2, %rsi
callq 0xa83044
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
|
/Sema/TreeTransform.h
|
clang::TemplateDeclInstantiator::VisitClassTemplatePartialSpecializationDecl(clang::ClassTemplatePartialSpecializationDecl*)
|
Decl *
TemplateDeclInstantiator::VisitClassTemplatePartialSpecializationDecl(
ClassTemplatePartialSpecializationDecl *D) {
ClassTemplateDecl *ClassTemplate = D->getSpecializedTemplate();
// Lookup the already-instantiated declaration in the instantiation
// of the class template and return that.
DeclContext::lookup_result Found
= Owner->lookup(ClassTemplate->getDeclName());
if (Found.empty())
return nullptr;
ClassTemplateDecl *InstClassTemplate
= dyn_cast<ClassTemplateDecl>(Found.front());
if (!InstClassTemplate)
return nullptr;
if (ClassTemplatePartialSpecializationDecl *Result
= InstClassTemplate->findPartialSpecInstantiatedFromMember(D))
return Result;
return InstantiateClassTemplatePartialSpecialization(InstClassTemplate, D);
}
|
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0xe349d6
movq 0x18(%r14), %rdi
movq 0x28(%rax), %rsi
callq 0xe1ea34
cmpq $0x8, %rax
jae 0xc44d56
xorl %eax, %eax
jmp 0xc44d91
movq %rax, %r15
testb $0x4, %r15b
sete %al
andq $-0x8, %r15
sete %cl
orb %al, %cl
jne 0xc44d6e
movq (%r15), %r15
xorl %eax, %eax
testq %r15, %r15
je 0xc44d91
movl 0x1c(%r15), %ecx
andl $0x7f, %ecx
cmpl $0x45, %ecx
jne 0xc44d91
movq %r15, %rdi
movq %rbx, %rsi
callq 0xe33b82
testq %rax, %rax
je 0xc44d97
popq %rbx
popq %r14
popq %r15
retq
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0xc44daa
|
/Sema/SemaTemplateInstantiateDecl.cpp
|
clang::TemplateTypeParmDecl::isPackExpansion() const
|
bool isPackExpansion() const {
if (!isParameterPack())
return false;
if (const TypeConstraint *TC = getTypeConstraint())
if (TC->hasExplicitTemplateArgs())
for (const auto &ArgLoc : TC->getTemplateArgsAsWritten()->arguments())
if (ArgLoc.getArgument().containsUnexpandedParameterPack())
return true;
return false;
}
|
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0xe32cdc
testb %al, %al
je 0xc48506
testb $0x4, 0x3c(%rbx)
je 0xc48506
movq 0x58(%rbx), %rax
movq 0x40(%rax), %r14
testq %r14, %r14
je 0xc48506
movl 0x8(%r14), %r15d
addq $0x10, %r14
shlq $0x5, %r15
testq %r15, %r15
setne %bl
je 0xc48508
movq %r14, %rdi
callq 0xf8cc9a
addq $0x20, %r14
addq $-0x20, %r15
testb %al, %al
je 0xc484e8
jmp 0xc48508
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
|
/clang/AST/DeclTemplate.h
|
clang::TreeTransform<clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation, clang::FunctionDecl*, bool, bool, bool)::$_0::operator()() const::SpecialMemberTypeInfoRebuilder>::TransformObjCMessageExpr(clang::ObjCMessageExpr*)
|
ExprResult
TreeTransform<Derived>::TransformObjCMessageExpr(ObjCMessageExpr *E) {
// Transform arguments.
bool ArgChanged = false;
SmallVector<Expr*, 8> Args;
Args.reserve(E->getNumArgs());
if (getDerived().TransformExprs(E->getArgs(), E->getNumArgs(), false, Args,
&ArgChanged))
return ExprError();
if (E->getReceiverKind() == ObjCMessageExpr::Class) {
// Class message: transform the receiver type.
TypeSourceInfo *ReceiverTypeInfo
= getDerived().TransformType(E->getClassReceiverTypeInfo());
if (!ReceiverTypeInfo)
return ExprError();
// If nothing changed, just retain the existing message send.
if (!getDerived().AlwaysRebuild() &&
ReceiverTypeInfo == E->getClassReceiverTypeInfo() && !ArgChanged)
return SemaRef.MaybeBindToTemporary(E);
// Build a new class message send.
SmallVector<SourceLocation, 16> SelLocs;
E->getSelectorLocs(SelLocs);
return getDerived().RebuildObjCMessageExpr(ReceiverTypeInfo,
E->getSelector(),
SelLocs,
E->getMethodDecl(),
E->getLeftLoc(),
Args,
E->getRightLoc());
}
else if (E->getReceiverKind() == ObjCMessageExpr::SuperClass ||
E->getReceiverKind() == ObjCMessageExpr::SuperInstance) {
if (!E->getMethodDecl())
return ExprError();
// Build a new class message send to 'super'.
SmallVector<SourceLocation, 16> SelLocs;
E->getSelectorLocs(SelLocs);
return getDerived().RebuildObjCMessageExpr(E->getSuperLoc(),
E->getSelector(),
SelLocs,
E->getReceiverType(),
E->getMethodDecl(),
E->getLeftLoc(),
Args,
E->getRightLoc());
}
// Instance message: transform the receiver
assert(E->getReceiverKind() == ObjCMessageExpr::Instance &&
"Only class and instance messages may be instantiated");
ExprResult Receiver
= getDerived().TransformExpr(E->getInstanceReceiver());
if (Receiver.isInvalid())
return ExprError();
// If nothing changed, just retain the existing message send.
if (!getDerived().AlwaysRebuild() &&
Receiver.get() == E->getInstanceReceiver() && !ArgChanged)
return SemaRef.MaybeBindToTemporary(E);
// Build a new instance message send.
SmallVector<SourceLocation, 16> SelLocs;
E->getSelectorLocs(SelLocs);
return getDerived().RebuildObjCMessageExpr(Receiver.get(),
E->getSelector(),
SelLocs,
E->getMethodDecl(),
E->getLeftLoc(),
Args,
E->getRightLoc());
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp # imm = 0x108
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x3f(%rsp), %r15
movb $0x0, (%r15)
leaq 0xc8(%rsp), %rax
movq %rax, -0x10(%rax)
movabsq $0x800000000, %rcx # imm = 0x800000000
movq %rcx, -0x8(%rax)
movzwl 0x18(%rsi), %esi
leaq 0xb8(%rsp), %r12
movq %r12, %rdi
callq 0x6338e8
leaq 0x30(%r14), %rsi
movzwl 0x18(%r14), %edx
movq %rbx, %rdi
xorl %ecx, %ecx
movq %r12, %r8
movq %r15, %r9
callq 0xc62612
pushq $0x1
popq %r15
testb %al, %al
jne 0xc5531b
movl 0x18(%r14), %eax
movl %eax, %ecx
shrl $0x10, %ecx
movzbl %cl, %ecx
leal -0x2(%rcx), %edx
cmpl $0x2, %edx
jae 0xc550a6
btl $0x18, %eax
jae 0xc5531b
cmpq $0x0, 0x10(%r14)
je 0xc5531b
leaq 0x78(%rsp), %rax
movq %rax, -0x10(%rax)
movabsq $0x1000000000, %rcx # imm = 0x1000000000
movq %rcx, -0x8(%rax)
leaq 0x68(%rsp), %rsi
movq %r14, %rdi
callq 0xe9740e
movl $0xfe0000, %eax # imm = 0xFE0000
andl 0x18(%r14), %eax
xorl %r15d, %r15d
movl $0x0, %ebp
cmpl $0x20000, %eax # imm = 0x20000
jne 0xc55002
movl 0x1c(%r14), %ebp
movq %r14, %rdi
callq 0xe9749e
movq %rax, 0x60(%rsp)
movq 0x68(%rsp), %r12
movl 0x70(%rsp), %r13d
movq %r14, %rdi
callq 0xe974b6
btl $0x18, 0x18(%r14)
jae 0xc5502d
movq 0x10(%r14), %r15
movl 0x20(%r14), %ecx
movl 0x24(%r14), %edx
movq 0xb8(%rsp), %rsi
movl 0xc0(%rsp), %edi
movq %rsi, 0x50(%rsp)
movq %rdi, 0x58(%rsp)
testb $0x2, 0x3a(%r15)
movq (%rbx), %rsi
movq 0x2d8(%rsi), %rdi
jne 0xc55115
movq %r12, 0x40(%rsp)
movq %r13, 0x48(%rsp)
movups 0x50(%rsp), %xmm0
movups %xmm0, 0x20(%rsp)
movups 0x40(%rsp), %xmm0
movups %xmm0, 0x8(%rsp)
andl $0x0, 0x30(%rsp)
movl %edx, 0x18(%rsp)
movl %ecx, (%rsp)
xorl %esi, %esi
movq %rax, %rdx
movl %ebp, %ecx
movq 0x60(%rsp), %r8
movq %r15, %r9
callq 0xa1a100
jmp 0xc55153
testl %ecx, %ecx
jne 0xc550bc
testl $0xff0000, %eax # imm = 0xFF0000
je 0xc55160
xorl %esi, %esi
jmp 0xc55164
andl $0xff0000, %eax # imm = 0xFF0000
cmpl $0x10000, %eax # imm = 0x10000
jne 0xc550ce
movq 0x28(%r14), %rsi
jmp 0xc550d0
xorl %esi, %esi
movq %rbx, %rdi
callq 0xc530de
cmpq $0x1, %rax
je 0xc5531b
movq %rax, %r12
movq (%rbx), %rdi
andq $-0x2, %r12
cmpl $-0x1, 0x3218(%rdi)
jne 0xc55261
movzbl 0x1a(%r14), %eax
shll $0x10, %eax
cmpl $0x10000, %eax # imm = 0x10000
jne 0xc5524f
movq 0x28(%r14), %rax
jmp 0xc55251
movq %r12, 0x40(%rsp)
movq %r13, 0x48(%rsp)
movups 0x50(%rsp), %xmm0
movups %xmm0, 0x20(%rsp)
movups 0x40(%rsp), %xmm0
movups %xmm0, 0x8(%rsp)
andl $0x0, 0x30(%rsp)
movl %edx, 0x18(%rsp)
movl %ecx, (%rsp)
xorl %esi, %esi
movq %rax, %rdx
movl %ebp, %ecx
movq 0x60(%rsp), %r8
movq %r15, %r9
callq 0xa18846
movq %rax, %r15
leaq 0x68(%rsp), %rdi
jmp 0xc55316
movq 0x28(%r14), %rsi
movq %rbx, %rdi
callq 0xc4f224
testq %rax, %rax
je 0xc5531b
movq %rax, %r12
movq (%rbx), %rdi
cmpl $-0x1, 0x3218(%rdi)
jne 0xc5519c
cmpb $0x0, 0x1a(%r14)
jne 0xc5519c
cmpq 0x28(%r14), %r12
jne 0xc5519c
cmpb $0x0, 0x3f(%rsp)
je 0xc5533d
leaq 0x78(%rsp), %rax
movq %rax, -0x10(%rax)
movabsq $0x1000000000, %rcx # imm = 0x1000000000
movq %rcx, -0x8(%rax)
leaq 0x68(%rsp), %r13
movq %r14, %rdi
movq %r13, %rsi
callq 0xe9740e
movq %r14, %rdi
callq 0xe9749e
movq (%r13), %rcx
movl 0x8(%r13), %esi
xorl %r9d, %r9d
btl $0x18, 0x18(%r14)
jae 0xc551e2
movq 0x10(%r14), %r9
movq 0xb8(%rsp), %rdx
movl 0xc0(%rsp), %edi
movl 0x20(%r14), %r8d
movl 0x24(%r14), %r10d
movq %rdx, 0x50(%rsp)
movq %rdi, 0x58(%rsp)
movq (%rbx), %rdx
movq 0x2d8(%rdx), %rdi
movq (%r12), %rdx
movq %rcx, 0x40(%rsp)
movq %rsi, 0x48(%rsp)
movups 0x50(%rsp), %xmm0
movups %xmm0, 0x20(%rsp)
movups 0x40(%rsp), %xmm0
movups %xmm0, 0x8(%rsp)
andl $0x0, 0x30(%rsp)
movl %r10d, 0x18(%rsp)
movl %r8d, (%rsp)
movq %r12, %rsi
xorl %ecx, %ecx
movq %rax, %r8
callq 0xa1a100
jmp 0xc55310
xorl %eax, %eax
cmpq %r12, %rax
jne 0xc55261
cmpb $0x0, 0x3f(%rsp)
je 0xc5533d
leaq 0x78(%rsp), %rax
movq %rax, -0x10(%rax)
movabsq $0x1000000000, %rcx # imm = 0x1000000000
movq %rcx, -0x8(%rax)
leaq 0x68(%rsp), %r13
movq %r14, %rdi
movq %r13, %rsi
callq 0xe9740e
movq %r14, %rdi
callq 0xe9749e
movq (%r13), %rcx
movl 0x8(%r13), %esi
xorl %r9d, %r9d
btl $0x18, 0x18(%r14)
jae 0xc552a7
movq 0x10(%r14), %r9
movq 0xb8(%rsp), %rdx
movl 0xc0(%rsp), %edi
movl 0x20(%r14), %r8d
movl 0x24(%r14), %r10d
movq %rdx, 0x50(%rsp)
movq %rdi, 0x58(%rsp)
movq (%rbx), %rdx
movq 0x2d8(%rdx), %rdi
movq 0x8(%r12), %rdx
movq %rcx, 0x40(%rsp)
movq %rsi, 0x48(%rsp)
movups 0x50(%rsp), %xmm0
movups %xmm0, 0x20(%rsp)
movups 0x40(%rsp), %xmm0
movups %xmm0, 0x8(%rsp)
andl $0x0, 0x30(%rsp)
movl %r10d, 0x18(%rsp)
movl %r8d, (%rsp)
movq %r12, %rsi
xorl %ecx, %ecx
movq %rax, %r8
callq 0xa18846
movq %rax, %r15
movq %r13, %rdi
callq 0x55b3e4
leaq 0xb8(%rsp), %rdi
callq 0x633cd8
movq %r15, %rax
addq $0x108, %rsp # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rsi
callq 0x9c58aa
movq %rax, %r15
jmp 0xc5531b
|
/Sema/TreeTransform.h
|
clang::TreeTransform<clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation, clang::FunctionDecl*, bool, bool, bool)::$_0::operator()() const::SpecialMemberTypeInfoRebuilder>::TransformObjCBridgedCastExpr(clang::ObjCBridgedCastExpr*)
|
ExprResult TreeTransform<Derived>::
TransformObjCBridgedCastExpr(ObjCBridgedCastExpr *E) {
TypeSourceInfo *TSInfo
= getDerived().TransformType(E->getTypeInfoAsWritten());
if (!TSInfo)
return ExprError();
ExprResult Result = getDerived().TransformExpr(E->getSubExpr());
if (Result.isInvalid())
return ExprError();
if (!getDerived().AlwaysRebuild() &&
TSInfo == E->getTypeInfoAsWritten() &&
Result.get() == E->getSubExpr())
return E;
return SemaRef.ObjC().BuildObjCBridgedCast(
E->getLParenLoc(), E->getBridgeKind(), E->getBridgeKeywordLoc(), TSInfo,
Result.get());
}
|
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
movq 0x18(%rsi), %rsi
callq 0xc4f224
pushq $0x1
popq %r12
testq %rax, %rax
je 0xc584b1
movq %rax, %r14
movq 0x10(%rbx), %rsi
movq %r15, %rdi
callq 0xc530de
cmpq $0x1, %rax
jne 0xc584c0
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq (%r15), %rcx
cmpl $-0x1, 0x3218(%rcx)
jne 0xc584df
cmpq 0x18(%rbx), %r14
jne 0xc584df
movq %rax, %rdx
andq $-0x2, %rdx
cmpq %rdx, 0x10(%rbx)
je 0xc5850d
movq 0x2d8(%rcx), %rdi
movzbl 0x28(%rbx), %edx
andl $0x3, %edx
movl 0x20(%rbx), %esi
movl 0x24(%rbx), %ecx
andq $-0x2, %rax
movq %r14, %r8
movq %rax, %r9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xa1e248
movq %rbx, %r12
jmp 0xc584b1
|
/Sema/TreeTransform.h
|
clang::TreeTransform<clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation, clang::FunctionDecl*, bool, bool, bool)::$_0::operator()() const::SpecialMemberTypeInfoRebuilder>::TransformCUDAKernelCallExpr(clang::CUDAKernelCallExpr*)
|
ExprResult
TreeTransform<Derived>::TransformCUDAKernelCallExpr(CUDAKernelCallExpr *E) {
// Transform the callee.
ExprResult Callee = getDerived().TransformExpr(E->getCallee());
if (Callee.isInvalid())
return ExprError();
// Transform exec config.
ExprResult EC = getDerived().TransformCallExpr(E->getConfig());
if (EC.isInvalid())
return ExprError();
// Transform arguments.
bool ArgChanged = false;
SmallVector<Expr*, 8> Args;
if (getDerived().TransformExprs(E->getArgs(), E->getNumArgs(), true, Args,
&ArgChanged))
return ExprError();
if (!getDerived().AlwaysRebuild() &&
Callee.get() == E->getCallee() &&
!ArgChanged)
return SemaRef.MaybeBindToTemporary(E);
// FIXME: Wrong source location information for the '('.
SourceLocation FakeLParenLoc
= ((Expr *)Callee.get())->getSourceRange().getBegin();
return getDerived().RebuildCallExpr(Callee.get(), FakeLParenLoc,
Args,
E->getRParenLoc(), EC.get());
}
|
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movzbl 0x3(%rsi), %eax
movq (%rsi,%rax), %rsi
callq 0xc530de
pushq $0x1
popq %r13
cmpq $0x1, %rax
je 0xc58cbb
movq %rax, %r15
movzbl 0x3(%r14), %eax
movq 0x8(%r14,%rax), %rsi
movq %rbx, %rdi
callq 0xc586dc
cmpq $0x1, %rax
je 0xc58cbb
movq %rax, %r12
leaq 0xf(%rsp), %r9
movb $0x0, (%r9)
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
movabsq $0x800000000, %rcx # imm = 0x800000000
movq %rcx, -0x8(%rax)
movl (%r14), %eax
movl 0x10(%r14), %edx
movl %eax, %ecx
shrl $0x18, %ecx
addq %r14, %rcx
shrl $0xf, %eax
andl $0x8, %eax
leaq (%rax,%rcx), %rsi
addq $0x8, %rsi
pushq $0x1
popq %rcx
leaq 0x10(%rsp), %r8
movq %rbx, %rdi
callq 0xc62612
testb %al, %al
je 0xc58c61
pushq $0x1
popq %r13
jmp 0xc58cb1
movq (%rbx), %rdi
andq $-0x2, %r15
cmpl $-0x1, 0x3218(%rdi)
jne 0xc58c83
movzbl 0x3(%r14), %eax
cmpq %r15, (%r14,%rax)
jne 0xc58c83
cmpb $0x0, 0xf(%rsp)
je 0xc58ccc
movq %r15, %rdi
callq 0xf67396
movq 0x10(%rsp), %rcx
movl 0x18(%rsp), %r8d
movl 0x14(%r14), %r9d
andq $-0x2, %r12
movq %r12, (%rsp)
movq %rbx, %rdi
movq %r15, %rsi
movl %eax, %edx
callq 0xc68b96
movq %rax, %r13
leaq 0x10(%rsp), %rdi
callq 0x633cd8
movq %r13, %rax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %r14, %rsi
callq 0x9c58aa
jmp 0xc58cae
|
/Sema/TreeTransform.h
|
clang::TreeTransform<clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation, clang::FunctionDecl*, bool, bool, bool)::$_0::operator()() const::SpecialMemberTypeInfoRebuilder>::TransformCXXUnresolvedConstructExpr(clang::CXXUnresolvedConstructExpr*)
|
ExprResult
TreeTransform<Derived>::TransformCXXUnresolvedConstructExpr(
CXXUnresolvedConstructExpr *E) {
TypeSourceInfo *T =
getDerived().TransformTypeWithDeducedTST(E->getTypeSourceInfo());
if (!T)
return ExprError();
bool ArgumentChanged = false;
SmallVector<Expr*, 8> Args;
Args.reserve(E->getNumArgs());
{
EnterExpressionEvaluationContext Context(
getSema(), EnterExpressionEvaluationContext::InitList,
E->isListInitialization());
if (getDerived().TransformExprs(E->arg_begin(), E->getNumArgs(), true, Args,
&ArgumentChanged))
return ExprError();
}
if (!getDerived().AlwaysRebuild() &&
T == E->getTypeSourceInfo() &&
!ArgumentChanged)
return E;
// FIXME: we're faking the locations of the commas
return getDerived().RebuildCXXUnresolvedConstructExpr(
T, E->getLParenLoc(), Args, E->getRParenLoc(), E->isListInitialization());
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, %rbx
movq %rdi, %r15
movq 0x10(%rsi), %rsi
andq $-0x8, %rsi
callq 0xc68592
testq %rax, %rax
je 0xc58e54
movq %rax, %r14
leaq 0x17(%rsp), %r12
movb $0x0, (%r12)
leaq 0x38(%rsp), %rax
movq %rax, -0x10(%rax)
movabsq $0x800000000, %rcx # imm = 0x800000000
movq %rcx, -0x8(%rax)
movl 0x4(%rbx), %esi
leaq 0x28(%rsp), %r13
movq %r13, %rdi
callq 0x6338e8
movq (%r15), %rsi
movl 0x10(%rbx), %ecx
andl $0x4, %ecx
shrl $0x2, %ecx
leaq 0x18(%rsp), %rbp
movq %rbp, %rdi
xorl %edx, %edx
callq 0x67825a
leaq 0x20(%rbx), %rsi
movl 0x4(%rbx), %edx
pushq $0x1
popq %rcx
movq %r15, %rdi
movq %r13, %r8
movq %r12, %r9
callq 0xc62612
movl %eax, %r12d
movq %rbp, %rdi
callq 0x629670
testb %r12b, %r12b
je 0xc58e59
pushq $0x1
popq %rbx
jmp 0xc58ea1
pushq $0x1
popq %rbx
jmp 0xc58eab
movq (%r15), %rdi
movq 0x10(%rbx), %rax
cmpl $-0x1, 0x3218(%rdi)
jne 0xc58e7c
movq %rax, %rcx
andq $-0x8, %rcx
cmpq %rcx, %r14
jne 0xc58e7c
cmpb $0x0, 0x17(%rsp)
je 0xc58ea1
movq 0x28(%rsp), %rcx
movl 0x30(%rsp), %r8d
movl 0x18(%rbx), %edx
movl 0x1c(%rbx), %r9d
andl $0x4, %eax
shrl $0x2, %eax
movl %eax, (%rsp)
movq %r14, %rsi
callq 0x9b75aa
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x633cd8
movq %rbx, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
|
/Sema/TreeTransform.h
|
clang::TreeTransform<clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation, clang::FunctionDecl*, bool, bool, bool)::$_0::operator()() const::SpecialMemberTypeInfoRebuilder>::TransformDependentScopeDeclRefExpr(clang::DependentScopeDeclRefExpr*, bool, clang::TypeSourceInfo**)
|
ExprResult TreeTransform<Derived>::TransformDependentScopeDeclRefExpr(
DependentScopeDeclRefExpr *E, bool IsAddressOfOperand,
TypeSourceInfo **RecoveryTSI) {
assert(E->getQualifierLoc());
NestedNameSpecifierLoc QualifierLoc =
getDerived().TransformNestedNameSpecifierLoc(E->getQualifierLoc());
if (!QualifierLoc)
return ExprError();
SourceLocation TemplateKWLoc = E->getTemplateKeywordLoc();
// TODO: If this is a conversion-function-id, verify that the
// destination type name (if present) resolves the same way after
// instantiation as it did in the local scope.
DeclarationNameInfo NameInfo =
getDerived().TransformDeclarationNameInfo(E->getNameInfo());
if (!NameInfo.getName())
return ExprError();
if (!E->hasExplicitTemplateArgs()) {
if (!getDerived().AlwaysRebuild() && QualifierLoc == E->getQualifierLoc() &&
// Note: it is sufficient to compare the Name component of NameInfo:
// if name has not changed, DNLoc has not changed either.
NameInfo.getName() == E->getDeclName())
return E;
return getDerived().RebuildDependentScopeDeclRefExpr(
QualifierLoc, TemplateKWLoc, NameInfo, /*TemplateArgs=*/nullptr,
IsAddressOfOperand, RecoveryTSI);
}
TemplateArgumentListInfo TransArgs(E->getLAngleLoc(), E->getRAngleLoc());
if (getDerived().TransformTemplateArguments(
E->getTemplateArgs(), E->getNumTemplateArgs(), TransArgs))
return ExprError();
return getDerived().RebuildDependentScopeDeclRefExpr(
QualifierLoc, TemplateKWLoc, NameInfo, &TransArgs, IsAddressOfOperand,
RecoveryTSI);
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp # imm = 0x148
movq %rcx, %r13
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r12
movq 0x10(%rsi), %rsi
movq 0x18(%r14), %rdx
xorl %r15d, %r15d
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0xc5b62c
testq %rax, %rax
je 0xc5b357
movq %rax, %rbx
movq %rdx, 0x10(%rsp)
movl %ebp, 0x4(%rsp)
movq %r13, 0x8(%rsp)
testb $0x4, 0x2(%r14)
je 0xc5b2d6
movl 0x40(%r14), %r15d
leaq 0x20(%r14), %rbp
leaq 0x18(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
movq %rbp, %rdx
callq 0xc5bb58
movq (%r13), %rax
testq %rax, %rax
je 0xc5b357
testb $0x4, 0x2(%r14)
je 0xc5b360
movl 0x38(%r14), %ecx
testl %ecx, %ecx
je 0xc5b360
movl 0x3c(%r14), %eax
leaq 0x40(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movabsq $0x800000000, %rsi # imm = 0x800000000
movq %rsi, -0x8(%rdx)
movl %ecx, 0x100(%rdx)
movl %eax, 0x104(%rdx)
leaq 0x48(%r14), %r13
movq %r14, %rdi
callq 0x4cf906
leaq 0x30(%rsp), %rcx
movq %r12, %rdi
movq %r13, %rsi
movl %eax, %edx
callq 0xc5bd70
testb %al, %al
je 0xc5b3ad
pushq $0x1
popq %r14
jmp 0xc5b3d9
pushq $0x1
popq %r14
jmp 0xc5b3e3
movq (%r12), %rcx
cmpl $-0x1, 0x3218(%rcx)
movq 0x10(%rsp), %rdx
je 0xc5b399
movzbl 0x4(%rsp), %eax
leaq 0x18(%rsp), %r8
movq %r12, %rdi
movq %rbx, %rsi
movl %r15d, %ecx
xorl %r9d, %r9d
pushq 0x8(%rsp)
pushq %rax
callq 0xc5bce2
popq %rcx
popq %rdx
movq %rax, %r14
jmp 0xc5b3e3
cmpq 0x10(%r14), %rbx
jne 0xc5b372
cmpq 0x18(%r14), %rdx
jne 0xc5b372
cmpq (%rbp), %rax
jne 0xc5b372
jmp 0xc5b3e3
movzbl 0x4(%rsp), %eax
leaq 0x18(%rsp), %r8
leaq 0x30(%rsp), %r9
movq %r12, %rdi
movq %rbx, %rsi
movq 0x10(%rsp), %rdx
movl %r15d, %ecx
pushq 0x8(%rsp)
pushq %rax
callq 0xc5bce2
popq %rcx
popq %rdx
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0x6d9e52
movq %r14, %rax
addq $0x148, %rsp # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/Sema/TreeTransform.h
|
clang::TreeTransform<clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation, clang::FunctionDecl*, bool, bool, bool)::$_0::operator()() const::SpecialMemberTypeInfoRebuilder>::TransformObjCAutoreleasePoolStmt(clang::ObjCAutoreleasePoolStmt*)
|
StmtResult
TreeTransform<Derived>::TransformObjCAutoreleasePoolStmt(
ObjCAutoreleasePoolStmt *S) {
// Transform the body.
StmtResult Body = getDerived().TransformStmt(S->getSubStmt());
if (Body.isInvalid())
return StmtError();
// If nothing changed, just retain this statement.
if (!getDerived().AlwaysRebuild() &&
Body.get() == S->getSubStmt())
return S;
// Build a new statement.
return getDerived().RebuildObjCAutoreleasePoolStmt(
S->getAtLoc(), Body.get());
}
|
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%rsi), %rsi
xorl %edx, %edx
callq 0xc5d93c
cmpq $0x1, %rax
jne 0xc5e937
pushq $0x1
popq %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq (%r14), %rcx
andq $-0x2, %rax
cmpl $-0x1, 0x3218(%rcx)
jne 0xc5e94d
cmpq %rax, 0x10(%rbx)
je 0xc5e92c
movl 0x8(%rbx), %esi
movq 0x2d8(%rcx), %rdi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xa6c178
|
/Sema/TreeTransform.h
|
clang::TreeTransform<clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation, clang::FunctionDecl*, bool, bool, bool)::$_0::operator()() const::SpecialMemberTypeInfoRebuilder>::TransformOMPExecutableDirective(clang::OMPExecutableDirective*)
|
StmtResult TreeTransform<Derived>::TransformOMPExecutableDirective(
OMPExecutableDirective *D) {
// Transform the clauses
llvm::SmallVector<OMPClause *, 16> TClauses;
ArrayRef<OMPClause *> Clauses = D->clauses();
TClauses.reserve(Clauses.size());
for (ArrayRef<OMPClause *>::iterator I = Clauses.begin(), E = Clauses.end();
I != E; ++I) {
if (*I) {
getDerived().getSema().OpenMP().StartOpenMPClause((*I)->getClauseKind());
OMPClause *Clause = getDerived().TransformOMPClause(*I);
getDerived().getSema().OpenMP().EndOpenMPClause();
if (Clause)
TClauses.push_back(Clause);
} else {
TClauses.push_back(nullptr);
}
}
StmtResult AssociatedStmt;
if (D->hasAssociatedStmt() && D->getAssociatedStmt()) {
getDerived().getSema().OpenMP().ActOnOpenMPRegionStart(
D->getDirectiveKind(),
/*CurScope=*/nullptr);
StmtResult Body;
{
Sema::CompoundScopeRAII CompoundScope(getSema());
Stmt *CS;
if (D->getDirectiveKind() == OMPD_atomic ||
D->getDirectiveKind() == OMPD_critical ||
D->getDirectiveKind() == OMPD_section ||
D->getDirectiveKind() == OMPD_master)
CS = D->getAssociatedStmt();
else
CS = D->getRawStmt();
Body = getDerived().TransformStmt(CS);
if (Body.isUsable() && isOpenMPLoopDirective(D->getDirectiveKind()) &&
getSema().getLangOpts().OpenMPIRBuilder)
Body = getDerived().RebuildOMPCanonicalLoop(Body.get());
}
AssociatedStmt =
getDerived().getSema().OpenMP().ActOnOpenMPRegionEnd(Body, TClauses);
if (AssociatedStmt.isInvalid()) {
return StmtError();
}
}
if (TClauses.size() != Clauses.size()) {
return StmtError();
}
// Transform directive name for 'omp critical' directive.
DeclarationNameInfo DirName;
if (D->getDirectiveKind() == OMPD_critical) {
DirName = cast<OMPCriticalDirective>(D)->getDirectiveName();
DirName = getDerived().TransformDeclarationNameInfo(DirName);
}
OpenMPDirectiveKind CancelRegion = OMPD_unknown;
if (D->getDirectiveKind() == OMPD_cancellation_point) {
CancelRegion = cast<OMPCancellationPointDirective>(D)->getCancelRegion();
} else if (D->getDirectiveKind() == OMPD_cancel) {
CancelRegion = cast<OMPCancelDirective>(D)->getCancelRegion();
}
return getDerived().RebuildOMPExecutableDirective(
D->getDirectiveKind(), DirName, CancelRegion, TClauses,
AssociatedStmt.get(), D->getBeginLoc(), D->getEndLoc(),
D->getMappedDirective());
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
leaq 0x58(%rsp), %rax
movq %rax, -0x10(%rax)
movabsq $0x1000000000, %rcx # imm = 0x1000000000
movq %rcx, -0x8(%rax)
movq 0x18(%rsi), %rbp
testq %rbp, %rbp
movq %rsi, 0x28(%rsp)
je 0xc63ac1
movl (%rbp), %r14d
addq $0x10, %rbp
jmp 0xc63ac6
xorl %ebp, %ebp
xorl %r14d, %r14d
leaq 0x48(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x6eed2e
movq %r14, 0x20(%rsp)
leaq (,%r14,8), %r15
xorl %r14d, %r14d
cmpq %r14, %r15
je 0xc63f82
movq (%rbp,%r14), %rax
testq %rax, %rax
je 0xc63b45
movq (%rbx), %rcx
movq 0x2f0(%rcx), %rdi
movl 0x8(%rax), %esi
callq 0xa83022
movq (%rbp,%r14), %r13
testq %r13, %r13
je 0xc63b4f
movl 0x8(%r13), %eax
addl $-0x3, %eax
cmpl $0x62, %eax
ja 0xc63f5a
leaq 0x5ec0e8(%rip), %rcx # 0x124fc14
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc6417a
jmp 0xc63f57
movq %r12, %rdi
xorl %esi, %esi
jmp 0xc63f74
xorl %r13d, %r13d
jmp 0xc63f5a
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc67252
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc660aa
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc662d4
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc667d0
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc66400
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc66278
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc656aa
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc65f02
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc65eb6
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc65a5a
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc65132
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc660f6
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc64a14
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc670be
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc65798
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc64bf6
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc6486c
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc6453e
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc6510e
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc6458a
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc64d00
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc65fc0
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc64706
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc6524e
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc6451c
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc6427a
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc6529a
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc655ec
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc64c42
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc6475a
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc643b0
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc64aec
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc64728
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc6600c
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc642c6
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc6618e
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc66222
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc64dbe
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc661a4
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc644ae
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc65e6e
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc6670a
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc652f4
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc644fa
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc648b8
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc64912
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc64648
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc65862
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc649ba
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc66756
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc64968
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc6605e
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc668b0
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc66d1e
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc6706e
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc64baa
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc667f2
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc67188
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc65184
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc663de
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc65938
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc661f0
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc669da
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc66320
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc66cd2
jmp 0xc63f57
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc668fc
movq %rax, %r13
movq (%rbx), %rax
movq 0x2f0(%rax), %rdi
callq 0xa8302e
testq %r13, %r13
je 0xc63f79
movq %r12, %rdi
movq %r13, %rsi
callq 0x681f46
addq $0x8, %r14
jmp 0xc63ae6
movq 0x28(%rsp), %r14
movq 0x18(%r14), %rax
pushq $0x1
popq %r12
testq %rax, %rax
je 0xc64084
cmpb $0x0, 0x8(%rax)
je 0xc64084
movl (%rax), %ecx
movl 0x4(%rax), %edx
leaq (%rax,%rcx,8), %rax
cmpq $0x0, 0x10(%rax,%rdx,8)
je 0xc64084
movq (%rbx), %rax
movq 0x2f0(%rax), %rdi
movl 0x8(%r14), %esi
xorl %edx, %edx
callq 0xa86296
movq (%rbx), %r13
movq %r13, %rdi
xorl %esi, %esi
callq 0xb28fbc
movl 0x8(%r14), %eax
cmpq $0x3e, %rax
ja 0xc6416a
movabsq $0x4000010000000408, %rcx # imm = 0x4000010000000408
btq %rax, %rcx
jae 0xc6416a
movq 0x18(%r14), %rax
movl (%rax), %ecx
movl 0x4(%rax), %edx
leaq (%rax,%rcx,8), %rax
movq 0x10(%rax,%rdx,8), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0xc5d93c
movq %rax, %rbp
cmpq $0x2, %rax
jb 0xc64053
movl 0x8(%r14), %edi
callq 0x1076d6d
testb %al, %al
je 0xc64053
movq (%rbx), %rax
movq 0xf0(%rax), %rcx
testb $0x20, 0x44(%rcx)
je 0xc64053
andq $-0x2, %rbp
movq 0x2f0(%rax), %rdi
movq %rbp, %rsi
callq 0xa8770c
movq %rax, %rbp
movq %r13, %rdi
callq 0xb28fec
movq (%rbx), %rax
movq 0x2f0(%rax), %rdi
movq 0x48(%rsp), %rdx
movl 0x50(%rsp), %ecx
movq %rbp, %rsi
callq 0xa86dac
movq %rax, %r13
cmpq $0x1, %rax
jne 0xc64087
jmp 0xc6414b
xorl %r13d, %r13d
movq 0x20(%rsp), %rax
cmpl 0x50(%rsp), %eax
jne 0xc6414b
andq $0x0, (%rsp)
andl $0x0, 0x8(%rsp)
andq $0x0, 0x10(%rsp)
movl 0x8(%r14), %esi
cmpl $0xa, %esi
jne 0xc640ec
movq 0x30(%r14), %rax
movq %rsp, %r15
movq %rax, 0x10(%r15)
movups 0x20(%r14), %xmm0
movaps %xmm0, (%r15)
leaq 0x30(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0xc5bb58
movq 0x10(%r12), %rax
movq %rax, 0x10(%r15)
movups (%r12), %xmm0
movaps %xmm0, (%r15)
movl 0x8(%r14), %esi
movl %esi, %eax
andl $-0x2, %eax
cmpl $0x8, %eax
jne 0xc640fc
movl 0x20(%r14), %ecx
jmp 0xc640ff
pushq $0x63
popq %rcx
movq 0x10(%rsp), %rax
leaq 0x30(%rsp), %rdx
movq %rax, 0x10(%rdx)
movaps (%rsp), %xmm0
movaps %xmm0, (%rdx)
movq 0x48(%rsp), %r8
movl 0x50(%rsp), %r9d
andq $-0x2, %r13
movl 0xc(%r14), %eax
movl 0x10(%r14), %r10d
movl 0x14(%r14), %r11d
movq (%rbx), %rdi
movq 0x2f0(%rdi), %rdi
pushq %r11
pushq %r10
pushq %rax
pushq %r13
callq 0xa88450
addq $0x20, %rsp
movq %rax, %r12
leaq 0x48(%rsp), %rdi
callq 0x68d8e4
movq %r12, %rax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x82866c
movq %rax, %rsi
jmp 0xc6400d
|
/Sema/TreeTransform.h
|
clang::TreeTransform<clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation, clang::FunctionDecl*, bool, bool, bool)::$_0::operator()() const::SpecialMemberTypeInfoRebuilder>::TransformOMPCopyinClause(clang::OMPCopyinClause*)
|
OMPClause *
TreeTransform<Derived>::TransformOMPCopyinClause(OMPCopyinClause *C) {
llvm::SmallVector<Expr *, 16> Vars;
Vars.reserve(C->varlist_size());
for (auto *VE : C->varlists()) {
ExprResult EVar = getDerived().TransformExpr(cast<Expr>(VE));
if (EVar.isInvalid())
return nullptr;
Vars.push_back(EVar.get());
}
return getDerived().RebuildOMPCopyinClause(Vars, C->getBeginLoc(),
C->getLParenLoc(), C->getEndLoc());
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
movabsq $0x1000000000, %rcx # imm = 0x1000000000
movq %rcx, -0x8(%rax)
movl 0x10(%rsi), %esi
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x6338e8
movl 0x10(%r14), %r13d
shlq $0x3, %r13
xorl %r15d, %r15d
xorl %ebp, %ebp
cmpq %rbp, %r13
je 0xc646c0
movq 0x18(%r14,%rbp), %rsi
movq %rbx, %rdi
callq 0xc530de
cmpq $0x1, %rax
je 0xc646e6
andq $-0x2, %rax
movq %r12, %rdi
movq %rax, %rsi
callq 0x63144a
addq $0x8, %rbp
jmp 0xc64693
movq 0x8(%rsp), %rsi
movl 0x10(%rsp), %edx
movl 0xc(%r14), %r8d
movl (%r14), %ecx
movl 0x4(%r14), %r9d
movq (%rbx), %rax
movq 0x2f0(%rax), %rdi
callq 0xaa7dfa
movq %rax, %r15
leaq 0x8(%rsp), %rdi
callq 0x633cd8
movq %r15, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
|
/Sema/TreeTransform.h
|
clang::TreeTransform<clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation, clang::FunctionDecl*, bool, bool, bool)::$_0::operator()() const::SpecialMemberTypeInfoRebuilder>::TransformOMPMessageClause(clang::OMPMessageClause*)
|
OMPClause *
TreeTransform<Derived>::TransformOMPMessageClause(OMPMessageClause *C) {
ExprResult E = getDerived().TransformExpr(C->getMessageString());
if (E.isInvalid())
return nullptr;
return getDerived().RebuildOMPMessageClause(
C->getMessageString(), C->getBeginLoc(), C->getLParenLoc(),
C->getEndLoc());
}
|
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rsi), %rsi
callq 0xc530de
cmpq $0x1, %rax
jne 0xc65e91
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x10(%r14), %rsi
movl 0xc(%r14), %ecx
movl (%r14), %edx
movl 0x4(%r14), %r8d
movq (%rbx), %rax
movq 0x2f0(%rax), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xaa1e0c
|
/Sema/TreeTransform.h
|
clang::TreeTransform<clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation, clang::FunctionDecl*, bool, bool, bool)::$_0::operator()() const::SpecialMemberTypeInfoRebuilder>::TransformOMPXDynCGroupMemClause(clang::OMPXDynCGroupMemClause*)
|
OMPClause *TreeTransform<Derived>::TransformOMPXDynCGroupMemClause(
OMPXDynCGroupMemClause *C) {
ExprResult Size = getDerived().TransformExpr(C->getSize());
if (Size.isInvalid())
return nullptr;
return getDerived().RebuildOMPXDynCGroupMemClause(
Size.get(), C->getBeginLoc(), C->getLParenLoc(), C->getEndLoc());
}
|
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rsi), %rsi
callq 0xc530de
cmpq $0x1, %rax
jne 0xc661c7
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
andq $-0x2, %rax
movl 0xc(%r14), %ecx
movl (%r14), %edx
movl 0x4(%r14), %r8d
movq (%rbx), %rsi
movq 0x2f0(%rsi), %rdi
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xaa1f18
nop
|
/Sema/TreeTransform.h
|
clang::TreeTransform<clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation, clang::FunctionDecl*, bool, bool, bool)::$_0::operator()() const::SpecialMemberTypeInfoRebuilder>::TransformTypeWithDeducedTST(clang::TypeSourceInfo*)
|
TypeSourceInfo *
TreeTransform<Derived>::TransformTypeWithDeducedTST(TypeSourceInfo *DI) {
if (!isa<DependentNameType>(DI->getType()))
return TransformType(DI);
// Refine the base location to the type's location.
TemporaryBase Rebase(*this, DI->getTypeLoc().getBeginLoc(),
getDerived().getBaseEntity());
if (getDerived().AlreadyTransformed(DI->getType()))
return DI;
TypeLocBuilder TLB;
TypeLoc TL = DI->getTypeLoc();
TLB.reserve(TL.getFullDataSize());
auto QTL = TL.getAs<QualifiedTypeLoc>();
if (QTL)
TL = QTL.getUnqualifiedLoc();
auto DNTL = TL.castAs<DependentNameTypeLoc>();
QualType Result = getDerived().TransformDependentNameType(
TLB, DNTL, /*DeducedTSTContext*/true);
if (Result.isNull())
return nullptr;
if (QTL) {
Result = getDerived().RebuildQualifiedType(Result, QTL);
if (Result.isNull())
return nullptr;
TLB.TypeWasModifiedSafely(Result);
}
return TLB.getTypeSourceInfo(SemaRef.Context, Result);
}
|
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r12
movq %rdi, %rbx
movq (%rsi), %rax
movq %rax, %rcx
andq $-0x10, %rcx
movq (%rcx), %rcx
cmpb $0x14, 0x10(%rcx)
jne 0xc6867d
leaq 0x8(%r12), %r14
leaq 0x18(%rsp), %rdi
movq %rax, (%rdi)
movq %r14, 0x8(%rdi)
callq 0xfacccc
movq (%r12), %r15
cmpq $0x10, %r15
jb 0xc686b7
leaq 0x30(%rsp), %rax
movq %rax, -0x18(%rax)
pushq $0x20
popq %rcx
movq %rcx, -0x10(%rax)
movq %rcx, -0x8(%rax)
andl $0x0, 0x20(%rax)
movb $0x0, 0x24(%rax)
movq %r15, %rdi
callq 0xfabdbc
movl %eax, %esi
leaq 0x18(%rsp), %rdi
callq 0x81984a
movl %r15d, %eax
movq %r15, %rcx
andl $0xf, %eax
cmoveq %rax, %rcx
cmovneq %r14, %rax
movq %rcx, 0x8(%rsp)
movq %rax, 0x10(%rsp)
je 0xc6863b
leaq 0x8(%rsp), %rdi
callq 0x4c4f6e
movq %rax, %r15
movq %rdx, %r14
leaq 0x18(%rsp), %rsi
pushq $0x1
popq %r8
movq %rbx, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0xc686c6
cmpq $0x10, %rax
jb 0xc68678
movq 0x8(%rsp), %rdx
testq %rdx, %rdx
je 0xc68693
movq 0x10(%rsp), %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq 0xc52e38
cmpq $0x10, %rax
jae 0xc68693
xorl %r12d, %r12d
jmp 0xc686ad
movq %rbx, %rdi
movq %r12, %rsi
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xc4f224
movq (%rbx), %rcx
movq 0x100(%rcx), %rsi
leaq 0x18(%rsp), %rdi
movq %rax, %rdx
callq 0x81d462
movq %rax, %r12
leaq 0x18(%rsp), %rdi
callq 0x7a8b16
movq %r12, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
/Sema/TreeTransform.h
|
clang::Sema::CheckParameterPacksForExpansion(clang::SourceLocation, clang::SourceRange, llvm::ArrayRef<std::pair<llvm::PointerUnion<clang::TemplateTypeParmType const*, clang::NamedDecl*>, clang::SourceLocation>>, clang::MultiLevelTemplateArgumentList const&, bool&, bool&, std::optional<unsigned int>&)
|
bool Sema::CheckParameterPacksForExpansion(
SourceLocation EllipsisLoc, SourceRange PatternRange,
ArrayRef<UnexpandedParameterPack> Unexpanded,
const MultiLevelTemplateArgumentList &TemplateArgs, bool &ShouldExpand,
bool &RetainExpansion, std::optional<unsigned> &NumExpansions) {
ShouldExpand = true;
RetainExpansion = false;
std::pair<IdentifierInfo *, SourceLocation> FirstPack;
bool HaveFirstPack = false;
std::optional<unsigned> NumPartialExpansions;
SourceLocation PartiallySubstitutedPackLoc;
for (UnexpandedParameterPack ParmPack : Unexpanded) {
// Compute the depth and index for this parameter pack.
unsigned Depth = 0, Index = 0;
IdentifierInfo *Name;
bool IsVarDeclPack = false;
if (const TemplateTypeParmType *TTP =
ParmPack.first.dyn_cast<const TemplateTypeParmType *>()) {
Depth = TTP->getDepth();
Index = TTP->getIndex();
Name = TTP->getIdentifier();
} else {
NamedDecl *ND = ParmPack.first.get<NamedDecl *>();
if (isa<VarDecl>(ND))
IsVarDeclPack = true;
else
std::tie(Depth, Index) = getDepthAndIndex(ND);
Name = ND->getIdentifier();
}
// Determine the size of this argument pack.
unsigned NewPackSize;
if (IsVarDeclPack) {
// Figure out whether we're instantiating to an argument pack or not.
typedef LocalInstantiationScope::DeclArgumentPack DeclArgumentPack;
llvm::PointerUnion<Decl *, DeclArgumentPack *> *Instantiation =
CurrentInstantiationScope->findInstantiationOf(
ParmPack.first.get<NamedDecl *>());
if (Instantiation->is<DeclArgumentPack *>()) {
// We could expand this function parameter pack.
NewPackSize = Instantiation->get<DeclArgumentPack *>()->size();
} else {
// We can't expand this function parameter pack, so we can't expand
// the pack expansion.
ShouldExpand = false;
continue;
}
} else {
// If we don't have a template argument at this depth/index, then we
// cannot expand the pack expansion. Make a note of this, but we still
// want to check any parameter packs we *do* have arguments for.
if (Depth >= TemplateArgs.getNumLevels() ||
!TemplateArgs.hasTemplateArgument(Depth, Index)) {
ShouldExpand = false;
continue;
}
// Determine the size of the argument pack.
NewPackSize = TemplateArgs(Depth, Index).pack_size();
}
// C++0x [temp.arg.explicit]p9:
// Template argument deduction can extend the sequence of template
// arguments corresponding to a template parameter pack, even when the
// sequence contains explicitly specified template arguments.
if (!IsVarDeclPack && CurrentInstantiationScope) {
if (NamedDecl *PartialPack =
CurrentInstantiationScope->getPartiallySubstitutedPack()) {
unsigned PartialDepth, PartialIndex;
std::tie(PartialDepth, PartialIndex) = getDepthAndIndex(PartialPack);
if (PartialDepth == Depth && PartialIndex == Index) {
RetainExpansion = true;
// We don't actually know the new pack size yet.
NumPartialExpansions = NewPackSize;
PartiallySubstitutedPackLoc = ParmPack.second;
continue;
}
}
}
if (!NumExpansions) {
// The is the first pack we've seen for which we have an argument.
// Record it.
NumExpansions = NewPackSize;
FirstPack.first = Name;
FirstPack.second = ParmPack.second;
HaveFirstPack = true;
continue;
}
if (NewPackSize != *NumExpansions) {
// C++0x [temp.variadic]p5:
// All of the parameter packs expanded by a pack expansion shall have
// the same number of arguments specified.
if (HaveFirstPack)
Diag(EllipsisLoc, diag::err_pack_expansion_length_conflict)
<< FirstPack.first << Name << *NumExpansions << NewPackSize
<< SourceRange(FirstPack.second) << SourceRange(ParmPack.second);
else
Diag(EllipsisLoc, diag::err_pack_expansion_length_conflict_multilevel)
<< Name << *NumExpansions << NewPackSize
<< SourceRange(ParmPack.second);
return true;
}
}
// If we're performing a partial expansion but we also have a full expansion,
// expand to the number of common arguments. For example, given:
//
// template<typename ...T> struct A {
// template<typename ...U> void f(pair<T, U>...);
// };
//
// ... a call to 'A<int, int>().f<int>' should expand the pack once and
// retain an expansion.
if (NumPartialExpansions) {
if (NumExpansions && *NumExpansions < *NumPartialExpansions) {
NamedDecl *PartialPack =
CurrentInstantiationScope->getPartiallySubstitutedPack();
Diag(EllipsisLoc, diag::err_pack_expansion_length_conflict_partial)
<< PartialPack << *NumPartialExpansions << *NumExpansions
<< SourceRange(PartiallySubstitutedPackLoc);
return true;
}
NumExpansions = NumPartialExpansions;
}
return false;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movl %esi, 0xc(%rsp)
movq %rdi, %r13
movq 0x120(%rsp), %r12
movq 0x118(%rsp), %rax
movq 0x110(%rsp), %rdx
movb $0x1, (%rdx)
xorl %edx, %edx
movb %dl, (%rax)
andq $0x0, 0x48(%rsp)
andl $0x0, 0x50(%rsp)
movb %dl, 0x24(%rsp)
shlq $0x4, %r8
movq $0x0, 0x30(%rsp)
movl $0x0, 0x14(%rsp)
movq $0x0, 0x38(%rsp)
movq %r9, 0x58(%rsp)
testq %r8, %r8
je 0xc6c0fd
movq %r8, 0x68(%rsp)
movq (%rcx), %r15
movq %rcx, 0x60(%rsp)
movl 0x8(%rcx), %eax
movl %eax, 0x8(%rsp)
movl %r15d, %eax
andl $0x4, %eax
shrl $0x2, %eax
andq $-0x8, %r15
sete %cl
orb %al, %cl
je 0xc6bfb7
movl 0x1c(%r15), %r12d
andl $0x7f, %r12d
addl $-0x25, %r12d
xorl %r14d, %r14d
movl $0x0, %ebx
cmpl $0x7, %r12d
jb 0xc6bf62
movq %r15, %rdi
callq 0x81008d
movq %rax, %rbx
movq %rax, %r14
shrq $0x20, %r14
movq 0x28(%r15), %rax
movq %rax, %rbp
andq $-0x8, %rbp
testb $0x7, %al
movl $0x0, %eax
cmovneq %rax, %rbp
movq %rbp, 0x18(%rsp)
cmpl $0x6, %r12d
ja 0xc6bfde
movq 0x2cd0(%r13), %rdi
movq %r15, %rsi
callq 0xc16b98
movq (%rax), %rax
testb $0x4, %al
movq 0x120(%rsp), %r12
je 0xc6c09e
andq $-0x8, %rax
movl 0x8(%rax), %r15d
movl %r15d, 0x10(%rsp)
jmp 0xc6c0c0
movq %r15, %rdi
callq 0x4edaae
movl %eax, %ebx
movq %r15, %rdi
callq 0x4edace
movl %eax, %r14d
movq %r15, %rdi
callq 0xfa9e82
movq %rax, %rbp
movq %rax, 0x18(%rsp)
jmp 0xc6bfe6
movq 0x120(%rsp), %r12
movq 0x58(%rsp), %r15
movl 0x70(%r15), %eax
addl 0x8(%r15), %eax
cmpl %eax, %ebx
jae 0xc6c09e
movq %r15, %rdi
movl %ebx, %esi
movl %r14d, %edx
callq 0xc24282
testb %al, %al
je 0xc6c09e
movl %ebx, %eax
notl %eax
addl 0x8(%r15), %eax
addl 0x70(%r15), %eax
movq (%r15), %rcx
imulq $0x18, %rax, %rax
movl %r14d, %edx
movq 0x8(%rcx,%rax), %rax
imulq $0x18, %rdx, %rcx
movl 0x4(%rax,%rcx), %r15d
movl %r15d, 0x10(%rsp)
movq 0x2cd0(%r13), %rdi
testq %rdi, %rdi
je 0xc6c0c0
xorl %esi, %esi
xorl %edx, %edx
callq 0xc16e58
testq %rax, %rax
je 0xc6c0c0
movq %rax, %rdi
callq 0x81008d
cmpl %eax, %ebx
jne 0xc6c0c0
shrq $0x20, %rax
cmpl %eax, %r14d
jne 0xc6c0c0
movq 0x118(%rsp), %rax
movb $0x1, (%rax)
movq %r15, %rax
movabsq $0x100000000, %rcx # imm = 0x100000000
orq %rcx, %rax
movq %rax, 0x20(%rsp)
movb $0x1, %al
movq %rax, 0x30(%rsp)
movl %r15d, 0x2c(%rsp)
movl 0x8(%rsp), %eax
movl %eax, 0x14(%rsp)
jmp 0xc6c0a9
movq 0x110(%rsp), %rax
movb $0x0, (%rax)
movq 0x60(%rsp), %rcx
addq $0x10, %rcx
movq 0x68(%rsp), %r8
addq $-0x10, %r8
jmp 0xc6bf01
cmpb $0x0, 0x4(%r12)
je 0xc6c0d3
cmpl (%r12), %r15d
je 0xc6c0a9
jmp 0xc6c193
movl %r15d, %eax
movabsq $0x100000000, %rcx # imm = 0x100000000
orq %rcx, %rax
movq %rax, (%r12)
movq %rbp, 0x48(%rsp)
movl 0x8(%rsp), %eax
movl %eax, 0x50(%rsp)
movb $0x1, %al
movq %rax, 0x38(%rsp)
jmp 0xc6c0a9
testb $0x1, 0x30(%rsp)
je 0xc6c18c
cmpb $0x1, 0x4(%r12)
jne 0xc6c183
movl 0x2c(%rsp), %eax
cmpl %eax, (%r12)
jae 0xc6c183
movq 0x2cd0(%r13), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xc16e58
leaq 0x18(%rsp), %r14
movq %rax, (%r14)
addq $0x8, %r13
leaq 0x78(%rsp), %rbx
movq %rbx, %rdi
movq %r13, %rsi
movl 0xc(%rsp), %edx
movl $0x1145, %ecx # imm = 0x1145
xorl %r8d, %r8d
callq 0x7a6d9e
movq %rbx, %rdi
movq %r14, %rsi
callq 0x79c4bf
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x77c488
movq %rax, %rdi
movq %r12, %rsi
callq 0x77c488
leaq 0x40(%rsp), %rsi
movl 0x14(%rsp), %ecx
jmp 0xc6c256
movq 0x20(%rsp), %rax
movq %rax, (%r12)
xorl %eax, %eax
jmp 0xc6c26d
addq $0x8, %r13
testb $0x1, 0x38(%rsp)
je 0xc6c20c
leaq 0x78(%rsp), %rbx
movq %rbx, %rdi
movq %r13, %rsi
movl 0xc(%rsp), %edx
movl $0x1143, %ecx # imm = 0x1143
xorl %r8d, %r8d
callq 0x7a6d9e
leaq 0x48(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x78a41b
leaq 0x18(%rsp), %rsi
movq %rax, %rdi
callq 0x78a41b
movq %rax, %rdi
movq %r12, %rsi
callq 0x77c488
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
callq 0x77c488
movl 0x8(%r14), %ecx
leaq 0x40(%rsp), %rsi
movl %ecx, (%rsi)
movl %ecx, 0x4(%rsi)
movq %rax, %rdi
callq 0x75caca
leaq 0x70(%rsp), %rsi
jmp 0xc6c252
leaq 0x78(%rsp), %rbx
movq %rbx, %rdi
movq %r13, %rsi
movl 0xc(%rsp), %edx
movl $0x1144, %ecx # imm = 0x1144
xorl %r8d, %r8d
callq 0x7a6d9e
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x78a41b
movq %rax, %rdi
movq %r12, %rsi
callq 0x77c488
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
callq 0x77c488
leaq 0x40(%rsp), %rsi
movl 0x8(%rsp), %ecx
movl %ecx, (%rsi)
movl %ecx, 0x4(%rsi)
movq %rax, %rdi
callq 0x75caca
movq %rbx, %rdi
callq 0x78b0f8
movb $0x1, %al
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
|
/Sema/SemaTemplateVariadic.cpp
|
clang::Sema::BuildPackIndexingExpr(clang::Expr*, clang::SourceLocation, clang::Expr*, clang::SourceLocation, llvm::ArrayRef<clang::Expr*>, bool)
|
ExprResult
Sema::BuildPackIndexingExpr(Expr *PackExpression, SourceLocation EllipsisLoc,
Expr *IndexExpr, SourceLocation RSquareLoc,
ArrayRef<Expr *> ExpandedExprs, bool EmptyPack) {
std::optional<int64_t> Index;
if (!IndexExpr->isInstantiationDependent()) {
llvm::APSInt Value(Context.getIntWidth(Context.getSizeType()));
ExprResult Res = CheckConvertedConstantExpression(
IndexExpr, Context.getSizeType(), Value, CCEK_ArrayBound);
if (!Res.isUsable())
return ExprError();
Index = Value.getExtValue();
IndexExpr = Res.get();
}
if (Index && (!ExpandedExprs.empty() || EmptyPack)) {
if (*Index < 0 || EmptyPack || *Index >= int64_t(ExpandedExprs.size())) {
Diag(PackExpression->getBeginLoc(), diag::err_pack_index_out_of_bound)
<< *Index << PackExpression << ExpandedExprs.size();
return ExprError();
}
}
return PackIndexingExpr::Create(getASTContext(), EllipsisLoc, RSquareLoc,
PackExpression, IndexExpr, Index,
ExpandedExprs, EmptyPack);
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movl %r9d, %r14d
movq %rcx, %r12
movq %rsi, %rbx
movq %rdi, %r15
leaq 0xf0(%rsp), %rsi
movq %rbx, 0x48(%rsp)
movb $0x0, 0x38(%rsp)
testb $0x40, 0x1(%rcx)
jne 0xc6ca4f
movl %edx, 0x28(%rsp)
movl %r8d, 0x2c(%rsp)
movq 0x100(%r15), %r13
movq %r13, %rdi
callq 0xdaf028
movq %r13, %rdi
movq %rax, %rsi
callq 0xdb09a4
leaq 0x58(%rsp), %r13
pushq $0x1
popq %rdx
movq %r13, %rdi
movl %eax, %esi
callq 0x6588e4
movq 0x100(%r15), %rdi
callq 0xdaf028
pushq $0x3
popq %r8
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
movq %r13, %rcx
callq 0xb01630
movq %rax, %r13
cmpq $0x2, %r13
jb 0xc6c996
leaq 0x58(%rsp), %rdi
callq 0x79a12a
movq %rax, 0x40(%rsp)
movq %rax, 0x30(%rsp)
movb $0x1, 0x38(%rsp)
movq %r13, %r12
andq $-0x2, %r12
leaq 0x58(%rsp), %rdi
callq 0x468360
pushq $0x1
popq %rbp
cmpq $0x2, %r13
jb 0xc6ca7e
leaq 0xf0(%rsp), %rsi
movq 0x8(%rsi), %r13
testq %r13, %r13
sete %al
movl %r14d, %ecx
xorb $0x1, %cl
testb %cl, %al
jne 0xc6ca46
movq 0x40(%rsp), %rcx
testq %rcx, %rcx
sets %al
cmpq %r13, %rcx
setge %cl
orb %r14b, %al
orb %cl, %al
cmpb $0x1, %al
movl 0x2c(%rsp), %r8d
movl 0x28(%rsp), %edx
jne 0xc6ca4f
addq $0x8, %r15
movq %rbx, %rdi
callq 0xf67aee
leaq 0x58(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
movl %eax, %edx
movl $0x1148, %ecx # imm = 0x1148
xorl %r8d, %r8d
callq 0x7a6d9e
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0xa469ef
leaq 0x48(%rsp), %rsi
movq %rax, %rdi
callq 0x7d3b94
leaq 0x50(%rsp), %rsi
movq %r13, (%rsi)
movq %rax, %rdi
callq 0xa46912
movq %rbx, %rdi
callq 0x78b0f8
jmp 0xc6ca7e
movl 0x2c(%rsp), %r8d
movl 0x28(%rsp), %edx
movq 0x100(%r15), %rdi
movups (%rsi), %xmm0
movups %xmm0, 0x10(%rsp)
movups 0x30(%rsp), %xmm0
movups %xmm0, (%rsp)
movzbl %r14b, %r9d
movl %edx, %esi
movl %r8d, %edx
movq %rbx, %rcx
movq %r12, %r8
callq 0xe9610e
movq %rax, %rbp
movq %rbp, %rax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
|
/Sema/SemaTemplateVariadic.cpp
|
clang::RecursiveASTVisitor<(anonymous namespace)::CollectUnexpandedParameterPacksVisitor>::TraverseVarHelper(clang::VarDecl*)
|
bool RecursiveASTVisitor<Derived>::TraverseVarHelper(VarDecl *D) {
TRY_TO(TraverseDeclaratorHelper(D));
// Default params are taken care of when we traverse the ParmVarDecl.
if (!isa<ParmVarDecl>(D) &&
(!D->isCXXForRangeDecl() || getDerived().shouldVisitImplicitCode()))
TRY_TO(TraverseStmt(D->getInit()));
return true;
}
|
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0xc71b1c
testb %al, %al
je 0xc71b12
movl 0x1c(%r14), %eax
andl $0x7f, %eax
cmpl $0x28, %eax
je 0xc71b0e
movq %r14, %rdi
callq 0xe11aa2
movq %rbx, %rdi
movq %rax, %rsi
callq 0xc6ae7a
testb %al, %al
je 0xc71b12
movb $0x1, %al
jmp 0xc71b14
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
/clang/AST/RecursiveASTVisitor.h
|
clang::Sema::BuildReferenceType(clang::QualType, bool, clang::SourceLocation, clang::DeclarationName)
|
QualType Sema::BuildReferenceType(QualType T, bool SpelledAsLValue,
SourceLocation Loc,
DeclarationName Entity) {
assert(Context.getCanonicalType(T) != Context.OverloadTy &&
"Unresolved overloaded function type");
// C++0x [dcl.ref]p6:
// If a typedef (7.1.3), a type template-parameter (14.3.1), or a
// decltype-specifier (7.1.6.2) denotes a type TR that is a reference to a
// type T, an attempt to create the type "lvalue reference to cv TR" creates
// the type "lvalue reference to T", while an attempt to create the type
// "rvalue reference to cv TR" creates the type TR.
bool LValueRef = SpelledAsLValue || T->getAs<LValueReferenceType>();
// C++ [dcl.ref]p4: There shall be no references to references.
//
// According to C++ DR 106, references to references are only
// diagnosed when they are written directly (e.g., "int & &"),
// but not when they happen via a typedef:
//
// typedef int& intref;
// typedef intref& intref2;
//
// Parser::ParseDeclaratorInternal diagnoses the case where
// references are written directly; here, we handle the
// collapsing of references-to-references as described in C++0x.
// DR 106 and 540 introduce reference-collapsing into C++98/03.
// C++ [dcl.ref]p1:
// A declarator that specifies the type "reference to cv void"
// is ill-formed.
if (T->isVoidType()) {
Diag(Loc, diag::err_reference_to_void);
return QualType();
}
if (getLangOpts().HLSL && Loc.isValid()) {
Diag(Loc, diag::err_hlsl_pointers_unsupported) << 1;
return QualType();
}
if (checkQualifiedFunction(*this, T, Loc, QFK_Reference))
return QualType();
if (T->isFunctionType() && getLangOpts().OpenCL &&
!getOpenCLOptions().isAvailableOption("__cl_clang_function_pointers",
getLangOpts())) {
Diag(Loc, diag::err_opencl_function_pointer) << /*reference*/ 1;
return QualType();
}
// In ARC, it is forbidden to build references to unqualified pointers.
if (getLangOpts().ObjCAutoRefCount)
T = inferARCLifetimeForPointee(*this, T, Loc, /*reference*/ true);
if (getLangOpts().OpenCL)
T = deduceOpenCLPointeeAddrSpace(*this, T);
// In WebAssembly, references to reference types and tables are illegal.
if (getASTContext().getTargetInfo().getTriple().isWasm() &&
T.isWebAssemblyReferenceType()) {
Diag(Loc, diag::err_wasm_reference_pr) << 1;
return QualType();
}
if (T->isWebAssemblyTableType()) {
Diag(Loc, diag::err_wasm_table_pr) << 1;
return QualType();
}
// Handle restrict on references.
if (LValueRef)
return Context.getLValueReferenceType(T, SpelledAsLValue);
return Context.getRValueReferenceType(T);
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movl %ecx, %ebx
movl %edx, %ebp
movq %rsi, %r13
movq %rdi, %r14
movq %rsi, 0x10(%rsp)
movq %rsi, %r15
andq $-0x10, %r15
movb $0x1, %r12b
testl %edx, %edx
jne 0xc7990f
movq (%r15), %rdi
callq 0xb1c43c
testq %rax, %rax
setne %r12b
movq (%r15), %rdi
callq 0x79b9a8
testb %al, %al
je 0xc7993e
addq $0x8, %r14
leaq 0x78(%rsp), %r12
xorl %r15d, %r15d
movq %r12, %rdi
movq %r14, %rsi
movl %ebx, %edx
movl $0x11d9, %ecx # imm = 0x11D9
xorl %r8d, %r8d
callq 0x7a6d9e
jmp 0xc7998a
movq 0xf0(%r14), %rax
movb 0x59(%rax), %al
shrb %al
testl %ebx, %ebx
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0xc799a7
addq $0x8, %r14
leaq 0x18(%rsp), %r12
xorl %r15d, %r15d
movq %r12, %rdi
movq %r14, %rsi
movl %ebx, %edx
movl $0xdf4, %ecx # imm = 0xDF4
xorl %r8d, %r8d
callq 0x7a6d9e
leaq 0xc(%rsp), %rsi
movl $0x1, (%rsi)
movq %r12, %rdi
callq 0x75c9d2
movq %r12, %rdi
callq 0x78b0f8
movq %r15, %rax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x2
popq %rcx
movq %r14, %rdi
movq %r13, %rsi
movl %ebx, %edx
callq 0xc795cb
testb %al, %al
je 0xc799c0
xorl %r15d, %r15d
jmp 0xc79992
movabsq $0x4000000000000000, %rdx # imm = 0x4000000000000000
movq (%r15), %rax
movq 0x8(%rax), %rax
andq $-0x10, %rax
movq (%rax), %rax
movb 0x10(%rax), %al
addb $-0x19, %al
movq 0xf0(%r14), %rcx
cmpb $0x1, %al
ja 0xc79a19
testq %rdx, 0x28(%rcx)
je 0xc79a19
movq %rdx, %r15
leaq 0xd0(%r14), %rdi
leaq 0x5305ed(%rip), %rsi # 0x11a9fec
pushq $0x1c
popq %rdx
callq 0x1074e90
testb %al, %al
je 0xc79b02
movq 0xf0(%r14), %rcx
movq %r15, %rdx
testb $0x8, 0x6b(%rcx)
je 0xc79a44
pushq $0x1
popq %rcx
movq %r14, %rdi
movq %r13, %rsi
movq %rdx, %r15
movl %ebx, %edx
callq 0xc79719
movq %r15, %rdx
movq %rax, %r13
movq %rax, 0x10(%rsp)
movq 0xf0(%r14), %rcx
testq %rdx, 0x28(%rcx)
je 0xc79a5d
movq %r14, %rdi
movq %r13, %rsi
callq 0xc79859
movq %rax, %r13
movq %rax, 0x10(%rsp)
movq 0x100(%r14), %rax
movq 0x4348(%rax), %rax
movl 0xf8(%rax), %eax
addl $-0x39, %eax
cmpl $0x1, %eax
ja 0xc79aaa
leaq 0x10(%rsp), %rdi
callq 0xfa6748
testb %al, %al
je 0xc79aa5
addq $0x8, %r14
leaq 0x18(%rsp), %r12
xorl %r15d, %r15d
movq %r12, %rdi
movq %r14, %rsi
movl %ebx, %edx
movl $0x13d3, %ecx # imm = 0x13D3
jmp 0xc7996f
movq 0x10(%rsp), %r13
andq $-0x10, %r13
movq (%r13), %rdi
callq 0xfa66fc
testb %al, %al
je 0xc79ad9
addq $0x8, %r14
leaq 0x18(%rsp), %r12
xorl %r15d, %r15d
movq %r12, %rdi
movq %r14, %rsi
movl %ebx, %edx
movl $0x13dd, %ecx # imm = 0x13DD
jmp 0xc7996f
movq 0x100(%r14), %rdi
movq 0x10(%rsp), %rsi
testb %r12b, %r12b
je 0xc79af5
movzbl %bpl, %edx
callq 0xd9d434
jmp 0xc79afa
callq 0xd9d5d0
movq %rax, %r15
jmp 0xc79992
addq $0x8, %r14
leaq 0x18(%rsp), %r12
xorl %r15d, %r15d
movq %r12, %rdi
movq %r14, %rsi
movl %ebx, %edx
movl $0x10e8, %ecx # imm = 0x10E8
jmp 0xc7996f
|
/Sema/SemaType.cpp
|
checkExtParameterInfos(clang::Sema&, llvm::ArrayRef<clang::QualType>, clang::FunctionProtoType::ExtProtoInfo const&, llvm::function_ref<clang::SourceLocation (unsigned int)>)
|
static void checkExtParameterInfos(Sema &S, ArrayRef<QualType> paramTypes,
const FunctionProtoType::ExtProtoInfo &EPI,
llvm::function_ref<SourceLocation(unsigned)> getParamLoc) {
assert(EPI.ExtParameterInfos && "shouldn't get here without param infos");
bool emittedError = false;
auto actualCC = EPI.ExtInfo.getCC();
enum class RequiredCC { OnlySwift, SwiftOrSwiftAsync };
auto checkCompatible = [&](unsigned paramIndex, RequiredCC required) {
bool isCompatible =
(required == RequiredCC::OnlySwift)
? (actualCC == CC_Swift)
: (actualCC == CC_Swift || actualCC == CC_SwiftAsync);
if (isCompatible || emittedError)
return;
S.Diag(getParamLoc(paramIndex), diag::err_swift_param_attr_not_swiftcall)
<< getParameterABISpelling(EPI.ExtParameterInfos[paramIndex].getABI())
<< (required == RequiredCC::OnlySwift);
emittedError = true;
};
for (size_t paramIndex = 0, numParams = paramTypes.size();
paramIndex != numParams; ++paramIndex) {
switch (EPI.ExtParameterInfos[paramIndex].getABI()) {
// Nothing interesting to check for orindary-ABI parameters.
case ParameterABI::Ordinary:
continue;
// swift_indirect_result parameters must be a prefix of the function
// arguments.
case ParameterABI::SwiftIndirectResult:
checkCompatible(paramIndex, RequiredCC::SwiftOrSwiftAsync);
if (paramIndex != 0 &&
EPI.ExtParameterInfos[paramIndex - 1].getABI()
!= ParameterABI::SwiftIndirectResult) {
S.Diag(getParamLoc(paramIndex),
diag::err_swift_indirect_result_not_first);
}
continue;
case ParameterABI::SwiftContext:
checkCompatible(paramIndex, RequiredCC::SwiftOrSwiftAsync);
continue;
// SwiftAsyncContext is not limited to swiftasynccall functions.
case ParameterABI::SwiftAsyncContext:
continue;
// swift_error parameters must be preceded by a swift_context parameter.
case ParameterABI::SwiftErrorResult:
checkCompatible(paramIndex, RequiredCC::OnlySwift);
if (paramIndex == 0 ||
EPI.ExtParameterInfos[paramIndex - 1].getABI() !=
ParameterABI::SwiftContext) {
S.Diag(getParamLoc(paramIndex),
diag::err_swift_error_result_not_after_swift_context);
}
continue;
}
llvm_unreachable("bad ABI kind");
}
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp # imm = 0x118
movq %rdx, %rbx
movq %rsi, %r14
leaq 0x18(%rsp), %rax
movq %rcx, (%rax)
movq %r8, 0x8(%rax)
leaq 0xf(%rsp), %rcx
movb $0x0, (%rcx)
movzwl (%rdx), %edx
andl $0x1f, %edx
leaq 0x2c(%rsp), %rsi
movl %edx, (%rsi)
leaq 0x30(%rsp), %r12
movq %rsi, (%r12)
movq %rcx, 0x8(%r12)
movq %rdi, 0x10(%r12)
movq %rax, 0x18(%r12)
movq %rbx, 0x20(%r12)
addq $0x8, %rdi
movq %rdi, 0x10(%rsp)
xorl %r13d, %r13d
leaq 0x5d5389(%rip), %rbp # 0x1250dc8
leaq 0x58(%rsp), %r15
cmpq %r13, %r14
je 0xc7bb2c
movq 0x48(%rbx), %rax
movzbl (%rax,%r13), %eax
andl $0xf, %eax
movslq (%rbp,%rax,4), %rax
addq %rbp, %rax
jmpq *%rax
movq %r12, %rdi
movl %r13d, %esi
pushq $0x1
popq %rdx
callq 0xc8686e
testq %r13, %r13
je 0xc7bb24
movq 0x48(%rbx), %rax
movb -0x1(%rax,%r13), %al
andb $0xf, %al
cmpb $0x1, %al
je 0xc7bb24
movq 0x20(%rsp), %rdi
movl %r13d, %esi
callq *0x18(%rsp)
movq %r15, %r12
leaq 0xb8(%rsp), %r15
movq %r15, %rdi
movq 0x10(%rsp), %rsi
movl %eax, %edx
movl $0x1249, %ecx # imm = 0x1249
xorl %r8d, %r8d
callq 0x7a6d9e
movq %r15, %rdi
movq %r12, %r15
leaq 0x30(%rsp), %r12
jmp 0xc7bb1f
movq %r12, %rdi
movl %r13d, %esi
pushq $0x1
popq %rdx
callq 0xc8686e
jmp 0xc7bb24
movq %r12, %rdi
movl %r13d, %esi
xorl %edx, %edx
callq 0xc8686e
testq %r13, %r13
je 0xc7baf9
movq 0x48(%rbx), %rax
movb -0x1(%rax,%r13), %al
andb $0xf, %al
cmpb $0x3, %al
je 0xc7bb24
movq 0x20(%rsp), %rdi
movl %r13d, %esi
callq *0x18(%rsp)
movq %r15, %rdi
movq 0x10(%rsp), %rsi
movl %eax, %edx
movl $0x1248, %ecx # imm = 0x1248
xorl %r8d, %r8d
callq 0x7a6d9e
movq %r15, %rdi
callq 0x78b0f8
incq %r13
jmp 0xc7ba44
addq $0x118, %rsp # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/Sema/SemaType.cpp
|
clang::Sema::BuildMemberPointerType(clang::QualType, clang::QualType, clang::SourceLocation, clang::DeclarationName)
|
QualType Sema::BuildMemberPointerType(QualType T, QualType Class,
SourceLocation Loc,
DeclarationName Entity) {
// Verify that we're not building a pointer to pointer to function with
// exception specification.
if (CheckDistantExceptionSpec(T)) {
Diag(Loc, diag::err_distant_exception_spec);
return QualType();
}
// C++ 8.3.3p3: A pointer to member shall not point to ... a member
// with reference type, or "cv void."
if (T->isReferenceType()) {
Diag(Loc, diag::err_illegal_decl_mempointer_to_reference)
<< getPrintableNameForEntity(Entity) << T;
return QualType();
}
if (T->isVoidType()) {
Diag(Loc, diag::err_illegal_decl_mempointer_to_void)
<< getPrintableNameForEntity(Entity);
return QualType();
}
if (!Class->isDependentType() && !Class->isRecordType()) {
Diag(Loc, diag::err_mempointer_in_nonclass_type) << Class;
return QualType();
}
if (T->isFunctionType() && getLangOpts().OpenCL &&
!getOpenCLOptions().isAvailableOption("__cl_clang_function_pointers",
getLangOpts())) {
Diag(Loc, diag::err_opencl_function_pointer) << /*pointer*/ 0;
return QualType();
}
if (getLangOpts().HLSL && Loc.isValid()) {
Diag(Loc, diag::err_hlsl_pointers_unsupported) << 0;
return QualType();
}
// Adjust the default free function calling convention to the default method
// calling convention.
bool IsCtorOrDtor =
(Entity.getNameKind() == DeclarationName::CXXConstructorName) ||
(Entity.getNameKind() == DeclarationName::CXXDestructorName);
if (T->isFunctionType())
adjustMemberFunctionCC(T, /*HasThisPointer=*/true, IsCtorOrDtor, Loc);
return Context.getMemberPointerType(T, Class.getTypePtr());
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %r8, %r13
movl %ecx, %ebx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movq %rsi, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
callq 0x906fce
testb %al, %al
je 0xc7bb96
addq $0x8, %r14
leaq 0x98(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
movl $0xd35, %ecx # imm = 0xD35
xorl %r8d, %r8d
callq 0x7a6d9e
jmp 0xc7bc47
movq %r12, %rbp
andq $-0x10, %rbp
movq (%rbp), %rdi
movq 0x8(%rdi), %rax
andq $-0x10, %rax
movq (%rax), %rax
movb 0x10(%rax), %al
addb $-0x29, %al
cmpb $0x1, %al
ja 0xc7bbfd
addq $0x8, %r14
leaq 0x38(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
movl $0xe03, %ecx # imm = 0xE03
xorl %r8d, %r8d
callq 0x7a6d9e
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc7958d
movq %r15, %rdi
movq %rbx, %rsi
callq 0x795ea0
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x787c63
jmp 0xc7bc3f
callq 0x79b9a8
testb %al, %al
je 0xc7bc63
addq $0x8, %r14
leaq 0x38(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
movl $0xe04, %ecx # imm = 0xE04
xorl %r8d, %r8d
callq 0x7a6d9e
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc7958d
movq %r15, %rdi
movq %rbx, %rsi
callq 0x795ea0
movq %rbx, %rdi
callq 0x436d30
movq %r15, %rdi
callq 0x78b0f8
xorl %eax, %eax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
andq $-0x10, %r15
movq (%r15), %rax
testb $0x4, 0x11(%rax)
jne 0xc7bc85
movq 0x8(%rax), %rax
andq $-0x10, %rax
movq (%rax), %rax
cmpb $0x2e, 0x10(%rax)
jne 0xc7bd27
movq (%rbp), %rax
movq 0x8(%rax), %rax
andq $-0x10, %rax
movq (%rax), %rax
movb 0x10(%rax), %al
addb $-0x19, %al
cmpb $0x1, %al
ja 0xc7bcc8
movq 0xf0(%r14), %rcx
testb $0x40, 0x2f(%rcx)
je 0xc7bcc8
leaq 0xd0(%r14), %rdi
leaq 0x52e334(%rip), %rsi # 0x11a9fec
pushq $0x1c
popq %rdx
callq 0x1074e90
testb %al, %al
je 0xc7bdb3
movq 0xf0(%r14), %rax
movb 0x59(%rax), %al
shrb %al
testl %ebx, %ebx
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0xc7bcfb
addq $0x8, %r14
leaq 0x38(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
movl $0xdf4, %ecx # imm = 0xDF4
jmp 0xc7bdc9
movl %r13d, %eax
andl $0x7, %eax
cmpl $0x3, %eax
je 0xc7bd57
cmpl $0x7, %eax
jne 0xc7bd1f
andq $-0x8, %r13
movl (%r13), %ecx
cmpl $0x3, %ecx
pushq $0x3
popq %rax
cmovbl %ecx, %eax
orl $0x8, %eax
cmpl $0x4, %eax
sete %al
jmp 0xc7bd59
addq $0x8, %r14
leaq 0x38(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
movl $0xee3, %ecx # imm = 0xEE3
xorl %r8d, %r8d
callq 0x7a6d9e
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x787c63
jmp 0xc7bc47
movb $0x1, %al
movq (%rbp), %rcx
movq 0x8(%rcx), %rcx
andq $-0x10, %rcx
movq (%rcx), %rcx
movb 0x10(%rcx), %cl
addb $-0x19, %cl
cmpb $0x1, %cl
ja 0xc7bd90
movzbl %al, %ecx
leaq 0x8(%rsp), %r12
pushq $0x1
popq %rdx
movq %r14, %rdi
movq %r12, %rsi
movl %ebx, %r8d
callq 0xc7bde6
movq (%r12), %r12
movq 0x100(%r14), %rdi
movq (%r15), %rdx
movq %r12, %rsi
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xd9d738
addq $0x8, %r14
leaq 0x38(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
movl $0x10e8, %ecx # imm = 0x10E8
xorl %r8d, %r8d
callq 0x7a6d9e
leaq 0x18(%rsp), %rsi
andl $0x0, (%rsi)
movq %r15, %rdi
callq 0x75c9d2
jmp 0xc7bc47
|
/Sema/SemaType.cpp
|
clang::Sema::BuildCountAttributedArrayOrPointerType(clang::QualType, clang::Expr*, bool, bool)
|
QualType Sema::BuildCountAttributedArrayOrPointerType(QualType WrappedTy,
Expr *CountExpr,
bool CountInBytes,
bool OrNull) {
assert(WrappedTy->isIncompleteArrayType() || WrappedTy->isPointerType());
llvm::SmallVector<TypeCoupledDeclRefInfo, 1> Decls;
BuildTypeCoupledDecls(CountExpr, Decls);
/// When the resulting expression is invalid, we still create the AST using
/// the original count expression for the sake of AST dump.
return Context.getCountAttributedType(WrappedTy, CountExpr, CountInBytes,
OrNull, Decls);
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r8d, %ebx
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
leaq 0x40(%rsp), %rax
movq %rax, -0x10(%rax)
movabsq $0x100000000, %rcx # imm = 0x100000000
movq %rcx, -0x8(%rax)
movq 0x10(%rdx), %rsi
leaq 0x28(%rsp), %r13
movq %r13, %rdi
xorl %edx, %edx
callq 0xfa9636
movq (%r13), %rsi
leaq 0x30(%rsp), %r13
movq %r13, %rdi
callq 0x6e4b1e
movq 0x100(%r12), %rdi
movq (%r13), %rax
movq %rax, 0x18(%rsp)
movl 0x8(%r13), %eax
movq %rax, 0x20(%rsp)
movups 0x18(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %r15, %rsi
movq %r14, %rdx
movl %ebp, %ecx
movl %ebx, %r8d
callq 0xd9c208
movq %rax, %rbx
movq %r13, %rdi
callq 0x6e4b86
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
|
/Sema/SemaType.cpp
|
clang::Sema::BuiltinDecay(clang::QualType, clang::SourceLocation)
|
QualType Sema::BuiltinDecay(QualType BaseType, SourceLocation Loc) {
QualType Underlying = BaseType.getNonReferenceType();
if (Underlying->isArrayType())
return Context.getDecayedType(Underlying);
if (Underlying->isFunctionType())
return BuiltinAddPointer(BaseType, Loc);
SplitQualType Split = Underlying.getSplitUnqualifiedType();
// std::decay is supposed to produce 'std::remove_cv', but since 'restrict' is
// in the same group of qualifiers as 'const' and 'volatile', we're extending
// '__decay(T)' so that it removes all qualifiers.
Split.Quals.removeCVRQualifiers();
return Context.getQualifiedType(Split);
}
|
pushq %rbp
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebp
movq %rdi, %rbx
leaq 0x10(%rsp), %rdi
movq %rsi, (%rdi)
callq 0x75e968
movq %rax, 0x8(%rsp)
movq %rax, %rcx
andq $-0x10, %rcx
movq (%rcx), %rcx
movq 0x8(%rcx), %rcx
andq $-0x10, %rcx
movq (%rcx), %rcx
movzbl 0x10(%rcx), %ecx
leal -0x2(%rcx), %edx
cmpl $0x4, %edx
ja 0xc86015
movq 0x100(%rbx), %rdi
movq %rax, %rsi
callq 0xd9d04e
jmp 0xc8604b
addb $-0x19, %cl
cmpb $0x1, %cl
ja 0xc8602e
movq 0x10(%rsp), %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0xc85f20
jmp 0xc8604b
leaq 0x8(%rsp), %rdi
callq 0xc79032
andq $-0x8, %rdx
movq 0x100(%rbx), %rdi
movq %rax, %rsi
callq 0x911890
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
|
/Sema/SemaType.cpp
|
clang::Sema::BuiltinAddReference(clang::QualType, clang::UnaryTransformType::UTTKind, clang::SourceLocation)
|
QualType Sema::BuiltinAddReference(QualType BaseType, UTTKind UKind,
SourceLocation Loc) {
assert(LangOpts.CPlusPlus);
QualType Reference =
BaseType.isReferenceable()
? BuildReferenceType(BaseType,
UKind == UnaryTransformType::AddLvalueReference,
Loc, DeclarationName())
: BaseType;
return Reference.isNull() ? QualType() : Reference;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebx
movl %edx, %ebp
movq %rdi, %r14
movq %rsp, %r15
movq %rsi, (%r15)
movq %r15, %rdi
callq 0x9cabac
movl %eax, %ecx
movq (%r15), %rax
testb %cl, %cl
je 0xc8608b
xorl %edx, %edx
testl %ebp, %ebp
sete %dl
movq %r14, %rdi
movq %rax, %rsi
movl %ebx, %ecx
callq 0xc798d2
xorl %ecx, %ecx
cmpq $0x10, %rax
cmovaeq %rax, %rcx
movq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
|
/Sema/SemaType.cpp
|
llvm::DenseMapBase<llvm::DenseMap<clang::MacroQualifiedType const*, clang::SourceLocation, llvm::DenseMapInfo<clang::MacroQualifiedType const*, void>, llvm::detail::DenseMapPair<clang::MacroQualifiedType const*, clang::SourceLocation>>, clang::MacroQualifiedType const*, clang::SourceLocation, llvm::DenseMapInfo<clang::MacroQualifiedType const*, void>, llvm::detail::DenseMapPair<clang::MacroQualifiedType const*, clang::SourceLocation>>::moveFromOldBuckets(llvm::detail::DenseMapPair<clang::MacroQualifiedType const*, clang::SourceLocation>*, llvm::detail::DenseMapPair<clang::MacroQualifiedType const*, clang::SourceLocation>*)
|
void moveFromOldBuckets(BucketT *OldBucketsBegin, BucketT *OldBucketsEnd) {
initEmpty();
// Insert all the old elements.
const KeyT EmptyKey = getEmptyKey();
const KeyT TombstoneKey = getTombstoneKey();
for (BucketT *B = OldBucketsBegin, *E = OldBucketsEnd; B != E; ++B) {
if (!KeyInfoT::isEqual(B->getFirst(), EmptyKey) &&
!KeyInfoT::isEqual(B->getFirst(), TombstoneKey)) {
// Insert the key/value into the new table.
BucketT *DestBucket;
bool FoundVal = LookupBucketFor(B->getFirst(), DestBucket);
(void)FoundVal; // silence warning.
assert(!FoundVal && "Key already in new map?");
DestBucket->getFirst() = std::move(B->getFirst());
::new (&DestBucket->getSecond()) ValueT(std::move(B->getSecond()));
incrementNumEntries();
// Free the value.
B->getSecond().~ValueT();
}
B->getFirst().~KeyT();
}
}
|
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0xc869aa
movl $0x1000, %r13d # imm = 0x1000
leaq 0x8(%rsp), %r12
cmpq %rbx, %r14
je 0xc8c476
movq (%r14), %rax
orq %r13, %rax
cmpq $-0x1000, %rax # imm = 0xF000
je 0xc8c470
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0xc8c294
movq (%r14), %rax
movq 0x8(%rsp), %rcx
movq %rax, (%rcx)
movq 0x8(%rsp), %rax
movl 0x8(%r14), %ecx
movl %ecx, 0x8(%rax)
incl 0x8(%r15)
addq $0x10, %r14
jmp 0xc8c434
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
|
/llvm/ADT/DenseMap.h
|
shouldHaveNullability(clang::QualType)
|
static bool shouldHaveNullability(QualType T) {
return T->canHaveNullability(/*ResultIfUnknown=*/false) &&
// For now, do not infer/require nullability on C++ smart pointers.
// It's unclear whether the pragma's behavior is useful for C++.
// e.g. treating type-aliases and template-type-parameters differently
// from types of declarations can be surprising.
!isa<RecordType, TemplateSpecializationType>(
T->getCanonicalTypeInternal());
}
|
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
andq $-0x10, %rbx
movq (%rbx), %rdi
xorl %ebp, %ebp
xorl %esi, %esi
callq 0xfaa88e
testb %al, %al
je 0xc8c64b
movq (%rbx), %rax
movq 0x8(%rax), %rax
andq $-0x10, %rax
movq (%rax), %rax
movb 0x10(%rax), %al
andb $-0x2, %al
cmpb $0x2e, %al
setne %bpl
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
/Sema/SemaType.cpp
|
(anonymous namespace)::DeclaratorLocFiller::VisitMatrixTypeLoc(clang::MatrixTypeLoc)
|
void VisitMatrixTypeLoc(MatrixTypeLoc TL) {
fillMatrixTypeLoc(TL, Chunk.getAttrs());
}
|
movq 0x10(%rdi), %rcx
movq 0x18(%rcx), %rax
movl 0x20(%rcx), %ecx
shlq $0x3, %rcx
xorl %edx, %edx
cmpq %rdx, %rcx
je 0xc8e415
movq (%rax,%rdx), %rdi
movq 0x40(%rdi), %r8
addq $0x8, %rdx
cmpw $0xae, 0x8(%r8)
jne 0xc8e3d9
movl 0x10(%rdi), %eax
movl %eax, (%rsi)
movq 0x48(%rdi), %rax
andq $-0x4, %rax
movq %rax, 0x10(%rsi)
movq 0x50(%rdi), %rax
andq $-0x4, %rax
movq %rax, 0x18(%rsi)
andq $0x0, 0x4(%rsi)
retq
|
/Sema/SemaType.cpp
|
clang::TypeLocVisitor<(anonymous namespace)::TypeSpecLocFiller, void>::Visit(clang::TypeLoc)
|
bool hasLocalQualifiers() const {
return getLocalFastQualifiers() || hasLocalNonFastQualifiers();
}
|
testb $0xf, %sil
jne 0xc8e416
movq (%rsi), %rax
movzbl 0x10(%rax), %eax
leaq 0x5c29c4(%rip), %rcx # 0x12515c0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0xc8ebb8
movq 0x18(%rdi), %rax
movl 0x110(%rax), %eax
jmp 0xc8eccf
movq %rdx, %rsi
jmp 0xc8eb38
movq 0x18(%rdi), %rax
movl 0x10c(%rax), %eax
jmp 0xc8eccf
jmp 0xc8ea90
movq 0x18(%rdi), %rax
movl 0x100(%rax), %ecx
movl %ecx, (%rdx)
movl 0xe4(%rax), %eax
jmp 0xc8ec8c
jmp 0xc8e5e8
jmp 0xc8e9c6
movq 0x18(%rdi), %rax
movl 0x100(%rax), %ecx
movl %ecx, (%rdx)
movq 0x114(%rax), %rax
movq %rax, 0x4(%rdx)
retq
jmp 0xc8ea68
jmp 0xc8e832
jmp 0xc8e51c
movq 0x18(%rdi), %rax
movl 0x100(%rax), %ecx
movl %ecx, (%rdx)
movl 0x118(%rax), %eax
movl %eax, 0x4(%rdx)
retq
jmp 0xc8e43e
jmp 0xc8e796
jmp 0xc8e982
jmp 0xc8e544
jmp 0xc8e4da
jmp 0xc8e7e4
jmp 0xc8ea0a
jmp 0xc8e416
jmp 0xc8e93e
movq %rdx, %rsi
jmp 0xc8eb78
movq 0x18(%rdi), %rax
movl 0x100(%rax), %eax
movl %eax, (%rdx)
retq
|
/clang/AST/Type.h
|
(anonymous namespace)::UninitValsDiagReporter::hasAlwaysUninitializedUse(llvm::SmallVector<clang::UninitUse, 2u> const*)
|
static void checkRecursiveFunction(Sema &S, const FunctionDecl *FD,
const Stmt *Body, AnalysisDeclContext &AC) {
FD = FD->getCanonicalDecl();
// Only run on non-templated functions and non-templated members of
// templated classes.
if (FD->getTemplatedKind() != FunctionDecl::TK_NonTemplate &&
FD->getTemplatedKind() != FunctionDecl::TK_MemberSpecialization)
return;
CFG *cfg = AC.getCFG();
if (!cfg) return;
// If the exit block is unreachable, skip processing the function.
if (cfg->getExit().pred_empty())
return;
// Emit diagnostic if a recursive function call is detected for all paths.
if (checkForRecursiveFunctionCall(FD, cfg))
S.Diag(Body->getBeginLoc(), diag::warn_infinite_recursive_function);
}
|
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq (%rdi), %rbx
movl 0x8(%rdi), %r13d
movq %r13, %r12
shlq $0x6, %r12
leaq (%rbx,%r12), %r15
shrl $0x2, %r13d
testq %r13, %r13
jle 0xc986a9
movq %rbx, %rdi
callq 0xc98ac4
testb %al, %al
jne 0xc986de
leaq 0x40(%rbx), %r14
movq %r14, %rdi
callq 0xc98ac4
testb %al, %al
jne 0xc986e1
leaq 0x80(%rbx), %r14
movq %r14, %rdi
callq 0xc98ac4
testb %al, %al
jne 0xc986e1
leaq 0xc0(%rbx), %r14
movq %r14, %rdi
callq 0xc98ac4
testb %al, %al
jne 0xc986e1
addq $0x100, %rbx # imm = 0x100
decq %r13
addq $-0x100, %r12
jmp 0xc9864f
sarq $0x6, %r12
cmpq $0x1, %r12
je 0xc986f5
cmpq $0x2, %r12
je 0xc986d2
movq %r15, %r14
cmpq $0x3, %r12
jne 0xc986e1
movq %rbx, %rdi
callq 0xc98ac4
testb %al, %al
jne 0xc986de
addq $0x40, %rbx
movq %rbx, %rdi
callq 0xc98ac4
testb %al, %al
je 0xc986f1
movq %rbx, %r14
cmpq %r15, %r14
setne %al
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
addq $0x40, %rbx
movq %rbx, %rdi
callq 0xc98ac4
movq %rbx, %r14
testb %al, %al
jne 0xc986e1
movq %r15, %r14
jmp 0xc986e1
|
/Sema/AnalysisBasedWarnings.cpp
|
clang::RecursiveASTVisitor<CallableVisitor>::TraverseDeclContextHelper(clang::DeclContext*)
|
bool RecursiveASTVisitor<Derived>::TraverseDeclContextHelper(DeclContext *DC) {
if (!DC)
return true;
for (auto *Child : DC->decls()) {
if (!canIgnoreChildDeclWhileTraversingDeclContext(Child))
TRY_TO(TraverseDecl(Child));
}
return true;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0xca6068
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x4d1a72
movq %rax, %r14
movq %rdx, %r15
cmpq %r15, %r14
sete %bpl
je 0xca606b
movq %rbx, %rdi
movq %r14, %rsi
callq 0xca5a06
testb %al, %al
jne 0xca605e
movq %rbx, %rdi
movq %r14, %rsi
callq 0xca5a38
testb %al, %al
je 0xca606b
movq 0x8(%r14), %r14
andq $-0x8, %r14
jmp 0xca6037
movb $0x1, %bpl
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
/clang/AST/RecursiveASTVisitor.h
|
clang::RecursiveASTVisitor<CallableVisitor>::VisitOpenACCClauseList(llvm::ArrayRef<clang::OpenACCClause const*>)
|
bool RecursiveASTVisitor<Derived>::VisitOpenACCClauseList(
ArrayRef<const OpenACCClause *> Clauses) {
for (const auto *C : Clauses)
TRY_TO(VisitOpenACCClause(C));
// if (const auto *WithCond = dyn_cast<OopenACCClauseWithCondition>(C);
// WithCond && WIthCond->hasConditionExpr()) {
// TRY_TO(TraverseStmt(WithCond->getConditionExpr());
// } else if (const auto *
// }
// OpenACCClauseWithCondition::getConditionExpr/hasConditionExpr
//OpenACCClauseWithExprs::children (might be null?)
// TODO OpenACC: When we have Clauses with expressions, we should visit them
// here.
return true;
}
|
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
shlq $0x3, %rbx
xorl %ecx, %ecx
movq %rcx, %r12
cmpq %rcx, %rbx
je 0xcb34e0
movq (%r14,%r12), %rsi
movq %r15, %rdi
callq 0xcb34f2
leaq 0x8(%r12), %rcx
testb %al, %al
jne 0xcb34c3
cmpq %r12, %rbx
sete %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
/clang/AST/RecursiveASTVisitor.h
|
clang::sema::shouldTrackImplicitObjectArg(clang::CXXMethodDecl const*)
|
static bool shouldTrackImplicitObjectArg(const CXXMethodDecl *Callee) {
if (auto *Conv = dyn_cast_or_null<CXXConversionDecl>(Callee))
if (isRecordWithAttr<PointerAttr>(Conv->getConversionType()))
return true;
if (!isInStlNamespace(Callee->getParent()))
return false;
if (!isRecordWithAttr<PointerAttr>(
Callee->getFunctionObjectParameterType()) &&
!isRecordWithAttr<OwnerAttr>(Callee->getFunctionObjectParameterType()))
return false;
if (Callee->getReturnType()->isPointerType() ||
isRecordWithAttr<PointerAttr>(Callee->getReturnType())) {
if (!Callee->getIdentifier())
return false;
return llvm::StringSwitch<bool>(Callee->getName())
.Cases("begin", "rbegin", "cbegin", "crbegin", true)
.Cases("end", "rend", "cend", "crend", true)
.Cases("c_str", "data", "get", true)
// Map and set types.
.Cases("find", "equal_range", "lower_bound", "upper_bound", true)
.Default(false);
} else if (Callee->getReturnType()->isReferenceType()) {
if (!Callee->getIdentifier()) {
auto OO = Callee->getOverloadedOperator();
return OO == OverloadedOperatorKind::OO_Subscript ||
OO == OverloadedOperatorKind::OO_Star;
}
return llvm::StringSwitch<bool>(Callee->getName())
.Cases("front", "back", "at", "top", "value", true)
.Default(false);
}
return false;
}
|
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
testq %rdi, %rdi
je 0xcb7b97
movl 0x1c(%rbx), %eax
andl $0x7f, %eax
cmpl $0x22, %eax
jne 0xcb7b97
movq %rbx, %rdi
callq 0x8b5f20
movq %rax, %rdi
callq 0xcb682e
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0xcb7e63
movq %rbx, %rdi
callq 0x4d2f20
movq 0x10(%rax), %rax
movq %rax, %rdi
andq $-0x8, %rdi
testb $0x4, %al
je 0xcb7bb1
movq (%rdi), %rdi
testq %rdi, %rdi
je 0xcb7e61
movzwl 0x8(%rdi), %eax
andl $0x7f, %eax
cmpw $0x15, %ax
jne 0xcb7c04
movq -0x8(%rdi), %rax
testb $0x7, %al
setne %cl
andq $-0x8, %rax
sete %dl
orb %cl, %dl
jne 0xcb7c04
movq 0x10(%rax), %rax
testl $0xfffffffe, (%rax) # imm = 0xFFFFFFFE
je 0xcb7c04
cmpb $0x5f, 0x10(%rax)
jne 0xcb7c04
movzbl 0x11(%rax), %eax
cmpq $0x5f, %rax
je 0xcb7c11
leaq 0x5e9da2(%rip), %rcx # 0x12a19a0
testb $0x20, (%rcx,%rax,2)
jne 0xcb7c11
callq 0xe1c998
testb %al, %al
je 0xcb7e61
movq %rbx, %rdi
callq 0x75e84e
movq %rax, %rdi
callq 0xcb682e
testb %al, %al
jne 0xcb7c3d
movq %rbx, %rdi
callq 0x75e84e
movq %rax, %rdi
callq 0xcb7fb4
testb %al, %al
je 0xcb7e61
movq %rbx, %rdi
callq 0x4deab2
andq $-0x10, %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
andq $-0x10, %rax
movq (%rax), %rax
cmpb $0x28, 0x10(%rax)
je 0xcb7c75
movq %rbx, %rdi
callq 0x4deab2
movq %rax, %rdi
callq 0xcb682e
testb %al, %al
je 0xcb7e12
movq 0x28(%rbx), %rax
testb $0x7, %al
setne %cl
cmpq $0x8, %rax
setb %al
orb %cl, %al
jne 0xcb7e61
movq %rbx, %rdi
callq 0x4ee522
leaq 0xb8(%rsp), %rdi
movq %rax, (%rdi)
movq %rdx, 0x8(%rdi)
movb $0x0, 0x11(%rdi)
leaq 0x59ce29(%rip), %rax # 0x1254ad8
movq %rax, 0x88(%rsp)
movq $0x6, 0x90(%rsp)
leaq 0x59ce15(%rip), %rax # 0x1254adf
movq %rax, 0x78(%rsp)
movq $0x7, 0x80(%rsp)
movups 0x78(%rsp), %xmm0
movups %xmm0, 0x10(%rsp)
movups 0x88(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x4f4e00(%rip), %rsi # 0x11acaf8
leaq 0x59cde1(%rip), %rcx # 0x1254ae0
pushq $0x5
popq %r14
pushq $0x6
popq %r8
pushq $0x1
popq %rbx
movq %r14, %rdx
movl %ebx, %r9d
callq 0x53f9f4
leaq 0x59cdcb(%rip), %rcx # 0x1254ae7
movq %rcx, 0x68(%rsp)
movq $0x4, 0x70(%rsp)
leaq 0x59cdbb(%rip), %rcx # 0x1254aec
movq %rcx, 0x58(%rsp)
movq $0x5, 0x60(%rsp)
movups 0x58(%rsp), %xmm0
movups %xmm0, 0x10(%rsp)
movups 0x68(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x5a0201(%rip), %rsi # 0x1257f5a
leaq 0x59cd8d(%rip), %rcx # 0x1254aed
pushq $0x3
popq %rdx
pushq $0x4
popq %r15
movq %rax, %rdi
movq %r15, %r8
movl %ebx, %r9d
callq 0x53f9f4
leaq 0x791986(%rip), %rcx # 0x1449702
movq %rcx, 0x48(%rsp)
movq $0x3, 0x50(%rsp)
movups 0x48(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x55c2f5(%rip), %rsi # 0x121408f
leaq 0x76ef70(%rip), %rcx # 0x1426d11
movq %rax, %rdi
movq %r14, %rdx
movq %r15, %r8
movl %ebx, %r9d
callq 0x53fae6
leaq 0x59cd4a(%rip), %rcx # 0x1254b03
movq %rcx, 0x38(%rsp)
pushq $0xb
popq %r8
movq %r8, 0x40(%rsp)
leaq 0x59cd41(%rip), %rcx # 0x1254b0f
movq %rcx, 0x28(%rsp)
movq %r8, 0x30(%rsp)
movups 0x28(%rsp), %xmm0
movups %xmm0, 0x10(%rsp)
movups 0x38(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x59cd00(%rip), %rsi # 0x1254af2
leaq 0x59ccfe(%rip), %rcx # 0x1254af7
movq %rax, %rdi
movq %r15, %rdx
movl %ebx, %r9d
callq 0x53f9f4
movq %rax, %rcx
movb 0x10(%rax), %al
andb 0x11(%rcx), %al
jmp 0xcb7e63
movq %rbx, %rdi
callq 0x4deab2
andq $-0x10, %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
andq $-0x10, %rax
movq (%rax), %rax
movb 0x10(%rax), %al
addb $-0x29, %al
cmpb $0x1, %al
ja 0xcb7e61
movq 0x28(%rbx), %rax
testb $0x7, %al
sete %cl
cmpq $0x8, %rax
setae %al
movq %rbx, %rdi
testb %cl, %al
jne 0xcb7e70
callq 0xe1367a
cmpl $0x2b, %eax
sete %cl
cmpl $0x7, %eax
sete %al
orb %cl, %al
jmp 0xcb7e63
xorl %eax, %eax
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
callq 0x4ee522
leaq 0xb8(%rsp), %rdi
movq %rax, (%rdi)
movq %rdx, 0x8(%rdi)
movb $0x0, 0x11(%rdi)
leaq 0x80216a(%rip), %rax # 0x14b9ff9
movq %rax, 0xa8(%rsp)
movq $0x5, 0xb0(%rsp)
leaq 0x4f17b0(%rip), %rax # 0x11a965a
movq %rax, 0x98(%rsp)
movq $0x3, 0xa0(%rsp)
leaq 0x52b714(%rip), %rsi # 0x11e35d9
pushq $0x5
popq %rdx
pushq $0x1
popq %rbx
movl %ebx, %ecx
callq 0x485294
movups 0xa8(%rsp), %xmm0
movups %xmm0, 0x10(%rsp)
movups 0x98(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x52b707(%rip), %rsi # 0x11e35f9
leaq 0x763052(%rip), %rcx # 0x141af4b
pushq $0x4
popq %rdx
pushq $0x2
popq %r8
movq %rax, %rdi
jmp 0xcb7dff
|
/Sema/CheckExprLifetime.cpp
|
(anonymous namespace)::JumpScopeChecker::BuildScopeInformation(clang::Decl*, unsigned int&)
|
void JumpScopeChecker::BuildScopeInformation(Decl *D, unsigned &ParentScope) {
// If this decl causes a new scope, push and switch to it.
std::pair<unsigned,unsigned> Diags = GetDiagForGotoScopeDecl(S, D);
if (Diags.first || Diags.second) {
Scopes.push_back(GotoScope(ParentScope, Diags.first, Diags.second,
D->getLocation()));
ParentScope = Scopes.size()-1;
}
// If the decl has an initializer, walk it with the potentially new
// scope we just installed.
if (VarDecl *VD = dyn_cast<VarDecl>(D))
if (Expr *Init = VD->getInit())
BuildScopeInformation(Init, ParentScope);
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movl 0x1c(%rsi), %eax
andl $0x7f, %eax
leal -0x2c(%rax), %ecx
cmpl $-0x7, %ecx
setb %cl
testq %rsi, %rsi
sete %dl
orb %cl, %dl
je 0xcba53d
testq %r15, %r15
sete %cl
leal -0x40(%rax), %edx
cmpl $-0x3, %edx
setb %dl
xorl %ebp, %ebp
orb %cl, %dl
jne 0xcba535
movq 0x50(%r15), %rcx
movq %rcx, %rdx
andq $-0x8, %rdx
andl $0x4, %ecx
movq (%rdx,%rcx,2), %rcx
andq $-0x10, %rcx
movq (%rcx), %rcx
testb $0x8, 0x11(%rcx)
jne 0xcba594
xorl %r12d, %r12d
jmp 0xcba6c9
movq (%r14), %r13
movq 0x30(%r15), %rax
andq $-0x10, %rax
movq (%rax), %rax
movzwl 0x11(%rax), %eax
andl $0x8, %eax
movl $0x170d, %r12d # imm = 0x170D
cmovel %eax, %r12d
movq %r15, %rdi
callq 0x6f3498
testb %al, %al
je 0xcba578
movl $0x15a2, %ebp # imm = 0x15A2
movl $0x16f7, %r12d # imm = 0x16F7
jmp 0xcba6c9
movq %r15, %rdi
callq 0x83bfea
testb %al, %al
je 0xcba5aa
movl $0x15a7, %ebp # imm = 0x15A7
movl $0x16f8, %r12d # imm = 0x16F8
jmp 0xcba6c9
xorl %r12d, %r12d
cmpl $0x3d, %eax
sete %r12b
orl $0x170e, %r12d # imm = 0x170E
jmp 0xcba6c9
movq %r15, %rdi
callq 0x74861e
xorl %ecx, %ecx
movl $0x0, %ebp
testb %al, %al
je 0xcba61a
movq 0x30(%r15), %rdi
callq 0xfaad10
decl %eax
cmpl $0x3, %eax
ja 0xcba616
leaq 0x59a5e0(%rip), %rcx # 0x1254bb4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x15ab, %ebp # imm = 0x15AB
movb $0x1, %cl
jmp 0xcba61a
movl $0x15b2, %ebp # imm = 0x15B2
movl $0x1706, %r12d # imm = 0x1706
jmp 0xcba6c9
movl $0x15ab, %ebp # imm = 0x15AB
movl $0x16fe, %r12d # imm = 0x16FE
jmp 0xcba6c9
movl $0x15af, %ebp # imm = 0x15AF
movl $0x1703, %r12d # imm = 0x1703
jmp 0xcba6c9
xorl %ecx, %ecx
xorl %ebp, %ebp
movl %ecx, 0x4(%rsp)
movq %r15, %rdi
callq 0xe11aa2
movq 0x100(%r13), %rcx
movq 0x830(%rcx), %rcx
testb $0x4, 0x1(%rcx)
je 0xcba6c9
movq %r15, %rdi
movq %rax, %r13
callq 0x74861e
xorb $0x1, %al
testq %r13, %r13
sete %cl
orb %al, %cl
jne 0xcba6c9
movq %r13, %rdx
testb $0x2, 0x2(%r13)
jne 0xcba6c9
movb (%rdx), %al
andb $-0x2, %al
movl $0x170a, %r12d # imm = 0x170A
cmpb $0x70, %al
jne 0xcba6c9
movq 0x10(%rdx), %r13
testb $-0x80, 0x52(%r13)
je 0xcba6c9
movq %r13, %rdi
callq 0xe21f30
testb %al, %al
je 0xcba6c9
movb 0x60(%r15), %cl
andb $0x60, %cl
xorl %eax, %eax
cmpb $0x20, %cl
sete %cl
setne %dl
movl 0x4(%rsp), %esi
orb %dl, %sil
je 0xcba6ab
movb %cl, %al
leal 0x170a(,%rax,2), %r12d
jmp 0xcba6c9
movq %r13, %rdi
callq 0x4d2f20
movq %rax, %rdi
callq 0x859f74
xorl %ebp, %ebp
testb %al, %al
movl $0x170b, %r12d # imm = 0x170B
cmovnel %ebp, %r12d
movl %ebp, %eax
orl %r12d, %eax
je 0xcba6fa
movl %ebp, %eax
leaq 0x10(%r14), %rdi
movl (%rbx), %ecx
shlq $0x20, %r12
orq %rcx, %r12
movl 0x18(%r15), %edx
shlq $0x20, %rdx
orq %rax, %rdx
movq %r12, %rsi
callq 0xcb9794
movl 0x18(%r14), %eax
decl %eax
movl %eax, (%rbx)
testq %r15, %r15
je 0xcba737
movl 0x1c(%r15), %eax
andl $0x7f, %eax
addl $-0x2c, %eax
cmpl $-0x7, %eax
jb 0xcba737
movq %r15, %rdi
callq 0xe11aa2
testq %rax, %rax
je 0xcba737
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xcb97de
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/Sema/JumpDiagnostics.cpp
|
llvm::DenseMapBase<llvm::DenseMap<clang::Stmt*, unsigned int, llvm::DenseMapInfo<clang::Stmt*, void>, llvm::detail::DenseMapPair<clang::Stmt*, unsigned int>>, clang::Stmt*, unsigned int, llvm::DenseMapInfo<clang::Stmt*, void>, llvm::detail::DenseMapPair<clang::Stmt*, unsigned int>>::moveFromOldBuckets(llvm::detail::DenseMapPair<clang::Stmt*, unsigned int>*, llvm::detail::DenseMapPair<clang::Stmt*, unsigned int>*)
|
void moveFromOldBuckets(BucketT *OldBucketsBegin, BucketT *OldBucketsEnd) {
initEmpty();
// Insert all the old elements.
const KeyT EmptyKey = getEmptyKey();
const KeyT TombstoneKey = getTombstoneKey();
for (BucketT *B = OldBucketsBegin, *E = OldBucketsEnd; B != E; ++B) {
if (!KeyInfoT::isEqual(B->getFirst(), EmptyKey) &&
!KeyInfoT::isEqual(B->getFirst(), TombstoneKey)) {
// Insert the key/value into the new table.
BucketT *DestBucket;
bool FoundVal = LookupBucketFor(B->getFirst(), DestBucket);
(void)FoundVal; // silence warning.
assert(!FoundVal && "Key already in new map?");
DestBucket->getFirst() = std::move(B->getFirst());
::new (&DestBucket->getSecond()) ValueT(std::move(B->getSecond()));
incrementNumEntries();
// Free the value.
B->getSecond().~ValueT();
}
B->getFirst().~KeyT();
}
}
|
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0xcba47c
movl $0x1000, %r13d # imm = 0x1000
leaq 0x8(%rsp), %r12
cmpq %rbx, %r14
je 0xcba9ce
movq (%r14), %rax
orq %r13, %rax
cmpq $-0x1000, %rax # imm = 0xF000
je 0xcba9c8
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0xcba7ec
movq (%r14), %rax
movq 0x8(%rsp), %rcx
movq %rax, (%rcx)
movq 0x8(%rsp), %rax
movl 0x8(%r14), %ecx
movl %ecx, 0x8(%rax)
incl 0x8(%r15)
addq $0x10, %r14
jmp 0xcba98c
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
|
/llvm/ADT/DenseMap.h
|
clang::RecursiveASTVisitor<(anonymous namespace)::StmtUSEFinder>::TraverseRecordHelper(clang::RecordDecl*)
|
bool RecursiveASTVisitor<Derived>::TraverseRecordHelper(RecordDecl *D) {
// We shouldn't traverse D->getTypeForDecl(); it's a result of
// declaring the type, not something that was written in the source.
TRY_TO(TraverseDeclTemplateParameterLists(D));
TRY_TO(TraverseNestedNameSpecifierLoc(D->getQualifierLoc()));
return true;
}
|
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
xorl %r15d, %r15d
movq 0x78(%r14), %rax
testb $0x4, %al
jne 0xcdc266
xorl %ecx, %ecx
jmp 0xcdc270
movq %rax, %rcx
andq $-0x8, %rcx
movl 0x10(%rcx), %ecx
cmpq %rcx, %r15
jae 0xcdc28e
andq $-0x8, %rax
movq 0x18(%rax), %rax
movq (%rax,%r15,8), %rsi
movq %rbx, %rdi
callq 0xcda374
incq %r15
jmp 0xcdc25a
movq %r14, %rdi
callq 0x4d36b0
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0xcd960c
|
/clang/AST/RecursiveASTVisitor.h
|
clang::api_notes::(anonymous namespace)::ReadCommonEntityInfo(unsigned char const*&, clang::api_notes::CommonEntityInfo&)
|
void ReadCommonEntityInfo(const uint8_t *&Data, CommonEntityInfo &Info) {
uint8_t UnavailableBits = *Data++;
Info.Unavailable = (UnavailableBits >> 1) & 0x01;
Info.UnavailableInSwift = UnavailableBits & 0x01;
if ((UnavailableBits >> 2) & 0x01)
Info.setSwiftPrivate(static_cast<bool>((UnavailableBits >> 3) & 0x01));
unsigned MsgLength =
endian::readNext<uint16_t, llvm::endianness::little>(Data);
Info.UnavailableMsg =
std::string(reinterpret_cast<const char *>(Data),
reinterpret_cast<const char *>(Data) + MsgLength);
Data += MsgLength;
unsigned SwiftNameLength =
endian::readNext<uint16_t, llvm::endianness::little>(Data);
Info.SwiftName =
std::string(reinterpret_cast<const char *>(Data),
reinterpret_cast<const char *>(Data) + SwiftNameLength);
Data += SwiftNameLength;
}
|
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, (%rdi)
movzbl (%rax), %eax
movl %eax, %ecx
shrb %cl
andb $0x1, %cl
movb 0x20(%rsi), %dl
andb $-0x4, %dl
orb %cl, %dl
leal (%rax,%rax), %ecx
andb $0x2, %cl
orb %dl, %cl
movb %cl, 0x20(%rsi)
testb $0x4, %al
je 0xcf4adf
movzwl %ax, %esi
shrl $0x3, %esi
andl $0x1, %esi
orl $0x100, %esi # imm = 0x100
movq %r14, %rdi
callq 0xcf4b72
movq (%rbx), %rax
movzwl (%rax), %r12d
leaq 0x2(%rax), %rsi
movq %rsi, (%rbx)
leaq (%rax,%r12), %rdx
addq $0x2, %rdx
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
movq %rsp, %r15
movq %r15, %rdi
callq 0x452168
movq %r14, %rdi
movq %r15, %rsi
callq 0x436ae0
movq %r15, %rdi
callq 0x436d30
movq (%rbx), %rax
leaq (%rax,%r12), %rcx
movq %rcx, (%rbx)
leaq (%rax,%r12), %rsi
addq $0x2, %rsi
movzwl -0x2(%rsi), %r12d
movq %rsi, (%rbx)
leaq 0x2(%r12,%rcx), %rdx
movq %r13, (%r15)
movq %rsp, %r15
movq %r15, %rdi
callq 0x452168
addq $0x28, %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x436ae0
movq %r15, %rdi
callq 0x436d30
addq %r12, (%rbx)
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
|
/APINotes/APINotesReader.cpp
|
clang::api_notes::APINotesWriter::addContext(std::optional<clang::api_notes::ContextID>, llvm::StringRef, clang::api_notes::ContextKind, clang::api_notes::ContextInfo const&, llvm::VersionTuple)
|
ContextID APINotesWriter::addContext(std::optional<ContextID> ParentCtxID,
llvm::StringRef Name, ContextKind Kind,
const ContextInfo &Info,
llvm::VersionTuple SwiftVersion) {
IdentifierID NameID = Implementation->getIdentifier(Name);
uint32_t RawParentCtxID = ParentCtxID ? ParentCtxID->Value : -1;
ContextTableKey Key(RawParentCtxID, static_cast<uint8_t>(Kind), NameID);
auto Known = Implementation->Contexts.find(Key);
if (Known == Implementation->Contexts.end()) {
unsigned NextID = Implementation->Contexts.size() + 1;
Implementation::VersionedSmallVector<ContextInfo> EmptyVersionedInfo;
Known = Implementation->Contexts
.insert(std::make_pair(
Key, std::make_pair(NextID, EmptyVersionedInfo)))
.first;
Implementation->ContextNames[NextID] = NameID;
Implementation->ParentContexts[NextID] = RawParentCtxID;
}
// Add this version information.
auto &VersionedVec = Known->second.second;
bool Found = false;
for (auto &Versioned : VersionedVec) {
if (Versioned.first == SwiftVersion) {
Versioned.second |= Info;
Found = true;
break;
}
}
if (!Found)
VersionedVec.push_back({SwiftVersion, Info});
return ContextID(Known->second.first);
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2a8, %rsp # imm = 0x2A8
movq %r9, 0x10(%rsp)
movl %r8d, %ebp
movq %rsi, %r14
movq %rdi, %r15
movq (%rdi), %rdi
movq %rdx, %rsi
movq %rcx, %rdx
callq 0xd02b36
movq %rax, %r12
btq $0x20, %r14
pushq $-0x1
popq %rbx
cmovbl %r14d, %ebx
shrq $0x21, %r12
leaq 0x1c(%rsp), %rsi
movl %ebx, (%rsi)
movb %bpl, 0x4(%rsi)
movl %r12d, 0x8(%rsi)
movl $0x250, %ebp # imm = 0x250
movq (%r15), %rdi
addq %rbp, %rdi
callq 0xd02bc4
movq %rax, %r14
movq (%r15), %rax
movl 0x260(%rax), %ecx
imulq $0xd8, %rcx, %rcx
addq 0x250(%rax), %rcx
cmpq %rcx, %r14
jne 0xd02a9b
addq %rax, %rbp
movl 0x258(%rax), %eax
incl %eax
leaq 0xc(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x130(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movabsq $0x100000000, %rdx # imm = 0x100000000
movq %rdx, -0x8(%rcx)
leaq 0x1e8(%rsp), %r13
movl %eax, -0x8(%r13)
leaq 0x120(%rsp), %rsi
movq %r13, %rdi
callq 0xcc0934
movl 0x24(%rsp), %eax
leaq 0x50(%rsp), %rdi
movl %eax, -0x8(%rdi)
movq 0x1c(%rsp), %rax
movq %rax, -0x10(%rdi)
leaq 0x1e0(%rsp), %rsi
callq 0xd03c76
leaq 0x28(%rsp), %r14
leaq 0x40(%rsp), %rdx
movq %r14, %rdi
movq %rbp, %rsi
callq 0xd02c04
movq (%r14), %r14
leaq 0x58(%rsp), %rdi
callq 0xcc0d44
movq %r13, %rdi
callq 0xcc0d44
movl $0x280, %edi # imm = 0x280
addq (%r15), %rdi
leaq 0xc(%rsp), %r13
movq %r13, %rsi
callq 0x55149e
movl %r12d, 0x4(%rax)
movl $0x268, %edi # imm = 0x268
addq (%r15), %rdi
movq %r13, %rsi
callq 0x55149e
movl %ebx, 0x4(%rax)
leaq 0x120(%rsp), %rdi
callq 0xcc0d44
leaq 0x2e0(%rsp), %r13
leaq 0x18(%r14), %r15
movq 0x18(%r14), %r12
movl 0x20(%r14), %eax
imulq $0xb0, %rax, %rbx
testq %rbx, %rbx
je 0xd02ada
movq %r12, %rdi
movq %r13, %rsi
callq 0x51df2b
testb %al, %al
jne 0xd02b0e
addq $0xb0, %r12
addq $-0xb0, %rbx
jmp 0xd02ab6
movups (%r13), %xmm0
leaq 0x50(%rsp), %r12
movaps %xmm0, -0x10(%r12)
movq %r12, %rdi
movq 0x10(%rsp), %rsi
callq 0xcc0cea
leaq 0x40(%rsp), %rsi
movq %r15, %rdi
callq 0xcf4974
movq %r12, %rdi
callq 0xcc1420
jmp 0xd02b1f
addq $0x10, %r12
movq %r12, %rdi
movq 0x10(%rsp), %rsi
callq 0xd02c16
movl 0x10(%r14), %eax
addq $0x2a8, %rsp # imm = 0x2A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
|
/APINotes/APINotesWriter.cpp
|
llvm::OnDiskChainedHashTableGenerator<clang::api_notes::(anonymous namespace)::ObjCPropertyTableInfo>::resize(unsigned long)
|
void resize(size_t NewSize) {
Bucket *NewBuckets = static_cast<Bucket *>(
safe_calloc(NewSize, sizeof(Bucket)));
// Populate NewBuckets with the old entries.
for (size_t I = 0; I < NumBuckets; ++I)
for (Item *E = Buckets[I].Head; E;) {
Item *N = E->Next;
E->Next = nullptr;
insert(NewBuckets, NewSize, E);
E = N;
}
free(Buckets);
NumBuckets = NewSize;
Buckets = NewBuckets;
}
|
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
pushq $0x10
popq %rsi
movq %r14, %rdi
callq 0x466ed7
movq %rax, %r15
movl (%rbx), %eax
movq 0x68(%rbx), %rdi
leaq -0x1(%r14), %rcx
xorl %edx, %edx
cmpq %rax, %rdx
jae 0xd053e8
movq %rdx, %rsi
shlq $0x4, %rsi
movq 0x8(%rdi,%rsi), %rsi
testq %rsi, %rsi
je 0xd053e3
movq 0xa8(%rsi), %r8
movq 0xb0(%rsi), %r9
andq %rcx, %r9
shlq $0x4, %r9
movq 0x8(%r15,%r9), %r10
movq %r10, 0xa8(%rsi)
incl 0x4(%r15,%r9)
movq %rsi, 0x8(%r15,%r9)
movq %r8, %rsi
jmp 0xd053ae
incq %rdx
jmp 0xd0539d
callq 0x436840
movl %r14d, (%rbx)
movq %r15, 0x68(%rbx)
popq %rbx
popq %r14
popq %r15
retq
|
/llvm/Support/OnDiskHashTable.h
|
llvm::OnDiskChainedHashTableGenerator<clang::api_notes::(anonymous namespace)::GlobalFunctionTableInfo>::resize(unsigned long)
|
void resize(size_t NewSize) {
Bucket *NewBuckets = static_cast<Bucket *>(
safe_calloc(NewSize, sizeof(Bucket)));
// Populate NewBuckets with the old entries.
for (size_t I = 0; I < NumBuckets; ++I)
for (Item *E = Buckets[I].Head; E;) {
Item *N = E->Next;
E->Next = nullptr;
insert(NewBuckets, NewSize, E);
E = N;
}
free(Buckets);
NumBuckets = NewSize;
Buckets = NewBuckets;
}
|
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
pushq $0x10
popq %rsi
movq %r14, %rdi
callq 0x466ed7
movq %rax, %r15
movl (%rbx), %eax
movq 0x68(%rbx), %rdi
leaq -0x1(%r14), %rcx
xorl %edx, %edx
cmpq %rax, %rdx
jae 0xd072ea
movq %rdx, %rsi
shlq $0x4, %rsi
movq 0x8(%rdi,%rsi), %rsi
testq %rsi, %rsi
je 0xd072e5
movq 0xb8(%rsi), %r8
movq 0xc0(%rsi), %r9
andq %rcx, %r9
shlq $0x4, %r9
movq 0x8(%r15,%r9), %r10
movq %r10, 0xb8(%rsi)
incl 0x4(%r15,%r9)
movq %rsi, 0x8(%r15,%r9)
movq %r8, %rsi
jmp 0xd072b0
incq %rdx
jmp 0xd0729f
callq 0x436840
movl %r14d, (%rbx)
movq %r15, 0x68(%rbx)
popq %rbx
popq %r14
popq %r15
retq
|
/llvm/Support/OnDiskHashTable.h
|
llvm::OnDiskChainedHashTableGenerator<clang::api_notes::(anonymous namespace)::TypedefTableInfo>::resize(unsigned long)
|
void resize(size_t NewSize) {
Bucket *NewBuckets = static_cast<Bucket *>(
safe_calloc(NewSize, sizeof(Bucket)));
// Populate NewBuckets with the old entries.
for (size_t I = 0; I < NumBuckets; ++I)
for (Item *E = Buckets[I].Head; E;) {
Item *N = E->Next;
E->Next = nullptr;
insert(NewBuckets, NewSize, E);
E = N;
}
free(Buckets);
NumBuckets = NewSize;
Buckets = NewBuckets;
}
|
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
pushq $0x10
popq %rsi
movq %r14, %rdi
callq 0x466ed7
movq %rax, %r15
movl (%rbx), %eax
movq 0x68(%rbx), %rdi
leaq -0x1(%r14), %rcx
xorl %edx, %edx
cmpq %rax, %rdx
jae 0xd0861a
movq %rdx, %rsi
shlq $0x4, %rsi
movq 0x8(%rdi,%rsi), %rsi
testq %rsi, %rsi
je 0xd08615
movq 0xc8(%rsi), %r8
movq 0xd0(%rsi), %r9
andq %rcx, %r9
shlq $0x4, %r9
movq 0x8(%r15,%r9), %r10
movq %r10, 0xc8(%rsi)
incl 0x4(%r15,%r9)
movq %rsi, 0x8(%r15,%r9)
movq %r8, %rsi
jmp 0xd085e0
incq %rdx
jmp 0xd085cf
callq 0x436840
movl %r14d, (%rbx)
movq %r15, 0x68(%rbx)
popq %rbx
popq %r14
popq %r15
retq
|
/llvm/Support/OnDiskHashTable.h
|
llvm::DenseMapBase<llvm::DenseMap<clang::api_notes::StoredObjCSelector, llvm::PointerEmbeddedInt<unsigned int, 31>, llvm::DenseMapInfo<clang::api_notes::StoredObjCSelector, void>, llvm::detail::DenseMapPair<clang::api_notes::StoredObjCSelector, llvm::PointerEmbeddedInt<unsigned int, 31>>>, clang::api_notes::StoredObjCSelector, llvm::PointerEmbeddedInt<unsigned int, 31>, llvm::DenseMapInfo<clang::api_notes::StoredObjCSelector, void>, llvm::detail::DenseMapPair<clang::api_notes::StoredObjCSelector, llvm::PointerEmbeddedInt<unsigned int, 31>>>::destroyAll()
|
unsigned getNumBuckets() const {
return NumBuckets;
}
|
movl 0x10(%rdi), %eax
testq %rax, %rax
je 0xd09087
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
leaq 0x38(%rsp), %rbx
orl $-0x1, -0x8(%rbx)
leaq 0x48(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movabsq $0x200000000, %rdx # imm = 0x200000000
movq %rdx, -0x8(%rcx)
leaq 0x10(%rsp), %r14
movl $0xfffffffe, -0x8(%r14) # imm = 0xFFFFFFFE
leaq 0x20(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rdx, -0x8(%rcx)
movq (%rdi), %r15
imulq $0x30, %rax, %rbp
leaq 0x30(%rsp), %r12
leaq 0x8(%rsp), %r13
testq %rbp, %rbp
je 0xd09069
movq %r15, %rdi
movq %r12, %rsi
callq 0xcf45c6
testb %al, %al
jne 0xd09056
movq %r15, %rdi
movq %r13, %rsi
callq 0xcf45c6
leaq 0x8(%r15), %rdi
callq 0xcf41be
addq $0x30, %r15
addq $-0x30, %rbp
jmp 0xd09037
movq %r14, %rdi
callq 0xcf41be
movq %rbx, %rdi
callq 0xcf41be
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/llvm/ADT/DenseMap.h
|
llvm::DenseMap<clang::api_notes::ContextTableKey, std::pair<unsigned int, llvm::SmallVector<std::pair<llvm::VersionTuple, clang::api_notes::ContextInfo>, 1u>>, llvm::DenseMapInfo<clang::api_notes::ContextTableKey, void>, llvm::detail::DenseMapPair<clang::api_notes::ContextTableKey, std::pair<unsigned int, llvm::SmallVector<std::pair<llvm::VersionTuple, clang::api_notes::ContextInfo>, 1u>>>>::grow(unsigned int)
|
void grow(unsigned AtLeast) {
unsigned OldNumBuckets = NumBuckets;
BucketT *OldBuckets = Buckets;
allocateBuckets(std::max<unsigned>(64, static_cast<unsigned>(NextPowerOf2(AtLeast-1))));
assert(Buckets);
if (!OldBuckets) {
this->BaseT::initEmpty();
return;
}
this->moveFromOldBuckets(OldBuckets, OldBuckets+OldNumBuckets);
// Free the old table.
deallocate_buffer(OldBuckets, sizeof(BucketT) * OldNumBuckets,
alignof(BucketT));
}
|
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
movl 0x10(%rdi), %r15d
movq (%rdi), %rbx
leal -0x1(%rsi), %edi
callq 0x45e847
cmpl $0x41, %eax
pushq $0x40
popq %rsi
cmovael %eax, %esi
movq %r14, %rdi
callq 0xd03464
testq %rbx, %rbx
je 0xd094ae
imulq $0xd8, %r15, %r15
leaq (%rbx,%r15), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xd094bc
pushq $0x8
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x464066
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xd0349a
nop
|
/llvm/ADT/DenseMap.h
|
llvm::DenseMapBase<llvm::DenseMap<clang::api_notes::SingleDeclTableKey, llvm::SmallVector<std::pair<llvm::VersionTuple, clang::api_notes::GlobalFunctionInfo>, 1u>, llvm::DenseMapInfo<clang::api_notes::SingleDeclTableKey, void>, llvm::detail::DenseMapPair<clang::api_notes::SingleDeclTableKey, llvm::SmallVector<std::pair<llvm::VersionTuple, clang::api_notes::GlobalFunctionInfo>, 1u>>>, clang::api_notes::SingleDeclTableKey, llvm::SmallVector<std::pair<llvm::VersionTuple, clang::api_notes::GlobalFunctionInfo>, 1u>, llvm::DenseMapInfo<clang::api_notes::SingleDeclTableKey, void>, llvm::detail::DenseMapPair<clang::api_notes::SingleDeclTableKey, llvm::SmallVector<std::pair<llvm::VersionTuple, clang::api_notes::GlobalFunctionInfo>, 1u>>>::moveFromOldBuckets(llvm::detail::DenseMapPair<clang::api_notes::SingleDeclTableKey, llvm::SmallVector<std::pair<llvm::VersionTuple, clang::api_notes::GlobalFunctionInfo>, 1u>>*, llvm::detail::DenseMapPair<clang::api_notes::SingleDeclTableKey, llvm::SmallVector<std::pair<llvm::VersionTuple, clang::api_notes::GlobalFunctionInfo>, 1u>>*)
|
void moveFromOldBuckets(BucketT *OldBucketsBegin, BucketT *OldBucketsEnd) {
initEmpty();
// Insert all the old elements.
const KeyT EmptyKey = getEmptyKey();
const KeyT TombstoneKey = getTombstoneKey();
for (BucketT *B = OldBucketsBegin, *E = OldBucketsEnd; B != E; ++B) {
if (!KeyInfoT::isEqual(B->getFirst(), EmptyKey) &&
!KeyInfoT::isEqual(B->getFirst(), TombstoneKey)) {
// Insert the key/value into the new table.
BucketT *DestBucket;
bool FoundVal = LookupBucketFor(B->getFirst(), DestBucket);
(void)FoundVal; // silence warning.
assert(!FoundVal && "Key already in new map?");
DestBucket->getFirst() = std::move(B->getFirst());
::new (&DestBucket->getSecond()) ValueT(std::move(B->getSecond()));
incrementNumEntries();
// Free the value.
B->getSecond().~ValueT();
}
B->getFirst().~KeyT();
}
}
|
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0xd038ea
leaq 0x8(%rsp), %r12
cmpq %rbx, %r14
je 0xd0a3b6
movl (%r14), %eax
movl 0x4(%r14), %ecx
movl %eax, %edx
andl %ecx, %edx
cmpl $-0x1, %edx
je 0xd0a3ad
xorl $-0x2, %eax
xorl $-0x2, %ecx
orl %eax, %ecx
je 0xd0a3ad
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0xd0a17c
movq 0x8(%rsp), %rax
movq (%r14), %rcx
movq %rcx, (%rax)
movq 0x8(%rsp), %rdi
addq $0x8, %rdi
leaq 0x8(%r14), %r13
movq %r13, %rsi
callq 0xcf601a
incl 0x8(%r15)
movq %r13, %rdi
callq 0xcc08fe
addq $0xb8, %r14
jmp 0xd0a354
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
|
/llvm/ADT/DenseMap.h
|
llvm::detail::DenseMapPair<clang::api_notes::SingleDeclTableKey, llvm::SmallVector<std::pair<llvm::VersionTuple, clang::api_notes::TagInfo>, 1u>>* llvm::DenseMapBase<llvm::DenseMap<clang::api_notes::SingleDeclTableKey, llvm::SmallVector<std::pair<llvm::VersionTuple, clang::api_notes::TagInfo>, 1u>, llvm::DenseMapInfo<clang::api_notes::SingleDeclTableKey, void>, llvm::detail::DenseMapPair<clang::api_notes::SingleDeclTableKey, llvm::SmallVector<std::pair<llvm::VersionTuple, clang::api_notes::TagInfo>, 1u>>>, clang::api_notes::SingleDeclTableKey, llvm::SmallVector<std::pair<llvm::VersionTuple, clang::api_notes::TagInfo>, 1u>, llvm::DenseMapInfo<clang::api_notes::SingleDeclTableKey, void>, llvm::detail::DenseMapPair<clang::api_notes::SingleDeclTableKey, llvm::SmallVector<std::pair<llvm::VersionTuple, clang::api_notes::TagInfo>, 1u>>>::InsertIntoBucket<clang::api_notes::SingleDeclTableKey const&>(llvm::detail::DenseMapPair<clang::api_notes::SingleDeclTableKey, llvm::SmallVector<std::pair<llvm::VersionTuple, clang::api_notes::TagInfo>, 1u>>*, clang::api_notes::SingleDeclTableKey const&)
|
BucketT *InsertIntoBucket(BucketT *TheBucket, KeyArg &&Key,
ValueArgs &&... Values) {
TheBucket = InsertIntoBucketImpl(Key, Key, TheBucket);
TheBucket->getFirst() = std::forward<KeyArg>(Key);
::new (&TheBucket->getSecond()) ValueT(std::forward<ValueArgs>(Values)...);
return TheBucket;
}
|
pushq %rbx
movq %rdx, %rbx
movq %rsi, %rcx
movq %rdx, %rsi
callq 0xd0a70e
movq (%rbx), %rcx
movq %rcx, (%rax)
leaq 0x18(%rax), %rcx
movq %rcx, 0x8(%rax)
movabsq $0x100000000, %rcx # imm = 0x100000000
movq %rcx, 0x10(%rax)
popq %rbx
retq
nop
|
/llvm/ADT/DenseMap.h
|
bool llvm::DenseMapBase<llvm::DenseMap<clang::api_notes::SingleDeclTableKey, llvm::SmallVector<std::pair<llvm::VersionTuple, clang::api_notes::TypedefInfo>, 1u>, llvm::DenseMapInfo<clang::api_notes::SingleDeclTableKey, void>, llvm::detail::DenseMapPair<clang::api_notes::SingleDeclTableKey, llvm::SmallVector<std::pair<llvm::VersionTuple, clang::api_notes::TypedefInfo>, 1u>>>, clang::api_notes::SingleDeclTableKey, llvm::SmallVector<std::pair<llvm::VersionTuple, clang::api_notes::TypedefInfo>, 1u>, llvm::DenseMapInfo<clang::api_notes::SingleDeclTableKey, void>, llvm::detail::DenseMapPair<clang::api_notes::SingleDeclTableKey, llvm::SmallVector<std::pair<llvm::VersionTuple, clang::api_notes::TypedefInfo>, 1u>>>::LookupBucketFor<clang::api_notes::SingleDeclTableKey>(clang::api_notes::SingleDeclTableKey const&, llvm::detail::DenseMapPair<clang::api_notes::SingleDeclTableKey, llvm::SmallVector<std::pair<llvm::VersionTuple, clang::api_notes::TypedefInfo>, 1u>> const*&) const
|
bool LookupBucketFor(const LookupKeyT &Val,
const BucketT *&FoundBucket) const {
const BucketT *BucketsPtr = getBuckets();
const unsigned NumBuckets = getNumBuckets();
if (NumBuckets == 0) {
FoundBucket = nullptr;
return false;
}
// FoundTombstone - Keep track of whether we find a tombstone while probing.
const BucketT *FoundTombstone = nullptr;
const KeyT EmptyKey = getEmptyKey();
const KeyT TombstoneKey = getTombstoneKey();
assert(!KeyInfoT::isEqual(Val, EmptyKey) &&
!KeyInfoT::isEqual(Val, TombstoneKey) &&
"Empty/Tombstone value shouldn't be inserted into map!");
unsigned BucketNo = getHashValue(Val) & (NumBuckets-1);
unsigned ProbeAmt = 1;
while (true) {
const BucketT *ThisBucket = BucketsPtr + BucketNo;
// Found Val's bucket? If so, return it.
if (LLVM_LIKELY(KeyInfoT::isEqual(Val, ThisBucket->getFirst()))) {
FoundBucket = ThisBucket;
return true;
}
// If we found an empty bucket, the key doesn't exist in the set.
// Insert it and return the default value.
if (LLVM_LIKELY(KeyInfoT::isEqual(ThisBucket->getFirst(), EmptyKey))) {
// If we've already seen a tombstone while probing, fill it in instead
// of the empty bucket we eventually probed to.
FoundBucket = FoundTombstone ? FoundTombstone : ThisBucket;
return false;
}
// If this is a tombstone, remember it. If Val ends up not in the map, we
// prefer to return it than something that would require more probing.
if (KeyInfoT::isEqual(ThisBucket->getFirst(), TombstoneKey) &&
!FoundTombstone)
FoundTombstone = ThisBucket; // Remember the first tombstone found.
// Otherwise, it's a hash collision or a tombstone, continue quadratic
// probing.
BucketNo += ProbeAmt++;
BucketNo &= (NumBuckets-1);
}
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl 0x10(%rdi), %ebp
testl %ebp, %ebp
je 0xd0a976
movq %rsi, %r14
movq (%rdi), %r15
movq %rsi, %rdi
callq 0xcf5a5c
decl %ebp
andl %ebp, %eax
movl (%r14), %esi
movl 0x4(%r14), %edi
pushq $0x1
popq %r8
xorl %edx, %edx
movl %eax, %ecx
imulq $0xc8, %rcx, %rcx
leaq (%r15,%rcx), %r9
movl (%r15,%rcx), %r10d
movl 0x4(%r15,%rcx), %r11d
cmpl %r10d, %esi
jne 0xd0a94a
movb $0x1, %cl
cmpl %r11d, %edi
je 0xd0a97b
cmpl $-0x1, %r10d
jne 0xd0a956
cmpl $-0x1, %r11d
je 0xd0a98b
xorl $-0x2, %r10d
xorl $-0x2, %r11d
testq %rdx, %rdx
cmovneq %rdx, %r9
orl %r10d, %r11d
cmoveq %r9, %rdx
addl %r8d, %eax
incl %r8d
andl %ebp, %eax
jmp 0xd0a928
xorl %r9d, %r9d
xorl %ecx, %ecx
movq %r9, (%rbx)
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
testq %rdx, %rdx
cmovneq %rdx, %r9
jmp 0xd0a979
|
/llvm/ADT/DenseMap.h
|
(anonymous namespace)::CFGBuilder::addLocalScopeForStmt(clang::Stmt*)
|
void CFGBuilder::addLocalScopeForStmt(Stmt *S) {
if (!BuildOpts.AddImplicitDtors && !BuildOpts.AddLifetime &&
!BuildOpts.AddScopes)
return;
LocalScope *Scope = nullptr;
// For compound statement we will be creating explicit scope.
if (CompoundStmt *CS = dyn_cast<CompoundStmt>(S)) {
for (auto *BI : CS->body()) {
Stmt *SI = BI->stripLabelLikeStatements();
if (DeclStmt *DS = dyn_cast<DeclStmt>(SI))
Scope = addLocalScopeForDeclStmt(DS, Scope);
}
return;
}
// For any other statement scope will be implicit and as such will be
// interesting only for DeclStmt.
if (DeclStmt *DS = dyn_cast<DeclStmt>(S->stripLabelLikeStatements()))
addLocalScopeForDeclStmt(DS);
}
|
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x148(%rdi), %rax
cmpb $0x0, 0x33(%rax)
jne 0xd24400
cmpb $0x0, 0x34(%rax)
jne 0xd24400
cmpb $0x1, 0x37(%rax)
jne 0xd24462
cmpb $-0x17, (%r14)
jne 0xd2443f
movl 0x4(%r14), %r12d
shlq $0x3, %r12
xorl %r13d, %r13d
xorl %r15d, %r15d
cmpq %r13, %r12
je 0xd24462
movq 0x10(%r14,%r13), %rdi
callq 0xf66b58
cmpb $-0x1b, (%rax)
jne 0xd24439
movq %rbx, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0xd24804
movq %rax, %r15
addq $0x8, %r13
jmp 0xd24414
movq %r14, %rdi
callq 0xf66b58
cmpb $-0x1b, (%rax)
jne 0xd24462
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xd24804
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
|
/Analysis/CFG.cpp
|
bool llvm::is_contained<llvm::SmallVector<clang::LabelDecl*, 8u>&, clang::LabelDecl*>(llvm::SmallVector<clang::LabelDecl*, 8u>&, clang::LabelDecl* const&)
|
bool is_contained(R &&Range, const E &Element) {
if constexpr (detail::HasMemberContains<R, E>)
return Range.contains(Element);
else if constexpr (detail::HasMemberFind<R, E>)
return Range.find(Element) != Range.end();
else
return std::find(adl_begin(Range), adl_end(Range), Element) !=
adl_end(Range);
}
|
pushq %rbx
movq %rsi, %rdx
movq %rdi, %rbx
movq (%rdi), %rdi
movl 0x8(%rbx), %eax
leaq (%rdi,%rax,8), %rsi
callq 0xd25403
movl 0x8(%rbx), %ecx
shlq $0x3, %rcx
addq (%rbx), %rcx
cmpq %rcx, %rax
setne %al
popq %rbx
retq
|
/llvm/ADT/STLExtras.h
|
clang::RecursiveASTVisitor<isInCoroutineStmt(clang::Stmt const*, clang::CFGBlock const*)::Checker>::TraverseConceptReference(clang::ConceptReference*)
|
bool RecursiveASTVisitor<Derived>::TraverseConceptReference(
ConceptReference *CR) {
if (!getDerived().shouldTraversePostOrder())
TRY_TO(VisitConceptReference(CR));
TRY_TO(TraverseNestedNameSpecifierLoc(CR->getNestedNameSpecifierLoc()));
TRY_TO(TraverseDeclarationNameInfo(CR->getConceptNameInfo()));
if (CR->hasExplicitTemplateArgs())
TRY_TO(TraverseTemplateArgumentLocsHelper(
CR->getTemplateArgsAsWritten()->getTemplateArgs(),
CR->getTemplateArgsAsWritten()->NumTemplateArgs));
if (getDerived().shouldTraversePostOrder())
TRY_TO(VisitConceptReference(CR));
return true;
}
|
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rsi
movq 0x8(%r14), %rdx
callq 0xd37d5a
testb %al, %al
je 0xd37d4f
movq 0x28(%r14), %rax
movq %rax, 0x10(%rsp)
movups 0x18(%r14), %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
callq 0xd37dca
testb %al, %al
je 0xd37d4f
movq 0x40(%r14), %rsi
testq %rsi, %rsi
je 0xd37d4b
movl 0x8(%rsi), %edx
addq $0x10, %rsi
movq %rbx, %rdi
callq 0xd37e62
testb %al, %al
je 0xd37d4f
movb $0x1, %al
jmp 0xd37d51
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
nop
|
/clang/AST/RecursiveASTVisitor.h
|
llvm::DenseMap<clang::ValueDecl const*, bool, llvm::DenseMapInfo<clang::ValueDecl const*, void>, llvm::detail::DenseMapPair<clang::ValueDecl const*, bool>>::allocateBuckets(unsigned int)
|
bool allocateBuckets(unsigned Num) {
NumBuckets = Num;
if (NumBuckets == 0) {
Buckets = nullptr;
return false;
}
Buckets = static_cast<BucketT *>(
allocate_buffer(sizeof(BucketT) * NumBuckets, alignof(BucketT)));
return true;
}
|
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl %esi, 0x10(%rdi)
testl %esi, %esi
je 0xd3ef77
movl %ebp, %edi
shlq $0x4, %rdi
pushq $0x8
popq %rsi
callq 0x464061
jmp 0xd3ef79
xorl %eax, %eax
testl %ebp, %ebp
setne %cl
movq %rax, (%rbx)
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
/llvm/ADT/DenseMap.h
|
llvm::DenseMap<clang::ValueDecl const*, unsigned int, llvm::DenseMapInfo<clang::ValueDecl const*, void>, llvm::detail::DenseMapPair<clang::ValueDecl const*, unsigned int>>::init(unsigned int)
|
void init(unsigned InitNumEntries) {
auto InitBuckets = BaseT::getMinBucketToReserveForEntries(InitNumEntries);
if (allocateBuckets(InitBuckets)) {
this->BaseT::initEmpty();
} else {
NumEntries = 0;
NumTombstones = 0;
}
}
|
pushq %rbx
movq %rdi, %rbx
callq 0xd3f134
movq %rbx, %rdi
movl %eax, %esi
callq 0xd3f156
testb %al, %al
je 0xd3f12c
movq %rbx, %rdi
popq %rbx
jmp 0xd3f188
andq $0x0, 0x8(%rbx)
popq %rbx
retq
nop
|
/llvm/ADT/DenseMap.h
|
void (anonymous namespace)::ThreadSafetyAnalyzer::getMutexIDs<clang::AcquireCapabilityAttr const>((anonymous namespace)::CapExprSet&, clang::AcquireCapabilityAttr const*, clang::Expr const*, clang::NamedDecl const*, clang::threadSafety::til::SExpr*)
|
void ThreadSafetyAnalyzer::getMutexIDs(CapExprSet &Mtxs, AttrType *Attr,
const Expr *Exp, const NamedDecl *D,
til::SExpr *Self) {
if (Attr->args_size() == 0) {
// The mutex held is the "this" object.
CapabilityExpr Cp = SxBuilder.translateAttrExpr(nullptr, D, Exp, Self);
if (Cp.isInvalid()) {
warnInvalidLock(Handler, nullptr, D, Exp, Cp.getKind());
return;
}
//else
if (!Cp.shouldIgnore())
Mtxs.push_back_nodup(Cp);
return;
}
for (const auto *Arg : Attr->args()) {
CapabilityExpr Cp = SxBuilder.translateAttrExpr(Arg, D, Exp, Self);
if (Cp.isInvalid()) {
warnInvalidLock(Handler, nullptr, D, Exp, Cp.getKind());
continue;
}
//else
if (!Cp.shouldIgnore())
Mtxs.push_back_nodup(Cp);
}
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r14
movq %rsi, 0x8(%rsp)
movq %rdi, %r12
movl 0x24(%rdx), %r15d
testq %r15, %r15
je 0xd3fdb8
movq 0x28(%rdx), %rax
movq %rax, 0x18(%rsp)
movq %r12, 0x10(%rsp)
leaq 0x68(%r12), %rbp
shlq $0x3, %r15
xorl %r12d, %r12d
cmpq %r12, %r15
je 0xd3fe01
movq 0x18(%rsp), %rax
movq (%rax,%r12), %rdx
leaq 0x20(%rsp), %rdi
movq %rbp, %rsi
movq %r8, %rbx
movq %r8, %rcx
movq %r14, %r13
movq %r14, %r8
movq %r9, %r14
callq 0xd48524
movq 0x20(%rsp), %rax
andq $-0x8, %rax
je 0xd3fda9
cmpb $0x1, (%rax)
jne 0xd3fd9a
movq 0x10(%rsp), %rax
movq 0x140(%rax), %rdi
movq %r13, %rsi
callq 0xd42bc8
jmp 0xd3fda9
movq 0x8(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0xd42bee
addq $0x8, %r12
movq %r14, %r9
movq %rbx, %r8
movq %r13, %r14
jmp 0xd3fd46
leaq 0x68(%r12), %rsi
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
xorl %edx, %edx
movq %r8, %rcx
movq %r14, %r8
callq 0xd48524
movq (%rbx), %rax
andq $-0x8, %rax
je 0xd3fe01
cmpb $0x1, (%rax)
jne 0xd3fdf2
movq 0x140(%r12), %rdi
movq %r14, %rsi
callq 0xd42bc8
jmp 0xd3fe01
leaq 0x20(%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0xd42bee
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/Analysis/ThreadSafety.cpp
|
llvm::DenseMapBase<llvm::SmallDenseMap<clang::Expr const*, clang::threadSafety::til::LiteralPtr*, 4u, llvm::DenseMapInfo<clang::Expr const*, void>, llvm::detail::DenseMapPair<clang::Expr const*, clang::threadSafety::til::LiteralPtr*>>, clang::Expr const*, clang::threadSafety::til::LiteralPtr*, llvm::DenseMapInfo<clang::Expr const*, void>, llvm::detail::DenseMapPair<clang::Expr const*, clang::threadSafety::til::LiteralPtr*>>::find(clang::Expr const*)
|
iterator find(const_arg_type_t<KeyT> Val) {
BucketT *TheBucket;
if (LookupBucketFor(Val, TheBucket))
return makeIterator(TheBucket,
shouldReverseIterate<KeyT>() ? getBuckets()
: getBucketsEnd(),
*this, true);
return end();
}
|
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %rax
movq %rsi, (%rax)
leaq 0x8(%rsp), %rdx
movq %rax, %rsi
callq 0xd4793e
testb %al, %al
je 0xd413a7
movq 0x8(%rsp), %r14
movq %rbx, %rdi
callq 0xd3f9da
movq %rax, %rdx
jmp 0xd413b2
movq %rbx, %rdi
callq 0xd413be
movq %rax, %r14
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
nop
|
/llvm/ADT/DenseMap.h
|
clang::threadSafety::til::PrettyPrinter<clang::threadSafety::til::StdPrinter, std::ostream>::printBasicBlock(clang::threadSafety::til::BasicBlock const*, std::ostream&)
|
void printBasicBlock(const BasicBlock *E, StreamType &SS) {
SS << "BB_" << E->blockID() << ":";
if (E->parent())
SS << " BB_" << E->parent()->blockID();
newline(SS);
for (const auto *A : E->arguments())
printBBInstr(A, SS);
for (const auto *I : E->instructions())
printBBInstr(I, SS);
const SExpr *T = E->terminator();
if (T) {
self()->printSExpr(T, SS, Prec_MAX, false);
SS << ";";
newline(SS);
}
newline(SS);
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq 0x51845f(%rip), %rsi # 0x125c868
movq %rdx, %rdi
callq 0x436b50
movl $0x7fffffff, %ebp # imm = 0x7FFFFFFF
movl 0x20(%r15), %esi
andl %ebp, %esi
movq %rax, %rdi
callq 0x436930
leaq 0x771198(%rip), %rsi # 0x14b55c3
movq %rax, %rdi
callq 0x436b50
cmpq $0x0, 0x80(%r15)
je 0xd44460
leaq 0x518423(%rip), %rsi # 0x125c867
movq %rbx, %rdi
callq 0x436b50
movq 0x80(%r15), %rcx
andl 0x20(%rcx), %ebp
movq %rax, %rdi
movl %ebp, %esi
callq 0x436930
leaq 0x4684d1(%rip), %rsi # 0x11ac938
movq %rbx, %rdi
callq 0x436b50
movq 0x40(%r15), %r12
movq 0x48(%r15), %r13
shlq $0x3, %r13
xorl %ebp, %ebp
cmpq %rbp, %r13
je 0xd44497
movq (%r12,%rbp), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0xd44900
addq $0x8, %rbp
jmp 0xd4447d
movq 0x58(%r15), %r12
movq 0x60(%r15), %r13
shlq $0x3, %r13
xorl %ebp, %ebp
cmpq %rbp, %r13
je 0xd444bf
movq (%r12,%rbp), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0xd44900
addq $0x8, %rbp
jmp 0xd444a5
movq 0x70(%r15), %rsi
testq %rsi, %rsi
je 0xd444f7
pushq $0x6
popq %rcx
movq %r14, %rdi
movq %rbx, %rdx
xorl %r8d, %r8d
callq 0xd4364c
leaq 0x456a46(%rip), %rsi # 0x119af26
movq %rbx, %rdi
callq 0x436b50
leaq 0x468449(%rip), %rsi # 0x11ac938
movq %rbx, %rdi
callq 0x436b50
leaq 0x46843a(%rip), %rsi # 0x11ac938
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x436b50
|
/clang/Analysis/Analyses/ThreadSafetyTraverse.h
|
llvm::DenseMap<clang::ValueDecl const*, bool, llvm::DenseMapInfo<clang::ValueDecl const*, void>, llvm::detail::DenseMapPair<clang::ValueDecl const*, bool>>::grow(unsigned int)
|
void grow(unsigned AtLeast) {
unsigned OldNumBuckets = NumBuckets;
BucketT *OldBuckets = Buckets;
allocateBuckets(std::max<unsigned>(64, static_cast<unsigned>(NextPowerOf2(AtLeast-1))));
assert(Buckets);
if (!OldBuckets) {
this->BaseT::initEmpty();
return;
}
this->moveFromOldBuckets(OldBuckets, OldBuckets+OldNumBuckets);
// Free the old table.
deallocate_buffer(OldBuckets, sizeof(BucketT) * OldNumBuckets,
alignof(BucketT));
}
|
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r15
movl 0x10(%rdi), %ebx
movq (%rdi), %r14
leal -0x1(%rsi), %edi
callq 0x45e847
cmpl $0x41, %eax
pushq $0x40
popq %rsi
cmovael %eax, %esi
movq %r15, %rdi
callq 0xd3ef58
testq %r14, %r14
je 0xd45dea
shlq $0x4, %rbx
leaq (%r14,%rbx), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0xd45df8
pushq $0x8
popq %rdx
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x464066
movq %r15, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xd3ef8a
nop
|
/llvm/ADT/DenseMap.h
|
(anonymous namespace)::ThreadSafetyAnalyzer::warnIfMutexNotHeld((anonymous namespace)::FactSet const&, clang::NamedDecl const*, clang::Expr const*, clang::threadSafety::AccessKind, clang::Expr*, clang::threadSafety::ProtectedOperationKind, clang::threadSafety::til::LiteralPtr*, clang::SourceLocation)
|
void ThreadSafetyAnalyzer::warnIfMutexNotHeld(
const FactSet &FSet, const NamedDecl *D, const Expr *Exp, AccessKind AK,
Expr *MutexExp, ProtectedOperationKind POK, til::LiteralPtr *Self,
SourceLocation Loc) {
LockKind LK = getLockKindFromAccessKind(AK);
CapabilityExpr Cp = SxBuilder.translateAttrExpr(MutexExp, D, Exp, Self);
if (Cp.isInvalid()) {
warnInvalidLock(Handler, MutexExp, D, Exp, Cp.getKind());
return;
} else if (Cp.shouldIgnore()) {
return;
}
if (Cp.negative()) {
// Negative capabilities act like locks excluded
const FactEntry *LDat = FSet.findLock(FactMan, !Cp);
if (LDat) {
Handler.handleFunExcludesLock(Cp.getKind(), D->getNameAsString(),
(!Cp).toString(), Loc);
return;
}
// If this does not refer to a negative capability in the same class,
// then stop here.
if (!inCurrentScope(Cp))
return;
// Otherwise the negative requirement must be propagated to the caller.
LDat = FSet.findLock(FactMan, Cp);
if (!LDat) {
Handler.handleNegativeNotHeld(D, Cp.toString(), Loc);
}
return;
}
const FactEntry *LDat = FSet.findLockUniv(FactMan, Cp);
bool NoError = true;
if (!LDat) {
// No exact match found. Look for a partial match.
LDat = FSet.findPartialMatch(FactMan, Cp);
if (LDat) {
// Warn that there's no precise match.
std::string PartMatchStr = LDat->toString();
StringRef PartMatchName(PartMatchStr);
Handler.handleMutexNotHeld(Cp.getKind(), D, POK, Cp.toString(), LK, Loc,
&PartMatchName);
} else {
// Warn that there's no match at all.
Handler.handleMutexNotHeld(Cp.getKind(), D, POK, Cp.toString(), LK, Loc);
}
NoError = false;
}
// Make sure the mutex we found is the right kind.
if (NoError && LDat && !LDat->isAtLeast(LK)) {
Handler.handleMutexNotHeld(Cp.getKind(), D, POK, Cp.toString(), LK, Loc);
}
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp # imm = 0x108
movq %r9, %rax
movl %r8d, %r14d
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq 0x148(%rsp), %r9
movq %rdi, 0x30(%rsp)
leaq 0x68(%rdi), %rsi
leaq 0x50(%rsp), %rbp
movq %rbp, %rdi
movq %rax, %rdx
movq %r15, %rcx
movq %rbx, %r8
callq 0xd48524
movq (%rbp), %rcx
movq %rcx, %rax
andq $-0x8, %rax
je 0xd471a4
cmpb $0x1, (%rax)
jne 0xd46c10
movq 0x30(%rsp), %rax
movq 0x140(%rax), %rdi
movq %rbx, %rsi
callq 0xd42bc8
jmp 0xd471a4
movq 0x30(%rsp), %rdx
leaq 0x220(%rdx), %r13
testb $0x4, %cl
jne 0xd46cd2
movl %r14d, 0x2c(%rsp)
movq %r15, 0x38(%rsp)
movq (%r12), %rbx
movq %r12, 0x40(%rsp)
movq 0x8(%r12), %r15
leaq (%rbx,%r15,2), %rax
movq %rax, 0x88(%rsp)
leaq 0x68(%rsp), %r14
movq %r13, 0x48(%rsp)
movq %r13, (%r14)
movq %rbp, 0x8(%r14)
movq %r15, %r13
sarq $0x2, %r13
addq %r15, %r15
testq %r13, %r13
jle 0xd46e16
movq %r14, %rdi
movq %rbx, %rsi
callq 0xd47450
testb %al, %al
jne 0xd46e6c
leaq 0x2(%rbx), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0xd47450
testb %al, %al
jne 0xd46e6f
leaq 0x4(%rbx), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0xd47450
testb %al, %al
jne 0xd46e6f
leaq 0x6(%rbx), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0xd47450
testb %al, %al
jne 0xd46e6f
addq $0x8, %rbx
decq %r13
addq $-0x8, %r15
jmp 0xd46c64
movups 0x58(%rsp), %xmm0
leaq 0x68(%rsp), %rdx
movq %rax, (%rdx)
movups %xmm0, 0x8(%rdx)
movq %r12, %rdi
movq %r13, %rsi
callq 0xd44a92
testq %rax, %rax
je 0xd46da5
movq 0x30(%rsp), %rax
movq 0x140(%rax), %r14
movq 0x58(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x60(%rsp), %r12
addq $0x28, %r15
leaq 0x68(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0xe18b96
movq (%rbx), %r13
movq 0x8(%rbx), %rbp
movq 0x50(%rsp), %rax
movups 0x58(%rsp), %xmm0
andq $-0x4, %rax
xorq $0x4, %rax
leaq 0xd0(%rsp), %rsi
movq %rax, (%rsi)
movups %xmm0, 0x8(%rsi)
leaq 0xe8(%rsp), %r15
movq %r15, %rdi
callq 0xd43580
movups (%r15), %xmm0
movups %xmm0, 0xc0(%rsp)
movq (%r14), %rax
movups 0xc0(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %r14, %rdi
movq 0x30(%rsp), %rsi
movq %r12, %rdx
movq %r13, %rcx
movq %rbp, %r8
movl 0x150(%rsp), %r9d
callq *0x60(%rax)
movq %r15, %rdi
callq 0x436d30
movq %rbx, %rdi
jmp 0xd4719f
leaq 0x50(%rsp), %rsi
movq 0x30(%rsp), %rdi
callq 0xd44bc2
testb %al, %al
je 0xd471a4
leaq 0x50(%rsp), %rdx
movq %r12, %rdi
movq %r13, %rsi
callq 0xd44a92
testq %rax, %rax
jne 0xd471a4
movq 0x30(%rsp), %rax
movq 0x140(%rax), %rbx
leaq 0x68(%rsp), %r14
leaq 0x50(%rsp), %rsi
movq %r14, %rdi
callq 0xd43580
movq (%r14), %rdx
movq 0x8(%r14), %rcx
movq (%rbx), %rax
movq %rbx, %rdi
movq %r15, %rsi
movl 0x150(%rsp), %r8d
callq *0x58(%rax)
movq %r14, %rdi
jmp 0xd4719f
sarq %r15
cmpq $0x1, %r15
je 0xd46ff8
cmpq $0x2, %r15
movl 0x2c(%rsp), %r14d
movq 0x40(%rsp), %r13
je 0xd46e52
cmpq $0x3, %r15
jne 0xd47020
leaq 0x68(%rsp), %rdi
movq %rbx, %rsi
callq 0xd47450
testb %al, %al
jne 0xd46e67
addq $0x2, %rbx
leaq 0x68(%rsp), %rdi
movq %rbx, %rsi
callq 0xd47450
testb %al, %al
je 0xd47004
movq %rbx, %r12
jmp 0xd46e79
movq %rbx, %r12
movl 0x2c(%rsp), %r14d
movq 0x40(%rsp), %r13
movq (%r13), %rbx
movq 0x8(%r13), %r13
leaq (%rbx,%r13,2), %rdx
cmpq %rdx, %r12
je 0xd46f36
movzwl (%r12), %eax
movq 0x48(%rsp), %rcx
movq (%rcx), %rcx
movq (%rcx,%rax,8), %rax
testq %rax, %rax
je 0xd46f36
testl %r14d, %r14d
movq 0x38(%rsp), %r13
je 0xd471a4
movzbl 0x20(%rax), %eax
cmpw $0x1, %ax
je 0xd471a4
movq 0x30(%rsp), %rax
movq 0x140(%rax), %rbx
leaq 0x50(%rsp), %rsi
movl %r14d, %ebp
movq 0x8(%rsi), %r14
movq 0x10(%rsi), %r15
leaq 0x68(%rsp), %r12
movq %r12, %rdi
callq 0xd43580
movups (%r12), %xmm0
movups %xmm0, 0x90(%rsp)
movq (%rbx), %rax
movups 0x90(%rsp), %xmm0
movups %xmm0, (%rsp)
andq $0x0, 0x18(%rsp)
movl 0x150(%rsp), %ecx
movl %ecx, 0x10(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r13, %rcx
movl 0x140(%rsp), %r8d
movl %ebp, %r9d
jmp 0xd47199
movq %rdx, %r12
leaq 0x68(%rsp), %r14
movq 0x48(%rsp), %rax
movq %rax, (%r14)
movq %rbp, 0x8(%r14)
movq %r13, %r15
sarq $0x2, %r15
addq %r13, %r13
testq %r15, %r15
jle 0xd46fbe
movq %r14, %rdi
movq %rbx, %rsi
callq 0xd47484
testb %al, %al
jne 0xd46ff3
leaq 0x2(%rbx), %rbp
movq %r14, %rdi
movq %rbp, %rsi
callq 0xd47484
testb %al, %al
jne 0xd47059
leaq 0x4(%rbx), %rbp
movq %r14, %rdi
movq %rbp, %rsi
callq 0xd47484
testb %al, %al
jne 0xd47059
leaq 0x6(%rbx), %rbp
movq %r14, %rdi
movq %rbp, %rsi
callq 0xd47484
testb %al, %al
jne 0xd47059
addq $0x8, %rbx
decq %r15
addq $-0x8, %r13
jmp 0xd46f54
sarq %r13
cmpq $0x1, %r13
je 0xd4704c
cmpq $0x2, %r13
je 0xd4702d
cmpq $0x3, %r13
jne 0xd47056
leaq 0x68(%rsp), %rdi
movq %rbx, %rsi
callq 0xd47484
testb %al, %al
movq 0x38(%rsp), %r13
jne 0xd47047
addq $0x2, %rbx
jmp 0xd47032
movq %rbx, %rbp
jmp 0xd47059
movl 0x2c(%rsp), %r14d
movq 0x40(%rsp), %r13
jmp 0xd47008
addq $0x2, %rbx
leaq 0x68(%rsp), %rdi
movq %rbx, %rsi
callq 0xd47450
movq %rbx, %r12
testb %al, %al
jne 0xd46e79
movq 0x88(%rsp), %r12
jmp 0xd46e79
movq 0x38(%rsp), %r13
leaq 0x68(%rsp), %rdi
movq %rbx, %rsi
callq 0xd47484
testb %al, %al
je 0xd471b6
movq %rbx, %rbp
jmp 0xd4705e
movq 0x38(%rsp), %r13
jmp 0xd471ba
movq %r12, %rbp
movq 0x38(%rsp), %r13
movq 0x40(%rsp), %rcx
movq 0x8(%rcx), %rax
addq %rax, %rax
addq (%rcx), %rax
cmpq %rax, %rbp
je 0xd4712d
movzwl (%rbp), %eax
movq 0x48(%rsp), %rcx
movq (%rcx), %rcx
movq (%rcx,%rax,8), %rsi
testq %rsi, %rsi
je 0xd4712d
addq $0x8, %rsi
leaq 0x68(%rsp), %rbx
movq %rbx, %rdi
callq 0xd43580
movups (%rbx), %xmm0
leaq 0xd0(%rsp), %rbp
movups %xmm0, (%rbp)
movq 0x30(%rsp), %rax
movq 0x140(%rax), %r14
leaq 0x50(%rsp), %rsi
movq 0x8(%rsi), %r15
movq 0x10(%rsi), %r12
leaq 0xe8(%rsp), %rbx
movq %rbx, %rdi
callq 0xd43580
movups (%rbx), %xmm0
movups %xmm0, 0xb0(%rsp)
movq (%r14), %rax
movups 0xb0(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %rbp, 0x18(%rsp)
movl 0x150(%rsp), %ecx
movl %ecx, 0x10(%rsp)
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r13, %rcx
movl 0x140(%rsp), %r8d
movl 0x2c(%rsp), %r9d
callq *0x48(%rax)
movq %rbx, %rdi
callq 0x436d30
leaq 0x68(%rsp), %rdi
jmp 0xd4719f
movq 0x30(%rsp), %rax
movq 0x140(%rax), %rbx
leaq 0x50(%rsp), %rsi
movq 0x8(%rsi), %r14
movq 0x10(%rsi), %r15
leaq 0x68(%rsp), %r12
movq %r12, %rdi
callq 0xd43580
movups (%r12), %xmm0
movups %xmm0, 0xa0(%rsp)
movq (%rbx), %rax
movups 0xa0(%rsp), %xmm0
movups %xmm0, (%rsp)
andq $0x0, 0x18(%rsp)
movl 0x150(%rsp), %ecx
movl %ecx, 0x10(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r13, %rcx
movl 0x140(%rsp), %r8d
movl 0x2c(%rsp), %r9d
callq *0x48(%rax)
movq %r12, %rdi
callq 0x436d30
addq $0x108, %rsp # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq $0x2, %rbx
leaq 0x68(%rsp), %rdi
movq %rbx, %rsi
callq 0xd47484
movq %rbx, %rbp
testb %al, %al
jne 0xd4705e
movq %r12, %rbp
jmp 0xd4705e
|
/Analysis/ThreadSafety.cpp
|
clang::RecursiveASTVisitor<clang::ast_matchers::MatchDescendantVisitor>::TraverseTemplateInstantiations(clang::VarTemplateDecl*)
|
bool RecursiveASTVisitor<Derived>::TraverseTemplateInstantiations(
VarTemplateDecl *D) {
for (auto *SD : D->specializations()) {
for (auto *RD : SD->redecls()) {
switch (
cast<VarTemplateSpecializationDecl>(RD)->getSpecializationKind()) {
case TSK_Undeclared:
case TSK_ImplicitInstantiation:
TRY_TO(TraverseDecl(RD));
break;
case TSK_ExplicitInstantiationDeclaration:
case TSK_ExplicitInstantiationDefinition:
case TSK_ExplicitSpecialization:
break;
}
}
}
return true;
}
|
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x78e802
movq %rax, %r15
movq %rdx, %r14
movq %rsp, %r12
leaq 0x8(%rsp), %r13
movq %r15, (%rsp)
cmpq %r14, %r15
je 0xd65ce8
movq %r12, %rdi
callq 0x78e828
movq %rax, %rsi
movq %rax, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movb $0x0, 0x18(%rsp)
testq %rsi, %rsi
je 0xd65cde
testb $0x6, 0x8c(%rsi)
jne 0xd65ccf
movq %rbx, %rdi
callq 0xd5fe8c
testb %al, %al
je 0xd65ce8
movq %r13, %rdi
callq 0x850dae
movq 0x8(%rsp), %rsi
jmp 0xd65cb5
movq (%rsp), %r15
addq $0x8, %r15
jmp 0xd65c92
cmpq %r14, %r15
sete %al
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
|
/clang/AST/RecursiveASTVisitor.h
|
clang::RecursiveASTVisitor<clang::ast_matchers::MatchDescendantVisitor>::TraverseTemplateInstantiations(clang::ClassTemplateDecl*)
|
bool RecursiveASTVisitor<Derived>::TraverseTemplateInstantiations(
ClassTemplateDecl *D) {
for (auto *SD : D->specializations()) {
for (auto *RD : SD->redecls()) {
assert(!cast<CXXRecordDecl>(RD)->isInjectedClassName());
switch (
cast<ClassTemplateSpecializationDecl>(RD)->getSpecializationKind()) {
// Visit the implicit instantiations with the requested pattern.
case TSK_Undeclared:
case TSK_ImplicitInstantiation:
TRY_TO(TraverseDecl(RD));
break;
// We don't need to do anything on an explicit instantiation
// or explicit specialization because there will be an explicit
// node for it elsewhere.
case TSK_ExplicitInstantiationDeclaration:
case TSK_ExplicitInstantiationDefinition:
case TSK_ExplicitSpecialization:
break;
}
}
}
return true;
}
|
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq %rsi, %rdi
callq 0xa86268
movq %rax, %r15
movq %rdx, %r14
movq %rsp, %r12
leaq 0x8(%rsp), %r13
movq %r15, (%rsp)
cmpq %r14, %r15
je 0xd65e1e
movq %r12, %rdi
callq 0xaf6a92
movq %rax, %rsi
movq %rax, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movb $0x0, 0x18(%rsp)
testq %rsi, %rsi
je 0xd65e14
testb $0x6, 0xb4(%rsi)
jne 0xd65e05
movq %rbx, %rdi
callq 0xd5fe8c
testb %al, %al
je 0xd65e1e
movq %r13, %rdi
callq 0x79fef2
movq 0x8(%rsp), %rsi
jmp 0xd65deb
movq (%rsp), %r15
addq $0x8, %r15
jmp 0xd65dc8
cmpq %r14, %r15
sete %al
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
|
/clang/AST/RecursiveASTVisitor.h
|
clang::ast_matchers::internal::BindableMatcher<clang::Stmt> clang::ast_matchers::internal::makeDynCastAllOfComposite<clang::Stmt, clang::ArrayInitIndexExpr>(llvm::ArrayRef<clang::ast_matchers::internal::Matcher<clang::ArrayInitIndexExpr> const*>)
|
BindableMatcher<T>
makeDynCastAllOfComposite(ArrayRef<const Matcher<InnerT> *> InnerMatchers) {
return BindableMatcher<T>(
makeAllOfComposite(InnerMatchers).template dynCastTo<T>());
}
|
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rdi
callq 0xd6af16
leaq 0x18(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xd69b44
movl 0x8(%r15), %eax
movl %eax, 0x8(%rbx)
movq (%r15), %rax
movq %rax, (%rbx)
leaq 0x28(%rsp), %rdi
movq (%rdi), %rax
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0xd6aefa
lock
incl 0x8(%rax)
callq 0xd66136
leaq 0x10(%rsp), %rdi
callq 0xd66136
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
|
/clang/ASTMatchers/ASTMatchersInternal.h
|
clang::ast_matchers::internal::VariadicOperatorMatcher<clang::ast_matchers::internal::VariadicOperatorMatcher<clang::ast_matchers::internal::PolymorphicMatcher<clang::ast_matchers::internal::matcher_hasOperatorName0Matcher, void (clang::ast_matchers::internal::TypeList<clang::BinaryOperator, clang::CXXOperatorCallExpr, clang::CXXRewrittenBinaryOperator, clang::CXXFoldExpr, clang::UnaryOperator>), std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, clang::ast_matchers::internal::PolymorphicMatcher<clang::ast_matchers::internal::matcher_hasOperatorName0Matcher, void (clang::ast_matchers::internal::TypeList<clang::BinaryOperator, clang::CXXOperatorCallExpr, clang::CXXRewrittenBinaryOperator, clang::CXXFoldExpr, clang::UnaryOperator>), std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, clang::ast_matchers::internal::PolymorphicMatcher<clang::ast_matchers::internal::matcher_hasOperatorName0Matcher, void (clang::ast_matchers::internal::TypeList<clang::BinaryOperator, clang::CXXOperatorCallExpr, clang::CXXRewrittenBinaryOperator, clang::CXXFoldExpr, clang::UnaryOperator>), std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, clang::ast_matchers::internal::PolymorphicMatcher<clang::ast_matchers::internal::matcher_hasOperatorName0Matcher, void (clang::ast_matchers::internal::TypeList<clang::BinaryOperator, clang::CXXOperatorCallExpr, clang::CXXRewrittenBinaryOperator, clang::CXXFoldExpr, clang::UnaryOperator>), std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, clang::ast_matchers::internal::PolymorphicMatcher<clang::ast_matchers::internal::matcher_hasLHS0Matcher, void (clang::ast_matchers::internal::TypeList<clang::BinaryOperator, clang::CXXOperatorCallExpr, clang::CXXRewrittenBinaryOperator, clang::ArraySubscriptExpr, clang::CXXFoldExpr>), clang::ast_matchers::internal::Matcher<clang::Expr>>, clang::ast_matchers::internal::PolymorphicMatcher<clang::ast_matchers::internal::matcher_hasRHS0Matcher, void (clang::ast_matchers::internal::TypeList<clang::BinaryOperator, clang::CXXOperatorCallExpr, clang::CXXRewrittenBinaryOperator, clang::ArraySubscriptExpr, clang::CXXFoldExpr>), clang::ast_matchers::internal::Matcher<clang::Expr>>>::operator clang::ast_matchers::internal::Matcher<clang::BinaryOperator><clang::BinaryOperator>() const &
|
operator Matcher<T>() const & {
return DynTypedMatcher::constructVariadic(
Op, ASTNodeKind::getFromNodeKind<T>(),
getMatchers<T>(std::index_sequence_for<Ps...>()))
.template unconditionalConvertTo<T>();
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movl (%rsi), %ebp
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0xd6c0ce
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movl %ebp, %esi
movl $0x12b, %edx # imm = 0x12B
movq %r14, %rcx
callq 0xd8b4cc
movq %rbx, %rdi
movq %r15, %rsi
callq 0xd6bf2c
leaq 0x18(%rsp), %rdi
callq 0xd66136
movq %r14, %rdi
callq 0xd69a30
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
/clang/ASTMatchers/ASTMatchersInternal.h
|
clang::ast_matchers::internal::BindableMatcher<clang::Stmt> clang::ast_matchers::internal::makeDynCastAllOfComposite<clang::Stmt, clang::CallExpr>(llvm::ArrayRef<clang::ast_matchers::internal::Matcher<clang::CallExpr> const*>)
|
BindableMatcher<T>
makeDynCastAllOfComposite(ArrayRef<const Matcher<InnerT> *> InnerMatchers) {
return BindableMatcher<T>(
makeAllOfComposite(InnerMatchers).template dynCastTo<T>());
}
|
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rdi
callq 0xd6cb0d
leaq 0x18(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xd69b44
movl 0x8(%r15), %eax
movl %eax, 0x8(%rbx)
movq (%r15), %rax
movq %rax, (%rbx)
leaq 0x28(%rsp), %rdi
movq (%rdi), %rax
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0xd6cad0
lock
incl 0x8(%rax)
callq 0xd66136
leaq 0x10(%rsp), %rdi
callq 0xd66136
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
|
/clang/ASTMatchers/ASTMatchersInternal.h
|
clang::ast_matchers::internal::BindableMatcher<clang::Stmt> clang::ast_matchers::internal::makeDynCastAllOfComposite<clang::Stmt, clang::CXXConstructExpr>(llvm::ArrayRef<clang::ast_matchers::internal::Matcher<clang::CXXConstructExpr> const*>)
|
BindableMatcher<T>
makeDynCastAllOfComposite(ArrayRef<const Matcher<InnerT> *> InnerMatchers) {
return BindableMatcher<T>(
makeAllOfComposite(InnerMatchers).template dynCastTo<T>());
}
|
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rdi
callq 0xd6d346
leaq 0x18(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xd69b44
movl 0x8(%r15), %eax
movl %eax, 0x8(%rbx)
movq (%r15), %rax
movq %rax, (%rbx)
leaq 0x28(%rsp), %rdi
movq (%rdi), %rax
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0xd6d2a8
lock
incl 0x8(%rax)
callq 0xd66136
leaq 0x10(%rsp), %rdi
callq 0xd66136
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
|
/clang/ASTMatchers/ASTMatchersInternal.h
|
clang::ast_matchers::internal::BindableMatcher<clang::DeclStmt> clang::ast_matchers::internal::makeAllOfComposite<clang::DeclStmt>(llvm::ArrayRef<clang::ast_matchers::internal::Matcher<clang::DeclStmt> const*>)
|
BindableMatcher<T>
makeAllOfComposite(ArrayRef<const Matcher<T> *> InnerMatchers) {
// For the size() == 0 case, we return a "true" matcher.
if (InnerMatchers.empty()) {
return BindableMatcher<T>(TrueMatcher());
}
// For the size() == 1 case, we simply return that one matcher.
// No need to wrap it in a variadic operation.
if (InnerMatchers.size() == 1) {
return BindableMatcher<T>(*InnerMatchers[0]);
}
using PI = llvm::pointee_iterator<const Matcher<T> *const *>;
std::vector<DynTypedMatcher> DynMatchers(PI(InnerMatchers.begin()),
PI(InnerMatchers.end()));
return BindableMatcher<T>(
DynTypedMatcher::constructVariadic(DynTypedMatcher::VO_AllOf,
ASTNodeKind::getFromNodeKind<T>(),
std::move(DynMatchers))
.template unconditionalConvertTo<T>());
}
|
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rdi, %rbx
cmpq $0x1, %rdx
je 0xd73f6c
testq %rdx, %rdx
jne 0xd73f95
movq %rsp, %r14
leaq 0x18(%rsp), %rsi
movq %r14, %rdi
callq 0xd74044
movl 0x8(%r14), %eax
movl %eax, 0x8(%rbx)
movq (%r14), %rax
movq %rax, (%rbx)
leaq 0x10(%rsp), %rdi
movq (%rdi), %rax
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0xd73f62
lock
incl 0x8(%rax)
callq 0xd66136
jmp 0xd74037
movq (%rsi), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rbx)
movq (%rax), %rcx
movq %rcx, (%rbx)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0xd74037
lock
incl 0x8(%rax)
jmp 0xd74037
leaq (%rsi,%rdx,8), %rdx
xorps %xmm0, %xmm0
movq %rsp, %r14
movaps %xmm0, (%r14)
andq $0x0, 0x10(%r14)
movq %r14, %rdi
callq 0xd7407e
movaps (%r14), %xmm0
leaq 0x30(%rsp), %rcx
movaps %xmm0, (%rcx)
movq 0x10(%r14), %rax
movq %rax, 0x10(%rcx)
xorps %xmm0, %xmm0
movaps %xmm0, (%r14)
andq $0x0, 0x10(%r14)
leaq 0x48(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
movl $0x1a3, %edx # imm = 0x1A3
callq 0xd8b4cc
leaq 0x18(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xd74110
movl 0x8(%r15), %eax
movl %eax, 0x8(%rbx)
movq (%r15), %rax
movq %rax, (%rbx)
leaq 0x28(%rsp), %rdi
movq (%rdi), %rax
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0xd74016
lock
incl 0x8(%rax)
callq 0xd66136
leaq 0x58(%rsp), %rdi
callq 0xd66136
leaq 0x30(%rsp), %rdi
callq 0xd69a30
movq %rsp, %rdi
callq 0xd69a30
movq %rbx, %rax
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
|
/clang/ASTMatchers/ASTMatchersInternal.h
|
clang::ASTContext::DeepCollectObjCIvars(clang::ObjCInterfaceDecl const*, bool, llvm::SmallVectorImpl<clang::ObjCIvarDecl const*>&) const
|
void ASTContext::DeepCollectObjCIvars(const ObjCInterfaceDecl *OI,
bool leafClass,
SmallVectorImpl<const ObjCIvarDecl*> &Ivars) const {
if (const ObjCInterfaceDecl *SuperClass = OI->getSuperClass())
DeepCollectObjCIvars(SuperClass, false, Ivars);
if (!leafClass) {
llvm::append_range(Ivars, OI->ivars());
} else {
auto *IDecl = const_cast<ObjCInterfaceDecl *>(OI);
for (const ObjCIvarDecl *Iv = IDecl->all_declared_ivar_begin(); Iv;
Iv= Iv->getNextIvar())
Ivars.push_back(Iv);
}
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %rdi
callq 0xe27d6a
testq %rax, %rax
je 0xd9acbc
movq %r15, %rdi
movq %rax, %rsi
xorl %edx, %edx
movq %rbx, %rcx
callq 0xd9ac8a
movq %r14, %rdi
testb %bpl, %bpl
je 0xd9ace2
callq 0xe2a550
movq %rax, %r14
testq %r14, %r14
je 0xd9acfb
movq %rbx, %rdi
movq %r14, %rsi
callq 0xd9ad20
movq 0x50(%r14), %r14
jmp 0xd9accc
callq 0x8f2f50
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movq %rdx, 0x8(%rsi)
movq %rbx, %rdi
callq 0xd9ad06
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
/AST/ASTContext.cpp
|
clang::ASTContext::createMangleContext(clang::TargetInfo const*)
|
MangleContext *ASTContext::createMangleContext(const TargetInfo *T) {
if (!T)
T = Target;
switch (T->getCXXABI().getKind()) {
case TargetCXXABI::AppleARM64:
case TargetCXXABI::Fuchsia:
case TargetCXXABI::GenericAArch64:
case TargetCXXABI::GenericItanium:
case TargetCXXABI::GenericARM:
case TargetCXXABI::GenericMIPS:
case TargetCXXABI::iOS:
case TargetCXXABI::WebAssembly:
case TargetCXXABI::WatchOS:
case TargetCXXABI::XL:
return ItaniumMangleContext::create(*this, getDiagnostics());
case TargetCXXABI::Microsoft:
return MicrosoftMangleContext::create(*this, getDiagnostics());
}
llvm_unreachable("Unsupported ABI");
}
|
testq %rsi, %rsi
jne 0xd9bcb6
movq 0x4348(%rdi), %rsi
cmpl $0x9, 0x154(%rsi)
movq 0x828(%rdi), %rax
movq 0x8(%rax), %rsi
ja 0xd9bcd1
xorl %edx, %edx
jmp 0xf1ba2a
xorl %edx, %edx
jmp 0xf377d8
|
/AST/ASTContext.cpp
|
clang::ASTContext::getSubstTemplateTemplateParm(clang::TemplateName, clang::Decl*, unsigned int, std::optional<unsigned int>) const
|
TemplateName ASTContext::getSubstTemplateTemplateParm(
TemplateName Replacement, Decl *AssociatedDecl, unsigned Index,
std::optional<unsigned> PackIndex) const {
llvm::FoldingSetNodeID ID;
SubstTemplateTemplateParmStorage::Profile(ID, Replacement, AssociatedDecl,
Index, PackIndex);
void *insertPos = nullptr;
SubstTemplateTemplateParmStorage *subst
= SubstTemplateTemplateParms.FindNodeOrInsertPos(ID, insertPos);
if (!subst) {
subst = new (*this) SubstTemplateTemplateParmStorage(
Replacement, AssociatedDecl, Index, PackIndex);
SubstTemplateTemplateParms.InsertNode(subst, insertPos);
}
return TemplateName(subst);
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r13
leaq 0x28(%rsp), %rax
movq %rax, -0x10(%rax)
movabsq $0x2000000000, %rcx # imm = 0x2000000000
movq %rcx, -0x8(%rax)
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
movl %ebp, %ecx
movq %r8, (%rsp)
callq 0xf8dd38
leaq 0x8(%rsp), %rdx
andq $0x0, (%rdx)
leaq 0x398(%r13), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0xdb3692
movq %rax, %rbx
testq %rax, %rax
jne 0xdb3663
addq $0x850, %r13 # imm = 0x850
pushq $0x20
popq %rsi
pushq $0x3
popq %rdx
movq %r13, %rdi
callq 0x467060
movq %rax, %rbx
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %ebp, %ecx
movq (%rsp), %r8
callq 0xdb36ac
movq 0x8(%rsp), %rdx
movq %r12, %rdi
movq %rbx, %rsi
callq 0xdb36e0
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0xf8ded0
leaq 0x18(%rsp), %rdi
callq 0x468820
movq (%r14), %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/AST/ASTContext.cpp
|
clang::ASTContext::mayExternalize(clang::Decl const*) const
|
bool ASTContext::mayExternalize(const Decl *D) const {
bool IsInternalVar =
isa<VarDecl>(D) &&
basicGVALinkageForVariable(*this, cast<VarDecl>(D)) == GVA_Internal;
bool IsExplicitDeviceVar = (D->hasAttr<CUDADeviceAttr>() &&
!D->getAttr<CUDADeviceAttr>()->isImplicit()) ||
(D->hasAttr<CUDAConstantAttr>() &&
!D->getAttr<CUDAConstantAttr>()->isImplicit());
// CUDA/HIP: managed variables need to be externalized since it is
// a declaration in IR, therefore cannot have internal linkage. Kernels in
// anonymous name space needs to be externalized to avoid duplicate symbols.
return (IsInternalVar &&
(D->hasAttr<HIPManagedAttr>() || IsExplicitDeviceVar)) ||
(D->hasAttr<CUDAGlobalAttr>() &&
basicGVALinkageForFunction(*this, cast<FunctionDecl>(D)) ==
GVA_Internal);
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0x1c(%rsi), %eax
andl $0x7f, %eax
addl $-0x25, %eax
cmpl $0x6, %eax
ja 0xdbb52a
movq %r14, %rdi
movq %rbx, %rsi
callq 0xdb7c74
testl %eax, %eax
sete %bpl
jmp 0xdbb52c
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x7cd57a
testb %al, %al
je 0xdbb549
movq %rbx, %rdi
callq 0x77e41c
movb $0x1, %r15b
testb $0x4, 0x22(%rax)
je 0xdbb56a
movq %rbx, %rdi
callq 0x7cd592
testb %al, %al
je 0xdbb567
movq %rbx, %rdi
callq 0x77e79e
testb $0x4, 0x22(%rax)
sete %r15b
jmp 0xdbb56a
xorl %r15d, %r15d
testb %bpl, %bpl
je 0xdbb57e
movq %rbx, %rdi
callq 0x7cd5aa
orb %al, %r15b
movb $0x1, %al
jne 0xdbb59e
movq %rbx, %rdi
callq 0x7cd562
testb %al, %al
je 0xdbb59c
movq %r14, %rdi
movq %rbx, %rsi
callq 0xdb7b4f
testl %eax, %eax
sete %al
jmp 0xdbb59e
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
|
/AST/ASTContext.cpp
|
llvm::DenseMap<clang::CXXRecordDecl const*, std::unique_ptr<llvm::SmallVector<std::unique_ptr<clang::VPtrInfo, std::default_delete<clang::VPtrInfo>>, 2u>, std::default_delete<llvm::SmallVector<std::unique_ptr<clang::VPtrInfo, std::default_delete<clang::VPtrInfo>>, 2u>>>, llvm::DenseMapInfo<clang::CXXRecordDecl const*, void>, llvm::detail::DenseMapPair<clang::CXXRecordDecl const*, std::unique_ptr<llvm::SmallVector<std::unique_ptr<clang::VPtrInfo, std::default_delete<clang::VPtrInfo>>, 2u>, std::default_delete<llvm::SmallVector<std::unique_ptr<clang::VPtrInfo, std::default_delete<clang::VPtrInfo>>, 2u>>>>>::allocateBuckets(unsigned int)
|
bool allocateBuckets(unsigned Num) {
NumBuckets = Num;
if (NumBuckets == 0) {
Buckets = nullptr;
return false;
}
Buckets = static_cast<BucketT *>(
allocate_buffer(sizeof(BucketT) * NumBuckets, alignof(BucketT)));
return true;
}
|
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl %esi, 0x10(%rdi)
testl %esi, %esi
je 0xdbd291
movl %ebp, %edi
shlq $0x4, %rdi
pushq $0x8
popq %rsi
callq 0x464061
jmp 0xdbd293
xorl %eax, %eax
testl %ebp, %ebp
setne %cl
movq %rax, (%rbx)
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
/llvm/ADT/DenseMap.h
|
bool llvm::DenseMapBase<llvm::DenseMap<clang::QualType, unsigned int, llvm::DenseMapInfo<clang::QualType, void>, llvm::detail::DenseMapPair<clang::QualType, unsigned int>>, clang::QualType, unsigned int, llvm::DenseMapInfo<clang::QualType, void>, llvm::detail::DenseMapPair<clang::QualType, unsigned int>>::LookupBucketFor<clang::QualType>(clang::QualType const&, llvm::detail::DenseMapPair<clang::QualType, unsigned int> const*&) const
|
unsigned getNumBuckets() const {
return NumBuckets;
}
|
movl 0x10(%rdi), %ecx
testl %ecx, %ecx
je 0xdbd60c
pushq %rbx
movq (%rdi), %rdi
movq (%rsi), %rsi
movq %rsi, %r8
shrq $0x9, %r8
xorl %esi, %r8d
decl %ecx
andl %ecx, %r8d
movl $0x1, %r10d
xorl %r9d, %r9d
movl %r8d, %eax
shlq $0x4, %rax
leaq (%rdi,%rax), %r11
movq (%rdi,%rax), %rbx
movb $0x1, %al
cmpq %rbx, %rsi
je 0xdbd61c
testq %rbx, %rbx
je 0xdbd613
notq %rbx
orq %r9, %rbx
cmoveq %r11, %r9
addl %r10d, %r8d
incl %r10d
andl %ecx, %r8d
jmp 0xdbd5dc
xorl %r11d, %r11d
xorl %eax, %eax
jmp 0xdbd61d
testq %r9, %r9
cmovneq %r9, %r11
xorl %eax, %eax
popq %rbx
movq %r11, (%rdx)
retq
nop
|
/llvm/ADT/DenseMap.h
|
llvm::DenseMap<clang::VarDecl const*, clang::BlockVarCopyInit, llvm::DenseMapInfo<clang::VarDecl const*, void>, llvm::detail::DenseMapPair<clang::VarDecl const*, clang::BlockVarCopyInit>>::grow(unsigned int)
|
void grow(unsigned AtLeast) {
unsigned OldNumBuckets = NumBuckets;
BucketT *OldBuckets = Buckets;
allocateBuckets(std::max<unsigned>(64, static_cast<unsigned>(NextPowerOf2(AtLeast-1))));
assert(Buckets);
if (!OldBuckets) {
this->BaseT::initEmpty();
return;
}
this->moveFromOldBuckets(OldBuckets, OldBuckets+OldNumBuckets);
// Free the old table.
deallocate_buffer(OldBuckets, sizeof(BucketT) * OldNumBuckets,
alignof(BucketT));
}
|
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r15
movl 0x10(%rdi), %ebx
movq (%rdi), %r14
leal -0x1(%rsi), %edi
callq 0x45e847
cmpl $0x41, %eax
pushq $0x40
popq %rsi
cmovael %eax, %esi
movq %r15, %rdi
callq 0xdbe5f8
testq %r14, %r14
je 0xdc17da
shlq $0x4, %rbx
leaq (%r14,%rbx), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0xdc17e8
pushq $0x8
popq %rdx
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x464066
movq %r15, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xdbe62a
nop
|
/llvm/ADT/DenseMap.h
|
clang::DeclContext::getLookupParent()
|
DeclContext *DeclContext::getLookupParent() {
// FIXME: Find a better way to identify friends.
if (isa<FunctionDecl>(this))
if (getParent()->getRedeclContext()->isFileContext() &&
getLexicalParent()->getRedeclContext()->isRecord())
return getLexicalParent();
// A lookup within the call operator of a lambda never looks in the lambda
// class; instead, skip to the context in which that closure type is
// declared.
if (isLambdaCallOperator(this))
return getParent()->getParent();
return getParent();
}
|
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movzwl 0x8(%rdi), %eax
andl $0x7f, %eax
addl $-0x1f, %eax
cmpl $0x5, %eax
ja 0xe1dc79
movq %rbx, %rdi
callq 0x4d2fb8
movq %rax, %rdi
callq 0xe1dca6
movzwl 0x8(%rax), %eax
andl $0x7f, %eax
cmpl $0x15, %eax
je 0xe1dc4b
testl %eax, %eax
jne 0xe1dc79
movq %rbx, %rdi
callq 0x6a5446
movq %rax, %rdi
callq 0xe1dca6
movzwl 0x8(%rax), %eax
andl $0x7f, %eax
addl $-0x37, %eax
cmpw $0x3, %ax
ja 0xe1dc79
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x6a5446
movq %rbx, %rdi
callq 0x62e1a6
movl %eax, %ebp
movq %rbx, %rdi
callq 0x4d2fb8
testb %bpl, %bpl
je 0xe1dc9e
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x4d2fb8
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
|
/AST/DeclBase.cpp
|
clang::DeclContext::getPrimaryContext()
|
DeclContext *DeclContext::getPrimaryContext() {
switch (getDeclKind()) {
case Decl::ExternCContext:
case Decl::LinkageSpec:
case Decl::Export:
case Decl::TopLevelStmt:
case Decl::Block:
case Decl::Captured:
case Decl::OMPDeclareReduction:
case Decl::OMPDeclareMapper:
case Decl::RequiresExprBody:
// There is only one DeclContext for these entities.
return this;
case Decl::HLSLBuffer:
// Each buffer, even with the same name, is a distinct construct.
// Multiple buffers with the same name are allowed for backward
// compatibility.
// As long as buffers have unique resource bindings the names don't matter.
// The names get exposed via the CPU-side reflection API which
// supports querying bindings, so we cannot remove them.
return this;
case Decl::TranslationUnit:
return static_cast<TranslationUnitDecl *>(this)->getFirstDecl();
case Decl::Namespace:
return static_cast<NamespaceDecl *>(this)->getFirstDecl();
case Decl::ObjCMethod:
return this;
case Decl::ObjCInterface:
if (auto *OID = dyn_cast<ObjCInterfaceDecl>(this))
if (auto *Def = OID->getDefinition())
return Def;
return this;
case Decl::ObjCProtocol:
if (auto *OPD = dyn_cast<ObjCProtocolDecl>(this))
if (auto *Def = OPD->getDefinition())
return Def;
return this;
case Decl::ObjCCategory:
return this;
case Decl::ObjCImplementation:
case Decl::ObjCCategoryImpl:
return this;
default:
if (getDeclKind() >= Decl::firstTag && getDeclKind() <= Decl::lastTag) {
// If this is a tag type that has a definition or is currently
// being defined, that definition is our primary context.
auto *Tag = cast<TagDecl>(this);
if (TagDecl *Def = Tag->getDefinition())
return Def;
if (const auto *TagTy = dyn_cast<TagType>(Tag->getTypeForDecl())) {
// Note, TagType::getDecl returns the (partial) definition one exists.
TagDecl *PossiblePartialDef = TagTy->getDecl();
if (PossiblePartialDef->isBeingDefined())
return PossiblePartialDef;
} else {
assert(isa<InjectedClassNameType>(Tag->getTypeForDecl()));
}
return Tag;
}
assert(getDeclKind() >= Decl::firstFunction &&
getDeclKind() <= Decl::lastFunction &&
"Unknown DeclContext kind");
return this;
}
}
|
pushq %rbx
movq %rdi, %rbx
movzwl 0x8(%rdi), %eax
andl $0x7f, %eax
cmpl $0x18, %eax
ja 0xe1dedb
leaq 0x453257(%rip), %rcx # 0x12710e8
movslq (%rcx,%rax,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
movq %rbx, %rax
popq %rbx
retq
movq 0x28(%rbx), %rax
leaq 0x28(%rax), %rbx
jmp 0xe1debc
leaq -0x30(%rbx), %rdi
callq 0x67d42a
jmp 0xe1dece
movq 0x28(%rbx), %rax
leaq 0x30(%rax), %rbx
testq %rax, %rax
cmoveq %rax, %rbx
jmp 0xe1de9a
leaq -0x30(%rbx), %rdi
callq 0x67b87e
leaq 0x30(%rax), %rcx
testq %rax, %rax
cmovneq %rcx, %rbx
jmp 0xe1de9a
movzwl %ax, %eax
addl $-0x37, %eax
cmpw $0x4, %ax
ja 0xe1de9a
leaq -0x40(%rbx), %rdi
callq 0xe15200
testq %rax, %rax
je 0xe1defe
addq $0x40, %rax
movq %rax, %rbx
jmp 0xe1de9a
movq -0x10(%rbx), %rdi
testq %rdi, %rdi
je 0xe1de9a
movb 0x10(%rdi), %al
addb $-0x2f, %al
cmpb $-0x2, %al
jb 0xe1de9a
callq 0xfa5a44
leaq 0x40(%rax), %rcx
testb $0x2, 0x4a(%rax)
jmp 0xe1ded5
nop
|
/AST/DeclBase.cpp
|
(anonymous namespace)::EvalInfo::CheckArraySize(clang::SourceLocation, unsigned int, unsigned long, bool)
|
bool CheckArraySize(SourceLocation Loc, unsigned BitWidth,
uint64_t ElemCount, bool Diag) {
// FIXME: GH63562
// APValue stores array extents as unsigned,
// so anything that is greater that unsigned would overflow when
// constructing the array, we catch this here.
if (BitWidth > ConstantArrayType::getMaxSizeBits(Ctx) ||
ElemCount > uint64_t(std::numeric_limits<unsigned>::max())) {
if (Diag)
FFDiag(Loc, diag::note_constexpr_new_too_large) << ElemCount;
return false;
}
// FIXME: GH63562
// Arrays allocate an APValue per element.
// We use the number of constexpr steps as a proxy for the maximum size
// of arrays to avoid exhausting the system resources, as initialization
// of each element is likely to take some number of steps anyway.
uint64_t Limit = Ctx.getLangOpts().ConstexprStepLimit;
if (ElemCount > Limit) {
if (Diag)
FFDiag(Loc, diag::note_constexpr_new_exceeds_limits)
<< ElemCount << Limit;
return false;
}
return true;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %r8d, %r15d
movq %rcx, %rbx
movl %edx, %r12d
movl %esi, %ebp
movq %rdi, %r14
movq %rcx, 0x10(%rsp)
movq 0x10(%rdi), %rdi
callq 0xfa22e0
cmpl %r12d, %eax
setae %al
movq %rbx, %rcx
shrq $0x20, %rcx
sete %cl
testb %cl, %al
jne 0xe60bd5
xorl %ebx, %ebx
testb %r15b, %r15b
je 0xe60c2f
movq %r14, %rdi
movl %ebp, %esi
movl $0x8c8, %edx # imm = 0x8C8
xorl %ecx, %ecx
callq 0xf1a640
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x10(%rsp), %rsi
jmp 0xe60c2a
movq 0x10(%r14), %rax
movq 0x830(%rax), %rax
movq 0x80(%rax), %rax
shrq $0x20, %rax
movq %rax, 0x8(%rsp)
cmpq %rbx, %rax
setae %bl
xorb $0x1, %r15b
orb %bl, %r15b
jne 0xe60c2f
movq %r14, %rdi
movl %ebp, %esi
movl $0x8c3, %edx # imm = 0x8C3
xorl %ecx, %ecx
callq 0xf1a640
leaq 0x18(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x10(%rsp), %rsi
callq 0xe60c3e
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0xe60c3e
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
/AST/ExprConstant.cpp
|
llvm::APSInt::operator^(llvm::APSInt const&) const
|
APSInt operator^(const APSInt &RHS) const {
assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
return APSInt(static_cast<const APInt &>(*this) ^ RHS, IsUnsigned);
}
|
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rsp, %r12
movq %r12, %rdi
callq 0x48b344
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x4956a8
movb 0xc(%r14), %al
movl 0x8(%r13), %ecx
movl %ecx, 0x8(%r15)
movq (%r13), %rcx
movq %rcx, (%r15)
andl $0x0, 0x8(%r13)
movb %al, 0xc(%r15)
movq %r13, %rdi
callq 0x468360
movq %r12, %rdi
callq 0x468360
movq %r15, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
|
/llvm/ADT/APSInt.h
|
llvm::APSInt::operator%(llvm::APSInt const&) const
|
APSInt operator%(const APSInt &RHS) const {
assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
return IsUnsigned ? APSInt(urem(RHS), true) : APSInt(srem(RHS), false);
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
cmpb $0x0, 0xc(%rsi)
je 0xe70797
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x494134
movb $0x1, %bpl
jmp 0xe707a4
movq %rsp, %r14
movq %r14, %rdi
callq 0x4942ce
xorl %ebp, %ebp
movl 0x8(%r14), %r15d
movq (%r14), %r12
andl $0x0, 0x8(%r14)
movq %r14, %rdi
callq 0x468360
movl %r15d, 0x8(%rbx)
movq %r12, (%rbx)
movb %bpl, 0xc(%rbx)
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
|
/llvm/ADT/APSInt.h
|
bool clang::interp::InitGlobal<(clang::interp::PrimType)7, clang::interp::Integral<64u, false>>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
|
bool InitGlobal(InterpState &S, CodePtr OpPC, uint32_t I) {
const Pointer &P = S.P.getGlobal(I);
P.deref<T>() = S.Stk.pop<T>();
P.initialize();
return true;
}
|
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movq 0xa8(%rdi), %rax
movl %edx, %ecx
movq 0xe0(%rax), %rax
movq (%rax,%rcx,8), %rsi
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0xf149f4
movq 0xb0(%rbx), %rdi
callq 0xed70d0
movq %rax, %rbx
movq %r14, %rdi
callq 0xe9b57e
movq %rbx, (%rax)
movq %r14, %rdi
callq 0xf153fe
movq %r14, %rdi
callq 0xf14aa0
movb $0x1, %al
addq $0x38, %rsp
popq %rbx
popq %r14
retq
|
/AST/Interp/Interp.h
|
bool clang::interp::InitGlobalTemp<(clang::interp::PrimType)1, clang::interp::Integral<8u, false>>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::LifetimeExtendedTemporaryDecl const*)
|
bool InitGlobalTemp(InterpState &S, CodePtr OpPC, uint32_t I,
const LifetimeExtendedTemporaryDecl *Temp) {
const Pointer &Ptr = S.P.getGlobal(I);
const T Value = S.Stk.peek<T>();
APValue APV = Value.toAPValue(S.getCtx());
APValue *Cached = Temp->getOrCreateValue(true);
*Cached = APV;
assert(Ptr.getDeclDesc()->asExpr());
S.SeenGlobalTemporaries.push_back(
std::make_pair(Ptr.getDeclDesc()->asExpr(), Temp));
Ptr.deref<T>() = S.Stk.pop<T>();
Ptr.initialize();
return true;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rcx, %r15
movq %rdi, %r14
movq 0xa8(%rdi), %rax
movl %edx, %ecx
movq 0xe0(%rax), %rax
movq (%rax,%rcx,8), %rsi
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0xf149f4
movq 0xb0(%r14), %rdi
callq 0xed686e
movb (%rax), %al
leaq 0xf(%rsp), %r13
movb %al, (%r13)
movq 0x18(%r14), %rdi
movq (%rdi), %rax
callq *0x60(%rax)
leaq 0x40(%rsp), %r12
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0xe9b368
pushq $0x1
popq %rsi
movq %r15, %rdi
callq 0xe25460
movq %rax, %rdi
movq %r12, %rsi
callq 0xd8de08
movq 0x18(%rbx), %rax
addq $0x20, %rax
cmpl $0x1, 0x28(%rbx)
leaq 0x28(%rsp), %rcx
cmovneq %rax, %rcx
leaq 0xd8(%r14), %rdi
movq (%rcx), %rax
movq (%rax), %rax
movq %rax, %rsi
shlq $0x3e, %rsi
sarq $0x3f, %rsi
andq %rax, %rsi
andq $-0x4, %rsi
movq %r15, %rdx
callq 0xed5cce
movq 0xb0(%r14), %rdi
callq 0xed682e
movl %eax, %ebp
movq %rbx, %rdi
callq 0xe9b33e
movb %bpl, (%rax)
movq %rbx, %rdi
callq 0xf153fe
movq %r12, %rdi
callq 0x6dce06
movq %rbx, %rdi
callq 0xf14aa0
movb $0x1, %al
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/AST/Interp/Interp.h
|
bool clang::interp::LoadPop<(clang::interp::PrimType)11, clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr)
|
bool LoadPop(InterpState &S, CodePtr OpPC) {
const Pointer &Ptr = S.Stk.pop<Pointer>();
if (!CheckLoad(S, OpPC, Ptr))
return false;
if (!Ptr.isBlockPointer())
return false;
S.Stk.push<T>(Ptr.deref<T>());
return true;
}
|
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0xb0(%rdi), %rsi
movq %rsp, %r15
movq %r15, %rdi
callq 0xe9af06
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0xf08415
cmpl $0x0, 0x28(%r15)
sete %bl
andb %al, %bl
cmpb $0x1, %bl
jne 0xec0b3e
movq 0xb0(%r14), %r14
movq %rsp, %rdi
callq 0xe9b6a2
movq %r14, %rdi
movq %rax, %rsi
callq 0xed4486
movq %rsp, %rdi
callq 0xf14aa0
movl %ebx, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
|
/AST/Interp/Interp.h
|
bool clang::interp::SetField<(clang::interp::PrimType)4, clang::interp::Integral<32u, true>>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
|
bool SetField(InterpState &S, CodePtr OpPC, uint32_t I) {
const T &Value = S.Stk.pop<T>();
const Pointer &Obj = S.Stk.peek<Pointer>();
if (!CheckNull(S, OpPC, Obj, CSK_Field))
return false;
if (!CheckRange(S, OpPC, Obj, CSK_Field))
return false;
const Pointer &Field = Obj.atField(I);
if (!CheckStore(S, OpPC, Field))
return false;
Field.initialize();
Field.deref<T>() = Value;
return true;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
movq 0xb0(%rdi), %rdi
callq 0xed6b6e
movl %eax, %ebx
movq 0xb0(%r15), %rdi
callq 0xed5494
movq %rax, %r12
pushq $0x2
popq %rcx
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0xf07baa
testb %al, %al
je 0xec69b8
pushq $0x2
popq %rcx
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0xf07cc6
testb %al, %al
je 0xec69b8
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
movl %ebp, %edx
callq 0xed5604
movq %r15, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0xf087fc
movl %eax, %ebp
testb %al, %al
je 0xec69ac
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0xf153fe
movq %r14, %rdi
callq 0xe9b45e
movl %ebx, (%rax)
leaq 0x8(%rsp), %rdi
callq 0xf14aa0
jmp 0xec69ba
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/AST/Interp/Interp.h
|
bool clang::interp::StoreBitFieldPop<(clang::interp::PrimType)6, clang::interp::Integral<64u, true>>(clang::interp::InterpState&, clang::interp::CodePtr)
|
bool StoreBitFieldPop(InterpState &S, CodePtr OpPC) {
const T &Value = S.Stk.pop<T>();
const Pointer &Ptr = S.Stk.pop<Pointer>();
if (!CheckStore(S, OpPC, Ptr))
return false;
if (Ptr.canBeInitialized())
Ptr.initialize();
if (const auto *FD = Ptr.getField())
Ptr.deref<T>() = Value.truncate(FD->getBitWidthValue(S.getCtx()));
else
Ptr.deref<T>() = Value;
return true;
}
|
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movq %rdi, %r15
movq 0xb0(%rdi), %rdi
callq 0xed6e48
movq %rax, %r14
movq %rax, (%rsp)
movq 0xb0(%r15), %rsi
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0xe9af06
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0xf087fc
movl %eax, %ebx
testb %al, %al
je 0xed0ddb
cmpl $0x0, 0x30(%rsp)
jne 0xed0d9a
cmpq $0x0, 0x20(%rsp)
je 0xed0d9a
cmpl $0x0, 0x28(%rsp)
je 0xed0d9a
leaq 0x8(%rsp), %rdi
callq 0xf153fe
leaq 0x8(%rsp), %rdi
callq 0xefcc2a
testq %rax, %rax
je 0xed0dce
movq %rax, %r12
movq 0x18(%r15), %rdi
movq (%rdi), %rax
callq *0x60(%rax)
movq %r12, %rdi
movq %rax, %rsi
callq 0xe14d3c
movq %rsp, %rdi
movl %eax, %esi
callq 0xee1a58
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0xe9b51e
movq %r14, (%rax)
leaq 0x8(%rsp), %rdi
callq 0xf14aa0
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
/AST/Interp/Interp.h
|
clang::interp::IntegralAP<true>::bitOr(clang::interp::IntegralAP<true>, clang::interp::IntegralAP<true>, unsigned int, clang::interp::IntegralAP<true>*)
|
static bool bitOr(IntegralAP A, IntegralAP B, unsigned OpBits,
IntegralAP *R) {
*R = IntegralAP(A.V | B.V);
return false;
}
|
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r14
movq %rsi, %r15
movq %rdi, %rsi
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x48b344
leaq 0x18(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x4957b1
leaq 0x28(%rsp), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x48b344
movq %r14, %rdi
movq %r15, %rsi
callq 0x468326
movq %r15, %rdi
callq 0x468360
movq %r12, %rdi
callq 0x468360
movq %rbx, %rdi
callq 0x468360
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
|
/AST/Interp/IntegralAP.h
|
unsigned short clang::interp::IntegralAP<true>::truncateCast<unsigned short, true>(llvm::APInt const&)
|
static T truncateCast(const APInt &V) {
constexpr unsigned BitSize = sizeof(T) * 8;
if (BitSize >= V.getBitWidth()) {
APInt Extended;
if constexpr (InputSigned)
Extended = V.sext(BitSize);
else
Extended = V.zext(BitSize);
return std::is_signed_v<T> ? Extended.getSExtValue()
: Extended.getZExtValue();
}
return std::is_signed_v<T> ? V.trunc(BitSize).getSExtValue()
: V.trunc(BitSize).getZExtValue();
}
|
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rsi
cmpl $0x10, 0x8(%rdi)
ja 0xedb10f
leaq 0x8(%rsp), %rbx
movl $0x1, 0x8(%rbx)
andq $0x0, (%rbx)
leaq 0x18(%rsp), %r14
pushq $0x10
popq %rdx
movq %r14, %rdi
callq 0x493274
movq %rbx, %rdi
movq %r14, %rsi
callq 0x468326
movq %r14, %rdi
callq 0x468360
jmp 0xedb11f
leaq 0x8(%rsp), %rbx
pushq $0x10
popq %rdx
movq %rbx, %rdi
callq 0x49318a
cmpl $0x41, 0x8(%rbx)
movq %rbx, %rax
jb 0xedb12d
movq 0x8(%rsp), %rax
movq (%rax), %r14
movq %rbx, %rdi
callq 0x468360
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
nop
|
/AST/Interp/IntegralAP.h
|
bool clang::interp::IncDecHelper<clang::interp::Integral<8u, true>, (clang::interp::IncDecOp)1, (clang::interp::PushVal)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
|
bool IncDecHelper(InterpState &S, CodePtr OpPC, const Pointer &Ptr) {
assert(!Ptr.isDummy());
if constexpr (std::is_same_v<T, Boolean>) {
if (!S.getLangOpts().CPlusPlus14)
return Invalid(S, OpPC);
}
const T &Value = Ptr.deref<T>();
T Result;
if constexpr (DoPush == PushVal::Yes)
S.Stk.push<T>(Value);
if constexpr (Op == IncDecOp::Inc) {
if (!T::increment(Value, &Result)) {
Ptr.deref<T>() = Result;
return true;
}
} else {
if (!T::decrement(Value, &Result)) {
Ptr.deref<T>() = Result;
return true;
}
}
// Something went wrong with the previous operation. Compute the
// result with another bit of precision.
unsigned Bits = Value.bitWidth() + 1;
APSInt APResult;
if constexpr (Op == IncDecOp::Inc)
APResult = ++Value.toAPSInt(Bits);
else
APResult = --Value.toAPSInt(Bits);
// Report undefined behaviour, stopping if required.
const Expr *E = S.Current->getExpr(OpPC);
QualType Type = E->getType();
if (S.checkingForUndefinedBehavior()) {
SmallString<32> Trunc;
APResult.trunc(Result.bitWidth())
.toString(Trunc, 10, Result.isSigned(), /*formatAsCLiteral=*/false,
/*UpperCase=*/true, /*InsertSeparators=*/true);
auto Loc = E->getExprLoc();
S.report(Loc, diag::warn_integer_constant_overflow)
<< Trunc << Type << E->getSourceRange();
return true;
}
S.CCEDiag(E, diag::note_constexpr_overflow) << APResult << Type;
return S.noteUndefinedBehavior();
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq %rdx, %rdi
callq 0xe9b2de
movb (%rax), %bpl
decb %bpl
jno 0xedcf9b
leaq 0x10(%rsp), %r15
movl $0x1, 0x8(%r15)
andq $0x0, (%r15)
movb $0x0, 0xc(%r15)
leaq 0x20(%rsp), %r12
pushq $0x9
popq %rdx
movq %r12, %rdi
movq %rax, %rsi
callq 0xed67c4
movq %r12, %rdi
callq 0x49212a
movq %r15, %rdi
movq %r12, %rsi
callq 0x7c0c68
movq %r12, %rdi
callq 0x468360
movq 0xc0(%rbx), %rdi
movq %r14, %rsi
callq 0xf13e7a
movq %rax, %r14
movq 0x8(%rax), %r15
movq %r15, 0x8(%rsp)
movq 0x18(%rbx), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
testb %al, %al
je 0xedcfaa
leaq 0x38(%rsp), %rax
movq %rax, -0x18(%rax)
andq $0x0, -0x10(%rax)
movq $0x20, -0x8(%rax)
leaq 0x58(%rsp), %r13
leaq 0x10(%rsp), %rsi
pushq $0x8
popq %rdx
movq %r13, %rdi
callq 0x7d3aca
movl $0x1, (%rsp)
leaq 0x20(%rsp), %r12
pushq $0xa
popq %rdx
pushq $0x1
popq %rcx
movq %r13, %rdi
movq %r12, %rsi
xorl %r8d, %r8d
movl %ecx, %r9d
callq 0x495070
movq %r13, %rdi
callq 0x468360
movq %r14, %rdi
callq 0xe4a970
leaq 0x58(%rsp), %r13
movq %r13, %rdi
movq %rbx, %rsi
movl %eax, %edx
movl $0x92b, %ecx # imm = 0x92B
callq 0xf1a99e
movq %r13, %rdi
movq %r12, %rsi
callq 0x75d224
movq %rax, %rbx
movq %rax, %rdi
movq %r15, %rsi
callq 0x7928a1
movq %r14, %rdi
callq 0xf67396
movq %rbx, %rdi
movq %rax, %rsi
callq 0x500e28
movq %r13, %rdi
callq 0x4a3d6a
movq %r12, %rdi
callq 0x4521fe
movb $0x1, %bl
jmp 0xedcfe7
movq %r15, %rdi
callq 0xe9b2de
movb %bpl, (%rax)
movb $0x1, %bl
jmp 0xedcff1
movq %rbx, %rdi
movq %r14, %rsi
movl $0x8d3, %edx # imm = 0x8D3
xorl %ecx, %ecx
callq 0xf1a886
leaq 0x20(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x10(%rsp), %rsi
callq 0xe61fce
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0xe5fa4c
movq 0x18(%rbx), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movl %eax, %ebx
leaq 0x10(%rsp), %rdi
callq 0x468360
movl %ebx, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/AST/Interp/Interp.h
|
bool clang::interp::CheckShift<clang::interp::Integral<8u, false>, clang::interp::Integral<32u, true>>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<8u, false> const&, clang::interp::Integral<32u, true> const&, unsigned int)
|
bool CheckShift(InterpState &S, CodePtr OpPC, const LT &LHS, const RT &RHS,
unsigned Bits) {
if (RHS.isNegative()) {
const SourceInfo &Loc = S.Current->getSource(OpPC);
S.CCEDiag(Loc, diag::note_constexpr_negative_shift) << RHS.toAPSInt();
if (!S.noteUndefinedBehavior())
return false;
}
// C++11 [expr.shift]p1: Shift width must be less than the bit width of
// the shifted type.
if (Bits > 1 && RHS >= RT::from(Bits, RHS.bitWidth())) {
const Expr *E = S.Current->getExpr(OpPC);
const APSInt Val = RHS.toAPSInt();
QualType Ty = E->getType();
S.CCEDiag(E, diag::note_constexpr_large_shift) << Val << Ty << Bits;
if (!S.noteUndefinedBehavior())
return false;
}
if (LHS.isSigned() && !S.getLangOpts().CPlusPlus20) {
const Expr *E = S.Current->getExpr(OpPC);
// C++11 [expr.shift]p2: A signed left shift must have a non-negative
// operand, and must not overflow the corresponding unsigned type.
if (LHS.isNegative()) {
S.CCEDiag(E, diag::note_constexpr_lshift_of_negative) << LHS.toAPSInt();
if (!S.noteUndefinedBehavior())
return false;
} else if (LHS.toUnsigned().countLeadingZeros() <
static_cast<unsigned>(RHS)) {
S.CCEDiag(E, diag::note_constexpr_lshift_discards);
if (!S.noteUndefinedBehavior())
return false;
}
}
// C++2a [expr.shift]p2: [P0907R4]:
// E1 << E2 is the unique value congruent to
// E1 x 2^E2 module 2^N.
return true;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, %r12d
movq %rcx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl %r8d, 0x4(%rsp)
movl (%rcx), %eax
testl %eax, %eax
jns 0xee693f
movq 0xc0(%rbx), %rdi
movq %r15, %rsi
callq 0xf13e1e
leaq 0x10(%rsp), %rsi
movq %rax, (%rsi)
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x8c0, %edx # imm = 0x8C0
xorl %ecx, %ecx
callq 0xf1a8ac
leaq 0x8(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x18(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0xed63e4
leaq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0xe61fce
movq %r13, %rdi
callq 0x468360
movq 0x18(%rbx), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
testb %al, %al
je 0xee69d8
movl (%r14), %eax
cmpl $0x2, %r12d
jb 0xee69d5
cmpl %r12d, %eax
jl 0xee69d5
movq 0xc0(%rbx), %rdi
movq %r15, %rsi
callq 0xf13e7a
movq %rax, %r12
leaq 0x18(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xed63e4
movq 0x8(%r12), %rax
leaq 0x10(%rsp), %r14
movq %rax, (%r14)
xorl %ebp, %ebp
movq %rbx, %rdi
movq %r12, %rsi
movl $0x8ab, %edx # imm = 0x8AB
xorl %ecx, %ecx
callq 0xf1a886
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
movq %r15, %rsi
callq 0xe61fce
movq %rax, %rdi
movq %r14, %rsi
callq 0xe5fa4c
leaq 0x4(%rsp), %rsi
movq %rax, %rdi
callq 0xe64346
movq 0x18(%rbx), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movl %eax, %ebx
movq %r15, %rdi
callq 0x468360
testb %bl, %bl
je 0xee69d8
movb $0x1, %bpl
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/AST/Interp/Interp.h
|
bool clang::interp::DoShift<clang::interp::Integral<16u, true>, clang::interp::Integral<32u, true>, (clang::interp::ShiftDir)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<16u, true>&, clang::interp::Integral<32u, true>&)
|
inline bool DoShift(InterpState &S, CodePtr OpPC, LT &LHS, RT &RHS) {
const unsigned Bits = LHS.bitWidth();
// OpenCL 6.3j: shift values are effectively % word size of LHS.
if (S.getLangOpts().OpenCL)
RT::bitAnd(RHS, RT::from(LHS.bitWidth() - 1, RHS.bitWidth()),
RHS.bitWidth(), &RHS);
if (RHS.isNegative()) {
// During constant-folding, a negative shift is an opposite shift. Such a
// shift is not a constant expression.
const SourceInfo &Loc = S.Current->getSource(OpPC);
S.CCEDiag(Loc, diag::note_constexpr_negative_shift) << RHS.toAPSInt();
if (!S.noteUndefinedBehavior())
return false;
RHS = -RHS;
return DoShift < LT, RT,
Dir == ShiftDir::Left ? ShiftDir::Right
: ShiftDir::Left > (S, OpPC, LHS, RHS);
}
if constexpr (Dir == ShiftDir::Left) {
if (LHS.isNegative() && !S.getLangOpts().CPlusPlus20) {
// C++11 [expr.shift]p2: A signed left shift must have a non-negative
// operand, and must not overflow the corresponding unsigned type.
// C++2a [expr.shift]p2: E1 << E2 is the unique value congruent to
// E1 x 2^E2 module 2^N.
const SourceInfo &Loc = S.Current->getSource(OpPC);
S.CCEDiag(Loc, diag::note_constexpr_lshift_of_negative) << LHS.toAPSInt();
if (!S.noteUndefinedBehavior())
return false;
}
}
if (!CheckShift(S, OpPC, LHS, RHS, Bits))
return false;
// Limit the shift amount to Bits - 1. If this happened,
// it has already been diagnosed by CheckShift() above,
// but we still need to handle it.
typename LT::AsUnsigned R;
if constexpr (Dir == ShiftDir::Left) {
if (RHS > RT::from(Bits - 1, RHS.bitWidth()))
LT::AsUnsigned::shiftLeft(LT::AsUnsigned::from(LHS),
LT::AsUnsigned::from(Bits - 1), Bits, &R);
else
LT::AsUnsigned::shiftLeft(LT::AsUnsigned::from(LHS),
LT::AsUnsigned::from(RHS, Bits), Bits, &R);
} else {
if (RHS > RT::from(Bits - 1, RHS.bitWidth()))
LT::AsUnsigned::shiftRight(LT::AsUnsigned::from(LHS),
LT::AsUnsigned::from(Bits - 1), Bits, &R);
else
LT::AsUnsigned::shiftRight(LT::AsUnsigned::from(LHS),
LT::AsUnsigned::from(RHS, Bits), Bits, &R);
}
S.Stk.push<LT>(LT::from(R));
return true;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
callq 0xf1ab82
testb $0x40, 0x2f(%rax)
movl (%r14), %eax
jne 0xee8a8f
testl %eax, %eax
jns 0xee8a95
movq 0xc0(%rbx), %rdi
movq %r12, %rsi
callq 0xf13e1e
leaq 0x10(%rsp), %rsi
movq %rax, (%rsi)
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x8c0, %edx # imm = 0x8C0
xorl %ecx, %ecx
callq 0xf1a8ac
leaq 0x8(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x18(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0xed63e4
leaq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0xe61fce
movq %r13, %rdi
callq 0x468360
movq 0x18(%rbx), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
testb %al, %al
je 0xee8b55
negl (%r14)
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0xee8b66
movl %eax, %ebp
jmp 0xee8b55
andl $0xf, %eax
movl %eax, (%r14)
cmpw $0x0, (%r15)
jns 0xee8b0d
movq %rbx, %rdi
callq 0xf1ab82
testb $0x40, 0x1(%rax)
jne 0xee8b0d
movq 0xc0(%rbx), %rdi
movq %r12, %rsi
callq 0xf13e1e
leaq 0x10(%rsp), %rsi
movq %rax, (%rsi)
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x8af, %edx # imm = 0x8AF
xorl %ecx, %ecx
callq 0xf1a8ac
leaq 0x8(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x18(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0xed6346
leaq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0xe61fce
movq %r13, %rdi
callq 0x468360
movq 0x18(%rbx), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
testb %al, %al
je 0xee8b55
pushq $0x10
popq %r8
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0xee8c74
testb %al, %al
je 0xee8b53
movl (%r14), %ecx
movzwl (%r15), %eax
movl %eax, %edx
shll %cl, %eax
shll $0xf, %edx
cmpl $0x10, %ecx
cmovgel %edx, %eax
movq 0xb0(%rbx), %rdi
leaq 0x18(%rsp), %rsi
movw %ax, (%rsi)
callq 0xedac1c
movb $0x1, %bpl
jmp 0xee8b55
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/AST/Interp/Interp.h
|
bool clang::interp::CheckShift<clang::interp::Integral<16u, true>, clang::interp::Integral<64u, true>>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<16u, true> const&, clang::interp::Integral<64u, true> const&, unsigned int)
|
bool CheckShift(InterpState &S, CodePtr OpPC, const LT &LHS, const RT &RHS,
unsigned Bits) {
if (RHS.isNegative()) {
const SourceInfo &Loc = S.Current->getSource(OpPC);
S.CCEDiag(Loc, diag::note_constexpr_negative_shift) << RHS.toAPSInt();
if (!S.noteUndefinedBehavior())
return false;
}
// C++11 [expr.shift]p1: Shift width must be less than the bit width of
// the shifted type.
if (Bits > 1 && RHS >= RT::from(Bits, RHS.bitWidth())) {
const Expr *E = S.Current->getExpr(OpPC);
const APSInt Val = RHS.toAPSInt();
QualType Ty = E->getType();
S.CCEDiag(E, diag::note_constexpr_large_shift) << Val << Ty << Bits;
if (!S.noteUndefinedBehavior())
return false;
}
if (LHS.isSigned() && !S.getLangOpts().CPlusPlus20) {
const Expr *E = S.Current->getExpr(OpPC);
// C++11 [expr.shift]p2: A signed left shift must have a non-negative
// operand, and must not overflow the corresponding unsigned type.
if (LHS.isNegative()) {
S.CCEDiag(E, diag::note_constexpr_lshift_of_negative) << LHS.toAPSInt();
if (!S.noteUndefinedBehavior())
return false;
} else if (LHS.toUnsigned().countLeadingZeros() <
static_cast<unsigned>(RHS)) {
S.CCEDiag(E, diag::note_constexpr_lshift_discards);
if (!S.noteUndefinedBehavior())
return false;
}
}
// C++2a [expr.shift]p2: [P0907R4]:
// E1 << E2 is the unique value congruent to
// E1 x 2^E2 module 2^N.
return true;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r8d, %r13d
movq %rcx, %r15
movq %rdx, 0x18(%rsp)
movq %rsi, %r14
movq %rdi, %rbx
movl %r8d, 0x4(%rsp)
movq (%rcx), %rax
testq %rax, %rax
jns 0xee9477
movq 0xc0(%rbx), %rdi
movq %r14, %rsi
callq 0xf13e1e
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movq %rbx, %rdi
movl $0x8c0, %edx # imm = 0x8C0
xorl %ecx, %ecx
callq 0xf1a8ac
leaq 0x20(%rsp), %rbp
movq %rax, (%rbp)
leaq 0x28(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0xed6480
movq %rbp, %rdi
xorl %ebp, %ebp
movq %r12, %rsi
callq 0xe61fce
movq %r12, %rdi
callq 0x468360
movq 0x18(%rbx), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
testb %al, %al
je 0xee95c4
movq (%r15), %rax
cmpl $0x2, %r13d
jb 0xee9520
movl %r13d, %ecx
cmpq %rcx, %rax
jl 0xee9520
movq 0xc0(%rbx), %rdi
movq %r14, %rsi
callq 0xf13e7a
movq %r14, 0x10(%rsp)
movq %rax, %r14
leaq 0x28(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0xed6480
movq 0x8(%r14), %rax
leaq 0x8(%rsp), %r12
movq %rax, (%r12)
xorl %ebp, %ebp
movq %rbx, %rdi
movq %r14, %rsi
movl $0x8ab, %edx # imm = 0x8AB
xorl %ecx, %ecx
callq 0xf1a886
leaq 0x20(%rsp), %rdi
movq %rax, (%rdi)
movq %r13, %rsi
callq 0xe61fce
movq %rax, %rdi
movq %r12, %rsi
callq 0xe5fa4c
leaq 0x4(%rsp), %rsi
movq %rax, %rdi
callq 0xe64346
movq 0x18(%rbx), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movl %eax, %r14d
movq %r13, %rdi
callq 0x468360
testb %r14b, %r14b
movq 0x10(%rsp), %r14
je 0xee95c4
movq %rbx, %rdi
callq 0xf1ab82
movb $0x1, %bpl
testb $0x40, 0x1(%rax)
jne 0xee95c4
movq 0xc0(%rbx), %rdi
movq %r14, %rsi
callq 0xf13e7a
movq %rax, %r12
movq 0x18(%rsp), %r13
movzwl (%r13), %eax
testw %ax, %ax
js 0xee9577
movzwl %ax, %edi
callq 0xee7f3e
cmpl (%r15), %eax
jae 0xee95c4
movq %rbx, %rdi
movq %r12, %rsi
movl $0x8ae, %edx # imm = 0x8AE
xorl %ecx, %ecx
callq 0xf1a886
jmp 0xee95b4
movq %rbx, %rdi
movq %r12, %rsi
movl $0x8af, %edx # imm = 0x8AF
xorl %ecx, %ecx
callq 0xf1a886
leaq 0x8(%rsp), %r14
movq %rax, (%r14)
leaq 0x28(%rsp), %r15
movq %r15, %rdi
movq %r13, %rsi
callq 0xed6346
movq %r14, %rdi
movq %r15, %rsi
callq 0xe61fce
movq %r15, %rdi
callq 0x468360
movq 0x18(%rbx), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
testb %al, %al
jne 0xee95c4
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/AST/Interp/Interp.h
|
bool clang::interp::CheckShift<clang::interp::Integral<64u, true>, clang::interp::Integral<64u, false>>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<64u, true> const&, clang::interp::Integral<64u, false> const&, unsigned int)
|
bool CheckShift(InterpState &S, CodePtr OpPC, const LT &LHS, const RT &RHS,
unsigned Bits) {
if (RHS.isNegative()) {
const SourceInfo &Loc = S.Current->getSource(OpPC);
S.CCEDiag(Loc, diag::note_constexpr_negative_shift) << RHS.toAPSInt();
if (!S.noteUndefinedBehavior())
return false;
}
// C++11 [expr.shift]p1: Shift width must be less than the bit width of
// the shifted type.
if (Bits > 1 && RHS >= RT::from(Bits, RHS.bitWidth())) {
const Expr *E = S.Current->getExpr(OpPC);
const APSInt Val = RHS.toAPSInt();
QualType Ty = E->getType();
S.CCEDiag(E, diag::note_constexpr_large_shift) << Val << Ty << Bits;
if (!S.noteUndefinedBehavior())
return false;
}
if (LHS.isSigned() && !S.getLangOpts().CPlusPlus20) {
const Expr *E = S.Current->getExpr(OpPC);
// C++11 [expr.shift]p2: A signed left shift must have a non-negative
// operand, and must not overflow the corresponding unsigned type.
if (LHS.isNegative()) {
S.CCEDiag(E, diag::note_constexpr_lshift_of_negative) << LHS.toAPSInt();
if (!S.noteUndefinedBehavior())
return false;
} else if (LHS.toUnsigned().countLeadingZeros() <
static_cast<unsigned>(RHS)) {
S.CCEDiag(E, diag::note_constexpr_lshift_discards);
if (!S.noteUndefinedBehavior())
return false;
}
}
// C++2a [expr.shift]p2: [P0907R4]:
// E1 << E2 is the unique value congruent to
// E1 x 2^E2 module 2^N.
return true;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r14
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, %rbx
movl %r8d, 0xc(%rsp)
cmpl $0x2, %r8d
jb 0xef2928
movl %r8d, %eax
cmpq %rax, (%r14)
jb 0xef2928
movq 0xc0(%rbx), %rdi
movq %r12, %rsi
callq 0xf13e7a
movq %rax, %r15
movq %r13, 0x10(%rsp)
leaq 0x28(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0xed64ce
movq 0x8(%r15), %rax
leaq 0x18(%rsp), %rbp
movq %rax, (%rbp)
movq %rbx, %rdi
movq %r15, %rsi
movl $0x8ab, %edx # imm = 0x8AB
xorl %ecx, %ecx
callq 0xf1a886
leaq 0x20(%rsp), %rdi
movq %rax, (%rdi)
movq %r13, %rsi
callq 0xe61fce
movq %rax, %rdi
movq %rbp, %rsi
callq 0xe5fa4c
leaq 0xc(%rsp), %rsi
movq %rax, %rdi
callq 0xe64346
movq 0x18(%rbx), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movl %eax, %ebp
movq %r13, %rdi
movq 0x10(%rsp), %r13
callq 0x468360
testb %bpl, %bpl
movl $0x0, %ebp
je 0xef29ca
movq %rbx, %rdi
callq 0xf1ab82
movb $0x1, %bpl
testb $0x40, 0x1(%rax)
jne 0xef29ca
movq 0xc0(%rbx), %rdi
movq %r12, %rsi
callq 0xf13e7a
movq (%r13), %rcx
testq %rcx, %rcx
js 0xef2961
je 0xef29a0
bsrq %rcx, %rcx
xorq $0x3f, %rcx
jmp 0xef29a3
movq %rbx, %rdi
movq %rax, %rsi
movl $0x8af, %edx # imm = 0x8AF
xorl %ecx, %ecx
callq 0xf1a886
leaq 0x18(%rsp), %r14
movq %rax, (%r14)
leaq 0x28(%rsp), %r15
movq %r15, %rdi
movq %r13, %rsi
callq 0xed6480
movq %r14, %rdi
movq %r15, %rsi
callq 0xe61fce
movq %r15, %rdi
callq 0x468360
jmp 0xef29ba
pushq $0x40
popq %rcx
cmpl (%r14), %ecx
jae 0xef29ca
movq %rbx, %rdi
movq %rax, %rsi
movl $0x8ae, %edx # imm = 0x8AE
xorl %ecx, %ecx
callq 0xf1a886
movq 0x18(%rbx), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
testb %al, %al
jne 0xef29ca
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/AST/Interp/Interp.h
|
bool clang::interp::CheckShift<clang::interp::IntegralAP<false>, clang::interp::Integral<64u, false>>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::IntegralAP<false> const&, clang::interp::Integral<64u, false> const&, unsigned int)
|
bool CheckShift(InterpState &S, CodePtr OpPC, const LT &LHS, const RT &RHS,
unsigned Bits) {
if (RHS.isNegative()) {
const SourceInfo &Loc = S.Current->getSource(OpPC);
S.CCEDiag(Loc, diag::note_constexpr_negative_shift) << RHS.toAPSInt();
if (!S.noteUndefinedBehavior())
return false;
}
// C++11 [expr.shift]p1: Shift width must be less than the bit width of
// the shifted type.
if (Bits > 1 && RHS >= RT::from(Bits, RHS.bitWidth())) {
const Expr *E = S.Current->getExpr(OpPC);
const APSInt Val = RHS.toAPSInt();
QualType Ty = E->getType();
S.CCEDiag(E, diag::note_constexpr_large_shift) << Val << Ty << Bits;
if (!S.noteUndefinedBehavior())
return false;
}
if (LHS.isSigned() && !S.getLangOpts().CPlusPlus20) {
const Expr *E = S.Current->getExpr(OpPC);
// C++11 [expr.shift]p2: A signed left shift must have a non-negative
// operand, and must not overflow the corresponding unsigned type.
if (LHS.isNegative()) {
S.CCEDiag(E, diag::note_constexpr_lshift_of_negative) << LHS.toAPSInt();
if (!S.noteUndefinedBehavior())
return false;
} else if (LHS.toUnsigned().countLeadingZeros() <
static_cast<unsigned>(RHS)) {
S.CCEDiag(E, diag::note_constexpr_lshift_discards);
if (!S.noteUndefinedBehavior())
return false;
}
}
// C++2a [expr.shift]p2: [P0907R4]:
// E1 << E2 is the unique value congruent to
// E1 x 2^E2 module 2^N.
return true;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movl %r8d, 0xc(%rsp)
cmpl $0x2, %r8d
jb 0xef7ca4
movq %rcx, %r15
movl %r8d, %eax
cmpq %rax, (%rcx)
jb 0xef7ca4
movq %rdi, %rbx
movq 0xc0(%rdi), %rdi
callq 0xf13e7a
movq %rax, %r12
leaq 0x20(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0xed64ce
movq 0x8(%r12), %rax
leaq 0x18(%rsp), %r15
movq %rax, (%r15)
xorl %ebp, %ebp
movq %rbx, %rdi
movq %r12, %rsi
movl $0x8ab, %edx # imm = 0x8AB
xorl %ecx, %ecx
callq 0xf1a886
leaq 0x10(%rsp), %rdi
movq %rax, (%rdi)
movq %r14, %rsi
callq 0xe61fce
movq %rax, %rdi
movq %r15, %rsi
callq 0xe5fa4c
leaq 0xc(%rsp), %rsi
movq %rax, %rdi
callq 0xe64346
movq 0x18(%rbx), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movl %eax, %ebx
movq %r14, %rdi
callq 0x468360
testb %bl, %bl
je 0xef7ca7
movb $0x1, %bpl
movl %ebp, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
/AST/Interp/Interp.h
|
bool clang::interp::DoShift<clang::interp::IntegralAP<false>, clang::interp::IntegralAP<true>, (clang::interp::ShiftDir)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::IntegralAP<false>&, clang::interp::IntegralAP<true>&)
|
inline bool DoShift(InterpState &S, CodePtr OpPC, LT &LHS, RT &RHS) {
const unsigned Bits = LHS.bitWidth();
// OpenCL 6.3j: shift values are effectively % word size of LHS.
if (S.getLangOpts().OpenCL)
RT::bitAnd(RHS, RT::from(LHS.bitWidth() - 1, RHS.bitWidth()),
RHS.bitWidth(), &RHS);
if (RHS.isNegative()) {
// During constant-folding, a negative shift is an opposite shift. Such a
// shift is not a constant expression.
const SourceInfo &Loc = S.Current->getSource(OpPC);
S.CCEDiag(Loc, diag::note_constexpr_negative_shift) << RHS.toAPSInt();
if (!S.noteUndefinedBehavior())
return false;
RHS = -RHS;
return DoShift < LT, RT,
Dir == ShiftDir::Left ? ShiftDir::Right
: ShiftDir::Left > (S, OpPC, LHS, RHS);
}
if constexpr (Dir == ShiftDir::Left) {
if (LHS.isNegative() && !S.getLangOpts().CPlusPlus20) {
// C++11 [expr.shift]p2: A signed left shift must have a non-negative
// operand, and must not overflow the corresponding unsigned type.
// C++2a [expr.shift]p2: E1 << E2 is the unique value congruent to
// E1 x 2^E2 module 2^N.
const SourceInfo &Loc = S.Current->getSource(OpPC);
S.CCEDiag(Loc, diag::note_constexpr_lshift_of_negative) << LHS.toAPSInt();
if (!S.noteUndefinedBehavior())
return false;
}
}
if (!CheckShift(S, OpPC, LHS, RHS, Bits))
return false;
// Limit the shift amount to Bits - 1. If this happened,
// it has already been diagnosed by CheckShift() above,
// but we still need to handle it.
typename LT::AsUnsigned R;
if constexpr (Dir == ShiftDir::Left) {
if (RHS > RT::from(Bits - 1, RHS.bitWidth()))
LT::AsUnsigned::shiftLeft(LT::AsUnsigned::from(LHS),
LT::AsUnsigned::from(Bits - 1), Bits, &R);
else
LT::AsUnsigned::shiftLeft(LT::AsUnsigned::from(LHS),
LT::AsUnsigned::from(RHS, Bits), Bits, &R);
} else {
if (RHS > RT::from(Bits - 1, RHS.bitWidth()))
LT::AsUnsigned::shiftRight(LT::AsUnsigned::from(LHS),
LT::AsUnsigned::from(Bits - 1), Bits, &R);
else
LT::AsUnsigned::shiftRight(LT::AsUnsigned::from(LHS),
LT::AsUnsigned::from(RHS, Bits), Bits, &R);
}
S.Stk.push<LT>(LT::from(R));
return true;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movl 0x8(%rdx), %r13d
callq 0xf1ab82
testb $0x40, 0x2f(%rax)
je 0xef8514
leaq 0x38(%rsp), %rdi
movq %r14, %rsi
callq 0x48b344
movl 0x8(%r15), %esi
decl %esi
movl 0x8(%r14), %edx
movq %r15, %rbp
movq %rbx, %r15
movq %r13, %rbx
movq %r12, %r13
leaq 0xc8(%rsp), %r12
movq %r12, %rdi
callq 0xeda644
movl 0x8(%r14), %edx
leaq 0x38(%rsp), %rdi
movq %r12, %rsi
movq %r14, %rcx
callq 0xeda7dc
movq %r12, %rdi
movq %r13, %r12
movq %rbx, %r13
movq %r15, %rbx
movq %rbp, %r15
callq 0x468360
leaq 0x38(%rsp), %rdi
callq 0x468360
movq %r14, %rdi
callq 0xed93cc
testb %al, %al
je 0xef85ce
movq 0xc0(%rbx), %rdi
movq %r12, %rsi
callq 0xf13e1e
leaq 0x28(%rsp), %rsi
movq %rax, (%rsi)
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x8c0, %edx # imm = 0x8C0
xorl %ecx, %ecx
callq 0xf1a8ac
movq %r12, 0x8(%rsp)
leaq 0x20(%rsp), %r12
movq %rax, (%r12)
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0xed6564
movq %r12, %rdi
movq %r13, %rsi
callq 0xe61fce
movq %r13, %rdi
callq 0x468360
movq 0x18(%rbx), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
testb %al, %al
je 0xef87f0
leaq 0x10(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0xee57f6
movq %r14, %rdi
movq %r12, %rsi
callq 0x468326
movq %r12, %rdi
callq 0x468360
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0xef8804
movl %eax, %ebp
jmp 0xef87f0
movq %r15, %rdi
callq 0xed8f8e
testb %al, %al
je 0xef8665
movq %rbx, %rdi
callq 0xf1ab82
testb $0x40, 0x1(%rax)
jne 0xef8665
movq 0xc0(%rbx), %rdi
movq %r12, %rsi
callq 0xf13e1e
leaq 0x28(%rsp), %rsi
movq %rax, (%rsi)
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x8af, %edx # imm = 0x8AF
xorl %ecx, %ecx
callq 0xf1a8ac
leaq 0x20(%rsp), %rcx
movq %rax, (%rcx)
movq %r12, 0x8(%rsp)
movq %r13, %r12
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0xed651c
leaq 0x20(%rsp), %rdi
movq %r13, %rsi
callq 0xe61fce
movq %r13, %rdi
movq %r12, %r13
movq 0x8(%rsp), %r12
callq 0x468360
movq 0x18(%rbx), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
testb %al, %al
je 0xef87f0
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movl %r13d, %r8d
callq 0xef8ae8
testb %al, %al
je 0xef8715
leaq 0x10(%rsp), %rdi
callq 0xed73c8
movq %r13, 0x8(%rsp)
decl %r13d
movl 0x8(%r14), %edx
leaq 0x28(%rsp), %r12
movq %r12, %rdi
movl %r13d, %esi
callq 0xeda644
movq %r14, %rdi
movq %r12, %rsi
callq 0x493180
movl %eax, %ebp
movq %r12, %rdi
callq 0x468360
testb %bpl, %bpl
je 0xef871c
leaq 0xa8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x48b344
leaq 0xb8(%rsp), %r15
movq %r15, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0xedb5fc
leaq 0x98(%rsp), %rbp
movq %rbp, %rdi
movl %r13d, %esi
xorl %edx, %edx
callq 0xeda48c
leaq 0x10(%rsp), %rcx
movq %r15, %rdi
movq %rbp, %rsi
movq 0x8(%rsp), %rdx
callq 0xef5a90
jmp 0xef8784
xorl %ebp, %ebp
jmp 0xef87f0
leaq 0x78(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x48b344
leaq 0x88(%rsp), %r15
movq %r15, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0xedb5fc
leaq 0x58(%rsp), %rbp
movq %rbp, %rdi
movq %r14, %rsi
callq 0x48b344
leaq 0x68(%rsp), %r14
movq %r14, %rdi
movq %rbp, %rsi
movq 0x8(%rsp), %r13
movl %r13d, %edx
callq 0xedb638
leaq 0x10(%rsp), %rcx
movq %r15, %rdi
movq %r14, %rsi
movl %r13d, %edx
callq 0xef5a90
movq %r14, %rdi
callq 0x468360
movq %rbp, %rdi
callq 0x468360
movq %r15, %rdi
callq 0x468360
movq %r12, %rdi
callq 0x468360
movq 0xb0(%rbx), %rbx
leaq 0x48(%rsp), %r14
leaq 0x10(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x48b344
leaq 0x28(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0xedb5fc
movq %rbx, %rdi
movq %r12, %rsi
callq 0xed4946
movq %r12, %rdi
callq 0x468360
movq %r14, %rdi
callq 0x468360
movq %r15, %rdi
callq 0x468360
movb $0x1, %bpl
movl %ebp, %eax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/AST/Interp/Interp.h
|
bool clang::interp::CheckShift<clang::interp::IntegralAP<true>, clang::interp::Integral<32u, false>>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::IntegralAP<true> const&, clang::interp::Integral<32u, false> const&, unsigned int)
|
bool CheckShift(InterpState &S, CodePtr OpPC, const LT &LHS, const RT &RHS,
unsigned Bits) {
if (RHS.isNegative()) {
const SourceInfo &Loc = S.Current->getSource(OpPC);
S.CCEDiag(Loc, diag::note_constexpr_negative_shift) << RHS.toAPSInt();
if (!S.noteUndefinedBehavior())
return false;
}
// C++11 [expr.shift]p1: Shift width must be less than the bit width of
// the shifted type.
if (Bits > 1 && RHS >= RT::from(Bits, RHS.bitWidth())) {
const Expr *E = S.Current->getExpr(OpPC);
const APSInt Val = RHS.toAPSInt();
QualType Ty = E->getType();
S.CCEDiag(E, diag::note_constexpr_large_shift) << Val << Ty << Bits;
if (!S.noteUndefinedBehavior())
return false;
}
if (LHS.isSigned() && !S.getLangOpts().CPlusPlus20) {
const Expr *E = S.Current->getExpr(OpPC);
// C++11 [expr.shift]p2: A signed left shift must have a non-negative
// operand, and must not overflow the corresponding unsigned type.
if (LHS.isNegative()) {
S.CCEDiag(E, diag::note_constexpr_lshift_of_negative) << LHS.toAPSInt();
if (!S.noteUndefinedBehavior())
return false;
} else if (LHS.toUnsigned().countLeadingZeros() <
static_cast<unsigned>(RHS)) {
S.CCEDiag(E, diag::note_constexpr_lshift_discards);
if (!S.noteUndefinedBehavior())
return false;
}
}
// C++2a [expr.shift]p2: [P0907R4]:
// E1 << E2 is the unique value congruent to
// E1 x 2^E2 module 2^N.
return true;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r15
movq %rdx, %rbp
movq %rsi, %r12
movq %rdi, %rbx
movl %r8d, 0xc(%rsp)
cmpl $0x2, %r8d
jb 0xefae93
cmpl %r8d, (%r15)
jb 0xefae93
movq 0xc0(%rbx), %rdi
movq %r12, %rsi
callq 0xf13e7a
movq %rax, %r14
leaq 0x20(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0xed6432
movq 0x8(%r14), %rax
movq %rbp, 0x10(%rsp)
leaq 0x18(%rsp), %rbp
movq %rax, (%rbp)
movq %rbx, %rdi
movq %r14, %rsi
movl $0x8ab, %edx # imm = 0x8AB
xorl %ecx, %ecx
callq 0xf1a886
leaq 0x30(%rsp), %rdi
movq %rax, (%rdi)
movq %r13, %rsi
callq 0xe61fce
movq %rax, %rdi
movq %rbp, %rsi
callq 0xe5fa4c
leaq 0xc(%rsp), %rsi
movq %rax, %rdi
callq 0xe64346
movq 0x18(%rbx), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movl %eax, %ebp
movq %r13, %rdi
xorl %r13d, %r13d
callq 0x468360
testb %bpl, %bpl
movq 0x10(%rsp), %rbp
je 0xefaf54
movq %rbx, %rdi
callq 0xf1ab82
movb $0x1, %r13b
testb $0x40, 0x1(%rax)
jne 0xefaf54
movq 0xc0(%rbx), %rdi
movq %r12, %rsi
callq 0xf13e7a
movq %rax, %r12
movq %rbp, %rdi
callq 0xed93cc
testb %al, %al
je 0xefaf07
movq %rbx, %rdi
movq %r12, %rsi
movl $0x8af, %edx # imm = 0x8AF
xorl %ecx, %ecx
callq 0xf1a886
leaq 0x18(%rsp), %r14
movq %rax, (%r14)
leaq 0x20(%rsp), %r15
movq %r15, %rdi
movq %rbp, %rsi
xorl %edx, %edx
callq 0xed6564
movq %r14, %rdi
movq %r15, %rsi
callq 0xe61fce
movq %r15, %rdi
callq 0x468360
jmp 0xefaf43
leaq 0x20(%rsp), %r14
movq %r14, %rdi
movq %rbp, %rsi
callq 0xef9302
movq %r14, %rdi
callq 0x49184a
movl %eax, %ebp
movl (%r15), %r15d
movq %r14, %rdi
callq 0x468360
cmpl %r15d, %ebp
jae 0xefaf54
movq %rbx, %rdi
movq %r12, %rsi
movl $0x8ae, %edx # imm = 0x8AE
xorl %ecx, %ecx
callq 0xf1a886
movq 0x18(%rbx), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
testb %al, %al
jne 0xefaf54
xorl %r13d, %r13d
movl %r13d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/AST/Interp/Interp.h
|
bool clang::interp::AddSubMulHelper<clang::interp::Integral<8u, true>, &clang::interp::Integral<8u, true>::sub(clang::interp::Integral<8u, true>, clang::interp::Integral<8u, true>, unsigned int, clang::interp::Integral<8u, true>*), std::minus>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::interp::Integral<8u, true> const&, clang::interp::Integral<8u, true> const&)
|
bool AddSubMulHelper(InterpState &S, CodePtr OpPC, unsigned Bits, const T &LHS,
const T &RHS) {
// Fast path - add the numbers with fixed width.
T Result;
if (!OpFW(LHS, RHS, Bits, &Result)) {
S.Stk.push<T>(Result);
return true;
}
// If for some reason evaluation continues, use the truncated results.
S.Stk.push<T>(Result);
// Slow path - compute the result using another bit of precision.
APSInt Value = OpAP<APSInt>()(LHS.toAPSInt(Bits), RHS.toAPSInt(Bits));
// Report undefined behaviour, stopping if required.
const Expr *E = S.Current->getExpr(OpPC);
QualType Type = E->getType();
if (S.checkingForUndefinedBehavior()) {
SmallString<32> Trunc;
Value.trunc(Result.bitWidth())
.toString(Trunc, 10, Result.isSigned(), /*formatAsCLiteral=*/false,
/*UpperCase=*/true, /*InsertSeparators=*/true);
auto Loc = E->getExprLoc();
S.report(Loc, diag::warn_integer_constant_overflow)
<< Trunc << Type << E->getSourceRange();
}
S.CCEDiag(E, diag::note_constexpr_overflow) << Value << Type;
if (!S.noteUndefinedBehavior()) {
S.Stk.pop<T>();
return false;
}
return true;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %r8, %r15
movq %rcx, %r12
movl %edx, %ebp
movq %rsi, 0x10(%rsp)
movq %rdi, %rbx
movb (%rcx), %r13b
movb (%r8), %r14b
movl %r13d, %eax
subb %r14b, %al
leaq 0xf(%rsp), %rsi
movb %al, (%rsi)
movq 0xb0(%rdi), %rdi
callq 0xed67b2
cmpb %r14b, %r13b
movb $0x1, %r13b
jno 0xefce2d
leaq 0x50(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
movl %ebp, %edx
callq 0xed67c4
leaq 0x30(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0xed67c4
leaq 0x20(%rsp), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0xe708cc
movq %r12, %rdi
callq 0x468360
movq %r13, %rdi
callq 0x468360
movq 0xc0(%rbx), %rdi
movq 0x10(%rsp), %rsi
callq 0xf13e7a
movq %rax, %r14
movq 0x8(%rax), %r15
movq %r15, 0x18(%rsp)
movq 0x18(%rbx), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
testb %al, %al
je 0xefcdd5
leaq 0x68(%rsp), %rax
movq %rax, -0x18(%rax)
andq $0x0, -0x10(%rax)
movq $0x20, -0x8(%rax)
leaq 0x30(%rsp), %r13
leaq 0x20(%rsp), %rsi
pushq $0x8
popq %rdx
movq %r13, %rdi
callq 0x7d3aca
movl $0x1, (%rsp)
leaq 0x50(%rsp), %r12
pushq $0xa
popq %rdx
pushq $0x1
popq %rcx
movq %r13, %rdi
movq %r12, %rsi
xorl %r8d, %r8d
movl %ecx, %r9d
callq 0x495070
movq %r13, %rdi
callq 0x468360
movq %r14, %rdi
callq 0xe4a970
leaq 0x30(%rsp), %r13
movq %r13, %rdi
movq %rbx, %rsi
movl %eax, %edx
movl $0x92b, %ecx # imm = 0x92B
callq 0xf1a99e
movq %r13, %rdi
movq %r12, %rsi
callq 0x75d224
movq %rax, %rbp
movq %rax, %rdi
movq %r15, %rsi
callq 0x7928a1
movq %r14, %rdi
callq 0xf67396
movq %rbp, %rdi
movq %rax, %rsi
callq 0x500e28
movq %r13, %rdi
callq 0x4a3d6a
movq %r12, %rdi
callq 0x4521fe
movq %rbx, %rdi
movq %r14, %rsi
movl $0x8d3, %edx # imm = 0x8D3
xorl %ecx, %ecx
callq 0xf1a886
leaq 0x50(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x20(%rsp), %rsi
callq 0xe61fce
leaq 0x18(%rsp), %rsi
movq %rax, %rdi
callq 0xe5fa4c
movq 0x18(%rbx), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movl %eax, %r13d
testb %al, %al
jne 0xefce23
movq 0xb0(%rbx), %rdi
callq 0xed65ac
leaq 0x20(%rsp), %rdi
callq 0x468360
movl %r13d, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/AST/Interp/Interp.h
|
llvm::SmallVectorTemplateBase<clang::interp::DynamicAllocator::Allocation, false>::moveElementsForGrow(clang::interp::DynamicAllocator::Allocation*)
|
void SmallVectorTemplateBase<T, TriviallyCopyable>::moveElementsForGrow(
T *NewElts) {
// Move the elements over.
this->uninitialized_move(this->begin(), this->end(), NewElts);
// Destroy the original elements.
destroy_range(this->begin(), this->end());
}
|
pushq %rbx
movq %rsi, %rdx
movq %rdi, %rbx
movq (%rdi), %rdi
movl 0x8(%rbx), %eax
leaq (%rdi,%rax,8), %rsi
callq 0xf06dd2
movq (%rbx), %rdi
movl 0x8(%rbx), %eax
leaq (%rdi,%rax,8), %rsi
popq %rbx
jmp 0xf06dac
|
/llvm/ADT/SmallVector.h
|
llvm::DenseMap<clang::Expr const*, clang::interp::DynamicAllocator::AllocationSite, llvm::DenseMapInfo<clang::Expr const*, void>, llvm::detail::DenseMapPair<clang::Expr const*, clang::interp::DynamicAllocator::AllocationSite>>::allocateBuckets(unsigned int)
|
bool allocateBuckets(unsigned Num) {
NumBuckets = Num;
if (NumBuckets == 0) {
Buckets = nullptr;
return false;
}
Buckets = static_cast<BucketT *>(
allocate_buffer(sizeof(BucketT) * NumBuckets, alignof(BucketT)));
return true;
}
|
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl %esi, 0x10(%rdi)
testl %esi, %esi
je 0xf071ad
movl %ebp, %eax
imulq $0x50, %rax, %rdi
pushq $0x8
popq %rsi
callq 0x464061
jmp 0xf071af
xorl %eax, %eax
testl %ebp, %ebp
setne %cl
movq %rax, (%rbx)
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
/llvm/ADT/DenseMap.h
|
diagnoseNonConstVariable(clang::interp::InterpState&, clang::interp::CodePtr, clang::ValueDecl const*)
|
static void diagnoseNonConstVariable(InterpState &S, CodePtr OpPC,
const ValueDecl *VD) {
if (!S.getLangOpts().CPlusPlus)
return;
const SourceInfo &Loc = S.Current->getSource(OpPC);
if (const auto *VarD = dyn_cast<VarDecl>(VD);
VarD && VarD->getType().isConstQualified() &&
!VarD->getAnyInitializer()) {
diagnoseMissingInitializer(S, OpPC, VD);
return;
}
// Rather random, but this is to match the diagnostic output of the current
// interpreter.
if (isa<ObjCIvarDecl>(VD))
return;
if (VD->getType()->isIntegralOrEnumerationType()) {
S.FFDiag(Loc, diag::note_constexpr_ltor_non_const_int, 1) << VD;
S.Note(VD->getLocation(), diag::note_declared_at);
return;
}
S.FFDiag(Loc,
S.getLangOpts().CPlusPlus11 ? diag::note_constexpr_ltor_non_constexpr
: diag::note_constexpr_ltor_non_integral,
1)
<< VD << VD->getType();
S.Note(VD->getLocation(), diag::note_declared_at);
}
|
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rdx, 0x8(%rsp)
callq 0xf1ab82
testb $0x4, 0x1(%rax)
je 0xf078da
movq 0xc0(%rbx), %rdi
movq %r15, %rsi
callq 0xf13e1e
movq %rax, (%rsp)
movl 0x1c(%r14), %eax
andl $0x7f, %eax
leal -0x2c(%rax), %ecx
cmpl $-0x7, %ecx
setb %cl
testq %r14, %r14
sete %dl
orb %cl, %dl
jne 0xf07824
movq 0x30(%r14), %rax
testb $0x1, %al
jne 0xf0780c
andq $-0x10, %rax
testb $0x1, 0x8(%rax)
je 0xf0782d
movq %r14, %rdi
callq 0x7cd9b6
testq %rax, %rax
je 0xf078cc
movl 0x1c(%r14), %eax
andl $0x7f, %eax
cmpl $0x2f, %eax
je 0xf078da
movq 0x30(%r14), %rax
andq $-0x10, %rax
movq (%rax), %rdi
callq 0x7af5c8
testb %al, %al
je 0xf0786b
movq %rsp, %rsi
pushq $0x1
popq %rcx
movq %rbx, %rdi
movl $0x8b1, %edx # imm = 0x8B1
callq 0xf1a7c6
leaq 0x10(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x8(%rsp), %r14
movq %r14, %rsi
callq 0xe70d3e
jmp 0xf078b9
movq %rbx, %rdi
callq 0xf1ab82
btl $0xb, (%rax)
movl $0x8b2, %edx # imm = 0x8B2
sbbl $-0x1, %edx
movq %rsp, %rsi
pushq $0x1
popq %rcx
movq %rbx, %rdi
callq 0xf1a7c6
leaq 0x10(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x8(%rsp), %r14
movq %r14, %rsi
callq 0xe70d3e
movq (%r14), %rcx
movq 0x30(%rcx), %rcx
leaq 0x18(%rsp), %rsi
movq %rcx, (%rsi)
movq %rax, %rdi
callq 0xe5fa4c
movq (%r14), %rax
movl 0x18(%rax), %esi
pushq $0x69
popq %rdx
movq %rbx, %rdi
callq 0xf1a8d2
jmp 0xf078da
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0xf08295
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
|
/AST/Interp/Interp.cpp
|
clang::interp::CheckCallable(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Function const*)
|
bool CheckCallable(InterpState &S, CodePtr OpPC, const Function *F) {
if (F->isVirtual() && !S.getLangOpts().CPlusPlus20) {
const SourceLocation &Loc = S.Current->getLocation(OpPC);
S.CCEDiag(Loc, diag::note_constexpr_virtual_call);
return false;
}
if (F->isConstexpr() && F->hasBody() &&
(F->getDecl()->isConstexpr() || F->getDecl()->hasAttr<MSConstexprAttr>()))
return true;
// Implicitly constexpr.
if (F->isLambdaStaticInvoker())
return true;
const SourceLocation &Loc = S.Current->getLocation(OpPC);
if (S.getLangOpts().CPlusPlus11) {
const FunctionDecl *DiagDecl = F->getDecl();
// Invalid decls have been diagnosed before.
if (DiagDecl->isInvalidDecl())
return false;
// If this function is not constexpr because it is an inherited
// non-constexpr constructor, diagnose that directly.
const auto *CD = dyn_cast<CXXConstructorDecl>(DiagDecl);
if (CD && CD->isInheritingConstructor()) {
const auto *Inherited = CD->getInheritedConstructor().getConstructor();
if (!Inherited->isConstexpr())
DiagDecl = CD = Inherited;
}
// FIXME: If DiagDecl is an implicitly-declared special member function
// or an inheriting constructor, we should be much more explicit about why
// it's not constexpr.
if (CD && CD->isInheritingConstructor()) {
S.FFDiag(Loc, diag::note_constexpr_invalid_inhctor, 1)
<< CD->getInheritedConstructor().getConstructor()->getParent();
S.Note(DiagDecl->getLocation(), diag::note_declared_at);
} else {
// Don't emit anything if the function isn't defined and we're checking
// for a constant expression. It might be defined at the point we're
// actually calling it.
bool IsExtern = DiagDecl->getStorageClass() == SC_Extern;
if (!DiagDecl->isDefined() && !IsExtern && DiagDecl->isConstexpr() &&
S.checkingPotentialConstantExpression())
return false;
// If the declaration is defined, declared 'constexpr' _and_ has a body,
// the below diagnostic doesn't add anything useful.
if (DiagDecl->isDefined() && DiagDecl->isConstexpr() &&
DiagDecl->hasBody())
return false;
S.FFDiag(Loc, diag::note_constexpr_invalid_function, 1)
<< DiagDecl->isConstexpr() << (bool)CD << DiagDecl;
S.Note(DiagDecl->getLocation(), diag::note_declared_at);
}
} else {
S.FFDiag(Loc, diag::note_invalid_subexpr_in_const_expr);
}
return false;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rdx, %rdi
callq 0xeff9d4
testb %al, %al
je 0xf089c8
movq %rbx, %rdi
callq 0xf1ab82
testb $0x40, 0x1(%rax)
jne 0xf089c8
movq 0xc0(%rbx), %rdi
movq %r15, %rsi
callq 0xf13ebc
xorl %r12d, %r12d
movq %rbx, %rdi
movl %eax, %esi
movl $0x8f9, %edx # imm = 0x8F9
xorl %ecx, %ecx
callq 0xf1a820
jmp 0xf08ba5
movq %r14, %rdi
callq 0xe98d26
testb %al, %al
je 0xf08a00
cmpb $0x1, 0x1fc(%r14)
jne 0xf08a00
movq 0x10(%r14), %rdi
movzwl 0x53(%rdi), %eax
movb $0x1, %r12b
testw $0x180, %ax # imm = 0x180
jne 0xf08ba5
callq 0x85ed26
testb %al, %al
jne 0xf08ba5
movq %r14, %rdi
callq 0xe999d0
movb $0x1, %r12b
testb %al, %al
jne 0xf08ba5
movq 0xc0(%rbx), %rdi
movq %r15, %rsi
callq 0xf13ebc
movl %eax, %ebp
movq %rbx, %rdi
callq 0xf1ab82
testb $0x8, 0x1(%rax)
jne 0xf08a49
pushq $0x6e
popq %rdx
xorl %r12d, %r12d
movq %rbx, %rdi
movl %ebp, %esi
xorl %ecx, %ecx
callq 0xf1a640
jmp 0xf08ba5
movq 0x10(%r14), %r14
movq %r14, 0x10(%rsp)
movl 0x1c(%r14), %r15d
testb %r15b, %r15b
js 0xf08ba2
andl $0x7f, %r15d
cmpl $0x23, %r15d
jne 0xf08adc
movabsq $0x2000000000000000, %r13 # imm = 0x2000000000000000
testb $0x20, 0x57(%r14)
je 0xf08a94
movq %r14, %rdi
callq 0x743602
movzwl 0x53(%rdx), %eax
testw $0x180, %ax # imm = 0x180
jne 0xf08a94
movq %rdx, 0x10(%rsp)
movq %rdx, %r14
movq 0x50(%r14), %r12
testq %r13, %r12
je 0xf08ae1
pushq $0x1
popq %rcx
movq %rbx, %rdi
movl %ebp, %esi
movl $0x8a9, %edx # imm = 0x8A9
callq 0xf1a640
leaq 0x20(%rsp), %r15
movq %rax, (%r15)
movq %r14, %rdi
callq 0x743602
movq %rdx, %rdi
callq 0x6363bc
leaq 0x18(%rsp), %rsi
movq %rax, (%rsi)
movq %r15, %rdi
callq 0xe6435c
jmp 0xf08b93
movzwl 0x50(%r14), %r12d
movq %r14, %rdi
callq 0x788658
testb %al, %al
jne 0xf08b19
andl $0xe000, %r12d # imm = 0xE000
cmpw $0x2000, %r12w # imm = 0x2000
je 0xf08b19
movzwl 0x53(%r14), %eax
testw $0x180, %ax # imm = 0x180
je 0xf08b19
movq 0x18(%rbx), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
testb %al, %al
jne 0xf08ba2
movq %r14, %rdi
callq 0x788658
testb %al, %al
je 0xf08b3d
movzwl 0x53(%r14), %eax
testw $0x180, %ax # imm = 0x180
je 0xf08b3d
movq (%r14), %rax
movq %r14, %rdi
callq *0x48(%rax)
testb %al, %al
jne 0xf08ba2
pushq $0x1
popq %rcx
movq %rbx, %rdi
movl %ebp, %esi
movl $0x8a8, %edx # imm = 0x8A8
callq 0xf1a640
leaq 0x20(%rsp), %rdi
movq %rax, (%rdi)
testl $0x18000, 0x52(%r14) # imm = 0x18000
leaq 0x18(%rsp), %rsi
setne (%rsi)
callq 0xe5f8ec
cmpl $0x23, %r15d
leaq 0xf(%rsp), %rsi
sete (%rsi)
movq %rax, %rdi
callq 0xe5f8ec
leaq 0x10(%rsp), %r14
movq %rax, %rdi
movq %r14, %rsi
callq 0xe64372
movq (%r14), %r14
movl 0x18(%r14), %esi
pushq $0x69
popq %rdx
movq %rbx, %rdi
callq 0xf1a8d2
xorl %r12d, %r12d
movl %r12d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/AST/Interp/Interp.cpp
|
void clang::interp::InterpStack::discard<clang::interp::IntegralAP<false>>()
|
void discard() {
#ifndef NDEBUG
assert(!ItemTypes.empty());
assert(ItemTypes.back() == toPrimType<T>());
ItemTypes.pop_back();
#endif
T *Ptr = &peekInternal<T>();
Ptr->~T();
shrink(aligned_size<T>());
}
|
pushq %rbx
movq %rdi, %rbx
callq 0xed73c0
movq %rax, %rdi
callq 0x468360
pushq $0x10
popq %rsi
movq %rbx, %rdi
popq %rbx
jmp 0xf144b2
nop
|
/AST/Interp/InterpStack.h
|
clang::interp::Floating::bitcastFromMemory(std::byte const*, llvm::fltSemantics const&)
|
static Floating bitcastFromMemory(const std::byte *Buff,
const llvm::fltSemantics &Sem) {
size_t Size = APFloat::semanticsSizeInBits(Sem);
llvm::APInt API(Size, true);
llvm::LoadIntFromMemory(API, (const uint8_t *)Buff, Size / 8);
return Floating(APFloat(Sem, API));
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq %rdx, %rdi
callq 0x489202
movl %eax, %ebp
movq %rsp, %r14
pushq $0x1
popq %rdx
movq %r14, %rdi
movl %eax, %esi
xorl %ecx, %ecx
callq 0x468308
shrl $0x3, %ebp
movq %r14, %rdi
movq %r12, %rsi
movl %ebp, %edx
callq 0x49574c
leaq 0x18(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x491964
movq %rbx, %rdi
addq $0x8, %rdi
movq %r12, %rsi
callq 0x491982
movq %r12, %rdi
callq 0x468578
movq %r14, %rdi
callq 0x468360
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
|
/AST/Interp/Floating.h
|
llvm::detail::DenseMapPair<clang::RecordDecl const*, clang::interp::Record*>* llvm::DenseMapBase<llvm::DenseMap<clang::RecordDecl const*, clang::interp::Record*, llvm::DenseMapInfo<clang::RecordDecl const*, void>, llvm::detail::DenseMapPair<clang::RecordDecl const*, clang::interp::Record*>>, clang::RecordDecl const*, clang::interp::Record*, llvm::DenseMapInfo<clang::RecordDecl const*, void>, llvm::detail::DenseMapPair<clang::RecordDecl const*, clang::interp::Record*>>::InsertIntoBucketImpl<clang::RecordDecl const*>(clang::RecordDecl const* const&, clang::RecordDecl const* const&, llvm::detail::DenseMapPair<clang::RecordDecl const*, clang::interp::Record*>*)
|
BucketT *InsertIntoBucketImpl(const KeyT &Key, const LookupKeyT &Lookup,
BucketT *TheBucket) {
incrementEpoch();
// If the load of the hash table is more than 3/4, or if fewer than 1/8 of
// the buckets are empty (meaning that many are filled with tombstones),
// grow the table.
//
// The later case is tricky. For example, if we had one empty bucket with
// tons of tombstones, failing lookups (e.g. for insertion) would have to
// probe almost the entire table until it found the empty bucket. If the
// table completely filled with tombstones, no lookup would ever succeed,
// causing infinite loops in lookup.
unsigned NewNumEntries = getNumEntries() + 1;
unsigned NumBuckets = getNumBuckets();
if (LLVM_UNLIKELY(NewNumEntries * 4 >= NumBuckets * 3)) {
this->grow(NumBuckets * 2);
LookupBucketFor(Lookup, TheBucket);
NumBuckets = getNumBuckets();
} else if (LLVM_UNLIKELY(NumBuckets-(NewNumEntries+getNumTombstones()) <=
NumBuckets/8)) {
this->grow(NumBuckets);
LookupBucketFor(Lookup, TheBucket);
}
assert(TheBucket);
// Only update the state after we've grown our bucket space appropriately
// so that when growing buckets we have self-consistent entry count.
incrementNumEntries();
// If we are writing over a tombstone, remember this.
const KeyT EmptyKey = getEmptyKey();
if (!KeyInfoT::isEqual(TheBucket->getFirst(), EmptyKey))
decrementNumTombstones();
return TheBucket;
}
|
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
movq %rcx, (%rsp)
movl 0x8(%rdi), %eax
movl 0x10(%rdi), %esi
leal 0x4(,%rax,4), %ecx
leal (%rsi,%rsi,2), %edx
cmpl %edx, %ecx
jae 0xf194e3
notl %eax
addl %esi, %eax
subl 0xc(%rbx), %eax
movl %esi, %ecx
shrl $0x3, %ecx
cmpl %ecx, %eax
jbe 0xf194e5
incl 0x8(%rbx)
movq (%rsp), %rax
cmpq $-0x1000, (%rax) # imm = 0xF000
je 0xf194db
decl 0xc(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
addl %esi, %esi
movq %rbx, %rdi
callq 0xf194fe
movq %rsp, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xf19362
jmp 0xf194c8
nop
|
/llvm/ADT/DenseMap.h
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.