MCPcopy Create free account
hub / github.com/beefytech/Beef / AddNop

Method AddNop

IDEHelper/Compiler/BfIRCodeGen.cpp:1583–1599  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1581}
1582
1583void BfIRCodeGen::AddNop()
1584{
1585 if ((mTargetTriple.GetMachineType() != BfMachineType_x86) && (mTargetTriple.GetMachineType() != BfMachineType_x64))
1586 return;
1587
1588 if (mNopInlineAsm == NULL)
1589 {
1590 llvm::SmallVector<llvm::Type*, 8> paramTypes;
1591 llvm::FunctionType* funcType = llvm::FunctionType::get(llvm::Type::getVoidTy(*mLLVMContext), paramTypes, false);
1592 mNopInlineAsm = llvm::InlineAsm::get(funcType,
1593 "nop", "", true, false, llvm::InlineAsm::AD_ATT);
1594 }
1595
1596 llvm::CallInst* callInst = mIRBuilder->CreateCall(mNopInlineAsm);
1597
1598 callInst->addFnAttr(llvm::Attribute::NoUnwind);
1599}
1600
1601llvm::Value* BfIRCodeGen::TryToVector(const BfIRTypedValue& value)
1602{

Callers

nothing calls this directly

Calls 2

GetMachineTypeMethod · 0.80
CreateCallMethod · 0.45

Tested by

no test coverage detected