Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[lld][COFF] Add command line options for LTO with new pass manager
This is more or less a port of rL329598 (D45275) to the COFF linker. Since there were already LTO-related settings under -opt:, I added them there instead of new flags. Differential Revision: https://reviews.llvm.org/D90624
- Loading branch information
Showing
4 changed files
with
39 additions
and
0 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
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,20 @@ | ||
; REQUIRES: x86 | ||
; RUN: llvm-as %s -o %s.obj | ||
|
||
; RUN: lld-link %s.obj -entry:main -opt:ltonewpassmanager -opt:ltodebugpassmanager 2>&1 | FileCheck %s --check-prefix=ENABLED | ||
; ENABLED: Starting llvm::Module pass manager run. | ||
; ENABLED: Finished llvm::Module pass manager run. | ||
|
||
; Passing -time just to avoid empty FileCheck input | ||
; RUN: lld-link %s.obj -entry:main -time -opt:ltonewpassmanager -opt:ltodebugpassmanager -opt:noltonewpassmanager 2>&1 | FileCheck %s --check-prefix=DISABLED | ||
; RUN: lld-link %s.obj -entry:main -time -opt:ltonewpassmanager -opt:ltodebugpassmanager -opt:noltodebugpassmanager 2>&1 | FileCheck %s --check-prefix=DISABLED | ||
; DISABLED-NOT: Starting llvm::Module pass manager run. | ||
; DISABLED-NOT: Finished llvm::Module pass manager run. | ||
|
||
target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" | ||
target triple = "x86_64-pc-windows-msvc19.11.0" | ||
|
||
define dso_local i32 @main(i32 %argc, i8** nocapture readnone %0) local_unnamed_addr { | ||
entry: | ||
ret i32 %argc | ||
} |