[PATCH] [Polly][FIX] Collection of base values for the IslExprBuilder

Johannes Doerfert doerfert at cs.uni-saarland.de
Fri Sep 19 08:50:32 PDT 2014


On 09/19, Tobias Grosser wrote:
> On September 19, 2014 4:49:05 PM CEST, Johannes Doerfert <doerfert at cs.uni-saarland.de> wrote:
> >Hi grosser, sebpop, dpeixott, simbuerg,
> >
> >  When we collect base values for the isl expression builder two corner
> >  cases where not implemented before:
> >   1) The memory access base value is invariant but still a load inside
> >       the region. These invariant loads are allowed in ScopDetection
> >       but need to be copied or moved if we want to use the loaded
> >       pointer value for e.g., runtime alias checks. We now move the
> >       load to the region entering block, basically licm for these kind
> >       of instructions.
> >   2) The IslExprBuilder doesn't know about types but assumes the value
> >       and the offset is in the unit of the base pointers type (or
> >       better the base pointers element type). This wasn't ensured
> >       before in case the base pointer was e.g., a struct pointer type.
> >      However, the offset provided by ScalarEvolution is already in the
> >       correct unit (the memory access element type). We now cast the
> >       base pointer into a pointer to the memory access element type.
> >
> >  Test cases for both situations are added and existing test cases
> >  adjusted to the new type casting.
> >
> >http://reviews.llvm.org/D5414
> >
> >Files:
> >  include/polly/ScopInfo.h
> >  lib/Analysis/ScopInfo.cpp
> >  lib/CodeGen/IslCodeGeneration.cpp
> >  lib/CodeGen/IslExprBuilder.cpp
> >  test/Isl/CodeGen/MemAccess/codegen_constant_offset.ll
> >  test/Isl/CodeGen/MemAccess/codegen_simple.ll
> >  test/Isl/CodeGen/MemAccess/codegen_simple_float.ll
> >  test/Isl/CodeGen/MemAccess/codegen_simple_md.ll
> >  test/Isl/CodeGen/MemAccess/codegen_simple_md_float.ll
> >  test/Isl/CodeGen/aliasing_indirect_accesses.ll
> >  test/Isl/CodeGen/aliasing_struct_elements.ll
> >  test/Isl/CodeGen/aliasing_struct_elements_float.ll
> 
> Hi Johannes,
> 
> Just a quick comment. The patch makes sense, but we need to be careful to not perform loads that may not have been executed at all if they would have remained  in within the loop 
True, I'll look into that later or tomorrow or so.

Should we wait with this patch then? (I think it will fix more than it
might break.)

Best regards,
  Johannes

-- 

Johannes Doerfert
Researcher / PhD Student

Compiler Design Lab (Prof. Hack)
Saarland University, Computer Science
Building E1.3, Room 4.26

Tel. +49 (0)681 302-57521 : doerfert at cs.uni-saarland.de
Fax. +49 (0)681 302-3065  : http://www.cdl.uni-saarland.de/people/doerfert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 213 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140919/c88655b8/attachment.sig>


More information about the llvm-commits mailing list