FW: Changes in ‘CodeExtractor’ for call-site block
Nema, Ashutosh
Ashutosh.Nema at amd.com
Thu Jan 22 21:08:59 PST 2015
Hi Chandler,
I have got your contact from previous commit to CodeExtractor.
If possible can you review my changes or guide me to right reviewer.
Thanks,
Ashutosh
-----Original Message-----
From: Nema, Ashutosh
Sent: Thursday, January 22, 2015 10:51 AM
To: Nema, Ashutosh
Cc: llvm-commits at cs.uiuc.edu
Subject: [PATCH] Changes in ‘CodeExtractor’ for call-site block
This change is to expose call site block of outlined function in ‘CodeExtractor’.
When code extractor works on blocks inside a loop it extracts properly.
But it didn’t register extracted function call site block to loop.
Because of it loop verification fails with error:
"Loop block has no in-loop successors!".
Call site block registration to loop is very much needed.
I like to expose call site block (‘codeReplacer’) by adding getter functions to ‘CodeExtractor’ class.
So who ever using code extractor they can access that call-site block and register if needed.
Made following changes in CodeExtractor.
1) Made ‘codeReplacer’ as member of ‘CodeExtractor’
2) Added a new method ‘getCodeReplacerIfAvailable’ to ‘CodeExtractor’ class.
This method return ‘codeReplacer’ block.
3) ‘constructFunction’ method works on ‘codeReplacer’ block and accepts as argument.
Now ‘codeReplacer’ block is a member to class so no need of passing it as argument.
4) ‘emitCallAndSwitchStatement’ method works on ‘codeReplacer’ block and accepts as argument.
Now ‘codeReplacer’ block is a member to class so no need of passing it as argument.
5) Updated callsites to ‘constructFunction’ & ‘emitCallAndSwitchStatement’.
6) In ‘CodeExtractor’ constructor setting ‘CodeReplacer’ as nullptr.
Files Modified:
include/llvm/Transforms/Utils/CodeExtractor.h
lib/Transforms/Utils/CodeExtractor.cpp
REPOSITORY
rL LLVM
http://reviews.llvm.org/D7118
Files:
include/llvm/Transforms/Utils/CodeExtractor.h
lib/Transforms/Utils/CodeExtractor.cpp
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7118.18581.patch
Type: text/x-patch
Size: 10434 bytes
Desc: D7118.18581.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150123/73c977fc/attachment.bin>
More information about the llvm-commits
mailing list