Commit Graph

330494 Commits

Author SHA1 Message Date
georgerim 9acaf54277 [obj2yaml] - Better dumping for relocations without symbols associated.
This just reorders the code and removes an assignment
of an empty string for the case when a relocation has
no symbol associated. With this our output becomes
cleaner and shorter.

Differential revision: https://reviews.llvm.org/D69255
2019-10-25 12:29:31 +03:00
georgerim 53c164e221 [llvm/Object] - Fix the error message reported for a broken SHT_SYMTAB_SHNDX section.
SHT_SYMTAB_SHNDX should have the same number of entries as the symbol table
associated (https://www.sco.com/developers/gabi/latest/ch4.sheader.html)

We currently can report the following message:
"SHT_SYMTAB_SHNDX section has sh_size (24) which is not equal to the number of symbols (2)"

It is just broken. This patch refines/fixes it.

Differential revision: https://reviews.llvm.org/D69305
2019-10-25 12:19:46 +03:00
David Stenberg 2a3dc6b74f Fix a variable typo in LiveDebugValues [NFC] 2019-10-25 11:21:43 +02:00
Simon Atanasyan 77b3c794e3 [docs] Update Mips feature table in CodeGenerator.rst
Patch by Miloš Stojanović

Differential Revision: https://reviews.llvm.org/D69381
2019-10-25 12:17:34 +03:00
Simon Tatham 24ef631f43 Fix file-ordering nit in D67161.
Re-sorted the module names in clang/utils/TableGen/CMakeLists.txt back
into alphabetical order.
2019-10-25 09:22:07 +01:00
czhengsz 822059147b [PowerPC] [Peephole] fold frame offset by using index form to save add.
renamable $x6 = ADDI8 $x1, -80      ;;; 0 is replaced with -80
renamable $x6 = ADD8 killed renamable $x6, renamable $x5
STW killed renamable $r3, 4, killed renamable $x6 :: (store 4 into %ir.14, !tbaa !2)

After PEI there is a peephole opt opportunity to combine above -80 in ADDI8 with 4 in the STW to eliminate unnecessary ADD8.

Expected result:
renamable $x6 = ADDI8 $x1, -76
STWX killed renamable $r3, renamable $x5, killed renamable $x6 :: (store 4 into %ir.6, !tbaa !2)

Reviewed by: stefanp

Differential Revision: https://reviews.llvm.org/D66329
2019-10-25 04:13:30 -04:00
Michał Górny a6712889f5 [lldb] [Host/netbsd] Set Arg0 for 'platform process list -v'
Differential Revision: https://reviews.llvm.org/D69400
2019-10-25 09:41:12 +02:00
Djordje Todorovic 8c99a549de [LiveDebugValues] Small code clean up; NFC 2019-10-25 09:39:42 +02:00
Tom Stellard efcdedd2e7 git-llvm: Drop dependency on github module
This was required for blocking merge commits, but now that we have
branch protections, we don't need this.
2019-10-25 00:04:31 -07:00
Tom Stellard b96e30c217 git-llvm: Push to master branch by default
This allows pushing without specifying a branch, which is what the
documentations says to do.
2019-10-24 23:56:00 -07:00
LLVM GN Syncbot 918b88ab15 gn build: Merge ffa214ef22 2019-10-25 06:36:53 +00:00
LLVM GN Syncbot 72d7908afc gn build: Merge d0bd3fc88b 2019-10-25 06:36:53 +00:00
LLVM GN Syncbot 9c0f66746c gn build: Merge bb6a27fc25 2019-10-25 06:36:52 +00:00
Nico Weber 13d8d19d51 gn build: (manually) merge 08074cc9 2019-10-25 02:35:14 -04:00
Michael Liao 45787e5682 Fix compilation warning. NFC. 2019-10-25 01:06:52 -04:00
Michael Liao 5a48678a6a [hip] Allow the declaration of functions with variadic arguments in HIP.
Summary:
- As variadic parameters have the lowest rank in overload resolution,
  without real usage of `va_arg`, they are commonly used as the
  catch-all fallbacks in SFINAE. As the front-end still reports errors
  on calls to `va_arg`, the declaration of functions with variadic
  arguments should be allowed in general.

Reviewers: jlebar, tra, yaxunl

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D69389
2019-10-25 00:39:24 -04:00
Craig Topper 0eb8a52aee [X86][GISel] Remove unneeded custom selection code for handling shifts. 2019-10-24 21:11:13 -07:00
Tom Stellard 27bfee01e9 docs: Update instructions for requesting commit access 2019-10-24 20:42:02 -07:00
Philip Reames 34f68253ca [SCEV] Expose and use maximum constant exit counts for individual loop exits
We were already going to all of the trouble of computing maximum constant exit counts for each loop exit, we might as well expose them through the API.  The change in IndVars is mostly to demonstrate that the wired up code works, but it als very slightly strengthens the transform.  The strengthened case is rather narrow though: it requires one exactly analyzeable exit, one imprecisely analyzeable exit (with the upper bound less than the precise one), and one unanalyzeable exit.  I coudn't construct a reasonably stable test case.

This does increase the memory usage of the BackedgeTakenCount by a factor of 2 in the worst case.

I also noticed the loop in IndVars is O(#Exits ^ 2).  This doesn't change with this patch.  A future patch will cache this result inside of SCEV to avoid requering.
2019-10-24 19:07:33 -07:00
David Blaikie 0e8fc21c2e Fix Clang -Wcovered-switch-default warning by moving llvm_unreachable default to after the switch 2019-10-24 18:56:45 -07:00
Kai Luo 81c2a5bb39 Test commit via git. 2019-10-25 01:36:55 +00:00
Michael Spencer 7af309a4ed [clang][DependencyScanning] clang-format. 2019-10-24 18:28:01 -07:00
Philip Reames c27010ef76 [SCEV] Start reworking backedge taken count APIs to unify max handling [NFC]
This is a first step in figuring out a proper API for maximum (non constant) exit counts.  This may evolve a bit as we get experience with the API needs; suggestions very welcome.  This patch just tried to provide a framework that we can later add maximum too in a clean and obvious way.
2019-10-24 18:21:55 -07:00
Yuanfang Chen ef7a154d17 [clang][ThinLTO] Promote cc1 -fthin_link_bitcode to driver -fthinlto_link_bitcode
Summary:
A necessary step to let build system caching work for its output.

Reviewers: tejohnson, steven_wu

Reviewed by: tejohnson

Subscribers: mehdi_amini, inglorion, dexonsmith, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D69406
2019-10-24 16:54:45 -07:00
Jordan Rupprecht 6d424a161b Revert "Recommit "[Clang] Pragma vectorize_width() implies vectorize(enable)""
This reverts commit 80371c74ae.

Given the following source:
```
void a() {
  for (;;)
    ;
}
```

It incorrectly enables vectorization (with vector width 1), as well as generating a warning that vectorization could not be performed.
2019-10-24 16:35:45 -07:00
Petr Hosek 7fff716ec4 [CMake] Update Fuchsia build configuration
This includes several changes to our toolchain build:
- Switch from RelWithDebInfo to Release as we don't currently use the
  debug info and therefore don't need to produce it.
- Disable unwind tables since we don't need them.
- Disable Clang static analyzer and ARCMT since we don't use it.
- Disable Go tests since we don't distribute Go bindings.
- Set the deployment target for macOS to 10.7 to make the toolchain
  usable on older systems.
- Restrict the targets we build runtimes for on Darwin only the ones
  we actually need.
- Drop llc and opt from the distribution since we don't need them.

Differential Revision: https://reviews.llvm.org/D69415
2019-10-24 16:35:29 -07:00
Philip Reames 0c3921e7b9 [SCEV] Delete unused code from header 2019-10-24 16:34:49 -07:00
Michael Spencer 9ab6d8236b [clang-scan-deps] Add basic support for modules.
This fixes two issues that prevent simple uses of modules from working.

* We would previously minimize _every_ file opened by clang, even module maps
  and module pcm files. Now we only minimize files with known extensions. It
  would be better if we knew which files clang intended to open as a source
  file, but this works for now.

* We previously cached every lookup, even failed lookups. This is a problem
  because clang stats the module cache directory before building a module and
  creating that directory. If we cache that failure then the subsequent pcm
  load doesn't see the module cache and fails.

Overall this still leaves us building minmized modules on disk during scanning.
This will need to be improved eventually for performance, but this is correct,
and works for now.

Differential Revision: https://reviews.llvm.org/D68835
2019-10-24 16:19:11 -07:00
Jinsong Ji 9671d1dc17 [clang]Fixup clang -Werror,,-Wcovered-switch-default build failures
llvm/clang/lib/CodeGen/CGBuiltin.cpp:6877:3: error: default label in
switch which covers all enumeration values
[-Werror,-Wcovered-switch-default]

Similar to
https://reviews.llvm.org/rG7b3de1e811972b874d91554642ccb2ef5b32eed6
2019-10-24 22:49:17 +00:00
Joerg Sonnenberger 60b403e75c Always flush pending errors in MCAsmParser
This has become visible with the --fatal-warnings support.
2019-10-25 00:48:12 +02:00
Puyan Lotfi bc58e0279b [compiler-rt] cmake: add include(BuiltinTests) to CompilerRTDarwinUtils
In cmake, if TEST_COMPILE_ONLY is set
compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake invokes try_compile_only()
but try_compile_only() is defined in BuiltinTests.cmake and is not included in
CompilerRTDarwinUtils.cmake. This patch simply includes it BuiltinTests.

Differential Revision: https://reviews.llvm.org/D69410
2019-10-24 18:38:25 -04:00
Philip Reames 9b8dd00403 Test commit access via git 2019-10-24 15:10:17 -07:00
Richard Smith 70f59b5bbc When diagnosing an ambiguity, only note the candidates that contribute
to the ambiguity, rather than noting all viable candidates.
2019-10-24 14:58:29 -07:00
Jonas Devlieghere 33fca97880 [CMake] Move LLDB_TEST_BUILD_DIRECTORY into test/CMakeLists.txt
The LLDB_TEST_BUILD_DIRECTORY variable only matters to the different
test suites. Therefore they belong in test/CMakeLists.txt rather than
the top-level CMakeLists.txt.
2019-10-24 14:47:07 -07:00
Jonas Devlieghere fd025c094b [CMake] Move test dependency tracking into test/CMakeLists.txt
As the name suggests, the LLDB test dependencies only matter to the
different test suites. Therefore they belong in test/CMakeLists.txt
rather than the top-level CMakeLists.txt.
2019-10-24 14:47:07 -07:00
Jonas Devlieghere 220cce1e72 [CMake] Don't set LLDB_TEST_* in the top-level CMakeLists
All these variables only affect the API tests. Therefore they belong in
test/API/CMakeLists.txt rather than the top-level CMakeLists.txt.
2019-10-24 14:47:07 -07:00
Jonas Devlieghere d52b36e354 [CMake] Remove unused variable LLDB_TEST_CXX_COMPILER
CMake allows you to set a custom CXX compiler for the API test suite.
However, this variable is never used, because dotest uses the same
compiler to build C and CXX sources.

I'm not sure if this variable was added with the intention of supporting
a different compiler or if this is just a remnant of old functionality.
Given that this hasn't been working for a while, I assume it's safe to
remove.

Differential revision: https://reviews.llvm.org/D69401
2019-10-24 14:47:07 -07:00
Evgenii Stepanov a1817996fa Fix lld detection in standalone compiler-rt.
Summary:
Right now all hwasan tests on Android are silently disabled because they
require "has_lld" and standalone compiler-rt can not (and AFAIK was
never able to) set it.

Reviewers: pcc

Subscribers: dberris, mgorny, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

Differential Revision: https://reviews.llvm.org/D69405
2019-10-24 14:46:10 -07:00
Hans Wennborg 55c223a7ed Try harder to fix GCC 5.3 build
(This time verified locally.)

It was failing with:

llvm/lib/MC/XCOFFObjectWriter.cpp:168:56: error: array must be initialized with a brace-enclosed initializer
   std::array<Section *const, 2> Sections = {&Text, &BSS};
                                                        ^
2019-10-24 23:42:48 +02:00
Scott Linder 2c37833931 [AMDGPU] Clean up update_llc_test_checks CodeGen tests
Summary:
Some tests have been hand edited without removing the
update_llc_test_checks header, some have slightly outdated CHECK lines
which still pass, and some have additional comments which
update_llc_test_checks pushes towards the function body.

Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D69402
2019-10-24 17:35:33 -04:00
Saar Raz ffa214ef22 [Concepts] Constraint Enforcement & Diagnostics
Part of the C++20 concepts implementation effort.
- Associated constraints (requires clauses, currently) are now enforced when instantiating/specializing templates and when considering partial specializations and function overloads.
- Elaborated diagnostics give helpful insight as to why the constraints were not satisfied.
Phabricator: D41569
2019-10-25 00:19:51 +03:00
Simon Pilgrim a18818207a Fix cppcheck shadow variable warning. NFCI. 2019-10-24 22:14:36 +01:00
jasonliu 95a18b848f Follow up on D69112, fix build break for skipping field initialization
Clang emit warning for skipping field initialization. Add {} to fix it.
This is a patch that fixes issue introduced in https://reviews.llvm.org/D69112
2019-10-24 21:10:06 +00:00
David Tenty 201ed14aea Follow on to Namespace fixup for D68340
remove using directive that can make lookup ambiguous.
2019-10-24 17:01:17 -04:00
Simon Pilgrim c39ba0429c Fix MSVC "switch statement contains 'default' but no 'case' labels" warning. NFCI. 2019-10-24 13:40:13 -07:00
Simon Pilgrim 126a72fcbf Fix MSVC "not all control paths return a value" warnings. NFCI. 2019-10-24 13:40:13 -07:00
Stephan T. Lavavej 2e4f1e112d [www] Change URLs to HTTPS.
This changes most URLs in llvm's html files to HTTPS. Most changes were
search-and-replace with manual verification; some changes were manual.
For a few URLs, the websites were performing redirects or had changed
their anchors; I fixed those up manually. This consistently uses the
official https://wg21.link redirector. This also strips trailing
whitespace and fixes a couple of typos.

Fixes D69363.

There are a very small number of dead links for which I don't know any
replacements (they are equally dead as HTTP or HTTPS):

https://llvm.org/cmds/llvm2cpp.html
https://llvm.org/devmtg/2010-11/videos/Grosser_Polly-desktop.mp4
https://llvm.org/devmtg/2010-11/videos/Grosser_Polly-mobile.mp4
https://llvm.org/devmtg/2011-11/videos/Grosser_PollyOptimizations-desktop.mov
https://llvm.org/devmtg/2011-11/videos/Grosser_PollyOptimizations-mobile.mp4
https://llvm.org/perf/db_default/v4/nts/22463
https://polly.llvm.org/documentation/memaccess.html
2019-10-24 13:25:15 -07:00
Vedant Kumar d0bd3fc88b Revert "Disable exit-on-SIGPIPE in lldb"
This reverts commit 32ce14e55e.

In post-commit review, Pavel pointed out that there's a simpler way to
ignore SIGPIPE in lldb that doesn't rely on llvm's handlers.
2019-10-24 13:19:49 -07:00
paulhoad 23b7836415 [clang-format] update documentation
Summary:
  - Added example code for BreakStringLiterals;

Reviewers: MyDeveloperDay

Reviewed By: MyDeveloperDay

Patch By: mrexodia

Subscribers: cfe-commits, MyDeveloperDay

Tags: #clang-tools-extra, #clang-format, #clang

Differential Revision: https://reviews.llvm.org/D31574
2019-10-24 21:10:13 +01:00
Akira Hatanaka 31b752cbf0 [ObjC][ARC] Check whether the return and parameter types of the old and
new functions are compatible before upgrading a function call to an
intrinsic call.

Sometimes users insert calls to ARC runtime functions that are not
compatible with the corresponding intrinsic functions (for example,
'i8* @objc_storeStrong' instead of 'void @objc_storeStrong'). Don't
upgrade those calls.

rdar://problem/56447127
2019-10-24 13:08:50 -07:00