name
string | code
string | asm
string | file
string |
|---|---|---|---|
llvm::ModuloScheduleExpander::updateMemOperands(llvm::MachineInstr&, llvm::MachineInstr&, unsigned int)
|
void ModuloScheduleExpander::updateMemOperands(MachineInstr &NewMI,
MachineInstr &OldMI,
unsigned Num) {
if (Num == 0)
return;
// If the instruction has memory operands, then adjust the offset
// when the instruction appears in different stages.
if (NewMI.memoperands_empty())
return;
SmallVector<MachineMemOperand *, 2> NewMMOs;
for (MachineMemOperand *MMO : NewMI.memoperands()) {
// TODO: Figure out whether isAtomic is really necessary (see D57601).
if (MMO->isVolatile() || MMO->isAtomic() ||
(MMO->isInvariant() && MMO->isDereferenceable()) ||
(!MMO->getValue())) {
NewMMOs.push_back(MMO);
continue;
}
unsigned Delta;
if (Num != UINT_MAX && computeDelta(OldMI, Delta)) {
int64_t AdjOffset = Delta * Num;
NewMMOs.push_back(
MF.getMachineMemOperand(MMO, AdjOffset, MMO->getSize()));
} else {
NewMMOs.push_back(MF.getMachineMemOperand(
MMO, 0, LocationSize::beforeOrAfterPointer()));
}
}
NewMI.setMemRefs(MF, NewMMOs);
}
|
testl %ecx, %ecx
je 0x1db8d59
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %ecx, %ebp
movq 0x30(%rsi), %rcx
cmpq $0x8, %rcx
jb 0x1db8d4b
leaq 0x30(%rsi), %rax
movq %rcx, %r8
andq $0x7, %r8
je 0x1db8bb2
cmpl $0x3, %r8d
setne %r8b
andq $-0x8, %rcx
sete %r9b
orb %r8b, %r9b
jne 0x1db8d4b
cmpl $0x0, (%rcx)
jne 0x1db8bb5
jmp 0x1db8d4b
movq %rcx, (%rax)
movq %rdi, 0x8(%rsp)
movq %rdx, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
leaq 0x38(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movabsq $0x200000000, %rcx # imm = 0x200000000
movq %rcx, -0x8(%rdx)
movq (%rax), %rcx
xorl %r15d, %r15d
movl $0x0, %ebx
cmpq $0x8, %rcx
jb 0x1db8c25
movq %rcx, %rdx
andq $0x7, %rdx
je 0x1db8c1a
cmpl $0x3, %edx
setne %al
andq $-0x8, %rcx
sete %dl
xorl %r15d, %r15d
orb %al, %dl
movl $0x0, %ebx
jne 0x1db8c25
movslq (%rcx), %rbx
addq $0x10, %rcx
movq %rcx, %r15
jmp 0x1db8c25
movq %rcx, (%rax)
movl $0x1, %ebx
movq %rax, %r15
testq %rbx, %rbx
je 0x1db8d1b
shlq $0x3, %rbx
xorl %r14d, %r14d
leaq 0x28(%rsp), %r12
movl %ebp, (%rsp)
movq (%r15,%r14), %r13
movzwl 0x20(%r13), %eax
testb $0x4, %al
jne 0x1db8c70
notl %eax
testb $0x30, %al
je 0x1db8c70
movzwl 0x24(%r13), %eax
andl $0xf00, %eax # imm = 0xF00
jne 0x1db8c70
movq (%r13), %rax
testb $0x4, %al
sete %cl
cmpq $0x8, %rax
setae %al
testb %cl, %al
jne 0x1db8c89
movq %r12, %rdi
movq %r13, %rsi
callq 0xb5d49a
addq $0x8, %r14
cmpq %r14, %rbx
jne 0x1db8c3d
jmp 0x1db8d1b
cmpl $-0x1, %ebp
movq 0x8(%rsp), %rbp
je 0x1db8ce9
movq %rbp, %rdi
movq 0x20(%rsp), %rsi
leaq 0x4(%rsp), %rdx
callq 0x1db8a3e
testb %al, %al
je 0x1db8ce9
movl 0x4(%rsp), %edx
imull (%rsp), %edx
movq 0x8(%rbp), %rbp
testq $-0x7, 0x18(%r13)
je 0x1db8cfb
leaq 0x18(%r13), %rdi
movq %rdx, 0x10(%rsp)
callq 0x94022c
addq $0x7, %rax
shrq $0x3, %rax
movzbl %dl, %ecx
movq 0x10(%rsp), %rdx
andl $0x1, %ecx
shlq $0x3e, %rcx
orq %rax, %rcx
jmp 0x1db8d02
movq 0x8(%rbp), %rdi
movq %r13, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x1d34a8a
jmp 0x1db8d0d
movq $-0x1, %rcx
movq %rbp, %rdi
movq %r13, %rsi
callq 0xbb1e08
movl (%rsp), %ebp
movq %r12, %rdi
movq %rax, %rsi
jmp 0x1db8c76
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rsi
movq 0x28(%rsp), %rdx
movl 0x30(%rsp), %ecx
movq 0x18(%rsp), %rdi
callq 0x1d3cb36
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x1db8d4b
callq 0x780910
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/CodeGen/ModuloSchedule.cpp
|
void llvm::yaml::IO::processKey<llvm::MachineJumpTableInfo::JTEntryKind, llvm::yaml::EmptyContext>(char const*, llvm::MachineJumpTableInfo::JTEntryKind&, bool, llvm::yaml::EmptyContext&)
|
void processKey(const char *Key, T &Val, bool Required, Context &Ctx) {
void *SaveInfo;
bool UseDefault;
if ( this->preflightKey(Key, Required, false, UseDefault, SaveInfo) ) {
yamlize(*this, Val, Required, Ctx);
this->postflightKey(SaveInfo);
}
}
|
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rdi, %rbx
movq (%rdi), %rax
leaq 0xf(%rsp), %r8
leaq 0x10(%rsp), %r9
movl %ecx, %edx
xorl %ecx, %ecx
callq *0x78(%rax)
testb %al, %al
je 0x1dcef1b
movq (%rbx), %rax
movq %rbx, %rdi
callq *0xa0(%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1dcef24
movq (%rbx), %rax
movq %rbx, %rdi
callq *0xb8(%rax)
movq 0x10(%rsp), %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x80(%rax)
addq $0x18, %rsp
popq %rbx
popq %r14
retq
nop
|
/llvm/Support/YAMLTraits.h
|
llvm::PrintMIRPass::run(llvm::MachineFunction&, llvm::AnalysisManager<llvm::MachineFunction>&)
|
PreservedAnalyses PrintMIRPass::run(MachineFunction &MF,
MachineFunctionAnalysisManager &) {
printMIR(OS, MF);
return PreservedAnalyses::all();
}
|
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq (%rsi), %rdi
movq %rdx, %rsi
callq 0x1dc63ef
leaq 0x20(%rbx), %rax
movq %rax, (%rbx)
movq %rax, 0x8(%rbx)
movl $0x2, %eax
movq %rax, 0x10(%rbx)
xorl %ecx, %ecx
movl %ecx, 0x18(%rbx)
leaq 0x50(%rbx), %rdx
movq %rdx, 0x30(%rbx)
movq %rdx, 0x38(%rbx)
movq %rax, 0x40(%rbx)
movl %ecx, 0x48(%rbx)
leaq 0x3bd417e(%rip), %rdx # 0x59a68b8
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0xade436
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
retq
|
/CodeGen/MIRPrintingPass.cpp
|
llvm::DenseMapBase<llvm::DenseMap<llvm::MachineInstr*, unsigned int, llvm::MachineInstrExpressionTrait, llvm::detail::DenseMapPair<llvm::MachineInstr*, unsigned int>>, llvm::MachineInstr*, unsigned int, llvm::MachineInstrExpressionTrait, llvm::detail::DenseMapPair<llvm::MachineInstr*, unsigned int>>::destroyAll()
|
unsigned getNumBuckets() const {
return NumBuckets;
}
|
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl 0x10(%rdi), %r12d
testq %r12, %r12
je 0x1dda25b
leaq 0x10(%rsp), %rbx
movq $0x0, (%rbx)
leaq 0x8(%rsp), %r14
movq $-0x1, (%r14)
movq (%rdi), %r15
shlq $0x4, %r12
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1d1d97c
testb %al, %al
jne 0x1dda251
movq %r15, %rdi
movq %r14, %rsi
callq 0x1d1d97c
addq $0x10, %r15
addq $-0x10, %r12
jne 0x1dda237
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
/llvm/ADT/DenseMap.h
|
llvm::DenseMap<std::pair<unsigned int, llvm::Register>, unsigned int, llvm::DenseMapInfo<std::pair<unsigned int, llvm::Register>, void>, llvm::detail::DenseMapPair<std::pair<unsigned int, llvm::Register>, unsigned int>>::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, %rbx
movl 0x10(%rdi), %r15d
decl %esi
movl %esi, %eax
shrl %eax
orl %esi, %eax
movl %eax, %ecx
shrl $0x2, %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x4, %eax
orl %ecx, %eax
movl %eax, %ecx
shrl $0x8, %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x10, %eax
orl %ecx, %eax
incl %eax
cmpl $0x41, %eax
movl $0x40, %ecx
cmovael %eax, %ecx
movq (%rdi), %r14
movl %ecx, 0x10(%rdi)
shlq $0x2, %rcx
leaq (%rcx,%rcx,2), %rdi
movl $0x4, %esi
callq 0x2b410ec
movq %rax, (%rbx)
testq %r14, %r14
je 0x1ddab37
shlq $0x2, %r15
leaq (%r15,%r15,2), %r15
leaq (%r14,%r15), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1ddac0a
movl $0x4, %edx
movq %r14, %rdi
movq %r15, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x2b410f1
movq %rax, %rcx
movq $0x0, 0x8(%rbx)
movl 0x10(%rbx), %eax
testq %rax, %rax
je 0x1ddac03
leaq (%rax,%rax,2), %rax
leaq -0xc(,%rax,4), %rax
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
mulq %rdx
movq %rdx, %xmm0
shrq $0x3, %rdx
addq $0x2, %rdx
andq $-0x2, %rdx
pshufd $0x44, %xmm0, %xmm0 # xmm0 = xmm0[0,1,0,1]
psrlq $0x3, %xmm0
xorl %eax, %eax
movdqa 0xdda494(%rip), %xmm1 # 0x2bb5020
movdqa 0xdda49c(%rip), %xmm2 # 0x2bb5030
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movq %rax, %xmm4
pshufd $0x44, %xmm4, %xmm4 # xmm4 = xmm4[0,1,0,1]
por %xmm1, %xmm4
pxor %xmm2, %xmm4
movdqa %xmm4, %xmm5
pcmpgtd %xmm0, %xmm5
pcmpeqd %xmm0, %xmm4
pshufd $0xf5, %xmm4, %xmm6 # xmm6 = xmm4[1,1,3,3]
pand %xmm5, %xmm6
pshufd $0xf5, %xmm5, %xmm4 # xmm4 = xmm5[1,1,3,3]
por %xmm6, %xmm4
movd %xmm4, %esi
notl %esi
testb $0x1, %sil
je 0x1ddabdf
movq $-0x1, (%rcx)
pxor %xmm3, %xmm4
pextrw $0x4, %xmm4, %esi
testb $0x1, %sil
je 0x1ddabf6
movq $-0x1, 0xc(%rcx)
addq $0x2, %rax
addq $0x18, %rcx
cmpq %rax, %rdx
jne 0x1ddab9c
popq %rbx
popq %r14
popq %r15
retq
nop
|
/llvm/ADT/DenseMap.h
|
bool llvm::DenseMapBase<llvm::SmallDenseMap<llvm::MachineBasicBlock*, llvm::SmallVector<llvm::MachineInstr*, 4u>, 4u, llvm::DenseMapInfo<llvm::MachineBasicBlock*, void>, llvm::detail::DenseMapPair<llvm::MachineBasicBlock*, llvm::SmallVector<llvm::MachineInstr*, 4u>>>, llvm::MachineBasicBlock*, llvm::SmallVector<llvm::MachineInstr*, 4u>, llvm::DenseMapInfo<llvm::MachineBasicBlock*, void>, llvm::detail::DenseMapPair<llvm::MachineBasicBlock*, llvm::SmallVector<llvm::MachineInstr*, 4u>>>::LookupBucketFor<llvm::MachineBasicBlock*>(llvm::MachineBasicBlock* const&, llvm::detail::DenseMapPair<llvm::MachineBasicBlock*, llvm::SmallVector<llvm::MachineInstr*, 4u>> const*&) const
|
const BucketT *getBuckets() const {
return Small ? getInlineBuckets() : getLargeRep()->Buckets;
}
|
leaq 0x8(%rdi), %rcx
testb $0x1, (%rdi)
cmoveq 0x8(%rdi), %rcx
movl $0x4, %r8d
cmovel 0x10(%rdi), %r8d
testl %r8d, %r8d
je 0x1de285c
pushq %rbx
movl (%rsi), %edi
movl %edi, %eax
shrl $0x4, %eax
shrl $0x9, %edi
xorl %eax, %edi
decl %r8d
andl %r8d, %edi
movl $0x1, %r10d
xorl %r9d, %r9d
movl %edi, %r11d
imulq $0x38, %r11, %rbx
leaq (%rcx,%rbx), %r11
movq (%rcx,%rbx), %rbx
cmpq %rbx, (%rsi)
jne 0x1de2823
movq %r11, (%rdx)
movb $0x1, %al
xorl %r11d, %r11d
testb %r11b, %r11b
jne 0x1de2800
jmp 0x1de2859
cmpq $-0x1000, %rbx # imm = 0xF000
jne 0x1de283d
testq %r9, %r9
cmovneq %r9, %r11
movq %r11, (%rdx)
xorl %r11d, %r11d
xorl %eax, %eax
jmp 0x1de281c
xorq $-0x2000, %rbx # imm = 0xE000
orq %r9, %rbx
cmoveq %r11, %r9
addl %r10d, %edi
incl %r10d
andl %r8d, %edi
movb $0x1, %r11b
jmp 0x1de281c
popq %rbx
jmp 0x1de2865
movq $0x0, (%rdx)
xorl %eax, %eax
andb $0x1, %al
retq
|
/llvm/ADT/DenseMap.h
|
bool llvm::any_of<llvm::SmallVector<llvm::MachineMemOperand const*, 2u>&, llvm::RAGreedy::computeStats(llvm::MachineBasicBlock&)::$_0>(llvm::SmallVector<llvm::MachineMemOperand const*, 2u>&, llvm::RAGreedy::computeStats(llvm::MachineBasicBlock&)::$_0)
|
iterator end() { return begin() + size(); }
|
movq (%rdi), %rdx
movl 0x8(%rdi), %ecx
leaq (%rdx,%rcx,8), %rax
cmpq $0x4, %rcx
jae 0x1e0c18d
movq %rax, %rdi
subq %rdx, %rdi
sarq $0x3, %rdi
cmpq $0x1, %rdi
je 0x1e0c283
cmpq $0x2, %rdi
je 0x1e0c154
movq %rax, %rcx
cmpq $0x3, %rdi
jne 0x1e0c2c8
movq (%rdx), %rcx
movq (%rcx), %rcx
movq %rcx, %rdi
shlq $0x3d, %rdi
sarq $0x3f, %rdi
andq %rcx, %rdi
andq $-0x8, %rdi
movl 0x20(%rsi), %ecx
addl 0x10(%rdi), %ecx
movq 0x8(%rsi), %rdi
leaq (%rcx,%rcx,4), %rcx
cmpb $0x0, 0x12(%rdi,%rcx,8)
jne 0x1e0c185
addq $0x8, %rdx
movq (%rdx), %rcx
movq (%rcx), %rcx
movq %rcx, %rdi
shlq $0x3d, %rdi
sarq $0x3f, %rdi
andq %rcx, %rdi
andq $-0x8, %rdi
movl 0x20(%rsi), %ecx
addl 0x10(%rdi), %ecx
movq 0x8(%rsi), %rdi
leaq (%rcx,%rcx,4), %rcx
cmpb $0x0, 0x12(%rdi,%rcx,8)
je 0x1e0c27f
movq %rdx, %rcx
jmp 0x1e0c2c8
movl %ecx, %edi
shrl $0x2, %edi
movl 0x20(%rsi), %r8d
movq 0x8(%rsi), %r9
andl $-0x4, %ecx
leaq (%rdx,%rcx,8), %r10
incq %rdi
addq $0x10, %rdx
movq %rdx, %rcx
movq -0x10(%rcx), %rdx
movq (%rdx), %rdx
movq %rdx, %r11
shlq $0x3d, %r11
sarq $0x3f, %r11
andq %rdx, %r11
andq $-0x8, %r11
movl 0x10(%r11), %edx
addl %r8d, %edx
leaq (%rdx,%rdx,4), %rdx
cmpb $0x0, 0x12(%r9,%rdx,8)
jne 0x1e0c2b8
movq -0x8(%rcx), %rdx
movq (%rdx), %rdx
movq %rdx, %r11
shlq $0x3d, %r11
sarq $0x3f, %r11
andq %rdx, %r11
andq $-0x8, %r11
movl 0x10(%r11), %edx
addl %r8d, %edx
leaq (%rdx,%rdx,4), %rdx
cmpb $0x0, 0x12(%r9,%rdx,8)
jne 0x1e0c2be
movq (%rcx), %rdx
movq (%rdx), %rdx
movq %rdx, %r11
shlq $0x3d, %r11
sarq $0x3f, %r11
andq %rdx, %r11
andq $-0x8, %r11
movl 0x10(%r11), %edx
addl %r8d, %edx
leaq (%rdx,%rdx,4), %rdx
cmpb $0x0, 0x12(%r9,%rdx,8)
jne 0x1e0c2c8
movq 0x8(%rcx), %rdx
movq (%rdx), %rdx
movq %rdx, %r11
shlq $0x3d, %r11
sarq $0x3f, %r11
andq %rdx, %r11
andq $-0x8, %r11
movl 0x10(%r11), %edx
addl %r8d, %edx
leaq (%rdx,%rdx,4), %rdx
cmpb $0x0, 0x12(%r9,%rdx,8)
jne 0x1e0c2c4
decq %rdi
addq $0x20, %rcx
cmpq $0x1, %rdi
jg 0x1e0c1ab
movq %r10, %rdx
jmp 0x1e0c0fc
addq $0x8, %rdx
movq (%rdx), %rcx
movq (%rcx), %rcx
movq %rcx, %rdi
shlq $0x3d, %rdi
sarq $0x3f, %rdi
andq %rcx, %rdi
andq $-0x8, %rdi
movl 0x20(%rsi), %ecx
addl 0x10(%rdi), %ecx
movq 0x8(%rsi), %rsi
leaq (%rcx,%rcx,4), %rcx
cmpb $0x0, 0x12(%rsi,%rcx,8)
movq %rdx, %rcx
jne 0x1e0c2c8
movq %rax, %rcx
jmp 0x1e0c2c8
addq $-0x10, %rcx
jmp 0x1e0c2c8
addq $-0x8, %rcx
jmp 0x1e0c2c8
addq $0x8, %rcx
cmpq %rax, %rcx
setne %al
retq
nop
|
/llvm/ADT/SmallVector.h
|
void llvm::SmallVectorImpl<std::pair<llvm::LiveInterval const*, llvm::MCRegister>>::resizeImpl<false>(unsigned long)
|
size_t size() const { return Size; }
|
movl 0x8(%rdi), %eax
cmpq %rsi, %rax
je 0x1e0f5b4
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
ja 0x1e0f5a9
movl 0xc(%r14), %eax
cmpq %rbx, %rax
jae 0x1e0f575
leaq 0x10(%r14), %rsi
movl $0x10, %ecx
movq %r14, %rdi
movq %rbx, %rdx
callq 0x2b4ed86
movl 0x8(%r14), %eax
cmpq %rbx, %rax
je 0x1e0f5a9
movq (%r14), %rdx
movq %rbx, %rcx
shlq $0x4, %rcx
addq %rdx, %rcx
shlq $0x4, %rax
addq %rdx, %rax
movq $0x0, (%rax)
movl $0x0, 0x8(%rax)
addq $0x10, %rax
cmpq %rcx, %rax
jne 0x1e0f592
movl %ebx, 0x8(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
|
/llvm/ADT/SmallVector.h
|
llvm::Pass* llvm::callDefaultCtor<(anonymous namespace)::RenameIndependentSubregs, true>()
|
Pass *callDefaultCtor() {
return new PassName();
}
|
pushq %rax
movl $0x50, %edi
callq 0x7808d0
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
leaq 0x3b2fcce(%rip), %rdx # 0x5957195
movq %rdx, 0x10(%rax)
movl $0x2, 0x18(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rax)
movq %rcx, 0x30(%rax)
leaq 0x3a68774(%rip), %rdx # 0x588fc58
movq %rdx, (%rax)
movups %xmm0, 0x38(%rax)
movq %rcx, 0x48(%rax)
popq %rcx
retq
nop
|
/llvm/PassSupport.h
|
runImpl(llvm::TargetLibraryInfo const&, llvm::Function&)
|
static bool runImpl(const TargetLibraryInfo &TLI, Function &F) {
SmallVector<Instruction *> ReplacedCalls;
for (auto &I : instructions(F)) {
// Process only intrinsic calls that return void or a vector.
if (auto *II = dyn_cast<IntrinsicInst>(&I)) {
if (!II->getType()->isVectorTy() && !II->getType()->isVoidTy())
continue;
if (replaceWithCallToVeclib(TLI, II))
ReplacedCalls.push_back(&I);
}
}
// Erase any intrinsic calls that were replaced with vector library calls.
for (auto *I : ReplacedCalls)
I->eraseFromParent();
return !ReplacedCalls.empty();
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x358, %rsp # imm = 0x358
movq %rsi, %rbx
movq %rdi, 0x28(%rsp)
leaq 0x140(%rsp), %rax
movq %rax, -0x10(%rax)
movabsq $0x600000000, %rcx # imm = 0x600000000
movq %rcx, -0x8(%rax)
movq 0x50(%rsi), %r15
addq $0x48, %rbx
cmpq %rbx, %r15
je 0x1e28912
leaq -0x18(%r15), %rax
testq %r15, %r15
cmoveq %r15, %rax
movq 0x38(%rax), %r14
addq $0x30, %rax
cmpq %rax, %r14
jne 0x1e28915
movq 0x8(%r15), %r15
cmpq %rbx, %r15
jne 0x1e288ef
jmp 0x1e28915
xorl %r14d, %r14d
cmpq %rbx, %r15
je 0x1e29010
leaq 0xf0(%rsp), %r12
movq %rbx, 0x50(%rsp)
leaq -0x18(%r14), %r13
testq %r14, %r14
cmoveq %r14, %r13
cmpb $0x55, (%r13)
jne 0x1e28952
movq %r13, %rdi
callq 0x91f89e
testb %al, %al
movl $0x0, %edi
cmovneq %r13, %rdi
jmp 0x1e28954
xorl %edi, %edi
testq %rdi, %rdi
je 0x1e28fd5
movq 0x8(%rdi), %rcx
movl 0x8(%rcx), %edx
movzbl %dl, %eax
andl $0xfe, %edx
cmpl $0x12, %edx
setne %sil
cmpl $0x7, %eax
setne %r8b
testb %r8b, %sil
jne 0x1e28fd5
cmpl $0x12, %edx
setne %dl
testq %rcx, %rcx
sete %sil
orb %dl, %sil
movq %r14, 0x60(%rsp)
je 0x1e2899f
xorl %eax, %eax
jmp 0x1e289bc
movl 0x20(%rcx), %ecx
notl %eax
testb $0x13, %al
movl $0x0, %eax
movabsq $0x100000000, %rdx # imm = 0x100000000
cmoveq %rdx, %rax
orq %rcx, %rax
movq %r13, 0x58(%rsp)
movl %eax, 0x18(%rsp)
shrq $0x20, %rax
movb %al, 0x1c(%rsp)
movq %r12, 0xe0(%rsp)
movabsq $0x800000000, %rax # imm = 0x800000000
movq %rax, 0xe8(%rsp)
movq -0x20(%rdi), %rax
movl 0x24(%rax), %ebp
movl 0x4(%rdi), %eax
shll $0x5, %eax
movq %rdi, %r12
subq %rax, %r12
movq %rdi, 0x20(%rsp)
callq 0x91f8d2
movq %rax, 0x68(%rsp)
cmpq %rax, %r12
je 0x1e28ad3
xorl %r13d, %r13d
movq (%r12), %rax
movq 0x8(%rax), %rbx
movl %ebp, %r14d
movl %ebp, %edi
movl %r13d, %esi
callq 0x27111ba
testb %al, %al
je 0x1e28a40
leaq 0xe0(%rsp), %rdi
movq %rbx, %rsi
callq 0x921ed0
jmp 0x1e28abe
movl 0x8(%rbx), %eax
movl $0xfe, %ecx
andl %ecx, %eax
xorl %ebp, %ebp
cmpl $0x12, %eax
jne 0x1e28f9a
testq %rbx, %rbx
je 0x1e28f9a
movq 0x18(%rbx), %rsi
leaq 0xe0(%rsp), %rdi
callq 0x921ed0
movl 0x18(%rsp), %ecx
movl 0x20(%rbx), %eax
movzbl 0x8(%rbx), %edx
testl %ecx, %ecx
je 0x1e28a99
cmpl $0x13, %edx
sete %dl
xorl %ebp, %ebp
cmpl %eax, %ecx
jne 0x1e28f9a
cmpb %dl, 0x1c(%rsp)
je 0x1e28abe
jmp 0x1e28f9a
cmpl $0x13, %edx
movl $0x0, %ecx
movabsq $0x100000000, %rdx # imm = 0x100000000
cmoveq %rdx, %rcx
orq %rcx, %rax
shrq $0x20, %rcx
movb %cl, 0x1c(%rsp)
movl %eax, 0x18(%rsp)
addq $0x20, %r12
incl %r13d
cmpq 0x68(%rsp), %r12
movl %r14d, %ebp
jne 0x1e28a15
movl %ebp, %edi
callq 0x2a412aa
testb %al, %al
je 0x1e28b1f
movq 0xe0(%rsp), %rbx
movl 0xe8(%rsp), %r14d
movq 0x20(%rsp), %r13
movq %r13, %rdi
callq 0x2a51276
leaq 0x30(%rsp), %rdi
movl %ebp, %esi
movq %rbx, %rdx
movq %r14, %rcx
movq %rax, %r8
xorl %r9d, %r9d
callq 0x2a41356
movq 0x28(%rsp), %rbx
leaq 0x18(%rsp), %r14
jmp 0x1e28b6e
movl %ebp, %edi
callq 0x2a4132f
testq %rax, %rax
leaq 0x18(%rsp), %r14
movq 0x20(%rsp), %r13
je 0x1e28b51
leaq 0x40(%rsp), %rcx
movq %rcx, 0x30(%rsp)
addq %rax, %rdx
leaq 0x30(%rsp), %rdi
movq %rax, %rsi
callq 0x7fa87c
jmp 0x1e28b69
leaq 0x40(%rsp), %rax
movq %rax, 0x30(%rsp)
movq $0x0, 0x38(%rsp)
movb $0x0, 0x40(%rsp)
movq 0x28(%rsp), %rbx
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq (%rbx), %rdi
movq %r14, %rcx
xorl %r8d, %r8d
callq 0x26e0680
testq %rax, %rax
jne 0x1e28baf
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq (%rbx), %rdi
movq %r14, %rcx
movl $0x1, %r8d
callq 0x26e0680
testq %rax, %rax
je 0x1e28cdd
movq %rax, %r12
movq 0x8(%r13), %rdi
movl 0x8(%rdi), %eax
movl $0xfe, %ecx
andl %ecx, %eax
cmpl $0x12, %eax
jne 0x1e28bcc
movq 0x10(%rdi), %rax
movq (%rax), %rdi
movq 0xe0(%rsp), %rsi
movl 0xe8(%rsp), %edx
xorl %ebp, %ebp
xorl %ecx, %ecx
callq 0x2a9acee
movq %rax, %r14
leaq 0x70(%rsp), %rdi
movq %r12, %rsi
callq 0x26decb8
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
leaq 0x1e0(%rsp), %rdi
movq %r14, %rcx
callq 0x2ac35f8
cmpb $0x1, 0x2c0(%rsp)
jne 0x1e28f45
movl 0x1f0(%rsp), %eax
testq %rax, %rax
movq 0x20(%rsp), %r10
je 0x1e28c98
movq 0x1e8(%rsp), %rcx
shlq $0x4, %rax
xorl %edx, %edx
movl 0x4(%rcx,%rdx), %esi
movl $0x7, %edi
cmpl $0xa, %esi
je 0x1e28c86
movl (%rcx,%rdx), %edi
movl 0x4(%r10), %r8d
shll $0x5, %r8d
movq %r10, %r9
subq %r8, %r9
shlq $0x5, %rdi
movq (%r9,%rdi), %rdi
movq 0x8(%rdi), %rdi
movl 0x8(%rdi), %edi
movl $0xfe, %r8d
andl %r8d, %edi
cmpl $0x12, %edi
sete %dil
testl %esi, %esi
sete %sil
xorb %dil, %sil
movzbl %sil, %edi
cmpl $0x7, %edi
je 0x1e28c8f
testl %edi, %edi
jne 0x1e28ce4
addq $0x10, %rdx
cmpq %rdx, %rax
jne 0x1e28c3b
leaq 0x1e0(%rsp), %rdi
movq %r14, %rsi
callq 0x2ac434c
testq %rax, %rax
setne %bpl
je 0x1e28f45
movq %rax, %r14
movq 0x20(%rsp), %r13
movq %r13, %rdi
callq 0x2a51276
movq -0x20(%r13), %r8
testq %r8, %r8
je 0x1e28ceb
cmpb $0x0, (%r8)
movl $0x0, %ecx
cmovneq %rcx, %r8
jmp 0x1e28cee
xorl %ebp, %ebp
jmp 0x1e28f7e
xorl %ebp, %ebp
jmp 0x1e28f45
xorl %r8d, %r8d
movq 0x10(%r12), %rdx
movq 0x18(%r12), %rcx
testq %r8, %r8
je 0x1e28d07
movq 0x18(%r8), %rsi
cmpq 0x50(%r13), %rsi
je 0x1e28d0a
xorl %r8d, %r8d
movq %rax, %rdi
movq %r14, %rsi
callq 0x1e28728
movq %rax, %r12
leaq 0x2c8(%rsp), %rdi
movq %r13, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x92eb52
movl 0x4(%r13), %eax
shll $0x5, %eax
movq %r13, %rbx
subq %rax, %rbx
movq %r13, %rdi
callq 0x91f8d2
leaq 0xb0(%rsp), %rcx
movq %rcx, 0xa0(%rsp)
movabsq $0x600000000, %rcx # imm = 0x600000000
movq %rcx, 0xa8(%rsp)
leaq 0xa0(%rsp), %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0xc1b3ca
movl 0x1f0(%rsp), %eax
movl $0x0, %ebx
testq %rax, %rax
leaq 0x170(%rsp), %r14
je 0x1e28dc6
movq 0x1e8(%rsp), %rdx
addq $0x4, %rdx
xorl %ecx, %ecx
cmpl $0xa, (%rdx)
je 0x1e28db7
incq %rcx
addq $0x10, %rdx
cmpq %rcx, %rax
jne 0x1e28da0
movl %eax, %ecx
xorl %eax, %eax
jmp 0x1e28dc1
movabsq $0x100000000, %rax # imm = 0x100000000
movl %ecx, %ebx
orq %rax, %rbx
movabsq $0x100000000, %rax # imm = 0x100000000
testq %rax, %rbx
je 0x1e28e26
movq %r13, %rdi
callq 0x2a9f5fc
movq %rax, %rdi
callq 0x2a9aab6
movq 0x1e0(%rsp), %rsi
movq %rax, %rdi
callq 0x2a9b542
movl %ebx, %ebx
shlq $0x3, %rbx
addq 0xa0(%rsp), %rbx
movq %rax, %rdi
callq 0x29e1eb2
movq %rax, 0x170(%rsp)
leaq 0xa0(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0xecb68e
leaq 0x180(%rsp), %rax
movq %rax, 0x170(%rsp)
movabsq $0x100000000, %rax # imm = 0x100000000
movq %rax, 0x178(%rsp)
movq %r13, %rdi
movq %r14, %rsi
callq 0x2a55364
testq %r12, %r12
je 0x1e28e5f
movq 0x18(%r12), %rsi
jmp 0x1e28e61
xorl %esi, %esi
movq 0xa0(%rsp), %rcx
movl 0xa8(%rsp), %r8d
movq 0x170(%rsp), %rax
movl 0x178(%rsp), %edx
movw $0x101, 0x1d8(%rsp) # imm = 0x101
movq %rax, 0x90(%rsp)
movq %rdx, 0x98(%rsp)
movups 0x90(%rsp), %xmm0
movups %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
leaq 0x2c8(%rsp), %rdi
movq %r12, %rdx
leaq 0x1b8(%rsp), %r9
callq 0x99fcd0
movq %rax, %rbx
movq %r13, %rdi
movq %rax, %rsi
callq 0x2a9fd6e
movq %rbx, %rdi
callq 0x931f84
testb %al, %al
je 0x1e28eec
movq %rbx, %rdi
movq %r13, %rsi
callq 0x2a51e68
movq %r14, %rdi
callq 0x99fda6
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x1e28f0e
callq 0x780910
leaq 0x350(%rsp), %rdi
callq 0x2a4d93c
leaq 0x348(%rsp), %rdi
callq 0x2a4dd0c
movq 0x2c8(%rsp), %rdi
leaq 0x2d8(%rsp), %rax
cmpq %rax, %rdi
je 0x1e28f42
callq 0x780910
movb $0x1, %bpl
cmpb $0x1, 0x2c0(%rsp)
jne 0x1e28f5c
leaq 0x1e0(%rsp), %rdi
callq 0x18078da
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x1e28f7e
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x7800d0
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x1e28f9a
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x7800d0
movq 0xe0(%rsp), %rdi
leaq 0xf0(%rsp), %r12
cmpq %r12, %rdi
je 0x1e28fb4
callq 0x780910
testb %bpl, %bpl
movq 0x50(%rsp), %rbx
movq 0x60(%rsp), %r14
movq 0x58(%rsp), %rsi
je 0x1e28fd5
leaq 0x130(%rsp), %rdi
callq 0x931722
movq 0x8(%r14), %r14
leaq -0x18(%r15), %rax
testq %r15, %r15
cmoveq %r15, %rax
addq $0x30, %rax
cmpq %rax, %r14
jne 0x1e29007
movq 0x8(%r15), %r15
cmpq %rbx, %r15
je 0x1e29007
leaq -0x18(%r15), %rax
testq %r15, %r15
cmoveq %r15, %rax
movq 0x38(%rax), %r14
jmp 0x1e28fe4
cmpq %rbx, %r15
jne 0x1e2892b
movl 0x138(%rsp), %ebx
testq %rbx, %rbx
je 0x1e2903d
movq 0x130(%rsp), %r14
shlq $0x3, %rbx
xorl %r15d, %r15d
movq (%r14,%r15), %rdi
callq 0x2a512f8
addq $0x8, %r15
cmpq %r15, %rbx
jne 0x1e2902b
movl 0x138(%rsp), %ebx
movq 0x130(%rsp), %rdi
leaq 0x140(%rsp), %rax
cmpq %rax, %rdi
je 0x1e2905e
callq 0x780910
testl %ebx, %ebx
setne %al
addq $0x358, %rsp # imm = 0x358
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
|
/CodeGen/ReplaceWithVeclib.cpp
|
llvm::DenseMapBase<llvm::DenseMap<llvm::hash_code, std::unique_ptr<llvm::RegisterBankInfo::PartialMapping const, std::default_delete<llvm::RegisterBankInfo::PartialMapping const>>, llvm::DenseMapInfo<llvm::hash_code, void>, llvm::detail::DenseMapPair<llvm::hash_code, std::unique_ptr<llvm::RegisterBankInfo::PartialMapping const, std::default_delete<llvm::RegisterBankInfo::PartialMapping const>>>>, llvm::hash_code, std::unique_ptr<llvm::RegisterBankInfo::PartialMapping const, std::default_delete<llvm::RegisterBankInfo::PartialMapping const>>, llvm::DenseMapInfo<llvm::hash_code, void>, llvm::detail::DenseMapPair<llvm::hash_code, std::unique_ptr<llvm::RegisterBankInfo::PartialMapping const, std::default_delete<llvm::RegisterBankInfo::PartialMapping const>>>>::FindAndConstruct(llvm::hash_code const&)
|
value_type& FindAndConstruct(const KeyT &Key) {
BucketT *TheBucket;
if (LookupBucketFor(Key, TheBucket))
return *TheBucket;
return *InsertIntoBucket(TheBucket, Key);
}
|
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rsp), %r15
movq %r15, %rdx
callq 0x1e2b2f2
movl %eax, %ecx
movq (%r15), %rax
testb %cl, %cl
jne 0x1e2b3b8
movq %r14, %rdi
movq %rbx, %rsi
movq %rbx, %rdx
movq %rax, %rcx
callq 0x1e2b3c2
movq (%rbx), %rcx
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
|
/llvm/ADT/DenseMap.h
|
llvm::DenseMap<llvm::hash_code, std::unique_ptr<llvm::RegisterBankInfo::ValueMapping [], std::default_delete<llvm::RegisterBankInfo::ValueMapping []>>, llvm::DenseMapInfo<llvm::hash_code, void>, llvm::detail::DenseMapPair<llvm::hash_code, std::unique_ptr<llvm::RegisterBankInfo::ValueMapping [], std::default_delete<llvm::RegisterBankInfo::ValueMapping []>>>>::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), %eax
movl %eax, %ecx
shrl %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x2, %eax
orl %ecx, %eax
movl %eax, %ecx
shrl $0x4, %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x8, %eax
orl %ecx, %eax
movl %eax, %ecx
shrl $0x10, %ecx
orl %eax, %ecx
incl %ecx
cmpl $0x41, %ecx
movl $0x40, %edi
cmovael %ecx, %edi
movl %edi, 0x10(%r15)
shlq $0x4, %rdi
movl $0x8, %esi
callq 0x2b410ec
movq %rax, (%r15)
testq %r14, %r14
je 0x1e2bd16
shlq $0x4, %rbx
leaq (%r14,%rbx), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x1e2bdde
movl $0x8, %edx
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x2b410f1
movq $0x0, 0x8(%r15)
movl 0x10(%r15), %ecx
testq %rcx, %rcx
je 0x1e2bdd7
movabsq $0xfffffffffffffff, %rdx # imm = 0xFFFFFFFFFFFFFFF
addq %rdx, %rcx
andq %rcx, %rdx
andl $0x1, %ecx
negq %rcx
addq %rdx, %rcx
addq $0x2, %rcx
movq %rdx, %xmm0
pshufd $0x44, %xmm0, %xmm0 # xmm0 = xmm0[0,1,0,1]
addq $0x10, %rax
xorl %edx, %edx
movdqa 0xd892c0(%rip), %xmm1 # 0x2bb5020
movdqa 0xd892c8(%rip), %xmm2 # 0x2bb5030
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movq %rdx, %xmm4
pshufd $0x44, %xmm4, %xmm4 # xmm4 = xmm4[0,1,0,1]
por %xmm1, %xmm4
pxor %xmm2, %xmm4
movdqa %xmm4, %xmm5
pcmpgtd %xmm0, %xmm5
pcmpeqd %xmm0, %xmm4
pshufd $0xf5, %xmm4, %xmm6 # xmm6 = xmm4[1,1,3,3]
pand %xmm5, %xmm6
pshufd $0xf5, %xmm5, %xmm4 # xmm4 = xmm5[1,1,3,3]
por %xmm6, %xmm4
movd %xmm4, %esi
notl %esi
testb $0x1, %sil
je 0x1e2bdb4
movq $-0x1, -0x10(%rax)
pxor %xmm3, %xmm4
pextrw $0x4, %xmm4, %esi
testb $0x1, %sil
je 0x1e2bdca
movq $-0x1, (%rax)
addq $0x2, %rdx
addq $0x20, %rax
cmpq %rdx, %rcx
jne 0x1e2bd70
popq %rbx
popq %r14
popq %r15
retq
nop
|
/llvm/ADT/DenseMap.h
|
void llvm::SmallVectorImpl<llvm::RegisterBankInfo::InstructionMapping const*>::append<llvm::RegisterBankInfo::InstructionMapping const**, void>(llvm::RegisterBankInfo::InstructionMapping const**, llvm::RegisterBankInfo::InstructionMapping const**)
|
void append(ItTy in_start, ItTy in_end) {
this->assertSafeToAddRange(in_start, in_end);
size_type NumInputs = std::distance(in_start, in_end);
this->reserve(this->size() + NumInputs);
this->uninitialized_copy(in_start, in_end, this->end());
this->set_size(this->size() + NumInputs);
}
|
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
movq %rdx, %r15
subq %rsi, %r15
movq %r15, %r13
sarq $0x3, %r13
movl 0x8(%rdi), %edx
movl 0xc(%rdi), %eax
addq %r13, %rdx
cmpq %rax, %rdx
jbe 0x1e2c472
leaq 0x10(%rbx), %rsi
movl $0x8, %ecx
movq %rbx, %rdi
callq 0x2b4ed86
cmpq %r12, %r14
je 0x1e2c48c
movl 0x8(%rbx), %edi
shlq $0x3, %rdi
addq (%rbx), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x780890
addl %r13d, 0x8(%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
|
/llvm/ADT/SmallVector.h
|
(anonymous namespace)::SafeStack::IsSafeStackAlloca(llvm::Value const*, unsigned long)
|
bool SafeStack::IsSafeStackAlloca(const Value *AllocaPtr, uint64_t AllocaSize) {
// Go through all uses of this alloca and check whether all accesses to the
// allocated object are statically known to be memory safe and, hence, the
// object can be placed on the safe stack.
SmallPtrSet<const Value *, 16> Visited;
SmallVector<const Value *, 8> WorkList;
WorkList.push_back(AllocaPtr);
// A DFS search through all uses of the alloca in bitcasts/PHI/GEPs/etc.
while (!WorkList.empty()) {
const Value *V = WorkList.pop_back_val();
for (const Use &UI : V->uses()) {
auto I = cast<const Instruction>(UI.getUser());
assert(V == UI.get());
switch (I->getOpcode()) {
case Instruction::Load:
if (!IsAccessSafe(UI, DL.getTypeStoreSize(I->getType()), AllocaPtr,
AllocaSize))
return false;
break;
case Instruction::VAArg:
// "va-arg" from a pointer is safe.
break;
case Instruction::Store:
if (V == I->getOperand(0)) {
// Stored the pointer - conservatively assume it may be unsafe.
LLVM_DEBUG(dbgs()
<< "[SafeStack] Unsafe alloca: " << *AllocaPtr
<< "\n store of address: " << *I << "\n");
return false;
}
if (!IsAccessSafe(UI, DL.getTypeStoreSize(I->getOperand(0)->getType()),
AllocaPtr, AllocaSize))
return false;
break;
case Instruction::Ret:
// Information leak.
return false;
case Instruction::Call:
case Instruction::Invoke: {
const CallBase &CS = *cast<CallBase>(I);
if (I->isLifetimeStartOrEnd())
continue;
if (const MemIntrinsic *MI = dyn_cast<MemIntrinsic>(I)) {
if (!IsMemIntrinsicSafe(MI, UI, AllocaPtr, AllocaSize)) {
LLVM_DEBUG(dbgs()
<< "[SafeStack] Unsafe alloca: " << *AllocaPtr
<< "\n unsafe memintrinsic: " << *I << "\n");
return false;
}
continue;
}
// LLVM 'nocapture' attribute is only set for arguments whose address
// is not stored, passed around, or used in any other non-trivial way.
// We assume that passing a pointer to an object as a 'nocapture
// readnone' argument is safe.
// FIXME: a more precise solution would require an interprocedural
// analysis here, which would look at all uses of an argument inside
// the function being called.
auto B = CS.arg_begin(), E = CS.arg_end();
for (const auto *A = B; A != E; ++A)
if (A->get() == V)
if (!(CS.doesNotCapture(A - B) && (CS.doesNotAccessMemory(A - B) ||
CS.doesNotAccessMemory()))) {
LLVM_DEBUG(dbgs() << "[SafeStack] Unsafe alloca: " << *AllocaPtr
<< "\n unsafe call: " << *I << "\n");
return false;
}
continue;
}
default:
if (Visited.insert(I).second)
WorkList.push_back(cast<const Instruction>(I));
}
}
}
// All uses of the alloca are safe, we can place it on the safe stack.
return true;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp # imm = 0x128
movq %rdx, 0x18(%rsp)
movq %rsi, %rbp
movq %rdi, 0x10(%rsp)
leaq 0xa8(%rsp), %rax
movq %rax, -0x20(%rax)
movq %rax, -0x18(%rax)
movq $0x10, -0x10(%rax)
movl $0x0, -0x8(%rax)
leaq 0x48(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movabsq $0x800000000, %rax # imm = 0x800000000
movq %rax, -0x8(%rcx)
leaq 0x38(%rsp), %rbx
movq %rbx, %rdi
callq 0x108026c
movl 0x8(%rbx), %eax
testl %eax, %eax
sete 0x7(%rsp)
je 0x1e2ec33
movq %rbp, 0x8(%rsp)
movq 0x38(%rsp), %rcx
movl %eax, %edx
movq -0x8(%rcx,%rdx,8), %r14
decl %eax
movl %eax, 0x40(%rsp)
movq 0x10(%r14), %r15
testq %r15, %r15
je 0x1e2ec22
movq 0x18(%r15), %r12
movb (%r12), %bl
movzbl %bl, %eax
movl $0x1, %ecx
cmpl $0x3d, %eax
jg 0x1e2e983
cmpl $0x1e, %eax
je 0x1e2eb12
cmpl $0x22, %eax
je 0x1e2e9c8
cmpl $0x3d, %eax
jne 0x1e2e996
movq (%r15), %rbx
movq 0x10(%rsp), %r13
movq 0x10(%r13), %rdi
movq 0x8(%r12), %rsi
jmp 0x1e2eac4
cmpl $0x3e, %eax
je 0x1e2e9de
cmpl $0x55, %eax
je 0x1e2e9c8
cmpl $0x59, %eax
je 0x1e2eb10
leaq 0x20(%rsp), %rdi
leaq 0x88(%rsp), %rsi
movq %r12, %rdx
callq 0x92155c
cmpb $0x1, 0x30(%rsp)
jne 0x1e2eb10
leaq 0x38(%rsp), %rdi
movq %r12, %rsi
callq 0x108026c
jmp 0x1e2eb10
movq %r12, %rdi
callq 0x2a52f02
testb %al, %al
je 0x1e2e9fb
movl $0x5, %ecx
jmp 0x1e2eb12
movl 0x4(%r12), %eax
btl $0x1e, %eax
jb 0x1e2ea83
shll $0x5, %eax
movq %r12, %rdx
subq %rax, %rdx
jmp 0x1e2ea88
cmpb $0x55, %bl
jne 0x1e2ea2d
movq %r12, %rdi
callq 0x91f89e
testb %al, %al
je 0x1e2ea2d
movq -0x20(%r12), %rax
movl 0x24(%rax), %eax
movl $0xffffff19, %ecx # imm = 0xFFFFFF19
addl %ecx, %eax
cmpl $0x7, %eax
ja 0x1e2ea2d
movl $0xad, %ecx
btl %eax, %ecx
movq %r12, %rbx
jb 0x1e2ea2f
xorl %ebx, %ebx
testq %rbx, %rbx
je 0x1e2eaa4
movq -0x20(%rbx), %rax
movl 0x24(%rax), %ecx
movl $0xffffff19, %eax # imm = 0xFFFFFF19
addl %eax, %ecx
cmpl $0x3, %ecx
ja 0x1e2ea4f
movq %rbx, %rax
cmpl $0x1, %ecx
jne 0x1e2ea51
xorl %eax, %eax
testq %rax, %rax
je 0x1e2eb31
movl 0x4(%rax), %ecx
shll $0x5, %ecx
subq %rcx, %rax
movq (%r15), %rdx
cmpq %rdx, 0x20(%rax)
je 0x1e2eb4a
movl $0x5, %ecx
cmpq %rdx, (%rax)
jne 0x1e2eb96
jmp 0x1e2eb4a
movq -0x8(%r12), %rdx
cmpq (%rdx), %r14
je 0x1e2eb12
movl 0x4(%r12), %eax
btl $0x1e, %eax
jb 0x1e2eaab
shll $0x5, %eax
subq %rax, %r12
jmp 0x1e2eab0
xorl %ecx, %ecx
jmp 0x1e2eb96
movq -0x8(%r12), %r12
movq (%r15), %rbx
movq 0x10(%rsp), %r13
movq 0x10(%r13), %rdi
movq (%r12), %rax
movq 0x8(%rax), %rsi
callq 0x91d448
xorl %ecx, %ecx
testq %rax, %rax
setne %cl
subq %rcx, %rax
shrq $0x3, %rax
addq %rcx, %rax
andb $0x1, %dl
movq %rax, 0x20(%rsp)
movb %dl, 0x28(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x2b60e74
movq %r13, %rdi
movq %rbx, %rsi
movq %rax, %rdx
movq %rbp, %rcx
movq 0x18(%rsp), %r8
callq 0x1e2ecdc
movl $0x1, %ecx
testb %al, %al
je 0x1e2eb12
xorl %ecx, %ecx
cmpl $0x5, %ecx
je 0x1e2eb1f
testl %ecx, %ecx
jne 0x1e2ec1d
movq 0x8(%r15), %r15
testq %r15, %r15
jne 0x1e2e945
jmp 0x1e2ec18
movl 0x4(%rbx), %eax
shll $0x5, %eax
movq %rbx, %rcx
subq %rax, %rcx
movq (%rcx), %rax
movl $0x5, %ecx
cmpq (%r15), %rax
jne 0x1e2eb96
movl 0x4(%rbx), %eax
shll $0x5, %eax
movq %rbx, %rcx
subq %rax, %rcx
movq 0x40(%rcx), %rax
movl $0x1, %ecx
cmpb $0x11, (%rax)
jne 0x1e2eb96
cmpl $0x41, 0x20(%rax)
jb 0x1e2eb70
movq 0x18(%rax), %rax
jmp 0x1e2eb74
addq $0x18, %rax
movq (%r15), %rsi
movq (%rax), %rdx
movq 0x10(%rsp), %rdi
movq %rbp, %rcx
movq 0x18(%rsp), %r8
callq 0x1e2ecdc
movzbl %al, %eax
leal 0x1(,%rax,4), %ecx
testq %rbx, %rbx
jne 0x1e2eb12
movl 0x4(%r12), %eax
shll $0x5, %eax
movq %r12, %rbp
subq %rax, %rbp
movq %r12, %rdi
callq 0x91f8d2
cmpq %rax, %rbp
je 0x1e2ec02
movq %rax, %r13
xorl %ebx, %ebx
cmpq %r14, (%rbp)
jne 0x1e2ebf7
movq %r12, %rdi
movl %ebx, %esi
movl $0x18, %edx
callq 0x1e2efb2
testb %al, %al
je 0x1e2ec09
movq %r12, %rdi
movl %ebx, %esi
movl $0x30, %edx
callq 0x1e2efb2
testb %al, %al
jne 0x1e2ebf7
movq %r12, %rdi
callq 0x2a55846
testb %al, %al
je 0x1e2ec09
addq $0x20, %rbp
incl %ebx
cmpq %r13, %rbp
jne 0x1e2ebbf
movl $0x5, %ecx
jmp 0x1e2ec0e
movl $0x1, %ecx
movq 0x8(%rsp), %rbp
jmp 0x1e2eb12
movl $0x4, %ecx
testb $0x3, %cl
jne 0x1e2ec33
movl 0x40(%rsp), %eax
testl %eax, %eax
sete 0x7(%rsp)
jne 0x1e2e926
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x1e2ec47
callq 0x780910
movq 0x90(%rsp), %rdi
cmpq 0x88(%rsp), %rdi
je 0x1e2ec5e
callq 0x780910
movb 0x7(%rsp), %al
andb $0x1, %al
addq $0x128, %rsp # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/CodeGen/SafeStack.cpp
|
llvm::SUnit::ComputeDepth()
|
void SUnit::ComputeDepth() {
SmallVector<SUnit*, 8> WorkList;
WorkList.push_back(this);
do {
SUnit *Cur = WorkList.back();
bool Done = true;
unsigned MaxPredDepth = 0;
for (const SDep &PredDep : Cur->Preds) {
SUnit *PredSU = PredDep.getSUnit();
if (PredSU->isDepthCurrent)
MaxPredDepth = std::max(MaxPredDepth,
PredSU->Depth + PredDep.getLatency());
else {
Done = false;
WorkList.push_back(PredSU);
}
}
if (Done) {
WorkList.pop_back();
if (MaxPredDepth != Cur->Depth) {
Cur->setDepthDirty();
Cur->Depth = MaxPredDepth;
}
Cur->isDepthCurrent = true;
}
} while (!WorkList.empty());
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rsi
leaq 0x18(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movabsq $0x800000000, %rax # imm = 0x800000000
movq %rax, -0x8(%rcx)
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xad3f70
movq 0x8(%rsp), %rax
movl 0x10(%rsp), %ecx
movq -0x8(%rax,%rcx,8), %r14
movl 0x30(%r14), %r12d
testq %r12, %r12
je 0x1e334cc
movq 0x28(%r14), %r13
shlq $0x4, %r12
xorl %r15d, %r15d
movb $0x1, %al
xorl %ebp, %ebp
movq (%r13,%r15), %rsi
andq $-0x8, %rsi
testb $0x1, 0xfe(%rsi)
je 0x1e334b7
movl 0xc(%r13,%r15), %ecx
addl 0xf0(%rsi), %ecx
cmpl %ecx, %ebp
cmovbel %ecx, %ebp
jmp 0x1e334c1
movq %rbx, %rdi
callq 0xad3f70
xorl %eax, %eax
addq $0x10, %r15
cmpq %r15, %r12
jne 0x1e33493
jmp 0x1e334d0
xorl %ebp, %ebp
movb $0x1, %al
testb $0x1, %al
je 0x1e334f8
decl 0x10(%rsp)
cmpl 0xf0(%r14), %ebp
je 0x1e334f0
movq %r14, %rdi
callq 0x1e33102
movl %ebp, 0xf0(%r14)
orb $0x1, 0xfe(%r14)
cmpl $0x0, 0x10(%rsp)
jne 0x1e3346d
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x1e33517
callq 0x780910
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/CodeGen/ScheduleDAG.cpp
|
llvm::ScheduleDAGInstrs::initSUnits()
|
void ScheduleDAGInstrs::initSUnits() {
// We'll be allocating one SUnit for each real instruction in the region,
// which is contained within a basic block.
SUnits.reserve(NumRegionInstrs);
for (MachineInstr &MI : make_range(RegionBegin, RegionEnd)) {
if (MI.isDebugOrPseudoInstr())
continue;
SUnit *SU = newSUnit(&MI);
MISUnitMap[&MI] = SU;
SU->isCall = MI.isCall();
SU->isCommutable = MI.isCommutable();
// Assign the Latency field of SU using target-provided information.
SU->Latency = SchedModel.computeInstrLatency(SU->getInstr());
// If this SUnit uses a reserved or unbuffered resource, mark it as such.
//
// Reserved resources block an instruction from issuing and stall the
// entire pipeline. These are identified by BufferSize=0.
//
// Unbuffered resources prevent execution of subsequent instructions that
// require the same resources. This is used for in-order execution pipelines
// within an out-of-order core. These are identified by BufferSize=1.
if (SchedModel.hasInstrSchedModel()) {
const MCSchedClassDesc *SC = getSchedClass(SU);
for (const MCWriteProcResEntry &PRE :
make_range(SchedModel.getWriteProcResBegin(SC),
SchedModel.getWriteProcResEnd(SC))) {
switch (SchedModel.getProcResource(PRE.ProcResourceIdx)->BufferSize) {
case 0:
SU->hasReservedResource = true;
break;
case 1:
SU->isUnbuffered = true;
break;
default:
break;
}
}
}
}
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
addq $0x30, %rdi
movl 0x390(%rbx), %esi
movq %rdi, 0x20(%rsp)
callq 0x1839eb6
movq 0x380(%rbx), %r15
movq 0x388(%rbx), %r12
cmpq %r12, %r15
je 0x1e35d64
leaq 0x398(%rbx), %rax
movq %rax, 0x18(%rsp)
leaq 0x258(%rbx), %rax
movq %rax, 0x10(%rsp)
movzwl 0x44(%r15), %eax
leal -0xd(%rax), %ecx
cmpl $0x5, %ecx
jae 0x1e35c39
testq %r15, %r15
je 0x1e35c24
testb $0x4, (%r15)
je 0x1e35c24
jmp 0x1e35c2b
movq 0x8(%r15), %r15
testb $0x8, 0x2c(%r15)
jne 0x1e35c20
movq 0x8(%r15), %r15
cmpq %r12, %r15
jne 0x1e35c06
jmp 0x1e35d64
cmpl $0x17, %eax
je 0x1e35c13
movq %r15, 0x8(%rsp)
movq 0x38(%rbx), %rax
subq 0x30(%rbx), %rax
shrq $0x8, %rax
movl %eax, 0x4(%rsp)
movq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %r13
movq %r13, %rsi
leaq 0x4(%rsp), %rdx
callq 0x1e381e2
movq 0x38(%rbx), %r14
leaq -0x100(%r14), %rbp
movq %r15, 0x8(%rsp)
movq 0x18(%rsp), %rdi
movq %r13, %rsi
callq 0x1e39fd2
movq %rbp, 0x8(%rax)
movq %r15, %rdi
movl $0x7, %esi
movl $0x1, %edx
callq 0x90bd50
movl -0x8(%r14), %ecx
movzbl %al, %eax
andl $-0x3, %ecx
leal (%rcx,%rax,2), %eax
movw %ax, -0x8(%r14)
movq 0x10(%r15), %rcx
movl 0x10(%rcx), %ecx
shrl $0x15, %ecx
andl $0x10, %ecx
andl $-0x11, %eax
orl %ecx, %eax
movw %ax, -0x8(%r14)
movq -0x100(%r14), %rsi
movq 0x10(%rsp), %r13
movq %r13, %rdi
movl $0x1, %edx
callq 0x1e7fb44
movw %ax, -0x4(%r14)
movq %r13, %rdi
callq 0x1e7f61e
testb %al, %al
je 0x1e35c13
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x1d68572
movzwl 0x4(%rax), %ecx
testq %rcx, %rcx
je 0x1e35c13
movq 0x308(%rbx), %rdx
movzwl 0x2(%rax), %eax
leaq (%rax,%rax,2), %rax
addl %eax, %eax
addq 0xa0(%rdx), %rax
addl %ecx, %ecx
leaq (%rcx,%rcx,2), %rcx
xorl %edx, %edx
movzwl (%rax,%rdx), %esi
movq 0x278(%rbx), %rdi
shll $0x5, %esi
movl 0x10(%rdi,%rsi), %esi
testl %esi, %esi
je 0x1e35d4d
cmpl $0x1, %esi
jne 0x1e35d56
movw $0x4000, %si # imm = 0x4000
jmp 0x1e35d51
movw $0x8000, %si # imm = 0x8000
orw %si, -0x8(%r14)
addq $0x6, %rdx
cmpq %rdx, %rcx
jne 0x1e35d2c
jmp 0x1e35c13
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
|
/CodeGen/ScheduleDAGInstrs.cpp
|
llvm::UnderlyingObject& llvm::SmallVectorImpl<llvm::UnderlyingObject>::emplace_back<llvm::PseudoSourceValue const*&, bool&>(llvm::PseudoSourceValue const*&, bool&)
|
reference emplace_back(ArgTypes &&... Args) {
if (LLVM_UNLIKELY(this->size() >= this->capacity()))
return this->growAndEmplaceBack(std::forward<ArgTypes>(Args)...);
::new ((void *)this->end()) T(std::forward<ArgTypes>(Args)...);
this->set_size(this->size() + 1);
return this->back();
}
|
pushq %rbx
movq %rdi, %rbx
movl 0x8(%rdi), %eax
cmpl 0xc(%rdi), %eax
jae 0x1e38e28
movq (%rbx), %rcx
movq (%rsi), %rsi
movzbl (%rdx), %edx
andq $-0x7, %rsi
leaq (%rsi,%rdx,2), %rdx
addq $0x4, %rdx
movq %rdx, (%rcx,%rax,8)
movl 0x8(%rbx), %eax
incl %eax
movl %eax, 0x8(%rbx)
movq (%rbx), %rcx
movl %eax, %eax
leaq (%rcx,%rax,8), %rax
addq $-0x8, %rax
popq %rbx
retq
movq (%rsi), %rax
movzbl (%rdx), %ecx
andq $-0x7, %rax
leaq (%rax,%rcx,2), %rsi
addq $0x4, %rsi
movq %rbx, %rdi
callq 0x1e38e9c
movl 0x8(%rbx), %eax
jmp 0x1e38e19
nop
|
/llvm/ADT/SmallVector.h
|
(anonymous namespace)::ShadowStackGCLoweringImpl::doInitialization(llvm::Module&)
|
bool ShadowStackGCLoweringImpl::doInitialization(Module &M) {
bool Active = false;
for (Function &F : M) {
if (F.hasGC() && F.getGC() == "shadow-stack") {
Active = true;
break;
}
}
if (!Active)
return false;
// struct FrameMap {
// int32_t NumRoots; // Number of roots in stack frame.
// int32_t NumMeta; // Number of metadata descriptors. May be < NumRoots.
// void *Meta[]; // May be absent for roots without metadata.
// };
std::vector<Type *> EltTys;
// 32 bits is ok up to a 32GB stack frame. :)
EltTys.push_back(Type::getInt32Ty(M.getContext()));
// Specifies length of variable length array.
EltTys.push_back(Type::getInt32Ty(M.getContext()));
FrameMapTy = StructType::create(EltTys, "gc_map");
PointerType *FrameMapPtrTy = PointerType::getUnqual(FrameMapTy);
// struct StackEntry {
// ShadowStackEntry *Next; // Caller's stack entry.
// FrameMap *Map; // Pointer to constant FrameMap.
// void *Roots[]; // Stack roots (in-place array, so we pretend).
// };
StackEntryTy = StructType::create(M.getContext(), "gc_stackentry");
EltTys.clear();
EltTys.push_back(PointerType::getUnqual(StackEntryTy));
EltTys.push_back(FrameMapPtrTy);
StackEntryTy->setBody(EltTys);
PointerType *StackEntryPtrTy = PointerType::getUnqual(StackEntryTy);
// Get the root chain if it already exists.
Head = M.getGlobalVariable("llvm_gc_root_chain");
if (!Head) {
// If the root chain does not exist, insert a new one with linkonce
// linkage!
Head = new GlobalVariable(
M, StackEntryPtrTy, false, GlobalValue::LinkOnceAnyLinkage,
Constant::getNullValue(StackEntryPtrTy), "llvm_gc_root_chain");
} else if (Head->hasExternalLinkage() && Head->isDeclaration()) {
Head->setInitializer(Constant::getNullValue(StackEntryPtrTy));
Head->setLinkage(GlobalValue::LinkOnceAnyLinkage);
}
return true;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r15
movq %rdi, %r14
leaq 0x18(%rsi), %r13
movq 0x20(%rsi), %rbp
xorl %ebx, %ebx
cmpq %r13, %rbp
je 0x1e3ffd2
leaq 0x2ca4c12(%rip), %r12 # 0x4ae4ba8
leaq -0x38(%rbp), %rdi
testq %rbp, %rbp
cmoveq %rbp, %rdi
testb $0x40, 0x3(%rdi)
je 0x1e3ffbb
callq 0x2a40c76
movq %rax, %rdi
movq %r12, %rsi
callq 0x780f10
testl %eax, %eax
je 0x1e3ffcc
movb $0x1, %al
testb %al, %al
je 0x1e3ffd2
movq 0x8(%rbp), %rbp
cmpq %r13, %rbp
jne 0x1e3ff96
jmp 0x1e3ffd2
movb $0x1, %bl
xorl %eax, %eax
jmp 0x1e3ffbd
testb $0x1, %bl
je 0x1e401b9
xorps %xmm0, %xmm0
movq %rsp, %r12
movaps %xmm0, (%r12)
movq $0x0, 0x10(%r12)
movq (%r15), %rdi
callq 0x2a9aad4
leaq 0x20(%rsp), %r13
movq %rax, (%r13)
movq %r12, %rdi
movq %r13, %rsi
callq 0xc91074
movq (%r15), %rdi
callq 0x2a9aad4
movq %rax, (%r13)
leaq 0x20(%rsp), %rsi
movq %r12, %rdi
callq 0xc91074
movq (%r12), %rdi
movq 0x8(%r12), %rsi
subq %rdi, %rsi
sarq $0x3, %rsi
leaq 0x3109c6e(%rip), %rdx # 0x4f49ca9
movl $0x6, %ecx
xorl %r8d, %r8d
callq 0x2a9b276
movq %rax, 0x10(%r14)
movq %rax, %rdi
xorl %esi, %esi
callq 0x2a9b6ac
movq %rax, %r13
movq (%r15), %rdi
leaq 0x3109c4d(%rip), %rsi # 0x4f49cb0
movl $0xd, %edx
callq 0x2a9b18c
movq %rax, 0x8(%r14)
movq (%r12), %rcx
cmpq %rcx, 0x8(%r12)
je 0x1e40081
movq %rcx, 0x8(%rsp)
movq %rax, %rdi
xorl %esi, %esi
callq 0x2a9b6ac
leaq 0x20(%rsp), %r12
movq %rax, (%r12)
movq %rsp, %rbp
movq %rbp, %rdi
movq %r12, %rsi
callq 0xc91074
movq %r13, (%r12)
leaq 0x20(%rsp), %rsi
movq %rbp, %rdi
callq 0xc91074
movq 0x8(%r14), %rdi
movq (%rbp), %rsi
movq 0x8(%rbp), %rdx
subq %rsi, %rdx
sarq $0x3, %rdx
xorl %ecx, %ecx
callq 0x2a9ae90
movq 0x8(%r14), %rdi
xorl %esi, %esi
callq 0x2a9b6ac
movq %rax, %r13
leaq 0x3109bdc(%rip), %rbp # 0x4f49cbe
movl $0x12, %edx
movq %r15, %rdi
movq %rbp, %rsi
xorl %ecx, %ecx
callq 0x2a83a68
movq %rax, (%r14)
testq %rax, %rax
je 0x1e4014d
testb $0xf, 0x20(%rax)
jne 0x1e401a3
movq %rax, %rdi
callq 0x2a476ae
testb %al, %al
je 0x1e401a3
movq (%r14), %r15
movq %r13, %rdi
callq 0x29e17e6
movq %r15, %rdi
movq %rax, %rsi
callq 0x2a47fea
movq (%r14), %rax
movl 0x20(%rax), %edx
movl %edx, %ecx
andl $-0x10, %ecx
leal 0x2(%rcx), %esi
movl %esi, 0x20(%rax)
testb $0x30, %dl
je 0x1e401a3
orl $0x4002, %ecx # imm = 0x4002
movl %ecx, 0x20(%rax)
jmp 0x1e401a3
movl $0x58, %edi
movl $0x1, %esi
callq 0x2a9ec74
movq %rax, %r12
movq %r13, %rdi
callq 0x29e17e6
movq %rbp, 0x20(%rsp)
movw $0x103, 0x40(%rsp) # imm = 0x103
subq $0x8, %rsp
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
movl $0x2, %r8d
movq %rax, %r9
xorl %eax, %eax
pushq %rax
pushq %rax
pushq %rax
pushq %rax
leaq 0x48(%rsp), %rax
pushq %rax
callq 0x2a47f46
addq $0x30, %rsp
movq %r12, (%r14)
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x1e401b9
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x7800d0
andb $0x1, %bl
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
|
/CodeGen/ShadowStackGCLowering.cpp
|
llvm::iterator_range<llvm::idf_iterator<llvm::BasicBlock*, llvm::df_iterator_default_set<llvm::GraphTraits<llvm::BasicBlock*>::NodeRef, 8u>, false>> llvm::inverse_depth_first<llvm::BasicBlock*>(llvm::BasicBlock* const&)
|
iterator_range<idf_iterator<T>> inverse_depth_first(const T& G) {
return make_range(idf_begin(G), idf_end(G));
}
|
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x1e46250
leaq 0x80(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x1e462cc
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x1e46146
movq 0x60(%r12), %rdi
testq %rdi, %rdi
je 0x1e460f5
movq 0xf0(%rsp), %rsi
subq %rdi, %rsi
callq 0x7800d0
movq 0x88(%rsp), %rdi
cmpq 0x80(%rsp), %rdi
je 0x1e4610c
callq 0x780910
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x1e46123
movq 0x78(%rsp), %rsi
subq %rdi, %rsi
callq 0x7800d0
movq 0x10(%rsp), %rdi
cmpq 0x8(%rsp), %rdi
je 0x1e46134
callq 0x780910
movq %rbx, %rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
/llvm/ADT/DepthFirstIterator.h
|
llvm::df_iterator<llvm::Inverse<llvm::BasicBlock*>, llvm::df_iterator_default_set<llvm::BasicBlock*, 8u>, false, llvm::GraphTraits<llvm::Inverse<llvm::BasicBlock*>>>::toNext()
|
inline void toNext() {
do {
NodeRef Node = VisitStack.back().first;
std::optional<ChildItTy> &Opt = VisitStack.back().second;
if (!Opt)
Opt.emplace(GT::child_begin(Node));
// Notice that we directly mutate *Opt here, so that
// VisitStack.back().second actually gets updated as the iterator
// increases.
while (*Opt != GT::child_end(Node)) {
NodeRef Next = *(*Opt)++;
// Has our next sibling been visited?
if (this->Visited.insert(Next).second) {
// No, do it now.
VisitStack.push_back(StackElement(Next, std::nullopt));
return;
}
}
this->Visited.completed(Node);
// Oops, ran out of successors... go up a level on the stack.
VisitStack.pop_back();
} while (!VisitStack.empty());
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x60(%rdi), %r14
movq %rsp, %r15
movq 0x68(%rbx), %r13
cmpb $0x0, -0x8(%r13)
jne 0x1e46795
movq -0x18(%r13), %rax
movq 0x10(%rax), %rax
testq %rax, %rax
je 0x1e4678c
movq 0x18(%rax), %rcx
movb (%rcx), %cl
cmpb $0x1d, %cl
setae %dl
movzbl %cl, %ecx
addl $-0x1e, %ecx
cmpl $0xb, %ecx
setb %cl
testb %cl, %dl
jne 0x1e4678c
movq 0x8(%rax), %rax
jmp 0x1e46765
movq %rax, -0x10(%r13)
movb $0x1, -0x8(%r13)
movq -0x10(%r13), %rbp
testq %rbp, %rbp
je 0x1e46814
movq 0x8(%rbp), %rax
movq %rax, -0x10(%r13)
testq %rax, %rax
je 0x1e467cd
movq 0x18(%rax), %rcx
movb (%rcx), %cl
cmpb $0x1d, %cl
setae %dl
movzbl %cl, %ecx
addl $-0x1e, %ecx
cmpl $0xb, %ecx
setb %cl
testb %cl, %dl
jne 0x1e467cd
movq 0x8(%rax), %rax
jmp 0x1e467a2
movq 0x18(%rbp), %rax
movq 0x28(%rax), %r12
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x93b8de
cmpb $0x1, 0x10(%rsp)
jne 0x1e46795
movq %r12, (%rsp)
movb $0x0, 0x10(%rsp)
movq 0x68(%rbx), %rsi
cmpq 0x70(%rbx), %rsi
je 0x1e4681b
movq 0x10(%rsp), %rax
movq %rax, 0x10(%rsi)
movups (%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x18, 0x68(%rbx)
jmp 0x1e46826
addq $-0x18, 0x68(%rbx)
jmp 0x1e46826
movq %r14, %rdi
movq %r15, %rdx
callq 0x1e4649a
testq %rbp, %rbp
jne 0x1e46839
movq 0x60(%rbx), %rax
cmpq 0x68(%rbx), %rax
jne 0x1e46752
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/llvm/ADT/DepthFirstIterator.h
|
llvm::detail::DenseMapPair<llvm::MachineBasicBlock const*, (anonymous namespace)::StackColoring::BlockLifetimeInfo>* llvm::DenseMapBase<llvm::DenseMap<llvm::MachineBasicBlock const*, (anonymous namespace)::StackColoring::BlockLifetimeInfo, llvm::DenseMapInfo<llvm::MachineBasicBlock const*, void>, llvm::detail::DenseMapPair<llvm::MachineBasicBlock const*, (anonymous namespace)::StackColoring::BlockLifetimeInfo>>, llvm::MachineBasicBlock const*, (anonymous namespace)::StackColoring::BlockLifetimeInfo, llvm::DenseMapInfo<llvm::MachineBasicBlock const*, void>, llvm::detail::DenseMapPair<llvm::MachineBasicBlock const*, (anonymous namespace)::StackColoring::BlockLifetimeInfo>>::InsertIntoBucketImpl<llvm::MachineBasicBlock const*>(llvm::MachineBasicBlock const* const&, llvm::MachineBasicBlock const* const&, llvm::detail::DenseMapPair<llvm::MachineBasicBlock const*, (anonymous namespace)::StackColoring::BlockLifetimeInfo>*)
|
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 %rsi, %r14
movq %rdi, %rbx
movq %rdx, (%rsp)
movl 0x8(%rdi), %eax
movl 0x10(%rdi), %esi
leal 0x4(,%rax,4), %ecx
leal (%rsi,%rsi,2), %edx
cmpl %edx, %ecx
jae 0x1e53733
notl %eax
addl %esi, %eax
subl 0xc(%rbx), %eax
movl %esi, %ecx
shrl $0x3, %ecx
cmpl %ecx, %eax
jbe 0x1e53735
incl 0x8(%rbx)
movq (%rsp), %rax
cmpq $-0x1000, (%rax) # imm = 0xF000
je 0x1e5372b
decl 0xc(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
addl %esi, %esi
movq %rbx, %rdi
callq 0x1e5374e
movq %rsp, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1e53648
jmp 0x1e53718
nop
|
/llvm/ADT/DenseMap.h
|
llvm::SSPLayoutInfo::copyToMachineFrameInfo(llvm::MachineFrameInfo&) const
|
[[nodiscard]] bool empty() const { return getNumEntries() == 0; }
|
cmpl $0x0, 0x8(%rdi)
je 0x1e58a0c
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq 0x10(%rsi), %rax
subq 0x8(%rsi), %rax
shrq $0x3, %rax
imull $0xcccccccd, %eax, %ebp # imm = 0xCCCCCCCD
subl 0x20(%rsi), %ebp
je 0x1e58a02
movq %rdi, %r14
xorl %r15d, %r15d
movl 0x20(%rbx), %ecx
addl %r15d, %ecx
movq 0x8(%rbx), %rax
leaq (%rcx,%rcx,4), %rcx
cmpq $-0x1, 0x8(%rax,%rcx,8)
je 0x1e589fa
movq 0x18(%rax,%rcx,8), %rsi
testq %rsi, %rsi
je 0x1e589fa
movq %r14, %rdi
callq 0x1e58a0e
movl 0x10(%r14), %ecx
shlq $0x4, %rcx
addq (%r14), %rcx
cmpq %rcx, %rax
je 0x1e589fa
movb 0x8(%rax), %al
movl 0x20(%rbx), %ecx
addl %r15d, %ecx
movq 0x8(%rbx), %rdx
leaq (%rcx,%rcx,4), %rcx
movb %al, 0x24(%rdx,%rcx,8)
incl %r15d
cmpl %r15d, %ebp
jne 0x1e589ad
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
|
/llvm/ADT/DenseMap.h
|
void llvm::SmallVectorImpl<llvm::BitVector>::resizeImpl<false>(unsigned long)
|
size_t size() const { return Size; }
|
pushq %r14
pushq %rbx
pushq %rax
movl 0x8(%rdi), %eax
cmpq %rsi, %rax
je 0x1e5cf09
movq %rsi, %rbx
movq %rdi, %r14
jbe 0x1e5ce96
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1e5cf12
movl 0xc(%r14), %eax
cmpq %rbx, %rax
jae 0x1e5ceaa
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1e5cf76
movl 0x8(%r14), %ecx
cmpq %rbx, %rcx
je 0x1e5cf05
movq (%r14), %rdx
leaq (%rbx,%rbx,8), %rax
leaq (%rdx,%rax,8), %rax
leaq (%rcx,%rcx,8), %rcx
leaq (%rdx,%rcx,8), %rcx
xorps %xmm0, %xmm0
movabsq $0x600000000, %rdx # imm = 0x600000000
movups %xmm0, (%rcx)
movups %xmm0, 0x30(%rcx)
movups %xmm0, 0x20(%rcx)
movups %xmm0, 0x10(%rcx)
movq $0x0, 0x40(%rcx)
leaq 0x10(%rcx), %rsi
movq %rsi, (%rcx)
movq %rdx, 0x8(%rcx)
movl $0x0, 0x40(%rcx)
addq $0x48, %rcx
cmpq %rax, %rcx
jne 0x1e5ced3
movl %ebx, 0x8(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
|
/llvm/ADT/SmallVector.h
|
llvm::DenseMap<std::pair<llvm::MachineBasicBlock const*, llvm::Value const*>, llvm::Register, llvm::DenseMapInfo<std::pair<llvm::MachineBasicBlock const*, llvm::Value const*>, void>, llvm::detail::DenseMapPair<std::pair<llvm::MachineBasicBlock const*, llvm::Value const*>, llvm::Register>>::shrink_and_clear()
|
void shrink_and_clear() {
unsigned OldNumBuckets = NumBuckets;
unsigned OldNumEntries = NumEntries;
this->destroyAll();
// Reduce the number of buckets.
unsigned NewNumBuckets = 0;
if (OldNumEntries)
NewNumBuckets = std::max(64, 1 << (Log2_32_Ceil(OldNumEntries) + 1));
if (NewNumBuckets == NumBuckets) {
this->BaseT::initEmpty();
return;
}
deallocate_buffer(Buckets, sizeof(BucketT) * OldNumBuckets,
alignof(BucketT));
init(NewNumBuckets);
}
|
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x8(%rdi), %ecx
movl 0x10(%rdi), %eax
testl %ecx, %ecx
je 0x1e5f93a
decl %ecx
je 0x1e5f93e
bsrl %ecx, %edx
xorl $0x1f, %edx
jmp 0x1e5f943
xorl %ebp, %ebp
jmp 0x1e5f959
movl $0x20, %edx
movb $0x21, %cl
subb %dl, %cl
movl $0x1, %edx
shll %cl, %edx
cmpl $0x41, %edx
movl $0x40, %ebp
cmovgel %edx, %ebp
cmpl %eax, %ebp
jne 0x1e5f993
movq $0x0, 0x8(%rbx)
testq %rax, %rax
je 0x1e5f98c
movq (%rbx), %rcx
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rax,8), %rax
movq $-0x1000, %rdx # imm = 0xF000
movq %rdx, (%rcx)
movq %rdx, 0x8(%rcx)
addq $0x18, %rcx
cmpq %rax, %rcx
jne 0x1e5f97c
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq (%rbx), %rdi
shlq $0x3, %rax
leaq (%rax,%rax,2), %rsi
movl $0x8, %edx
callq 0x2b410f1
movq %rbx, %rdi
movl %ebp, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1e5f9b8
|
/llvm/ADT/DenseMap.h
|
llvm::TargetLoweringBase::emitTrailingFence(llvm::IRBuilderBase&, llvm::Instruction*, llvm::AtomicOrdering) const
|
inline bool isAtLeastOrStrongerThan(AtomicOrdering AO, AtomicOrdering Other) {
static const bool lookup[8][8] = {
// NA UN RX CO AC RE AR SC
/* NotAtomic */ { true, false, false, false, false, false, false, false},
/* Unordered */ { true, true, false, false, false, false, false, false},
/* relaxed */ { true, true, true, false, false, false, false, false},
/* consume */ { true, true, true, true, false, false, false, false},
/* acquire */ { true, true, true, true, true, false, false, false},
/* release */ { true, true, true, false, false, true, false, false},
/* acq_rel */ { true, true, true, true, true, true, true, false},
/* seq_cst */ { true, true, true, true, true, true, true, true},
};
return lookup[static_cast<size_t>(AO)][static_cast<size_t>(Other)];
}
|
movl %ecx, %eax
leaq 0x158bd09(%rip), %rdx # 0x33fbd50
cmpb $0x1, 0x4(%rdx,%rax,8)
jne 0x1e70072
subq $0x28, %rsp
movq %rsp, %rax
movw $0x101, 0x20(%rax) # imm = 0x101
movq %rsi, %rdi
movl %ecx, %esi
movl $0x1, %edx
movq %rax, %rcx
callq 0xc96694
addq $0x28, %rsp
retq
xorl %eax, %eax
retq
nop
|
/llvm/Support/AtomicOrdering.h
|
llvm::SmallVectorTemplateBase<llvm::cl::parser<llvm::RunOutliner>::OptionInfo, false>::grow(unsigned long)
|
void SmallVectorTemplateBase<T, TriviallyCopyable>::grow(size_t MinSize) {
size_t NewCapacity;
T *NewElts = mallocForGrow(MinSize, NewCapacity);
moveElementsForGrow(NewElts);
takeAllocationForGrow(NewElts, NewCapacity);
}
|
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rdx
movq %rdi, %rbx
leaq 0x10(%rdi), %r14
movq %rsp, %r8
movl $0x30, %ecx
movq %r14, %rsi
callq 0x2b4ec3c
movq %rax, %r15
movl 0x8(%rbx), %ecx
testq %rcx, %rcx
je 0x1e7c615
movq (%rbx), %rax
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
addq %rax, %rcx
xorl %edx, %edx
leaq 0x3a15d34(%rip), %rsi # 0x58922f8
addq $0x10, %rsi
leaq 0x3a15d09(%rip), %rdi # 0x58922d8
addq $0x10, %rdi
leaq (%rax,%rdx), %r8
addq $0x30, %r8
movups -0x30(%r8), %xmm0
movups -0x20(%r8), %xmm1
movups %xmm1, 0x10(%r15,%rdx)
movups %xmm0, (%r15,%rdx)
movq %rsi, 0x20(%r15,%rdx)
movl -0x8(%r8), %r9d
movl %r9d, 0x28(%r15,%rdx)
movb -0x4(%r8), %r9b
movb %r9b, 0x2c(%r15,%rdx)
movq %rdi, 0x20(%r15,%rdx)
addq $0x30, %rdx
cmpq %rcx, %r8
jne 0x1e7c5d3
movq (%rsp), %r12
movq (%rbx), %rdi
cmpq %r14, %rdi
je 0x1e7c626
callq 0x780910
movq %r15, (%rbx)
movl %r12d, 0xc(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
/llvm/ADT/SmallVector.h
|
llvm::VirtRegMap::print(llvm::raw_ostream&, llvm::Module const*) const
|
void VirtRegMap::print(raw_ostream &OS, const Module*) const {
OS << "********** REGISTER MAP **********\n";
for (unsigned i = 0, e = MRI->getNumVirtRegs(); i != e; ++i) {
Register Reg = Register::index2VirtReg(i);
if (Virt2PhysMap[Reg] != (unsigned)VirtRegMap::NO_PHYS_REG) {
OS << '[' << printReg(Reg, TRI) << " -> "
<< printReg(Virt2PhysMap[Reg], TRI) << "] "
<< TRI->getRegClassName(MRI->getRegClass(Reg)) << "\n";
}
}
for (unsigned i = 0, e = MRI->getNumVirtRegs(); i != e; ++i) {
Register Reg = Register::index2VirtReg(i);
if (Virt2StackSlotMap[Reg] != VirtRegMap::NO_STACK_SLOT) {
OS << '[' << printReg(Reg, TRI) << " -> fi#" << Virt2StackSlotMap[Reg]
<< "] " << TRI->getRegClassName(MRI->getRegClass(Reg)) << "\n";
}
}
OS << '\n';
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %rbp
movq %rdi, %r14
leaq 0x30c12f5(%rip), %rsi # 0x4f4db46
movl $0x23, %edx
movq %rbp, %rdi
callq 0x7f9ba8
movq 0x38(%r14), %rax
movl 0x40(%rax), %eax
movl %eax, 0xc(%rsp)
testl %eax, %eax
movq %rbp, 0x10(%rsp)
je 0x1e8c9d2
xorl %r13d, %r13d
leaq 0x18(%rsp), %r12
movl %r13d, %r15d
andl $0x7fffffff, %r15d # imm = 0x7FFFFFFF
movq 0x58(%r14), %rax
cmpl $0x0, (%rax,%r15,4)
je 0x1e8c9c4
movq 0x20(%rbp), %rax
cmpq 0x18(%rbp), %rax
jae 0x1e8c8b1
leaq 0x1(%rax), %rcx
movq %rcx, 0x20(%rbp)
movb $0x5b, (%rax)
movq %rbp, %rbx
jmp 0x1e8c8c1
movq %rbp, %rdi
movl $0x5b, %esi
callq 0x2b7d68e
movq %rax, %rbx
movl %r13d, %esi
orl $0x80000000, %esi # imm = 0x80000000
movq 0x48(%r14), %rdx
movq %r12, %rbp
movq %r12, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x1e7da40
cmpq $0x0, 0x28(%rsp)
je 0x1e8cb2d
movq %rbp, %rdi
movq %rbx, %rsi
callq *0x30(%rsp)
movl $0x4, %edx
movq %rbx, %rdi
leaq 0x30b0414(%rip), %rsi # 0x4f3cd17
callq 0x7f9ba8
movq %rax, %rbx
movq 0x48(%r14), %rdx
movq 0x58(%r14), %rax
movl (%rax,%r15,4), %esi
leaq 0x38(%rsp), %rbp
movq %rbp, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x1e7da40
cmpq $0x0, 0x48(%rsp)
je 0x1e8cb2d
movq %rbp, %rdi
movq %rbx, %rsi
callq *0x50(%rsp)
movl $0x2, %edx
movq %rbx, %rdi
leaq 0x30ba371(%rip), %rsi # 0x4f46cbf
callq 0x7f9ba8
movq 0x38(%r14), %rcx
movq 0x48(%r14), %rdx
movq 0x38(%rcx), %rcx
shlq $0x4, %r15
movq (%rcx,%r15), %rcx
andq $-0x8, %rcx
movq (%rcx), %rcx
movl 0x10(%rcx), %esi
addq 0x50(%rdx), %rsi
movq %rax, %rdi
callq 0x7f9b78
movl $0x1, %edx
movq %rax, %rdi
leaq 0x307c8c1(%rip), %rsi # 0x4f0924d
callq 0x7f9ba8
movq 0x48(%rsp), %rax
testq %rax, %rax
movq %rbp, %rdi
movq 0x10(%rsp), %rbp
je 0x1e8c9ad
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x1e8c9c4
movq %r12, %rdi
movq %r12, %rsi
movl $0x3, %edx
callq *%rax
incl %r13d
cmpl %r13d, 0xc(%rsp)
jne 0x1e8c87e
movq 0x38(%r14), %rax
movl 0x40(%rax), %r13d
testl %r13d, %r13d
je 0x1e8cafa
xorl %r15d, %r15d
leaq 0x18(%rsp), %r12
movl %r15d, %ebx
andl $0x7fffffff, %ebx # imm = 0x7FFFFFFF
movq 0x70(%r14), %rax
cmpl $0x3fffffff, (%rax,%rbx,4) # imm = 0x3FFFFFFF
je 0x1e8caee
movq 0x20(%rbp), %rax
cmpq 0x18(%rbp), %rax
jae 0x1e8ca1c
leaq 0x1(%rax), %rcx
movq %rcx, 0x20(%rbp)
movb $0x5b, (%rax)
jmp 0x1e8ca2c
movq %rbp, %rdi
movl $0x5b, %esi
callq 0x2b7d68e
movq %rax, %rbp
movl %r15d, %esi
orl $0x80000000, %esi # imm = 0x80000000
movq 0x48(%r14), %rdx
movq %r12, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x1e7da40
cmpq $0x0, 0x28(%rsp)
je 0x1e8cb2d
movq %r12, %rdi
movq %rbp, %rsi
callq *0x30(%rsp)
movl $0x7, %edx
movq %rbp, %rdi
leaq 0x30c10ff(%rip), %rsi # 0x4f4db6a
callq 0x7f9ba8
movq 0x70(%r14), %rcx
movslq (%rcx,%rbx,4), %rsi
movq %rax, %rdi
callq 0x2b7d122
movl $0x2, %edx
movq %rax, %rdi
leaq 0x30ba230(%rip), %rsi # 0x4f46cbf
callq 0x7f9ba8
movq 0x38(%r14), %rcx
movq 0x48(%r14), %rdx
movq 0x38(%rcx), %rcx
shlq $0x4, %rbx
movq (%rcx,%rbx), %rcx
andq $-0x8, %rcx
movq (%rcx), %rcx
movl 0x10(%rcx), %esi
addq 0x50(%rdx), %rsi
movq %rax, %rdi
callq 0x7f9b78
movl $0x1, %edx
movq %rax, %rdi
leaq 0x307c780(%rip), %rsi # 0x4f0924d
callq 0x7f9ba8
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x1e8cae9
movq %r12, %rdi
movq %r12, %rsi
movl $0x3, %edx
callq *%rax
movq 0x10(%rsp), %rbp
incl %r15d
cmpl %r15d, %r13d
jne 0x1e8c9eb
movq 0x20(%rbp), %rax
cmpq 0x18(%rbp), %rax
jae 0x1e8cb11
leaq 0x1(%rax), %rcx
movq %rcx, 0x20(%rbp)
movb $0xa, (%rax)
jmp 0x1e8cb1e
movq %rbp, %rdi
movl $0xa, %esi
callq 0x2b7d68e
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x7807b0
|
/CodeGen/VirtRegMap.cpp
|
llvm::cl::opt<unsigned int, false, llvm::cl::parser<unsigned int>>::opt<char [16], llvm::cl::desc, llvm::cl::OptionHidden, llvm::cl::initializer<int>>(char const (&) [16], llvm::cl::desc const&, llvm::cl::OptionHidden const&, llvm::cl::initializer<int> const&)
|
explicit opt(const Mods &... Ms)
: Option(llvm::cl::Optional, NotHidden), Parser(*this) {
apply(this, Ms...);
done();
}
|
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, %rbx
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r14
xorl %esi, %esi
xorl %edx, %edx
callq 0x7fca88
movl $0x0, 0x80(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x88(%r14)
movb $0x0, 0x94(%r14)
leaq 0x38b8316(%rip), %rax # 0x57479c8
addq $0x10, %rax
movq %rax, 0x88(%r14)
leaq 0x3a685a4(%rip), %rax # 0x58f7c68
addq $0x10, %rax
movq %rax, (%r14)
leaq 0x3a68446(%rip), %rax # 0x58f7b18
addq $0x10, %rax
movq %rax, 0x98(%r14)
movups %xmm0, 0xa0(%r14)
leaq -0x16926fc(%rip), %rax # 0x7fcff0
movq %rax, 0xb8(%r14)
leaq -0x1692708(%rip), %rax # 0x7fcff2
movq %rax, 0xb0(%r14)
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r15, %rcx
movq %rbx, %r8
callq 0x1e91bb0
movq %r14, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2b1e814
|
/llvm/Support/CommandLine.h
|
llvm::WindowScheduler::getIssueOrder(unsigned int, unsigned int)
|
DenseMap<MachineInstr *, int> WindowScheduler::getIssueOrder(unsigned Offset,
unsigned II) {
// At each issue cycle, phi is placed before MIs in stage 0. So the simplest
// way is to put phi at the beginning of the current cycle.
DenseMap<int, SmallVector<MachineInstr *>> CycleToMIs;
auto Range = getScheduleRange(Offset, SchedInstrNum);
for (auto &Phi : MBB->phis())
CycleToMIs[getOriCycle(&Phi)].push_back(getOriMI(&Phi));
for (auto &MI : Range)
CycleToMIs[getOriCycle(&MI)].push_back(getOriMI(&MI));
// Each MI is assigned a separate ordered Id, which is used as a sort marker
// in the following expand process.
DenseMap<MachineInstr *, int> IssueOrder;
int Id = 0;
for (int Cycle = 0; Cycle < (int)II; ++Cycle) {
if (!CycleToMIs.count(Cycle))
continue;
for (auto *MI : CycleToMIs[Cycle])
IssueOrder[MI] = Id++;
}
return IssueOrder;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %ecx, 0x1c(%rsp)
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movl $0x0, 0x40(%rsp)
movl 0x1914(%rsi), %eax
movq %rsi, %rdi
movl %edx, %esi
movl %eax, %edx
callq 0x1e8fa0a
movq %rax, %r15
movq %rdx, 0x28(%rsp)
movq %r14, 0x20(%rsp)
movq 0x18(%r14), %rdi
movq 0x38(%rdi), %r14
callq 0x1cfacd6
movq %rax, 0x50(%rsp)
cmpq %rax, %r14
je 0x1e91232
movq 0x20(%rsp), %rax
leaq 0xd0(%rax), %rbp
addq $0xe8, %rax
movq %rax, 0x48(%rsp)
movq %r14, 0x8(%rsp)
movq %rbp, %rdi
leaq 0x8(%rsp), %r13
movq %r13, %rsi
callq 0xa79320
movq 0x8(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x48(%rsp), %rdi
leaq 0x10(%rsp), %r12
movq %r12, %rsi
callq 0x10e9fcc
movl 0x8(%rax), %eax
movl %eax, 0x10(%rsp)
leaq 0x30(%rsp), %rdi
movq %r12, %rsi
callq 0x1e91c6c
leaq 0x8(%rax), %r12
movq %r14, 0x8(%rsp)
movq %rbp, %rdi
movq %r13, %rsi
callq 0xa79320
movq 0x8(%rax), %rsi
movq %r12, %rdi
callq 0x93eb36
testq %r14, %r14
je 0x1e9121c
testb $0x4, (%r14)
je 0x1e9121c
jmp 0x1e91223
movq 0x8(%r14), %r14
testb $0x8, 0x2c(%r14)
jne 0x1e91218
movq 0x8(%r14), %r14
cmpq 0x50(%rsp), %r14
jne 0x1e911a7
cmpq 0x28(%rsp), %r15
je 0x1e912d9
movq 0x20(%rsp), %r14
leaq 0xd0(%r14), %r13
addq $0xe8, %r14
movq %r15, 0x8(%rsp)
movq %r13, %rdi
leaq 0x8(%rsp), %r12
movq %r12, %rsi
callq 0xa79320
movq 0x8(%rax), %rax
movq %rax, 0x10(%rsp)
movq %r14, %rdi
leaq 0x10(%rsp), %rbp
movq %rbp, %rsi
callq 0x10e9fcc
movl 0x8(%rax), %eax
movl %eax, 0x10(%rsp)
leaq 0x30(%rsp), %rdi
movq %rbp, %rsi
callq 0x1e91c6c
leaq 0x8(%rax), %rbp
movq %r15, 0x8(%rsp)
movq %r13, %rdi
movq %r12, %rsi
callq 0xa79320
movq 0x8(%rax), %rsi
movq %rbp, %rdi
callq 0x93eb36
testq %r15, %r15
je 0x1e912c3
testb $0x4, (%r15)
je 0x1e912c3
jmp 0x1e912ca
movq 0x8(%r15), %r15
testb $0x8, 0x2c(%r15)
jne 0x1e912bf
movq 0x8(%r15), %r15
cmpq 0x28(%rsp), %r15
jne 0x1e91250
xorl %r13d, %r13d
movl %r13d, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movl %r13d, 0x10(%rsp)
cmpl $0x0, 0x1c(%rsp)
jle 0x1e9139c
leaq 0x30(%rsp), %r14
leaq 0x10(%rsp), %r15
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x1e91cc6
testb %al, %al
je 0x1e91368
movq %rbx, %r12
movq %r14, %rdi
movq %r15, %rsi
callq 0x1e9214e
movl 0x10(%rax), %ebp
testq %rbp, %rbp
je 0x1e91370
movq 0x8(%rax), %r14
shlq $0x3, %rbp
xorl %ebx, %ebx
leaq 0x8(%rsp), %rdx
movq (%r14,%rbx), %rax
movq %rax, 0x8(%rsp)
leal 0x1(%r13), %r15d
movq %r12, %rdi
movq %rdx, %rsi
callq 0x10e9fcc
leaq 0x8(%rsp), %rdx
movl %r13d, 0x8(%rax)
addq $0x8, %rbx
movl %r15d, %r13d
cmpq %rbx, %rbp
jne 0x1e91339
jmp 0x1e91378
movl %r13d, %r15d
movq %rbx, %r12
jmp 0x1e91373
movl %r13d, %r15d
leaq 0x8(%rsp), %rdx
movl 0x10(%rsp), %eax
incl %eax
movl %eax, 0x10(%rsp)
movl %r15d, %r13d
cmpl 0x1c(%rsp), %eax
movq %r12, %rbx
leaq 0x30(%rsp), %r14
leaq 0x10(%rsp), %r15
jl 0x1e91305
leaq 0x30(%rsp), %r14
movq %r14, %rdi
callq 0x1e91c24
movq (%r14), %rdi
movl 0x10(%r14), %eax
shlq $0x3, %rax
leaq (%rax,%rax,8), %rsi
movl $0x8, %edx
callq 0x2b410f1
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/CodeGen/WindowScheduler.cpp
|
llvm::WindowScheduler::updateScheduleResult(unsigned int, unsigned int)
|
void WindowScheduler::updateScheduleResult(unsigned Offset, unsigned II) {
// At the first update, Offset is equal to SchedPhiNum. At this time, only
// BestII, BestOffset, and BaseII need to be updated.
if (Offset == SchedPhiNum) {
BestII = II;
BestOffset = SchedPhiNum;
BaseII = II;
return;
}
// The update will only continue if the II is smaller than BestII and the II
// is sufficiently small.
if ((II >= BestII) || (II + WindowDiffLimit > BaseII))
return;
BestII = II;
BestOffset = Offset;
// Record the result of the current list scheduling, noting that each MI is
// stored unordered in SchedResult.
SchedResult.clear();
auto IssueOrder = getIssueOrder(Offset, II);
for (auto &Pair : OriToCycle) {
assert(IssueOrder.count(Pair.first) && "Cannot find original MI!");
SchedResult.push_back(std::make_tuple(Pair.first, Pair.second,
getOriStage(Pair.first, Offset),
IssueOrder[Pair.first]));
}
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %edx, %ecx
movq %rdi, %rbx
movl 0x1910(%rdi), %eax
movl %esi, 0xc(%rsp)
cmpl %esi, %eax
jne 0x1e9140c
movl %ecx, 0x1918(%rbx)
movl %eax, 0x191c(%rbx)
movl %ecx, 0x1920(%rbx)
jmp 0x1e91547
cmpl %ecx, 0x1918(%rbx)
jbe 0x1e91547
movl 0x3acb5fa(%rip), %eax # 0x595ca18
addl %ecx, %eax
cmpl 0x1920(%rbx), %eax
ja 0x1e91547
movl %ecx, 0x1918(%rbx)
movl 0xc(%rsp), %edx
movl %edx, 0x191c(%rbx)
movl $0x0, 0x108(%rbx)
leaq 0x30(%rsp), %rdi
movq %rbx, %rsi
callq 0x1e9112e
movq 0xe8(%rbx), %rdx
movl 0xf8(%rbx), %ecx
movq %rcx, %rax
shlq $0x4, %rax
leaq (%rdx,%rax), %r13
cmpl $0x0, 0xf0(%rbx)
movq %r13, %r14
je 0x1e914a2
testq %rcx, %rcx
je 0x1e9149f
movl $0x1000, %ecx # imm = 0x1000
movq %rdx, %r14
movq (%r14), %rdx
orq %rcx, %rdx
cmpq $-0x1000, %rdx # imm = 0xF000
jne 0x1e914a2
addq $0x10, %r14
addq $-0x10, %rax
jne 0x1e91484
jmp 0x1e914a2
movq %rdx, %r14
movl 0xf8(%rbx), %ebp
shlq $0x4, %rbp
addq 0xe8(%rbx), %rbp
cmpq %rbp, %r14
je 0x1e91530
leaq 0x100(%rbx), %rax
movq %rax, 0x10(%rsp)
movl $0x1000, %r15d # imm = 0x1000
movq (%r14), %rsi
movq %rbx, %rdi
movl 0xc(%rsp), %edx
callq 0x1e910b2
movl %eax, %r12d
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
callq 0x10e9fcc
movl 0x8(%rax), %eax
movl 0x8(%r14), %ecx
movq (%r14), %rdx
movl %eax, 0x18(%rsp)
movl %r12d, 0x1c(%rsp)
movl %ecx, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
movq 0x10(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x1e91556
addq $0x10, %r14
cmpq %r13, %r14
je 0x1e9152b
movq (%r14), %rax
orq %r15, %rax
cmpq $-0x1000, %rax # imm = 0xF000
je 0x1e91514
cmpq %rbp, %r14
jne 0x1e914ca
movq 0x30(%rsp), %rdi
movl 0x40(%rsp), %esi
shlq $0x4, %rsi
movl $0x8, %edx
callq 0x2b410f1
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/CodeGen/WindowScheduler.cpp
|
void llvm::cl::apply<llvm::cl::opt<unsigned int, false, llvm::cl::parser<unsigned int>>, char [16], llvm::cl::desc, llvm::cl::OptionHidden, llvm::cl::initializer<int>>(llvm::cl::opt<unsigned int, false, llvm::cl::parser<unsigned int>>*, char const (&) [16], llvm::cl::desc const&, llvm::cl::OptionHidden const&, llvm::cl::initializer<int> const&)
|
void apply(Opt *O, const Mod &M, const Mods &... Ms) {
applicator<Mod>::opt(M, *O);
apply(O, Ms...);
}
|
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movq %rsi, %rdi
callq 0x7802c0
movq %r13, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x2b1f336
movups (%r15), %xmm0
movups %xmm0, 0x20(%r13)
movl (%r14), %eax
movzwl 0xa(%r13), %ecx
shll $0x5, %eax
andl $0x60, %eax
andl $-0x61, %ecx
orl %eax, %ecx
movw %cx, 0xa(%r13)
movq (%rbx), %rax
movl (%rax), %eax
movl %eax, 0x80(%r13)
movb $0x1, 0x94(%r13)
movl %eax, 0x90(%r13)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
|
/llvm/Support/CommandLine.h
|
llvm::DenseMapBase<llvm::DenseMap<int, llvm::SmallVector<llvm::MachineInstr*, 6u>, llvm::DenseMapInfo<int, void>, llvm::detail::DenseMapPair<int, llvm::SmallVector<llvm::MachineInstr*, 6u>>>, int, llvm::SmallVector<llvm::MachineInstr*, 6u>, llvm::DenseMapInfo<int, void>, llvm::detail::DenseMapPair<int, llvm::SmallVector<llvm::MachineInstr*, 6u>>>::FindAndConstruct(int&&)
|
value_type& FindAndConstruct(KeyT &&Key) {
BucketT *TheBucket;
if (LookupBucketFor(Key, TheBucket))
return *TheBucket;
return *InsertIntoBucket(TheBucket, std::move(Key));
}
|
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rsp), %r15
movq %r15, %rdx
callq 0x1e91cc6
movl %eax, %ecx
movq (%r15), %rax
testb %cl, %cl
jne 0x1e91cbc
movq %r14, %rdi
movq %rbx, %rsi
movq %rbx, %rdx
movq %rax, %rcx
callq 0x1e91d4c
movl (%rbx), %ecx
movl %ecx, (%rax)
leaq 0x18(%rax), %rcx
movq %rcx, 0x8(%rax)
movabsq $0x600000000, %rcx # imm = 0x600000000
movq %rcx, 0x10(%rax)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
|
/llvm/ADT/DenseMap.h
|
llvm::DenseMap<llvm::BasicBlock*, llvm::TinyPtrVector<llvm::BasicBlock*>, llvm::DenseMapInfo<llvm::BasicBlock*, void>, llvm::detail::DenseMapPair<llvm::BasicBlock*, llvm::TinyPtrVector<llvm::BasicBlock*>>>::operator=(llvm::DenseMap<llvm::BasicBlock*, llvm::TinyPtrVector<llvm::BasicBlock*>, llvm::DenseMapInfo<llvm::BasicBlock*, void>, llvm::detail::DenseMapPair<llvm::BasicBlock*, llvm::TinyPtrVector<llvm::BasicBlock*>>>&&)
|
DenseMap& operator=(DenseMap &&other) {
this->destroyAll();
deallocate_buffer(Buckets, sizeof(BucketT) * NumBuckets, alignof(BucketT));
init(0);
swap(other);
return *this;
}
|
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x1365d42
movq (%rbx), %rdi
movl 0x10(%rbx), %esi
shlq $0x4, %rsi
movl $0x8, %edx
callq 0x2b410f1
xorl %eax, %eax
movl %eax, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq (%r14), %rcx
movq %rcx, (%rbx)
movq $0x0, (%r14)
movl 0x8(%r14), %ecx
movl %ecx, 0x8(%rbx)
movl %eax, 0x8(%r14)
movl 0xc(%rbx), %eax
movl 0xc(%r14), %ecx
movl %ecx, 0xc(%rbx)
movl %eax, 0xc(%r14)
movl 0x10(%rbx), %eax
movl 0x10(%r14), %ecx
movl %ecx, 0x10(%rbx)
movl %eax, 0x10(%r14)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
|
/llvm/ADT/DenseMap.h
|
llvm::iterator_range<llvm::CoalescingBitVector<unsigned long>::const_iterator>::iterator_range(llvm::CoalescingBitVector<unsigned long>::const_iterator, llvm::CoalescingBitVector<unsigned long>::const_iterator)
|
iterator_range(IteratorT begin_iterator, IteratorT end_iterator)
: begin_iterator(std::move(begin_iterator)),
end_iterator(std::move(end_iterator)) {}
|
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq (%rsi), %rax
movq %rax, (%rdi)
leaq 0x18(%rdi), %rax
movq %rax, 0x8(%rdi)
movabsq $0x400000000, %r12 # imm = 0x400000000
movq %r12, 0x10(%rdi)
cmpl $0x0, 0x10(%rsi)
je 0x1ea5666
leaq 0x8(%r14), %rdi
leaq 0x8(%r15), %rsi
callq 0x1cd6ce2
movq 0x68(%r15), %rax
movq %rax, 0x68(%r14)
movups 0x58(%r15), %xmm0
movups %xmm0, 0x58(%r14)
movq (%rbx), %rax
movq %rax, 0x70(%r14)
leaq 0x88(%r14), %rax
movq %rax, 0x78(%r14)
movq %r12, 0x80(%r14)
cmpl $0x0, 0x10(%rbx)
je 0x1ea56a4
leaq 0x78(%r14), %rdi
leaq 0x8(%rbx), %rsi
callq 0x1cd6ce2
movq 0x68(%rbx), %rax
movq %rax, 0xd8(%r14)
movups 0x58(%rbx), %xmm0
movups %xmm0, 0xc8(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
/llvm/ADT/iterator_range.h
|
llvm::SmallVectorTemplateBase<(anonymous namespace)::VarLocBasedLDV::TransferDebugPair, true>::push_back((anonymous namespace)::VarLocBasedLDV::TransferDebugPair)
|
void push_back(ValueParamT Elt) {
const T *EltPtr = reserveForParamAndGetAddress(Elt);
memcpy(reinterpret_cast<void *>(this->end()), EltPtr, sizeof(T));
this->set_size(this->size() + 1);
}
|
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movl 0x8(%rdi), %edx
cmpl 0xc(%rdi), %edx
jae 0x1ea615c
movq (%r14), %rax
movl 0x8(%r14), %ecx
shlq $0x4, %rcx
movq %r15, (%rax,%rcx)
movq %rbx, 0x8(%rax,%rcx)
incl 0x8(%r14)
popq %rbx
popq %r14
popq %r15
retq
incq %rdx
leaq 0x10(%r14), %rsi
movl $0x10, %ecx
movq %r14, %rdi
callq 0x2b4ed86
jmp 0x1ea613e
|
/llvm/ADT/SmallVector.h
|
LiveDebugValues::InstrRefBasedLDV::makeDepthFirstEjectionMap(llvm::SmallVectorImpl<unsigned int>&, llvm::DenseMap<llvm::LexicalScope const*, llvm::DILocation const*, llvm::DenseMapInfo<llvm::LexicalScope const*, void>, llvm::detail::DenseMapPair<llvm::LexicalScope const*, llvm::DILocation const*>> const&, llvm::DenseMap<llvm::LexicalScope const*, llvm::SmallPtrSet<llvm::MachineBasicBlock*, 4u>, llvm::DenseMapInfo<llvm::LexicalScope const*, void>, llvm::detail::DenseMapPair<llvm::LexicalScope const*, llvm::SmallPtrSet<llvm::MachineBasicBlock*, 4u>>>&)
|
void InstrRefBasedLDV::makeDepthFirstEjectionMap(
SmallVectorImpl<unsigned> &EjectionMap,
const ScopeToDILocT &ScopeToDILocation,
ScopeToAssignBlocksT &ScopeToAssignBlocks) {
SmallPtrSet<const MachineBasicBlock *, 8> BlocksToExplore;
SmallVector<std::pair<LexicalScope *, ssize_t>, 4> WorkStack;
auto *TopScope = LS.getCurrentFunctionScope();
// Unlike lexical scope explorers, we explore in reverse order, to find the
// "last" lexical scope used for each block early.
WorkStack.push_back({TopScope, TopScope->getChildren().size() - 1});
while (!WorkStack.empty()) {
auto &ScopePosition = WorkStack.back();
LexicalScope *WS = ScopePosition.first;
ssize_t ChildNum = ScopePosition.second--;
const SmallVectorImpl<LexicalScope *> &Children = WS->getChildren();
if (ChildNum >= 0) {
// If ChildNum is positive, there are remaining children to explore.
// Push the child and its children-count onto the stack.
auto &ChildScope = Children[ChildNum];
WorkStack.push_back(
std::make_pair(ChildScope, ChildScope->getChildren().size() - 1));
} else {
WorkStack.pop_back();
// We've explored all children and any later blocks: examine all blocks
// in our scope. If they haven't yet had an ejection number set, then
// this scope will be the last to use that block.
auto DILocationIt = ScopeToDILocation.find(WS);
if (DILocationIt != ScopeToDILocation.end()) {
getBlocksForScope(DILocationIt->second, BlocksToExplore,
ScopeToAssignBlocks.find(WS)->second);
for (const auto *MBB : BlocksToExplore) {
unsigned BBNum = MBB->getNumber();
if (EjectionMap[BBNum] == 0)
EjectionMap[BBNum] = WS->getDFSOut();
}
BlocksToExplore.clear();
}
}
}
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rcx, 0x10(%rsp)
movq %rdx, %r14
movq %rsi, 0x8(%rsp)
movq %rdi, %r12
leaq 0x88(%rsp), %rax
movq %rax, -0x20(%rax)
movq %rax, -0x18(%rax)
movq $0x8, -0x10(%rax)
movl $0x0, -0x8(%rax)
leaq 0x28(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movabsq $0x400000000, %rax # imm = 0x400000000
movq %rax, -0x8(%rcx)
movq 0x160(%rdi), %rsi
movl 0x28(%rsi), %edx
decq %rdx
leaq 0x18(%rsp), %r15
movq %r15, %rdi
callq 0x1eb0ff6
movl 0x8(%r15), %eax
testl %eax, %eax
je 0x1eb0fbe
leaq 0x18(%rsp), %r13
leaq 0x68(%rsp), %rbp
movq 0x18(%rsp), %rdx
movl %eax, %esi
shlq $0x4, %rsi
movq -0x10(%rdx,%rsi), %r15
movq -0x8(%rdx,%rsi), %rcx
leaq -0x1(%rcx), %rdi
movq %rdi, -0x8(%rdx,%rsi)
testq %rcx, %rcx
js 0x1eb0ef1
movq 0x20(%r15), %rax
movq (%rax,%rcx,8), %rsi
movl 0x28(%rsi), %edx
decq %rdx
movq %r13, %rdi
callq 0x1eb0ff6
jmp 0x1eb0fb2
decl %eax
movl %eax, 0x20(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x1eb1040
movl 0x10(%r14), %ecx
shlq $0x4, %rcx
addq (%r14), %rcx
cmpq %rcx, %rax
je 0x1eb0fb2
movq 0x8(%rax), %rbx
movq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0x1eb1082
leaq 0x8(%rax), %rcx
movq %r12, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
callq 0x1eaf3fa
movq 0x70(%rsp), %rcx
xorl %eax, %eax
cmpq 0x68(%rsp), %rcx
sete %al
movl 0x78(%rsp,%rax,4), %edx
movq %rcx, %rax
testq %rdx, %rdx
je 0x1eb0f6f
leaq (,%rdx,8), %rsi
movq %rcx, %rax
cmpq $-0x2, (%rax)
jb 0x1eb0f6f
addq $0x8, %rax
addq $-0x8, %rsi
jne 0x1eb0f5f
leaq (%rcx,%rdx,8), %rcx
cmpq %rcx, %rax
je 0x1eb0faa
movq 0x8(%rsp), %rdx
movq (%rdx), %rdx
movq (%rax), %rsi
movl 0x18(%rsi), %esi
cmpl $0x0, (%rdx,%rsi,4)
jne 0x1eb0f96
movl 0xb4(%r15), %edi
movl %edi, (%rdx,%rsi,4)
addq $0x8, %rax
cmpq %rcx, %rax
je 0x1eb0fa5
cmpq $-0x2, (%rax)
jae 0x1eb0f96
cmpq %rcx, %rax
jne 0x1eb0f80
movq %rbp, %rdi
callq 0xbb675c
movl 0x20(%rsp), %eax
testl %eax, %eax
jne 0x1eb0eb3
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x1eb0fd2
callq 0x780910
movq 0x70(%rsp), %rdi
cmpq 0x68(%rsp), %rdi
je 0x1eb0fe3
callq 0x780910
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
|
/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
|
llvm::DenseMapBase<llvm::DenseMap<std::pair<unsigned short, unsigned short>, unsigned int, llvm::DenseMapInfo<std::pair<unsigned short, unsigned short>, void>, llvm::detail::DenseMapPair<std::pair<unsigned short, unsigned short>, unsigned int>>, std::pair<unsigned short, unsigned short>, unsigned int, llvm::DenseMapInfo<std::pair<unsigned short, unsigned short>, void>, llvm::detail::DenseMapPair<std::pair<unsigned short, unsigned short>, unsigned int>>::FindAndConstruct(std::pair<unsigned short, unsigned short> const&)
|
value_type& FindAndConstruct(const KeyT &Key) {
BucketT *TheBucket;
if (LookupBucketFor(Key, TheBucket))
return *TheBucket;
return *InsertIntoBucket(TheBucket, Key);
}
|
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rsp), %r15
movq %r15, %rdx
callq 0x1eb7f5c
movl %eax, %ecx
movq (%r15), %rax
testb %cl, %cl
jne 0x1eb7f51
movq %r14, %rdi
movq %rbx, %rsi
movq %rbx, %rdx
movq %rax, %rcx
callq 0x1eb803a
movl (%rbx), %ecx
movl %ecx, (%rax)
movl $0x0, 0x4(%rax)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
|
/llvm/ADT/DenseMap.h
|
std::pair<llvm::DenseMapIterator<std::pair<llvm::MachineInstr*, unsigned int>, std::optional<LiveDebugValues::ValueIDNum>, llvm::DenseMapInfo<std::pair<llvm::MachineInstr*, unsigned int>, void>, llvm::detail::DenseMapPair<std::pair<llvm::MachineInstr*, unsigned int>, std::optional<LiveDebugValues::ValueIDNum>>, false>, bool> llvm::DenseMapBase<llvm::DenseMap<std::pair<llvm::MachineInstr*, unsigned int>, std::optional<LiveDebugValues::ValueIDNum>, llvm::DenseMapInfo<std::pair<llvm::MachineInstr*, unsigned int>, void>, llvm::detail::DenseMapPair<std::pair<llvm::MachineInstr*, unsigned int>, std::optional<LiveDebugValues::ValueIDNum>>>, std::pair<llvm::MachineInstr*, unsigned int>, std::optional<LiveDebugValues::ValueIDNum>, llvm::DenseMapInfo<std::pair<llvm::MachineInstr*, unsigned int>, void>, llvm::detail::DenseMapPair<std::pair<llvm::MachineInstr*, unsigned int>, std::optional<LiveDebugValues::ValueIDNum>>>::try_emplace<std::optional<LiveDebugValues::ValueIDNum>>(std::pair<llvm::MachineInstr*, unsigned int>&&, std::optional<LiveDebugValues::ValueIDNum>&&)
|
std::pair<iterator, bool> try_emplace(KeyT &&Key, Ts &&... Args) {
BucketT *TheBucket;
if (LookupBucketFor(Key, TheBucket))
return std::make_pair(makeIterator(TheBucket,
shouldReverseIterate<KeyT>()
? getBuckets()
: getBucketsEnd(),
*this, true),
false); // Already in map.
// Otherwise, insert the new element.
TheBucket =
InsertIntoBucket(TheBucket, std::move(Key), std::forward<Ts>(Args)...);
return std::make_pair(makeIterator(TheBucket,
shouldReverseIterate<KeyT>()
? getBuckets()
: getBucketsEnd(),
*this, true),
true);
}
|
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %r13
movq %rsi, %rdi
movq %rdx, %rsi
movq %r13, %rdx
callq 0x1ec2d8e
movl %eax, %ecx
movq (%r13), %rax
testb %cl, %cl
je 0x1ec2ea8
xorl %ecx, %ecx
jmp 0x1ec2ed2
movq %r14, %rdi
movq %r12, %rsi
movq %r12, %rdx
movq %rax, %rcx
callq 0x1ec2ef8
movq (%r12), %rcx
movq %rcx, (%rax)
movl 0x8(%r12), %ecx
movl %ecx, 0x8(%rax)
movups (%r15), %xmm0
movups %xmm0, 0x10(%rax)
movb $0x1, %cl
movl 0x10(%r14), %edx
shlq $0x5, %rdx
addq (%r14), %rdx
movq %rax, (%rbx)
movq %rdx, 0x8(%rbx)
movb %cl, 0x10(%rbx)
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
|
/llvm/ADT/DenseMap.h
|
llvm::DenseMapBase<llvm::DenseMap<llvm::DomTreeNodeBase<llvm::MachineBasicBlock>*, unsigned int, llvm::DenseMapInfo<llvm::DomTreeNodeBase<llvm::MachineBasicBlock>*, void>, llvm::detail::DenseMapPair<llvm::DomTreeNodeBase<llvm::MachineBasicBlock>*, unsigned int>>, llvm::DomTreeNodeBase<llvm::MachineBasicBlock>*, unsigned int, llvm::DenseMapInfo<llvm::DomTreeNodeBase<llvm::MachineBasicBlock>*, void>, llvm::detail::DenseMapPair<llvm::DomTreeNodeBase<llvm::MachineBasicBlock>*, unsigned int>>::FindAndConstruct(llvm::DomTreeNodeBase<llvm::MachineBasicBlock>*&&)
|
value_type& FindAndConstruct(KeyT &&Key) {
BucketT *TheBucket;
if (LookupBucketFor(Key, TheBucket))
return *TheBucket;
return *InsertIntoBucket(TheBucket, std::move(Key));
}
|
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rsp), %r15
movq %r15, %rdx
callq 0x1d1efe6
movl %eax, %ecx
movq (%r15), %rax
testb %cl, %cl
jne 0x1ede13f
movq %r14, %rdi
movq %rbx, %rsi
movq %rbx, %rdx
movq %rax, %rcx
callq 0x1d1f078
movq (%rbx), %rcx
movq %rcx, (%rax)
movl $0x0, 0x8(%rax)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
|
/llvm/ADT/DenseMap.h
|
llvm::InterferenceCache::reinitPhysRegEntries()
|
void InterferenceCache::reinitPhysRegEntries() {
if (PhysRegEntriesCount == TRI->getNumRegs()) return;
free(PhysRegEntries);
PhysRegEntriesCount = TRI->getNumRegs();
PhysRegEntries = static_cast<unsigned char*>(
safe_calloc(PhysRegEntriesCount, sizeof(unsigned char)));
}
|
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %rax
movl 0x10(%rax), %eax
cmpq %rax, 0x20(%rdi)
je 0x1ede7b5
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
callq 0x780910
movq (%rbx), %rax
movl 0x10(%rax), %r14d
movq %r14, 0x20(%rbx)
movl $0x1, %esi
movq %r14, %rdi
callq 0x780de0
testq %rax, %rax
jne 0x1ede7b1
testl %r14d, %r14d
jne 0x1ede7bd
movl $0x1, %edi
callq 0x780ec0
testq %rax, %rax
je 0x1ede7bd
movq %rax, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x1524a6e(%rip), %rdi # 0x3403232
movl $0x1, %esi
callq 0x2b31d36
|
/CodeGen/InterferenceCache.cpp
|
llvm::SmallVectorTemplateBase<llvm::InterferenceCache::Entry::RegUnitInfo, false>::push_back(llvm::InterferenceCache::Entry::RegUnitInfo&&)
|
void push_back(T &&Elt) {
T *EltPtr = reserveForParamAndGetAddress(Elt);
::new ((void *)this->end()) T(::std::move(*EltPtr));
this->set_size(this->size() + 1);
}
|
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x1, %edx
callq 0x1edf3d4
movq %rax, %r14
movq (%rbx), %rax
movl 0x8(%rbx), %ecx
imulq $0x70, %rcx, %rcx
leaq (%rax,%rcx), %r15
movq (%r14), %rdx
leaq (%rax,%rcx), %rsi
addq $0x18, %rsi
movq %rdx, -0x18(%rsi)
movq %rsi, -0x10(%rsi)
movabsq $0x400000000, %rdx # imm = 0x400000000
movq %rdx, -0x8(%rsi)
cmpl $0x0, 0x10(%r14)
je 0x1edebd9
leaq (%rax,%rcx), %rdi
addq $0x8, %rdi
movq %r14, %rsi
addq $0x8, %rsi
callq 0x1cd6ce2
movq 0x68(%r14), %rax
movq %rax, 0x68(%r15)
movups 0x58(%r14), %xmm0
movups %xmm0, 0x58(%r15)
incl 0x8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
|
/llvm/ADT/SmallVector.h
|
llvm::LiveIntervalUnion::Query::collectInterferingVRegs(unsigned int)
|
unsigned
LiveIntervalUnion::Query::collectInterferingVRegs(unsigned MaxInterferingRegs) {
// Fast path return if we already have the desired information.
if (SeenAllInterferences || InterferingVRegs.size() >= MaxInterferingRegs)
return InterferingVRegs.size();
// Set up iterators on the first call.
if (!CheckedFirstInterference) {
CheckedFirstInterference = true;
// Quickly skip interference check for empty sets.
if (LR->empty() || LiveUnion->empty()) {
SeenAllInterferences = true;
return 0;
}
// In most cases, the union will start before LR.
LRI = LR->begin();
LiveUnionI.setMap(LiveUnion->getMap());
LiveUnionI.find(LRI->start);
}
LiveRange::const_iterator LREnd = LR->end();
const LiveInterval *RecentReg = nullptr;
while (LiveUnionI.valid()) {
assert(LRI != LREnd && "Reached end of LR");
// Check for overlapping interference.
while (LRI->start < LiveUnionI.stop() && LRI->end > LiveUnionI.start()) {
// This is an overlap, record the interfering register.
const LiveInterval *VReg = LiveUnionI.value();
if (VReg != RecentReg && !isSeenInterference(VReg)) {
RecentReg = VReg;
InterferingVRegs.push_back(VReg);
if (InterferingVRegs.size() >= MaxInterferingRegs)
return InterferingVRegs.size();
}
// This LiveUnion segment is no longer interesting.
if (!(++LiveUnionI).valid()) {
SeenAllInterferences = true;
return InterferingVRegs.size();
}
}
// The iterators are now not overlapping, LiveUnionI has been advanced
// beyond LRI.
assert(LRI->end <= LiveUnionI.start() && "Expected non-overlap");
// Advance the iterator that ends first.
LRI = LR->advanceTo(LRI, LiveUnionI.start());
if (LRI == LREnd)
break;
// Detect overlap, handle above.
if (LRI->start < LiveUnionI.stop())
continue;
// Still not overlapping. Catch up LiveUnionI.
LiveUnionI.advanceTo(LRI->start);
}
SeenAllInterferences = true;
return InterferingVRegs.size();
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
cmpb $0x0, 0xa1(%rdi)
jne 0x1ee049c
movl %esi, %ebp
cmpl %esi, 0x78(%rbx)
jae 0x1ee049c
cmpb $0x0, 0xa0(%rbx)
jne 0x1ee029a
movb $0x1, 0xa0(%rbx)
movq 0x8(%rbx), %rax
cmpl $0x0, 0x8(%rax)
je 0x1ee04ae
movq (%rbx), %rcx
cmpl $0x0, 0xcc(%rcx)
je 0x1ee04ae
movq (%rax), %rax
movq %rax, 0x10(%rbx)
leaq 0x18(%rbx), %rdi
addq $0x8, %rcx
movq %rcx, 0x18(%rbx)
movq (%rax), %rsi
callq 0x1e0d996
cmpl $0x0, 0x28(%rbx)
je 0x1ee0495
movq 0x8(%rbx), %rax
movl 0x8(%rax), %ecx
leaq (%rcx,%rcx,2), %rcx
shlq $0x3, %rcx
addq (%rax), %rcx
movq %rcx, (%rsp)
leaq 0x70(%rbx), %rax
movq %rax, 0x8(%rsp)
leaq 0x18(%rbx), %r15
xorl %r14d, %r14d
movq 0x20(%rbx), %rax
movl 0xc(%rax), %ecx
cmpl 0x8(%rax), %ecx
jae 0x1ee0495
movq 0x10(%rbx), %rsi
movq 0x20(%rbx), %rax
movl 0x28(%rbx), %ecx
shlq $0x4, %rcx
movq -0x10(%rax,%rcx), %rdx
movl -0x4(%rax,%rcx), %eax
movq (%rsi), %rcx
movq %rcx, %rdi
andq $-0x8, %rdi
shrl %ecx
andl $0x3, %ecx
orl 0x18(%rdi), %ecx
shlq $0x4, %rax
movq 0x8(%rdx,%rax), %rax
movq %rax, %rdx
andq $-0x8, %rdx
shrl %eax
andl $0x3, %eax
orl 0x18(%rdx), %eax
cmpl %eax, %ecx
jae 0x1ee0410
movl 0x28(%rbx), %eax
movq 0x20(%rbx), %rcx
shlq $0x4, %rax
movq -0x10(%rcx,%rax), %rdx
movl -0x4(%rcx,%rax), %eax
movq 0x8(%rsi), %rcx
movq %rcx, %rdi
andq $-0x8, %rdi
shrl %ecx
andl $0x3, %ecx
orl 0x18(%rdi), %ecx
shlq $0x4, %rax
movq (%rdx,%rax), %rax
movq %rax, %rdx
andq $-0x8, %rdx
shrl %eax
andl $0x3, %eax
orl 0x18(%rdx), %eax
cmpl %eax, %ecx
jbe 0x1ee0410
movl 0x28(%rbx), %eax
movq 0x20(%rbx), %rcx
shlq $0x4, %rax
movq -0x10(%rcx,%rax), %rdx
movl -0x4(%rcx,%rax), %eax
movq 0x80(%rdx,%rax,8), %r13
cmpq %r14, %r13
je 0x1ee03cc
movq %r13, 0x10(%rsp)
movq 0x70(%rbx), %rdi
movl 0x78(%rbx), %eax
leaq (%rdi,%rax,8), %rsi
leaq 0x10(%rsp), %rdx
callq 0x1e0f4a8
movl 0x78(%rbx), %ecx
shlq $0x3, %rcx
addq 0x70(%rbx), %rcx
cmpq %rcx, %rax
jne 0x1ee03cc
movq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0x1dfd768
movl 0x78(%rbx), %eax
cmpl %ebp, %eax
jae 0x1ee0409
movq %r13, %r14
movq %r15, %rdi
callq 0x1e0f206
cmpl $0x0, 0x10(%rax)
je 0x1ee03ed
movq 0x8(%rax), %rax
movl 0xc(%rax), %edx
movb $0x1, %cl
cmpl 0x8(%rax), %edx
jae 0x1ee03ed
movl %r12d, %eax
jmp 0x1ee03f9
movb $0x1, 0xa1(%rbx)
movl 0x78(%rbx), %eax
xorl %ecx, %ecx
movl %eax, %r12d
testb %cl, %cl
jne 0x1ee02da
jmp 0x1ee049f
xorl %ecx, %ecx
movq %r13, %r14
jmp 0x1ee03f9
movl 0x28(%rbx), %eax
movq 0x8(%rbx), %rdi
movq 0x20(%rbx), %rcx
shlq $0x4, %rax
movq -0x10(%rcx,%rax), %rdx
movl -0x4(%rcx,%rax), %eax
shlq $0x4, %rax
movq (%rdx,%rax), %rdx
callq 0x1cdd11a
movq %rax, 0x10(%rbx)
cmpq (%rsp), %rax
je 0x1ee0495
movl 0x28(%rbx), %ecx
movq 0x20(%rbx), %rdx
shlq $0x4, %rcx
movq -0x10(%rdx,%rcx), %rdi
movl -0x4(%rdx,%rcx), %ecx
movq (%rax), %rsi
movq %rsi, %rax
andq $-0x8, %rax
movl %esi, %edx
shrl %edx
andl $0x3, %edx
orl 0x18(%rax), %edx
shlq $0x4, %rcx
movq 0x8(%rdi,%rcx), %rax
movq %rax, %rcx
andq $-0x8, %rcx
shrl %eax
andl $0x3, %eax
orl 0x18(%rcx), %eax
cmpl %eax, %edx
jb 0x1ee048b
movq %r15, %rdi
callq 0x1edf2e0
cmpl $0x0, 0x28(%rbx)
jne 0x1ee02ca
movb $0x1, 0xa1(%rbx)
movl 0x78(%rbx), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, 0xa1(%rbx)
xorl %eax, %eax
jmp 0x1ee049f
nop
|
/CodeGen/LiveIntervalUnion.cpp
|
llvm::IntervalMap<llvm::SlotIndex, llvm::LiveInterval const*, 8u, llvm::IntervalMapInfo<llvm::SlotIndex>>::iterator::insertNode(unsigned int, llvm::IntervalMapImpl::NodeRef, llvm::SlotIndex)
|
bool IntervalMap<KeyT, ValT, N, Traits>::
iterator::insertNode(unsigned Level, IntervalMapImpl::NodeRef Node, KeyT Stop) {
assert(Level && "Cannot insert next to the root");
bool SplitRoot = false;
IntervalMap &IM = *this->map;
IntervalMapImpl::Path &P = this->path;
if (Level == 1) {
// Insert into the root branch node.
if (IM.rootSize < RootBranch::Capacity) {
IM.rootBranch().insert(P.offset(0), IM.rootSize, Node, Stop);
P.setSize(0, ++IM.rootSize);
P.reset(Level);
return SplitRoot;
}
// We need to split the root while keeping our position.
SplitRoot = true;
IdxPair Offset = IM.splitRoot(P.offset(0));
P.replaceRoot(&IM.rootBranch(), IM.rootSize, Offset);
// Fall through to insert at the new higher level.
++Level;
}
// When inserting before end(), make sure we have a valid path.
P.legalizeForInsert(--Level);
// Insert into the branch node at Level-1.
if (P.size(Level) == Branch::Capacity) {
// Branch node is full, handle the overflow.
assert(!SplitRoot && "Cannot overflow after splitting the root");
SplitRoot = overflow<Branch>(Level);
Level += SplitRoot;
}
P.node<Branch>(Level).insert(P.offset(Level), P.size(Level), Node, Stop);
P.setSize(Level, P.size(Level) + 1);
if (P.atLastEntry(Level))
setNodeStop(Level, Stop);
P.reset(Level + 1);
return SplitRoot;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movl %esi, %r13d
movq %rdi, %r15
leaq 0x8(%rdi), %rbx
cmpl $0x1, %esi
sete %bpl
jne 0x1ee1344
movq (%r15), %r13
movl 0xc4(%r13), %edi
cmpl $0xa, %edi
ja 0x1ee1311
movq (%rbx), %rax
movl 0xc(%rax), %eax
cmpl %eax, %edi
je 0x1ee12cd
movl %edi, %edx
leal -0x1(%rdi), %esi
movq 0x8(%r13,%rsi,8), %rdi
movq %rdi, 0x8(%r13,%rdx,8)
movq 0x60(%r13,%rsi,8), %rdi
movq %rdi, 0x60(%r13,%rdx,8)
movl %esi, %edi
cmpl %esi, %eax
jne 0x1ee12ae
movq %r12, 0x8(%r13,%rax,8)
movq %rcx, 0x60(%r13,%rax,8)
movl 0xc4(%r13), %eax
incl %eax
movl %eax, 0xc4(%r13)
movq (%rbx), %rcx
movl %eax, 0x8(%rcx)
movl 0xc(%rcx), %eax
movq (%rcx), %rdx
movq (%rdx,%rax,8), %rax
movq %rax, %rdx
andq $-0x40, %rdx
andl $0x3f, %eax
incl %eax
movq %rdx, 0x10(%rcx)
movl %eax, 0x18(%rcx)
xorl %ebp, %ebp
jmp 0x1ee1451
movq (%rbx), %rax
movl 0xc(%rax), %esi
movq %r13, %rdi
movq %rcx, %r14
callq 0x1ee15b4
movl 0xc4(%r13), %edx
addq $0x8, %r13
movq %rbx, %rdi
movq %r13, %rsi
movq %rax, %rcx
callq 0x2b36354
movq %r14, %rcx
movl $0x2, %r13d
movl %ebp, 0x4(%rsp)
movq %r12, %rbp
movq %rcx, %r12
decl %r13d
movq %rbx, %rdi
movl %r13d, %esi
callq 0x16f0b8e
movq (%rbx), %rax
movq %r13, %rcx
shlq $0x4, %rcx
cmpl $0xc, 0x8(%rax,%rcx)
jne 0x1ee1385
movq %r15, %rdi
movl %r13d, %esi
callq 0x1ee166a
movl %eax, 0x4(%rsp)
movzbl %al, %eax
addl %r13d, %eax
movl %eax, %r13d
movl %r13d, %r14d
movq (%rbx), %rdx
movq %r14, %r13
shlq $0x4, %r13
movq (%rdx,%r13), %rax
movl 0xc(%rdx,%r13), %ecx
movl 0x8(%rdx,%r13), %r8d
cmpl %ecx, %r8d
je 0x1ee13c5
movl %r8d, %esi
leal -0x1(%r8), %edi
movq (%rax,%rdi,8), %r8
movq %r8, (%rax,%rsi,8)
movq 0x60(%rax,%rdi,8), %r8
movq %r8, 0x60(%rax,%rsi,8)
movl %edi, %r8d
cmpl %edi, %ecx
jne 0x1ee13a5
movq %rbp, (%rax,%rcx,8)
movq %r12, 0x60(%rax,%rcx,8)
movq (%rbx), %rcx
movl 0x8(%rcx,%r13), %eax
leal 0x1(%rax), %esi
movl %esi, 0x8(%rcx,%r13)
testq %r14, %r14
je 0x1ee1402
leal -0x1(%r14), %edi
shlq $0x4, %rdi
movl 0xc(%rcx,%rdi), %esi
movq (%rcx,%rdi), %rcx
movq (%rcx,%rsi,8), %rdi
andq $-0x40, %rdi
orq %rax, %rdi
movq %rdi, (%rcx,%rsi,8)
movq (%rbx), %rax
movl 0x8(%rax,%r13), %ecx
decl %ecx
cmpl %ecx, 0xc(%rax,%r13)
movl 0x4(%rsp), %ebp
jne 0x1ee1425
movq %r15, %rdi
movl %r14d, %esi
movq %r12, %rdx
callq 0x1ee0b04
incl %r14d
movq (%rbx), %rax
movl 0xc(%rax,%r13), %ecx
movq (%rax,%r13), %rdx
movq (%rdx,%rcx,8), %rcx
shlq $0x4, %r14
movq %rcx, %rdx
andq $-0x40, %rdx
andl $0x3f, %ecx
incl %ecx
movq %rdx, (%rax,%r14)
movl %ecx, 0x8(%rax,%r14)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/llvm/ADT/IntervalMap.h
|
llvm::LiveRangeEdit::eliminateDeadDefs(llvm::SmallVectorImpl<llvm::MachineInstr*>&, llvm::ArrayRef<llvm::Register>)
|
void LiveRangeEdit::eliminateDeadDefs(SmallVectorImpl<MachineInstr *> &Dead,
ArrayRef<Register> RegsBeingSpilled) {
ToShrinkSet ToShrink;
for (;;) {
// Erase all dead defs.
while (!Dead.empty())
eliminateDeadDef(Dead.pop_back_val(), ToShrink);
if (ToShrink.empty())
break;
// Shrink just one live interval. Then delete new dead defs.
LiveInterval *LI = ToShrink.pop_back_val();
if (foldAsLoad(LI, Dead))
continue;
Register VReg = LI->reg();
if (TheDelegate)
TheDelegate->LRE_WillShrinkVirtReg(VReg);
if (!LIS.shrinkToUses(LI, &Dead))
continue;
// Don't create new intervals for a register being spilled.
// The new intervals would have to be spilled anyway so its not worth it.
// Also they currently aren't spilled so creating them and not spilling
// them results in incorrect code.
if (llvm::is_contained(RegsBeingSpilled, VReg))
continue;
// LI may have been separated, create new intervals.
LI->RenumberValues();
SmallVector<LiveInterval*, 8> SplitLIs;
LIS.splitSeparateComponents(*LI, SplitLIs);
if (!SplitLIs.empty())
++NumFracRanges;
Register Original = VRM ? VRM->getOriginal(VReg) : Register();
for (const LiveInterval *SplitLI : SplitLIs) {
// If LI is an original interval that hasn't been split yet, make the new
// intervals their own originals instead of referring to LI. The original
// interval must contain all the split products, and LI doesn't.
if (Original != VReg && Original != 0)
VRM->setIsSplitFromReg(SplitLI->reg(), Original);
if (TheDelegate)
TheDelegate->LRE_DidCloneVirtReg(SplitLI->reg(), VReg);
}
}
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorps %xmm0, %xmm0
leaq 0xa8(%rsp), %rax
movaps %xmm0, -0x28(%rax)
movl $0x0, -0x18(%rax)
movq %rax, -0x10(%rax)
movabsq $0x800000000, %rdx # imm = 0x800000000
movq %rdx, -0x8(%rax)
leaq (%rbx,%rcx,4), %r12
leaq 0x80(%rsp), %r13
movq %rbx, 0x20(%rsp)
movq %r12, 0x18(%rsp)
movl 0x8(%r14), %eax
testl %eax, %eax
je 0x1ee2c15
movq (%r14), %rcx
movl %eax, %edx
movq -0x8(%rcx,%rdx,8), %rsi
decl %eax
movl %eax, 0x8(%r14)
movq %r15, %rdi
movq %r13, %rdx
callq 0x1ee23be
jmp 0x1ee2bf0
movl 0xa0(%rsp), %eax
movq 0x98(%rsp), %rdi
testq %rax, %rax
je 0x1ee2d7f
leaq (%rdi,%rax,8), %rsi
addq $-0x8, %rsi
movq (%rsi), %rbp
movq %r13, %rdi
callq 0x1ee329a
decl 0xa0(%rsp)
movq %r15, %rdi
movq %rbp, %rsi
movq %r14, %rdx
callq 0x1ee20e2
testb %al, %al
jne 0x1ee2bf0
movl 0x70(%rbp), %esi
movl %esi, 0xc(%rsp)
movq 0x38(%r15), %rdi
testq %rdi, %rdi
je 0x1ee2c6f
movq (%rdi), %rax
callq *0x28(%rax)
movq 0x20(%r15), %rdi
movq %rbp, %rsi
movq %r14, %rdx
callq 0x1cdc0b8
testb %al, %al
je 0x1ee2bf0
movq %rbx, %rdi
movq %r12, %rsi
leaq 0xc(%rsp), %rdx
callq 0xbe0938
cmpq %r12, %rax
jne 0x1ee2bf0
movq %rbp, %rdi
callq 0x1ce002e
leaq 0x40(%rsp), %rax
movq %rax, 0x30(%rsp)
movabsq $0x800000000, %rax # imm = 0x800000000
movq %rax, 0x38(%rsp)
movq 0x20(%r15), %rdi
movq %rbp, %rsi
leaq 0x30(%rsp), %rdx
callq 0x1cdba84
movq 0x28(%r15), %rax
testq %rax, %rax
je 0x1ee2cf7
movl 0xc(%rsp), %ecx
movl %ecx, %edx
andl $0x7fffffff, %edx # imm = 0x7FFFFFFF
movq 0x88(%rax), %rax
movl (%rax,%rdx,4), %ebp
testl %ebp, %ebp
cmovel %ecx, %ebp
jmp 0x1ee2cf9
xorl %ebp, %ebp
movl 0x38(%rsp), %eax
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x1ee2d5c
movq 0x30(%rsp), %rax
movq %rax, 0x28(%rsp)
shlq $0x3, 0x10(%rsp)
xorl %r12d, %r12d
movq 0x28(%rsp), %rax
movq (%rax,%r12), %rbx
testl %ebp, %ebp
je 0x1ee2d3b
cmpl 0xc(%rsp), %ebp
je 0x1ee2d3b
movq 0x28(%r15), %rdi
movl 0x70(%rbx), %esi
movl %ebp, %edx
callq 0x1e4cf26
movq 0x38(%r15), %rdi
testq %rdi, %rdi
je 0x1ee2d51
movl 0x70(%rbx), %esi
movl 0xc(%rsp), %edx
movq (%rdi), %rax
callq *0x30(%rax)
addq $0x8, %r12
cmpq %r12, 0x10(%rsp)
jne 0x1ee2d1a
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x1ee2d70
callq 0x780910
movq 0x20(%rsp), %rbx
movq 0x18(%rsp), %r12
jmp 0x1ee2bf0
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x1ee2d91
callq 0x780910
movq 0x80(%rsp), %rdi
movl 0x90(%rsp), %esi
shlq $0x3, %rsi
movl $0x8, %edx
callq 0x2b410f1
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/CodeGen/LiveRangeEdit.cpp
|
llvm::DenseMap<llvm::LiveInterval*, llvm::detail::DenseSetEmpty, llvm::DenseMapInfo<llvm::LiveInterval*, void>, llvm::detail::DenseSetPair<llvm::LiveInterval*>>::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), %eax
movl %eax, %ecx
shrl %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x2, %eax
orl %ecx, %eax
movl %eax, %ecx
shrl $0x4, %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x8, %eax
orl %ecx, %eax
movl %eax, %ecx
shrl $0x10, %ecx
orl %eax, %ecx
incl %ecx
cmpl $0x41, %ecx
movl $0x40, %edi
cmovael %ecx, %edi
movl %edi, 0x10(%r15)
shlq $0x3, %rdi
movl $0x8, %esi
callq 0x2b410ec
movq %rax, (%r15)
testq %r14, %r14
je 0x1ee30b2
leaq (%r14,%rbx,8), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x1ee3174
shlq $0x3, %rbx
movl $0x8, %edx
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x2b410f1
movq $0x0, 0x8(%r15)
movl 0x10(%r15), %ecx
testq %rcx, %rcx
je 0x1ee316d
movabsq $0x1fffffffffffffff, %rdx # imm = 0x1FFFFFFFFFFFFFFF
addq %rdx, %rcx
andq %rcx, %rdx
andl $0x1, %ecx
negq %rcx
addq %rdx, %rcx
addq $0x2, %rcx
movq %rdx, %xmm0
pshufd $0x44, %xmm0, %xmm0 # xmm0 = xmm0[0,1,0,1]
xorl %edx, %edx
movdqa 0xcd1f28(%rip), %xmm1 # 0x2bb5020
movdqa 0xcd1f30(%rip), %xmm2 # 0x2bb5030
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movq %rdx, %xmm4
pshufd $0x44, %xmm4, %xmm4 # xmm4 = xmm4[0,1,0,1]
por %xmm1, %xmm4
pxor %xmm2, %xmm4
movdqa %xmm4, %xmm5
pcmpgtd %xmm0, %xmm5
pcmpeqd %xmm0, %xmm4
pshufd $0xf5, %xmm4, %xmm6 # xmm6 = xmm4[1,1,3,3]
pand %xmm5, %xmm6
pshufd $0xf5, %xmm5, %xmm4 # xmm4 = xmm5[1,1,3,3]
por %xmm6, %xmm4
movd %xmm4, %esi
notl %esi
testb $0x1, %sil
je 0x1ee314c
movq $-0x1000, (%rax,%rdx,8) # imm = 0xF000
pxor %xmm3, %xmm4
pextrw $0x4, %xmm4, %esi
testb $0x1, %sil
je 0x1ee3164
movq $-0x1000, 0x8(%rax,%rdx,8) # imm = 0xF000
addq $0x2, %rdx
cmpq %rdx, %rcx
jne 0x1ee3108
popq %rbx
popq %r14
popq %r15
retq
nop
|
/llvm/ADT/DenseMap.h
|
llvm::GenericConvergenceVerifier<llvm::GenericSSAContext<llvm::MachineFunction>>::findAndCheckConvergenceTokenUsed(llvm::MachineInstr const&)
|
const MachineInstr *
GenericConvergenceVerifier<MachineSSAContext>::findAndCheckConvergenceTokenUsed(
const MachineInstr &MI) {
const MachineRegisterInfo &MRI = Context.getFunction()->getRegInfo();
const MachineInstr *TokenDef = nullptr;
for (const MachineOperand &MO : MI.operands()) {
if (!MO.isReg() || !MO.isUse())
continue;
Register OpReg = MO.getReg();
if (!OpReg.isVirtual())
continue;
const MachineInstr *Def = MRI.getUniqueVRegDef(OpReg);
if (!Def)
continue;
if (getConvOp(*Def) == CONV_NONE)
continue;
CheckOrNull(
MI.isConvergent(),
"Convergence control tokens can only be used by convergent operations.",
{Context.print(OpReg), Context.print(&MI)});
CheckOrNull(!TokenDef,
"An operation can use at most one convergence control token.",
{Context.print(OpReg), Context.print(&MI)});
TokenDef = Def;
}
if (TokenDef)
Tokens[&MI] = TokenDef;
return TokenDef;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, %r14
movzwl 0x28(%rsi), %eax
movzbl 0x2a(%rsi), %ebx
shll $0x10, %ebx
orl %eax, %ebx
testl %ebx, %ebx
sete %r13b
movq %rdi, 0x8(%rsp)
je 0x1ee4a5c
leaq 0x80(%rdi), %rax
movq %rax, 0x10(%rsp)
movq 0x80(%rdi), %rax
movq 0x28(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x20(%r14), %r12
shll $0x5, %ebx
addq %r12, %rbx
movq $0x0, (%rsp)
testl $0x10000ff, (%r12) # imm = 0x10000FF
jne 0x1ee48e9
movl 0x4(%r12), %ebp
testl %ebp, %ebp
js 0x1ee490d
movl $0x3, %eax
cmpl $0x3, %eax
je 0x1ee48fb
testl %eax, %eax
jne 0x1ee4a64
addq $0x20, %r12
cmpq %rbx, %r12
sete %r13b
jne 0x1ee48d6
jmp 0x1ee4a64
movq 0x18(%rsp), %rdi
movl %ebp, %esi
callq 0x1d835be
testq %rax, %rax
je 0x1ee48e9
movq %rax, %r15
movl 0x44(%rax), %eax
addl $-0x2c, %eax
cmpw $0x2, %ax
ja 0x1ee48e9
movq %r14, %rdi
movl $0x1, %esi
callq 0x158fb86
testb %al, %al
je 0x1ee49cb
cmpq $0x0, (%rsp)
je 0x1ee4a51
leaq 0x306a4ae(%rip), %rax # 0x4f4ee02
movq %rax, 0x20(%rsp)
movw $0x103, 0x40(%rsp) # imm = 0x103
leaq 0x48(%rsp), %rdi
movq 0x10(%rsp), %r15
movq %r15, %rsi
movl %ebp, %edx
callq 0x1d9b738
leaq 0x68(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1d9b70c
movl $0x2, %ecx
movq 0x8(%rsp), %rdi
leaq 0x20(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0x1ee4796
movq $-0x40, %rbp
leaq 0x68(%rsp), %r15
movq 0x10(%r15), %rax
testq %rax, %rax
je 0x1ee49bf
movq %r15, %rdi
movq %r15, %rsi
movl $0x3, %edx
callq *%rax
addq $-0x20, %r15
addq $0x20, %rbp
jne 0x1ee49a9
jmp 0x1ee4a47
leaq 0x306a3ea(%rip), %rax # 0x4f4edbc
movq %rax, 0x20(%rsp)
movw $0x103, 0x40(%rsp) # imm = 0x103
leaq 0x48(%rsp), %rdi
movq 0x10(%rsp), %r15
movq %r15, %rsi
movl %ebp, %edx
callq 0x1d9b738
leaq 0x68(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1d9b70c
movl $0x2, %ecx
movq 0x8(%rsp), %rdi
leaq 0x20(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0x1ee4796
movq $-0x40, %rbp
leaq 0x68(%rsp), %r15
movq 0x10(%r15), %rax
testq %rax, %rax
je 0x1ee4a3d
movq %r15, %rdi
movq %r15, %rsi
movl $0x3, %edx
callq *%rax
addq $-0x20, %r15
addq $0x20, %rbp
jne 0x1ee4a27
movl $0x1, %eax
jmp 0x1ee48ee
xorl %eax, %eax
movq %r15, (%rsp)
jmp 0x1ee48ee
movq $0x0, (%rsp)
testb $0x1, %r13b
je 0x1ee4a92
movq (%rsp), %rbx
testq %rbx, %rbx
je 0x1ee4a94
movq 0x8(%rsp), %rdi
addq $0x90, %rdi
leaq 0x48(%rsp), %rsi
movq %r14, (%rsi)
callq 0x11b11da
movq %rbx, 0x8(%rax)
jmp 0x1ee4a94
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
|
/CodeGen/MachineConvergenceVerifier.cpp
|
llvm::DenseMapBase<llvm::DenseMap<llvm::GenericCycle<llvm::GenericSSAContext<llvm::MachineFunction>> const*, llvm::MachineInstr const*, llvm::DenseMapInfo<llvm::GenericCycle<llvm::GenericSSAContext<llvm::MachineFunction>> const*, void>, llvm::detail::DenseMapPair<llvm::GenericCycle<llvm::GenericSSAContext<llvm::MachineFunction>> const*, llvm::MachineInstr const*>>, llvm::GenericCycle<llvm::GenericSSAContext<llvm::MachineFunction>> const*, llvm::MachineInstr const*, llvm::DenseMapInfo<llvm::GenericCycle<llvm::GenericSSAContext<llvm::MachineFunction>> const*, void>, llvm::detail::DenseMapPair<llvm::GenericCycle<llvm::GenericSSAContext<llvm::MachineFunction>> const*, llvm::MachineInstr const*>>::FindAndConstruct(llvm::GenericCycle<llvm::GenericSSAContext<llvm::MachineFunction>> const* const&)
|
value_type& FindAndConstruct(const KeyT &Key) {
BucketT *TheBucket;
if (LookupBucketFor(Key, TheBucket))
return *TheBucket;
return *InsertIntoBucket(TheBucket, Key);
}
|
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rsp), %r15
movq %r15, %rdx
callq 0x1ee57c2
movl %eax, %ecx
movq (%r15), %rax
testb %cl, %cl
jne 0x1ee5898
movq %r14, %rdi
movq %rbx, %rsi
movq %rbx, %rdx
movq %rax, %rcx
callq 0x1ee58a2
movq (%rbx), %rcx
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
|
/llvm/ADT/DenseMap.h
|
setDescendantEHBlocksCold(llvm::MachineFunction&)
|
static void setDescendantEHBlocksCold(MachineFunction &MF) {
DenseSet<MachineBasicBlock *> EHBlocks;
computeEHOnlyBlocks(MF, EHBlocks);
for (auto Block : EHBlocks) {
Block->setSectionID(MBBSectionID::ColdSectionID);
}
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdi, %rcx
xorl %eax, %eax
movl %eax, 0x80(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movl %eax, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
leaq 0x30(%rsp), %rdi
movl %eax, 0x10(%rdi)
movaps %xmm0, (%rdi)
movq %rcx, 0x18(%rsp)
movq 0x148(%rcx), %rbx
leaq 0xb0(%rsp), %rsi
movq %rbx, (%rsi)
callq 0x1ee84fe
movl $0x2, (%rax)
movq 0x58(%rbx), %rbp
movq 0x60(%rbx), %r14
cmpq %r14, %rbp
je 0x1ee8031
leaq 0x90(%rsp), %rbx
leaq 0x50(%rsp), %r15
leaq 0x20(%rsp), %r12
leaq 0x8(%rsp), %r13
movq (%rbp), %rax
movq %rax, 0x20(%rsp)
cmpb $0x0, 0xb8(%rax)
jne 0x1ee8028
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r13, %rcx
callq 0xbe02f4
addq $0x8, %rbp
cmpq %r14, %rbp
jne 0x1ee8005
movq 0x18(%rsp), %rax
movq 0x148(%rax), %r14
addq $0x140, %rax # imm = 0x140
cmpq %rax, %r14
je 0x1ee80ff
leaq 0x20(%rsp), %r15
leaq 0x90(%rsp), %r12
leaq 0x8(%rsp), %rbp
movq %rax, 0x18(%rsp)
cmpb $0x1, 0xb8(%r14)
jne 0x1ee80f2
movq 0x58(%r14), %rbx
movq 0x60(%r14), %r13
cmpq %r13, %rbx
je 0x1ee80a8
movq (%rbx), %rax
movq %rax, 0x20(%rsp)
cmpb $0x0, 0xb8(%rax)
jne 0x1ee80a2
movq %r12, %rdi
leaq 0x50(%rsp), %rsi
movq %r15, %rdx
movq %rbp, %rcx
callq 0xbe02f4
addq $0x8, %rbx
jmp 0x1ee8079
movq %r14, 0x20(%rsp)
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x1ee854c
movl %eax, %ecx
movq 0x90(%rsp), %rax
testb %cl, %cl
jne 0x1ee80e6
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x1ee85e6
movq %r14, (%rax)
movl $0x0, 0x8(%rax)
movl $0x1, 0x8(%rax)
movq 0x18(%rsp), %rax
movq 0x8(%r14), %r14
cmpq %rax, %r14
jne 0x1ee8063
cmpl $0x0, 0x58(%rsp)
je 0x1ee82f2
leaq 0x50(%rsp), %rbp
leaq 0x90(%rsp), %r12
movl $0x1000, %r14d # imm = 0x1000
movq 0x50(%rsp), %rax
movl 0x60(%rsp), %ecx
testq %rcx, %rcx
je 0x1ee8148
shlq $0x3, %rcx
movq (%rax), %rdx
orq %r14, %rdx
cmpq $-0x1000, %rdx # imm = 0xF000
jne 0x1ee8148
addq $0x8, %rax
addq $-0x8, %rcx
jne 0x1ee812f
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq %rbp, %rdi
leaq 0x8(%rsp), %rsi
callq 0xc166ba
movq 0x8(%rsp), %rax
movq %rax, 0x90(%rsp)
movl 0x40(%rsp), %ecx
testl %ecx, %ecx
je 0x1ee81dc
movq 0x30(%rsp), %rdx
movl %eax, %edi
shrl $0x4, %edi
movl %eax, %esi
shrl $0x9, %esi
xorl %edi, %esi
decl %ecx
andl %ecx, %esi
movl $0x1, %edi
movl %esi, %r9d
shlq $0x4, %r9
movq (%rdx,%r9), %r9
cmpq %rax, %r9
jne 0x1ee81a9
movb $0x1, %r8b
xorl %r9d, %r9d
testb %r9b, %r9b
jne 0x1ee818c
jmp 0x1ee81c5
cmpq $-0x1000, %r9 # imm = 0xF000
jne 0x1ee81ba
xorl %r9d, %r9d
xorl %r8d, %r8d
jmp 0x1ee81a2
addl %edi, %esi
incl %edi
andl %ecx, %esi
movb $0x1, %r9b
jmp 0x1ee81a2
testb $0x1, %r8b
je 0x1ee81dc
leaq 0x30(%rsp), %rdi
movq %r12, %rsi
callq 0x1ee84fe
movl (%rax), %ebp
jmp 0x1ee81de
xorl %ebp, %ebp
movq 0x8(%rsp), %rax
movq 0x40(%rax), %rbx
movq 0x48(%rax), %r15
movl %ebp, %r13d
cmpq %r15, %rbx
je 0x1ee828d
movl %ebp, %r13d
movq (%rbx), %rax
movq %rax, 0x90(%rsp)
movl 0x40(%rsp), %ecx
testl %ecx, %ecx
je 0x1ee8277
movq 0x30(%rsp), %rdx
movl %eax, %edi
shrl $0x4, %edi
movl %eax, %esi
shrl $0x9, %esi
xorl %edi, %esi
decl %ecx
andl %ecx, %esi
movl $0x1, %edi
movl %esi, %r9d
shlq $0x4, %r9
movq (%rdx,%r9), %r9
cmpq %rax, %r9
jne 0x1ee8244
movb $0x1, %r8b
xorl %r9d, %r9d
testb %r9b, %r9b
jne 0x1ee8227
jmp 0x1ee8260
cmpq $-0x1000, %r9 # imm = 0xF000
jne 0x1ee8255
xorl %r9d, %r9d
xorl %r8d, %r8d
jmp 0x1ee823d
addl %edi, %esi
incl %edi
andl %ecx, %esi
movb $0x1, %r9b
jmp 0x1ee823d
testb $0x1, %r8b
je 0x1ee8277
leaq 0x30(%rsp), %rdi
movq %r12, %rsi
callq 0x1ee84fe
movl (%rax), %eax
jmp 0x1ee8279
xorl %eax, %eax
cmpl %r13d, %eax
cmovgl %eax, %r13d
addq $0x8, %rbx
cmpq %r15, %rbx
jne 0x1ee81fa
cmpl %r13d, %ebp
leaq 0x50(%rsp), %rbp
je 0x1ee82e7
movq 0x8(%rsp), %rax
movq 0x58(%rax), %rbx
movq 0x60(%rax), %r15
cmpq %r15, %rbx
je 0x1ee82d5
movq (%rbx), %rax
movq %rax, 0x20(%rsp)
cmpb $0x0, 0xb8(%rax)
jne 0x1ee82cf
movq %r12, %rdi
movq %rbp, %rsi
leaq 0x20(%rsp), %rdx
leaq 0x17(%rsp), %rcx
callq 0xbe02f4
addq $0x8, %rbx
jmp 0x1ee82a4
leaq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1ee84fe
movl %r13d, (%rax)
cmpl $0x0, 0x58(%rsp)
jne 0x1ee811d
movq 0x30(%rsp), %rdx
movl 0x40(%rsp), %ecx
movq %rcx, %rax
shlq $0x4, %rax
leaq (%rdx,%rax), %r14
cmpl $0x0, 0x38(%rsp)
movq %r14, %rbx
je 0x1ee833b
testq %rcx, %rcx
je 0x1ee8338
movl $0x1000, %ecx # imm = 0x1000
movq %rdx, %rbx
movq (%rbx), %rdx
orq %rcx, %rdx
cmpq $-0x1000, %rdx # imm = 0xF000
jne 0x1ee833b
addq $0x10, %rbx
addq $-0x10, %rax
jne 0x1ee831d
jmp 0x1ee833b
movq %rdx, %rbx
movq 0x30(%rsp), %rax
movl 0x40(%rsp), %ecx
shlq $0x4, %rcx
movq %rax, 0x18(%rsp)
movq %rcx, 0xa8(%rsp)
leaq (%rax,%rcx), %r15
cmpq %r15, %rbx
je 0x1ee83b1
leaq 0x20(%rsp), %r13
leaq 0x8(%rsp), %rbp
movl $0x1000, %r12d # imm = 0x1000
movups (%rbx), %xmm0
movaps %xmm0, 0x20(%rsp)
cmpl $0x1, 0x28(%rsp)
jne 0x1ee8395
leaq 0x90(%rsp), %rdi
leaq 0x70(%rsp), %rsi
movq %r13, %rdx
movq %rbp, %rcx
callq 0xbe02f4
addq $0x10, %rbx
cmpq %r14, %rbx
je 0x1ee83ac
movq (%rbx), %rax
orq %r12, %rax
cmpq $-0x1000, %rax # imm = 0xF000
je 0x1ee8395
cmpq %r15, %rbx
jne 0x1ee836e
movl $0x8, %edx
movq 0x18(%rsp), %rdi
movq 0xa8(%rsp), %rsi
callq 0x2b410f1
movq 0x50(%rsp), %rdi
movl 0x60(%rsp), %esi
shlq $0x3, %rsi
movl $0x8, %edx
callq 0x2b410f1
cmpl $0x0, 0x78(%rsp)
movq 0x70(%rsp), %rdi
movl 0x80(%rsp), %edx
leaq (%rdi,%rdx,8), %rax
movq %rax, %rcx
je 0x1ee8428
testq %rdx, %rdx
je 0x1ee8425
shlq $0x3, %rdx
movl $0x1000, %esi # imm = 0x1000
movq %rdi, %rcx
movq (%rcx), %rdi
orq %rsi, %rdi
cmpq $-0x1000, %rdi # imm = 0xF000
jne 0x1ee8428
addq $0x8, %rcx
addq $-0x8, %rdx
jne 0x1ee840a
jmp 0x1ee8428
movq %rdi, %rcx
movq 0x70(%rsp), %rdi
movl 0x80(%rsp), %esi
leaq (%rdi,%rsi,8), %rdx
cmpq %rdx, %rcx
je 0x1ee8474
leaq 0x3a67f34(%rip), %r8 # 0x5950378
movq (%r8), %r8
movl $0x1000, %r9d # imm = 0x1000
movq (%rcx), %r10
movq %r8, 0xdc(%r10)
addq $0x8, %rcx
cmpq %rax, %rcx
je 0x1ee846f
movq (%rcx), %r10
orq %r9, %r10
cmpq $-0x1000, %r10 # imm = 0xF000
je 0x1ee8457
cmpq %rdx, %rcx
jne 0x1ee844d
shlq $0x3, %rsi
movl $0x8, %edx
callq 0x2b410f1
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/CodeGen/MachineFunctionSplitter.cpp
|
llvm::Pass* llvm::callDefaultCtor<(anonymous namespace)::StripDebugMachineModule, true>()
|
Pass *callDefaultCtor() {
return new PassName();
}
|
pushq %rax
movl $0x20, %edi
callq 0x7808d0
movb 0x3a6ef13(%rip), %cl # 0x595e598
movq $0x0, 0x8(%rax)
leaq 0x3a6ef48(%rip), %rdx # 0x595e5dc
movq %rdx, 0x10(%rax)
movl $0x4, 0x18(%rax)
leaq 0x39a48b2(%rip), %rdx # 0x5893f58
movq %rdx, (%rax)
movb %cl, 0x1c(%rax)
popq %rcx
retq
|
/llvm/PassSupport.h
|
llvm::DenseMap<std::tuple<llvm::StringRef, unsigned int, unsigned int, unsigned long>, unsigned int, llvm::DenseMapInfo<std::tuple<llvm::StringRef, unsigned int, unsigned int, unsigned long>, void>, llvm::detail::DenseMapPair<std::tuple<llvm::StringRef, unsigned int, unsigned int, unsigned long>, unsigned int>>::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, %rbx
movl 0x10(%rdi), %r15d
decl %esi
movl %esi, %eax
shrl %eax
orl %esi, %eax
movl %eax, %ecx
shrl $0x2, %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x4, %eax
orl %ecx, %eax
movl %eax, %ecx
shrl $0x8, %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x10, %eax
orl %ecx, %eax
incl %eax
cmpl $0x41, %eax
movl $0x40, %ecx
cmovael %eax, %ecx
movq (%rdi), %r14
movl %ecx, 0x10(%rdi)
shlq $0x3, %rcx
leaq (%rcx,%rcx,4), %rdi
movl $0x8, %esi
callq 0x2b410ec
movq %rax, (%rbx)
testq %r14, %r14
je 0x1ef0c93
shlq $0x3, %r15
leaq (%r15,%r15,4), %r15
leaq (%r14,%r15), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1ef0cd2
movl $0x8, %edx
movq %r14, %rdi
movq %r15, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x2b410f1
movq $0x0, 0x8(%rbx)
movl 0x10(%rbx), %ecx
testq %rcx, %rcx
je 0x1ef0ccc
leaq (%rcx,%rcx,4), %rcx
leaq (%rax,%rcx,8), %rcx
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, (%rax)
movq $-0x1, 0x10(%rax)
movq $0x0, 0x18(%rax)
addq $0x28, %rax
cmpq %rcx, %rax
jne 0x1ef0caf
popq %rbx
popq %r14
popq %r15
retq
|
/llvm/ADT/DenseMap.h
|
llvm::SmallVectorTemplateBase<llvm::IRPosition, true>::push_back(llvm::IRPosition)
|
void push_back(ValueParamT Elt) {
const T *EltPtr = reserveForParamAndGetAddress(Elt);
memcpy(reinterpret_cast<void *>(this->end()), EltPtr, sizeof(T));
this->set_size(this->size() + 1);
}
|
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movl 0x8(%rdi), %edx
cmpl 0xc(%rdi), %edx
jae 0x1f30d08
movq (%r14), %rax
movl 0x8(%r14), %ecx
shlq $0x4, %rcx
movq %r15, (%rax,%rcx)
movq %rbx, 0x8(%rax,%rcx)
incl 0x8(%r14)
popq %rbx
popq %r14
popq %r15
retq
incq %rdx
leaq 0x10(%r14), %rsi
movl $0x10, %ecx
movq %r14, %rdi
callq 0x2b4ed86
jmp 0x1f30cea
|
/llvm/ADT/SmallVector.h
|
bool llvm::Attributor::shouldInitialize<llvm::AANoAlias>(llvm::IRPosition const&, bool&)
|
bool shouldInitialize(const IRPosition &IRP, bool &ShouldUpdateAA) {
if (!AAType::isValidIRPositionForInit(*this, IRP))
return false;
if (Configuration.Allowed && !Configuration.Allowed->count(&AAType::ID))
return false;
// For now we skip anything in naked and optnone functions.
const Function *AnchorFn = IRP.getAnchorScope();
if (AnchorFn && (AnchorFn->hasFnAttribute(Attribute::Naked) ||
AnchorFn->hasFnAttribute(Attribute::OptimizeNone)))
return false;
// Avoid too many nested initializations to prevent a stack overflow.
if (InitializationChainLength > MaxInitializationChainLength)
return false;
ShouldUpdateAA = shouldUpdateAA<AAType>(IRP);
return !AAType::hasTrivialInitializer() || ShouldUpdateAA;
}
|
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %rdi
callq 0xc02338
movl $0xfe, %ecx
andl 0x8(%rax), %ecx
cmpl $0x12, %ecx
jne 0x1f4a4e8
movq 0x10(%rax), %rax
movq (%rax), %rax
cmpb $0xf, 0x8(%rax)
jne 0x1f4a55b
movq 0x1090(%r15), %rdi
testq %rdi, %rdi
je 0x1f4a517
leaq 0x30086f1(%rip), %rax # 0x4f52bf2
leaq 0x10(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x8(%rsp), %rdx
callq 0xbff476
testb %al, %al
je 0x1f4a55b
movq %r14, %rdi
callq 0xbffd54
testq %rax, %rax
je 0x1f4a549
movq %rax, %r12
movq %rax, %rdi
movl $0x13, %esi
callq 0x2a40a66
testb %al, %al
jne 0x1f4a55b
movq %r12, %rdi
movl $0x2e, %esi
callq 0x2a40a66
testb %al, %al
jne 0x1f4a55b
movl 0xd7c(%r15), %eax
leaq 0x3a151c9(%rip), %rcx # 0x595f720
cmpl (%rcx), %eax
jbe 0x1f4a569
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r15, %rdi
movq %r14, %rsi
callq 0x1f4a5d2
movb %al, (%rbx)
jmp 0x1f4a55d
|
/llvm/Transforms/IPO/Attributor.h
|
llvm::AAGlobalValueInfo* llvm::Attributor::lookupAAFor<llvm::AAGlobalValueInfo>(llvm::IRPosition const&, llvm::AbstractAttribute const*, llvm::DepClassTy, bool)
|
AAType *lookupAAFor(const IRPosition &IRP,
const AbstractAttribute *QueryingAA = nullptr,
DepClassTy DepClass = DepClassTy::OPTIONAL,
bool AllowInvalidState = false) {
static_assert(std::is_base_of<AbstractAttribute, AAType>::value,
"Cannot query an attribute with a type not derived from "
"'AbstractAttribute'!");
// Lookup the abstract attribute of type AAType. If found, return it after
// registering a dependence of QueryingAA on the one returned attribute.
AbstractAttribute *AAPtr = AAMap.lookup({&AAType::ID, IRP});
if (!AAPtr)
return nullptr;
AAType *AA = static_cast<AAType *>(AAPtr);
// Do not register a dependence on an attribute with an invalid state.
if (DepClass != DepClassTy::NONE && QueryingAA &&
AA->getState().isValidState())
recordDependence(*AA, const_cast<AbstractAttribute &>(*QueryingAA),
DepClass);
// Return nullptr if this attribute has an invalid state.
if (!AllowInvalidState && !AA->getState().isValidState())
return nullptr;
return AA;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %r8d, %ebp
movl %ecx, %r14d
movq %rdx, %r15
movq %rdi, %r12
addq $0x68, %rdi
leaq 0x2fd0bf1(%rip), %rcx # 0x4f52c0c
leaq 0x8(%rsp), %rax
movq %rcx, (%rax)
movups (%rsi), %xmm0
movups %xmm0, 0x8(%rax)
movq %rsp, %rdx
movq %rax, %rsi
callq 0xbffc08
testb %al, %al
je 0x1f82043
movq (%rsp), %rax
movq 0x18(%rax), %rbx
jmp 0x1f82045
xorl %ebx, %ebx
testq %rbx, %rbx
je 0x1f8209d
cmpl $0x2, %r14d
sete %al
testq %r15, %r15
sete %cl
orb %al, %cl
jne 0x1f82082
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x28(%rax)
movq (%rax), %rcx
movq %rax, %rdi
callq *0x10(%rcx)
testb %al, %al
je 0x1f82082
movq %r12, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movl %r14d, %ecx
callq 0x1f31ca6
testb %bpl, %bpl
jne 0x1f8209f
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x28(%rax)
movq (%rax), %rcx
movq %rax, %rdi
callq *0x10(%rcx)
testb %al, %al
jne 0x1f8209f
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
|
/llvm/Transforms/IPO/Attributor.h
|
(anonymous namespace)::AAUndefinedBehaviorImpl::getAsStr[abi:cxx11](llvm::Attributor*) const
|
const std::string getAsStr(Attributor *A) const override {
return getAssumed() ? "undefined-behavior" : "no-ub";
}
|
pushq %rbx
movb 0x59(%rsi), %al
testb %al, %al
leaq 0x2fcc770(%rip), %rcx # 0x4f52adf
leaq 0x2fcc77c(%rip), %rsi # 0x4f52af2
cmovneq %rcx, %rsi
movq %rdi, %rbx
leaq 0x12(%rsi), %rcx
leaq 0x5(%rsi), %rdx
testb %al, %al
cmovneq %rcx, %rdx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
callq 0x7fa87c
movq %rbx, %rax
popq %rbx
retq
|
/Transforms/IPO/AttributorAttributes.cpp
|
llvm::DenseMap<llvm::Value*, llvm::Value*, llvm::DenseMapInfo<llvm::Value*, void>, llvm::detail::DenseMapPair<llvm::Value*, llvm::Value*>>::copyFrom(llvm::DenseMap<llvm::Value*, llvm::Value*, llvm::DenseMapInfo<llvm::Value*, void>, llvm::detail::DenseMapPair<llvm::Value*, llvm::Value*>> const&)
|
void copyFrom(const DenseMap& other) {
this->destroyAll();
deallocate_buffer(Buckets, sizeof(BucketT) * NumBuckets, alignof(BucketT));
if (allocateBuckets(other.NumBuckets)) {
this->BaseT::copyFrom(other);
} else {
NumEntries = 0;
NumTombstones = 0;
}
}
|
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rdi
movl 0x10(%rbx), %esi
shlq $0x4, %rsi
movl $0x8, %edx
callq 0x2b410f1
movl 0x10(%r14), %r15d
movl %r15d, 0x10(%rbx)
testq %r15, %r15
je 0x1fc7d37
movq %r15, %rdi
shlq $0x4, %rdi
movl $0x8, %esi
callq 0x2b410ec
jmp 0x1fc7d39
xorl %eax, %eax
movq %rax, (%rbx)
testq %r15, %r15
je 0x1fc7d60
movq 0x8(%r14), %rcx
movq %rcx, 0x8(%rbx)
movq (%r14), %rsi
movl 0x10(%rbx), %edx
shlq $0x4, %rdx
movq %rax, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x780890
movq $0x0, 0x8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
|
/llvm/ADT/DenseMap.h
|
llvm::OpenMPIRBuilder::getOrCreateThreadID(llvm::Value*)
|
Value *OpenMPIRBuilder::getOrCreateThreadID(Value *Ident) {
return Builder.CreateCall(
getOrCreateRuntimeFunctionPtr(OMPRTL___kmpc_global_thread_num), Ident,
"omp_global_thread_num");
}
|
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
movq %rsi, 0x10(%rsp)
movq 0x1b0(%rdi), %rsi
movl $0x5, %edx
callq 0x20abee6
xorl %esi, %esi
cmpb $0x0, (%rdx)
cmovneq %rsi, %rdx
testq %rdx, %rdx
je 0x20b21a4
movq 0x18(%rdx), %rsi
addq $0x1b8, %rbx # imm = 0x1B8
leaq 0x2eaa390(%rip), %rax # 0x4f5c542
leaq 0x18(%rsp), %r9
movq %rax, (%r9)
movw $0x103, 0x20(%r9) # imm = 0x103
movq $0x0, (%rsp)
leaq 0x10(%rsp), %rcx
movl $0x1, %r8d
movq %rbx, %rdi
callq 0x9386f2
addq $0x40, %rsp
popq %rbx
retq
|
/Frontend/OpenMP/OMPIRBuilder.cpp
|
(anonymous namespace)::LoopPredication::isLoopInvariantValue(llvm::SCEV const*)
|
bool LoopPredication::isLoopInvariantValue(const SCEV* S) {
// Handling expressions which produce invariant results, but *haven't* yet
// been removed from the loop serves two important purposes.
// 1) Most importantly, it resolves a pass ordering cycle which would
// otherwise need us to iteration licm, loop-predication, and either
// loop-unswitch or loop-peeling to make progress on examples with lots of
// predicable range checks in a row. (Since, in the general case, we can't
// hoist the length checks until the dominating checks have been discharged
// as we can't prove doing so is safe.)
// 2) As a nice side effect, this exposes the value of peeling or unswitching
// much more obviously in the IR. Otherwise, the cost modeling for other
// transforms would end up needing to duplicate all of this logic to model a
// check which becomes predictable based on a modeled peel or unswitch.
//
// The cost of doing so in the worst case is an extra fill from the stack in
// the loop to materialize the loop invariant test value instead of checking
// against the original IV which is presumable in a register inside the loop.
// Such cases are presumably rare, and hint at missing oppurtunities for
// other passes.
if (SE->isLoopInvariant(S, L))
// Note: This the SCEV variant, so the original Value* may be within the
// loop even though SCEV has proven it is loop invariant.
return true;
// Handle a particular important case which SCEV doesn't yet know about which
// shows up in range checks on arrays with immutable lengths.
// TODO: This should be sunk inside SCEV.
if (const SCEVUnknown *U = dyn_cast<SCEVUnknown>(S))
if (const auto *LI = dyn_cast<LoadInst>(U->getValue()))
if (LI->isUnordered() && L->hasLoopInvariantOperands(LI))
if (!isModSet(AA->getModRefInfoMask(LI->getOperand(0))) ||
LI->hasMetadata(LLVMContext::MD_invariant_load))
return true;
return false;
}
|
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
movq 0x28(%rbx), %rdx
callq 0x26960d2
testb %al, %al
je 0x221d023
movb $0x1, %al
jmp 0x221d0a5
xorl %eax, %eax
testq %r14, %r14
je 0x221d0a5
cmpw $0xf, 0x18(%r14)
jne 0x221d0a5
movq -0x8(%r14), %r14
cmpb $0x3d, (%r14)
jne 0x221d0a3
movzwl 0x2(%r14), %eax
testl $0x301, %eax # imm = 0x301
jne 0x221d0a3
movq 0x28(%rbx), %rdi
movq %r14, %rsi
callq 0x2640188
testb %al, %al
je 0x221d0a3
movq (%rbx), %rdi
movq -0x20(%r14), %rax
xorps %xmm0, %xmm0
leaq 0x8(%rsp), %rsi
movups %xmm0, 0x20(%rsi)
movups %xmm0, 0x10(%rsi)
movq %rax, (%rsi)
movq $-0x1, 0x8(%rsi)
xorl %edx, %edx
callq 0x256c848
testb $0x2, %al
je 0x221d01c
testb $0x20, 0x7(%r14)
je 0x221d0a3
movq %r14, %rdi
movl $0x6, %esi
callq 0x2a7c952
movq %rax, %rcx
movb $0x1, %al
testq %rcx, %rcx
jne 0x221d0a5
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
nop
|
/Transforms/Scalar/LoopPredication.cpp
|
llvm::DenseMapBase<llvm::DenseMap<std::pair<llvm::RegionNode*, llvm::SmallDenseSet<llvm::RegionNode*, 4u, llvm::DenseMapInfo<llvm::RegionNode*, void>>*>, unsigned int, llvm::DenseMapInfo<std::pair<llvm::RegionNode*, llvm::SmallDenseSet<llvm::RegionNode*, 4u, llvm::DenseMapInfo<llvm::RegionNode*, void>>*>, void>, llvm::detail::DenseMapPair<std::pair<llvm::RegionNode*, llvm::SmallDenseSet<llvm::RegionNode*, 4u, llvm::DenseMapInfo<llvm::RegionNode*, void>>*>, unsigned int>>, std::pair<llvm::RegionNode*, llvm::SmallDenseSet<llvm::RegionNode*, 4u, llvm::DenseMapInfo<llvm::RegionNode*, void>>*>, unsigned int, llvm::DenseMapInfo<std::pair<llvm::RegionNode*, llvm::SmallDenseSet<llvm::RegionNode*, 4u, llvm::DenseMapInfo<llvm::RegionNode*, void>>*>, void>, llvm::detail::DenseMapPair<std::pair<llvm::RegionNode*, llvm::SmallDenseSet<llvm::RegionNode*, 4u, llvm::DenseMapInfo<llvm::RegionNode*, void>>*>, unsigned int>>::find(std::pair<llvm::RegionNode*, llvm::SmallDenseSet<llvm::RegionNode*, 4u, llvm::DenseMapInfo<llvm::RegionNode*, void>>*> 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
pushq %rax
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rdx
callq 0x22c7746
movl 0x10(%rbx), %ecx
leaq (%rcx,%rcx,2), %rdx
shlq $0x3, %rdx
addq (%rbx), %rdx
testb %al, %al
movq (%r14), %rax
cmoveq %rdx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
|
/llvm/ADT/DenseMap.h
|
llvm::MapVector<llvm::PHINode*, llvm::SmallVector<std::pair<llvm::BasicBlock*, llvm::Value*>, 2u>, llvm::DenseMap<llvm::PHINode*, unsigned int, llvm::DenseMapInfo<llvm::PHINode*, void>, llvm::detail::DenseMapPair<llvm::PHINode*, unsigned int>>, llvm::SmallVector<std::pair<llvm::PHINode*, llvm::SmallVector<std::pair<llvm::BasicBlock*, llvm::Value*>, 2u>>, 0u>>::operator[](llvm::PHINode* const&)
|
ValueT &operator[](const KeyT &Key) {
std::pair<KeyT, typename MapType::mapped_type> Pair = std::make_pair(Key, 0);
std::pair<typename MapType::iterator, bool> Result = Map.insert(Pair);
auto &I = Result.first->second;
if (Result.second) {
Vector.push_back(std::make_pair(Key, ValueT()));
I = Vector.size() - 1;
}
return Vector[I].second;
}
|
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x90, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rax
leaq 0x8(%rsp), %rcx
movq %rax, -0x8(%rcx)
movl $0x0, (%rcx)
leaq 0x40(%rsp), %r15
movq %rsp, %rdx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x22ca624
movq (%r15), %r12
cmpb $0x1, 0x10(%r15)
jne 0x22c9c68
leaq 0x18(%rbx), %rdi
leaq 0x20(%rsp), %r15
movq %r15, -0x10(%r15)
movabsq $0x200000000, %rax # imm = 0x200000000
movq %rax, -0x8(%r15)
movq (%r14), %rcx
leaq 0x70(%rsp), %r13
movq %rcx, -0x18(%r13)
movq %r13, -0x10(%r13)
movq %rax, -0x8(%r13)
leaq 0x58(%rsp), %r14
movq %r14, %rsi
callq 0x22ca5cc
movq 0x8(%r14), %rdi
cmpq %r13, %rdi
je 0x22c9c4f
callq 0x780910
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x22c9c5e
callq 0x780910
movl 0x20(%rbx), %eax
decl %eax
movl %eax, 0x8(%r12)
movl 0x8(%r12), %eax
movq 0x18(%rbx), %rcx
imulq $0x38, %rax, %rax
addq %rcx, %rax
addq $0x8, %rax
addq $0x90, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
|
/llvm/ADT/MapVector.h
|
bool llvm::PatternMatch::BinaryOp_match<llvm::PatternMatch::BinaryOp_match<llvm::PatternMatch::bind_ty<llvm::Value>, llvm::PatternMatch::specific_intval64<false>, 26u, false>, llvm::PatternMatch::deferredval_ty<llvm::Value>, 13u, true>::match<llvm::Value>(llvm::Value*)
|
inline bool match(unsigned Opc, OpTy *V) {
if (V->getValueID() == Value::InstructionVal + Opc) {
auto *I = cast<BinaryOperator>(V);
return (L.match(I->getOperand(0)) && R.match(I->getOperand(1))) ||
(Commutable && L.match(I->getOperand(1)) &&
R.match(I->getOperand(0)));
}
return false;
}
|
cmpb $0x2a, (%rsi)
jne 0x22d3a65
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq -0x40(%rsi), %rsi
callq 0x22d3a76
testb %al, %al
je 0x22d3a45
movq 0x10(%r14), %rax
movq (%rax), %rax
cmpq -0x20(%rbx), %rax
je 0x22d3a6c
movq -0x20(%rbx), %rsi
movq %r14, %rdi
callq 0x22d3a76
testb %al, %al
je 0x22d3a68
movq 0x10(%r14), %rax
movq (%rax), %rax
cmpq -0x40(%rbx), %rax
sete %al
jmp 0x22d3a6e
xorl %eax, %eax
retq
xorl %eax, %eax
jmp 0x22d3a6e
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
/llvm/IR/PatternMatch.h
|
bool llvm::PatternMatch::BinaryOp_match<llvm::PatternMatch::BinaryOp_match<llvm::PatternMatch::bind_ty<llvm::Value>, llvm::PatternMatch::specific_intval<false>, 28u, false>, llvm::PatternMatch::BinaryOp_match<llvm::PatternMatch::BinaryOp_match<llvm::PatternMatch::deferredval_ty<llvm::Value>, llvm::PatternMatch::specific_intval64<false>, 26u, false>, llvm::PatternMatch::specific_intval<false>, 28u, false>, 13u, true>::match<llvm::Value>(llvm::Value*)
|
inline bool match(unsigned Opc, OpTy *V) {
if (V->getValueID() == Value::InstructionVal + Opc) {
auto *I = cast<BinaryOperator>(V);
return (L.match(I->getOperand(0)) && R.match(I->getOperand(1))) ||
(Commutable && L.match(I->getOperand(1)) &&
R.match(I->getOperand(0)));
}
return false;
}
|
pushq %r14
pushq %rbx
pushq %rax
cmpb $0x2a, (%rsi)
jne 0x22d3b00
movq %rsi, %r14
movq %rdi, %rbx
movq -0x40(%rsi), %rsi
callq 0x22d3b0a
testb %al, %al
je 0x22d3ad9
leaq 0x10(%rbx), %rdi
movq -0x20(%r14), %rsi
callq 0x22d3b3c
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0x22d3b02
movq -0x20(%r14), %rsi
movq %rbx, %rdi
callq 0x22d3b0a
testb %al, %al
je 0x22d3b00
addq $0x10, %rbx
movq -0x40(%r14), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x22d3b3c
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
/llvm/IR/PatternMatch.h
|
llvm::MapVector<llvm::Instruction*, llvm::TruncInstCombine::Info, llvm::DenseMap<llvm::Instruction*, unsigned int, llvm::DenseMapInfo<llvm::Instruction*, void>, llvm::detail::DenseMapPair<llvm::Instruction*, unsigned int>>, llvm::SmallVector<std::pair<llvm::Instruction*, llvm::TruncInstCombine::Info>, 0u>>::erase(std::pair<llvm::Instruction*, llvm::TruncInstCombine::Info>*)
|
typename VectorType::iterator erase(typename VectorType::iterator Iterator) {
Map.erase(Iterator->first);
auto Next = Vector.erase(Iterator);
if (Next == Vector.end())
return Next;
// Update indices in the map.
size_t Index = Next - Vector.begin();
for (auto &I : Map) {
assert(I.second != Index && "Index was already erased!");
if (I.second > Index)
--I.second;
}
return Next;
}
|
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x22d67a0
movl 0x20(%r14), %eax
leaq (%rax,%rax,2), %rax
shlq $0x3, %rax
addq 0x18(%r14), %rax
subq %rbx, %rax
addq $-0x18, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
testq %rax, %rax
jle 0x22d66e1
mulq %rcx
shrq $0x4, %rdx
incq %rdx
leaq 0x20(%rbx), %rax
movq -0x8(%rax), %rsi
movq %rsi, -0x20(%rax)
movups (%rax), %xmm0
movups %xmm0, -0x18(%rax)
decq %rdx
addq $0x18, %rax
cmpq $0x1, %rdx
jg 0x22d66c5
movl 0x20(%r14), %eax
decl %eax
movl %eax, 0x20(%r14)
movq 0x18(%r14), %rdi
leaq (%rax,%rax,2), %rax
leaq (%rdi,%rax,8), %rax
cmpq %rbx, %rax
je 0x22d6795
movq (%r14), %r9
movl 0x10(%r14), %r8d
movq %r8, %rsi
shlq $0x4, %rsi
leaq (%r9,%rsi), %rax
cmpl $0x0, 0x8(%r14)
movq %rax, %rdx
je 0x22d6748
testq %r8, %r8
je 0x22d6745
movl $0x1000, %r8d # imm = 0x1000
movq %r9, %rdx
movq (%rdx), %r9
orq %r8, %r9
cmpq $-0x1000, %r9 # imm = 0xF000
jne 0x22d6748
addq $0x10, %rdx
addq $-0x10, %rsi
jne 0x22d672a
jmp 0x22d6748
movq %r9, %rdx
movl 0x10(%r14), %esi
shlq $0x4, %rsi
addq (%r14), %rsi
cmpq %rsi, %rdx
je 0x22d6795
movq %rbx, %r8
subq %rdi, %r8
sarq $0x3, %r8
imulq %rcx, %r8
movl $0x1000, %ecx # imm = 0x1000
movl 0x8(%rdx), %edi
cmpq %rdi, %r8
jae 0x22d6778
decl %edi
movl %edi, 0x8(%rdx)
addq $0x10, %rdx
cmpq %rax, %rdx
je 0x22d6790
movq (%rdx), %rdi
orq %rcx, %rdi
cmpq $-0x1000, %rdi # imm = 0xF000
je 0x22d6778
cmpq %rsi, %rdx
jne 0x22d676b
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
/llvm/ADT/MapVector.h
|
llvm::InstCombinerImpl::foldBinOpShiftWithShift(llvm::BinaryOperator&)
|
Instruction *InstCombinerImpl::foldBinOpShiftWithShift(BinaryOperator &I) {
const DataLayout &DL = I.getDataLayout();
auto IsValidBinOpc = [](unsigned Opc) {
switch (Opc) {
default:
return false;
case Instruction::And:
case Instruction::Or:
case Instruction::Xor:
case Instruction::Add:
// Skip Sub as we only match constant masks which will canonicalize to use
// add.
return true;
}
};
// Check if we can distribute binop arbitrarily. `add` + `lshr` has extra
// constraints.
auto IsCompletelyDistributable = [](unsigned BinOpc1, unsigned BinOpc2,
unsigned ShOpc) {
assert(ShOpc != Instruction::AShr);
return (BinOpc1 != Instruction::Add && BinOpc2 != Instruction::Add) ||
ShOpc == Instruction::Shl;
};
auto GetInvShift = [](unsigned ShOpc) {
assert(ShOpc != Instruction::AShr);
return ShOpc == Instruction::LShr ? Instruction::Shl : Instruction::LShr;
};
auto CanDistributeBinops = [&](unsigned BinOpc1, unsigned BinOpc2,
unsigned ShOpc, Constant *CMask,
Constant *CShift) {
// If the BinOp1 is `and` we don't need to check the mask.
if (BinOpc1 == Instruction::And)
return true;
// For all other possible transfers we need complete distributable
// binop/shift (anything but `add` + `lshr`).
if (!IsCompletelyDistributable(BinOpc1, BinOpc2, ShOpc))
return false;
// If BinOp2 is `and`, any mask works (this only really helps for non-splat
// vecs, otherwise the mask will be simplified and the following check will
// handle it).
if (BinOpc2 == Instruction::And)
return true;
// Otherwise, need mask that meets the below requirement.
// (logic_shift (inv_logic_shift Mask, ShAmt), ShAmt) == Mask
Constant *MaskInvShift =
ConstantFoldBinaryOpOperands(GetInvShift(ShOpc), CMask, CShift, DL);
return ConstantFoldBinaryOpOperands(ShOpc, MaskInvShift, CShift, DL) ==
CMask;
};
auto MatchBinOp = [&](unsigned ShOpnum) -> Instruction * {
Constant *CMask, *CShift;
Value *X, *Y, *ShiftedX, *Mask, *Shift;
if (!match(I.getOperand(ShOpnum),
m_OneUse(m_Shift(m_Value(Y), m_Value(Shift)))))
return nullptr;
if (!match(I.getOperand(1 - ShOpnum),
m_BinOp(m_Value(ShiftedX), m_Value(Mask))))
return nullptr;
if (!match(ShiftedX, m_OneUse(m_Shift(m_Value(X), m_Specific(Shift)))))
return nullptr;
// Make sure we are matching instruction shifts and not ConstantExpr
auto *IY = dyn_cast<Instruction>(I.getOperand(ShOpnum));
auto *IX = dyn_cast<Instruction>(ShiftedX);
if (!IY || !IX)
return nullptr;
// LHS and RHS need same shift opcode
unsigned ShOpc = IY->getOpcode();
if (ShOpc != IX->getOpcode())
return nullptr;
// Make sure binop is real instruction and not ConstantExpr
auto *BO2 = dyn_cast<Instruction>(I.getOperand(1 - ShOpnum));
if (!BO2)
return nullptr;
unsigned BinOpc = BO2->getOpcode();
// Make sure we have valid binops.
if (!IsValidBinOpc(I.getOpcode()) || !IsValidBinOpc(BinOpc))
return nullptr;
if (ShOpc == Instruction::AShr) {
if (Instruction::isBitwiseLogicOp(I.getOpcode()) &&
BinOpc == Instruction::Xor && match(Mask, m_AllOnes())) {
Value *NotX = Builder.CreateNot(X);
Value *NewBinOp = Builder.CreateBinOp(I.getOpcode(), Y, NotX);
return BinaryOperator::Create(
static_cast<Instruction::BinaryOps>(ShOpc), NewBinOp, Shift);
}
return nullptr;
}
// If BinOp1 == BinOp2 and it's bitwise or shl with add, then just
// distribute to drop the shift irrelevant of constants.
if (BinOpc == I.getOpcode() &&
IsCompletelyDistributable(I.getOpcode(), BinOpc, ShOpc)) {
Value *NewBinOp2 = Builder.CreateBinOp(I.getOpcode(), X, Y);
Value *NewBinOp1 = Builder.CreateBinOp(
static_cast<Instruction::BinaryOps>(ShOpc), NewBinOp2, Shift);
return BinaryOperator::Create(I.getOpcode(), NewBinOp1, Mask);
}
// Otherwise we can only distribute by constant shifting the mask, so
// ensure we have constants.
if (!match(Shift, m_ImmConstant(CShift)))
return nullptr;
if (!match(Mask, m_ImmConstant(CMask)))
return nullptr;
// Check if we can distribute the binops.
if (!CanDistributeBinops(I.getOpcode(), BinOpc, ShOpc, CMask, CShift))
return nullptr;
Constant *NewCMask =
ConstantFoldBinaryOpOperands(GetInvShift(ShOpc), CMask, CShift, DL);
Value *NewBinOp2 = Builder.CreateBinOp(
static_cast<Instruction::BinaryOps>(BinOpc), X, NewCMask);
Value *NewBinOp1 = Builder.CreateBinOp(I.getOpcode(), Y, NewBinOp2);
return BinaryOperator::Create(static_cast<Instruction::BinaryOps>(ShOpc),
NewBinOp1, CShift);
};
if (Instruction *R = MatchBinOp(0))
return R;
return MatchBinOp(1);
}
|
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x2a5128a
leaq 0x6(%rsp), %rcx
leaq 0x8(%rsp), %rdx
movq %rcx, (%rdx)
leaq 0x5(%rsp), %rsi
movq %rsi, 0x8(%rdx)
movq %rax, 0x10(%rdx)
leaq 0x20(%rsp), %rdi
movq %rbx, (%rdi)
leaq 0x7(%rsp), %r8
movq %r8, 0x8(%rdi)
movq %r14, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %rdx, 0x20(%rdi)
movq %rsi, 0x28(%rdi)
movq %rax, 0x30(%rdi)
xorl %esi, %esi
callq 0x22d8228
testq %rax, %rax
jne 0x22d821f
leaq 0x20(%rsp), %rdi
movl $0x1, %esi
callq 0x22d8228
addq $0x58, %rsp
popq %rbx
popq %r14
retq
nop
|
/Transforms/InstCombine/InstructionCombining.cpp
|
llvm::InstCombinerImpl::FoldOpIntoSelect(llvm::Instruction&, llvm::SelectInst*, bool)
|
Instruction *InstCombinerImpl::FoldOpIntoSelect(Instruction &Op, SelectInst *SI,
bool FoldWithMultiUse) {
// Don't modify shared select instructions unless set FoldWithMultiUse
if (!SI->hasOneUse() && !FoldWithMultiUse)
return nullptr;
Value *TV = SI->getTrueValue();
Value *FV = SI->getFalseValue();
if (!(isa<Constant>(TV) || isa<Constant>(FV)))
return nullptr;
// Bool selects with constant operands can be folded to logical ops.
if (SI->getType()->isIntOrIntVectorTy(1))
return nullptr;
// Test if a FCmpInst instruction is used exclusively by a select as
// part of a minimum or maximum operation. If so, refrain from doing
// any other folding. This helps out other analyses which understand
// non-obfuscated minimum and maximum idioms. And in this case, at
// least one of the comparison operands has at least one user besides
// the compare (the select), which would often largely negate the
// benefit of folding anyway.
if (auto *CI = dyn_cast<FCmpInst>(SI->getCondition())) {
if (CI->hasOneUse()) {
Value *Op0 = CI->getOperand(0), *Op1 = CI->getOperand(1);
if ((TV == Op0 && FV == Op1) || (FV == Op0 && TV == Op1))
return nullptr;
}
}
// Make sure that one of the select arms constant folds successfully.
Value *NewTV = constantFoldOperationIntoSelectOperand(Op, SI, /*IsTrueArm*/ true);
Value *NewFV = constantFoldOperationIntoSelectOperand(Op, SI, /*IsTrueArm*/ false);
if (!NewTV && !NewFV)
return nullptr;
// Create an instruction for the arm that did not fold.
if (!NewTV)
NewTV = foldOperationIntoSelectOperand(Op, SI, TV, *this);
if (!NewFV)
NewFV = foldOperationIntoSelectOperand(Op, SI, FV, *this);
return SelectInst::Create(SI->getCondition(), NewTV, NewFV, "", nullptr, SI);
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq 0x10(%rdx), %rax
testq %rax, %rax
je 0x22da6a4
cmpq $0x0, 0x8(%rax)
sete %al
jmp 0x22da6a6
xorl %eax, %eax
orb %cl, %al
cmpb $0x1, %al
jne 0x22da6e8
movq -0x40(%rbx), %r13
movq -0x20(%rbx), %r12
cmpb $0x16, (%r13)
jb 0x22da6c2
cmpb $0x15, (%r12)
ja 0x22da6e8
movq 0x8(%rbx), %rdi
movl $0xfe, %eax
andl 0x8(%rdi), %eax
cmpl $0x12, %eax
jne 0x22da6da
movq 0x10(%rdi), %rax
movq (%rax), %rdi
movl $0x1, %esi
callq 0x2a9a3e2
testb %al, %al
je 0x22da6fd
xorl %r14d, %r14d
movq %r14, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x60(%rbx), %rax
cmpb $0x53, (%rax)
jne 0x22da71a
movq 0x10(%rax), %rcx
testq %rcx, %rcx
je 0x22da71a
cmpq $0x0, 0x8(%rcx)
je 0x22da7b7
movq %r12, 0x10(%rsp)
movq %r14, 0x18(%rsp)
movq %r15, %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0x22da7e8
movq %rax, %rbp
xorl %r14d, %r14d
movq %r15, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x22da7e8
movq %rax, %r12
movq %rbp, %rax
orq %r12, %rax
je 0x22da6eb
testq %rbp, %rbp
movq 0x18(%rsp), %r14
jne 0x22da770
movq %r15, %rdi
movq %rbx, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0x22da918
movq %rax, %rbp
testq %r12, %r12
jne 0x22da78b
movq %r15, %rdi
movq %rbx, %rsi
movq 0x10(%rsp), %rdx
movq %r14, %rcx
callq 0x22da918
movq %rax, %r12
movq -0x60(%rbx), %rdi
leaq 0x20(%rsp), %rcx
movw $0x101, 0x20(%rcx) # imm = 0x101
movq %rbx, (%rsp)
movq %rbp, %rsi
movq %r12, %rdx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x14e49fa
movq %rax, %r14
jmp 0x22da6eb
movq -0x40(%rax), %rcx
movq -0x20(%rax), %rax
movq %r13, %rdx
xorq %rcx, %rdx
movq %r12, %rsi
xorq %rax, %rsi
orq %rdx, %rsi
je 0x22da6e8
xorq %r12, %rcx
xorq %r13, %rax
orq %rcx, %rax
je 0x22da6e8
jmp 0x22da71a
|
/Transforms/InstCombine/InstructionCombining.cpp
|
llvm::InstCombinerImpl::foldBinOpIntoSelectOrPhi(llvm::BinaryOperator&)
|
Instruction *InstCombinerImpl::foldBinOpIntoSelectOrPhi(BinaryOperator &I) {
if (!isa<Constant>(I.getOperand(1)))
return nullptr;
if (auto *Sel = dyn_cast<SelectInst>(I.getOperand(0))) {
if (Instruction *NewSel = FoldOpIntoSelect(I, Sel))
return NewSel;
} else if (auto *PN = dyn_cast<PHINode>(I.getOperand(0))) {
if (Instruction *NewPhi = foldOpIntoPhi(I, PN))
return NewPhi;
}
return nullptr;
}
|
pushq %rax
movq -0x20(%rsi), %rax
cmpb $0x15, (%rax)
ja 0x22db6fe
movq -0x40(%rsi), %rdx
movzbl (%rdx), %eax
cmpl $0x54, %eax
je 0x22db6eb
cmpl $0x56, %eax
jne 0x22db6f8
xorl %ecx, %ecx
callq 0x22da67a
testq %rax, %rax
jne 0x22db700
jmp 0x22db6fe
callq 0x22da97c
testq %rax, %rax
sete %cl
jmp 0x22db6fa
movb $0x1, %cl
testb %cl, %cl
je 0x22db700
xorl %eax, %eax
popq %rcx
retq
|
/Transforms/InstCombine/InstructionCombining.cpp
|
bool llvm::PatternMatch::BinaryOp_match<llvm::PatternMatch::BinaryOp_match<llvm::PatternMatch::specificval_ty, llvm::PatternMatch::specific_intval64<false>, 26u, false>, llvm::PatternMatch::match_combine_or<llvm::PatternMatch::specificval_ty, llvm::PatternMatch::specificval_ty>, 17u, true>::match<llvm::Value>(llvm::Value*)
|
inline bool match(unsigned Opc, OpTy *V) {
if (V->getValueID() == Value::InstructionVal + Opc) {
auto *I = cast<BinaryOperator>(V);
return (L.match(I->getOperand(0)) && R.match(I->getOperand(1))) ||
(Commutable && L.match(I->getOperand(1)) &&
R.match(I->getOperand(0)));
}
return false;
}
|
cmpb $0x2e, (%rsi)
jne 0x22f6637
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq -0x40(%rsi), %rax
cmpb $0x37, (%rax)
jne 0x22f65fe
movq (%rbx), %rcx
cmpq -0x40(%rax), %rcx
jne 0x22f65fe
leaq 0x8(%rbx), %rdi
movq -0x20(%rax), %rsi
callq 0x933312
testb %al, %al
je 0x22f65fe
movq -0x20(%r14), %rcx
movb $0x1, %al
cmpq %rcx, 0x10(%rbx)
je 0x22f663c
cmpq %rcx, 0x18(%rbx)
je 0x22f663c
movq -0x20(%r14), %rax
cmpb $0x37, (%rax)
jne 0x22f663a
movq (%rbx), %rcx
cmpq -0x40(%rax), %rcx
jne 0x22f663a
leaq 0x8(%rbx), %rdi
movq -0x20(%rax), %rsi
callq 0x933312
testb %al, %al
je 0x22f663a
movq -0x40(%r14), %rax
cmpq %rax, 0x10(%rbx)
sete %cl
cmpq %rax, 0x18(%rbx)
sete %al
orb %cl, %al
jmp 0x22f663c
xorl %eax, %eax
retq
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
/llvm/IR/PatternMatch.h
|
bool llvm::PatternMatch::BinaryOp_match<llvm::PatternMatch::bind_ty<llvm::Value>, llvm::PatternMatch::cstval_pred_ty<llvm::PatternMatch::is_one, llvm::ConstantInt, true>, 13u, false>::match<llvm::Value>(llvm::Value*)
|
inline bool match(unsigned Opc, OpTy *V) {
if (V->getValueID() == Value::InstructionVal + Opc) {
auto *I = cast<BinaryOperator>(V);
return (L.match(I->getOperand(0)) && R.match(I->getOperand(1))) ||
(Commutable && L.match(I->getOperand(1)) &&
R.match(I->getOperand(0)));
}
return false;
}
|
cmpb $0x2a, (%rsi)
jne 0x22f6ab5
movq -0x40(%rsi), %rax
testq %rax, %rax
je 0x22f6ab5
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rcx
movq %rax, (%rcx)
addq $0x8, %rdi
movq -0x20(%rsi), %r14
movq %r14, %rsi
callq 0x932b34
movq 0x8(%rbx), %rcx
testq %rcx, %rcx
setne %dl
andb %al, %dl
cmpb $0x1, %dl
jne 0x22f6aa7
movq %r14, (%rcx)
movb $0x1, %cl
testb %al, %al
leaq 0x8(%rsp), %rsp
popq %rbx
popq %r14
jne 0x22f6ab7
xorl %ecx, %ecx
movl %ecx, %eax
retq
|
/llvm/IR/PatternMatch.h
|
bool llvm::PatternMatch::BinaryOp_match<llvm::PatternMatch::specific_fpval, llvm::PatternMatch::bind_ty<llvm::Value>, 16u, false>::match<llvm::Value>(llvm::Value*)
|
inline bool match(unsigned Opc, OpTy *V) {
if (V->getValueID() == Value::InstructionVal + Opc) {
auto *I = cast<BinaryOperator>(V);
return (L.match(I->getOperand(0)) && R.match(I->getOperand(1))) ||
(Commutable && L.match(I->getOperand(1)) &&
R.match(I->getOperand(0)));
}
return false;
}
|
cmpb $0x2d, (%rsi)
jne 0x22f70ec
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq -0x40(%rsi), %rsi
callq 0x932a56
testb %al, %al
je 0x22f70ef
movq -0x20(%r14), %rax
testq %rax, %rax
je 0x22f70ef
movq 0x8(%rbx), %rcx
movq %rax, (%rcx)
movb $0x1, %al
jmp 0x22f70f1
xorl %eax, %eax
retq
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
|
/llvm/IR/PatternMatch.h
|
(anonymous namespace)::FAddendCoef::convertToFpType(llvm::fltSemantics const&)
|
void FAddendCoef::convertToFpType(const fltSemantics &Sem) {
if (!isInt())
return;
APFloat *P = getFpValPtr();
if (IntVal > 0)
new(P) APFloat(Sem, IntVal);
else {
new(P) APFloat(Sem, 0 - IntVal);
P->changeSign();
}
IsFp = BufHasFpVal = true;
}
|
cmpb $0x0, (%rdi)
jne 0x22f7ac6
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movswq 0x2(%rdi), %rax
testq %rax, %rax
jle 0x22f7a9d
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0x10(%rbx), %rdi
callq 0x8ba670
jmp 0x22f7aba
leaq 0x8(%rbx), %r14
negl %eax
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0x10(%rbx), %rdi
callq 0x8ba670
movq %r14, %rdi
callq 0x81e6aa
movw $0x101, (%rbx) # imm = 0x101
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
|
/Transforms/InstCombine/InstCombineAddSub.cpp
|
bool llvm::PatternMatch::match_combine_or<llvm::PatternMatch::CastInst_match<llvm::PatternMatch::BinaryOp_match<llvm::PatternMatch::bind_ty<llvm::Constant>, llvm::PatternMatch::match_combine_or<llvm::PatternMatch::CastInst_match<llvm::PatternMatch::bind_ty<llvm::Value>, llvm::ZExtInst>, llvm::PatternMatch::bind_ty<llvm::Value>>, 15u, false>, llvm::ZExtInst>, llvm::PatternMatch::BinaryOp_match<llvm::PatternMatch::bind_ty<llvm::Constant>, llvm::PatternMatch::match_combine_or<llvm::PatternMatch::CastInst_match<llvm::PatternMatch::bind_ty<llvm::Value>, llvm::ZExtInst>, llvm::PatternMatch::bind_ty<llvm::Value>>, 15u, false>>::match<llvm::Instruction>(llvm::Instruction*)
|
bool match(ITy *V) {
if (L.match(V))
return true;
if (R.match(V))
return true;
return false;
}
|
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movb (%rsi), %bpl
cmpb $0x44, %bpl
jne 0x22f88e7
movq -0x20(%rbx), %rsi
movq %r14, %rdi
callq 0x22f8958
cmpb $0x44, %bpl
jne 0x22f88f8
testb $0x1, %al
je 0x22f88f8
movb $0x1, %al
popq %rbx
popq %r14
popq %rbp
retq
addq $0x18, %r14
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x22f890c
nop
|
/llvm/IR/PatternMatch.h
|
bool llvm::PatternMatch::BinaryOp_match<llvm::PatternMatch::BinaryOp_match<llvm::PatternMatch::bind_ty<llvm::Value>, llvm::PatternMatch::match_combine_and<llvm::PatternMatch::bind_ty<llvm::Constant>, llvm::PatternMatch::match_unless<llvm::PatternMatch::constantexpr_match>>, 18u, false>, llvm::PatternMatch::deferredval_ty<llvm::Value>, 14u, true>::match<llvm::BinaryOperator>(llvm::BinaryOperator*)
|
inline bool match(unsigned Opc, OpTy *V) {
if (V->getValueID() == Value::InstructionVal + Opc) {
auto *I = cast<BinaryOperator>(V);
return (L.match(I->getOperand(0)) && R.match(I->getOperand(1))) ||
(Commutable && L.match(I->getOperand(1)) &&
R.match(I->getOperand(0)));
}
return false;
}
|
cmpb $0x2b, (%rsi)
jne 0x22fa2bf
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq -0x40(%rsi), %rsi
callq 0x22fa2d0
testb %al, %al
je 0x22fa29f
movq 0x18(%r14), %rax
movq (%rax), %rax
cmpq -0x20(%rbx), %rax
je 0x22fa2c6
movq -0x20(%rbx), %rsi
movq %r14, %rdi
callq 0x22fa2d0
testb %al, %al
je 0x22fa2c2
movq 0x18(%r14), %rax
movq (%rax), %rax
cmpq -0x40(%rbx), %rax
sete %al
jmp 0x22fa2c8
xorl %eax, %eax
retq
xorl %eax, %eax
jmp 0x22fa2c8
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
/llvm/IR/PatternMatch.h
|
simplifyAndOrWithOpReplaced(llvm::Value*, llvm::Value*, llvm::Value*, bool, llvm::InstCombinerImpl&, unsigned int)
|
static Value *simplifyAndOrWithOpReplaced(Value *V, Value *Op, Value *RepOp,
bool SimplifyOnly,
InstCombinerImpl &IC,
unsigned Depth = 0) {
if (Op == RepOp)
return nullptr;
if (V == Op)
return RepOp;
auto *I = dyn_cast<BinaryOperator>(V);
if (!I || !I->isBitwiseLogicOp() || Depth >= 3)
return nullptr;
if (!I->hasOneUse())
SimplifyOnly = true;
Value *NewOp0 = simplifyAndOrWithOpReplaced(I->getOperand(0), Op, RepOp,
SimplifyOnly, IC, Depth + 1);
Value *NewOp1 = simplifyAndOrWithOpReplaced(I->getOperand(1), Op, RepOp,
SimplifyOnly, IC, Depth + 1);
if (!NewOp0 && !NewOp1)
return nullptr;
if (!NewOp0)
NewOp0 = I->getOperand(0);
if (!NewOp1)
NewOp1 = I->getOperand(1);
if (Value *Res = simplifyBinOp(I->getOpcode(), NewOp0, NewOp1,
IC.getSimplifyQuery().getWithInstruction(I)))
return Res;
if (SimplifyOnly)
return nullptr;
return IC.Builder.CreateBinOp(I->getOpcode(), NewOp0, NewOp1);
}
|
cmpq %rdx, %rsi
je 0x2303704
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %r14
cmpq %rsi, %rdi
je 0x2303707
movb (%r14), %al
cmpb $0x1d, %al
setb %dl
movzbl %al, %eax
addl $-0x3c, %eax
cmpl $-0x12, %eax
setb %al
orb %dl, %al
je 0x2303719
xorl %eax, %eax
jmp 0x230370a
xorl %eax, %eax
retq
movq %r15, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %r9d, %ebp
movzbl (%r14), %eax
addl $-0x1d, %eax
movl %eax, %edx
andl $-0x2, %edx
cmpl $0x1c, %edx
sete %dl
cmpl $0x1e, %eax
sete %sil
xorl %eax, %eax
cmpl $0x2, %r9d
ja 0x230370a
orb %dl, %sil
je 0x230370a
movq %r8, %rbx
movq 0x10(%r14), %rax
testq %rax, %rax
je 0x2303758
cmpq $0x0, 0x8(%rax)
setne %al
jmp 0x230375a
movb $0x1, %al
orb %cl, %al
movq -0x40(%r14), %rdi
incl %ebp
movb %al, 0xf(%rsp)
movzbl %al, %r12d
movq %r13, %rsi
movq %r15, %rdx
movl %r12d, %ecx
movq %rbx, %r8
movl %ebp, %r9d
callq 0x23036c7
movq -0x20(%r14), %rdi
movq %r13, %rsi
movq %r15, %rdx
movl %r12d, %ecx
movq %rax, %r12
movq %rbx, %r8
movl %ebp, %r9d
callq 0x23036c7
movq %rax, %r15
movq %r12, %rax
orq %r15, %rax
je 0x2303700
testq %r12, %r12
jne 0x23037b1
movq -0x40(%r14), %r12
testq %r15, %r15
jne 0x23037ba
movq -0x20(%r14), %r15
movzbl (%r14), %edi
addl $-0x1d, %edi
movups 0x58(%rbx), %xmm0
movups 0x68(%rbx), %xmm1
movups 0x78(%rbx), %xmm2
movups 0x88(%rbx), %xmm3
leaq 0x10(%rsp), %rcx
movaps %xmm2, 0x20(%rcx)
movaps %xmm3, 0x30(%rcx)
movaps %xmm1, 0x10(%rcx)
movaps %xmm0, (%rcx)
movq %r14, 0x20(%rcx)
movq %r12, %rsi
movq %r15, %rdx
callq 0x2604709
testq %rax, %rax
setne %cl
orb %cl, 0xf(%rsp)
jne 0x230370a
movq 0x18(%rbx), %rdi
movzbl (%r14), %esi
addl $-0x1d, %esi
leaq 0x10(%rsp), %r8
movw $0x101, 0x20(%r8) # imm = 0x101
movq %r12, %rdx
movq %r15, %rcx
xorl %r9d, %r9d
callq 0x9329a6
jmp 0x230370a
nop
|
/Transforms/InstCombine/InstCombineAndOrXor.cpp
|
foldSignedTruncationCheck(llvm::ICmpInst*, llvm::ICmpInst*, llvm::Instruction&, llvm::IRBuilder<llvm::TargetFolder, llvm::IRBuilderCallbackInserter>&)
|
static Value *foldSignedTruncationCheck(ICmpInst *ICmp0, ICmpInst *ICmp1,
Instruction &CxtI,
InstCombiner::BuilderTy &Builder) {
assert(CxtI.getOpcode() == Instruction::And);
// Match icmp ult (add %arg, C01), C1 (C1 == C01 << 1; powers of two)
auto tryToMatchSignedTruncationCheck = [](ICmpInst *ICmp, Value *&X,
APInt &SignBitMask) -> bool {
CmpInst::Predicate Pred;
const APInt *I01, *I1; // powers of two; I1 == I01 << 1
if (!(match(ICmp,
m_ICmp(Pred, m_Add(m_Value(X), m_Power2(I01)), m_Power2(I1))) &&
Pred == ICmpInst::ICMP_ULT && I1->ugt(*I01) && I01->shl(1) == *I1))
return false;
// Which bit is the new sign bit as per the 'signed truncation' pattern?
SignBitMask = *I01;
return true;
};
// One icmp needs to be 'signed truncation check'.
// We need to match this first, else we will mismatch commutative cases.
Value *X1;
APInt HighestBit;
ICmpInst *OtherICmp;
if (tryToMatchSignedTruncationCheck(ICmp1, X1, HighestBit))
OtherICmp = ICmp0;
else if (tryToMatchSignedTruncationCheck(ICmp0, X1, HighestBit))
OtherICmp = ICmp1;
else
return nullptr;
assert(HighestBit.isPowerOf2() && "expected to be power of two (non-zero)");
// Try to match/decompose into: icmp eq (X & Mask), 0
auto tryToDecompose = [](ICmpInst *ICmp, Value *&X,
APInt &UnsetBitsMask) -> bool {
CmpInst::Predicate Pred = ICmp->getPredicate();
// Can it be decomposed into icmp eq (X & Mask), 0 ?
if (llvm::decomposeBitTestICmp(ICmp->getOperand(0), ICmp->getOperand(1),
Pred, X, UnsetBitsMask,
/*LookThroughTrunc=*/false) &&
Pred == ICmpInst::ICMP_EQ)
return true;
// Is it icmp eq (X & Mask), 0 already?
const APInt *Mask;
if (match(ICmp, m_ICmp(Pred, m_And(m_Value(X), m_APInt(Mask)), m_Zero())) &&
Pred == ICmpInst::ICMP_EQ) {
UnsetBitsMask = *Mask;
return true;
}
return false;
};
// And the other icmp needs to be decomposable into a bit test.
Value *X0;
APInt UnsetBitsMask;
if (!tryToDecompose(OtherICmp, X0, UnsetBitsMask))
return nullptr;
assert(!UnsetBitsMask.isZero() && "empty mask makes no sense.");
// Are they working on the same value?
Value *X;
if (X1 == X0) {
// Ok as is.
X = X1;
} else if (match(X0, m_Trunc(m_Specific(X1)))) {
UnsetBitsMask = UnsetBitsMask.zext(X1->getType()->getScalarSizeInBits());
X = X1;
} else
return nullptr;
// So which bits should be uniform as per the 'signed truncation check'?
// (all the bits starting with (i.e. including) HighestBit)
APInt SignBitsMask = ~(HighestBit - 1U);
// UnsetBitsMask must have some common bits with SignBitsMask,
if (!UnsetBitsMask.intersects(SignBitsMask))
return nullptr;
// Does UnsetBitsMask contain any bits outside of SignBitsMask?
if (!UnsetBitsMask.isSubsetOf(SignBitsMask)) {
APInt OtherHighestBit = (~UnsetBitsMask) + 1U;
if (!OtherHighestBit.isPowerOf2())
return nullptr;
HighestBit = APIntOps::umin(HighestBit, OtherHighestBit);
}
// Else, if it does not, then all is ok as-is.
// %r = icmp ult %X, SignBit
return Builder.CreateICmpULT(X, ConstantInt::get(X->getType(), HighestBit),
CxtI.getName() + ".simplified");
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r13
leaq 0x28(%rsp), %r15
movl $0x1, 0x8(%r15)
movq $0x0, (%r15)
leaq 0x38(%rsp), %rsi
movq %r12, %rdi
movq %r15, %rdx
callq 0x230f018
testb %al, %al
je 0x2305113
movq %r13, %r12
jmp 0x230512d
leaq 0x38(%rsp), %rsi
leaq 0x28(%rsp), %rdx
movq %r13, %rdi
callq 0x230f018
testb %al, %al
je 0x23051d9
movq %rsp, %r8
movl $0x1, 0x8(%r8)
movq $0x0, (%r8)
movzwl 0x2(%r12), %eax
andl $0x3f, %eax
leaq 0x14(%rsp), %r13
movl %eax, (%r13)
movq -0x40(%r12), %rdi
movq -0x20(%r12), %rsi
leaq 0x90(%rsp), %rbp
movq %r13, %rdx
movq %rbp, %rcx
xorl %r9d, %r9d
callq 0x25a43a8
testb %al, %al
je 0x230517c
cmpl $0x20, 0x14(%rsp)
je 0x23051b5
leaq 0x48(%rsp), %rdi
movq %r13, (%rdi)
movq %rbp, 0x8(%rdi)
leaq 0x18(%rsp), %rax
movq %rax, 0x10(%rdi)
movb $0x0, 0x18(%rdi)
movq %r12, %rsi
callq 0x230f182
testb %al, %al
je 0x23051d2
cmpl $0x20, 0x14(%rsp)
jne 0x23051d2
movq 0x18(%rsp), %rsi
movq %rsp, %rdi
callq 0x816f62
movq 0x38(%rsp), %r12
movq 0x90(%rsp), %rax
cmpq %rax, %r12
je 0x23051e0
cmpb $0x43, (%rax)
jne 0x23051d2
cmpq -0x20(%rax), %r12
je 0x23051e7
xorl %ebx, %ebx
jmp 0x230549d
xorl %ebx, %ebx
jmp 0x23054b2
movq %r14, 0x40(%rsp)
jmp 0x2305234
movq 0x8(%r12), %rdi
callq 0x2a9a8f4
leaq 0x48(%rsp), %rdi
movq %rsp, %r12
movq %r12, %rsi
movl %eax, %edx
callq 0x2b11cc6
cmpl $0x41, 0x8(%r12)
jb 0x2305219
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x2305219
callq 0x7802b0
movq %r14, 0x40(%rsp)
movq 0x48(%rsp), %rax
movq %rax, (%rsp)
movl 0x50(%rsp), %eax
movl %eax, 0x8(%rsp)
movq 0x38(%rsp), %r12
movl 0x30(%rsp), %eax
movl %eax, 0x88(%rsp)
cmpl $0x40, %eax
movq %rbx, %r14
ja 0x2305256
movq 0x28(%rsp), %rax
movq %rax, 0x80(%rsp)
jmp 0x2305268
leaq 0x80(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x2b11114
leaq 0x80(%rsp), %r13
movl $0x1, %esi
movq %r13, %rdi
callq 0x2b11738
movl 0x8(%r13), %eax
leaq 0xa8(%rsp), %rbp
movl %eax, 0x8(%rbp)
movq (%r13), %rax
movq %rax, (%rbp)
xorl %ebx, %ebx
movl %ebx, 0x8(%r13)
movq %rbp, %rdi
callq 0x90c61a
movl 0x8(%rbp), %eax
movl %eax, 0x20(%rsp)
movq (%rbp), %rax
movq %rax, 0x18(%rsp)
movl %ebx, 0x8(%rbp)
cmpl $0x41, 0x8(%r13)
jb 0x23052ce
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x23052ce
callq 0x7802b0
movl 0x8(%rsp), %ebp
cmpl $0x40, %ebp
movq %r14, %rbx
ja 0x23052e8
movq 0x18(%rsp), %rax
testq %rax, (%rsp)
setne %al
jmp 0x23052f5
movq %rsp, %rdi
leaq 0x18(%rsp), %rsi
callq 0x2b12aa4
testb %al, %al
je 0x2305485
cmpl $0x40, %ebp
ja 0x2305313
movq 0x18(%rsp), %rax
notq %rax
testq %rax, (%rsp)
sete %al
jmp 0x2305320
movq %rsp, %rdi
leaq 0x18(%rsp), %rsi
callq 0x2b12ae4
testb %al, %al
je 0x2305379
movq 0x8(%r12), %rdi
leaq 0x28(%rsp), %rsi
callq 0x29e3432
movq %rax, %r15
movq 0x40(%rsp), %rdi
callq 0x2a9f76a
leaq 0x48(%rsp), %r8
movw $0x305, 0x20(%r8) # imm = 0x305
movq %rax, (%r8)
movq %rdx, 0x8(%r8)
leaq 0x2c6a058(%rip), %rax # 0x4f6f3b2
movq %rax, 0x10(%r8)
movq %rbx, %rdi
movl $0x24, %esi
movq %r12, %rdx
movq %r15, %rcx
callq 0x938dcc
movq %rax, %rbx
jmp 0x2305487
movl %ebp, 0x78(%rsp)
cmpl $0x40, %ebp
ja 0x230538d
movq (%rsp), %rax
movq %rax, 0x70(%rsp)
jmp 0x230539a
leaq 0x70(%rsp), %rdi
movq %rsp, %rsi
callq 0x2b11114
leaq 0x70(%rsp), %r13
movq %r13, %rdi
callq 0x90c61a
movl 0x8(%r13), %eax
leaq 0x98(%rsp), %rbp
movl %eax, 0x8(%rbp)
movq (%r13), %rax
movq %rax, (%rbp)
xorl %ebx, %ebx
movl %ebx, 0x8(%r13)
movl $0x1, %esi
movq %rbp, %rdi
callq 0x2b1161a
movl 0x8(%rbp), %eax
movl %eax, 0x50(%rsp)
movq (%rbp), %rax
movq %rax, 0x48(%rsp)
movl %ebx, 0x8(%rbp)
cmpl $0x41, 0x8(%r13)
jb 0x23053fa
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x23053fa
callq 0x7802b0
movl 0x50(%rsp), %ebp
cmpl $0x40, %ebp
movq %r14, %rbx
ja 0x2305419
movq 0x48(%rsp), %rax
testq %rax, %rax
je 0x2305471
leaq -0x1(%rax), %rcx
testq %rcx, %rax
jmp 0x2305426
leaq 0x48(%rsp), %rdi
callq 0x2b12a20
cmpl $0x1, %eax
sete %al
testb %al, %al
je 0x2305471
leaq 0x48(%rsp), %r13
movq %r15, %rdi
movq %r13, %rsi
callq 0x2b11ae2
testl %eax, %eax
movq %r13, %rsi
cmovsq %r15, %rsi
movq %r15, %rdi
callq 0x816f62
cmpl $0x41, 0x8(%r13)
jb 0x2305324
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x2305324
callq 0x7802b0
jmp 0x2305324
cmpl $0x41, %ebp
jb 0x2305485
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x2305485
callq 0x7802b0
xorl %ebx, %ebx
cmpl $0x41, 0x20(%rsp)
jb 0x230549d
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x230549d
callq 0x7802b0
cmpl $0x41, 0x8(%rsp)
jb 0x23054b2
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x23054b2
callq 0x7802b0
cmpl $0x41, 0x30(%rsp)
jb 0x23054c8
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x23054c8
callq 0x7802b0
movq %rbx, %rax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/Transforms/InstCombine/InstCombineAndOrXor.cpp
|
bool llvm::PatternMatch::BinaryOp_match<llvm::PatternMatch::bind_ty<llvm::Value>, llvm::PatternMatch::BinaryOp_match<llvm::PatternMatch::cstval_pred_ty<llvm::PatternMatch::is_all_ones, llvm::ConstantInt, true>, llvm::PatternMatch::bind_ty<llvm::Value>, 30u, true>, 29u, true>::match<llvm::Value>(llvm::Value*)
|
inline bool match(unsigned Opc, OpTy *V) {
if (V->getValueID() == Value::InstructionVal + Opc) {
auto *I = cast<BinaryOperator>(V);
return (L.match(I->getOperand(0)) && R.match(I->getOperand(1))) ||
(Commutable && L.match(I->getOperand(1)) &&
R.match(I->getOperand(0)));
}
return false;
}
|
pushq %r14
pushq %rbx
pushq %rax
cmpb $0x3a, (%rsi)
jne 0x230ca8b
movq %rsi, %r14
movq %rdi, %rbx
movq -0x40(%rsi), %rax
testq %rax, %rax
je 0x230ca65
movq (%rbx), %rcx
movq %rax, (%rcx)
leaq 0x8(%rbx), %rdi
movq -0x20(%r14), %rsi
callq 0xa5cd7a
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0x230ca8d
movq -0x20(%r14), %rax
testq %rax, %rax
je 0x230ca8b
movq (%rbx), %rcx
movq %rax, (%rcx)
addq $0x8, %rbx
movq -0x40(%r14), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xa5cd7a
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
|
/llvm/IR/PatternMatch.h
|
bool llvm::PatternMatch::BinaryOp_match<llvm::PatternMatch::cstval_pred_ty<llvm::PatternMatch::is_all_ones, llvm::ConstantInt, true>, llvm::PatternMatch::SpecificBinaryOp_match<llvm::PatternMatch::bind_ty<llvm::Value>, llvm::PatternMatch::bind_ty<llvm::Value>, true>, 30u, true>::match<llvm::Value>(llvm::Value*)
|
inline bool match(unsigned Opc, OpTy *V) {
if (V->getValueID() == Value::InstructionVal + Opc) {
auto *I = cast<BinaryOperator>(V);
return (L.match(I->getOperand(0)) && R.match(I->getOperand(1))) ||
(Commutable && L.match(I->getOperand(1)) &&
R.match(I->getOperand(0)));
}
return false;
}
|
pushq %r15
pushq %r14
pushq %rbx
cmpb $0x3b, (%rsi)
jne 0x230cc75
movq %rsi, %r14
movq %rdi, %rbx
movq -0x40(%rsi), %r15
movq %r15, %rsi
callq 0xa5cdfe
movq (%rbx), %rcx
testq %rcx, %rcx
setne %dl
andb %al, %dl
cmpb $0x1, %dl
jne 0x230cc21
movq %r15, (%rcx)
testb %al, %al
je 0x230cc3a
leaq 0x8(%rbx), %rdi
movq -0x20(%r14), %rsi
callq 0x230cc7e
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0x230cc77
movq -0x20(%r14), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa5cdfe
movq (%rbx), %rcx
testq %rcx, %rcx
setne %dl
andb %al, %dl
cmpb $0x1, %dl
jne 0x230cc5c
movq %r15, (%rcx)
testb %al, %al
je 0x230cc75
addq $0x8, %rbx
movq -0x40(%r14), %rsi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x230cc7e
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
|
/llvm/IR/PatternMatch.h
|
bool llvm::PatternMatch::BinaryOp_match<llvm::PatternMatch::BinaryOp_match<llvm::PatternMatch::cstval_pred_ty<llvm::PatternMatch::is_all_ones, llvm::ConstantInt, true>, llvm::PatternMatch::bind_ty<llvm::Value>, 30u, true>, llvm::PatternMatch::bind_ty<llvm::Value>, 27u, false>::match<llvm::BinaryOperator>(llvm::BinaryOperator*)
|
inline bool match(unsigned Opc, OpTy *V) {
if (V->getValueID() == Value::InstructionVal + Opc) {
auto *I = cast<BinaryOperator>(V);
return (L.match(I->getOperand(0)) && R.match(I->getOperand(1))) ||
(Commutable && L.match(I->getOperand(1)) &&
R.match(I->getOperand(0)));
}
return false;
}
|
cmpb $0x38, (%rsi)
jne 0x23124c0
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq -0x40(%rsi), %rsi
callq 0xa5cd7a
testb %al, %al
je 0x23124c3
movq -0x20(%r14), %rax
testq %rax, %rax
je 0x23124c3
movq 0x10(%rbx), %rcx
movq %rax, (%rcx)
movb $0x1, %al
jmp 0x23124c5
xorl %eax, %eax
retq
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
|
/llvm/IR/PatternMatch.h
|
llvm::iterator_range<llvm::filter_iterator_impl<llvm::mapped_iterator<llvm::df_iterator<llvm::VPBlockDeepTraversalWrapper<llvm::VPBlockBase*>, llvm::df_iterator_default_set<llvm::VPBlockBase*, 8u>, false, llvm::GraphTraits<llvm::VPBlockDeepTraversalWrapper<llvm::VPBlockBase*>>>, auto llvm::VPBlockUtils::blocksOnly<llvm::VPRegionBlock, llvm::iterator_range<llvm::df_iterator<llvm::VPBlockDeepTraversalWrapper<llvm::VPBlockBase*>, llvm::df_iterator_default_set<llvm::VPBlockBase*, 8u>, false, llvm::GraphTraits<llvm::VPBlockDeepTraversalWrapper<llvm::VPBlockBase*>>>>>(llvm::iterator_range<llvm::df_iterator<llvm::VPBlockDeepTraversalWrapper<llvm::VPBlockBase*>, llvm::df_iterator_default_set<llvm::VPBlockBase*, 8u>, false, llvm::GraphTraits<llvm::VPBlockDeepTraversalWrapper<llvm::VPBlockBase*>>>> const&)::'lambda'(llvm::VPBlockBase*), llvm::VPBlockBase&>, auto llvm::VPBlockUtils::blocksOnly<llvm::VPRegionBlock, llvm::iterator_range<llvm::df_iterator<llvm::VPBlockDeepTraversalWrapper<llvm::VPBlockBase*>, llvm::df_iterator_default_set<llvm::VPBlockBase*, 8u>, false, llvm::GraphTraits<llvm::VPBlockDeepTraversalWrapper<llvm::VPBlockBase*>>>>>(llvm::iterator_range<llvm::df_iterator<llvm::VPBlockDeepTraversalWrapper<llvm::VPBlockBase*>, llvm::df_iterator_default_set<llvm::VPBlockBase*, 8u>, false, llvm::GraphTraits<llvm::VPBlockDeepTraversalWrapper<llvm::VPBlockBase*>>>> const&)::'lambda'(llvm::VPBlockBase&), std::forward_iterator_tag>>::iterator_range(llvm::filter_iterator_impl<llvm::mapped_iterator<llvm::df_iterator<llvm::VPBlockDeepTraversalWrapper<llvm::VPBlockBase*>, llvm::df_iterator_default_set<llvm::VPBlockBase*, 8u>, false, llvm::GraphTraits<llvm::VPBlockDeepTraversalWrapper<llvm::VPBlockBase*>>>, auto llvm::VPBlockUtils::blocksOnly<llvm::VPRegionBlock, llvm::iterator_range<llvm::df_iterator<llvm::VPBlockDeepTraversalWrapper<llvm::VPBlockBase*>, llvm::df_iterator_default_set<llvm::VPBlockBase*, 8u>, false, llvm::GraphTraits<llvm::VPBlockDeepTraversalWrapper<llvm::VPBlockBase*>>>>>(llvm::iterator_range<llvm::df_iterator<llvm::VPBlockDeepTraversalWrapper<llvm::VPBlockBase*>, llvm::df_iterator_default_set<llvm::VPBlockBase*, 8u>, false, llvm::GraphTraits<llvm::VPBlockDeepTraversalWrapper<llvm::VPBlockBase*>>>> const&)::'lambda'(llvm::VPBlockBase*), llvm::VPBlockBase&>, auto llvm::VPBlockUtils::blocksOnly<llvm::VPRegionBlock, llvm::iterator_range<llvm::df_iterator<llvm::VPBlockDeepTraversalWrapper<llvm::VPBlockBase*>, llvm::df_iterator_default_set<llvm::VPBlockBase*, 8u>, false, llvm::GraphTraits<llvm::VPBlockDeepTraversalWrapper<llvm::VPBlockBase*>>>>>(llvm::iterator_range<llvm::df_iterator<llvm::VPBlockDeepTraversalWrapper<llvm::VPBlockBase*>, llvm::df_iterator_default_set<llvm::VPBlockBase*, 8u>, false, llvm::GraphTraits<llvm::VPBlockDeepTraversalWrapper<llvm::VPBlockBase*>>>> const&)::'lambda'(llvm::VPBlockBase&), std::forward_iterator_tag>, llvm::filter_iterator_impl<llvm::mapped_iterator<llvm::df_iterator<llvm::VPBlockDeepTraversalWrapper<llvm::VPBlockBase*>, llvm::df_iterator_default_set<llvm::VPBlockBase*, 8u>, false, llvm::GraphTraits<llvm::VPBlockDeepTraversalWrapper<llvm::VPBlockBase*>>>, auto llvm::VPBlockUtils::blocksOnly<llvm::VPRegionBlock, llvm::iterator_range<llvm::df_iterator<llvm::VPBlockDeepTraversalWrapper<llvm::VPBlockBase*>, llvm::df_iterator_default_set<llvm::VPBlockBase*, 8u>, false, llvm::GraphTraits<llvm::VPBlockDeepTraversalWrapper<llvm::VPBlockBase*>>>>>(llvm::iterator_range<llvm::df_iterator<llvm::VPBlockDeepTraversalWrapper<llvm::VPBlockBase*>, llvm::df_iterator_default_set<llvm::VPBlockBase*, 8u>, false, llvm::GraphTraits<llvm::VPBlockDeepTraversalWrapper<llvm::VPBlockBase*>>>> const&)::'lambda'(llvm::VPBlockBase*), llvm::VPBlockBase&>, auto llvm::VPBlockUtils::blocksOnly<llvm::VPRegionBlock, llvm::iterator_range<llvm::df_iterator<llvm::VPBlockDeepTraversalWrapper<llvm::VPBlockBase*>, llvm::df_iterator_default_set<llvm::VPBlockBase*, 8u>, false, llvm::GraphTraits<llvm::VPBlockDeepTraversalWrapper<llvm::VPBlockBase*>>>>>(llvm::iterator_range<llvm::df_iterator<llvm::VPBlockDeepTraversalWrapper<llvm::VPBlockBase*>, llvm::df_iterator_default_set<llvm::VPBlockBase*, 8u>, false, llvm::GraphTraits<llvm::VPBlockDeepTraversalWrapper<llvm::VPBlockBase*>>>> const&)::'lambda'(llvm::VPBlockBase&), std::forward_iterator_tag>)
|
iterator_range(IteratorT begin_iterator, IteratorT end_iterator)
: begin_iterator(std::move(begin_iterator)),
end_iterator(std::move(end_iterator)) {}
|
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r14
leaq 0x20(%rdi), %rsi
movl $0x8, %edx
movq %r12, %rcx
callq 0x2b4e93a
movups 0x60(%r12), %xmm0
movups %xmm0, 0x60(%r14)
movq 0x70(%r12), %rax
movq %rax, 0x70(%r14)
xorl %r13d, %r13d
movq %r13, 0x70(%r12)
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%r12)
movzwl 0x78(%r12), %eax
movw %ax, 0x78(%r14)
movl $0x80, %r15d
leaq (%r14,%r15), %rdi
leaq (%r12,%r15), %rcx
leaq 0xa0(%r14), %rsi
movl $0x8, %edx
callq 0x2b4e93a
movups 0xe0(%r12), %xmm0
movups %xmm0, 0xe0(%r14)
movq 0xf0(%r12), %rax
movq %rax, 0xf0(%r14)
movq %r13, 0xf0(%r12)
xorps %xmm0, %xmm0
movups %xmm0, 0xe0(%r12)
movzwl 0xf8(%r12), %eax
movw %ax, 0xf8(%r14)
leaq 0x108(%r14), %rdi
leaq 0x128(%r14), %rsi
movl $0x8, %edx
movq %rbx, %rcx
callq 0x2b4e93a
movups 0x60(%rbx), %xmm0
movups %xmm0, 0x168(%r14)
movq 0x70(%rbx), %rax
movq %rax, 0x178(%r14)
movq %r13, 0x70(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%rbx)
movzwl 0x78(%rbx), %eax
movw %ax, 0x180(%r14)
leaq 0x188(%r14), %rdi
addq %rbx, %r15
leaq 0x1a8(%r14), %rsi
movl $0x8, %edx
movq %r15, %rcx
callq 0x2b4e93a
movups 0xe0(%rbx), %xmm0
movups %xmm0, 0x1e8(%r14)
movq 0xf0(%rbx), %rax
movq %rax, 0x1f8(%r14)
movq %r13, 0xf0(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0xe0(%rbx)
movzwl 0xf8(%rbx), %eax
movw %ax, 0x200(%r14)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
|
/llvm/ADT/iterator_range.h
|
void llvm::stable_sort<llvm::SmallVector<llvm::ValueDFS, 16u>&, llvm::ValueDFS_Compare>(llvm::SmallVector<llvm::ValueDFS, 16u>&, llvm::ValueDFS_Compare)
|
size_t size() const { return Size; }
|
movl 0x8(%rdi), %edx
testq %rdx, %rdx
je 0x250c456
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq (%rdi), %r15
leaq (%rdx,%rdx,2), %r14
shlq $0x4, %r14
addq %r15, %r14
incq %rdx
shrq %rdx
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x250d736
movq 0x10(%r12), %rdx
testq %rdx, %rdx
je 0x250c426
movq 0x8(%rsp), %rcx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %r8
callq 0x250d88e
jmp 0x250c434
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x250d7e3
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rdi
shlq $0x4, %rax
leaq (%rax,%rax,2), %rsi
callq 0x7800d0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
|
/llvm/ADT/SmallVector.h
|
llvm::PredicateInfoVerifierPass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&)
|
PreservedAnalyses PredicateInfoVerifierPass::run(Function &F,
FunctionAnalysisManager &AM) {
auto &DT = AM.getResult<DominatorTreeAnalysis>(F);
auto &AC = AM.getResult<AssumptionAnalysis>(F);
std::make_unique<PredicateInfo>(F, DT, AC)->verifyPredicateInfo();
return PreservedAnalyses::all();
}
|
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %rbx
leaq 0x3499621(%rip), %rsi # 0x59a60e0
movq %rcx, %rdi
callq 0x2a8ddb2
leaq 0x8(%rax), %r12
leaq 0x347d5be(%rip), %rsi # 0x598a090
movq %r14, %rdi
movq %r15, %rdx
callq 0x2a8ddb2
leaq 0x8(%rax), %r14
movl $0x110, %edi # imm = 0x110
callq 0x7808d0
movq %rax, %r13
movq %rax, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x250c458
movq %r13, %rdi
callq 0x250c570
movl $0x110, %esi # imm = 0x110
movq %r13, %rdi
callq 0x7800d0
leaq 0x20(%rbx), %rax
movq %rax, (%rbx)
movq %rax, 0x8(%rbx)
movl $0x2, %eax
movq %rax, 0x10(%rbx)
xorl %ecx, %ecx
movl %ecx, 0x18(%rbx)
leaq 0x50(%rbx), %rdx
movq %rdx, 0x30(%rbx)
movq %rdx, 0x38(%rbx)
movq %rax, 0x40(%rbx)
movl %ecx, 0x48(%rbx)
leaq 0x3499d71(%rip), %rdx # 0x59a68b8
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0xade436
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
|
/Transforms/Utils/PredicateInfo.cpp
|
(anonymous namespace)::SimplifyCFGOpt::SpeculativelyExecuteBB(llvm::BranchInst*, llvm::BasicBlock*)::$_0 llvm::for_each<llvm::SmallVector<llvm::DbgVariableRecord*, 6u>, (anonymous namespace)::SimplifyCFGOpt::SpeculativelyExecuteBB(llvm::BranchInst*, llvm::BasicBlock*)::$_0>(llvm::SmallVector<llvm::DbgVariableRecord*, 6u>&&, (anonymous namespace)::SimplifyCFGOpt::SpeculativelyExecuteBB(llvm::BranchInst*, llvm::BasicBlock*)::$_0)
|
Callable() = default;
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq (%rdi), %r12
movl 0x8(%rdi), %r13d
movq %rsi, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
testq %r13, %r13
je 0x254be4a
shlq $0x3, %r13
xorl %ebp, %ebp
leaq 0x18(%rsp), %rbx
leaq 0x8(%rsp), %r14
movq (%r12,%rbp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2a22412
movq %rbx, %rdi
movq %r14, %rsi
callq 0x22a03bb
testb %al, %al
je 0x254be41
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r15, %rdi
xorl %ecx, %ecx
callq 0x2a224dc
addq $0x8, %rbp
cmpq %rbp, %r13
jne 0x254be0f
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/llvm/ADT/STLExtras.h
|
llvm::iterator_range<std::reverse_iterator<llvm::filter_iterator_impl<llvm::ilist_iterator_w_bits<llvm::ilist_detail::node_options<llvm::Instruction, false, false, void, true, llvm::BasicBlock>, false, false>, std::function<bool (llvm::Instruction&)>, std::bidirectional_iterator_tag>>> llvm::make_range<std::reverse_iterator<llvm::filter_iterator_impl<llvm::ilist_iterator_w_bits<llvm::ilist_detail::node_options<llvm::Instruction, false, false, void, true, llvm::BasicBlock>, false, false>, std::function<bool (llvm::Instruction&)>, std::bidirectional_iterator_tag>>>(std::reverse_iterator<llvm::filter_iterator_impl<llvm::ilist_iterator_w_bits<llvm::ilist_detail::node_options<llvm::Instruction, false, false, void, true, llvm::BasicBlock>, false, false>, std::function<bool (llvm::Instruction&)>, std::bidirectional_iterator_tag>>, std::reverse_iterator<llvm::filter_iterator_impl<llvm::ilist_iterator_w_bits<llvm::ilist_detail::node_options<llvm::Instruction, false, false, void, true, llvm::BasicBlock>, false, false>, std::function<bool (llvm::Instruction&)>, std::bidirectional_iterator_tag>>)
|
iterator_range<T> make_range(T x, T y) {
return iterator_range<T>(std::move(x), std::move(y));
}
|
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %r15
movq %rdi, %rbx
movups (%rsi), %xmm0
leaq 0x20(%rsp), %r14
movaps %xmm0, -0x20(%r14)
movups 0x10(%rsi), %xmm0
movaps %xmm0, -0x10(%r14)
xorps %xmm1, %xmm1
movaps %xmm1, (%r14)
movaps %xmm1, 0x10(%r14)
movq 0x30(%rsi), %rax
testq %rax, %rax
je 0x254c1f4
movq %rsi, %r12
addq $0x20, %rsi
movq %r14, %rdi
movl $0x2, %edx
callq *%rax
xorps %xmm1, %xmm1
movups 0x30(%r12), %xmm0
movaps %xmm0, 0x30(%rsp)
movups (%r15), %xmm0
leaq 0x60(%rsp), %r12
movaps %xmm0, -0x20(%r12)
movups 0x10(%r15), %xmm0
movaps %xmm0, -0x10(%r12)
movaps %xmm1, (%r12)
movaps %xmm1, 0x10(%r12)
movq 0x30(%r15), %rax
testq %rax, %rax
je 0x254c23a
leaq 0x20(%r15), %rsi
movq %r12, %rdi
movl $0x2, %edx
callq *%rax
movups 0x30(%r15), %xmm0
movaps %xmm0, 0x70(%rsp)
movq %rsp, %rsi
leaq 0x40(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rdx
callq 0x254c28c
movq 0x30(%r15), %rax
testq %rax, %rax
je 0x254c263
movq %r12, %rdi
movq %r12, %rsi
movl $0x3, %edx
callq *%rax
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0x254c27a
movq %r14, %rdi
movq %r14, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
/llvm/ADT/iterator_range.h
|
llvm::detail::DenseMapPair<llvm::PHINode*, llvm::SmallVector<std::pair<llvm::ConstantInt*, llvm::Constant*>, 4u>>* llvm::DenseMapBase<llvm::SmallDenseMap<llvm::PHINode*, llvm::SmallVector<std::pair<llvm::ConstantInt*, llvm::Constant*>, 4u>, 4u, llvm::DenseMapInfo<llvm::PHINode*, void>, llvm::detail::DenseMapPair<llvm::PHINode*, llvm::SmallVector<std::pair<llvm::ConstantInt*, llvm::Constant*>, 4u>>>, llvm::PHINode*, llvm::SmallVector<std::pair<llvm::ConstantInt*, llvm::Constant*>, 4u>, llvm::DenseMapInfo<llvm::PHINode*, void>, llvm::detail::DenseMapPair<llvm::PHINode*, llvm::SmallVector<std::pair<llvm::ConstantInt*, llvm::Constant*>, 4u>>>::InsertIntoBucketImpl<llvm::PHINode*>(llvm::PHINode* const&, llvm::PHINode* const&, llvm::detail::DenseMapPair<llvm::PHINode*, llvm::SmallVector<std::pair<llvm::ConstantInt*, llvm::Constant*>, 4u>>*)
|
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 %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rax
movq %rdx, %r14
movq %rdi, %rbx
movl (%rdi), %edx
movl %edx, %ecx
shrl %ecx
movl $0x4, %esi
testb $0x1, %dl
jne 0x254f8ad
movl 0x10(%rbx), %esi
leal 0x4(,%rcx,4), %edx
leal (%rsi,%rsi,2), %edi
cmpl %edi, %edx
jae 0x254f8e4
notl %ecx
addl %esi, %ecx
subl 0x4(%rbx), %ecx
movl %esi, %edx
shrl $0x3, %edx
cmpl %edx, %ecx
jbe 0x254f8e6
addl $0x2, (%rbx)
cmpq $-0x1000, (%rax) # imm = 0xF000
je 0x254f8da
decl 0x4(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
addl %esi, %esi
movq %rbx, %rdi
callq 0x254f906
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x254f7e8
movq (%r15), %rax
jmp 0x254f8cb
|
/llvm/ADT/DenseMap.h
|
bool llvm::DenseMapBase<llvm::SmallDenseMap<llvm::PHINode*, llvm::Type*, 4u, llvm::DenseMapInfo<llvm::PHINode*, void>, llvm::detail::DenseMapPair<llvm::PHINode*, llvm::Type*>>, llvm::PHINode*, llvm::Type*, llvm::DenseMapInfo<llvm::PHINode*, void>, llvm::detail::DenseMapPair<llvm::PHINode*, llvm::Type*>>::LookupBucketFor<llvm::PHINode*>(llvm::PHINode* const&, llvm::detail::DenseMapPair<llvm::PHINode*, llvm::Type*> const*&) const
|
const BucketT *getBuckets() const {
return Small ? getInlineBuckets() : getLargeRep()->Buckets;
}
|
leaq 0x8(%rdi), %rcx
testb $0x1, (%rdi)
cmoveq 0x8(%rdi), %rcx
movl $0x4, %r8d
cmovel 0x10(%rdi), %r8d
testl %r8d, %r8d
je 0x254fdff
pushq %rbx
movl (%rsi), %edi
movl %edi, %eax
shrl $0x4, %eax
shrl $0x9, %edi
xorl %eax, %edi
decl %r8d
andl %r8d, %edi
movl $0x1, %r10d
xorl %r9d, %r9d
movl %edi, %ebx
shlq $0x4, %rbx
leaq (%rcx,%rbx), %r11
movq (%rcx,%rbx), %rbx
cmpq %rbx, (%rsi)
jne 0x254fdc6
movq %r11, (%rdx)
movb $0x1, %al
xorl %r11d, %r11d
testb %r11b, %r11b
jne 0x254fda4
jmp 0x254fdfc
cmpq $-0x1000, %rbx # imm = 0xF000
jne 0x254fde0
testq %r9, %r9
cmovneq %r9, %r11
movq %r11, (%rdx)
xorl %r11d, %r11d
xorl %eax, %eax
jmp 0x254fdbf
xorq $-0x2000, %rbx # imm = 0xE000
orq %r9, %rbx
cmoveq %r11, %r9
addl %r10d, %edi
incl %r10d
andl %r8d, %edi
movb $0x1, %r11b
jmp 0x254fdbf
popq %rbx
jmp 0x254fe08
movq $0x0, (%rdx)
xorl %eax, %eax
andb $0x1, %al
retq
nop
|
/llvm/ADT/DenseMap.h
|
llvm::LibCallSimplifier::optimizeStrNDup(llvm::CallInst*, llvm::IRBuilderBase&)
|
Value *LibCallSimplifier::optimizeStrNDup(CallInst *CI, IRBuilderBase &B) {
Value *Src = CI->getArgOperand(0);
ConstantInt *Size = dyn_cast<ConstantInt>(CI->getArgOperand(1));
uint64_t SrcLen = GetStringLength(Src);
if (SrcLen && Size) {
annotateDereferenceableBytes(CI, 0, SrcLen);
if (SrcLen <= Size->getZExtValue() + 1)
return copyFlags(*CI, emitStrDup(Src, B, TLI));
}
return nullptr;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x8(%rsp)
movq %rsi, %rbx
movq %rdi, %r15
movl 0x4(%rsi), %eax
shll $0x5, %eax
movq %rsi, %rcx
subq %rax, %rcx
movq (%rcx), %r12
movq 0x20(%rcx), %rbp
cmpb $0x11, (%rbp)
setne %r14b
movq %r12, %rdi
movl $0x8, %esi
callq 0x26fbdaf
movq %rax, %r13
testq %rax, %rax
sete %al
orb %r14b, %al
jne 0x2558576
leaq 0x14(%rsp), %rsi
movl $0x0, (%rsi)
movl $0x1, %edx
movq %rbx, %rdi
movq %r13, %rcx
callq 0x2556fa1
cmpl $0x41, 0x20(%rbp)
jb 0x2558566
movq 0x18(%rbp), %rbp
jmp 0x255856a
addq $0x18, %rbp
movq (%rbp), %rax
incq %rax
cmpq %rax, %r13
jbe 0x2558587
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x18(%r15), %rdx
movq %r12, %rdi
movq 0x8(%rsp), %rsi
callq 0x248eedf
xorl %ecx, %ecx
testq %rax, %rax
je 0x25585a6
cmpb $0x55, (%rax)
cmoveq %rax, %rcx
testq %rcx, %rcx
je 0x2558578
movzwl 0x2(%rbx), %edx
andl $0x3, %edx
movzwl 0x2(%rcx), %esi
andl $-0x4, %esi
orl %edx, %esi
movw %si, 0x2(%rcx)
jmp 0x2558578
nop
|
/Transforms/Utils/SimplifyLibCalls.cpp
|
llvm::LibCallSimplifier::optimizeStringNCpy(llvm::CallInst*, bool, llvm::IRBuilderBase&)
|
Value *LibCallSimplifier::optimizeStringNCpy(CallInst *CI, bool RetEnd,
IRBuilderBase &B) {
Function *Callee = CI->getCalledFunction();
Value *Dst = CI->getArgOperand(0);
Value *Src = CI->getArgOperand(1);
Value *Size = CI->getArgOperand(2);
if (isKnownNonZero(Size, DL)) {
// Both st{p,r}ncpy(D, S, N) access the source and destination arrays
// only when N is nonzero.
annotateNonNullNoUndefBasedOnAccess(CI, 0);
annotateNonNullNoUndefBasedOnAccess(CI, 1);
}
// If the "bound" argument is known set N to it. Otherwise set it to
// UINT64_MAX and handle it later.
uint64_t N = UINT64_MAX;
if (ConstantInt *SizeC = dyn_cast<ConstantInt>(Size))
N = SizeC->getZExtValue();
if (N == 0)
// Fold st{p,r}ncpy(D, S, 0) to D.
return Dst;
if (N == 1) {
Type *CharTy = B.getInt8Ty();
Value *CharVal = B.CreateLoad(CharTy, Src, "stxncpy.char0");
B.CreateStore(CharVal, Dst);
if (!RetEnd)
// Transform strncpy(D, S, 1) to return (*D = *S), D.
return Dst;
// Transform stpncpy(D, S, 1) to return (*D = *S) ? D + 1 : D.
Value *ZeroChar = ConstantInt::get(CharTy, 0);
Value *Cmp = B.CreateICmpEQ(CharVal, ZeroChar, "stpncpy.char0cmp");
Value *Off1 = B.getInt32(1);
Value *EndPtr = B.CreateInBoundsGEP(CharTy, Dst, Off1, "stpncpy.end");
return B.CreateSelect(Cmp, Dst, EndPtr, "stpncpy.sel");
}
// If the length of the input string is known set SrcLen to it.
uint64_t SrcLen = GetStringLength(Src);
if (SrcLen)
annotateDereferenceableBytes(CI, 1, SrcLen);
else
return nullptr;
--SrcLen; // Unbias length.
if (SrcLen == 0) {
// Transform st{p,r}ncpy(D, "", N) to memset(D, '\0', N) for any N.
Align MemSetAlign =
CI->getAttributes().getParamAttrs(0).getAlignment().valueOrOne();
CallInst *NewCI = B.CreateMemSet(Dst, B.getInt8('\0'), Size, MemSetAlign);
AttrBuilder ArgAttrs(CI->getContext(), CI->getAttributes().getParamAttrs(0));
NewCI->setAttributes(NewCI->getAttributes().addParamAttributes(
CI->getContext(), 0, ArgAttrs));
copyFlags(*CI, NewCI);
return Dst;
}
if (N > SrcLen + 1) {
if (N > 128)
// Bail if N is large or unknown.
return nullptr;
// st{p,r}ncpy(D, "a", N) -> memcpy(D, "a\0\0\0", N) for N <= 128.
StringRef Str;
if (!getConstantStringInfo(Src, Str))
return nullptr;
std::string SrcStr = Str.str();
// Create a bigger, nul-padded array with the same length, SrcLen,
// as the original string.
SrcStr.resize(N, '\0');
Src = B.CreateGlobalString(SrcStr, "str");
}
Type *PT = Callee->getFunctionType()->getParamType(0);
// st{p,r}ncpy(D, S, N) -> memcpy(align 1 D, align 1 S, N) when both
// S and N are constant.
CallInst *NewCI = B.CreateMemCpy(Dst, Align(1), Src, Align(1),
ConstantInt::get(DL.getIntPtrType(PT), N));
mergeAttributesAndFlags(NewCI, *CI);
if (!RetEnd)
return Dst;
// stpncpy(D, S, N) returns the address of the first null in D if it writes
// one, otherwise D + N.
Value *Off = B.getInt64(std::min(SrcLen, N));
return B.CreateInBoundsGEP(B.getInt8Ty(), Dst, Off, "endptr");
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rcx, 0x48(%rsp)
movl %edx, 0x44(%rsp)
movq %rsi, %r15
movq -0x20(%rsi), %rax
xorl %r12d, %r12d
testq %rax, %rax
je 0x2558d10
cmpb $0x0, (%rax)
cmoveq %rax, %r12
testq %r12, %r12
je 0x2558d20
movq 0x18(%r12), %rax
cmpq 0x50(%r15), %rax
je 0x2558d23
xorl %r12d, %r12d
movl 0x4(%r15), %eax
shll $0x5, %eax
movq %r15, %rcx
subq %rax, %rcx
movq (%rcx), %r14
movq 0x20(%rcx), %r13
movq 0x40(%rcx), %rbx
movq %rdi, 0x78(%rsp)
movq 0x10(%rdi), %rax
leaq 0x90(%rsp), %rsi
movq %rax, (%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rsi)
movups %xmm0, 0x18(%rsi)
movups %xmm0, 0x28(%rsi)
movw $0x101, 0x38(%rsi) # imm = 0x101
movq %rbx, %rdi
xorl %edx, %edx
callq 0x26f045f
testb %al, %al
je 0x2558db3
movq %r14, %rbp
leaq 0x90(%rsp), %r14
movl $0x0, (%r14)
movl $0x1, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x2556e73
movl $0x1, (%r14)
movq %rbp, %r14
leaq 0x90(%rsp), %rsi
movl $0x1, %edx
movq %r15, %rdi
callq 0x2556e73
movq $-0x1, %rbp
cmpb $0x11, (%rbx)
jne 0x2558dd2
cmpl $0x41, 0x20(%rbx)
jb 0x2558dcb
movq 0x18(%rbx), %rax
jmp 0x2558dcf
leaq 0x18(%rbx), %rax
movq (%rax), %rbp
testq %rbp, %rbp
je 0x255926c
cmpq $0x1, %rbp
jne 0x2558eff
movq 0x48(%rsp), %r12
movq 0x48(%r12), %rdi
callq 0x2a9aac0
movq %rax, %rbx
leaq 0x2a20ff9(%rip), %rcx # 0x4f79df7
movq %r12, %rdi
movq %rax, %rsi
movq %r13, %rdx
callq 0xbaf642
movq %rax, %r15
movq %r12, %rdi
movq %rax, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x933604
cmpb $0x0, 0x44(%rsp)
je 0x255926c
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x29e1878
leaq 0x2a20fc5(%rip), %rcx # 0x4f79e05
movq %r12, %r13
leaq 0x90(%rsp), %r12
movq %rcx, (%r12)
movw $0x103, %bp # imm = 0x103
movw %bp, 0x20(%r12)
movq %r13, %rdi
movl $0x20, %esi
movq %r15, %rdx
movq %rax, %rcx
movq %r12, %r8
callq 0x938dcc
movq %rax, %r15
movq 0x48(%r13), %rdi
callq 0x2a9aad4
movl $0x1, %esi
movq %rax, %rdi
xorl %edx, %edx
callq 0x29e3250
leaq 0x58(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x2a20f7d(%rip), %rax # 0x4f79e16
movq %rax, (%r12)
movw %bp, 0x20(%r12)
movl $0x3, (%rsp)
movq %r14, %r12
leaq 0x90(%rsp), %r14
movl $0x1, %r8d
movq %r13, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movq %r14, %r9
callq 0x933200
leaq 0x2a20f4f(%rip), %rcx # 0x4f79e22
movq %rcx, (%r14)
movw %bp, 0x20(%r14)
leaq 0x90(%rsp), %r8
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %rax, %rcx
xorl %r9d, %r9d
callq 0x2a4caf2
movq %rax, %r14
jmp 0x255926c
movq %r14, 0x38(%rsp)
movq %r13, %rdi
movl $0x8, %esi
callq 0x26fbdaf
testq %rax, %rax
je 0x2559269
movq %rax, %r14
leaq 0x90(%rsp), %rsi
movl $0x1, (%rsi)
movl $0x1, %edx
movq %r15, %rdi
movq %rax, %rcx
callq 0x2556fa1
movq %r14, %rax
decq %rax
je 0x2558fbc
cmpq %r14, %rbp
jbe 0x25590f3
cmpq $0x80, %rbp
movq 0x38(%rsp), %r14
ja 0x2559269
movq %rax, 0x50(%rsp)
xorps %xmm0, %xmm0
leaq 0x80(%rsp), %rsi
movaps %xmm0, (%rsi)
movq %r13, %rdi
movl $0x1, %edx
callq 0x26fbcc6
movl %eax, %ebx
testb %al, %al
je 0x2559261
movq 0x80(%rsp), %rsi
leaq 0x68(%rsp), %rax
testq %rsi, %rsi
je 0x25591e8
movq %rax, -0x10(%rax)
movq 0x88(%rsp), %rdx
addq %rsi, %rdx
leaq 0x58(%rsp), %rdi
callq 0x7fa87c
jmp 0x25591f7
movq 0x48(%r15), %rax
leaq 0x58(%rsp), %rdi
movq %rax, (%rdi)
xorl %r13d, %r13d
xorl %esi, %esi
callq 0x29aca86
leaq 0x90(%rsp), %rdi
movq %rax, (%rdi)
callq 0x29aacd2
movl %eax, %ebp
movzbl %bpl, %r14d
movq 0x48(%rsp), %r12
movq 0x48(%r12), %rdi
callq 0x2a9aac0
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x29e3250
movl $0x100, %ecx # imm = 0x100
orl %ecx, %r14d
btl $0x8, %ebp
cmovael %ecx, %r14d
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movq %r12, %rdi
movq 0x38(%rsp), %rsi
movq %rax, %rdx
movq %rbx, %rcx
movl %r14d, %r8d
xorl %r9d, %r9d
callq 0x2a49d92
movq %rax, %rbx
movq %r15, %rdi
callq 0x2a9f5fc
movq %rax, %r14
movq 0x48(%r15), %rax
leaq 0x58(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x58(%rsp), %r12
movq %r12, %rdi
xorl %esi, %esi
callq 0x29aca86
leaq 0x90(%rsp), %rbp
movq %rbp, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x29ad3ac
movq 0x48(%rbx), %rax
movq %rax, (%r12)
movq %r15, %rdi
callq 0x2a9f5fc
leaq 0x58(%rsp), %rdi
movq %rax, %rsi
movl $0x1, %edx
movq %rbp, %rcx
callq 0x29ac2fc
movq %rax, 0x48(%rbx)
testq %rbx, %rbx
je 0x25590b3
xorl %r13d, %r13d
cmpb $0x55, (%rbx)
cmoveq %rbx, %r13
testq %r13, %r13
je 0x25590cf
movzwl 0x2(%r15), %eax
andl $0x3, %eax
movzwl 0x2(%r13), %ecx
andl $-0x4, %ecx
orl %eax, %ecx
movw %cx, 0x2(%r13)
leaq 0xa8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
movq 0x38(%rsp), %r14
je 0x255926c
callq 0x780910
jmp 0x255926c
movq %rax, 0x50(%rsp)
movq 0x38(%rsp), %r14
movq 0x18(%r12), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rsi
movq 0x78(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x2a009d6
movq %rax, %rdi
movq %rbp, %rsi
xorl %edx, %edx
callq 0x29e1878
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rsp)
movups %xmm0, 0x10(%rsp)
movq %rax, (%rsp)
movl $0x0, 0x8(%rsp)
movq 0x48(%rsp), %r12
movq %r12, %rdi
movl $0xe7, %esi
movq %r14, %rdx
movl $0x100, %ecx # imm = 0x100
movq %r13, %r8
movl $0x100, %r9d # imm = 0x100
callq 0x2a4a196
movq %rax, %rdi
movq %r15, %rsi
callq 0x25586cb
cmpb $0x0, 0x44(%rsp)
je 0x255926c
movq 0x50(%rsp), %rbx
cmpq %rbx, %rbp
cmovbq %rbp, %rbx
movq 0x48(%r12), %rdi
callq 0x2a9aade
movq %rax, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x29e3250
leaq 0x58(%rsp), %rbx
movq %rax, (%rbx)
movq 0x48(%r12), %rdi
callq 0x2a9aac0
leaq 0x2a20c2b(%rip), %rcx # 0x4f79dde
leaq 0x90(%rsp), %r9
movq %rcx, (%r9)
movw $0x103, 0x20(%r9) # imm = 0x103
movl $0x3, (%rsp)
movl $0x1, %r8d
movq %r12, %rdi
movq %rax, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x933200
jmp 0x2558ef7
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x58(%rsp), %r14
movq %r14, %rdi
movq %rbp, %rsi
xorl %edx, %edx
callq 0x7804e0
movq (%r14), %rsi
movq 0x8(%r14), %rdx
leaq 0x2b4cdeb(%rip), %rax # 0x50a6002
leaq 0x90(%rsp), %rcx
movq %rax, (%rcx)
movw $0x103, 0x20(%rcx) # imm = 0x103
movl $0x1, (%rsp)
movq 0x48(%rsp), %rdi
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x2a498ac
movq %rax, %r13
movq (%r14), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x255925c
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x7800d0
movq 0x38(%rsp), %r14
testb %bl, %bl
jne 0x25590fd
xorl %r14d, %r14d
movq %r14, %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
|
/Transforms/Utils/SimplifyLibCalls.cpp
|
llvm::LibCallSimplifier::optimizeFls(llvm::CallInst*, llvm::IRBuilderBase&)
|
Value *LibCallSimplifier::optimizeFls(CallInst *CI, IRBuilderBase &B) {
// All variants of fls return int which need not be 32 bits wide.
// fls{,l,ll}(x) -> (int)(sizeInBits(x) - llvm.ctlz(x, false))
Value *Op = CI->getArgOperand(0);
Type *ArgType = Op->getType();
Value *V = B.CreateIntrinsic(Intrinsic::ctlz, {ArgType}, {Op, B.getFalse()},
nullptr, "ctlz");
V = B.CreateSub(ConstantInt::get(V->getType(), ArgType->getIntegerBitWidth()),
V);
return B.CreateIntCast(V, CI->getType(), false);
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movl 0x4(%rsi), %eax
shll $0x5, %eax
movq %rsi, %rcx
subq %rax, %rcx
movq (%rcx), %rax
movq 0x8(%rax), %r13
leaq 0x8(%rsp), %r15
movq %r13, (%r15)
leaq 0x38(%rsp), %r12
movq %rax, (%r12)
movq 0x48(%rdx), %rdi
callq 0x29e32a2
movq %rax, 0x8(%r12)
leaq 0x2a70b91(%rip), %rax # 0x4fd01ee
leaq 0x10(%rsp), %rbp
movq %rax, (%rbp)
movw $0x103, 0x20(%rbp) # imm = 0x103
movl $0x1, %ecx
movl $0x2, %r9d
movq %rbx, %rdi
movl $0x3f, %esi
movq %r15, %rdx
movq %r12, %r8
pushq %rbp
pushq $0x0
callq 0x2a49d24
addq $0x10, %rsp
movq %rax, %r15
movq 0x8(%rax), %rdi
movl 0x8(%r13), %esi
shrl $0x8, %esi
xorl %edx, %edx
callq 0x29e1878
movw $0x101, %r13w # imm = 0x101
movw %r13w, 0x20(%rbp)
leaq 0x10(%rsp), %r12
movq %rbx, %rdi
movq %rax, %rsi
movq %r15, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xc105bc
movq 0x8(%r14), %rdx
movw %r13w, 0x20(%r12)
leaq 0x10(%rsp), %r8
movq %rbx, %rdi
movq %rax, %rsi
xorl %ecx, %ecx
callq 0x933054
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
|
/Transforms/Utils/SimplifyLibCalls.cpp
|
llvm::LibCallSimplifier::optimizePuts(llvm::CallInst*, llvm::IRBuilderBase&)
|
Value *LibCallSimplifier::optimizePuts(CallInst *CI, IRBuilderBase &B) {
annotateNonNullNoUndefBasedOnAccess(CI, 0);
if (!CI->use_empty())
return nullptr;
// Check for a constant string.
// puts("") -> putchar('\n')
StringRef Str;
if (getConstantStringInfo(CI->getArgOperand(0), Str) && Str.empty()) {
// putchar takes an argument of the same type as puts returns, i.e.,
// int, which need not be 32 bits wide.
Type *IntTy = CI->getType();
return copyFlags(*CI, emitPutChar(ConstantInt::get(IntTy, '\n'), B, TLI));
}
return nullptr;
}
|
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movq %rsp, %rsi
movl $0x0, (%rsi)
movl $0x1, %edx
movq %rbx, %rdi
callq 0x2556e73
cmpq $0x0, 0x10(%rbx)
je 0x25618e9
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
movl 0x4(%rbx), %eax
shll $0x5, %eax
movq %rbx, %rcx
subq %rax, %rcx
movq (%rcx), %rdi
movl $0x1, %edx
callq 0x26fbcc6
movl %eax, %ecx
xorl %eax, %eax
testb %cl, %cl
je 0x25618dd
cmpq $0x0, 0x8(%rsp)
jne 0x25618dd
movq 0x8(%rbx), %rdi
xorl %r12d, %r12d
movl $0xa, %esi
xorl %edx, %edx
callq 0x29e1878
movq 0x18(%r15), %rdx
movq %rax, %rdi
movq %r14, %rsi
callq 0x2490231
testq %rax, %rax
je 0x256194c
xorl %r12d, %r12d
cmpb $0x55, (%rax)
cmoveq %rax, %r12
testq %r12, %r12
je 0x25618dd
movzwl 0x2(%rbx), %ecx
andl $0x3, %ecx
movzwl 0x2(%r12), %edx
andl $-0x4, %edx
orl %ecx, %edx
movw %dx, 0x2(%r12)
jmp 0x25618dd
|
/Transforms/Utils/SimplifyLibCalls.cpp
|
llvm::FortifiedLibCallSimplifier::optimizeMemSetChk(llvm::CallInst*, llvm::IRBuilderBase&)
|
Value *FortifiedLibCallSimplifier::optimizeMemSetChk(CallInst *CI,
IRBuilderBase &B) {
if (isFortifiedCallFoldable(CI, 3, 2)) {
Value *Val = B.CreateIntCast(CI->getArgOperand(1), B.getInt8Ty(), false);
CallInst *NewCI = B.CreateMemSet(CI->getArgOperand(0), Val,
CI->getArgOperand(2), Align(1));
mergeAttributesAndFlags(NewCI, *CI);
return CI->getArgOperand(0);
}
return nullptr;
}
|
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdx, %r14
movq %rsi, %rbx
xorl %r15d, %r15d
movabsq $0x100000002, %rcx # imm = 0x100000002
movl $0x3, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x25629a6
testb %al, %al
je 0x2562d2d
movl 0x4(%rbx), %eax
shll $0x5, %eax
movq %rbx, %rcx
subq %rax, %rcx
movq 0x20(%rcx), %r15
movq 0x48(%r14), %rdi
callq 0x2a9aac0
leaq 0x18(%rsp), %r8
movw $0x101, 0x20(%r8) # imm = 0x101
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x933054
movl 0x4(%rbx), %ecx
shll $0x5, %ecx
movq %rbx, %rdx
subq %rcx, %rdx
movq (%rdx), %rsi
movq 0x40(%rdx), %rcx
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movq %r14, %rdi
movq %rax, %rdx
movl $0x100, %r8d # imm = 0x100
xorl %r9d, %r9d
callq 0x2a49d92
movq %rax, %rdi
movq %rbx, %rsi
callq 0x25586cb
movl 0x4(%rbx), %eax
shll $0x5, %eax
subq %rax, %rbx
movq (%rbx), %r15
movq %r15, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
|
/Transforms/Utils/SimplifyLibCalls.cpp
|
llvm::SmallVectorTemplateBase<(anonymous namespace)::POTWorklistEntry, true>::push_back((anonymous namespace)::POTWorklistEntry const&)
|
void push_back(ValueParamT Elt) {
const T *EltPtr = reserveForParamAndGetAddress(Elt);
memcpy(reinterpret_cast<void *>(this->end()), EltPtr, sizeof(T));
this->set_size(this->size() + 1);
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl 0x8(%rdi), %edx
cmpl 0xc(%rdi), %edx
jae 0x256aeda
movq (%rbx), %rax
movl 0x8(%rbx), %ecx
leaq (%rcx,%rcx,2), %rcx
movq 0x10(%r14), %rdx
movq %rdx, 0x10(%rax,%rcx,8)
movups (%r14), %xmm0
movups %xmm0, (%rax,%rcx,8)
incl 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %rax
leaq (%rdx,%rdx,2), %rcx
incq %rdx
cmpq %r14, %rax
setbe %sil
leaq (%rax,%rcx,8), %rcx
cmpq %r14, %rcx
seta %bpl
andb %sil, %bpl
movq $-0x1, %r15
cmpb $0x1, %bpl
je 0x256af29
leaq 0x10(%rbx), %rsi
movl $0x18, %ecx
movq %rbx, %rdi
callq 0x2b4ed86
testb %bpl, %bpl
je 0x256aeb1
leaq (%r15,%r15,2), %r14
shlq $0x3, %r14
addq (%rbx), %r14
jmp 0x256aeb1
movq %r14, %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movabsq $-0x5555555555555555, %r15 # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %r15
jmp 0x256af06
nop
|
/llvm/ADT/SmallVector.h
|
llvm::AAResults::alias(llvm::MemoryLocation const&, llvm::MemoryLocation const&, llvm::AAQueryInfo&, llvm::Instruction const*)
|
AliasResult AAResults::alias(const MemoryLocation &LocA,
const MemoryLocation &LocB, AAQueryInfo &AAQI,
const Instruction *CtxI) {
AliasResult Result = AliasResult::MayAlias;
if (EnableAATrace) {
for (unsigned I = 0; I < AAQI.Depth; ++I)
dbgs() << " ";
dbgs() << "Start " << *LocA.Ptr << " @ " << LocA.Size << ", "
<< *LocB.Ptr << " @ " << LocB.Size << "\n";
}
AAQI.Depth++;
for (const auto &AA : AAs) {
Result = AA->alias(LocA, LocB, AAQI, CtxI);
if (Result != AliasResult::MayAlias)
break;
}
AAQI.Depth--;
if (EnableAATrace) {
for (unsigned I = 0; I < AAQI.Depth; ++I)
dbgs() << " ";
dbgs() << "End " << *LocA.Ptr << " @ " << LocA.Size << ", "
<< *LocB.Ptr << " @ " << LocB.Size << " = " << Result << "\n";
}
if (AAQI.Depth == 0) {
if (Result == AliasResult::NoAlias)
++NumNoAlias;
else if (Result == AliasResult::MustAlias)
++NumMustAlias;
else
++NumMayAlias;
}
return Result;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
incl 0x158(%rcx)
movq 0x8(%rdi), %rbp
movq 0x10(%rdi), %r13
cmpq %r13, %rbp
je 0x256c82e
movq %r8, %r14
movq %rdx, %r15
movq %rsi, %r12
addq $0x8, %rbp
movq -0x8(%rbp), %rdi
movq (%rdi), %rax
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
movq %r14, %r8
callq *0x10(%rax)
cmpb $0x1, %al
jne 0x256c833
leaq 0x8(%rbp), %rcx
cmpq %r13, %rbp
movq %rcx, %rbp
jne 0x256c806
jmp 0x256c833
movl $0x1, %eax
decl 0x158(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/Analysis/AliasAnalysis.cpp
|
llvm::cl::opt<bool, false, llvm::cl::parser<bool>>::opt<char [28], llvm::cl::OptionHidden>(char const (&) [28], llvm::cl::OptionHidden const&)
|
explicit opt(const Mods &... Ms)
: Option(llvm::cl::Optional, NotHidden), Parser(*this) {
apply(this, Ms...);
done();
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
xorl %ebp, %ebp
xorl %esi, %esi
xorl %edx, %edx
callq 0x7fca88
movb %bpl, 0x80(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x88(%rbx)
movb %bpl, 0x91(%rbx)
leaq 0x31d924a(%rip), %rax # 0x5747988
addq $0x10, %rax
movq %rax, 0x88(%rbx)
leaq 0x33896b8(%rip), %rax # 0x58f7e08
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x33892ca(%rip), %rax # 0x58f7a28
addq $0x10, %rax
movq %rax, 0x98(%rbx)
movups %xmm0, 0xa0(%rbx)
leaq -0x1d71b89(%rip), %rax # 0x7fcbee
movq %rax, 0xb8(%rbx)
leaq -0x1d71b95(%rip), %rax # 0x7fcbf0
movq %rax, 0xb0(%rbx)
movq %r15, %rdi
callq 0x7802c0
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x2b1f336
movl (%r14), %eax
movzwl 0xa(%rbx), %ecx
shll $0x5, %eax
andl $0x60, %eax
andl $-0x61, %ecx
orl %eax, %ecx
movw %cx, 0xa(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2b1e814
|
/llvm/Support/CommandLine.h
|
llvm::DenseMapBase<llvm::DenseMap<std::pair<llvm::Value const*, llvm::Type*>, llvm::detail::DenseSetEmpty, llvm::DenseMapInfo<std::pair<llvm::Value const*, llvm::Type*>, void>, llvm::detail::DenseSetPair<std::pair<llvm::Value const*, llvm::Type*>>>, std::pair<llvm::Value const*, llvm::Type*>, llvm::detail::DenseSetEmpty, llvm::DenseMapInfo<std::pair<llvm::Value const*, llvm::Type*>, void>, llvm::detail::DenseSetPair<std::pair<llvm::Value const*, llvm::Type*>>>::moveFromOldBuckets(llvm::detail::DenseSetPair<std::pair<llvm::Value const*, llvm::Type*>>*, llvm::detail::DenseSetPair<std::pair<llvm::Value const*, llvm::Type*>>*)
|
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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq $0x0, 0x8(%rdi)
movl 0x10(%rdi), %eax
testq %rax, %rax
je 0x257059f
movq (%r15), %rcx
shlq $0x4, %rax
addq %rcx, %rax
movq $-0x1000, %rdx # imm = 0xF000
movq %rdx, (%rcx)
movq %rdx, 0x8(%rcx)
addq $0x10, %rcx
cmpq %rax, %rcx
jne 0x257058f
cmpq %rbx, %r14
je 0x2570605
movq $-0x1000, %r13 # imm = 0xF000
movq $-0x2000, %rbp # imm = 0xE000
movq %rsp, %r12
movq (%r14), %rax
movq 0x8(%r14), %rcx
movq %rax, %rdx
xorq %r13, %rdx
movq %rcx, %rsi
xorq %r13, %rsi
orq %rdx, %rsi
je 0x25705fc
xorq %rbp, %rax
xorq %rbp, %rcx
orq %rax, %rcx
je 0x25705fc
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x2570340
movq (%rsp), %rax
movq (%r14), %rcx
movq %rcx, (%rax)
movq 0x8(%r14), %rcx
movq %rcx, 0x8(%rax)
incl 0x8(%r15)
addq $0x10, %r14
cmpq %rbx, %r14
jne 0x25705b5
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/llvm/ADT/DenseMap.h
|
llvm::AliasSetTracker::add(llvm::StoreInst*)
|
void AliasSetTracker::add(StoreInst *SI) {
if (isStrongerThanMonotonic(SI->getOrdering()))
return addUnknown(SI);
addMemoryLocation(MemoryLocation::get(SI), AliasSet::ModAccess);
}
|
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
movzwl 0x2(%rsi), %eax
shrl $0x4, %eax
andl $0x38, %eax
leaq 0xe8a7df(%rip), %rcx # 0x33fbd90
cmpb $0x1, 0x2(%rcx,%rax)
jne 0x25715c7
movq %rbx, %rdi
addq $0x68, %rsp
popq %rbx
popq %r14
jmp 0x2571484
leaq 0x38(%rsp), %r14
movq %r14, %rdi
callq 0x2659c44
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups 0x20(%r14), %xmm2
movq %rsp, %rsi
movaps %xmm2, 0x20(%rsi)
movaps %xmm1, 0x10(%rsi)
movaps %xmm0, (%rsi)
movq %rbx, %rdi
callq 0x25711be
orb $0x20, 0x43(%rax)
cmpq $0x0, 0x38(%rbx)
jne 0x2571616
movl 0x30(%rbx), %eax
cmpl 0x341897c(%rip), %eax # 0x5989f88
jbe 0x2571616
movq %rbx, %rdi
callq 0x2571b7e
addq $0x68, %rsp
popq %rbx
popq %r14
retq
|
/Analysis/AliasSetTracker.cpp
|
llvm::AliasSetTracker::add(llvm::BasicBlock&)
|
void AliasSetTracker::add(BasicBlock &BB) {
for (auto &I : BB)
add(&I);
}
|
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq 0x38(%rsi), %r15
addq $0x30, %rbx
cmpq %rbx, %r15
je 0x2571a76
movq %rdi, %r14
leaq -0x18(%r15), %rsi
testq %r15, %r15
cmoveq %r15, %rsi
movq %r14, %rdi
callq 0x25717a2
movq 0x8(%r15), %r15
cmpq %rbx, %r15
jne 0x2571a5a
popq %rbx
popq %r14
popq %r15
retq
|
/Analysis/AliasSetTracker.cpp
|
void llvm::SmallVectorImpl<llvm::MemoryLocation>::append<std::move_iterator<llvm::MemoryLocation*>, void>(std::move_iterator<llvm::MemoryLocation*>, std::move_iterator<llvm::MemoryLocation*>)
|
void append(ItTy in_start, ItTy in_end) {
this->assertSafeToAddRange(in_start, in_end);
size_type NumInputs = std::distance(in_start, in_end);
this->reserve(this->size() + NumInputs);
this->uninitialized_copy(in_start, in_end, this->end());
this->set_size(this->size() + NumInputs);
}
|
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rdx, %rax
subq %rsi, %rax
sarq $0x4, %rax
movabsq $-0x5555555555555555, %r12 # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %r12
movl 0x8(%rdi), %edx
movl 0xc(%rdi), %eax
addq %r12, %rdx
cmpq %rax, %rdx
jbe 0x2572b22
leaq 0x10(%rbx), %rsi
movl $0x30, %ecx
movq %rbx, %rdi
callq 0x2b4ed86
cmpq %r14, %r15
je 0x2572b5b
movl 0x8(%rbx), %eax
leaq (%rax,%rax,2), %rax
shlq $0x4, %rax
addq (%rbx), %rax
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups 0x20(%r15), %xmm2
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
addq $0x30, %r15
addq $0x30, %rax
cmpq %r14, %r15
jne 0x2572b35
addl %r12d, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
|
/llvm/ADT/SmallVector.h
|
void llvm::erase<llvm::SmallVector<llvm::AssumptionCache::ResultElem, 4u>, llvm::AssumeInst*>(llvm::SmallVector<llvm::AssumptionCache::ResultElem, 4u>&, llvm::AssumeInst*)
|
void erase(Container &C, ValueType V) {
C.erase(std::remove(C.begin(), C.end(), V), C.end());
}
|
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rdx
movq %rsi, (%rdx)
movq (%rdi), %rdi
movl 0x8(%rbx), %esi
shlq $0x5, %rsi
addq %rdi, %rsi
callq 0x2576f10
movl 0x8(%rbx), %edx
shlq $0x5, %rdx
addq (%rbx), %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2576e8e
addq $0x10, %rsp
popq %rbx
retq
nop
|
/llvm/ADT/STLExtras.h
|
llvm::DenseMapBase<llvm::DenseMap<llvm::AssumptionCache::AffectedValueCallbackVH, llvm::SmallVector<llvm::AssumptionCache::ResultElem, 1u>, llvm::DenseMapInfo<llvm::Value*, void>, llvm::detail::DenseMapPair<llvm::AssumptionCache::AffectedValueCallbackVH, llvm::SmallVector<llvm::AssumptionCache::ResultElem, 1u>>>, llvm::AssumptionCache::AffectedValueCallbackVH, llvm::SmallVector<llvm::AssumptionCache::ResultElem, 1u>, llvm::DenseMapInfo<llvm::Value*, void>, llvm::detail::DenseMapPair<llvm::AssumptionCache::AffectedValueCallbackVH, llvm::SmallVector<llvm::AssumptionCache::ResultElem, 1u>>>::find(llvm::AssumptionCache::AffectedValueCallbackVH 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
pushq %rax
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rdx
callq 0x25769c0
movl 0x10(%rbx), %ecx
imulq $0x58, %rcx, %rdx
addq (%rbx), %rdx
testb %al, %al
movq (%r14), %rax
cmoveq %rdx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
|
/llvm/ADT/DenseMap.h
|
llvm::DenseMap<llvm::AssumptionCacheTracker::FunctionCallbackVH, std::unique_ptr<llvm::AssumptionCache, std::default_delete<llvm::AssumptionCache>>, llvm::DenseMapInfo<llvm::Value*, void>, llvm::detail::DenseMapPair<llvm::AssumptionCacheTracker::FunctionCallbackVH, std::unique_ptr<llvm::AssumptionCache, std::default_delete<llvm::AssumptionCache>>>>::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, %rbx
movl 0x10(%rdi), %r15d
decl %esi
movl %esi, %eax
shrl %eax
orl %esi, %eax
movl %eax, %ecx
shrl $0x2, %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x4, %eax
orl %ecx, %eax
movl %eax, %ecx
shrl $0x8, %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x10, %eax
orl %ecx, %eax
incl %eax
cmpl $0x41, %eax
movl $0x40, %ecx
cmovael %eax, %ecx
movq (%rdi), %r14
movl %ecx, 0x10(%rdi)
shlq $0x4, %rcx
leaq (%rcx,%rcx,2), %rdi
movl $0x8, %esi
callq 0x2b410ec
movq %rax, (%rbx)
testq %r14, %r14
je 0x2577485
shlq $0x4, %r15
leaq (%r15,%r15,2), %r15
leaq (%r14,%r15), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2577492
movl $0x8, %edx
movq %r14, %rdi
movq %r15, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x2b410f1
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x25767c0
|
/llvm/ADT/DenseMap.h
|
llvm::DenseMapIterator<llvm::AssumptionCacheTracker::FunctionCallbackVH, std::unique_ptr<llvm::AssumptionCache, std::default_delete<llvm::AssumptionCache>>, llvm::DenseMapInfo<llvm::Value*, void>, llvm::detail::DenseMapPair<llvm::AssumptionCacheTracker::FunctionCallbackVH, std::unique_ptr<llvm::AssumptionCache, std::default_delete<llvm::AssumptionCache>>>, true>::AdvancePastEmptyBuckets()
|
void AdvancePastEmptyBuckets() {
assert(Ptr <= End);
const KeyT Empty = KeyInfoT::getEmptyKey();
const KeyT Tombstone = KeyInfoT::getTombstoneKey();
while (Ptr != End && (KeyInfoT::isEqual(Ptr->getFirst(), Empty) ||
KeyInfoT::isEqual(Ptr->getFirst(), Tombstone)))
++Ptr;
}
|
subq $0x28, %rsp
movq $0x2, 0x8(%rsp)
xorl %eax, %eax
movq %rax, 0x10(%rsp)
movq $-0x1000, 0x18(%rsp) # imm = 0xF000
leaq 0x3335800(%rip), %rcx # 0x58acdf8
addq $0x10, %rcx
movq %rcx, (%rsp)
movq %rax, 0x20(%rsp)
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
cmpq %rcx, %rax
je 0x2577632
movl $0x1000, %edx # imm = 0x1000
movq 0x18(%rax), %rsi
orq %rdx, %rsi
cmpq $-0x1000, %rsi # imm = 0xF000
jne 0x2577632
addq $0x30, %rax
movq %rax, (%rdi)
cmpq %rcx, %rax
jne 0x2577616
movq 0x18(%rsp), %rax
cmpq $-0x2000, %rax # imm = 0xE000
je 0x2577656
cmpq $-0x1000, %rax # imm = 0xF000
je 0x2577656
testq %rax, %rax
je 0x2577656
leaq 0x8(%rsp), %rdi
callq 0x2aa1dc0
addq $0x28, %rsp
retq
nop
|
/llvm/ADT/DenseMap.h
|
llvm::DenseMapBase<llvm::DenseMap<llvm::Instruction*, llvm::TinyPtrVector<llvm::Value const*>, llvm::DenseMapInfo<llvm::Instruction*, void>, llvm::detail::DenseMapPair<llvm::Instruction*, llvm::TinyPtrVector<llvm::Value const*>>>, llvm::Instruction*, llvm::TinyPtrVector<llvm::Value const*>, llvm::DenseMapInfo<llvm::Instruction*, void>, llvm::detail::DenseMapPair<llvm::Instruction*, llvm::TinyPtrVector<llvm::Value const*>>>::erase(llvm::Instruction* const&)
|
bool erase(const KeyT &Val) {
BucketT *TheBucket;
if (!LookupBucketFor(Val, TheBucket))
return false; // not in map.
TheBucket->getSecond().~ValueT();
TheBucket->getFirst() = getTombstoneKey();
decrementNumEntries();
incrementNumTombstones();
return true;
}
|
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rdx
callq 0x257df46
movl %eax, %ebp
testb %al, %al
je 0x2577aee
movq 0x8(%rsp), %r14
leaq 0x8(%r14), %rdi
callq 0x1bfe5bc
movq $-0x2000, (%r14) # imm = 0xE000
movq 0x8(%rbx), %xmm0
paddd 0xe2bb67(%rip), %xmm0 # 0x33a3650
movq %xmm0, 0x8(%rbx)
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
|
/llvm/ADT/DenseMap.h
|
Subsets and Splits
SQL Console for LLM4Binary/decompile-bench
Filters out entries with file names ending in .cpp, providing a basic subset of the dataset that excludes C++ files.