[PATCH] D15687: [Polly] Add conditions for unnecessary value reads

Michael Kruse via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 22 14:42:59 PST 2015


Meinersbur added inline comments.

================
Comment at: lib/Analysis/ScopInfo.cpp:3980
@@ +3979,3 @@
+  if (isa<Constant>(Value) || isa<BasicBlock>(Value))
+    return;
+
----------------
grosser wrote:
> There can be accesses to constants, in case the constant is an externally defined _constant_ global. Such constants are really just globals from which we load values.
> To handle these you want to use ConstantInt, ConstantFP.
> 
> Also, I wonder which test case requires the isa<BasicBlock>(Value).
> 
> Also, I still need to understand if all pieces of the code are actually needed (and tested) at the moment. My feeling is that some of these simplifications may currently be never triggered as they are already covered by the code that inserts the memory accesses. (For this I wait until I can actually run the code).
> Also, I wonder which test case requires the isa<BasicBlock>(Value).

Any branching instruction "uses" a BasicBlock. It iterates over the terminators because conditional branches uses predicates (of type i1) that might be defined in a different ScopStmt.


http://reviews.llvm.org/D15687





More information about the llvm-commits mailing list