[PATCH] D22413: [ValueTracking] Teach isSafeToSpeculativelyExecute() about the speculatable attribute
David Majnemer via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 15 13:44:26 PDT 2016
majnemer added inline comments.
================
Comment at: lib/Analysis/ValueTracking.cpp:3120-3125
@@ -3119,4 +3119,8 @@
}
case Instruction::Call: {
+ auto *CI = cast<const CallInst>(Inst);
+ const Function *Callee = CI->getCalledFunction();
+ if (Callee && Callee->isSpeculatable())
+ return true;
if (const IntrinsicInst *II = dyn_cast<IntrinsicInst>(Inst)) {
switch (II->getIntrinsicID()) {
----------------
arsenm wrote:
> I mean the opposite, that an invoke never has a speculatable
IMO, it seems like it would belong more in llvm's Lint analysis than a verifier check.
https://reviews.llvm.org/D22413
More information about the llvm-commits
mailing list