This patch treats a pointer comparison to constant null as no capture instruction when null pointer is not defined in AANoCapture.
Diff Detail
Diff Detail
Event Timeline
Comment Actions
I have missed to check the dereferenceability of the pointer. I'll fix it later.
So now the tests are broken.
llvm/lib/Transforms/IPO/Attributor.cpp | ||
---|---|---|
4361 | I think we have enough use cases of this hideous construct by now that we can make a helper function. |
Comment Actions
I have misunderstood how CaptureTracker works. AANoCapture already has this functionality :) So I'd close it.
But I have thought some of FIXME in the test seems wrong.
llvm/lib/Transforms/IPO/Attributor.cpp | ||
---|---|---|
4361 | I'll add some helper function for this. | |
llvm/test/Transforms/Attributor/nocapture-2.ll | ||
14–42 | Based on the discussion in D60047, %p can't have nocapture in both functions. |
I think we have enough use cases of this hideous construct by now that we can make a helper function.