<p dir="ltr">Hm? What were the other (unrelated) failures?</p>
<br><div class="gmail_quote">ср, 18 февр. 2015, 1:43, Reid Kleckner <<a href="mailto:rnk@google.com">rnk@google.com</a>>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Should be fixed in r229575. It took me a while to clear up the other unrelated check-asan failures on my system.</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 6, 2015 at 8:11 AM, Timur Iskhodzhanov <span dir="ltr"><<a href="mailto:timurrrr@google.com" target="_blank">timurrrr@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">ping<br></div><br><div class="gmail_quote">Thu Feb 05 2015 at 4:53:30 PM, Timur Iskhodzhanov <<a href="mailto:timurrrr@google.com" target="_blank">timurrrr@google.com</a>>:<div><div><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Interesting: this has broken down the dll_noreturn ASan tests (run as part of check-asan and check-asan-dynamic), which uses -O0 (yes, o-zero).<div>Can you please make sure this doesn't affect -O0?<br><br></div></div><br><div class="gmail_quote">On Thu Feb 05 2015 at 2:52:57 AM Reid Kleckner <<a href="mailto:reid@kleckner.net" target="_blank">reid@kleckner.net</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: rnk<br>
Date: Wed Feb 4 17:45:07 2015<br>
New Revision: 228236<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=228236&view=rev" target="_blank">http://llvm.org/viewvc/llvm-<u></u>pr<u></u>oject?rev=228236&view=rev</a><br>
Log:<br>
Driver: Stop forcing frame pointer usage on Windows<br>
<br>
Previously, we would use a frame pointer by default on non-Linux OSs. On<br>
Linux, any optimization flags imply -fomit-frame-pointer. XCore always<br>
defaulted to -fomit-frame-pointer.<br>
<br>
Now x86 Windows matches our behavior on Linux. All other ISAs supported<br>
by Windows (ARM, x64) use xdata information, and frame pointers aren't<br>
useful. Frame pointers are now off by default for such targets, but can<br>
be forced via -fno-omit-frame-pointer and code using alloca().<br>
<br>
In fact, on Win64 our frame-pointer prologue is not describable with<br>
UNWIND_INFO. This change is a workaround to avoid using the broken FP<br>
using prologue for most functions. This is PR22467.<br>
<br>
Modified:<br>
cfe/trunk/lib/Driver/Tools.cpp<br>
<br>
Modified: cfe/trunk/lib/Driver/Tools.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=228236&r1=228235&r2=228236&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>pr<u></u>oject/cfe/trunk/lib/Driver/<u></u>Too<u></u>ls.cpp?rev=228236&r1=<u></u>228235&<u></u>r2=228236&view=diff</a><br>
==============================<u></u><u></u>==============================<u></u><u></u>==================<br>
--- cfe/trunk/lib/Driver/Tools.cpp (original)<br>
+++ cfe/trunk/lib/Driver/Tools.cpp Wed Feb 4 17:45:07 2015<br>
@@ -2288,27 +2288,49 @@ static bool addSanitizerRuntimes(const T<br>
return !StaticRuntimes.empty();<br>
}<br>
<br>
+static bool areOptimizationsEnabled(const ArgList &Args) {<br>
+ // Find the last -O arg and see if it is non-zero.<br>
+ if (Arg *A = Args.getLastArg(options::OPT_<u></u>O<u></u>_Group))<br>
+ return !A->getOption().matches(<u></u>option<u></u>s::OPT_O0);<br>
+ // Defaults to -O0.<br>
+ return false;<br>
+}<br>
+<br>
static bool shouldUseFramePointerForTarget<u></u><u></u>(const ArgList &Args,<br>
const llvm::Triple &Triple) {<br>
- switch (Triple.getArch()) {<br>
- // Don't use a frame pointer on linux if optimizing for certain targets.<br>
- case llvm::Triple::mips64:<br>
- case llvm::Triple::mips64el:<br>
- case llvm::Triple::mips:<br>
- case llvm::Triple::mipsel:<br>
- case llvm::Triple::systemz:<br>
- case llvm::Triple::x86:<br>
- case llvm::Triple::x86_64:<br>
- if (Triple.isOSLinux())<br>
- if (Arg *A = Args.getLastArg(options::OPT_<u></u>O<u></u>_Group))<br>
- if (!A->getOption().matches(<u></u>optio<u></u>ns::OPT_O0))<br>
- return false;<br>
- return true;<br>
- case llvm::Triple::xcore:<br>
+ // XCore never wants frame pointers, regardless of OS.<br>
+ if (Triple.getArch() == llvm::Triple::xcore) {<br>
return false;<br>
- default:<br>
- return true;<br>
}<br>
+<br>
+ if (Triple.isOSLinux()) {<br>
+ switch (Triple.getArch()) {<br>
+ // Don't use a frame pointer on linux if optimizing for certain targets.<br>
+ case llvm::Triple::mips64:<br>
+ case llvm::Triple::mips64el:<br>
+ case llvm::Triple::mips:<br>
+ case llvm::Triple::mipsel:<br>
+ case llvm::Triple::systemz:<br>
+ case llvm::Triple::x86:<br>
+ case llvm::Triple::x86_64:<br>
+ return !areOptimizationsEnabled(Args)<u></u><u></u>;<br>
+ default:<br>
+ return true;<br>
+ }<br>
+ }<br>
+<br>
+ if (Triple.isOSWindows()) {<br>
+ switch (Triple.getArch()) {<br>
+ case llvm::Triple::x86:<br>
+ return !areOptimizationsEnabled(Args)<u></u><u></u>;<br>
+ default:<br>
+ // All other supported Windows ISAs use xdata unwind information, so frame<br>
+ // pointers are not generally useful.<br>
+ return false;<br>
+ }<br>
+ }<br>
+<br>
+ return true;<br>
}<br>
<br>
static bool shouldUseFramePointer(const ArgList &Args,<br>
<br>
<br>
______________________________<u></u><u></u>_________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailm<u></u>an/listinfo/cfe-commits</a><br>
</blockquote></div></blockquote></div></div></div>
<br>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div>
</blockquote></div>