aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2015-01-21 11:38:17 +0000
committerChandler Carruth <chandlerc@gmail.com>2015-01-21 11:38:17 +0000
commitdf5747a9004e5b5b79f3c44ba5e1e37503e7ad86 (patch)
treedff8fdaafa7ce2e32427bf1cd25db3e4db33ad21 /clang/lib/CodeGen/CodeGenModule.cpp
parentba4c5179a0aa11531f90a51775ae95f2287bf98b (diff)
downloadllvm-df5747a9004e5b5b79f3c44ba5e1e37503e7ad86.zip
llvm-df5747a9004e5b5b79f3c44ba5e1e37503e7ad86.tar.gz
llvm-df5747a9004e5b5b79f3c44ba5e1e37503e7ad86.tar.bz2
[PM] Refactor the InstCombiner interface to use an external worklist.
Because in its primary function pass the combiner is run repeatedly over the same function until doing so produces no changes, it is essentially to not re-allocate the worklist. However, as a utility, the more common pattern would be to put a limited set of instructions in the worklist rather than the entire function body. That is also the more likely pattern when used by the new pass manager. The result is a very light weight combiner that does the visiting with a separable worklist. This can then be wrapped up in a helper function for users that want a combiner utility, or as I have here it can be wrapped up in a pass which manages the iterations used when combining an entire function's instructions. Hopefully this removes some of the worst of the interface warts that became apparant with the last patch here. However, there is clearly more work. I've again left some FIXMEs for the most egregious. The ones that stick out to me are the exposure of the worklist and IR builder as public members, and the use of pointers rather than references. However, fixing these is likely to be much more mechanical and less interesting so I didn't want to touch them in this patch. llvm-svn: 226655
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions