[PATCH] D95960: [llvm][IR] Do not place constants with static relocations in a mergeable section

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 16 13:23:55 PST 2021


phosek accepted this revision.
phosek added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: llvm/lib/IR/Constants.cpp:659
+
 bool Constant::needsRelocation() const {
+  return getRelocationInfo() != NoRelocation;
----------------
There are only a handful of `needsRelocation` uses throughout LLVM so you could even avoid introducing `needsDynamicRelocation` and instead change `needsRelocation`s return value and update all uses to compare the return value to be more explicit, but I'm fine with either solution.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95960



More information about the llvm-commits mailing list