- Apr 08, 2017
-
-
George Rimar authored
Previously we silently produced broken output for R_386_GOT32X/R_386_GOT32 relocations if they were used to compute the address of the symbol’s global offset table entry without base register when position-independent code is disabled. Situation happened because of recent ABI changes. Released ABI mentions that R_386_GOT32X can be calculated in a two different ways (so we did not follow ABI here before this patch), but draft ABI also mentions R_386_GOT32 relocation here. We should use the same calculations for both relocations. Problem is that we always calculated them as G + A - GOT (offset from end of GOT), but for case when PIC is disabled, according to i386 ABI calculation should be G + A, what should produce just an address in GOT finally. ABI: https://github.com/hjl-tools/x86-psABI/wiki/intel386-psABI-draft.pdf (p36, p60). llvm-svn: 299812
-
Craig Topper authored
[IR] Inline Type::getScalarType() by using isVectorTy() and getVectorElementType() that were already available inline. Seems to have very little compiled code size impact. But might give a tiny performance boost. llvm-svn: 299811
-
Balaram Makam authored
This concludes the refinements to Falkor Machine Model. It includes SchedPredicates for immediate zero and LSL Fast. Forwarding logic is also modeled for vector multiply and accumulate only. llvm-svn: 299810
-
Gor Nishanov authored
coro-split-after-phi.ll test was flaky due to non-determinism in the coroutine frame construction that was sorting the spill vector using a pointer to a def as a part of the key. The sorting was intended to make sure that spills for the same def are kept together, however, we populate the vector by processing defs in order, so the spill entires will end up together anyways. This change removes spill sorting and restores the determinism in the test. llvm-svn: 299809
-
Gor Nishanov authored
llvm-svn: 299808
-
Jason Molenda authored
llvm.org/pr32553 and <rdar://problem/30646077> are tracking this. llvm-svn: 299807
-
Evgeniy Stepanov authored
Previously __cfi_check was created in LTO optimization pipeline, which means LLD has no way of knowing about the existence of this symbol without rescanning the LTO output object. As a result, LLD fails to export __cfi_check, even when given --export-dynamic-symbol flag. llvm-svn: 299806
-
Evgeniy Stepanov authored
https://reviews.llvm.org/D31796 will emit a dummy __cfi_check in the frontend. llvm-svn: 299805
-
Evgeniy Stepanov authored
https://reviews.llvm.org/D31796 results in LLD emitting __cfi_check as a weak symbol, while Gold keeps it strong. Accept both. llvm-svn: 299804
-
Eli Friedman authored
BIC is generally faster, and it can put the output in a different register from the input. We already do this in Thumb2 mode; not sure why the equivalent fix never got applied to ARM mode. Differential Revision: https://reviews.llvm.org/D31797 llvm-svn: 299803
-
- Apr 07, 2017
-
-
Aditya Nandakumar authored
The original instruction might get legalized and erased and expanded into intermediate instructions and the intermediate instructions might fail legalization. This end up in reporting GISelFailure on the erased instruction. Instead report GISelFailure on the intermediate instruction which failed legalization. Reviewed by: ab llvm-svn: 299802
-
Craig Topper authored
llvm-svn: 299801
-
Saleem Abdulrasool authored
crtbegin is not really a proper windows support thing. This was duplicated when the toolchain was initially built. If the injection of crtbegin is needed, it can be done via the `/include` directive. Furthermore, since `-fPIC` doesnt make sense on PE/COFF, crtbegin and crtbeginS dont really need to be different. llvm-svn: 299800
-
Petr Hosek authored
When using -ffixed-x18, the x18 (or w18) register can safely be used with the "global register variable" GCC extension, but the backend fails to recognize it. Patch by Roland McGrath. Differential Revision: https://reviews.llvm.org/D31793 llvm-svn: 299799
-
Petr Hosek authored
This reverts commit r299796. llvm-svn: 299798
-
Petr Hosek authored
Since libc++abi is built with -nodefaultlibs, we should be using this option even for CMake checks to avoid any inconsistency and also to avoid dependency on a working C++ standard library just for the setting up the build itself. The implementation is largely similar to the one used by libc++. Differential Revision: https://reviews.llvm.org/D31639 llvm-svn: 299797
-
Petr Hosek authored
Since libunwind is built with -nodefaultlibs, we should be using this option even for CMake checks to avoid any inconsistency and also to avoid dependency on a working C++ standard library just for the setting up the build itself. The implementation is largely similar to the one used by libc++. Differential Revision: https://reviews.llvm.org/D31640 llvm-svn: 299796
-
Reid Kleckner authored
llvm-svn: 299795
-
Rafael Espindola authored
Thanks to Reid Kleckner for the suggestion. llvm-svn: 299794
-
Reid Kleckner authored
Update the expected output to match the current llvm-pdbdump raw output. llvm-svn: 299793
-
Daniel Berlin authored
NewGVN into analysis and eliminator. llvm-svn: 299792
-
Reid Kleckner authored
llvm-svn: 299791
-
Reid Kleckner authored
llvm-svn: 299790
-
Davide Italiano authored
llvm-svn: 299789
-
Simon Dardis authored
This reverts commit r299766. This change appears to have broken the MIPS buildbots. Reverting while I investigate. Revert "[mips] Remove usage of debug only variable (NFC)" This reverts commit r299769. Follow up commit. llvm-svn: 299788
-
Reid Kleckner authored
llvm-svn: 299786
-
Hans Wennborg authored
llvm-svn: 299785
-
Reid Kleckner authored
Avoid __attribute__((constructor)) in cpu_model.c. Use more C99 _Complex emulation in divtc3.c. Joerg Sonnenberger added this builtin just after the last round of C99 _Complex emulation landed in r249514 (Oct 2015). llvm-svn: 299784
-
Kamil Rytarowski authored
Summary: This replaces old code in Host::GetEnvironment for NetBSD with the version from Linux. This makes parsing environment variables correctly. It also fixes programs that depend on the variables like curses(3) applications. Long term this function should be moved to Process Plugin, as currently env variables are not available with remote debugging. Other BSDs might want to catch up after this change. Tested with NetBSD top(1). Sponsored by <The NetBSD Foundation> Reviewers: emaste, labath, joerg, kettenis Reviewed By: emaste Subscribers: #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D31784 llvm-svn: 299783
-
Hans Wennborg authored
It's used by MS headers in VS 2017 without including intrin.h, so we can't implement it in the header anymore. Differential Revision: https://reviews.llvm.org/D31736 llvm-svn: 299782
-
Ed Maste authored
Sync Host:GetEnvironment with Linux and Kamil Rytarowski's forthcoming NetBSD change in review D31784. llvm-svn: 299781
-
Reid Kleckner authored
Many things were broken: - We stopped building most builtins on Windows in r261432 for reasons that are not at all clear to me. This essentially reverts that patch. - Fix %librt to expand to clang_rt.builtins-$arch.lib on Windows instead of libclang_rt.builtins-$arch.a. - Fix memory protection tests (trampoline, enable executable, clear cache) on Windows. One issue was that the MSVC incremental linker generates ILT thunks for functions with external linkage, so memcpying the functions into the executable stack buffer wasn't working. You can't memcpy an RIP-relative jump without fixing up the offset. - Disable tests that rely on C99 complex library functions when using the MSVC CRT, which isn't compatible with clang's C99 _Complex. In theory, these could all be separate patches, but it would not green the tests, so let's try for it all at once. Hopefully this fixes the clang-x64-ninja-win7 bot. llvm-svn: 299780
-
Stanislav Mekhanoshin authored
Increase threshold to unroll a loop which contains an "if" statement whose condition defined by a PHI belonging to the loop. This may help to eliminate if region and potentially even PHI itself, saving on both divergence and registers used for the PHI. Add a small bonus for each of such "if" statements. Differential Revision: https://reviews.llvm.org/D31693 llvm-svn: 299779
-
Rafael Espindola authored
Thanks to Rui for noticing it. llvm-svn: 299777
-
Dehao Chen authored
Summary: PMADDWD can help improve 8/16 bit integer mutliply-add operation performance for cases like: for (int i = 0; i < count; i++) a += x[i] * y[i]; Reviewers: wmi, davidxl, hfinkel, RKSimon, zvi, mkuper Reviewed By: mkuper Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D31679 llvm-svn: 299776
-
Reid Kleckner authored
Both pickling errors encountered on clang bots and Darwin compiler-rt should now be fixed. This has no impact on testing time on Linux, and on Windows goes from 88s to 63s for 'check'. The tests pass on Mac, but I haven't compared execution time. llvm-svn: 299775
-
Saleem Abdulrasool authored
MSDN (https://msdn.microsoft.com/en-us/library/h5w10wxs.aspx) indicates that `__declspec(naked)` is only permitted on x86 and ARM targets. Testing with cl does confirm this behaviour. Provide a warning for use of `__declspec(naked)` on x64. llvm-svn: 299774
-
Simon Atanasyan authored
[ELF] Do not pass GOT section as an argument to handleARMTlsRelocation and handleMipsTlsRelocation functions. NFC Both functions always use the same GOT sections In<ELFT>::Got and In<ELFT>::MipsGot respectively, so we do not need to pass them as an argument. llvm-svn: 299773
-
Igor Breger authored
Summary: [GlobalISel] implement narrowing for G_CONSTANT. Reviewers: bogner, zvi, t.p.northover Reviewed By: t.p.northover Subscribers: llvm-commits, dberris, rovka, kristof.beyls Differential Revision: https://reviews.llvm.org/D31744 llvm-svn: 299772
-
Gor Nishanov authored
Summary: Fix a bug where we were inserting a spill in between the PHIs in the beginning of the block. Consider this fragment: ``` begin: %phi1 = phi i32 [ 0, %entry ], [ 2, %alt ] %phi2 = phi i32 [ 1, %entry ], [ 3, %alt ] %sp1 = call i8 @llvm.coro.suspend(token none, i1 false) switch i8 %sp1, label %suspend [i8 0, label %resume i8 1, label %cleanup] resume: call i32 @print(i32 %phi1) ``` Unless we are spilling the argument or result of the invoke, we were always inserting the spill immediately following the instruction. The fix adds a check that if the spilled instruction is a PHI Node, select an appropriate insert point with `getFirstInsertionPt()` that skips all the PHI Nodes and EH pads. Reviewers: majnemer, rnk Reviewed By: rnk Subscribers: qcolombet, EricWF, llvm-commits Differential Revision: https://reviews.llvm.org/D31799 llvm-svn: 299771
-