patch: don't use -backend-option for vectorizer flags

Nick Lewycky nlewycky at google.com
Mon Jun 24 18:35:28 PDT 2013


Currently -fvectorize and friends inject themselves into the BackendArgs so
that they enable the command line flags when the command line parser runs
in BackendUtil.

This is incompatible with folks trying to use clang as a library to build
more than one translation unit (as flags are global, and you may only
specify -fvectorize once). Here's an example of the symptoms of the problem:
  http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-June/030264.html

The attached patch creates new CC1 options and wires those up to the
existing flags in the PMBuilder (not the global flags). Please review!

Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130624/4923af26/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vectorize-cc1-1.patch
Type: application/octet-stream
Size: 4836 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130624/4923af26/attachment.obj>


More information about the cfe-commits mailing list