[PATCH] D10941: IR: Do not consider available_externally linkage to be linker-weak.

Peter Collingbourne peter at pcc.me.uk
Fri Jul 3 20:45:49 PDT 2015


pcc created this revision.
pcc added a reviewer: majnemer.
pcc added a subscriber: llvm-commits.

>From the linker's perspective, an available_externally global is equivalent
to an external declaration (per isDeclarationForLinker()), so it is incorrect
to consider it to be a weak definition.

Also clean up some logic in the dead argument elimination pass and clarify
its comments to better explain how its behavior depends on linkage,
introduce GlobalValue::isStrongDefinitionForLinker() and start using
it throughout the optimizers and backend.

http://reviews.llvm.org/D10941

Files:
  include/llvm/IR/GlobalValue.h
  lib/Analysis/ValueTracking.cpp
  lib/CodeGen/SelectionDAG/TargetLowering.cpp
  lib/Target/AArch64/AArch64Subtarget.cpp
  lib/Target/ARM/ARMISelLowering.cpp
  lib/Target/ARM/ARMSubtarget.cpp
  lib/Target/PowerPC/PPCAsmPrinter.cpp
  lib/Target/PowerPC/PPCFastISel.cpp
  lib/Target/PowerPC/PPCISelDAGToDAG.cpp
  lib/Target/PowerPC/PPCISelLowering.cpp
  lib/Target/X86/X86FastISel.cpp
  lib/Target/X86/X86ISelLowering.cpp
  lib/Target/X86/X86Subtarget.cpp
  lib/Transforms/IPO/DeadArgumentElimination.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10941.29043.patch
Type: text/x-patch
Size: 16734 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150704/27f3977d/attachment.bin>


More information about the llvm-commits mailing list