summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [modules] Only take visible using-directives into account during name lookup.Richard Smith2017-10-112-14/+78
| | | | llvm-svn: 315402
* Inline addRegular into addSymbol.Rui Ueyama2017-10-112-42/+52
| | | | | | | | Because addRegular's functionality is tightly coupled with addSymbol, and the former is called only once, it makes sense to merge the two functions. This patch also adds comments. llvm-svn: 315401
* COFF: When generating code for LTO, use static reloc model on 32-bit x86.Peter Collingbourne2017-10-112-1/+26
| | | | | | | | | | | | | | Fixes PR34306. This is because it usually results in more compact code, and because there are also known code generation bugs when using the PIC model (see bug). Based on a patch by Carlo Kok. Differential Revision: https://reviews.llvm.org/D38769 llvm-svn: 315400
* [X86] Remove temporary std::string creation from shuffle comment printing. ↵Craig Topper2017-10-111-12/+12
| | | | | | We can just write directly to the raw_ostream. llvm-svn: 315399
* A '<' with a trigraph '#' is not a valid editor placeholderAlex Lorenz2017-10-112-1/+6
| | | | | | | | | Credit to OSS-Fuzz for discovery: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3137#c5 rdar://34923985 llvm-svn: 315398
* [Modules TS] Diagnose missing/duplicate module-declaration.Richard Smith2017-10-115-6/+44
| | | | llvm-svn: 315397
* [sanitizer] Re-disable several tests on Android.Evgeniy Stepanov2017-10-116-6/+6
| | | | | | The tests have been enabled by accident in r315389. llvm-svn: 315396
* [X86] Add 128-bit version of vbroadcasti32x2 to shuffle comment decoding.Craig Topper2017-10-113-10/+21
| | | | llvm-svn: 315395
* Remove a constructor from ExprValue. NFC.Rui Ueyama2017-10-113-11/+8
| | | | | | I think three ctors are too many for this simple class. llvm-svn: 315394
* Add comments.Rui Ueyama2017-10-111-8/+19
| | | | llvm-svn: 315393
* Include getting generated struct offsets in CodegenABITypesAdrian Prantl2017-10-104-1/+318
| | | | | | | | | | | | | | | | | | | | This change adds a new function, CodeGen::getFieldNumber, that enables a user of clang's code generation to get the field number in a generated LLVM IR struct that corresponds to a particular field in a C struct. It is important to expose this information in Clang's code generation interface because there is no reasonable way for users of Clang's code generation to get this information. In particular: LLVM struct types do not include field names. Clang adds a non-trivial amount of logic to the code generation of LLVM IR types for structs, in particular to handle padding and bit fields. Patch by Michael Ferguson! Differential Revision: https://reviews.llvm.org/D38473 llvm-svn: 315392
* CodeGen: Minor cleanups to use MachineInstr::getMF. NFCJustin Bogner2017-10-1020-50/+45
| | | | | | | Since r315388 we have a shorter way to say this, so we'll replace MI->getParent()->getParent() with MI->getMF() in a few places. llvm-svn: 315390
* Factor out "stable-runtime" feature and enable it on all android.Evgeniy Stepanov2017-10-109-32/+6
| | | | | | | This is a very poorly named feature. I think originally it meant to cover linux only, but the use of it in msan seems to be about any aarch64 platform. Anyway, this change should be NFC on everything except Android. llvm-svn: 315389
* CodeGen: Add MachineInstr::getMF(). NFCJustin Bogner2017-10-102-0/+15
| | | | | | | | Similarly to how Instruction has getFunction, this adds a less verbose way to write MI->getParent()->getParent(). I'll follow up shortly with a change that changes a bunch of the uses. llvm-svn: 315388
* [lldb] Enable using out-of-tree dwpsAlexander Shaposhnikov2017-10-102-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously LLDB required the DWP file to be located next to the executable file. This diff uses the helper function Symbols::LocateExecutableSymbolFile to search for DWP files in the standard locations for debug symbols. Test plan: Build a toy test example: main.cpp clang -gsplit-dwarf -g -O0 main.cpp -o main.exe llvm-dwp -e main.exe -o main.exe.dwp mkdir -p debug_symbols mv main.exe.dwp debug_symbols/main.exe.dwp Run lldb: lldb settings set target.debug-file-search-paths ./debug_symbols file ./main.exe br set --name f run Check that debugging works: setting breakpoints, printing local variables. Differential revision: https://reviews.llvm.org/D38568 llvm-svn: 315387
* Remove an unused default argument.Rui Ueyama2017-10-101-1/+1
| | | | llvm-svn: 315386
* [llvm-objcopy] Add ability to remove multiple sections by nameJake Ehrlich2017-10-102-6/+139
| | | | | | | | | This change adds the ability to use the "-R"/"-remove-section" option multiple times. Differential Revision: https://reviews.llvm.org/D38332 llvm-svn: 315385
* Handle input section liveness only in MarkLive.cpp.Rui Ueyama2017-10-105-34/+47
| | | | | | | | | | | | The condition whether a section is alive or not by default is becoming increasingly complex, so the decision of garbage collection is spreading over InputSection.h and MarkLive.cpp, which is not a good state. This moves the code to MarkLive.cpp, to keep the file the central place to make decisions about garbage collection. llvm-svn: 315384
* [Transforms] Fix some Clang-tidy modernize and Include What You Use ↵Eugene Zelenko2017-10-1014-157/+316
| | | | | | warnings; other minor fixes (NFC). llvm-svn: 315383
* [X86] Add broadcast patterns that allow a scalar_to_vector between the ↵Craig Topper2017-10-102-2/+19
| | | | | | | | broadcast and the load. We already have these patterns for AVX512VL, but not AVX1 or 2. llvm-svn: 315382
* [Modules TS] Diagnose attempts to enter module implementation units without ↵Richard Smith2017-10-108-21/+38
| | | | | | the module interface being available. llvm-svn: 315381
* [CodeGen] Fix some Clang-tidy modernize and Include What You Use warnings; ↵Eugene Zelenko2017-10-1018-214/+414
| | | | | | other minor fixes (NFC). llvm-svn: 315380
* [Modules TS] Module ownership semantics for redeclarations.Richard Smith2017-10-1021-79/+372
| | | | | | | | | | | | | | | | | When declaring an entity in the "purview" of a module, it's never a redeclaration of an entity in the purview of a default module or in no module ("in the global module"). Don't consider those other declarations as possible redeclaration targets if they're not visible, and reject any cases where we pick a prior visible declaration that violates this rule. This reinstates r315251 and r315256, reverted in r315309 and r315308 respectively, tweaked to avoid triggering a linkage calculation when declaring implicit special members (this exposed our pre-existing issue with typedef names for linkage changing the linkage of types whose linkage has already been computed and cached in more cases). A testcase for that regression has been added in r315366. llvm-svn: 315379
* Support: Have directory_iterator::status() return ↵Peter Collingbourne2017-10-1011-134/+178
| | | | | | | | | | | | | | | | | | FindFirstFileEx/FindNextFile results on Windows. This allows clients to avoid an unnecessary fs::status() call on each directory entry. Because the information returned by FindFirstFileEx is a subset of the information returned by a regular status() call, I needed to extract a base class from file_status that contains only that information. On my machine, this reduces the time required to enumerate a ThinLTO cache directory containing 520k files from almost 4 minutes to less than 2 seconds. Differential Revision: https://reviews.llvm.org/D38716 llvm-svn: 315378
* Update for llvm change.Rafael Espindola2017-10-102-2/+2
| | | | llvm-svn: 315377
* Make the ELFFile constructor private.Rafael Espindola2017-10-104-12/+27
| | | | | | | | | With this all clients have to use the new create method which returns an Expected. Fixes a crash on invalid input. llvm-svn: 315376
* [SparsePropagation] Let the Instruction work list hold Values.Matthew Simpson2017-10-101-15/+14
| | | | llvm-svn: 315375
* XFAIL ubsan/TestCases/TypeCheck/Function/function.cpp on WindowsHans Wennborg2017-10-101-0/+1
| | | | | | I think it got accidentally enabled in r315105 or thereabouts. llvm-svn: 315374
* [SparsePropagation] Use SmallVector for work listsMatthew Simpson2017-10-101-6/+12
| | | | | | | This patch changes the work lists from std::vector to SmallVector, which matches the SCCP implementation. This patch also updates some related comments. llvm-svn: 315373
* [llvm-objcopy] Fix latent bug that allowed some Sections to be improperly ↵Jake Ehrlich2017-10-102-18/+21
| | | | | | | | | | | | | | | | cast to StringTableSections If a Section had Type SHT_STRTAB (which could happen if you had a .dynstr section) it was possible to cast Section to StringTableSection and get away with any operation that was supported by SectionBase without it being noticed. This change makes this bug easier to notice and fixes it where it occurred. It also made me realize that there was some duplication of efforts in the loop that calls ::initialize. These issues are all fixed by this change. Differential Revision: https://reviews.llvm.org/D38329 llvm-svn: 315372
* Make the ELFObjectFile constructor private.Rafael Espindola2017-10-104-48/+80
| | | | | | | This forces every user to use the new create method that returns an Expected. This in turn propagates better error messages. llvm-svn: 315371
* Revert "Classify llvm-cfi-verify."Vlad Tsyrklevich2017-10-107-682/+196
| | | | | | | | This reverts commit r315363. It has a simple build failure, but more importantly I want to confirm that unit tests run in check-all to make sure that they don't silently break in the future. llvm-svn: 315370
* Use the first instruction's count to estimate the funciton's entry frequency.Dehao Chen2017-10-103-12/+48
| | | | | | | | | | | | | | Summary: In the current implementation, we only have accurate profile count for standalone symbols. For inlined functions, we do not have entry count data because it's not available in LBR. In this patch, we use the first instruction's frequency to estimiate the function's entry count, especially for inlined functions. This may be inaccurate due to debug info in optimized code. However, this is a better estimate than the static 80/20 estimation we have in the current implementation. Reviewers: tejohnson, davidxl Reviewed By: tejohnson Subscribers: sanjoy, llvm-commits, aprantl Differential Revision: https://reviews.llvm.org/D38478 llvm-svn: 315369
* [x86] fix prefix typos for CHECK lines; NFCSanjay Patel2017-10-101-586/+290
| | | | llvm-svn: 315368
* Fix indexer crash for default template template parameter valueJan Korous2017-10-102-2/+8
| | | | | | | | rdar://33058798 Differential Revision: https://reviews.llvm.org/D38755 llvm-svn: 315367
* Add test for regression caused by reverted patch r315251.Richard Smith2017-10-101-0/+31
| | | | llvm-svn: 315366
* [X86] Fix some patterns that select VLX instructions, but were incorrectly ↵Craig Topper2017-10-102-2/+6
| | | | | | | | also checking presence of BWI instructions. The EVEX->VEX pass probably obscures this. llvm-svn: 315365
* Simplify. NFC.Rafael Espindola2017-10-101-4/+4
| | | | llvm-svn: 315364
* Classify llvm-cfi-verify.Vlad Tsyrklevich2017-10-107-196/+682
| | | | | | | | | | | | | | Summary: Move llvm-cfi-verify into a class in preparation for CFI analysis to come. Reviewers: vlad.tsyrklevich Reviewed By: vlad.tsyrklevich Subscribers: mgorny, llvm-commits, pcc, kcc Differential Revision: https://reviews.llvm.org/D38379 llvm-svn: 315363
* [mips] Correct the instruction predicates for microMIPSr3Simon Dardis2017-10-102-206/+226
| | | | | | | | | | | | | | | | Rather than using the AdditionalPredicates mechanism to guard the microMIPS instructions, use the existing predicates to properly guard those instructions. This also resolves a case where an instruction pattern was incorrectly available for microMIPS32R6, which caused a register allocation failure as the registers specified in the pattern were not available. Reviewers: nitesh.jain, atanasyan Differential Revision: https://reviews.llvm.org/D38451 llvm-svn: 315362
* AMDGPU: Fix missing skipFunction callsMatt Arsenault2017-10-103-2/+5
| | | | llvm-svn: 315361
* AMDGPU: Fix failure to select branch with optnoneMatt Arsenault2017-10-104-20/+60
| | | | | | | | opt-bisect/optnone disable the AMDGPUUniformAnnotateValues pass. The heuristic in the custom selector for brcond deferred the branch uniformity check to the pattern, which would fail. llvm-svn: 315360
* Convert condition to an early exit (NFC).Adrian Prantl2017-10-101-1/+3
| | | | | | <rdar://problem/34689604> llvm-svn: 315359
* [CGExprScalar] In EmitCompare trunc the result if it has different type as ↵Guozhi Wei2017-10-102-0/+21
| | | | | | | | | | | | | | | | E->getType() Usually compare expression should return i1 type, so EmitScalarConversion is called before return return EmitScalarConversion(Result, CGF.getContext().BoolTy, E->getType(), E->getExprLoc()); But when ppc intrinsic is called to compare vectors, the ppc intrinsic can return i32 even E->getType() is BoolTy, in this case EmitScalarConversion does nothing, an i32 type result is returned and causes crash later. This patch detects this case and truncates the result before return. Differential Revision: https://reviews.llvm.org/D38656 llvm-svn: 315358
* AMDGPU: Fix incorrect selection of pseudo-branchesMatt Arsenault2017-10-105-2/+13
| | | | | | These should only be used if the machine structurizer is enabled. llvm-svn: 315357
* [SparseSolver] Rename getLatticeState to getExistingValueState (NFC)Matthew Simpson2017-10-101-12/+10
| | | | | | | | The new name clarifies the function's relation to getValueState. That is, unlike getValueState, the state of a given value will not be initialized if it's not already in the map. llvm-svn: 315356
* Revert "[clang-fuzzer] Allow building without coverage instrumentation."Matt Morehouse2017-10-103-82/+53
| | | | | | | This reverts r315336 due to build breakage with gcc. http://lab.llvm.org:8011/builders/ubuntu-gcc7.1-werror/builds/2173 llvm-svn: 315355
* Convert two uses of ErrorOr to Expected.Rafael Espindola2017-10-105-14/+13
| | | | llvm-svn: 315354
* [AMDGPU] Lower enqueued blocks and generate runtime metadataYaxun Liu2017-10-1010-6/+266
| | | | | | | | | | | | | | | | | | | | | | | This patch adds a post-linking pass which replaces the function pointer of enqueued block kernel with a global variable (runtime handle) and adds runtime-handle attribute to the enqueued block kernel. In LLVM CodeGen the runtime-handle metadata will be translated to RuntimeHandle metadata in code object. Runtime allocates a global buffer for each kernel with RuntimeHandel metadata and saves the kernel address required for the AQL packet into the buffer. __enqueue_kernel function in device library knows that the invoke function pointer in the block literal is actually runtime handle and loads the kernel address from it and puts it into AQL packet for dispatching. This cannot be done in FE since FE cannot create a unique global variable with external linkage across LLVM modules. The global variable with internal linkage does not work since optimization passes will try to replace loads of the global variable with its initialization value. Differential Revision: https://reviews.llvm.org/D38610 llvm-svn: 315352
* Support: On Windows, use CreateFileW to delete files in sys::fs::remove().Peter Collingbourne2017-10-101-16/+19
| | | | | | | | This saves a call to stat(). Differential Revision: https://reviews.llvm.org/D38715 llvm-svn: 315351
OpenPOWER on IntegriCloud