- Jun 17, 2017
-
-
Rui Ueyama authored
llvm-svn: 305601
-
Petr Hosek authored
When -no-canonical-prefixes option is used and argv0 contains only a program name, we need to do a PATH lookup to get an executable path, otherwise the return value won't be a valid path and any subsequent uses of it (e.g. when invoking -cc1) will fail with an error. This patch fixes PR9576. Differential Revision: https://reviews.llvm.org/D34290 llvm-svn: 305600
-
Adrian Prantl authored
For the following motivating example bool c(); void f(); bool start() { bool result = c(); if (!c()) { result = false; goto exit; } f(); result = true; exit: return result; } we would previously generate a single DW_AT_const_value(1) because only the DBG_VALUE in the second-to-last basic block survived codegen. This patch improves the heuristic used to determine when a DBG_VALUE is available at the beginning of its variable's enclosing lexical scope: - Stop giving singular constants blanket permission to take over the entire scope. There is still a special case for constants in the function prologue that we also miight want to retire later. - Use the lexical scope information to determine available-at-entry instead of proximity to the function prologue. After this patch we generate a location list with a more accurate narrower availability for the constant true value. As a pleasant side effect, we also generate inline locations instead of location lists where a loacation covers the entire range of the enclosing lexical scope. Measured on compiling llc with four targets this doesn't have an effect on compile time and reduces the size of the debug info for llc by ~600K. rdar://problem/30286912 llvm-svn: 305599
-
Peter Collingbourne authored
llvm-svn: 305598
-
Spyridoula Gravani authored
The verifier should not output any message in such a case. Added test case with no .apple_name section in the file to verify new functionality. Made existing test case more specific. llvm-svn: 305597
-
Eric Beckmann authored
llvm-svn: 305596
-
- Jun 16, 2017
-
-
Benjamin Kramer authored
Found by -Wpessimizing-move. llvm-svn: 305595
-
Kuba Mracek authored
llvm-svn: 305594
-
Pirama Arumuga Nainar authored
Summary: Since r298413, the NEW behavior of the CMake policy CMP0056 is followed. However, it is only effective after the call to cmake_minimum_required. This causes CMAKE_EXE_LINKER_FLAGS etc. to be unused when CMake tries to check compilers for languages specified in the 'project' declaration. Set cmake_minimum_required(VERSION) at the top of the file and ahead of the project declaration. Reviewers: beanz Subscribers: mgorny, srhines, llvm-commits Differential Revision: https://reviews.llvm.org/D34282 llvm-svn: 305593
-
Eric Beckmann authored
In this patch, I flip the switch in DriverUtils from using the external cvtres.exe tool to using the Windows Resource library in llvm. I also fixed a bug where .rsrc sections were marked as discardable memory and therefore were placed in the wrong order in the final PE. Furthermore, I modified WindowsResource to write the coff directly to a memory buffer instead of to file, also had it use the machine types already declared in COFF.h instead creating my own enum. Finally, I flipped the switch to allow all unit tests that had previously run only on windows due to a winres dependency to run cross-platform. Reviewers: zturner, ruiu Subscribers: llvm-commits, hiraditya Differential Revision: https://reviews.llvm.org/D34265 llvm-svn: 305592
-
Anna Thomas authored
Summary: When we fold vector constants that are operands of phi's that feed into select, we need to set the correct insertion point for the *new* selects that get generated. The correct insertion point is the incoming block for the phi. Such cases can occur with patch r298845, which fixed folding of vector constants, but the new selects could be inserted incorrectly (as the added test case shows). Reviewers: majnemer, spatel, sanjoy Reviewed by: spatel Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D34162 llvm-svn: 305591
-
Alex Shlyapnikov authored
Summary: CombinedAllocator::Allocate cleared parameter is not used anywhere and seem to be obsolete. Reviewers: eugenis Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D34289 llvm-svn: 305590
-
Kuba Mracek authored
llvm-svn: 305589
-
Marc-Andre Laperle authored
Reviewers: arphaman Reviewed By: arphaman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D33253 llvm-svn: 305588
-
Aaron Ballman authored
llvm-svn: 305586
-
Reid Kleckner authored
llvm-svn: 305585
-
Evgeniy Stepanov authored
This is a workaround for an ODR conflict with the definition in AMDGPUCodeObjectMetadata.cpp. llvm-svn: 305584
-
Davide Italiano authored
llvm-svn: 305583
-
Reid Kleckner authored
Summary: Adds a "Discarded" bool to SectionChunk to indicate if the section was discarded by COMDAT deduplication. The Writer still just checks `isLive()`. Fixes PR33446 Reviewers: ruiu Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D34288 llvm-svn: 305582
-
Reid Kleckner authored
The first instruction of the new ucrtbase!strnlen implementation loads a global, presumably to dispatch between SSE and non-SSE optimized strnlen implementations. Fixes PR32895 and probably https://github.com/google/sanitizers/issues/818 llvm-svn: 305581
-
Alex Shlyapnikov authored
Summary: Point of failure is different after D34243, hence the change of the message. Reviewers: eugenis Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D34292 llvm-svn: 305580
-
Davide Italiano authored
llvm-svn: 305579
-
Wei Mi authored
The recommit fixes two bugs: The first one is to use CurrentBlock instead of PREInstr's Parent as param of performScalarPREInsertion because the Parent of a clone instruction may be uninitialized. The second one is stop PRE when CurrentBlock to its predecessor is a backedge and an operand of CurInst is defined inside of CurrentBlock. The same value defined inside of loop in last iteration can not be regarded as available. Right now scalarpre doesn't have phi-translate support, so it will miss some simple pre opportunities. Like the following testcase, current scalarpre cannot recognize the last "a * b" is fully redundent because a and b used by the last "a * b" expr are both defined by phis. long a[100], b[100], g1, g2, g3; __attribute__((pure)) long goo(); void foo(long a, long b, long c, long d) { g1 = a * b; if (__builtin_expect(g2 > 3, 0)) { a = c; b = d; g2 = a * b; } g3 = a * b; // fully redundant. } The patch adds phi-translate support in scalarpre. This is only a temporary solution before the newpre based on newgvn is available. Differential Revision: https://reviews.llvm.org/D32252 llvm-svn: 305578
-
Rui Ueyama authored
llvm-svn: 305577
-
Alex Lorenz authored
for preprocessing r300667 added support for editor placeholder to Clang. That commit didn’t take into account that users who use Clang for preprocessing only (-E) will get the "editor placeholder in source file" error when preprocessing their source (PR33394). This commit ensures that Clang doesn't lex editor placeholders when running a preprocessor only action. rdar://32718000 Differential Revision: https://reviews.llvm.org/D34256 llvm-svn: 305576
-
Davide Italiano authored
Whenever we don't know what to do with an instruction, we send it to overdefined anyway. llvm-svn: 305575
-
Daniel Jasper authored
llvm-svn: 305574
-
Spyridoula Gravani authored
llvm-svn: 305570
-
Alex Shlyapnikov authored
Summary: Context: https://github.com/google/sanitizers/issues/740. Making secondary allocator to respect allocator_may_return_null=1 flag and return nullptr when "out of memory" happens. More changes in primary allocator and operator new will follow. Reviewers: eugenis Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D34243 llvm-svn: 305569
-
Vedant Kumar authored
llvm-svn: 305568
-
Rui Ueyama authored
AVR support is somewhat exotic as generated ELF executables are not directly consumed but objcopy'ed to write it to on-chip flush memory. This comment describes it for those why a full-fledged ELF linker is used to link programs for the 8-bit microcontroller. llvm-svn: 305567
-
Matthias Braun authored
Revert because of reports of some PPC input starting to spill when it was predicted that it wouldn't and no spillslot was reserved. This reverts commit r305516. llvm-svn: 305566
-
Rui Ueyama authored
Target.cpp contains code for all the targets that LLD supports. It was simple and easy, but as the number of supported targets increased, it got messy. This patch splits the file into per-target files under ELF/arch directory. Differential Revision: https://reviews.llvm.org/D34222 llvm-svn: 305565
-
Xinliang David Li authored
llvm-svn: 305564
-
Craig Topper authored
[InstCombine] Add test cases to show missed opportunities due to overly conservative single use checks. NFC llvm-svn: 305562
-
Yuka Takahashi authored
This is a patch for bug: https://bugs.llvm.org/show_bug.cgi?id=6817 Warnings should not be emitted with -M and -MM flags, because this mode is only used for generate MakeFiles. llvm-svn: 305561
-
Yonghong Song authored
If users tried to have a structure decl/init code like below struct test_t t = { .memeber1 = 45 }; It is very likely that compiler will generate a readonly section to hold up the init values for variable t. Later load of t members, e.g., t.member1 will result in a read from readonly section. BPF program cannot handle relocation. This will force users to write: struct test_t t = {}; t.member1 = 45; This is just inconvenient and unintuitive. This patch addresses this issue by implementing BPF PreprocessISelDAG. For any load from a global constant structure or an global array of constant struct, it attempts to translate it into a constant directly. The traversal of the constant struct and other constant data structures are similar to where the assembler emits read-only sections. Four different unit test cases are also added to cover different scenarios. Signed-off-by:
Yonghong Song <yhs@fb.com> llvm-svn: 305560
-
Yonghong Song authored
o This is discovered during my study of 32-bit subregister support. o This is no impact on current functionality since we only support 64-bit registers. o Searching the web, looks like the issue has been discovered before, so fix it now. Signed-off-by:
Yonghong Song <yhs@fb.com> llvm-svn: 305559
-
Daniel Neilson authored
Summary: Background: http://lists.llvm.org/pipermail/llvm-dev/2017-May/112779.html This change is to alter the prototype for the atomic memcpy intrinsic. The prototype itself is being changed to more closely resemble the semantics and parameters of the llvm.memcpy intrinsic -- to ease later combination of the llvm.memcpy and atomic memcpy intrinsics. Furthermore, the name of the atomic memcpy intrinsic is being changed to make it clear that it is not a generic atomic memcpy, but specifically a memcpy is unordered atomic. Reviewers: reames, sanjoy, efriedma Reviewed By: reames Subscribers: mzolotukhin, anna, llvm-commits, skatkov Differential Revision: https://reviews.llvm.org/D33240 llvm-svn: 305558
-
Simon Dardis authored
This reverts commit r305455. This commit was reported as breaking one of the sanitizer buildbots. Reverting until lab.llvm.org comes back online. llvm-svn: 305557
-