[PATCH] D11028: Make TargetLowering::getPointerTy() taking DataLayout as an argument

Eric Christopher echristo at gmail.com
Wed Jul 8 15:55:59 PDT 2015


echristo accepted this revision.
echristo added a comment.
This revision is now accepted and ready to land.

LGTM.

I have no preference on reorganizing getPointerTy.

-eric


================
Comment at: include/llvm/CodeGen/BasicTTIImpl.h:149
@@ -148,3 +148,3 @@
   bool isTypeLegal(Type *Ty) {
-    EVT VT = getTLI()->getValueType(Ty);
+    EVT VT = getTLI()->getValueType(TargetTransformInfoImplBase::DL, Ty);
     return getTLI()->isTypeLegal(VT);
----------------
joker.eph wrote:
> echristo wrote:
> > My C++ knowledge may be lacking here, but why can't we use getDataLayout here?
> C++ weirdness explained here: https://isocpp.org/wiki/faq/templates#nondependent-name-lookup-members
> 
> Now, we could also write  `this->DL`. But I may be better adding a using `TargetTransformInfoImplBase::DL` in the class itself instead of clobbering every single use.
*sigh* Right. OK. Thanks!


http://reviews.llvm.org/D11028







More information about the llvm-commits mailing list