Lines Matching full:assume
30 "assume-preserve-all", cl::init(false), cl::Hidden,
40 #define DEBUG_TYPE "assume-builder"
42 STATISTIC(NumAssumeBuilt, "Number of assume built by the assume builder");
43 STATISTIC(NumBundlesInAssumes, "Total number of Bundles in the assume built");
45 "Number of assume merged by the assume simplify pass");
47 "Number of assume removed by the assume simplify pass");
49 DEBUG_COUNTER(BuildAssumeCounter, "assume-builder-counter",
102 /// llvm.assume and the function to manipulate it.
123 [&](RetainedKnowledge RKOther, Instruction *Assume, in tryToPreserveWithoutAddingAssume()
125 if (!isValidAssumeForContext(Assume, InstBeingModified, DT)) in tryToPreserveWithoutAddingAssume()
130 } else if (isValidAssumeForContext(InstBeingModified, Assume, DT)) { in tryToPreserveWithoutAddingAssume()
132 IntrinsicInst *Intr = cast<IntrinsicInst>(Assume); in tryToPreserveWithoutAddingAssume()
228 Function *FnAssume = Intrinsic::getDeclaration(M, Intrinsic::assume); in build()
278 // TODO: Maybe we should look around and merge with other llvm.assume. in addInstruction()
318 RetainedKnowledge llvm::simplifyRetainedKnowledge(AssumeInst *Assume, in simplifyRetainedKnowledge() argument
322 AssumeBuilderState Builder(Assume->getModule(), Assume, AC, DT); in simplifyRetainedKnowledge()
323 RK = canonicalizedKnowledge(RK, Assume->getDataLayout()); in simplifyRetainedKnowledge()
355 IntrinsicInst *Assume = cast<IntrinsicInst>(V); in buildMapping() local
357 auto *Arg = dyn_cast<ConstantInt>(Assume->getOperand(0)); in buildMapping()
361 BBToAssume[Assume->getParent()].push_back(Assume); in buildMapping()
373 /// ForceCleanup is set or the assume doesn't hold valuable knowledge.
375 for (IntrinsicInst *Assume : CleanupToDo) { in RunCleanup()
376 auto *Arg = dyn_cast<ConstantInt>(Assume->getOperand(0)); in RunCleanup()
379 !isAssumeWithEmptyBundle(cast<AssumeInst>(*Assume)))) in RunCleanup()
386 Assume->eraseFromParent(); in RunCleanup()
391 /// Remove knowledge stored in assume when it is already know by an attribute
392 /// or an other assume. This can when valid update an existing knowledge in an
393 /// attribute or an other assume.
396 IntrinsicInst *Assume; in dropRedundantKnowledge() member
408 IntrinsicInst *Assume = cast<IntrinsicInst>(V); in dropRedundantKnowledge() local
409 for (CallInst::BundleOpInfo &BOI : Assume->bundle_op_infos()) { in dropRedundantKnowledge()
411 CleanupToDo.insert(Assume); in dropRedundantKnowledge()
413 Use *U = &Assume->op_begin()[BOI.Begin + ABA_WasOn]; in dropRedundantKnowledge()
419 CleanupToDo.insert(Assume); in dropRedundantKnowledge()
423 getKnowledgeFromBundle(cast<AssumeInst>(*Assume), BOI); in dropRedundantKnowledge()
434 Assume, &*F.getEntryBlock().getFirstInsertionPt()) || in dropRedundantKnowledge()
435 Assume == &*F.getEntryBlock().getFirstInsertionPt()) { in dropRedundantKnowledge()
446 if (!isValidAssumeForContext(Elem.Assume, Assume, DT)) in dropRedundantKnowledge()
451 } else if (isValidAssumeForContext(Assume, Elem.Assume, DT)) { in dropRedundantKnowledge()
452 Elem.Assume->op_begin()[Elem.BOI->Begin + ABA_Argument].set( in dropRedundantKnowledge()
459 Lookup.push_back({Assume, RK.ArgValue, &BOI}); in dropRedundantKnowledge()
466 /// Merge all Assumes from Begin to End in and insert the resulting assume as
495 /// guarantees we can place the resulting assume between Begin and End. in mergeRange()
511 /// Merge assume when they are in the same BasicBlock and for all instruction
547 /// Remove knowledge that is already known by a dominating other assume or an in simplifyAssumes()
551 /// Remove assume that are empty. in simplifyAssumes()
554 /// Merge assume in the same basicblock when possible. in simplifyAssumes()
557 /// Remove assume that were merged. in simplifyAssumes()