[PATCH] D109792: Resolve {GlobalValue,GloalIndirectSymol}::getBaseObject confusion

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 14 16:01:58 PDT 2021


MaskRay created this revision.
MaskRay added reviewers: dexonsmith, ibookstein, pcc, tejohnson.
Herald added a subscriber: hiraditya.
MaskRay requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

While both GlobalAlias and GlobalIFunc are GlobalIndirectSymbol, their
`getIndirectSymbol()` usage is quite different (GlobalIFunc's resolver
is an entity different from GlobalIFunc itself).

As discussed on https://lists.llvm.org/pipermail/llvm-dev/2020-September/144904.html
("[IR] Modelling of GlobalIFunc"), the name `getBaseObject` is confusing when
used with GlobalIFunc.

To resolve the confusion:

- Move GloalIndirectSymol::getBaseObject to GlobalAlias::
- Change GlobalValue::getBaseObject not to inspect GlobalIFunc


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D109792

Files:
  llvm/include/llvm/IR/GlobalAlias.h
  llvm/include/llvm/IR/GlobalIndirectSymbol.h
  llvm/lib/IR/Globals.cpp
  llvm/lib/Object/IRSymtab.cpp
  llvm/lib/Object/ModuleSymbolTable.cpp
  llvm/lib/Transforms/Utils/SplitModule.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109792.372582.patch
Type: text/x-patch
Size: 5307 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210914/503c9ace/attachment.bin>


More information about the llvm-commits mailing list