[PATCH] D77248: [llvm][IR] Add dso_local_equivalent Constant

Leonard Chan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 29 13:03:38 PDT 2020


leonardchan updated this revision to Diff 295094.
leonardchan added a comment.
Herald added a subscriber: mgorny.

Add generic lowering for targets that do not support PLTs.

I wasn't sure what the best way to lower the constant was, so I ended up making a module pass that runs before ISel and replaces `dso_local_equivalent`s with `dso_local` stubs that tail call to the original function. I'm open to changing it if there's a cleaner way. I thought the easiest approach was to provide the generic implementation as IR that could be lowered naturally than through SDNodes in ISel.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77248/new/

https://reviews.llvm.org/D77248

Files:
  llvm/docs/LangRef.rst
  llvm/include/llvm-c/Core.h
  llvm/include/llvm/CodeGen/Passes.h
  llvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h
  llvm/include/llvm/IR/Constants.h
  llvm/include/llvm/IR/Value.def
  llvm/include/llvm/Target/TargetLoweringObjectFile.h
  llvm/lib/Analysis/ConstantFolding.cpp
  llvm/lib/AsmParser/LLLexer.cpp
  llvm/lib/AsmParser/LLParser.cpp
  llvm/lib/AsmParser/LLToken.h
  llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  llvm/lib/CodeGen/CMakeLists.txt
  llvm/lib/CodeGen/DSOLocalEquivalentLowering.cpp
  llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
  llvm/lib/CodeGen/TargetPassConfig.cpp
  llvm/lib/IR/AsmWriter.cpp
  llvm/lib/IR/Constants.cpp
  llvm/lib/IR/LLVMContextImpl.h
  llvm/test/CodeGen/X86/dso_local_equivalent.ll
  llvm/test/CodeGen/X86/relptr-rodata.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77248.295094.patch
Type: text/x-patch
Size: 26298 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200929/298fbe96/attachment.bin>


More information about the llvm-commits mailing list