[polly] r246388 - Ignore debug intrinsics and do not model their potential scalar metadata reads
Tobias Grosser via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 30 09:57:21 PDT 2015
Author: grosser
Date: Sun Aug 30 11:57:20 2015
New Revision: 246388
URL: http://llvm.org/viewvc/llvm-project?rev=246388&view=rev
Log:
Ignore debug intrinsics and do not model their potential scalar metadata reads
Our code generation currently does not support scalar references to metadata
values. Hence, it would crash if we try to model scalar dependences to metadata
values. Fortunately, for one of the common uses, debug information, we can
for now just ignore the relevant intrinsics and consequently the issue of how
to model scalar dependences to metadata.
Modified:
polly/trunk/lib/Analysis/TempScopInfo.cpp
polly/trunk/lib/CodeGen/BlockGenerators.cpp
polly/trunk/test/Isl/CodeGen/debug-intrinsics.ll
Modified: polly/trunk/lib/Analysis/TempScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/TempScopInfo.cpp?rev=246388&r1=246387&r2=246388&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/TempScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/TempScopInfo.cpp Sun Aug 30 11:57:20 2015
@@ -323,6 +323,9 @@ void TempScopInfo::buildAccessFunctions(
Functions.push_back(
std::make_pair(buildIRAccess(Inst, L, &R, BoxedLoops), Inst));
+ if (isIgnoredIntrinsic(Inst))
+ continue;
+
if (PHINode *PHI = dyn_cast<PHINode>(Inst))
buildPHIAccesses(PHI, R, Functions, NonAffineSubRegion);
Modified: polly/trunk/lib/CodeGen/BlockGenerators.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/BlockGenerators.cpp?rev=246388&r1=246387&r2=246388&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/BlockGenerators.cpp (original)
+++ polly/trunk/lib/CodeGen/BlockGenerators.cpp Sun Aug 30 11:57:20 2015
@@ -70,6 +70,9 @@ bool polly::isIgnoredIntrinsic(const Val
case llvm::Intrinsic::donothing:
case llvm::Intrinsic::assume:
case llvm::Intrinsic::expect:
+ // Some debug info intrisics are supported/ignored.
+ case llvm::Intrinsic::dbg_value:
+ case llvm::Intrinsic::dbg_declare:
return true;
default:
break;
Modified: polly/trunk/test/Isl/CodeGen/debug-intrinsics.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/Isl/CodeGen/debug-intrinsics.ll?rev=246388&r1=246387&r2=246388&view=diff
==============================================================================
--- polly/trunk/test/Isl/CodeGen/debug-intrinsics.ll (original)
+++ polly/trunk/test/Isl/CodeGen/debug-intrinsics.ll Sun Aug 30 11:57:20 2015
@@ -1,4 +1,11 @@
-; RUN: opt %loadPolly -polly-detect-unprofitable -polly-no-early-exit -polly-codegen -S < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-detect-unprofitable -polly-no-early-exit \
+; RUN: -polly-analyze-read-only-scalars=false -polly-codegen -S < %s | \
+; RUN: FileCheck %s
+
+; RUN: opt %loadPolly -polly-detect-unprofitable -polly-no-early-exit \
+; RUN: -polly-analyze-read-only-scalars=true -polly-codegen -S < %s | \
+; RUN: FileCheck %s
+
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
; Function Attrs: nounwind uwtable
More information about the llvm-commits
mailing list