- Jul 01, 2014
-
-
David Majnemer authored
llvm-svn: 212078
-
Gerolf Hoflehner authored
Inlining functions with block addresses can cause many problem and requires a rich infrastructure to support including escape analysis. At this point the safest approach to address these problems is by blocking inlining from happening. Background: There have been reports on Ruby segmentation faults triggered by inlining functions with block addresses like //Ruby code snippet vm_exec_core() { finish_insn_seq_0 = &&INSN_LABEL_finish; INSN_LABEL_finish: ; } This kind of scenario can also happen when LLVM picks a subset of blocks for inlining, which is the case with the actual code in the Ruby environment. LLVM suppresses inlining for such functions when there is an indirect branch. The attached patch does so even when there is no indirect branch. Note that user code like above would not make much sense: using the global for jumping across function boundaries would be illegal. Why was there a segfault: In the snipped above the block with the label is recognized as dead So it is eliminated. Instead of a block address the cloner stores a constant (sic!) into the global resulting in the segfault (when the global is used in a goto). Why had it worked in the past then: By luck. In older versions vm_exec_core was also inlined but the label address used was the block label address in vm_exec_core. So the global jump ended up in the original function rather than in the caller which accidentally happened to work. Test case ./tools/clang/test/CodeGen/indirect-goto.c will fail as a result of this commit. rdar://17245966 llvm-svn: 212077 -
Zachary Turner authored
With _HAS_EXCEPTIONS=0, Windows' version of <thread> will fail to compile because it calls __uncaught_exception(), which is compiled out due to _HAS_EXCEPTIONS=0. This just creates a stub version of __uncaught_exception() which always fails. llvm-svn: 212076
-
Duncan P. N. Exon Smith authored
In r212073 I missed a call of `use_begin()` that assumed the wrong semantics. It's not clear to me at all what this code does without the fix, so I'm not sure how to write a testcase. llvm-svn: 212075
-
Todd Fiala authored
Also moves NativeRegisterContextLinux* files into the Linux directory. These, like NativeProcessLinux, should only be built on Linux or a cross compiler with proper headers. llvm-svn: 212074
-
Duncan P. N. Exon Smith authored
AArch64AddressTypePromotion was doing nothing because it was using the old semantics of `Use` and `uses()`, when it really wanted to get at the `users()`. llvm-svn: 212073
-
Nick Kledzik authored
llvm-svn: 212072
-
Alexey Samsonov authored
llvm-svn: 212071
-
Marshall Clow authored
Fix libc++ bug #20039: 'Constructing std::function from empty compatible std::function results in half-empty state' Thanks to Agustin Berge for the report, and for his and Eric Fiselier's work on a fix. llvm-svn: 212070
-
Todd Fiala authored
This change brings in lldb-gdbserver (llgs) specifically for Linux x86_64. (More architectures coming soon). Not every debugserver option is covered yet. Currently the lldb-gdbserver command line can start unattached, start attached to a pid (process-name attach not supported yet), or accept lldb attaching and launching a process or connecting by process id. The history of this large change can be found here: https://github.com/tfiala/lldb/tree/dev-tfiala-native-protocol-linux-x86_64 Until mid/late April, I was not sharing the work and continued to rebase it off of head (developed via id tfiala@google.com). I switched over to user todd.fiala@gmail.com in the middle, and once I went to github, I did merges rather than rebasing so I could share with others. llvm-svn: 212069
-
Nick Kledzik authored
llvm-svn: 212068
-
Reid Kleckner authored
Surprisingly, the i32* byval parameter is not transformed by argpromotion. llvm-svn: 212067
-
Ehsan Akhgari authored
llvm-svn: 212066
-
David Blaikie authored
DebugInfo: Preserve debug location information when transforming a call into an invoke during inlining. This both improves basic debug info quality, but also fixes a larger hole whenever we inline a call/invoke without a location (debug info for the entire inlining is lost and other badness that the debug info emission code is currently working around but shouldn't have to). llvm-svn: 212065
-
Alexey Samsonov authored
It used to be a feature of UBSan (it could sanitize a standalone shared object instead of the whole program), but now it causes more problems, like PR20165. llvm-svn: 212064
-
David Blaikie authored
llvm-svn: 212063
-
Reid Kleckner authored
MSVC was warning on a switch containing only default labels. In this instance, it looks like it uncovered a real bug. :) llvm-svn: 212062
-
Reid Kleckner authored
This probably isn't necessary since msan started to unpoison the return value shadow memory before all calls. llvm-svn: 212061
-
Ben Langmuir authored
Add module dependencies (header files, module map files) to the list of files to check when deciding whether to rebuild a preamble. That fixes using preambles with module imports so long as they are in non-overridden files. My intent is to use to unify the existing dependency collectors to the new “DependencyCollectory” interface from this commit, starting with the DependencyFileGenerator. llvm-svn: 212060
-
Ed Maste authored
This is a test for the fix in r211904. Differential Revision: http://reviews.llvm.org/D4349 llvm-svn: 212059
-
Ehsan Akhgari authored
llvm-svn: 212058
-
Ehsan Akhgari authored
Refactor the code in clang to find a file in a PATH like environment variable into a helper function llvm-svn: 212057
-
Alp Toker authored
llvm-svn: 212056
-
Alp Toker authored
Some versions of Android don't have futimes/futimens and this code wasn't updated during the recent errc refactoring. Patch by Luqman Aden! llvm-svn: 212055
-
Kevin Enderby authored
universal file. This also includes support for -arch all, selecting the host architecture by default from a universal file and checking if -arch is used with a standard Mach-O it matches that architecture. llvm-svn: 212054
-
Andrea Di Biagio authored
This patch adds intrinsic __rdpmc to header file 'ia32intrin.h'. Intrinsic __rdmpc can be used to read performance monitoring counters. It is implemented as a direct call to __builtin_ia32_rdpmc. It takes as input a value representing the index of the performance counter to read. The value of the performance counter is then returned as a unsigned 64-bit quantity. llvm-svn: 212053
-
Matt Arsenault authored
llvm-svn: 212052
-
Matt Arsenault authored
llvm-svn: 212051
-
Adrian Prantl authored
separate MDNode so they can be uniqued via folding set magic. To conserve space, DIVariable nodes are still variable-length, with the last two fields being optional. No functional change. http://reviews.llvm.org/D3526 llvm-svn: 212050
-
Andrea Di Biagio authored
This patch adds support for a new builtin instruction called __builtin_ia32_rdpmc. Builtin '__builtin_ia32_rdpmc' is defined as a 'GCC builtin'; on X86, it can be used to read performance monitoring counters. It takes as input the index of the performance counter to read, and returns the value of the specified performance counter as a 64-bit number. Calls to this new builtin will map to instruction RDPMC. The index in input to the builtin call is moved to register %ECX. The result of the builtin call is the value of the specified performance counter (RDPMC would return that quantity in registers RDX:RAX). This patch: - Adds builtin int_x86_rdpmc as a GCCBuiltin; - Adds a new x86 DAG node called 'RDPMC_DAG'; - Teaches how to lower this new builtin; - Adds an ISel pattern to select instruction RDPMC; - Fixes the definition of instruction RDPMC adding %RAX and %RDX as implicit definitions, and adding %ECX as implicit use; - Adds a LLVM test to verify that the new builtin is correctly selected. llvm-svn: 212049
-
Peter Zotov authored
llvm-svn: 212048
-
Ben Langmuir authored
llvm-svn: 212047
-
- Jun 30, 2014
-
-
Marshall Clow authored
Fix a typo in the noexcept calculation for __compressed_pair::swap. Thanks to EricWF for the bug report and the fix. llvm-svn: 212046
-
Chad Rosier authored
PR20109 llvm-svn: 212045
-
Chad Rosier authored
The combine for mul x, pow2 +/- 1 is unchanged. Test cases for both combines as well as mul x, pow2 have been added as well. llvm-svn: 212044
-
Tim Northover authored
I want to check them in lld. llvm-svn: 212043
-
Alexander Kornienko authored
Initialize ClangTidyMessage::FileOffset field to avoid unitialized variable access when sorting errors on output. llvm-svn: 212042
-
Daniel Jasper authored
Before: string // break operator()() & {} After: string // break operator()() & {} llvm-svn: 212041 -
Daniel Jasper authored
Upon encountering a binary operator inside parentheses, assume that the parentheses contain an expression. Before: MACRO('0' <= c&& c <= '9'); After: MACRO('0' <= c && c <= '9'); llvm-svn: 212040 -
Aaron Ballman authored
llvm-svn: 212039
-