[PATCH] D9378: llvm.noalias - Add IRBuilder support

Hal Finkel via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 7 20:08:44 PDT 2016

hfinkel added inline comments.

Comment at: include/llvm/IR/IRBuilder.h:449
@@ +448,3 @@
+  /// \brief Create an noalias intrinsic.
+  Instruction *CreateNoAlias(Value *Ptr, MDNode *ScopeTag);
reames wrote:
> CreateNoAlias sounds confusing.  Maybe, CreateNoAliasMarker?  CreateNoAliasIntrinsic?
None of the other functions that create intrinsics have 'Intrinsic' in name, and so it seems weird to do it for this one. The best I can think of is 'CreateNoAliasPointer'.

Comment at: lib/IR/IRBuilder.cpp:208
@@ +207,3 @@
+    BitCastInst *BCI = new BitCastInst(Ret, Ptr->getType(), "");
+    BB->getInstList().insert(InsertPt, BCI);
+    SetInstDebugLocation(BCI);
reames wrote:
> Using BitCastInst::Create might simplify these two lines.
There is no such function (and the InsertPt variable is not an Instruction*, but a BB iterator ).


More information about the llvm-commits mailing list