[llvm-commits] [PATCH] Memory Dependence Analysis: differenciate "unknown" from "no dependency in current function"
Eli Friedman
eli.friedman at gmail.com
Thu Oct 13 15:17:20 PDT 2011
On Wed, Oct 12, 2011 at 3:25 PM, Guo, Xiaoyi <Xiaoyi.Guo at amd.com> wrote:
> Your careful review is much appreciated! See my answers below.
>
>
> @@ -1364,7 +1366,7 @@
> continue;
> }
>
> - assert(DepInfo.isDef() && "Expecting def here");
> + // DepInfo.isDef() here
>
> Instruction *DepInst = DepInfo.getInst();
>
>> What is the point of this change?
>
> There is a isClobber() case in the original code that's missing from the diff. If I add that into the context, the diff would look like this:
>
> @@ -1299,7 +1301,7 @@
> BasicBlock *DepBB = Deps[i].getBB();
> MemDepResult DepInfo = Deps[i].getResult();
>
> - if (DepInfo.isUnknown()) {
> + if (!DepInfo.isDef() && !DepInfo.isClobber()) {
> ...
> Continue;
> }
>
> If (DepInfo.isClobber()) {
> ...
> Continue;
> }
>
> - assert(DepInfo.isDef() && "Expecting def here");
> + // DepInfo.isDef() here
>
> Instruction *DepInst = DepInfo.getInst();
>
> So when it got to the assert(DepInfo.isDef()) point, the assert is not necessary anymore.
>
>
>> I would say "no known dependency" instead of "no dependency".
>
> Changed.
>
>
> Attached is the updated patch, with "no dependency" changed to "no known dependency". If it looks okay, I would appreciate it if you could help commit it.
r141896.
-Eli
More information about the llvm-commits
mailing list