[PATCH] [NVPTXFavorNonGenericAddrSpaces] recursively trace into GEP and BitCast
Jingyue Wu
jingyue at google.com
Fri May 29 10:30:13 PDT 2015
REPOSITORY
rL LLVM
================
Comment at: lib/Target/NVPTX/NVPTXFavorNonGenericAddrSpaces.cpp:32
@@ -30,1 +31,3 @@
+// %2 = addrspacecast i32 addrspace(3)* %1 to i32*
+// %3 = load i32* %2 ; still emits ld.f32, but will be optimized shortly
//
----------------
meheff wrote:
> still emits ld.u32?
Done. Carelessly copied the old comments :)
================
Comment at: lib/Target/NVPTX/NVPTXFavorNonGenericAddrSpaces.cpp:187
@@ +186,3 @@
+ // That hoistAddrSpaceCastFrom succeeds implies BC's source operand has been
+ // replaced with an eliminable addrspacecast.
+ assert(isEliminableAddrSpaceCast(BC->getOperand(0)));
----------------
meheff wrote:
> BC's source operand could have started out as an addrspace cast, right? That is, it wasn't necessarily replaced.
Right. Updated this comment and another one below.
================
Comment at: lib/Target/NVPTX/NVPTXFavorNonGenericAddrSpaces.cpp:222
@@ +221,3 @@
+ // Limit the depth to prevent this recursive function from running too long.
+ static const int MaxDepth = 20;
+ if (Depth >= MaxDepth)
----------------
meheff wrote:
> This doesn't need to be static.
Done.
http://reviews.llvm.org/D10074
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list