[LLVMdev] Value Propagation pass and memory use

Joerg Sonnenberger joerg at britannica.bec.de
Fri Dec 12 05:16:51 PST 2014


Hi all,
for various reasons, I am limiting clang during builds in pkgsrc to 2GB
address space. Given that e.g. ARM boards typically have only 1 or 2GB,
that's a very practical limit. There are a number of builds that fail
because clang hits that limit and for the majority, they all fail in the
Value Propagation pass. I'd like to have an option for more selectively
dealing with this -- -O0 is a very blunt hammer.

(a) Is it possible to restrict the memory use and the associated CPU
time use at least for -O2? The problematic cases also tend to be very
slow, 5min+ builds are seen on a E3 Xeon.

(b) Add an internal flag and go with -mllvm -disable-value-propagation.
This is a relatively small patch, but I dislike the dependency on the
implementation details.

(c) Add a proper flag for clang and associated PM option.

Joerg



More information about the llvm-dev mailing list