[PATCH] D74447: [Clang] After integrated-cc1, ignore -disable-free when there are more than one job in the queue

Alexandre Ganea via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 11 14:40:48 PST 2020


aganea created this revision.
aganea added reviewers: hans, thakis, rnk, erichkeane.
Herald added subscribers: cfe-commits, dexonsmith.
Herald added a project: clang.

A `CC1Command` was previously always burying pointers (ie. skipping object deletion). This lead to higher memory usage scenarios, when the inputs or cmd-line flags expand to more than one driver job.

With this patch, when several jobs are created by the driver, and at least one `CC1Command` is in the job queue, remove `-disable-free` for `CC1Command`s other than the last one.
If the last job is not a `CC1Command`, this patch disables `-disable-free` altogether for `CC1Command`s.

Fixes PR44823.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D74447

Files:
  clang/include/clang/Driver/Job.h
  clang/lib/Driver/Driver.cpp
  clang/lib/Driver/Job.cpp
  clang/test/Driver/cc1-spawnprocess.c
  clang/tools/driver/cc1_main.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74447.244003.patch
Type: text/x-patch
Size: 4961 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200211/a1e66c35/attachment.bin>


More information about the cfe-commits mailing list