summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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
* [opt-viewer] Don't Decode HTML bytes for Python 2Roman Lebedev2017-10-101-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: D36624 added some python3 compatibility. But that fix has a problem.. With python2 (which is specified by `#!/usr/bin/env python2.7`), if the env variables do not specify the UTF8, and the source file is UTF8 (contains non-ASCII symbols), then the `.decode('utf-8')` causes the following exception: ``` Reading YAML files... Rendering HTML files... 8 of 41Traceback (most recent call last): File "/build/llvm/tools/opt-viewer/opt-viewer.py", line 277, in <module> print_progress) File "/build/llvm/tools/opt-viewer/opt-viewer.py", line 213, in generate_report should_print_progress) File "/build/llvm/tools/opt-viewer/optpmap.py", line 45, in pmap result = map(_wrapped_func, func_and_args, *args, **kwargs) File "/build/llvm/tools/opt-viewer/optpmap.py", line 25, in _wrapped_func return func(argument) File "/build/llvm/tools/opt-viewer/opt-viewer.py", line 174, in _render_file SourceFileRenderer(source_dir, output_dir, filename).render(remarks) File "/build/llvm/tools/opt-viewer/opt-viewer.py", line 125, in render self.render_source_lines(self.source_stream, line_remarks) File "/build/llvm/tools/opt-viewer/opt-viewer.py", line 79, in render_source_lines </tr>'''.format(**locals()), file=self.stream) UnicodeEncodeError: 'ascii' codec can't encode character u'\xf4' in position 47: ordinal not in range(128) ``` This is similar to https://bugs.llvm.org/show_bug.cgi?id=33548, which was fixed by https://reviews.llvm.org/D37661 Unlike that fix, here, *removing* `.decode('utf-8')` actually fixes it. Since i assume that the original fix is needed, i simply made that fix conditional, since for python2 it actually breaks things. Reviewers: modocache, anemet Reviewed By: anemet Subscribers: fhahn, llvm-commits Differential Revision: https://reviews.llvm.org/D38289 llvm-svn: 315350
* Try to make gcc happy.Rafael Espindola2017-10-101-1/+1
| | | | llvm-svn: 315349
* Return Expected from createRTDyldELFObject.Rafael Espindola2017-10-101-17/+18
| | | | | | | No functionality change, it just makes it easier to use Expected in Object. llvm-svn: 315348
* Simplify. NFC.Rafael Espindola2017-10-101-16/+10
| | | | llvm-svn: 315347
* [llvm-objcopy] Add support for removing sectionsJake Ehrlich2017-10-1012-10/+721
| | | | | | | | | | | This change adds support for removing sections using the -R field (as GNU objcopy does as well). This change should let us add many helpful tests and is a proper stepping stone for adding more general kinds of stripping. Differential Revision: https://reviews.llvm.org/D38260 llvm-svn: 315346
* Revert "temporary"Jake Ehrlich2017-10-1012-721/+10
| | | | | | | | | I forgot to add a proper commit message. I'm reverting this to fix that. This reverts commit r315344. llvm-svn: 315345
* temporaryJake Ehrlich2017-10-1012-10/+721
| | | | llvm-svn: 315344
* travis: enable checks of nvptx librariesJan Vesely2017-10-101-3/+3
| | | | | | Reviewer: Jeroen Ketema Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 315343
* travis: Enable external function call checks on llvm-{4,5}Jan Vesely2017-10-101-0/+2
| | | | | | Reviewer: Aaron Watry Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 315342
* Make image builtins r600/llvm-3.9 onlyJan Vesely2017-10-1018-15/+15
| | | | | | | | | | The implementation uses r600 sepcific intrinsics LLVM-4 switched to _ro_t and _rw_t image types Portions of the code can be moved back as more targets/llvm versions add image support Reviewer: Aaron Watry Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 315341
* Debug Info: Fix the SDLoc propagation for a DAGCombiner ruleAdrian Prantl2017-10-101-0/+37
| | | | | | | | | | This patch ensures that the rule: fold (zext (load x)) -> (zext (truncate (zextload x))) propagates the SDLoc of the load to the zextload. <rdar://problem/33755881> llvm-svn: 315340
* [clang-fuzzer] Build proto-to-cxx with fuzzer-no-link.Matt Morehouse2017-10-101-0/+1
| | | | | | Makes it possible to build with any sanitizer or none at all. llvm-svn: 315339
* [lit] Add host_cxx to lit configFrancis Ricci2017-10-101-0/+1
| | | | | | | | | | | | Summary: This is required to get the clang version for sanitized builds. Reviewers: zturner Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D38741 llvm-svn: 315338
* [llvm-objdump] Disable leak checking on an llvm-objdump testFrancis Ricci2017-10-101-1/+1
| | | | | | | | | | | | | | | | Summary: This leak doesn't reproduce locally on macOS 10.12, but is causing buildbot failures. Disable leak checking until it can be fixed. Reviewers: sqlbyme, qcolombet, enderby, bruno Reviewed By: bruno Subscribers: bruno, llvm-commits Differential Revision: https://reviews.llvm.org/D38699 llvm-svn: 315337
* [clang-fuzzer] Allow building without coverage instrumentation.Matt Morehouse2017-10-103-53/+81
| | | | | | | | | | | | | | | | | | Summary: Compile with DummyClangFuzzer.cpp as entry point rather than libFuzzer's main when coverage instrumentation is missing. https://llvm.org/pr34314 Reviewers: kcc, bogner, vitalybuka Reviewed By: vitalybuka Subscribers: cfe-commits, mgorny Differential Revision: https://reviews.llvm.org/D38642 llvm-svn: 315336
* [WebAssembly] Update MCObjectWriter and associated interfaces after r315327Derek Schuff2017-10-104-13/+22
| | | | llvm-svn: 315335
* Don't create a dummy __tls_get_addr.Rafael Espindola2017-10-103-13/+16
| | | | | | | | | | | | | | | We just don't need one with the current setup. We only error on undefined references that are used by some relocation. If we managed to relax all uses of __tls_get_addr, no relocation uses it and we don't produce an error. This is less code and fixes the case were we fail to relax. Before we would produce a broken output, but now we produce an error. llvm-svn: 315334
* [lit] Only enable LSan on darwin when clang supports itFrancis Ricci2017-10-101-1/+29
| | | | | | | | | | | | | | | | Summary: LSan on darwin doesn't exist on older versions of clang, causing non-boostrapped sanitized buildbots to fail Reviewers: kubamracek, qcolombet, sqlbyme, zturner, modocache Reviewed By: zturner Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D38703 llvm-svn: 315333
* [MC] Add another missing <memory> include left out of r315327.Lang Hames2017-10-101-0/+1
| | | | llvm-svn: 315332
* [MC] Add a missing <memory> include left out of r315327.Lang Hames2017-10-101-0/+1
| | | | llvm-svn: 315331
* For dllexport class templates, export specializations of member functions ↵Hans Wennborg2017-10-102-0/+31
| | | | | | | | | | (PR34849) (take 2) This is a re-commit of r315025, but making sure to only apply this to specializations of class template member functions; i.e. not when the function itself is a template. llvm-svn: 315330
* Revert "[SCCP] Propagate integer range info for parameters in IPSCCP."Bruno Cardoso Lopes2017-10-102-207/+8
| | | | | | | | | This reverts commit r315288. This is part of fixing segfault introduced in: http://green.lab.llvm.org/green/job/clang-stage2-configure-Rlto/21675/ llvm-svn: 315329
* Revert "[SCCP] Fix mem-sanitizer failure introduced by r315288."Bruno Cardoso Lopes2017-10-101-4/+2
| | | | | | | This reverts commit r315294. Part of fixing seg fault introduced in: http://green.lab.llvm.org/green/job/clang-stage2-configure-Rlto/21675/ llvm-svn: 315328
* [MC] Thread unique_ptr<MCObjectWriter> through the create.*ObjectWriterLang Hames2017-10-1055-137/+204
| | | | | | | | | | functions. This makes the ownership of the resulting MCObjectWriter clear, and allows us to remove one instance of MCObjectStreamer's bizarre "holding ownership via someone else's reference" trick. llvm-svn: 315327
* [WebAssembly] Narrow the scope of WebAssemblyFixFunctionBitcastsJacob Gravelle2017-10-102-38/+120
| | | | | | | | | | | | | | | | | Summary: The pass to fix function bitcasts generates thunks for functions that are called directly with a mismatching signature. It was also generating thunks in cases where the function was address-taken, causing aliasing problems in otherwise valid cases. This patch tightens the restrictions for when the pass runs. Reviewers: sunfish, dschuff Subscribers: jfb, sbc100, llvm-commits, aheejin Differential Revision: https://reviews.llvm.org/D38640 llvm-svn: 315326
* [clangd] Use UniqueFunction for deferred computations.Ilya Biryukov2017-10-103-23/+24
| | | | | | | Previsouly, `std::future` that were results of `std::async(std::launch::deferred, ...` were used. llvm-svn: 315325
* [clangd] Added missing #includes to Function.hIlya Biryukov2017-10-101-0/+3
| | | | llvm-svn: 315324
OpenPOWER on IntegriCloud