| 1581 | } |
| 1582 | |
| 1583 | void 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 | |
| 1601 | llvm::Value* BfIRCodeGen::TryToVector(const BfIRTypedValue& value) |
| 1602 | { |
nothing calls this directly
no test coverage detected