Hi, I have a patch (split into three steps since it goes across clang/llvm) that fixes this.
Please take a look! Thanks, Hans On Fri, Mar 15, 2013 at 12:16 PM, Daniel Dunbar <[email protected]> wrote: > Hi Michael, > > I just happened to notice one thing about this patch that is suboptimal. > This code: > -- > // Build prefixes. > for (unsigned i = FirstSearchableIndex + 1, e = getNumOptions() + 1; > i != e; ++i) { > if (const char *const *P = getInfo(i).Prefixes) { > for (; *P != 0; ++P) { > PrefixesUnion.insert(*P); > } > } > } > -- > does a lot of runtime computation (relatively) for very little value. > > Could you fix these two structures (PrefixesUnion and PrefixChars) to be > computed by the tblgen pass? > > - Daniel > > > > On Mon, Oct 22, 2012 at 3:13 PM, Michael J. Spencer <[email protected]> > wrote: >> >> Author: mspencer >> Date: Mon Oct 22 17:13:48 2012 >> New Revision: 166444 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=166444&view=rev >> Log: >> [Options] Add prefixes to options. >> >> Each option has a set of prefixes. When matching an argument such as >> -funroll-loops. First the leading - is removed as it is a prefix. Then >> a lower_bound search for "funroll-loops" is done against the option table >> by >> option name. From there each option prefix + option name combination is >> tested >> against the argument. >> >> This allows us to support Microsoft style options where both / and - are >> valid >> prefixes. It also simplifies the cases we already have where options come >> in >> both - and -- forms. Almost every option for gnu-ld happens to have this >> form.
1-llvm-tablegen-prefixesunion.patch
Description: Binary data
2-clang-pass-in-tablegenned-prefixesunion.patch
Description: Binary data
3-llvm-use-tablegenned-prefixesunion.patch
Description: Binary data
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
