[llvm-commits] [polly] r142770 - /polly/trunk/lib/ScheduleOptimizer.cpp
Sebastian Pop
spop at codeaurora.org
Tue Nov 15 13:24:05 PST 2011
On Sun, Oct 23, 2011 at 3:59 PM, Tobias Grosser
<grosser at fim.uni-passau.de> wrote:
> Author: grosser
> Date: Sun Oct 23 15:59:26 2011
> New Revision: 142770
>
> URL: http://llvm.org/viewvc/llvm-project?rev=142770&view=rev
> Log:
> ScheduleOptimizer: Allow to disable tiling
>
> Modified:
> polly/trunk/lib/ScheduleOptimizer.cpp
>
> Modified: polly/trunk/lib/ScheduleOptimizer.cpp
> URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/ScheduleOptimizer.cpp?rev=142770&r1=142769&r2=142770&view=diff
> ==============================================================================
> --- polly/trunk/lib/ScheduleOptimizer.cpp (original)
> +++ polly/trunk/lib/ScheduleOptimizer.cpp Sun Oct 23 15:59:26 2011
> @@ -38,6 +38,11 @@
> using namespace polly;
>
> static cl::opt<bool>
> +DisableTiling("polly-no-tiling",
> + cl::desc("Disable tiling in the isl scheduler"), cl::Hidden,
> + cl::init(false));
> +
> +static cl::opt<bool>
> Prevector("enable-schedule-prevector",
> cl::desc("Enable the prevectorization in the scheduler"), cl::Hidden,
> cl::value_desc("Prevectorization enabled"),
> @@ -202,14 +207,17 @@
> isl_union_map *tileUnionMap;
>
> partialSchedule = isl_band_get_partial_schedule(band);
> - ctx = isl_union_map_get_ctx(partialSchedule);
> - Space= isl_union_map_get_space(partialSchedule);
> - scheduleDimensions = isl_band_n_member(band);
> -
> - tileMap = getTileMap(ctx, scheduleDimensions, Space);
> - tileUnionMap = isl_union_map_from_map(isl_map_from_basic_map(tileMap));
> - tileUnionMap = isl_union_map_align_params(tileUnionMap, Space);
> - partialSchedule = isl_union_map_apply_range(partialSchedule, tileUnionMap);
Could you please rewrite this with an early return like this?
if (DisableTiling)
return partialSchedule;
See http://llvm.org/docs/CodingStandards.html#hl_earlyexit
> +
> + if (!DisableTiling) {
> + ctx = isl_union_map_get_ctx(partialSchedule);
> + Space= isl_union_map_get_space(partialSchedule);
> + scheduleDimensions = isl_band_n_member(band);
> +
> + tileMap = getTileMap(ctx, scheduleDimensions, Space);
> + tileUnionMap = isl_union_map_from_map(isl_map_from_basic_map(tileMap));
> + tileUnionMap = isl_union_map_align_params(tileUnionMap, Space);
> + partialSchedule = isl_union_map_apply_range(partialSchedule, tileUnionMap);
> + }
>
> return partialSchedule;
> }
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
--
Sebastian Pop
--
Qualcomm Innovation Center, Inc is a member of Code Aurora Forum
More information about the llvm-commits
mailing list