aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/InitHeaderSearch.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-03-25 10:34:54 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-03-25 10:34:54 +0000
commitef82cf5b1e6b0fcbbb732d72652a01b3b06c097f (patch)
treeea8fadf64810125a53303902edb17e4b288a6fa1 /clang/lib/Frontend/InitHeaderSearch.cpp
parent6330877a3ebc252ec2251ff6a2eb73297e233ae5 (diff)
downloadllvm-ef82cf5b1e6b0fcbbb732d72652a01b3b06c097f.zip
llvm-ef82cf5b1e6b0fcbbb732d72652a01b3b06c097f.tar.gz
llvm-ef82cf5b1e6b0fcbbb732d72652a01b3b06c097f.tar.bz2
Teach the function cloner (and thus the inliner) to simplify PHINodes
aggressively. There are lots of dire warnings about this being expensive that seem to predate switching to the TrackingVH-based value remapper that is automatically updated on RAUW. This makes it easy to not just prune single-entry PHIs, but to fully simplify PHIs, and to recursively simplify the newly inlined code to propagate PHINode simplifications. This introduces a bit of a thorny problem though. We may end up simplifying a branch condition to a constant when we fold PHINodes, and we would like to nuke any dead blocks resulting from this so that time isn't wasted continually analyzing them, but this isn't easy. Deleting basic blocks *after* they are fully cloned and mapped into the new function currently requires manually updating the value map. The last piece of the simplification-during-inlining puzzle will require either switching to WeakVH mappings or some other piece of refactoring. I've left a FIXME in the testcase about this. llvm-svn: 153410
Diffstat (limited to 'clang/lib/Frontend/InitHeaderSearch.cpp')
0 files changed, 0 insertions, 0 deletions