Page MenuHomePhabricator

[DEBUGINFO, NVPTX] Render `-no-cuda-debug` LLVM option when required.
AbandonedPublic

Authored by ABataev on Apr 18 2018, 11:43 AM.

Details

Summary

When emission of the lineinfo is requested for the NVPTX, render the
LLVM -no-cuda-debug option to disable emission of the debug option
in the .target directive. Required for the correct work of the ptxas
tool, which does not allow emission of the optimized code in presence of
the debug option.

Diff Detail

Event Timeline

ABataev created this revision.Apr 18 2018, 11:43 AM
tra accepted this revision.May 18 2018, 4:41 PM
This revision is now accepted and ready to land.May 18 2018, 4:41 PM

So, I'd really prefer not to set options via the backend option path. From here I think we should aim to take all of the options we added and having the asm printer in the backend know how to set them depending on the target. We could also add things to the IR metadata if necessary, but I'd like to avoid that if possible.

Thoughts?

ABataev added a comment.EditedMay 21 2018, 7:46 AM

So, I'd really prefer not to set options via the backend option path. From here I think we should aim to take all of the options we added and having the asm printer in the backend know how to set them depending on the target. We could also add things to the IR metadata if necessary, but I'd like to avoid that if possible.

Thoughts?

This patch is outdated a bit, I have a patch https://reviews.llvm.org/D46061 that does it in a different way, via MCOptionю This is only a backend patch. I planned to update this patch after D46061 is accepted.

ABataev abandoned this revision.Nov 2 2018, 6:54 AM

The patch is not required anymore as it is implemented in the different way