[PATCH] D91476: [DCE] Always get TargetLibraryAnalysis
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 13 23:35:05 PST 2020
aeubanks created this revision.
aeubanks added reviewers: asbirlea, ychen.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
aeubanks requested review of this revision.
Fixes calls-errno.ll under NPM.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D91476
Files:
llvm/lib/Transforms/Scalar/DCE.cpp
llvm/test/Transforms/DCE/calls-errno.ll
Index: llvm/test/Transforms/DCE/calls-errno.ll
===================================================================
--- llvm/test/Transforms/DCE/calls-errno.ll
+++ llvm/test/Transforms/DCE/calls-errno.ll
@@ -1,4 +1,5 @@
; RUN: opt < %s -dce -S | FileCheck %s
+; RUN: opt < %s -passes=dce -S | FileCheck %s
declare double @acos(double) nounwind
declare double @asin(double) nounwind
Index: llvm/lib/Transforms/Scalar/DCE.cpp
===================================================================
--- llvm/lib/Transforms/Scalar/DCE.cpp
+++ llvm/lib/Transforms/Scalar/DCE.cpp
@@ -131,7 +131,7 @@
}
PreservedAnalyses DCEPass::run(Function &F, FunctionAnalysisManager &AM) {
- if (!eliminateDeadCode(F, AM.getCachedResult<TargetLibraryAnalysis>(F)))
+ if (!eliminateDeadCode(F, &AM.getResult<TargetLibraryAnalysis>(F)))
return PreservedAnalyses::all();
PreservedAnalyses PA;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91476.305303.patch
Type: text/x-patch
Size: 887 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201114/68ae80de/attachment.bin>
More information about the llvm-commits
mailing list