2016-09-07 17:46:16 +00:00
|
|
|
; RUN: llvm-as < %s > %t1.bc
|
|
|
|
|
2017-08-02 03:03:19 +00:00
|
|
|
; Try the default pipeline and check is BasicAA is invoked.
|
|
|
|
; RUN: llvm-lto2 run %t1.bc -o %t.o -r %t1.bc,patatino,px -debug-pass-manager \
|
|
|
|
; RUN: -use-new-pm 2>&1 | FileCheck %s --check-prefix=DEFAULT
|
|
|
|
; DEFAULT: Running analysis: BasicAA on patatino
|
|
|
|
|
2016-09-07 17:46:16 +00:00
|
|
|
; Try a custom pipeline
|
2017-04-11 18:12:00 +00:00
|
|
|
; RUN: llvm-lto2 run %t1.bc -o %t.o -save-temps \
|
2016-09-16 21:03:21 +00:00
|
|
|
; RUN: -r %t1.bc,patatino,px -opt-pipeline loweratomic \
|
|
|
|
; RUN: -aa-pipeline basic-aa
|
2016-09-07 17:46:16 +00:00
|
|
|
; RUN: llvm-dis < %t.o.0.4.opt.bc | FileCheck %s --check-prefix=CUSTOM
|
|
|
|
|
2017-01-24 00:58:24 +00:00
|
|
|
; Try the new pass manager LTO default pipeline (make sure the option
|
|
|
|
; is accepted).
|
[ThinLTO] Move -lto-use-new-pm to llvm-lto2, and change it to -use-new-pm.
Summary:
As we teach Clang to use ThinkLTO + new PM, it's good for the users to
inject through Config, instead of setting a flag in the LTOBackend
library. Move the flag to llvm-lto2.
As it moves to llvm-lto2, a new name -use-new-pm seems simpler and as
clear.
Reviewers: davide, tejohnson
Subscribers: mehdi_amini, Prazek, inglorion, eraman, chandlerc, llvm-commits
Differential Revision: https://reviews.llvm.org/D33799
llvm-svn: 304492
2017-06-01 23:13:44 +00:00
|
|
|
; RUN: llvm-lto2 run %t1.bc -o %t.o -use-new-pm -r %t1.bc,patatino,px
|
2017-01-24 00:58:24 +00:00
|
|
|
|
2017-02-10 04:35:32 +00:00
|
|
|
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
2016-09-07 17:46:16 +00:00
|
|
|
target triple = "x86_64-unknown-linux-gnu"
|
|
|
|
|
|
|
|
define void @patatino() {
|
|
|
|
fence seq_cst
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; CUSTOM: define void @patatino() {
|
|
|
|
; CUSTOM-NEXT: ret void
|
|
|
|
; CUSTOM-NEXT: }
|
|
|
|
|
2016-09-16 21:03:21 +00:00
|
|
|
; Check that invalid pipelines are caught as errors.
|
2017-04-11 18:12:00 +00:00
|
|
|
; RUN: not llvm-lto2 run %t1.bc -o %t.o \
|
2016-09-07 17:46:16 +00:00
|
|
|
; RUN: -r %t1.bc,patatino,px -opt-pipeline foogoo 2>&1 | \
|
|
|
|
; RUN: FileCheck %s --check-prefix=ERR
|
|
|
|
|
2018-10-15 15:00:18 +00:00
|
|
|
; ERR: LLVM ERROR: unable to parse pass pipeline description 'foogoo': unknown pass name 'foogoo'
|
2016-09-16 21:03:21 +00:00
|
|
|
|
2017-04-11 18:12:00 +00:00
|
|
|
; RUN: not llvm-lto2 run %t1.bc -o %t.o \
|
2016-09-16 21:03:21 +00:00
|
|
|
; RUN: -r %t1.bc,patatino,px -aa-pipeline patatino \
|
|
|
|
; RUN: -opt-pipeline loweratomic 2>&1 | \
|
|
|
|
; RUN: FileCheck %s --check-prefix=AAERR
|
|
|
|
|
2018-10-15 15:00:18 +00:00
|
|
|
; AAERR: LLVM ERROR: unable to parse AA pipeline description 'patatino': unknown alias analysis name 'patatino'
|