Page MenuHomePhabricator

[CUDA] Die if we ask the NVPTX backend to emit a global ctor/dtor.

Authored by jlebar on Jan 29 2016, 3:30 PM.

Diff Detail


Event Timeline

jlebar updated this revision to Diff 46442.Jan 29 2016, 3:30 PM
jlebar retitled this revision from to [CUDA] Die if we ask the NVPTX backend to emit a global ctor/dtor..
jlebar updated this object.
jlebar added a reviewer: tra.
jlebar added subscribers: echristo, jhen, llvm-commits.
tra edited edge metadata.Jan 29 2016, 3:50 PM

Looks OK to me, but I'd run it by someone familiar with back-end.

808 ↗(On Diff #46442)

I'd make it an assert so we know if/when llvm.global_ctors mutates into something we can't deal with.

jholewinski accepted this revision.Jan 29 2016, 3:54 PM
jholewinski added a reviewer: jholewinski.

LGTM. Thanks!

This revision is now accepted and ready to land.Jan 29 2016, 3:54 PM
jlebar added inline comments.Jan 29 2016, 3:56 PM
808 ↗(On Diff #46442)

That was my inclination as well, but in AsmPrinter, this is not an error, so I'm not sure it should be one here.

tra accepted this revision.Jan 29 2016, 4:32 PM
tra edited edge metadata.


808 ↗(On Diff #46442)

OK. We'll probably catch it when we generate something ptxas can't handle.

This revision was automatically updated to reflect the committed changes.