R600: Unconditionally unroll loops that contain GEPs with alloca pointers
authorTom Stellard <thomas.stellard@amd.com>
Thu, 23 Jan 2014 18:49:28 +0000 (18:49 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Thu, 23 Jan 2014 18:49:28 +0000 (18:49 +0000)
commit01df2fa3c427b49b60da9ea19b6c42ae13e0a134
tree4620c85b0daa3b72ff41e96624179aca5f1668f3
parentfc7edee6313d05868d783e8c01850d97cb6a9799
R600: Unconditionally unroll loops that contain GEPs with alloca pointers

Implement the getUnrollingPreferences() function for
AMDGPUTargetTransformInfo so that loops that do address calculations
on pointers derived from alloca are unconditionally unrolled.

Unrolling these loops makes it more likely that SROA will be able to
eliminate the allocas, which is a big win for R600 since memory
allocated by alloca (private memory) is really slow.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199916 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/R600/AMDGPUTargetTransformInfo.cpp
test/CodeGen/R600/unroll.ll [new file with mode: 0644]