Lines Matching defs:Instruction

1 //===-- Instruction.cpp - Implement the Instruction class -----------------===//
10 // This file implements the Instruction class for the IR library.
14 #include "llvm/IR/Instruction.h"
24 Instruction::Instruction(Type *ty, unsigned it, Use *Ops, unsigned NumOps,
25 Instruction *InsertBefore)
33 "Instruction to insert before is not in a basic block!");
38 const DataLayout *Instruction::getDataLayout() const {
42 Instruction::Instruction(Type *ty, unsigned it, Use *Ops, unsigned NumOps,
55 Instruction::~Instruction() {
56 assert(!Parent && "Instruction still linked in the program!");
62 void Instruction::setParent(BasicBlock *P) {
72 void Instruction::removeFromParent() {
76 void Instruction::eraseFromParent() {
82 void Instruction::insertBefore(Instruction *InsertPos) {
88 void Instruction::insertAfter(Instruction *InsertPos) {
95 void Instruction::moveBefore(Instruction *MovePos) {
103 void Instruction::setHasUnsafeAlgebra(bool B) {
110 void Instruction::setHasNoNaNs(bool B) {
117 void Instruction::setHasNoInfs(bool B) {
125 void Instruction::setHasNoSignedZeros(bool B) {
133 void Instruction::setHasAllowReciprocal(bool B) {
141 void Instruction::setFastMathFlags(FastMathFlags FMF) {
147 bool Instruction::hasUnsafeAlgebra() const {
153 bool Instruction::hasNoNaNs() const {
159 bool Instruction::hasNoInfs() const {
165 bool Instruction::hasNoSignedZeros() const {
171 bool Instruction::hasAllowReciprocal() const {
179 FastMathFlags Instruction::getFastMathFlags() const {
185 void Instruction::copyFastMathFlags(const Instruction *I) {
190 const char *Instruction::getOpcodeName(unsigned OpCode) {
267 static bool haveSameSpecialState(const Instruction *I1, const Instruction *I2,
321 bool Instruction::isIdenticalTo(const Instruction *I) const {
329 bool Instruction::isIdenticalToWhenDefined(const Instruction *I) const {
356 bool Instruction::isSameOperationAs(const Instruction *I,
383 bool Instruction::isUsedOutsideOfBlock(const BasicBlock *BB) const {
387 const Instruction *I = cast<Instruction>(U.getUser());
403 bool Instruction::mayReadFromMemory() const {
406 case Instruction::VAArg:
407 case Instruction::Load:
408 case Instruction::Fence: // FIXME: refine definition of mayReadFromMemory
409 case Instruction::AtomicCmpXchg:
410 case Instruction::AtomicRMW:
412 case Instruction::Call:
414 case Instruction::Invoke:
416 case Instruction::Store:
423 bool Instruction::mayWriteToMemory() const {
426 case Instruction::Fence: // FIXME: refine definition of mayWriteToMemory
427 case Instruction::Store:
428 case Instruction::VAArg:
429 case Instruction::AtomicCmpXchg:
430 case Instruction::AtomicRMW:
432 case Instruction::Call:
434 case Instruction::Invoke:
436 case Instruction::Load:
441 bool Instruction::mayThrow() const {
447 bool Instruction::mayReturn() const {
459 bool Instruction::isAssociative(unsigned Opcode) {
464 bool Instruction::isAssociative() const {
485 bool Instruction::isCommutative(unsigned op) {
506 bool Instruction::isIdempotent(unsigned Opcode) {
519 bool Instruction::isNilpotent(unsigned Opcode) {
523 Instruction *Instruction::clone() const {
524 Instruction *New = clone_impl();