Skip to content

Commit

Permalink
Revert "[VP] vp intrinsics are not speculatable"
Browse files Browse the repository at this point in the history
  • Loading branch information
joker-eph committed May 30, 2022
1 parent eacfd04 commit 2e2a8a2
Show file tree
Hide file tree
Showing 4 changed files with 205 additions and 242 deletions.
22 changes: 0 additions & 22 deletions llvm/include/llvm/Analysis/ValueTracking.h
Expand Up @@ -463,28 +463,6 @@ constexpr unsigned MaxAnalysisRecursionDepth = 6;
const DominatorTree *DT = nullptr,
const TargetLibraryInfo *TLI = nullptr);

/// This returns the same result as isSafeToSpeculativelyExecute if Opcode is
/// the actual opcode of Inst. If the provided and actual opcode differ, the
/// function (virtually) overrides the opcode of Inst with the provided
/// Opcode. There are come constraints in this case:
/// * If Opcode has a fixed number of operands (eg, as binary operators do),
/// then Inst has to have at least as many leading operands. The function
/// will ignore all trailing operands beyond that number.
/// * If Opcode allows for an arbitrary number of operands (eg, as CallInsts
/// do), then all operands are considered.
/// * The virtual instruction has to satisfy all typing rules of the provided
/// Opcode.
/// * This function is pessimistic in the following sense: If one actually
/// materialized the virtual instruction, then isSafeToSpeculativelyExecute
/// may say that the materialized instruction is speculatable whereas this
/// function may have said that the instruction wouldn't be speculatable.
/// This behavior is a shortcoming in the current implementation and not
/// intentional.
bool isSafeToSpeculativelyExecuteWithOpcode(
unsigned Opcode, const Operator *Inst, const Instruction *CtxI = nullptr,
const DominatorTree *DT = nullptr,
const TargetLibraryInfo *TLI = nullptr);

/// Returns true if the result or effects of the given instructions \p I
/// depend values not reachable through the def use graph.
/// * Memory dependence arises for example if the instruction reads from
Expand Down

0 comments on commit 2e2a8a2

Please sign in to comment.