Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[LTO] Scan all per-function subtargets when collecting runtime librar…
…y names. accumulateAndSortLibcalls in LTOCodeGenerator.cpp collects names of runtime library functions which are used to identify user-defined functions that should be protected. Previously, this function would only scan the TargetLowering object belonging to the "main" subtarget for the library function names. This commit changes it to scan all per-function subtargets. Differential Revision: http://reviews.llvm.org/D7275 llvm-svn: 227533
- Loading branch information
Showing
2 changed files
with
40 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
; Check that user-defined runtime library function __addsf3vfp is not removed | ||
; | ||
; RUN: llvm-as <%s >%t1 | ||
; RUN: llvm-lto -o %t2 %t1 -mcpu arm1176jz-s | ||
; RUN: llvm-nm %t2 | FileCheck %s | ||
|
||
target datalayout = "e-m:o-p:32:32-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32" | ||
target triple = "thumbv7-apple-ios" | ||
|
||
; CHECK: ___addsf3vfp | ||
|
||
define float @__addsf3vfp(float %a, float %b) #0 { | ||
entry: | ||
%add = fadd float %a, %b | ||
ret float %add | ||
} | ||
|
||
attributes #0 = { "target-cpu"="arm1176jzf-s"} |