- Jul 01, 2014
-
-
Logan Chien authored
This patch removes the dead code, and refines the getEHResumeBlock() slightly. The CleanupHackLevel was a hack to the old exception handling intrinsics, which have several issues with function inliner. Since LLVM 3.0, the new landingpad and resume instructions are added to LLVM IR. With the new exception handling mechanism, most of the issues are fixed now. We should always use these instructions to implement the exception handling code nowadays, and we don't need the hack any more. Besides, the `CleanupHackLevel` is a compile-time constant, thus other cases have been considered as dead code for a while. llvm-svn: 212097
-
Simon Atanasyan authored
command line option only. Internally we convert them to the "o32" and "n64" respectively. So we do not need to refer them anywhere after that conversion. No functional changes. llvm-svn: 212096
-
Alp Toker authored
This was kept around "for compatibility through 2.6" in 2009 and is not used or tested. llvm-svn: 212095
-
Tim Northover authored
llvm-svn: 212094
-
Tim Northover authored
It still needs to be tied into BinaryReader, but this allows reasonably sensible creation of SharedLibrary atoms on MachO. llvm-svn: 212093
-
Gerolf Hoflehner authored
In 32b mode the reference count for block addresses is not zero. This prevents inlining and constant folding and causes the test to fail. Changing the triple allows runnning the test in 64b mode. The array in foo2 is now local instead of static until at lower optimization levels the interprocedural constant propagator is invoked before the global optimizer. llvm-svn: 212092
-
Bob Wilson authored
llvm r212077 causes this test to fail. We need to reorder some passes and possibly make other changes to reenable the optimization being tested here. llvm-svn: 212091
-
Nikola Smiljanic authored
llvm-svn: 212090
-
David Blaikie authored
Revert "DebugInfo: Ensure that all debug location scope chains from instructions within a function, lead to the function itself." This reverts commit r212085. This breaks the sanitizer bot... & I thought I'd tried pretty hard not to do that. Guess I need to try harder. llvm-svn: 212089
-
Andrew Trick authored
Fixes another test case under PR20057. llvm-svn: 212088
-
Alp Toker authored
Update the strategy in r212083 to try JIT first and otherwise fall back to the interpreter. This gives the best of both worlds and still builds fine with no targets enabled. Requires supporting changes from LLVM r212086. llvm-svn: 212087
-
Alp Toker authored
ForceInterpreter=false shouldn't disable the interpreter completely because it can still be necessary to interpret if the target doesn't support JIT. No obvious way to test this in LLVM, but this matches what LLVMCreateExecutionEngineForModule() does and fixes the clang-interpreter example in the clang source tree which uses the ExecutionEngine. llvm-svn: 212086
-
David Blaikie authored
DebugInfo: Ensure that all debug location scope chains from instructions within a function, lead to the function itself. Originally committed in r211723, reverted in r211724 due to failure cases found and fixed (ArgumentPromotion: r211872, Inlining: r212065), and I now believe the invariant actually holds for some reasonable amount of code (but I'll keep an eye on the buildbots and see what happens... ). Original commit message: PR20038: DebugInfo: Inlined call sites where the caller has debug info but the call itself has no debug location. This situation does bad things when inlined, so I've fixed Clang not to produce inlinable call sites without locations when the caller has debug info (in the one case where I could find that this occurred). This updates the PR20038 test case to be what clang now produces, and readds the assertion that had to be removed due to this bug. I've also beefed up the debug info verifier to help diagnose these issues in the future, and I hope to add checks to the inliner to just assert-fail if it encounters this situation. If, in the future, we decide we have to cope with this situation, the right thing to do is probably to just remove all the DebugLocs from the inlined instructions. llvm-svn: 212085
-
Alp Toker authored
Fix the build when no targets are enabled. This dependency is incurred by two unfortunate entries in LinkAllPasses.h included from cc1_main.cpp: llvm::createJumpInstrTablesPass(); llvm::createCodeGenPreparePass(); llvm-svn: 212084
-
Alp Toker authored
Fixes the build when no targets are selected, or no native target is built. This also better matches up with the description/title of the example and demonstrates how clang can be used to run C++ on constrained environments without file IO or executable memory permissions (e.g. iOS apps). A comment is added explaining how to extend the demo with JIT support as needed. llvm-svn: 212083
-
Alexey Samsonov authored
llvm-svn: 212082
-
Reid Kleckner authored
seh_stackalloc 0 is not representable in Win64 SEH info, so emitting it is a bug. Reviewers: rnk Differential Revision: http://reviews.llvm.org/D4334 Patch by Vadim Chugunov! llvm-svn: 212081
-
Johannes Doerfert authored
+ Test case llvm-svn: 212080
-
David Majnemer authored
An alias with an aliasee of a non-zero GEP is not trivially replacable with it's aliasee. llvm-svn: 212079
-
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
-