[PATCH] D85544: [OpenMPOpt] ICV tracking for calls
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 15 15:21:56 PDT 2020
jdoerfert added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/OpenMPOpt.cpp:1378
+ if (ReplVal != NewReplVal)
return nullptr;
----------------
Here and below, we should cache this, right?
================
Comment at: llvm/lib/Transforms/IPO/OpenMPOpt.cpp:1393
- // No call in between, return the value.
- return ICVVal.TrackedValue;
+ // if (NewReplVal.hasValue())
+ // We found a new value, we can't know the icv value anymore.
----------------
leftover.
================
Comment at: llvm/lib/Transforms/IPO/OpenMPOpt.cpp:1406
+ if (!ReplVal.hasValue() && hasTrackedValue(ICV))
+ ReplVal = nullptr;
+
----------------
why do we need the `hasTrackedValue` call (and function)?
Caching again. And a TODO that we should look at call sites if possible.
================
Comment at: llvm/lib/Transforms/IPO/OpenMPOpt.cpp:1414-1418
+ // Couldn't find a replacement value, ICV value unknown.
+ if (!ReplVal.hasValue())
+ return None;
+
+ return ReplVal.getValue();
----------------
Caching.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85544/new/
https://reviews.llvm.org/D85544
More information about the llvm-commits
mailing list