[PATCH] D14350: [FunctionAttrs] Fix an iterator wraparound bug
Sanjoy Das via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 6 00:42:37 PST 2015
sanjoy added inline comments.
================
Comment at: lib/Transforms/IPO/FunctionAttrs.cpp:444
@@ +443,3 @@
+
+ unsigned UseIndex = std::distance(CS.arg_begin(), U);
+
----------------
reames wrote:
> What prevents the U from being the callee?
Since we're exploring transitive uses of an argument, if such a value was a callee the call would be an indirect call; and we'd take the early return on line 431.
I can change the assertion failure message to be more specific if you think that will make things clearer.
http://reviews.llvm.org/D14350
More information about the llvm-commits
mailing list