- Jun 06, 2017
-
-
Davide Italiano authored
Running `llc -verify-dom-info` on the attached testcase results in a crash in the verifier, due to a stale dominator tree. i.e. DominatorTree is not up to date! Computed: =============================-------------------------------- Inorder Dominator Tree: [1] %safe_mod_func_uint8_t_u_u.exit.i.i.i {0,7} [2] %lor.lhs.false.i61.i.i.i {1,2} [2] %safe_mod_func_int8_t_s_s.exit.i.i.i {3,6} [3] %safe_div_func_int64_t_s_s.exit66.i.i.i {4,5} Actual: =============================-------------------------------- Inorder Dominator Tree: [1] %safe_mod_func_uint8_t_u_u.exit.i.i.i {0,9} [2] %lor.lhs.false.i61.i.i.i {1,2} [2] %safe_mod_func_int8_t_s_s.exit.i.i.i {3,8} [3] %safe_div_func_int64_t_s_s.exit66.i.i.i {4,5} [3] %safe_mod_func_int8_t_s_s.exit.i.i.i.lor.lhs.false.i61.i.i.i_crit_edge {6,7} This is because in `SelectionDAGIsel` we split critical edges without updating the corresponding dominator for the function (and we claim in `MachineFunctionPass::getAnalysisUsage()` that the domtree is preserved). We could either stop preserving the domtree in `getAnalysisUsage` or tell `splitCriticalEdge()` to update it. As the second option is easy to implement, that's the one I chose. Differential Revision: https://reviews.llvm.org/D33800 llvm-svn: 304742
-
Zachary Turner authored
We should be outputting in little endian, but we were writing in host endianness. llvm-svn: 304741
-
Richard Smith authored
When giving a ContentCache a null buffer, ignore the DoNotFree flag rather than inheriting it onto whatever buffer we end up using for the file. Also ensure that the main buffer is properly destroyed. llvm-svn: 304740
-
- Jun 05, 2017
-
-
Saleem Abdulrasool authored
Add a x86-registered-target requirement to the tests. llvm-svn: 304739
-
Zachary Turner authored
While it's not entirely clear why a compiler or linker might put this information into an object or PDB file, one has been spotted in the wild which was causing llvm-pdbdump to crash. This patch adds support for reading-writing these sections. Since I don't know how to get one of the native tools to generate this kind of debug info, the only test here is one in which we feed YAML into the tool to produce a PDB and then spit out YAML from the resulting PDB and make sure that it matches. llvm-svn: 304738
-
Konstantin Zhuravlyov authored
Differential Revision: https://reviews.llvm.org/D33689 llvm-svn: 304737
-
Saleem Abdulrasool authored
This ensures that we can emit the ObjC Image Info structure on COFF and ELF as well. The frontend already would attempt to emit this information but would get dropped when generating assembly or an object file. llvm-svn: 304736
-
Evgeniy Stepanov authored
r304285 - [sanitizer] Avoid possible deadlock in child process after fork r304297 - [sanitizer] Trying to fix MAC buildbots after r304285 These changes create deadlock when Tcl calls pthread_create from a pthread_atfork child handler. More info in the original review at https://reviews.llvm.org/D33325 llvm-svn: 304735
-
Konstantin Zhuravlyov authored
Differential Revision: https://reviews.llvm.org/D33691 llvm-svn: 304734
-
Craig Topper authored
Truncate currently uses a udivrem call which is going to be slow particularly for larger than 64-bit widths. As far as I can tell all we were trying to do was modulo LowerDiv by (MaxValue+1) and make sure whatever value was effectively subtracted from LowerDiv was also subtracted from UpperDiv. This patch recognizes that MaxValue+1 is a power of 2 so we can just use a bitwise AND to accomplish a modulo operation or isolate the upper bits. Differential Revision: https://reviews.llvm.org/D32672 llvm-svn: 304733
-
Petr Hosek authored
Traditionally, it has been defined in crtbegin.o, which is typically provided by libgcc or as part of the C library on some systems. However, but there's no principled reason for it to be there. We optionaly define this symbol, which can be used on platforms that don't provide __dso_handle in crtbegin.o or which don't use crtbegin.o at all. Differential Revision: https://reviews.llvm.org/D33856 llvm-svn: 304732
-
Alex Shlyapnikov authored
Summary: halt_on_error-torture.cc intermittently fails on ppc64be, let's try to collect more info on failures. Reviewers: eugenis Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D33912 llvm-svn: 304731
-
Casey Carter authored
Was VSO#109062. This bug was filed *4 years ago*. I submitted a workaround to enable the scoped_allocator_adaptor tests to pass. Bug fixed a week and a half later. This was either a waste of my time, or I've discovered that libc++ has magical bugfix-inducing powers. My money's on the latter. llvm-svn: 304730
-
Mark Searles authored
Differential Revision: https://reviews.llvm.org/D33907 llvm-svn: 304729
-
Richard Smith authored
Inspired by post-commit review of r304190. llvm-svn: 304728
-
Richard Smith authored
Attempt to fix Windows buildbot failure due to mismatching directory separators in preprocessed output. llvm-svn: 304727
-
Richard Smith authored
replay the steps taken to create the AST file with the preprocessor-only action installed to produce preprocessed output. This can be used to produce the preprocessed text for an existing .pch or .pcm file. llvm-svn: 304726
-
Stephane Sezer authored
Summary: Don't access `name[1] if the string is only of length 1. Avoids a crash/assertion failure when parsing the string `-`. Test Plan: Debug a swift binary, set a breakpoint, watch lldb not crash Original change by Paul Menage <menage@fb.com> Reviewers: lldb-commits, clayborg Differential Revision: https://reviews.llvm.org/D33853 llvm-svn: 304725
-
Andrey Churbanov authored
schedule(simd:runtime) - library part. Compiler generation should use newly introduced scheduling kinds kmp_sch_guided_simd = 46, kmp_sch_runtime_simd = 47, as parameters to __kmpc_dispatch_init_* entries. Differential Revision: https://reviews.llvm.org/D31602 llvm-svn: 304724
-
Sanjay Patel authored
Other calls to DAGCombiner::*PromoteOperand check the result, but here it could cause an assertion in getNode. Falling back to any extend in this case instead of failing outright seems correct to me. No test case because: The failure was triggered by an out of tree backend. In order to trigger it, a backend would need to overload TargetLowering::IsDesirableToPromoteOp to return true for a type for which ISD::SIGN_EXTEND_INREG is marked illegal. In tree, only X86 overloads and sometimes returns true for MVT::i16 yet it marks setOperationAction(ISD::SIGN_EXTEND_INREG, MVT::i16 , Legal);. Patch by Jacob Young! Differential Revision: https://reviews.llvm.org/D33633 llvm-svn: 304723
-
Simon Pilgrim authored
Missed SSE41 non-temporal load case in previous commit Differential Revision: https://reviews.llvm.org/D33728 llvm-svn: 304722
-
Adam Nemet authored
This removes a quadratic behavior in assert-enabled builds. GVN propagates the equivalence from a condition into the blocks guarded by the condition. E.g. for 'if (a == 7) { ... }', 'a' will be replaced in the block with 7. It does this by replacing all the uses of 'a' that are dominated by the true edge. For a switch with N cases and U uses of the value, this will mean N * U calls to 'dominates'. Asserting isSingleEdge in 'dominates' make this N^2 * U because this function checks for the uniqueness of the edge. I.e. traverses each edge between the SwitchInst's block and the cases. The change removes the assert and makes 'dominates' works correctly in the presence of non-unique edges. This brings build time down by an order of magnitude for an input that has ~10k cases in a switch statement. Differential Revision: https://reviews.llvm.org/D33584 llvm-svn: 304721
-
Frederich Munch authored
Summary: Matches C++ destruction ordering better and fixes possible problems of loaded libraries having inter-dependencies. Reviewers: efriedma, v.g.vassilev, chapuni Reviewed By: efriedma Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D33652 llvm-svn: 304720
-
Dmitry Mikulin authored
procedural optimizations to prevent dropping symbols and allow the linker to process re-directs. PR33145: --wrap doesn't work with lto. Differential Revision: https://reviews.llvm.org/D33621 llvm-svn: 304719
-
Simon Pilgrim authored
Differential Revision: https://reviews.llvm.org/D33728 llvm-svn: 304718
-
Simon Pilgrim authored
Differential Revision: https://reviews.llvm.org/D33728 llvm-svn: 304717
-
Tim Northover authored
Monorepo version! llvm-svn: 304716
-
Michal Gorny authored
The baremetal test (r303873) has been added with expectance of very specific -resource-dir. However, the test itself nor the BareMetal driver does not enforce any specific -resource-dir, making this constraint invalid. It already has been altered twice -- in r303910 for Windows compatibility, and in r304085 for systems using lib64. To account for even more systems, just use [[RESOURCE_DIR]] like a number of other tests do. This is needed for Gentoo where RESOURCE_DIR starts with ../ (uses relative path to a parent directory). Differential Revision: https://reviews.llvm.org/D33877 llvm-svn: 304715
-
Dimitry Andric authored
Summary: Since LLVM_NATIVE_ARCH, LLVM_NATIVE_ASMPARSER, LLVM_NATIVE_ASMPRINTER, LLVM_NATIVE_DISASSEMBLER, LLVM_NATIVE_TARGET, LLVM_NATIVE_TARGETINFO and LLVM_NATIVE_TARGETMC are already defined in llvm-config.h, there seems to be no reason to also define them in config.h. Also, I can only find usage of these macros in files that include llvm-config.h. So let's remove the duplicated macros from config.h. Reviewers: chandlerc, rnk, mehdi_amini, joerg Reviewed By: rnk Subscribers: chapuni, mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D33881 llvm-svn: 304714
-
Artem Dergachev authored
In plist output mode with alternate path diagnostics, when entering a function, we draw an arrow from the caller to the beginning of the callee's declaration. Upon exiting, however, we draw the arrow from the last statement in the callee function. The former makes little sense when the declaration is not a definition, i.e. has no body, which may happen in case the body is coming from a body farm, eg. Objective-C autosynthesized property accessor. Differential Revision: https://reviews.llvm.org/D33671 llvm-svn: 304713
-
Diana Picus authored
When lowering calls, we generate instructions with machine opcodes rather than generic ones. Therefore, we need to constrain the register classes of the operands. Also enable the machine verifier on the arm-irtranslator.ll test, since that would've caught this issue. Fixes (part of) PR32146. llvm-svn: 304712
-
George Rimar authored
This is PR33289. Previously LLD leaved section naming as is and that lead to wrong result, because we decompress sections when using -r, and hence should remove ".z" prefix. Differential revision: https://reviews.llvm.org/D33885 llvm-svn: 304711
-
Artem Dergachev authored
Nullable-to-nonnull checks used to crash when the custom bug visitor was trying to add its notes to autosynthesized accessors of Objective-C properties. Now we avoid this, mostly automatically outside of checker control, by moving the diagnostic to the parent stack frame where the accessor has been called. Differential revision: https://reviews.llvm.org/D32437 llvm-svn: 304710
-
whitequark authored
The C functions added are LLVMGetNumContainedTypes and LLVMGetSubtypes. The OCaml function added is Llvm.subtypes. Patch by Ekaterina Vaartis. Differential Revision: https://reviews.llvm.org/D33677 llvm-svn: 304709
-
Anastasia Stulova authored
Pipes are now the size of pointers rather than the size of the type that they contain. Patch by Simon Perretta! Differential Revision: https://reviews.llvm.org/D33597 llvm-svn: 304708
-
Dimitry Andric authored
Summary: The workaround added in rL301240 for stderr/out/in symbols being both macros and globals is only necessary for glibc, and it does not compile with musl libc. Alpine Linux has had the following fix for it: https://git.alpinelinux.org/cgit/aports/plain/main/llvm4/llvm-fix-DynamicLibrary-to-build-with-musl-libc.patch Adapt the fix in our DynamicLibrary.inc for Unix. Reviewers: marsupial, chandlerc, krytarowski Reviewed By: krytarowski Subscribers: srhines, krytarowski, llvm-commits Differential Revision: https://reviews.llvm.org/D33883 llvm-svn: 304707
-
Javed Absar authored
Moving ARM specific test clang-section.s from MC/ELF to MC/ELF/ARM Buildbots reported failures on commit https://reviews.llvm.org/rL304705 Full details are available at: http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/10333 llvm-svn: 304706
-
Javed Absar authored
This patch provides a means to specify section-names for global variables, functions and static variables, using #pragma directives. This feature is only defined to work sensibly for ELF targets. One can specify section names as: #pragma clang section bss="myBSS" data="myData" rodata="myRodata" text="myText" One can "unspecify" a section name with empty string e.g. #pragma clang section bss="" data="" text="" rodata="" Reviewers: Roger Ferrer, Jonathan Roelofs, Reid Kleckner Differential Revision: https://reviews.llvm.org/D33412 llvm-svn: 304705
-
Javed Absar authored
This patch provides a means to specify section-names for global variables, functions and static variables, using #pragma directives. This feature is only defined to work sensibly for ELF targets. One can specify section names as: #pragma clang section bss="myBSS" data="myData" rodata="myRodata" text="myText" One can "unspecify" a section name with empty string e.g. #pragma clang section bss="" data="" text="" rodata="" Reviewers: Roger Ferrer, Jonathan Roelofs, Reid Kleckner Differential Revision: https://reviews.llvm.org/D33413 llvm-svn: 304704
-
Peter Smith authored
This change adds a new fixup fixup_t2_so_imm for the t2_so_imm_asmoperand "T2SOImm". The fixup permits code such as: .L1: sub r3, r3, #.L2 - .L1 .L2: to assemble in Thumb2 as well as in ARM state. The operand predicate isT2SOImm() explicitly doesn't match expressions containing :upper16: and :lower16: as expressions with these operators must match the movt and movw instructions. The test mov r0, foo2 in thumb2-diagnostics is moved to a new file as the fixup delays the error message till after the assembler has quit due to the other errors. As the mov instruction shares the t2_so_imm_asmoperand mov instructions with a non constant expression now match t2MOVi rather than t2MOVi16 so the error message is slightly different. Fixes PR28647 Differential Revision: https://reviews.llvm.org/D33492 llvm-svn: 304702
-