On Fri, Sep 19, 2014 at 3:54 PM, Sean Silva <[email protected]> wrote:
> > > On Thu, Sep 18, 2014 at 4:32 PM, Reid Kleckner <[email protected]> wrote: > >> On Thu, Sep 18, 2014 at 4:20 PM, Rafael Espíndola < >> [email protected]> wrote: >>> >>> Now, there are 300_000 options in the response file, but adding a >>> counter to ] llvm::opt::Option::matches shows that it is called about >>> 349_802_000 times :-) >>> >>> Is this a now issue? Is it worth fixing? >>> >> >> It's sort of a known issue, but only by inspection. If you've ever looked >> at the driver, there are all these calls to getLastArg(ID), AddAllArgs(ID1, >> ID2) and things of that nature. They *all* iterate the whole argument list. >> >> We could probably make this much more efficient by mapping the arguments >> into a table indexed by option ID and doing lookup on that. We would still >> need to preserve order information, though. >> >> I think when Daniel Dunbar wrote all this, everyone agreed that command >> line parsing would never be hot, so it was done expediently and without >> consideration for efficiency. Previously strings were not allocated form a >> pool, they were merely malloc'd and leaked. The leaks aren't really that >> bad, considering that the command line has to live for roughly the driver's >> whole life. >> > > Unless clang is being used as a library... > That was how things used to work. My understanding is that these were leaks that had to be fixed.
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
