[PATCH] Refactor commoning of target specific load/store intrinsics in EarlyCSE
Sanjin Sijaric
ssijaric at codeaurora.org
Thu Apr 16 17:23:28 PDT 2015
================
Comment at: include/llvm/Analysis/TargetTransformInfo.h:467
@@ +466,3 @@
+ /// Must have one memory operand.
+ bool isTargetIntrinsicLikeLoad(const IntrinsicInst *II) const;
+
----------------
hfinkel wrote:
> We have the IntrReadArgMem intrinsic property, how does this differ?
>
>From what I understand, IntrReadArgMem results in an intrinsic being annotated with the readonly attribute. However, the readonly attribute doesn't imply that the intrinsic has only one pointer argument.
================
Comment at: include/llvm/Analysis/TargetTransformInfo.h:498
@@ -492,1 +497,3 @@
+ /// \returns True if the target memory intrinsic may read memory.
+ bool mayTargetIntrinsicReadFromMemory(const IntrinsicInst *II) const;
/// @}
----------------
hfinkel wrote:
> II->mayReadFromMemory()?
I think I need to provide a better comment here. For regular, non-atomic stores, Instruction::mayReadFromMemory() returns false. This is not the case for calls unless they are marked with readnone, and store intrinsics are not marked with readnone.
http://reviews.llvm.org/D8313
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list