Open Quuxplusone opened 8 years ago
So I just made some progress with -frewrite-includes which basically just
includes the includes but leaves all other macros intact. I get results of the
form:
/usr/lib64/gcc/x86_64-suse-linux/4.9/../../../../include/c++/4.9/cstddef:11:1:
remark: loop not vectorized: vectorization is not beneficial and is not
explicitly forced
[-Rpass-analysis=loop-vectorize]
// This library is distributed in the hope that it will be useful,
^
/usr/lib64/gcc/x86_64-suse-linux/4.9/../../../../include/c++/4.9/cstddef:21:1:
remark: loop not vectorized: vectorization is not beneficial and is not
explicitly forced
[-Rpass-analysis=loop-vectorize]
// a copy of the GCC Runtime Library Exception along with this program;
So with the fully preprocessed file using -frewrite-includes i get the error at
least twice, but i also get a lot of
note: could not determine the original source location for ...
is there a way to fix them in the preprocessed file? The whole source code is
within that file but there is a lot of noise:
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 123 "/usr/lib64/gcc/x86_64-suse-
linux/4.9/../../../../include/c++/4.9/cstddef" 1 3
// -*- C++ -*- forwarding header.
which might be giving trouble to clang.
I've given up in trying to generate a test case by hand.
@Hal I can add a 400k LOC preprocessed source file that reproduces this issue a couple of times if you want to look into it.
(In reply to comment #3)
> @Hal I can add a 400k LOC preprocessed source file that reproduces this
> issue a couple of times if you want to look into it.
You might want to attach it compressed (I don't recall what the file-size
upload limit is).
Any sort of testcase would be useful, yes. :)
Attached preprocessed.i.lzma
(850602 bytes, application/x-lzma): Preprocessed sources of program that reproduces the errors
preprocessed.i.lzma
(850602 bytes, application/x-lzma)In a nutshell, I have a huge piece of code and was looking at the vectorization analysis from -Rpass-analysis=loop-vectorize which produces a lot of output.
So I went on an ifdefed some large chunk of code out (my program still compiles fine).
I get a couple of warnings by Rpass analysis that some loop cannot be vectorized, but to my surprise it points to a line (and shows the line) within the ifdefed out code.
First thought was, generate the preprocessed sources, delta it, and submit a bug but... since the code is ifdefed out, the error cannot be reproduced from the preprocessed sources.
I've been trying to come up with a minimal example that reproduces it for half an hour without any luck. So this is all I got.