[polly] r246418 - Do not model scalar references to constant values
Tobias Grosser via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 30 23:37:25 PDT 2015
Author: grosser
Date: Mon Aug 31 01:37:25 2015
New Revision: 246418
URL: http://llvm.org/viewvc/llvm-project?rev=246418&view=rev
Log:
Do not model scalar references to constant values
Modified:
polly/trunk/lib/Analysis/TempScopInfo.cpp
polly/trunk/test/Isl/CodeGen/phi_loop_carried_float_escape.ll
Modified: polly/trunk/lib/Analysis/TempScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/TempScopInfo.cpp?rev=246418&r1=246417&r2=246418&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/TempScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/TempScopInfo.cpp Mon Aug 31 01:37:25 2015
@@ -210,6 +210,9 @@ bool TempScopInfo::buildScalarDependence
if (R->contains(OpInst))
continue;
+ if (isa<Constant>(Op))
+ continue;
+
IRAccess ScalarAccess(IRAccess::READ, Op, ZeroOffset, 1, true, Op);
AccFuncMap[Inst->getParent()].push_back(
std::make_pair(ScalarAccess, Inst));
Modified: polly/trunk/test/Isl/CodeGen/phi_loop_carried_float_escape.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/Isl/CodeGen/phi_loop_carried_float_escape.ll?rev=246418&r1=246417&r2=246418&view=diff
==============================================================================
--- polly/trunk/test/Isl/CodeGen/phi_loop_carried_float_escape.ll (original)
+++ polly/trunk/test/Isl/CodeGen/phi_loop_carried_float_escape.ll Mon Aug 31 01:37:25 2015
@@ -1,4 +1,8 @@
-; RUN: opt %loadPolly -S -polly-no-early-exit -polly-detect-unprofitable -polly-codegen < %s | FileCheck %s
+; RUN: opt %loadPolly -S -polly-no-early-exit -polly-detect-unprofitable \
+; RUN: -polly-analyze-read-only-scalars=false -polly-codegen < %s | FileCheck %s
+
+; RUN: opt %loadPolly -S -polly-no-early-exit -polly-detect-unprofitable \
+; RUN: -polly-analyze-read-only-scalars=true -polly-codegen < %s | FileCheck %s
;
; float f(float *A, int N) {
; float tmp = 0;
More information about the llvm-commits
mailing list