Diff Detail
Event Timeline
AFAIK, this is pointless because that alloca will be trivially eliminated by mem2reg. Am I missing something? Is this important for some sort of consistency check?
Correct, they are eliminated. However, this change makes things a bit easier as we are pursuing undecorated instructions produced by clang. Once they have their TBAA tags, we don't need to guess if it's something trivial for the optimizer. It shouldn't be a problem to keep this as a local patch, though. So I'm fine with either way.
Okay, if this is just for your own checking, I'd rather not take it. It's not a significant compile-time cost, but there's no reason to pay it at all.
In that case, can we take it? I'd rather have everything decorated for use by the type sanitizer.
Hmm, according to our research such loads constitute about 18% of all loads under -O -Xclang -disable-llvm-passes on the LLVM code base. I wonder, do you think it would be nice to not generate them at all? I mean, provided that necessary changes do not add too much special-case code.
It would be straightforward to not generate them, but it would create longer live ranges at -O0 and allow 'this' to disappear in debug info, both of which are undesirable.