Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: C++ compiler excessive memory usage?
> On Mon, Oct 12, 2026 at 05:54:12PM +0200, Havard Eidnes wrote:
>> The file from 19% to 99% consists of this function which has a
>> single static table inside of it:
>>
>> const uint8_t *RISCVInstructionSelector::getMatchTable() const {
>>
>> constexpr static uint8_t MatchTable0[] = {
>> ....
>> };
>> return MatchTable0;
>> }
>
> Oh *******,
>
> try to patch it like this?
>
> const uint8_t *RISCVInstructionSelector::getMatchTable() const {
> static const uint8_t MatchTable0[] = {
> ....
> };
> return MatchTable0;
> }
>
> Not sure what it buys the other way if the function is not
> declared as constexpr (besides driving the commpiler mad).
It doesn't look too primising, I'm afraid. I'm building the
preprocessed file, patched as above, and "env TERM=dumb top -I |
grep <pid>" is currently showing:
16356 he 83 4 6263M 1881M biowait 17:06 4.88% 4.88% cc1plus
16356 he 82 4 6263M 1882M biowait 17:07 3.52% 3.52% cc1plus
16356 he 83 4 6263M 1883M biowait 17:07 5.86% 5.86% cc1plus
16356 he 83 4 6263M 1880M RUN 17:07 4.88% 4.88% cc1plus
It has yet to complete, and I need to go somewhere else...
Regards,
- Håvard
Home |
Main Index |
Thread Index |
Old Index