Diff Detail
Event Timeline
LGTM
test/Transforms/CodeGenPrepare/invariant.group.ll | ||
---|---|---|
5–10 | Please interleave these in the def'n of @foo. |
Can you give some context for *why* this is needed? It doesn't seem
entirely obvious, isn't in the change description, and doesn't appear to
be in comments...
Philip
Because I remove all invariant.group.barrier's in CodeGenPrepare, I also want to remove invariant.group metadata. After removing all invariant.barriers it would be invalid to optimize based on invariant.group metadata, so I don't want to leave trap for future programmer.
Ok, that helps, but *why* are you removing all the
invariant.group.barriers? Is that just an implementation detail? Or is
it something fundamental? In either case, the code in CGP should
include comments which clarify this.
Philip
Because that what CodeGenPrepare is for right?
Because invariant.group.barrier is just intrinsic for optimizations purposes (like most of them if not all) we don't want to have calls to intrinsics functions in binaries,
so we remove all intrinsics in CodeGenPrepare.
Please interleave these in the def'n of @foo.