[llvm-commits] [PATCH] Allow "opt" to run without target data

Kenneth Uildriks kennethuil at gmail.com
Wed Oct 21 14:31:27 PDT 2009


Currently, there is no way to prevent "opt" from putting in default
target data layout if the Module has none, or to supply an alternate
target data layout.  The default target data layout is bogus on most
platforms.

This patch adds the following command-line options:

-default-data-layout=<layout-string> - data layout string to use if
not specified by module
-no-default-data-layout - no data layout assumptions unless module
specifies data layout.

The -no-default-data-layout prevents a TargetData pass from being
added to opt's PassManager and (theoretically) prevents platform data
layout dependent optimization from being applied.  I think this should
eventually be the default, but setting it to the default might break
existing users and test scripts.  For now, if neither option is
supplied, opt's behavior will remain unchanged from the current
(trunk) version.



More information about the llvm-commits mailing list