[PATCH] D16986: [LICM] Don't assert on volatile accesses

Nuno Lopes via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 21 11:53:50 PST 2016


nlopes added a comment.

Just a quick comment on this bug. We can see it from two angles:

1. TBAA is just doing its job since it is exploiting the fact that 2 pointers with different types don't alias (the metadata has 2 different type branches).  So TBAA claims the pointers don't alias, while they do in practice (it's undefined behavior, though).  -- in this case LICM needs patching to account for this aggressiveness.
2. Or we can say that TBAA shouldn't mess with volatile stuff since that's dangerous. In that case LICM is fine and TBAA needs patching.

I'm personally more favorable of 2), since I don't think it's worth to mess with volatile stuff, since it can be dangerous for applications and probably there isn't much performance to gain there.


http://reviews.llvm.org/D16986





More information about the llvm-commits mailing list