[PATCH] Modularizing LICM
Ashutosh Nema
ashutosh.nema at amd.com
Fri Jan 30 01:51:37 PST 2015
Hi reames, bruno,
LICM has ‘SinkRegion’, ‘HoistRegion’, ‘PromoteAliasSet’ as core features.
Currently these core features are tied up with LICM pass.
If someone wants any of these feature then he has to schedule LICM as a complete pass.
Also there is no way to call any of these feature in a pass.
This change is to expose LICM core functionalities as a utility.
Following is high level description of changes:
1) Added declaration of ‘SinkRegion’, ‘HoistRegion’ and ‘PromoteAliasSet’ in ‘LoopUtils.h’
2) Following members functions of LICM has moved out of class and marked as static functions.
‘inSubLoop’, ‘isNotUsedInLoop’, ‘canSinkOrHoistInst’, ‘hoist’, ‘sink’, ‘CloneInstructionInExitBlock’
‘isSafeToExecuteUnconditionally’, ‘pointerInvalidatedByLoop’, ‘isGuaranteedToExecute’
3) Updated these functions with their dependencies.
4) LICM pass is now more like a wrapper pass, calling SinkRegion, HoistRegion, PromoteAliasSet utility.
5) Caller to ‘SinkRegion’, ‘HoistRegion’ and ‘PromoteAliasSet should provide all the required arguments.
For now I kept everything to same LICM.cpp but later we can move ‘SinkRegion’, ‘HoistRegion’,
‘PromoteAliasSet’ and helper functions to separate utility file (i.e. LICMCore.cpp)
Please review this change, suggestions are welcome.
REPOSITORY
rL LLVM
http://reviews.llvm.org/D7291
Files:
include/llvm/Transforms/Utils/LoopUtils.h
lib/Transforms/Scalar/LICM.cpp
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7291.19026.patch
Type: text/x-patch
Size: 24136 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150130/d7ff1ce9/attachment.bin>
More information about the llvm-commits
mailing list