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

Tobias Grosser via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 21 09:11:57 PST 2015


grosser added a comment.

Hi Michael,

some of the patches on the way do not apply cleanly. To get a better feeling of the test, I would like to apply it and play with it. For this I wait until the earlier patches are committed.

Here already some comments:


================
Comment at: lib/Analysis/ScopInfo.cpp:3980
@@ +3979,3 @@
+  if (isa<Constant>(Value) || isa<BasicBlock>(Value))
+    return;
+
----------------
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).


http://reviews.llvm.org/D15687





More information about the llvm-commits mailing list