[PATCH] D65009: [LTO] Always mark regular LTO units with EnableSplitLTOUnit=1
Teresa Johnson via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 19 16:02:44 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL366623: [LTO] Always mark regular LTO units with EnableSplitLTOUnit=1 (authored by tejohnson, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65009/new/
https://reviews.llvm.org/D65009
Files:
cfe/trunk/lib/CodeGen/BackendUtil.cpp
cfe/trunk/test/CodeGen/split-lto-unit.c
Index: cfe/trunk/test/CodeGen/split-lto-unit.c
===================================================================
--- cfe/trunk/test/CodeGen/split-lto-unit.c
+++ cfe/trunk/test/CodeGen/split-lto-unit.c
@@ -0,0 +1,12 @@
+// ; 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
+// 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
+// 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
+
+int main() {}
Index: cfe/trunk/lib/CodeGen/BackendUtil.cpp
===================================================================
--- cfe/trunk/lib/CodeGen/BackendUtil.cpp
+++ cfe/trunk/lib/CodeGen/BackendUtil.cpp
@@ -852,7 +852,7 @@
if (!TheModule->getModuleFlag("ThinLTO"))
TheModule->addModuleFlag(Module::Error, "ThinLTO", uint32_t(0));
TheModule->addModuleFlag(Module::Error, "EnableSplitLTOUnit",
- CodeGenOpts.EnableSplitLTOUnit);
+ uint32_t(1));
}
PerModulePasses.add(createBitcodeWriterPass(
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65009.210923.patch
Type: text/x-patch
Size: 1518 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190719/f641d562/attachment.bin>
More information about the cfe-commits
mailing list