Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[opt][clang] Enable using -module-summary/-flto=thin with -S/-emit-llvm
Enable using -module-summary with -S (similarly to what currently can be achieved with opt <input> -o - | llvm-dis). This is a recommit of ef9e624. Test plan: ninja check-all Differential revision: https://reviews.llvm.org/D137768
- Loading branch information
1 parent
ab9eac7
commit 34ab474
Showing
8 changed files
with
50 additions
and
27 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 |
---|---|---|
@@ -1,12 +1,15 @@ | ||
// ; Check that -flto=thin without -fsplit-lto-unit has EnableSplitLTOUnit = 0 | ||
// RUN: %clang_cc1 -flto=thin -emit-llvm-bc < %s | llvm-dis -o - | FileCheck %s | ||
// RUN: %clang_cc1 -flto=thin -emit-llvm < %s | FileCheck %s | ||
// CHECK: !{i32 1, !"EnableSplitLTOUnit", i32 0} | ||
// | ||
// ; Check that -flto=thin with -fsplit-lto-unit has EnableSplitLTOUnit = 1 | ||
// RUN: %clang_cc1 -flto=thin -fsplit-lto-unit -emit-llvm-bc < %s | llvm-dis -o - | FileCheck %s --check-prefix=SPLIT | ||
// RUN: %clang_cc1 -flto=thin -fsplit-lto-unit -emit-llvm < %s | FileCheck %s --check-prefix=SPLIT | ||
// SPLIT: !{i32 1, !"EnableSplitLTOUnit", i32 1} | ||
// | ||
// ; Check that regular LTO has EnableSplitLTOUnit = 1 | ||
// RUN: %clang_cc1 -flto -triple x86_64-pc-linux-gnu -emit-llvm-bc < %s | llvm-dis -o - | FileCheck %s --implicit-check-not="EnableSplitLTOUnit" --check-prefix=SPLIT | ||
// RUN: %clang_cc1 -flto -triple x86_64-pc-linux-gnu -emit-llvm < %s | FileCheck %s --implicit-check-not="EnableSplitLTOUnit" --check-prefix=SPLIT | ||
|
||
int main(void) {} |
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 |
---|---|---|
|
@@ -8,6 +8,7 @@ add_llvm_component_library(LLVMIRPrinter | |
intrinsics_gen | ||
|
||
LINK_COMPONENTS | ||
Analysis | ||
Core | ||
Support | ||
) |
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 |
---|---|---|
|
@@ -1386,6 +1386,7 @@ cc_library( | |
]), | ||
copts = llvm_copts, | ||
deps = [ | ||
":Analysis", | ||
":Core", | ||
":Support", | ||
], | ||
|