aboutsummaryrefslogtreecommitdiff
path: root/tools/opt
diff options
context:
space:
mode:
authorMark Seaborn <mseaborn@chromium.org>2013-03-26 13:49:56 -0700
committerMark Seaborn <mseaborn@chromium.org>2013-03-26 13:49:56 -0700
commit9c7984ea3134c4f7f425bb2e01a5ee8540829fd9 (patch)
treed1cb61fe3057ca28c70a51a2f810609c2ded1018 /tools/opt
parent77fc541fc5b17685047aa296f7669a2ddc2bfd89 (diff)
PNaCl: Add ExpandGetElementPtr pass for converting GetElementPtr to arithmetic
This is similar to the GEP handling in visitGetElementPtr() in lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp. Once this pass is enabled, it will simplify the language to reduce the set of constructs that a PNaCl translator needs to handle as part of a stable wire format for PNaCl. BUG=https://code.google.com/p/nativeclient/issues/detail?id=3343 TEST=test/Transforms/NaCl/expand-getelementptr.ll Review URL: https://codereview.chromium.org/12849009
Diffstat (limited to 'tools/opt')
-rw-r--r--tools/opt/opt.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp
index 337419553a..c682768164 100644
--- a/tools/opt/opt.cpp
+++ b/tools/opt/opt.cpp
@@ -579,6 +579,7 @@ int main(int argc, char **argv) {
// @LOCALMOD-BEGIN
initializeExpandConstantExprPass(Registry);
initializeExpandCtorsPass(Registry);
+ initializeExpandGetElementPtrPass(Registry);
initializeExpandTlsPass(Registry);
initializeExpandTlsConstantExprPass(Registry);
initializeExpandVarArgsPass(Registry);