From 7b5a4dfd46a28d4af766422da345c1a4ec71115c Mon Sep 17 00:00:00 2001 From: Tobias Grosser Date: Tue, 11 Apr 2017 04:59:13 +0000 Subject: Exploit BasicBlock::getModule to shorten code Suggested-by: Roman Gareev llvm-svn: 299914 --- polly/lib/Analysis/ScopDetection.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'polly/lib/Analysis/ScopDetection.cpp') diff --git a/polly/lib/Analysis/ScopDetection.cpp b/polly/lib/Analysis/ScopDetection.cpp index 44b17824981..31ee882d0ce 100644 --- a/polly/lib/Analysis/ScopDetection.cpp +++ b/polly/lib/Analysis/ScopDetection.cpp @@ -344,8 +344,7 @@ bool ScopDetection::addOverApproximatedRegion(Region *AR, bool ScopDetection::onlyValidRequiredInvariantLoads( InvariantLoadsSetTy &RequiredILS, DetectionContext &Context) const { Region &CurRegion = Context.CurRegion; - const DataLayout &DL = - CurRegion.getEntry()->getParent()->getParent()->getDataLayout(); + const DataLayout &DL = CurRegion.getEntry()->getModule()->getDataLayout(); if (!PollyInvariantLoadHoisting && !RequiredILS.empty()) return false; -- cgit v1.2.3