[PATCH] D28181: [MemDep] NFC walk invariant.group graph only down
Piotr Padlewski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 3 05:18:48 PST 2017
Prazek added inline comments.
================
Comment at: lib/Analysis/MemoryDependenceAnalysis.cpp:359
// Queue to process all pointers that are equivalent to load operand.
- SmallVector<const Value *, 8> LoadOperandsQueue;
- SmallSet<const Value *, 14> SeenValues;
- auto TryInsertToQueue = [&](Value *V) {
- if (SeenValues.insert(V).second)
- LoadOperandsQueue.push_back(V);
- };
-
- TryInsertToQueue(LoadOperand);
+ SmallVector<const Value *, 10> LoadOperandsQueue;
+ LoadOperandsQueue.push_back(LoadOperand);
----------------
davide wrote:
> Any reason why did you change the initial size of the `SmallVector`?
I deleted SmallSet of 14 elements, so I thought I can be more lavish here :)
================
Comment at: test/Transforms/GVN/invariant.group.ll:372-393
+define void @testNotGlobal() {
+ %a = alloca i8
+ call void @foo(i8* %a)
+; CHECK: %b = load i8, i8* %a, !invariant.group !0
+ %b = load i8, i8* %a, !invariant.group !0
+ call void @foo2(i8* %a, i8 %b)
+
----------------
davide wrote:
> ideally the checks should be auto-generated (many people, me included forget to do so)
Excuse me, but I don't understand your comment. Is there anything wrong with my patch, or is it just comment about the perfect world?
https://reviews.llvm.org/D28181
More information about the llvm-commits
mailing list