This is an archive of the discontinued LLVM Phabricator instance.

ModuleSummaryAnalysis: Correctly handle refs from function inline asm to module inline asm.
ClosedPublic

Authored by pcc on Aug 31 2017, 9:33 PM.

Details

Summary

If a function contains inline asm and the module-level inline asm
contains the definition of a local symbol, prevent the function from
being imported in case the function-level inline asm refers to a
symbol in the module-level inline asm.

Event Timeline

pcc created this revision.Aug 31 2017, 9:33 PM
mehdi_amini added inline comments.Aug 31 2017, 10:34 PM
llvm/test/Bitcode/thinlto-asm-noimport.ll
2

Is llvm-bcanalyzer *still* our only / preferred way of testing? :(

5

I suspect this test is target dependent (requires the backend compiled in to parse the inline asm) and so couldn't be in the generic bitcode test.

LGTM otherwise.

tejohnson accepted this revision.Sep 1 2017, 7:07 AM

LGTM too other than test target dependent issue Mehdi pointed out.

llvm/test/Bitcode/thinlto-asm-noimport.ll
2

Sadly, yes. =(

This revision is now accepted and ready to land.Sep 1 2017, 7:07 AM
pcc marked an inline comment as done.Sep 1 2017, 9:25 AM
pcc added inline comments.
llvm/test/Bitcode/thinlto-asm-noimport.ll
5

Added a REQUIRES line.

This revision was automatically updated to reflect the committed changes.
pcc marked an inline comment as done.