Compare commits
2 Commits
llvmorg-4.
...
llvmorg-4.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
449c3ef93a | ||
|
|
fcf5f77b3e |
@@ -559,6 +559,10 @@ bool GlobalMerge::doInitialization(Module &M) {
|
||||
if (GV.isDeclaration() || GV.isThreadLocal() || GV.hasSection())
|
||||
continue;
|
||||
|
||||
// It's not safe to merge globals that may be preempted
|
||||
if (TM && !TM->shouldAssumeDSOLocal(M, &GV))
|
||||
continue;
|
||||
|
||||
if (!(MergeExternalGlobals && GV.hasExternalLinkage()) &&
|
||||
!GV.hasInternalLinkage())
|
||||
continue;
|
||||
|
||||
@@ -1232,6 +1232,7 @@ static int computeHostNumPhysicalCores() {
|
||||
if (std::error_code EC = Text.getError()) {
|
||||
llvm::errs() << "Can't read "
|
||||
<< "/proc/cpuinfo: " << EC.message() << "\n";
|
||||
return -1;
|
||||
}
|
||||
SmallVector<StringRef, 8> strs;
|
||||
(*Text)->getBuffer().split(strs, "\n", /*MaxSplit=*/-1,
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
; RUN: llc < %s -mtriple=arm-eabi -arm-global-merge -global-merge-on-external=true | FileCheck %s --check-prefix=CHECK-MERGE
|
||||
; RUN: llc < %s -mtriple=arm-eabi -arm-global-merge -global-merge-on-external=false | FileCheck %s --check-prefix=CHECK-NO-MERGE
|
||||
; RUN: llc < %s -mtriple=arm-macho -arm-global-merge | FileCheck %s --check-prefix=CHECK-NO-MERGE
|
||||
; RUN: llc < %s -mtriple=arm-eabi -arm-global-merge -relocation-model=pic | FileCheck %s --check-prefix=CHECK-NO-MERGE
|
||||
|
||||
@x = global i32 0, align 4
|
||||
@y = global i32 0, align 4
|
||||
|
||||
Reference in New Issue
Block a user