<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Aug 4, 2016, at 9:48 AM, Chandler Carruth via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_quote"><div dir="ltr" class="">On Thu, Aug 4, 2016 at 9:44 AM Joerg Sonnenberger via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Mon, Aug 01, 2016 at 04:47:49AM +0000, Chandler Carruth via llvm-dev wrote:<br class="">
> Chris added alloca merging in the inliner a looooong time ago, 2009. The<br class="">
> reason he added it was because at the time we didn't do stack coloring and<br class="">
> without it we had serious stack size problems in LLVM.<br class="">
<br class="">
Do we have any way to hunt for stack size regressions? I've been hit by<br class="">
some serious bugs in this area in GCC in the past and I would prefer to<br class="">
not repeat that experience with LLVM.<br class=""></blockquote><div class=""><br class=""></div><div class="">My technique was to log the stack size and build a bunch of code, and then analyze the logs before and after. It seemed really effective though?</div><div class=""><span style="line-height:1.5" class=""><br class=""></span></div><div class=""><span style="line-height:1.5" class="">I also have some tests (sadly internal) that check stacksize is under some bound and those tend to serve is good indicators that something has gone badly wrong. For example, without the Clang tricks at -O0, we couldn't get their tests to pass.</span></div></div></div></div></blockquote></div><br class=""><div class="">Are these “clang tricks” some indications of weaknesses in LLVM on this aspect?</div><div class=""><br class=""></div><div class="">— </div><div class="">Mehdi</div><div class=""><br class=""></div></body></html>