[PATCH] D81929: [WIP][Attributor] Introduce CallBaseContext to the IRPosition

Kuter Dinel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 17 20:19:18 PDT 2020


kuter marked 2 inline comments as done.
kuter added inline comments.


================
Comment at: llvm/include/llvm/Transforms/IPO/Attributor.h:457
+    result.Enc = Enc;
+    return result;
+  }
----------------
jdoerfert wrote:
> I'd prefer to copy the entire thing and then `null` the context. Will be optimized to the same code but is future proof :)
Ugh sorry. I will.


================
Comment at: llvm/include/llvm/Transforms/IPO/Attributor.h:938
+    const IRPosition RealIRP =
+        shouldPropagateCallBaseContext(IRP) ? IRP : IRP.stripCallBaseContext();
+
----------------
jdoerfert wrote:
> `& RealIRP` or maybe:
> ```
> if (!should...)
>   IRP = IRP.strip...
> ```
I think that was the first way that I tried.
 Reassigning a const reference does not work.




CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D81929/new/

https://reviews.llvm.org/D81929





More information about the llvm-commits mailing list