[PATCH] D102344: [SCEV]: Teach SCEV about llvm.annotation intrinsic
Ettore Tiotto via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 12 11:23:00 PDT 2021
etiotto created this revision.
etiotto added reviewers: Whitney, bmahjour, reames, Meinersbur.
Herald added subscribers: javed.absar, hiraditya.
etiotto requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
The `llvm.annotation` intrinsic returns the first argument passed to it (https://llvm.org/docs/LangRef.html). This patch 'teaches' SCEV to the semantics of that builtin function.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D102344
Files:
llvm/lib/Analysis/ScalarEvolution.cpp
Index: llvm/lib/Analysis/ScalarEvolution.cpp
===================================================================
--- llvm/lib/Analysis/ScalarEvolution.cpp
+++ llvm/lib/Analysis/ScalarEvolution.cpp
@@ -6910,8 +6910,8 @@
return getAddExpr(ClampedX, Y, SCEV::FlagNUW);
}
case Intrinsic::start_loop_iterations:
- // A start_loop_iterations is just equivalent to the first operand for
- // SCEV purposes.
+ case Intrinsic::annotation:
+ // Equivalent to the first operand for SCEV purposes.
return getSCEV(II->getArgOperand(0));
default:
break;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102344.344882.patch
Type: text/x-patch
Size: 614 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210512/2be4657f/attachment.bin>
More information about the llvm-commits
mailing list