- Oct 19, 2018
-
-
Mandeep Singh Grang authored
Reviewers: rnk, compnerd, mstorsjo, efriedma, TomTan, haripul, javed.absar Reviewed By: efriedma Subscribers: dmajor, kristof.beyls, chrib, cfe-commits Differential Revision: https://reviews.llvm.org/D53115 llvm-svn: 344765
-
Chandler Carruth authored
This updates the C API for the removal of `TerminatorInst`. It converts the type query to a predicate query and moves the generic methods to work on `Instruction` instances that satisfy this predicate rather than requiring a specific type. It also clarifies that the C API wrapping `BasicBlock::getTerminator` just returns an `Instruction`. Because this was always wrapped opaquely as a value and the functions consuming these values will work on `Instruction` objects, this shouldn't break any clients. This is a completely compatible change to the C API. Differential Revision: https://reviews.llvm.org/D52968 llvm-svn: 344764
-
Lang Hames authored
Because I'm about to get on stage at the dev meeting and claim that it exists. This method creates a JITDylib instance with the given name and returns a reference to it. llvm-svn: 344763
-
- Oct 18, 2018
-
-
David Bolvansky authored
llvm-svn: 344762
-
David Bolvansky authored
llvm-svn: 344761
-
Roman Lebedev authored
I'm not sure if it will actually help or not. ppc64be-clang-lnt-test bot is failing. llvm-svn: 344760
-
David Bolvansky authored
Summary: Fixes PR27439 Reviewers: rsmith, Rakete1111 Reviewed By: rsmith Subscribers: Rakete1111, cfe-commits Differential Revision: https://reviews.llvm.org/D52750 llvm-svn: 344759
-
Roman Lebedev authored
__float128 isn't universally avaliable. llvm-svn: 344758
-
Roman Lebedev authored
Summary: Finds classes that not only contain the data (non-static member variables), but also have logic (non-static member functions), and diagnoses all member variables that have any other scope other than `private`. They should be made `private`, and manipulated exclusively via the member functions. Optionally, classes with all member variables being `public` could be ignored, and optionally all `public` member variables could be ignored. Options ------- * IgnoreClassesWithAllMemberVariablesBeingPublic Allows to completely ignore classes if **all** the member variables in that class have `public` visibility. * IgnorePublicMemberVariables Allows to ignore (not diagnose) **all** the member variables with `public` visibility scope. References: * MISRA 11-0-1 Member data in non-POD class types shall be private. * https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#c2-use-class-if-the-class-has-an-invariant-use-struct-if-the-data-members-can-vary-independently * https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rc-private * https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rh-protected Reviewers: JonasToth, aaron.ballman, alexfh, hokein, xazax.hun Reviewed By: aaron.ballman Subscribers: Eugene.Zelenko, zinovy.nis, cfe-commits, rnkovacs, nemanjai, mgorny, xazax.hun, kbarton Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D52771 llvm-svn: 344757
-
Sylvestre Ledru authored
Svante Signell llvm-svn: 344756
-
Roman Lebedev authored
[clang-tidy] Add new 'readability-uppercase-literal-suffix' check (CERT DCL16-C, MISRA C:2012, 7.3, MISRA C++:2008, 2-13-4) Summary: Detects when the integral literal or floating point (decimal or hexadecimal) literal has non-uppercase suffix, and suggests to make the suffix uppercase, with fix-it. All valid combinations of suffixes are supported. ``` auto x = 1; // OK, no suffix. auto x = 1u; // warning: integer literal suffix 'u' is not upper-case auto x = 1U; // OK, suffix is uppercase. ... ``` References: * [[ https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?pageId=87152241 | CERT DCL16-C ]] * MISRA C:2012, 7.3 - The lowercase character "l" shall not be used in a literal suffix * MISRA C++:2008, 2-13-4 - Literal suffixes shall be upper case Reviewers: JonasToth, aaron.ballman, alexfh, hokein, xazax.hun Reviewed By: aaron.ballman Subscribers: Eugene.Zelenko, mgorny, rnkovacs, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D52670 llvm-svn: 344755
-
Mircea Trofin authored
Summary: Function::getInstructionCount can be const. Reviewers: davidxl, paquette Reviewed By: davidxl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D53378 llvm-svn: 344754
-
Eli Friedman authored
Still causing failures on the polly-aosp buildbot; I'll follow up with a reduced testcase. llvm-svn: 344752
-
Dan Albert authored
Summary: C++ flags should not be used for not-C++ files as it may trigger -Werror=unused-command-line-argument. CMake will use CMAKE_C_FLAGS, CMAKE_CXX_FLAGS, and CMAKE_ASM_FLAGS as appropriate implicitly, so this does not need to be explicitly handled here. This change depends on https://reviews.llvm.org/D53301, since one of the builders depended on this behavior because it was not configuring CMAKE_ASM_FLAGS. Reviewers: eugenis, vitalybuka Reviewed By: eugenis, vitalybuka Subscribers: dberris, mgorny, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D53335 llvm-svn: 344751
-
Aaron Ballman authored
llvm-svn: 344750
-
Aaron Ballman authored
As described in D40225, the C17 standard was balloted and approved in 2017, but the ISO publication process delayed the actual publication until 2018. WG14 considers the release to be C17 and describes it as such, but users can still be confused by the publication year which is why -std=c18 adds value. These aliases map to c17 and are all supported by GCC 8.x with the same behavior. Note that the value of __STDC_VERSION__ remains at 201710L. llvm-svn: 344749
-
Sumanth Gundapaneni authored
In a loop, create artificial dependences between the source of a COPY/REG_SEQUENCE to the use in next iteration. Eg: SRC ----Data Dep--> COPY COPY ---Anti Dep--> PHI (implies, to be used in next iteration) PHI ----Data Dep--> USE This patches creates USE ----Artificial Dep---> SRC This will effectively schedule the COPY late to eliminate additional copies. Before this patch, the schedule can be SRC, COPY, USE : The COPY is used in next iteration and it needs to be preserved. After this patch, the schedule can be USE, SRC, COPY : The COPY is used in next iteration and the live interval is reduced. Differential Revision: https://reviews.llvm.org/D53303 llvm-svn: 344748
-
Sean Fertile authored
Adjusted the range check on a call instruction from 24 bits signed to 26 bits signed. While the instruction only encodes 24 bits, the target is assumed to be 4 byte aligned, and the value that is encoded in the instruction gets shifted left by 2 to form the offset. Also added a check that the offset is indeed at least 4 byte aligned. Differential Revision: https://reviews.llvm.org/D53401 llvm-svn: 344747
-
Michal Gorny authored
Differential Revision: https://reviews.llvm.org/D53402 llvm-svn: 344746
-
Haojian Wu authored
Summary: The RefSlab::size can easily cause confusions, it returns the number of different symbols, rahter than the number of all references. - add numRefs() method and cache it, since calculating it everytime is nontrivial. - clear misused places. Reviewers: sammccall Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D53389 llvm-svn: 344745
-
Stella Stamenova authored
Summary: They fail similarly to some of the other breakpoint tests on Windows, so I suspect the cause is the same. I've linked to the same bug. Reviewers: asmith, zturner, jingham Subscribers: abidh, lldb-commits Differential Revision: https://reviews.llvm.org/D53331 llvm-svn: 344744
-
Ayal Zaks authored
When optimizing for size, a loop is vectorized only if the resulting vector loop completely replaces the original scalar loop. This holds if no runtime guards are needed, if the original trip-count TC does not overflow, and if TC is a known constant that is a multiple of the VF. The last two TC-related conditions can be overcome by 1. rounding the trip-count of the vector loop up from TC to a multiple of VF; 2. masking the vector body under a newly introduced "if (i <= TC-1)" condition. The patch allows loops with arbitrary trip counts to be vectorized under -Os, subject to the existing cost model considerations. It also applies to loops with small trip counts (under -O2) which are currently handled as if under -Os. The patch does not handle loops with reductions, live-outs, or w/o a primary induction variable, and disallows interleave groups. (Third, final and main part of -) Differential Revision: https://reviews.llvm.org/D50480 llvm-svn: 344743
-
Kristina Brooks authored
This flag is only supported for x86 targets, make sure the tests only run for those. llvm-svn: 344742
-
Sam McCall authored
Summary: LSP is a slightly awkward map to C++ object lifetimes: the initialize request is part of the protocol and provides information that doesn't change over the lifetime of the server. Until now, we handled this by initializing ClangdServer and ClangdLSPServer right away, and making anything that can be set in the "initialize" request mutable. With this patch, we create ClangdLSPServer immediately, but defer creating ClangdServer until "initialize". This opens the door to passing the relevant initialize params in the constructor and storing them immutably. (That change isn't actually done in this patch). To make this safe, we have the MessageDispatcher enforce that the "initialize" method is called before any other (as required by LSP). That way each method handler can assume Server is initialized, as today. As usual, while implementing this I found places where our test cases violated the protocol. Reviewers: ioeric Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D53398 llvm-svn: 344741
-
Patrick Lyster authored
[OPENMP] Move OMPClausePrinter to OpenMPClause.h/OpenMPClause.cpp - NFC. Differential Revision: https://reviews.llvm.org/D53102 llvm-svn: 344740
-
Kristina Brooks authored
This patch exposes functionality added in rL344723 to the Clang driver/frontend as a flag and adds appropriate metadata. Driver tests pass: ``` ninja check-clang-driver -snip- Expected Passes : 472 Expected Failures : 3 Unsupported Tests : 65 ``` Odd failure in CodeGen tests but unrelated to this: ``` ninja check-clang-codegen -snip- /SourceCache/llvm-trunk-8.0/tools/clang/test/CodeGen/builtins-wasm.c:87:10: error: cannot compile this builtin function yet -snip- Failing Tests (1): Clang :: CodeGen/builtins-wasm.c Expected Passes : 1250 Expected Failures : 2 Unsupported Tests : 120 Unexpected Failures: 1 ``` Original commit: [X86] Support for the mno-tls-direct-seg-refs flag Allows to disable direct TLS segment access (%fs or %gs). GCC supports a similar flag, it can be useful in some circumstances, e.g. when a thread context block needs to be updated directly from user space. More info and specific use cases: https://bugs.llvm.org/show_bug.cgi?id=16145 Patch by nruslan (Ruslan Nikolaev). Differential Revision: https://reviews.llvm.org/D53102 llvm-svn: 344739
-
Nicolai Haehnle authored
Thanks to Simon Moll for chasing it down. Change-Id: If188f07c4aaec217f40a7a2ca029818f9202f1cb llvm-svn: 344738
-
Sam McCall authored
Summary: Most of its functionality is moved into ClangdLSPServer. The decoupling between JSONRPCDispatcher, ProtocolCallbacks, ClangdLSPServer was never real, and only served to obfuscate. Some previous implicit/magic stuff is now explicit: - the return type of LSP method calls are now in the signature - no more reply() that gets the ID using global context magic - arg tracing no longer relies on RequestArgs::stash context magic either This is mostly refactoring, but some deliberate fixes while here: - LSP method params are now by const reference - notifications and calls are now distinct namespaces. (some tests had protocol errors and needed updating) - we now reply to calls we failed to decode - outgoing calls use distinct IDs A few error codes and message IDs changed in unimportant ways (see tests). Reviewers: ioeric Subscribers: mgorny, ilya-biryukov, javed.absar, MaskRay, jkorous, arphaman, jfb, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D53387 llvm-svn: 344737
-
Eric Liu authored
Summary: These are often not expected to be used directly e.g. ``` TEST_F(Fixture, X) { ^ // "Fixture_X_Test" expanded in the macro should be down ranked. } ``` Only doing this for sema for now, as such symbols are mostly coming from sema e.g. gtest macros expanded in the main file. We could also add a similar field for the index symbol. Reviewers: sammccall Reviewed By: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D53374 llvm-svn: 344736
-
Haojian Wu authored
Summary: This would buy us more memory. Using a 32-bits integer is enough for most human-readable source code (up to 4M lines and 4K columns). Previsouly, we used 8 bytes for a position, now 4 bytes, it would save us 8 bytes for each Ref and each Symbol instance. For LLVM-project binary index file, we save ~13% memory. | Before | After | | 412MB | 355MB | Reviewers: sammccall Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D53363 llvm-svn: 344735
-
Nicolai Haehnle authored
Summary: This is patch 2 of the new DivergenceAnalysis (https://reviews.llvm.org/D50433). This patch contains a generic divergence analysis implementation for unstructured, reducible Control-Flow Graphs. It contains two new classes. The `SyncDependenceAnalysis` class lazily computes sync dependences, which relate divergent branches to points of joining divergent control. The `DivergenceAnalysis` class contains the generic divergence analysis implementation. Reviewers: nhaehnle Reviewed By: nhaehnle Subscribers: sameerds, kristina, nhaehnle, xbolva00, tschuett, mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D51491 llvm-svn: 344734
-
Haojian Wu authored
Summary: Previously, ptr.reset(new char[5]) will be replaced with `p = make_unique<char[]>(5)`, the fix has side effect -- doing default initialization, it may cause performace regression (we are bitten by this rececntly) The check should be conservative for these cases. Reviewers: alexfh Subscribers: xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D53377 llvm-svn: 344733
-
Sam McCall authored
Summary: Previously this required a conversion to json::Array/json::Object first. Reviewers: ioeric Subscribers: kristina, llvm-commits Differential Revision: https://reviews.llvm.org/D53385 llvm-svn: 344732
-
Guillaume Chatelet authored
llvm-svn: 344731
-
Chandler Carruth authored
and use the range based successor API. llvm-svn: 344730
-
Aleksandr Urakov authored
Summary: This patch makes Windows threads to compare by a thread ID, not by a handle. It's because the same thread can have different handles on Windows (for example, `GetCurrentThread` always returns the fake handle `-2`). This leads to some incorrect behavior. For example, in `Process::GetRunLock` always `m_public_run_lock` is returned without this patch. Reviewers: zturner, clayborg, stella.stamenova Reviewed By: stella.stamenova Subscribers: stella.stamenova, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D53357 llvm-svn: 344729
-
Chandler Carruth authored
vanish subclass name. llvm-svn: 344728
-
Chandler Carruth authored
documentation. llvm-svn: 344727
-
Chandler Carruth authored
For the Go bindings, this just removes the no longer useful "isa"-style wrapper. If there is a user that is interested, they can add a wrapper for `Instruction::isTerminator`. For the OCaml bindings, this is just a documentation update. llvm-svn: 344726
-
Mikael Holmen authored
Summary: In several places in the code we use the following pattern: if (hasUnaryFloatFn(&TLI, Ty, LibFunc_tan, LibFunc_tanf, LibFunc_tanl)) { [...] Value *Res = emitUnaryFloatFnCall(X, TLI.getName(LibFunc_tan), B, Attrs); [...] } In short, we check if there is a lib-function for a certain type, and then we _always_ fetch the name of the "double" version of the lib function and construct a call to the appropriate function, that we just checked exists, using that "double" name as a basis. This is of course a problem in cases where the target doesn't support the "double" version, but e.g. only the "float" version. In that case TLI.getName(LibFunc_tan) returns "", and emitUnaryFloatFnCall happily appends an "f" to "", and we erroneously end up with a call to a function called "f". To solve this, the above pattern is changed to if (hasUnaryFloatFn(&TLI, Ty, LibFunc_tan, LibFunc_tanf, LibFunc_tanl)) { [...] Value *Res = emitUnaryFloatFnCall(X, &TLI, LibFunc_tan, LibFunc_tanf, LibFunc_tanl, B, Attrs); [...] } I.e instead of first fetching the name of the "double" version and then letting emitUnaryFloatFnCall() add the final "f" or "l", we let emitUnaryFloatFnCall() fetch the right name from TLI. Reviewers: eli.friedman, efriedma Reviewed By: efriedma Subscribers: efriedma, bjope, llvm-commits Differential Revision: https://reviews.llvm.org/D53370 llvm-svn: 344725
-