Refactor X86 symbol access classification

Mehdi Amini via llvm-commits llvm-commits at lists.llvm.org
Fri May 20 08:18:56 PDT 2016


+                                 const Module &M, const GlobalValue *GV) {
+  // DLLImport explicitly marks the GV as external.
+  if (GV && GV->hasDLLImportStorageClass())
+    return false;


Do we need to accept nullptr GV? Can it be a reference?

Otherwise looks good.

-- 
Mehdi

> On May 19, 2016, at 12:50 PM, Rafael EspĂ­ndola <rafael.espindola at gmail.com> wrote:
> 
> Refactor X86 symbol access classification.
> 
> This refactors the logic in X86 to avoid code duplication. It also
> splits it in two steps: it first decides if a symbol is local to the
> DSO and then uses that information to decide how to access it.
> 
> The first part is implemented by shouldAssumeDSOLocal. It is not in
> any way specific to X86. In a followup patch I intend to move it to
> somewhere common and reused it in other backends.
> 
> Cheers,
> Rafael
> <0001-Refactor-X86-symbol-access-classification.patch>



More information about the llvm-commits mailing list