This is an archive of the discontinued LLVM Phabricator instance.

[NVPTXFavorNonGeneric] canonicalize global variable initializers
AbandonedPublic

Authored by jingyue on Apr 22 2015, 11:24 AM.

Details

Summary

This patch hoists addrspacecast in a global variable initializer to the
outermost possible level, so that NVPTXAsmPrinter can print it more likely
correctly.

Diff Detail

Event Timeline

jingyue updated this revision to Diff 24248.Apr 22 2015, 11:24 AM
jingyue retitled this revision from to [NVPTXFavorNonGeneric] canonicalize global variable initializers.
jingyue updated this object.
jingyue edited the test plan for this revision. (Show Details)
jingyue added reviewers: jholewinski, eliben.
jingyue added a subscriber: Unknown Object (MLST).
jingyue abandoned this revision.Apr 22 2015, 11:27 AM

ptxas does not accept generic(g+8)

outermost possible level, so that NVPTXAsmPrinter can print it more likely correctly.

You're just hiding a bug?

Justin and I discussed this issue in http://reviews.llvm.org/D9063. The
conclusion is that, while Justin is working on a comprehensive fix which
can take a few days, I can workaround it by canonicalization as implemented
in this patch.

Anyway, this patch is incorrect because generic(<global var>+<const
offset>) is unacceptable by the NVIDIA driver. I already abandoned it.

Jingyue