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

Johannes Doerfert doerfert at cs.uni-saarland.de
Fri Sep 19 07:49:05 PDT 2014


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5414.13870.patch
Type: text/x-patch
Size: 15820 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140919/19efbb9a/attachment.bin>


More information about the llvm-commits mailing list