diff options
author | Sam Elliott <ashe2@cs.washington.edu> | 2017-08-20 01:30:45 +0000 |
---|---|---|
committer | Sam Elliott <ashe2@cs.washington.edu> | 2017-08-20 01:30:45 +0000 |
commit | 74a34d9193e1d5027785b1fed7a30a2f18c731a6 (patch) | |
tree | 16bcef0926855af32bca6fab753c001db005ac96 /test/Transforms/SampleProfile | |
parent | e12236f216fd10580c830e4cd5c7ec7cd283ee03 (diff) |
Keep Optimization Remark Yaml in NewPM
Summary:
The New Pass Manager infrastructure was forgetting to keep around the optimization remark yaml file that the compiler might have been producing. This meant setting the option to '-' for stdout worked, but setting it to a filename didn't give file output (presumably it was deleted because compilation didn't explicitly keep it). This change just ensures that the file is kept if compilation succeeds.
So far I have updated one of the optimization remark output tests to add a version with the new pass manager. It is my intention for this patch to also include changes to all tests that use `-opt-remark-output=` but I wanted to get the code patch ready for review while I was making all those changes.
Fixes https://bugs.llvm.org/show_bug.cgi?id=33951
Reviewers: anemet, chandlerc
Reviewed By: anemet, chandlerc
Subscribers: javed.absar, chandlerc, fhahn, llvm-commits
Differential Revision: https://reviews.llvm.org/D36906
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311271 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/SampleProfile')
-rw-r--r-- | test/Transforms/SampleProfile/remarks.ll | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/Transforms/SampleProfile/remarks.ll b/test/Transforms/SampleProfile/remarks.ll index 6285d69f9c7..1fc8f38751e 100644 --- a/test/Transforms/SampleProfile/remarks.ll +++ b/test/Transforms/SampleProfile/remarks.ll @@ -1,6 +1,8 @@ ; RUN: opt < %s -sample-profile -sample-profile-file=%S/Inputs/remarks.prof -S -pass-remarks=sample-profile -pass-remarks-output=%t.opt.yaml 2>&1 | FileCheck %s -; RUN: opt < %s -passes=sample-profile -sample-profile-file=%S/Inputs/remarks.prof -S -pass-remarks=sample-profile 2>&1 | FileCheck %s ; RUN: FileCheck %s -check-prefix=YAML < %t.opt.yaml +; RUN: opt < %s -passes=sample-profile -sample-profile-file=%S/Inputs/remarks.prof -S -pass-remarks=sample-profile -pass-remarks-output=%t.opt.yaml 2>&1 | FileCheck %s +; RUN: FileCheck %s -check-prefix=YAML < %t.opt.yaml + ; Original test case. ; ; 1 #include <stdlib.h> |