From 935125126c4ffde74ef3a82959fde69ee8c6b648 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Tue, 25 Feb 2014 17:30:31 +0000 Subject: Make DataLayout a plain object, not a pass. Instead, have a DataLayoutPass that holds one. This will allow parts of LLVM don't don't handle passes to also use DataLayout. llvm-svn: 202168 --- llvm/lib/Transforms/Scalar/EarlyCSE.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'llvm/lib/Transforms/Scalar/EarlyCSE.cpp') diff --git a/llvm/lib/Transforms/Scalar/EarlyCSE.cpp b/llvm/lib/Transforms/Scalar/EarlyCSE.cpp index ecf0335ebe8..860948378e4 100644 --- a/llvm/lib/Transforms/Scalar/EarlyCSE.cpp +++ b/llvm/lib/Transforms/Scalar/EarlyCSE.cpp @@ -557,7 +557,8 @@ bool EarlyCSE::runOnFunction(Function &F) { std::vector nodesToProcess; - DL = getAnalysisIfAvailable(); + DataLayoutPass *DLP = getAnalysisIfAvailable(); + DL = DLP ? &DLP->getDataLayout() : 0; TLI = &getAnalysis(); DT = &getAnalysis().getDomTree(); -- cgit v1.2.3