[PATCH] D20217: Add direct control of whether or not a symbol is preemtable at runtime

Sean Fertile via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 9 08:18:50 PDT 2017


sfertile updated this revision to Diff 102025.
sfertile added a reviewer: hfinkel.
sfertile set the repository for this revision to rL LLVM.
sfertile added subscribers: kbarton, nemanjai, echristo, vchin, inouehrs, stefanp, jtony, lei, syzaara.
sfertile added a comment.

Updated the previous patch with a couple of the suggestions (make the dso_location flag absolute, add 'dso_' to the new keywords). 
Refined the PowerPC FunctionCall lowering to be less conservative when deciding if a call may need a TOC restore, and updated relevant tests.
Added a PowerPC preemption test similar to the X86 test in the previous patch.

Since we now have TargetMachine::shouldAssumeDSOLocal which takes the compile options and object file format into account I didn't think we needed shouldAssumeDSOLocal in GlobalValue anymore, instead I simply respect the dso_location if it has been set explicitly.

The X86 test posted in the previous diff had a number of failures even when I stripped out everything except the 'default' cases (ie no dso_local/dso_preemptible keyword) . I left in the X86-Darwin tests since the default tests pass if I run on trunk and all the tests pass with the new changes.

Once we decide on the direction we want to take this patch then I will follow up with:

1. Refine the PowerPC Taill call eligibility checks to use 'shouldAssumeDifferentTOC' instead of 'resideInSameSection'
2. Add back the rest of the changes from the X86 target.
3. fix the removed X86 tests for linux/windows.
4. add bitcode serialization for dso_location.


Repository:
  rL LLVM

https://reviews.llvm.org/D20217

Files:
  include/llvm/IR/GlobalValue.h
  lib/AsmParser/LLLexer.cpp
  lib/AsmParser/LLParser.cpp
  lib/AsmParser/LLParser.h
  lib/AsmParser/LLToken.h
  lib/Target/PowerPC/PPCISelLowering.cpp
  lib/Target/TargetMachine.cpp
  test/CodeGen/PowerPC/ppc64-blnop.ll
  test/CodeGen/PowerPC/ppc64-calls.ll
  test/CodeGen/PowerPC/preemption.ll
  test/CodeGen/X86/darwin-preemptible.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20217.102025.patch
Type: text/x-patch
Size: 30472 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170609/08599062/attachment.bin>


More information about the llvm-commits mailing list