summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/ToolChain.cpp
diff options
context:
space:
mode:
authorSebastian Pop <sebpop@gmail.com>2016-07-27 05:48:12 +0000
committerSebastian Pop <sebpop@gmail.com>2016-07-27 05:48:12 +0000
commit55c3007b881ddeb3ec0ca1769973213576e038d1 (patch)
tree9a73f30b80702934627e2e5da0dbdb5ddc822d92 /clang/lib/Driver/ToolChain.cpp
parent586d3eaeb59c20f95b1ac89ba53ffca2ddca3866 (diff)
downloadbcm5719-llvm-55c3007b881ddeb3ec0ca1769973213576e038d1.tar.gz
bcm5719-llvm-55c3007b881ddeb3ec0ca1769973213576e038d1.zip
GVN-hoist: improve code generation for recursive GEPs
When loading or storing in a field of a struct like "a.b.c", GVN is able to detect the equivalent expressions, and GVN-hoist would fail in the code generation. This is because the GEPs are not hoisted as scalar operations to avoid moving the GEPs too far from their ld/st instruction when the ld/st is not movable. So we end up having to generate code for the GEP of a ld/st when we move the ld/st. In the case of a GEP referring to another GEP as in "a.b.c" we need to code generate all the GEPs necessary to make all the operands available at the new location for the ld/st. With this patch we recursively walk through the GEP operands checking whether all operands are available, and in the case of a GEP operand, it recursively makes all its operands available. Code generation happens from the inner GEPs out until reaching the GEP that appears as an operand of the ld/st. Differential Revision: https://reviews.llvm.org/D22599 llvm-svn: 276841
Diffstat (limited to 'clang/lib/Driver/ToolChain.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud