[PATCH] D29846: WholeProgramDevirt: Implement exporting for uniform ret val opt.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 3 16:47:01 PST 2017


pcc added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp:707
 
+  if (CSInfo.isExported()) {
+    Res->TheKind = WholeProgramDevirtResolution::ByArg::UniformRetVal;
----------------
tejohnson wrote:
> The assumption I guess is that we will always have a non-null Res coming into the caller if isExported could possibly be true?
Yes, it can only be true during the export phase.


================
Comment at: llvm/test/Transforms/WholeProgramDevirt/export-uniform-ret-val.ll:21
+
+; CHECK: @vt4a = constant i32 (i8*, i32, i32)* @vf4a
+ at vt4a = constant i32 (i8*, i32, i32)* @vf4a, !type !0
----------------
tejohnson wrote:
> What is this and the below CHECK looking for? They appear to be checking for the same lines being output as were input. 
The pass may change the definitions of the vtables in other cases (i.e. VCP); this is just checking that we are not doing that in this case.


https://reviews.llvm.org/D29846





More information about the llvm-commits mailing list