Currently, we get different code with and without -g. This patch marks debug inst and a few other LLVM intrinsics as ignorable for loop-reroll
Details
Diff Detail
Event Timeline
Is it possible to add a test for this? E.g something that would force the debug message to be printed without your patch.
Please upload this patch with full context (http://llvm.org/docs/Phabricator.html#requesting-a-review-via-the-web-interface).
lib/Transforms/Scalar/LoopRerollPass.cpp | ||
---|---|---|
1007 | Why these and not others? I suspect that we could get: case Intrinsic::annotation: case Intrinsic::ptr_annotation: case Intrinsic::var_annotation: and also: case Intrinsic::invariant_start: case Intrinsic::invariant_end: case Intrinsic::lifetime_start: case Intrinsic::lifetime_end: but for these, at least, we'll need test cases because getting them wrong will miscompile code, and also, they're normally associated with bitcasts to get the pointer type right and you'd need to deal with those too. |
adds ptr_annotation, val_annotation. Not sure if we should add lifetime_start/end, invariant_start/end, so I put them under TODO
lib/Transforms/Scalar/LoopRerollPass.cpp | ||
---|---|---|
1007 | I added those annotations into white list. I'm not very sure about the rest. I will try to see if I can get some test case |
Why these and not others? I suspect that we could get:
and also:
but for these, at least, we'll need test cases because getting them wrong will miscompile code, and also, they're normally associated with bitcasts to get the pointer type right and you'd need to deal with those too.