[PATCH] Add CreatePointerBitCastOrAddrSpaceCast to IRBuilder and co.

Quentin Colombet qcolombet at apple.com
Thu Mar 6 13:38:15 PST 2014

  Hi Matt,

  Just to be sure, CreatePointerBitCastOrAddrSpaceCast and co are a subset of that is currently available through CreatePointerCast, right?
  Apart from compile time improvement (if any) when we will use it, is there anything else we could expect from adding this API?

  My point is do we really need a new API that may be confusing?
  I haven’t find the discussion on why it was a good idea to add getPointerBitCastOrAddrSpaceCast for the constants in the first place, so I may just missing some context.

  Sorry if I miss something obvious.


Comment at: include/llvm/IR/IRBuilder.h:1191
@@ +1190,3 @@
+    if (Constant *VC = dyn_cast<Constant>(V)) {
+      return Insert(Folder.CreatePointerBitCastOrAddrSpaceCast(VC, DestTy),
No brackets for 1 line blocks.


More information about the llvm-commits mailing list