[PATCH] D48026: [ScopHelper] Provide support for recognising collective invariant loads

Siddharth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 22 09:04:52 PDT 2018


bollu added a subscriber: grosser.
bollu added a comment.

Also, please run the file through `instnamer`. That way, we will have "named" instructions and not "numbered" instructions. This is useful to modify the testcase in the future (it is less brittle): "numbered" instructions __must be sequential__, while named instructions need to be.

Hence, we try to keep all of our testcases with named instructions.



================
Comment at: test/ScopDetect/collective_invariant_loads.ll:1
+; RUN: opt %s -polly-invariant-load-hoisting -polly-scops -pass-remarks=polly-detect -pass-remarks-missed=polly-detect -pass-remarks-analysis=polly-detect -debug-only=polly-detect 2>&1| FileCheck %s
+
----------------
Please remove unnecessary options. Simply `opt %s -polly-scops -polly-invariant-load-hositing -analyze | FileCheck %s` should be enough?

That way, we can actually pattern match for the invariant loads.

Please make the `CHECK` line check for the invariant loads, [like this](https://github.com/llvm-mirror/polly/blob/master/test/GPGPU/invariant-load-array-access.ll#L14)

Pinging @grosser,  @Meinersbur and @philip.pfaffe if there is a nicer way to test for this?


================
Comment at: test/ScopDetect/collective_invariant_loads.ll:37
+  %10 = getelementptr inbounds %array_ptr, %array_ptr* %5, i64 0, i32 6
+  %11 = load double*, double** %10, align 8, !tbaa !15
+  %12 = getelementptr inbounds double, double* %11, i64 %9
----------------
I think `tbaa` metadata can also be removed.


================
Comment at: test/ScopDetect/collective_invariant_loads.ll:68
+!3 = !{!"array_ty", !4, i64 0, !7, i64 8, !13, i64 16}
+!4 = !{!"int64_t", !5, i64 0}
+!5 = !{!"all unions", !6, i64 0}
----------------
Do we actually need all of this metadata? I believe we can safely remove //all of this//


https://reviews.llvm.org/D48026





More information about the llvm-commits mailing list