[PATCH] [Polly] Put the parallel context into the function entry block

David Peixotto dpeixott at codeaurora.org
Thu Oct 2 10:51:46 PDT 2014


Needs test case. Otherwise LGTM.

================
Comment at: lib/CodeGen/LoopGenerators.cpp:177
@@ +176,3 @@
+  Type *Ty = Struct->getType();
+  ConstantInt *SizeOf = dyn_cast<ConstantInt>(ConstantExpr::getSizeOf(Ty));
+  Builder.CreateLifetimeEnd(Struct, SizeOf);
----------------
Use cast<> instead of dyn_cast<> when you don't check for null return result.

================
Comment at: lib/CodeGen/LoopGenerators.cpp:302
@@ +301,3 @@
+
+  ConstantInt *SizeOf = dyn_cast<ConstantInt>(ConstantExpr::getSizeOf(Ty));
+  Builder.CreateLifetimeStart(Struct, SizeOf);
----------------
Use cast<> instead of dyn_cast<>

http://reviews.llvm.org/D5582






More information about the llvm-commits mailing list