[PATCH] D12072: [FIX] Restrict the AST build with the assumed context
Johannes Doerfert via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 17 02:39:48 PDT 2015
This revision was automatically updated to reflect the committed changes.
Closed by commit rL245203: [FIX] Create location if a needed value was not yet demoted (authored by jdoerfert).
Changed prior to commit:
http://reviews.llvm.org/D12072?vs=32273&id=32278#toc
Repository:
rL LLVM
http://reviews.llvm.org/D12072
Files:
polly/trunk/lib/CodeGen/BlockGenerators.cpp
polly/trunk/test/Isl/CodeGen/assumed_context_empty_domain_restriction.ll
Index: polly/trunk/test/Isl/CodeGen/assumed_context_empty_domain_restriction.ll
===================================================================
--- polly/trunk/test/Isl/CodeGen/assumed_context_empty_domain_restriction.ll
+++ polly/trunk/test/Isl/CodeGen/assumed_context_empty_domain_restriction.ll
@@ -1,35 +1,9 @@
-; RUN: opt %loadPolly -S -polly-opt-isl -polly-codegen < %s
+; RUN: opt %loadPolly -S -polly-opt-isl -polly-codegen < %s | FileCheck %s
;
-; TODO: This test will crash the scalar code generation. The problem step by step:
-; 1) The assumed context is empty because of the out-of-bounds array access.
-; 2) The dependence analysis will use the assumed context and determine
-; that there are not iterations executed, hence no dependences.
-; 3) The scheduler will transform the program somehow according to
-; the orginal domains and empty dependences but not the assumed context.
-; The new ast is shown below.
-; 4) The code generation will look for the new value of %0 when the
-; for_body_328_lr_ph statement is copied, however it has not yet seen %0
-; as the for_end_310 statement has been moved after for_body_328_lr_ph.
-; 5) Crash as no new value of %0 can be found.
-;
-; AST:
-;
-; if (0)
-; {
-; for (int c0 = 0; c0 <= 32; c0 += 1)
-; Stmt_for_body_328(c0);
-; Stmt_for_body_328_lr_ph();
-; Stmt_for_end_310();
-; }
-; else
-; { /* original code */ }
+; This test used to crash the scalar code generation.
;
; CHECK: polly.start
;
-; TODO: This test should not crash Polly.
-;
-; XFAIL: *
-;
@endposition = external global i32, align 4
@Bit = external global [0 x i32], align 4
@Init = external global [0 x i32], align 4
Index: polly/trunk/lib/CodeGen/BlockGenerators.cpp
===================================================================
--- polly/trunk/lib/CodeGen/BlockGenerators.cpp
+++ polly/trunk/lib/CodeGen/BlockGenerators.cpp
@@ -474,9 +474,7 @@
return /* Case (3a) */ ScalarValueCopy;
// Case (3b)
- assert(ReloadMap.count(ScalarValueInst) &&
- "ScalarInst not mapped in the block and not in the given reload map!");
- Value *ReloadAddr = ReloadMap[ScalarValueInst];
+ Value *ReloadAddr = getOrCreateAlloca(ScalarValueInst, ReloadMap, ".s2a");
ScalarValue =
Builder.CreateLoad(ReloadAddr, ReloadAddr->getName() + ".reload");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12072.32278.patch
Type: text/x-patch
Size: 2459 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150817/e2a85533/attachment.bin>
More information about the llvm-commits
mailing list