The idea is very close to what we do for assume intrinsics: we mark the
guard intrinsics as writing to arbitrary memory to maintain control
dependence, but under the covers we teach AA that they do not alias any
particular memory location.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Analysis/BasicAliasAnalysis.cpp | ||
---|---|---|
783–787 ↗ | (On Diff #55150) | Guards have deoptimization state (via "deopt" operand bundles) and are thus allowed to read all memory. If a guard fails then, at the time of failure, the heap better look like it was supposed to look like in the original program. E.g. see @test6 in D19578. |
lib/Analysis/BasicAliasAnalysis.cpp | ||
---|---|---|
783–787 ↗ | (On Diff #55150) | Can you add a comment in the code noting this, please? :) |
lib/Analysis/BasicAliasAnalysis.cpp | ||
---|---|---|
785 ↗ | (On Diff #55150) | As others pointed out, this comment is really confusing. |
Comment Actions
LGTM w/minor comment.
test/Analysis/BasicAA/guards.ll | ||
---|---|---|
25 ↗ | (On Diff #56617) | please rename to reflect this is an readonly call. |