This is an archive of the discontinued LLVM Phabricator instance.

[ThinLTO] *WIP* Better handling for inline asm, module level asm
Needs ReviewPublic

Authored by tejohnson on Oct 25 2016, 10:59 AM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

This is a *WIP* fix to implement better handling for inline asm that
may reference local variables, and apply the same fix to module level
asm that defines or references local values. Instead of suppressing
the index generation, flag that the local values (potentially)
referenced by inline asm, or referenced by module level asm, can't
be renamed.

Currently this uses the existing HasSection flag in the summaries, which
also is used to suppress any importing that may cause illegal renaming.
I need to change the name of this flag to illustrate it's broader
meaning.

Also need to clean up the code a bit and test more extensively. The
changes here will need to be split into multiple patches.

Event Timeline

tejohnson updated this revision to Diff 75735.Oct 25 2016, 10:59 AM
tejohnson retitled this revision from to [ThinLTO] *WIP* Better handling for inline asm, module level asm.
tejohnson updated this object.
tejohnson updated this revision to Diff 75736.Oct 25 2016, 11:01 AM

Remove obsolete moduleCanBeRenamedForThinLTO

(FYI, this patch is not for review, which is why I didn't add llvm-commits)

tejohnson updated this revision to Diff 76048.Oct 27 2016, 8:53 AM
  • Mark all llvm{.compiler}.used locals as not to be renamed.
  • Update module asm test with llvm.compiler.used and llvm.used cases.
tejohnson updated this revision to Diff 76051.Oct 27 2016, 9:03 AM
  • [Hh]asSection -> [Nn]oRename