mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-27 16:06:05 +00:00

Currently, the UnifiedLTO pipeline seems to have trouble with several LTO features, like SplitLTO units, which means we cannot use important optimizations like Whole Program Devirtualization or security hardening instrumentation like CFI. This patch reverts FatLTO to using distinct pipelines for Full LTO and ThinLTO. It still avoids module cloning, since that was error prone.
19 lines
942 B
LLVM
19 lines
942 B
LLVM
; RUN: opt --mtriple x86_64-unknown-linux-gnu < %s -passes="embed-bitcode" -S | FileCheck %s
|
|
; RUN: opt --mtriple x86_64-unknown-linux-gnu < %s -passes="embed-bitcode<thinlto>" -S | FileCheck %s
|
|
; RUN: opt --mtriple x86_64-unknown-linux-gnu < %s -passes="embed-bitcode<emit-summary>" -S | FileCheck %s
|
|
; RUN: opt --mtriple x86_64-unknown-linux-gnu < %s -passes="embed-bitcode<thinlto;emit-summary>" -S | FileCheck %s
|
|
|
|
@a = global i32 1
|
|
|
|
; CHECK: @a = global i32 1
|
|
;; Make sure the module is in the correct section.
|
|
; CHECK: @llvm.embedded.object = private constant {{.*}}, section ".llvm.lto", align 1
|
|
|
|
;; Ensure that the metadata is in llvm.compiler.used.
|
|
; CHECK: @llvm.compiler.used = appending global [1 x ptr] [ptr @llvm.embedded.object], section "llvm.metadata"
|
|
|
|
;; Make sure the metadata correlates to the .llvm.lto section.
|
|
; CHECK: !llvm.embedded.objects = !{!1}
|
|
; CHECK: !0 = !{}
|
|
; CHECK: !{ptr @llvm.embedded.object, !".llvm.lto"}
|