summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Remove unused function 'SetMangledCounterparts' (NFC)Jonas Devlieghere2019-08-061-17/+0
| | | | | | This function is not referenced. llvm-svn: 367975
* CodeGen: Migration to using RegisterMatt Arsenault2019-08-069-107/+107
| | | | llvm-svn: 367974
* Builtins: Start adding half versions of math builtinsMatt Arsenault2019-08-063-0/+113
| | | | | | | | | | The implementation of the OpenCL builtin currently library uses 2 different hacks to get to the corresponding IR intrinsics from the source. This will allow removal of those. This is the set that is currently used (minus a few vector ones). llvm-svn: 367973
* gn build: Add AMDGPU targetNico Weber2019-08-068-1/+404
| | | | | | Differential Revision: https://reviews.llvm.org/D65767 llvm-svn: 367972
* gn build: Leave a comment why "-gen-searchable-table" tablegen()s are not ↵Nico Weber2019-08-063-0/+3
| | | | | | called FooGenSearchableTable llvm-svn: 367971
* gn build: Merge r367917Nico Weber2019-08-061-0/+1
| | | | llvm-svn: 367970
* Re-commit: [AMDGPU] Use S_DENORM_MODE for gfx10Austin Kerbow2019-08-069-33/+99
| | | | | | | | | | | | | | | | Summary: During fdiv32 lowering use S_DENORM_MODE to select denorm mode in gfx10. Reviewers: arsenm, rampitec Reviewed By: arsenm, rampitec Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65620 llvm-svn: 367969
* [NFC][DirectoryWatchedTests] Unlocks mutexes before signaling condition variablePuyan Lotfi2019-08-061-2/+6
| | | | | | | | | | | | | | | | | This should not affect actual behavior, but should pessimize the threading less by avoiding the situation where: * mutex is still locked * T1 notifies on condition variable * T2 wakes to check mutex * T2 sees mutex is still locked * T2 waits * T1 unlocks mutex * T2 tries again, acquires mutex. Differential Revision: https://reviews.llvm.org/D65708 llvm-svn: 367968
* Fix another MSVC issue after 367965Daniel Sanders2019-08-061-0/+3
| | | | | | | | Repeated the fix for MCRegister in Register This reverts r367932 (git commit eac86ec25f5cd5d7a973c913d3c2ca8c90b24115) llvm-svn: 367967
* [Attributor][NFC] Outline common pattern into helper methodJohannes Doerfert2019-08-061-37/+50
| | | | | | | This helper will also allow to also place logic to determine if an abstract attribute is necessary in the first place. llvm-svn: 367966
* Re-commit Register/MCRegister: Add conversion operators to avoid use of ↵Daniel Sanders2019-08-063-4/+33
| | | | | | | | | | | implicit convert to unsigned. NFC Added two more conversions to satisfy MSVC and moved the declaration of MCPhysReg to MCRegister.h to enable that This reverts r367932 (git commit eac86ec25f5cd5d7a973c913d3c2ca8c90b24115) llvm-svn: 367965
* [Attributor][Fix] Add const qualifierJohannes Doerfert2019-08-061-4/+4
| | | | | | I forgot to add this as part of the last commit. llvm-svn: 367964
* Revert "[CompilerType] Simplify the interface a bit more.."Davide Italiano2019-08-065-8/+38
| | | | | | | | There's actually a test downstream that fails with this. I think we can still get rid of it, but I need to do some work there first. llvm-svn: 367963
* [compiler-rt] Appending COMPILER_RT_LIBCXX_PATH -isystem include for xray (3)Puyan Lotfi2019-08-061-0/+7
| | | | | | | | | | | Third landing attempt: Added "if (HAVE_LIBCXX)" to keep Green Dragon green. Haven't found a better way to pass the libcxx include path for building compiler-rt with libcxx; this seems to be missing only for xray. Differential Revision: https://reviews.llvm.org/D65307 llvm-svn: 367962
* [Attributor] Provide a generic interface to check live instructionsJohannes Doerfert2019-08-062-105/+99
| | | | | | | | | | | | | | | | | | | Summary: Similar to `Attributor::checkForAllCallSites`, we now provide such functionality for instructions of a certain opcode through `Attributor::checkForAllInstructions` and the convenient wrapper `Attributor::checkForAllCallLikeInstructions`. This cleans up code, avoids duplication, and simplifies the usage of liveness information. Reviewers: sstefan1, uenoku Subscribers: hiraditya, bollu, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65731 llvm-svn: 367961
* [RISCV] Custom legalize i32 operations for RV64 to reduce signed extensionsShiva Chen2019-08-069-36/+191
| | | | | | Differential Revision: https://reviews.llvm.org/D65434 llvm-svn: 367960
* Silence ubsan after r367926.Peter Collingbourne2019-08-061-0/+1
| | | | | | | | | | | | Fixes e.g. http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap-ubsan/builds/14273 We can't left shift here because left shifting of a negative number is UB. The same doesn't apply to unsigned arithmetic, but switching to unsigned doesn't appear to stop ubsan from complaining, so we need to mask out the high bits. llvm-svn: 367959
* [clang-doc] Fix link generationDiego Astiazaran2019-08-067-8/+26
| | | | | | | | | | | | | | | | | | | Before making a link to a reference it is required to check that the reference has a path (eg. primitives won't have paths). This was done by checking if the path was empty; that worked because when generating paths the outdirectory was included, so if the path was assigned it had that outdirectory at least. The path generation was changed, it's now only the composite of the namespaces without the outdirectory. So if the info is in the global namespace the path would be empty and the old check wouldn't work as expected. A new attribute has been added to the Reference struct that indicates if the info's parent is the global namespace. Paths generation now fails if the path is empty and if the info is not in the global namespace. Differential Revision: https://reviews.llvm.org/D64958 llvm-svn: 367958
* [CompilerType] Simplify the interface a bit more..Davide Italiano2019-08-065-38/+8
| | | | | | | | | | | | | | | | | | | | | | Summary: .. removing IsMeaninglessWithoutTypeResolution(). I'm fairly confident this was introduced to support swift, where static types [without dynamic counterpart] don't carry a lot of value. Since then, the formatters and dynamic type resolution has been rewritten, and we employ different solutions. This function is unused here too, so let's get read of it. <rdar://problem/36377967> Reviewers: shafik, JDevlieghere, alex, compnerd, teemperor Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D65782 llvm-svn: 367957
* [CMake] Remove check for the readline target.Jonas Devlieghere2019-08-051-4/+1
| | | | | | | | | | | | This was introduced when we were building a custom readline Python module on Linux [1]. Now that the readline target doesn't exist anymore, it's safe to remove this dependency. This fixes https://llvm.org/PR25136 [1] https://reviews.llvm.org/D13268 llvm-svn: 367956
* [NFC] Remove useless staticJF Bastien2019-08-051-1/+1
| | | | | | The function is already inline in the header, static isn't what we want. llvm-svn: 367955
* Reverting D65760/r367944 due to buildbot failure.Puyan Lotfi2019-08-051-15/+1
| | | | | | | | http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/15952/steps/build/logs/stdio JITTargetMachineBuilder.cpp fails to build. llvm-svn: 367954
* [Attributor] Introduce the IRAttribute helper structJohannes Doerfert2019-08-052-146/+130
| | | | | | | | | | | | | | | | Summary: Certain properties, e.g., an AttrKind, are not shared among all abstract attributes. This patch extracts the functionality into a helper struct. Reviewers: uenoku, sstefan1 Subscribers: hiraditya, bollu, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65712 llvm-svn: 367953
* [Attributor] Make abstract attributes statelessJohannes Doerfert2019-08-052-402/+333
| | | | | | | | | | | | | | | | | To remove boilerplate, mostly passing through values to the AbstractAttriubute base class, we extract the state into an IRPosition helper. There is no function change intended but the IRPosition struct will provide more functionality down the line. Reviewers: sstefan1, uenoku Subscribers: hiraditya, bollu, jfb, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65711 llvm-svn: 367952
* [Attributor] Use proper ID for attribute lookupJohannes Doerfert2019-08-052-59/+88
| | | | | | | | | | | | | | | | | | Summary: The new scheme is similar to the pass manager and dyn_cast scheme where we identify classes by the address of a static member. This is better than the old scheme in which we had to "invent" new Attributor enums if there was no corresponding one. Reviewers: sstefan1, uenoku Subscribers: hiraditya, bollu, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65710 llvm-svn: 367951
* [Attributor][NFCI] Avoid duplication of the InformationCache referenceJohannes Doerfert2019-08-052-174/+153
| | | | | | | | | | | | | | | | Summary: Instead of storing the reference to the InformationCache we now pass it whenever it might be needed. Reviewers: sstefan1, uenoku Subscribers: hiraditya, bollu, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65709 llvm-svn: 367950
* [OpenMP] Add support for GOMP_*_nonmonotonic_* functionsJonathan Peyton2019-08-052-0/+62
| | | | | | | | Patch by Isuru Fernando Differential Revision: https://reviews.llvm.org/D65714 llvm-svn: 367949
* [Attributor] Deduce the "no-return" attribute for functionsJohannes Doerfert2019-08-0513-69/+420
| | | | | | | | | | | | | | | A function is "no-return" if we never reach a return instruction, either because there are none or the ones that exist are dead. Test have been adjusted: - either noreturn was added, or - noreturn was avoided by modifying the code. The new noreturn_{sync,async} test make sure we do handle invoke instructions with a noreturn (and potentially nowunwind) callee correctly, even in the presence of potential asynchronous exceptions. llvm-svn: 367948
* [Sema] attempt to appease buildbots after r367940George Burgess IV2019-08-051-1/+1
| | | | | | | | | | | | A buildbot got angry about this new test, with error messages like: warn-nullchar-nullptr.c Line 16: use of undeclared identifier 'u' It looks like this `u'c'` syntax was introduced in C11; I'm guessing some bots may default to something before that. Let's see if explicitly specifying the standard version makes it happy... llvm-svn: 367947
* [CompilerType] Remove an unused function.Davide Italiano2019-08-055-59/+0
| | | | | | | | | | | | | | | | | | Summary: This simplifies the interface, as I'm trying to understand how we can upstream swift support. <rdar://problem/36377967> Reviewers: teemperor, JDevlieghere, xiaobai, compnerd, friss Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D65781 llvm-svn: 367946
* [GlobalISel][CallLowering] Rename isArgumentHandler() -> ↵Amara Emerson2019-08-056-9/+9
| | | | | | | | | isIncomingArgumentHandler() Previous name and comment incorrectly implied it was just for formal arg handlers, which is not true. llvm-svn: 367945
* [ORC] Add CPU name and sub-target features to detectHostDiego Caballero2019-08-051-1/+15
| | | | | | | | | This commit adds host CPU name and sub-target features to the `JITTargetMachineBuilder` created by `JITTargetMachineBuilder::detectHost()`. Differential Revision: https://reviews.llvm.org/D65760 llvm-svn: 367944
* Build libfuzzer libcxx-static with PICYi Kong2019-08-051-0/+1
| | | | | | | | | | r356153 changed default build option of static libcxx to no PIC. We now need to explicitly specify CMAKE_POSITION_INDEPENDENT_CODE to get PIC libcxx. Differential Revision: https://reviews.llvm.org/D65773 llvm-svn: 367943
* [llvm-readelf] Support dumping of stack sizes sections with readelf ↵Wolfgang Pieb2019-08-055-0/+817
| | | | | | | | | | --stack-sizes Reviewers: jhenderson, grimar, rupprecht Differential Revision: https://reviews.llvm.org/D65313 llvm-svn: 367942
* Add a note to the release not about a potentially breaking optimizationPhilip Reames2019-08-051-0/+13
| | | | | | This has come up twice already (once in pr42763 and once in the commit thread), so give warning of a new way in which UB can result in unexpected program behavior. llvm-svn: 367941
* [Sema] Add -Wpointer-compareGeorge Burgess IV2019-08-054-0/+84
| | | | | | | | | | | | This patch adds a warning that diagnoses comparisons of pointers to '\0'. This is often indicative of a bug (e.g. the user might've forgotten to dereference the pointer). Patch by Elaina Guan! Differential Revision: https://reviews.llvm.org/D65595 llvm-svn: 367940
* [OpenMP] Fix broken build due to new OMPT testsHansang Bae2019-08-054-4/+4
| | | | | | | | | New OMPT tests with teams construct should be disabled for GCC as it emits code with a GOMP entry not supported in the LLVM runtime. Differential Revision: https://reviews.llvm.org/D65757 llvm-svn: 367939
* hwasan: Untag global variable addresses in tests.Peter Collingbourne2019-08-0514-42/+99
| | | | | | | | | | | | Once we start instrumenting globals, all addresses including those of string literals that we pass to the operating system will start being tagged. Since we can't rely on the operating system to be able to cope with these addresses, we need to untag them before passing them to the operating system. This change introduces a macro that does so and uses it everywhere it is needed. Differential Revision: https://reviews.llvm.org/D65768 llvm-svn: 367938
* Add "REQUIRES: x86-registered-target" to test.Peter Collingbourne2019-08-051-0/+2
| | | | llvm-svn: 367937
* [lldb][NFC] Document and refactor ↵Raphael Isemann2019-08-051-4/+16
| | | | | | ClangPersistentVariables::RemovePersistentVariable llvm-svn: 367936
* [WebAssembly] Fix conflict between ret legalization and sjljKeno Fischer2019-08-057-10/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: When the WebAssembly backend encounters a return type that doesn't fit within i32, SelectionDAG performs sret demotion, adding an additional argument to the start of the function that contains a pointer to an sret buffer to use instead. However, this conflicts with the emscripten sjlj lowering pass. There we translate calls like: ``` call {i32, i32} @foo() ``` into (in pseudo-llvm) ``` %addr = @foo call {i32, i32} @__invoke_{i32,i32}(%addr) ``` i.e. we perform an indirect call through an extra function. However, the sret transform now transforms this into the equivalent of ``` %addr = @foo %sret = alloca {i32, i32} call {i32, i32} @__invoke_{i32,i32}(%sret, %addr) ``` (while simultaneously translation the implementation of @foo as well). Unfortunately, this doesn't work out. The __invoke_ ABI expected the function address to be the first argument, causing crashes. There is several possible ways to fix this: 1. Implementing the sret rewrite at the IR level as well and performing it as part of lowering to __invoke 2. Fixing the wasm backend to recognize that __invoke has a special ABI 3. A change to the binaryen/emscripten ABI to recognize this situation This revision implements the middle option, teaching the backend to treat __invoke_ functions specially in sret lowering. This is achieved by 1) Introducing a new CallingConv ID for invoke functions 2) When this CallingConv ID is seen in the backend and the first argument is marked as sret (a function pointer would never be marked as sret), swapping the first two arguments. Reviewed By: tlively, aheejin Differential Revision: https://reviews.llvm.org/D65463 llvm-svn: 367935
* [Attributor][Fix] Do not remove instructions during manifestationJohannes Doerfert2019-08-054-13/+44
| | | | | | | | When we remove instructions cached references could still be live. This patch avoids removing invoke instructions that are replaced by calls and instead keeps them around but in a dead block. llvm-svn: 367933
* Revert Register/MCRegister: Add conversion operators to avoid use of ↵Daniel Sanders2019-08-053-27/+1
| | | | | | | | | | | | implicit convert to unsigned. NFC MSVC finds ambiguity where clang doesn't and it looks like it's not going to be an easy fix Reverting while I figure out how to fix it This reverts r367916 (git commit aa15ec3c231717826e3c262b5ef9813d2fb5cadb) This reverts r367920 (git commit 5d14efe279b5db9f4746ff834ab5c70e249d3871) llvm-svn: 367932
* [Attributor][Fix] Keep invokes if handlers catch asynchronous exceptionsJohannes Doerfert2019-08-051-9/+31
| | | | | | | | | | Similar to other places where we transform invokes to calls we need to be careful if the handler (=personality) can catch asynchronous exceptions as they are not modeled as part of nounwind. This is tested with D59978. llvm-svn: 367931
* [libc++] Accept any non-zero return for .fail.cpp testsLouis Dionne2019-08-051-2/+2
| | | | llvm-svn: 367930
* BMI2 support is indicated in bit eight of EBX, not nine.Eric Christopher2019-08-052-2/+2
| | | | | | | | | See Intel SDM, Vol 2A, Table 3-8: https://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-vol-2a-manual.pdf#page=296 Differential Revision: https://reviews.llvm.org/D65766 llvm-svn: 367929
* [NFC][pstl] Remove stray semi-colonLouis Dionne2019-08-051-1/+1
| | | | llvm-svn: 367928
* llvm-symbolizer: Untag addresses in object files by default.Peter Collingbourne2019-08-056-8/+42
| | | | | | | | | | Any addresses that we pass to llvm-symbolizer are going to be untagged, while any HWASAN instrumented globals are going to be tagged in the symbol table. Therefore we need to untag the addresses before using them. Differential Revision: https://reviews.llvm.org/D65769 llvm-svn: 367926
* [Sanitizer] Linux refactor shadow huge page mode handlingDavid Carlier2019-08-056-15/+15
| | | | | | | | | | | | Disabling Transparent huge page mode refactored in one function. Reviewers: vitalybuka Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D65771 llvm-svn: 367925
* [lldb][NFC] Refactor ClangUserExpression::UpdateLanguageForExprRaphael Isemann2019-08-052-16/+21
| | | | | | | | | The UpdateLanguageForExpr should only update the language, but over time it started to do also do different things related to the generation of the expression source code. This patch refactors all the source code generation part into its own function. llvm-svn: 367922
OpenPOWER on IntegriCloud