- Feb 11, 2017
-
-
Benjamin Kramer authored
This is necessary to avoid warnings from GCC. InstCombineLoadStoreAlloca.cpp:238:7: error: 'PointerReplacer' declared with greater visibility than the type of its field 'PointerReplacer::IC' llvm-svn: 294794
-
Kostya Serebryany authored
Summary: GET_CALLER_PC doesn't work properly on 31-bit s390, as pointers are 31-bit, the MSB bit can be set when the return address is copied into integer. This causes e.g. errors like: #0 0xfdadb129 (<unknown module>) #1 0x7da5e1d1 in __asan::GetStackTraceWithPcBpAndContext(__sanitizer::BufferedStackTrace*, unsigned long, unsigned long, unsigned long, void*, bool) ../../../../../libsanitizer/asan/asan_stack.h:50 #2 0x7da5e1d1 in __asan::ErrorGeneric::Print() ../../../../../libsanitizer/asan/asan_errors.cc:482 #3 0x7db178d5 in __asan::ErrorDescription::Print() ../../../../../libsanitizer/asan/asan_errors.h:360 #4 0x7db178d5 in __asan::ScopedInErrorReport::~ScopedInErrorReport() ../../../../../libsanitizer/asan/asan_report.cc:167 #5 0x7db178d5 in __asan::ReportGenericError(unsigned long, unsigned long, unsigned long, unsigned long, bool, unsigned long, unsigned int, bool) ../../../../../libsanitizer/asan/asan_report.cc:397 #6 0x7dadb14f in __interceptor_memcmp ../../../../../libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:626 #7 0x400cf5 in main /home/jakub/gcc/gcc/testsuite/c-c++-common/asan/memcmp-1.c:14 #8 0x7d807215 in __libc_start_main (/lib/libc.so.6+0x1a215) #9 0x4007ed (/home/jakub/gcc/obj/gcc/testsuite/memcmp-1.exe+0x4007ed) The actual return PC inside __interceptor_memcmp was 0x7dadb129 rather than 0xfdadb129. Reviewers: koriakin, kcc Reviewed By: kcc Subscribers: kubamracek Differential Revision: https://reviews.llvm.org/D29824 llvm-svn: 294793 -
Davide Italiano authored
This makes this code much more similar to what ThinLTO is using (also API wise), so now we can probably use a single code path instead of copying stuff around. llvm-svn: 294792
-
Benjamin Kramer authored
llvm-svn: 294791
-
Kostya Serebryany authored
Summary: Symbol __tls_get_addr_internal is a GLIBC_PRIVATE private symbol on s390{,x}, the glibc folks aren't very happy about asan using it. Additionally, only recent glibc versions have it, older versions just have __tls_get_offset and nothing else. The patch doesn't drop the __tls_get_addr_internal interception altogether, but changes it so that it calls real __tls_get_offset function instead (and much more importantly, that __tls_get_offset interception calls the real __tls_get_offset function). This way it should work also on glibc 2.18 and earlier. See http://gcc.gnu.org/PR79341 for further details. Reviewers: kcc, koriakin Reviewed By: kcc, koriakin Subscribers: kubamracek, mehdi_amini Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D29735 llvm-svn: 294790 -
Davide Italiano authored
Same as r294784, but for regular LTO. llvm-svn: 294789
-
Benjamin Kramer authored
llvm-svn: 294788
-
Nico Weber authored
llvm-svn: 294787
-
Yaxun Liu authored
For function-scope variables with large initialisation list, FE usually generates a global variable to hold the initializer, then generates memcpy intrinsic to initialize the alloca. InstCombiner::visitAllocaInst identifies such allocas which are accessed only by reading and replaces them with the global variable. This is done by casting the global variable to the type of the alloca and replacing all references. However, when the global variable is in a different address space which is disjoint with addr space 0 (e.g. for IR generated from OpenCL, global variable cannot be in private addr space i.e. addr space 0), casting the global variable to addr space 0 results in invalid IR for certain targets (e.g. amdgpu). To fix this issue, when the global variable is not in addr space 0, instead of casting it to addr space 0, this patch chases down the uses of alloca until reaching the load instructions, then replaces load from alloca with load from the global variable. If during the chasing bitcast and GEP are encountered, new bitcast and GEP based on the global variable are generated and used in the load instructions. Differential Revision: https://reviews.llvm.org/D27283 llvm-svn: 294786
-
Richard Smith authored
It's actually meaningful and useful to allow such variables to have no initializer, but we are strictly following the standard here until the C++ committee reaches consensus on allowing this. llvm-svn: 294785
-
Davide Italiano authored
The yaml emitter files are left around otherwise. llvm-svn: 294784
-
Tim Shen authored
llvm-svn: 294783
-
Dehao Chen authored
Summary: This patch starts the implementation as discuss in the following RFC: http://lists.llvm.org/pipermail/llvm-dev/2016-October/106532.html When optimization duplicates code that will scale down the execution count of a basic block, we will record the duplication factor as part of discriminator so that the offline process tool can find the duplication factor and collect the accurate execution frequency of the corresponding source code. Two important optimization that fall into this category is loop vectorization and loop unroll. This patch records the duplication factor for these 2 optimizations. The recording will be guarded by a flag encode-duplication-in-discriminators, which is off by default. Reviewers: probinson, aprantl, davidxl, hfinkel, echristo Reviewed By: hfinkel Subscribers: mehdi_amini, anemet, mzolotukhin, llvm-commits Differential Revision: https://reviews.llvm.org/D26420 llvm-svn: 294782
-
Tim Shen authored
Summary: powerpc64 big-endian is not supported, but I believe that most logic can be shared, except for xray_powerpc64.cc. Also add a function InvalidateInstructionCache to xray_util.h, which is copied from llvm/Support/Memory.cpp. I'm not sure if I need to add a unittest, and I don't know how. Reviewers: dberris, echristo, iteratee, kbarton, hfinkel Subscribers: mehdi_amini, nemanjai, mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D29742 llvm-svn: 294781
-
Marshall Clow authored
llvm-svn: 294779
-
Richard Smith authored
llvm-svn: 294778
-
Tim Shen authored
Summary: The implementation, however, is in different arch-specific files, unless it's emulated. Reviewers: dberris, pelikan, javed.absar Subscribers: aemerson, llvm-commits Differential Revision: https://reviews.llvm.org/D29796 llvm-svn: 294777
-
Rafael Espindola authored
The values being tested were not relevant to the test. llvm-svn: 294776
-
Krzysztof Parzyszek authored
llvm-svn: 294775
-
Ahmed Bougacha authored
Since r274013, we've been looking through bitcasts on broadcast inputs. In the scalar-folding case (from a load, build_vector, or sc2vec), the input type didn't matter, as we'd simply bitcast the resulting scalar back. However, when broadcasting a 128-bit-lane-aligned element, we create an EXTRACT_SUBVECTOR. Use proper types, by creating an extract_subvector of the original input type. llvm-svn: 294774
-
Richard Smith authored
[c++1z] Disallow deduction guides with deduced types that don't syntactically match the template being deduced. llvm-svn: 294773
-
Nico Weber authored
llvm-svn: 294772
-
Kevin Enderby authored
in this case for CPU_SUBTYPE_ARM64_ALL. For this cpusubtype it should default to a cyclone CPU to give proper disassembly without a -mcpu= flag. rdar://27767188 llvm-svn: 294771
-
Tim Northover authored
We don't use them yet and they just cause problems. llvm-svn: 294770
-
Marcos Pividori authored
Differential revision: https://reviews.llvm.org/D29831 llvm-svn: 294769
-
Chris Bieneman authored
In r294767, I added these dependencies in the wrong place. llvm-svn: 294768
-
Chris Bieneman authored
llvm-svn: 294767
-
Simon Pilgrim authored
AVX512 does have vector rotate instructions, but we don't lower to them yet llvm-svn: 294766
-
Amaury Sechet authored
llvm-svn: 294765
-
Amaury Sechet authored
llvm-svn: 294764
-
Chris Bieneman authored
llvm-svn: 294763
-
John Brawn authored
In the encoding of system registers in the M-class MSR instruction the mask bits should be 2 for registers that don't take a _<bits> qualifier (the instruction is unpredictable otherwise), and should also be 2 if the register takes a _<bits> qualifier but it's not present as no _<bits> is an alias for _nzcvq. Differential Revision: https://reviews.llvm.org/D29828 llvm-svn: 294762
-
Amaury Sechet authored
llvm-svn: 294761
-
Benjamin Kramer authored
This is just as easy to check from main but prevents random code from shutting down the server. llvm-svn: 294760
-
Mehdi Amini authored
Thanks Davide to catch it in my previous patch. llvm-svn: 294759
-
Hans Wennborg authored
It's not supported, and currently breaks the weekly LLVM snapshot builds. Differential Revision: https://reviews.llvm.org/D29801 llvm-svn: 294758
-
Alexander Kornienko authored
lib/Target/X86/X86TargetMachine.cpp has a code that deletes an instance of a LegalizerInfo descendant via a pointer to base. llvm-svn: 294757
-
Amaury Sechet authored
llvm-svn: 294756
-
Matthew Simpson authored
We previously only created a vector phi node for an induction variable if its type matched the type of the canonical induction variable. Differential Revision: https://reviews.llvm.org/D29776 llvm-svn: 294755
-
- Feb 10, 2017
-
-
Joey Gouly authored
Expose the half type (fp16) through libclang and the python bindings. It seems CXType_LastBuiltin was not updated in b2ea6d9 ("Enable support for __float128 in Clang", 2016-04-13), so update it now. Add an Index test for OpenCL types; in the future we will add other OpenCL types such as images to this test. Patch by Sven van Haastregt. Differential Revision: https://reviews.llvm.org/D29718 llvm-svn: 294754
-