- Jan 27, 2019
-
-
Simon Pilgrim authored
llvm-svn: 352321
-
Sanjay Patel authored
Although this is longer code, this is no-functional-change-intended. The goal is to untangle the conditions under which we bail out, so that's easier to adjust. llvm-svn: 352320
-
Matt Arsenault authored
I expected this to be automatically verified, but it seems nothing uses that the type index was declared as a "ptype" llvm-svn: 352319
-
Roman Lebedev authored
While i have no intention of actually commiting regeneration of the check lines in these test files with update_llc_test_checks, lack of that whitespace breaks that util, which is mildly inconvenient. llvm-svn: 352318
-
Roman Lebedev authored
llvm-svn: 352317
-
Simon Pilgrim authored
llvm-svn: 352316
-
Simon Pilgrim authored
Add generic costs calculation for SADDSAT/SSUBSAT intrinsics, this uses generic costs for sadd_with_overflow/ssub_with_overflow, an extra sign comparison + a selects based on the sign/overflow. This completes PR40316 Differential Revision: https://reviews.llvm.org/D57239 llvm-svn: 352315
-
Simon Pilgrim authored
llvm-svn: 352314
-
Simon Pilgrim authored
llvm-svn: 352313
-
Amara Emerson authored
I reverted it originally due to a bot failing. The underlying bug has been fixed as of r352311. llvm-svn: 352312
-
Amara Emerson authored
This fixes loads like 's1 = load %p (load 1 from %p)' being combined with an extend into an illegal 's8 = g_extload %p (load 1 from %p)' which doesn't do any extension, by avoiding touching those < s8 size loads. This bug was uncovered by a verifier update r351584, which I reverted it to keep the bots green. llvm-svn: 352311
-
Thomas Preud'homme authored
This reverts commit r351038. llvm-svn: 352310
-
Thomas Preud'homme authored
This reverts commit r351039. llvm-svn: 352309
-
Thomas Preud'homme authored
This reverts commit r351042. llvm-svn: 352308
-
Bill Wendling authored
Summary: Sugar, like ConstantExpr, causes an infinite expansion of the template object. Reviewers: rsmith, aaron.ballman Reviewed By: aaron.ballman Subscribers: riccibruno, aaron.ballman, cfe-commits, tzik, rnk Differential Revision: https://reviews.llvm.org/D57114 llvm-svn: 352307
-
Gabor Buella authored
The add+and sequence followed by a branch can happen e.g. when looping over the set bits of an integer: ``` while (x != 0) { func(x & ~x); x &= x - 1; } ``` Reviewed By: ctopper Differential Revision: https://reviews.llvm.org/D57296 llvm-svn: 352306
-
Gabor Buella authored
llvm-svn: 352305
-
Nico Weber authored
The diagnostic there fired spuriosly due to uninitialized memory. llvm-svn: 352304
-
Craig Topper authored
def32 here means the producing instruction zeroed bits 63:32. We already do this for zext, but it looks like we can get an and+anyext sometimes. Spotted in the diffs from D33587. llvm-svn: 352303
-
Nick Desaulniers authored
Summary: lld discards .gnu.linonce.* sections work around a bug in glibc. https://sourceware.org/bugzilla/show_bug.cgi?id=20543 Unfortunately, the Linux kernel uses a section named .gnu.linkonce.this_module to store infomation about kernel modules. The kernel reads data from this section when loading kernel modules, and errors if it fails to find this section. The current behavior of lld discards this section when kernel modules are linked, so kernel modules linked with lld are unloadable by the linux kernel. The Linux kernel should use a comdat section instead of .gnu.linkonce. The minimum version of binutils supported by the kernel supports comdat sections. The kernel is also not relying on the old linkonce behavior; it seems to have chosen a name that contains a deprecated GNU feature. Changing the section name now in the kernel would require all kernel modules to be recompiled to make use of the new section name. Instead, rather than discarding .gnu.linkonce.*, let's discard the more specific section name to continue working around the glibc issue while supporting linking Linux kernel modules. Link: https://github.com/ClangBuiltLinux/linux/issues/329 Reviewers: pcc, espindola Reviewed By: pcc Subscribers: nathanchance, emaste, arichardson, void, srhines Differential Revision: https://reviews.llvm.org/D57294 llvm-svn: 352302
-
Matt Arsenault authored
llvm-svn: 352301
-
Matt Arsenault authored
llvm-svn: 352300
-
Johannes Doerfert authored
llvm-svn: 352299
-
Matt Arsenault authored
llvm-svn: 352298
-
Matt Arsenault authored
llvm-svn: 352297
-
Amara Emerson authored
When the fneg IR instruction was added the code to do translation wasn't tested, and tried to get an invalid operand. llvm-svn: 352296
-
Matt Arsenault authored
llvm-svn: 352295
-
Matt Arsenault authored
llvm-svn: 352294
-
Johannes Doerfert authored
Bitcast and certain Ptr2Int/Int2Ptr instructions will not alter the value of their operand and can therefore be looked through when we determine non-nullness. Differential Revision: https://reviews.llvm.org/D54956 llvm-svn: 352293
-
- Jan 26, 2019
-
-
Kristof Umann authored
[analyzer] Add CheckerManager::getChecker, make sure that a registry function registers no more than 1 checker This patch effectively fixes the almost decade old checker naming issue. The solution is to assert when CheckerManager::getChecker is called on an unregistered checker, and assert when CheckerManager::registerChecker is called on a checker that is already registered. Differential Revision: https://reviews.llvm.org/D55429 llvm-svn: 352292
-
Simon Pilgrim authored
Fix issue noted in D57281 that only tested the one use for the SDValue (the result flag), not the entire SUB. I've added the getNode() to make it clearer what is intended than just the -> redirection. llvm-svn: 352291
-
Kristof Umann authored
llvm-svn: 352290
-
Simon Pilgrim authored
As discussed on PR24545, we should try to commute X86::COND_A 'icmp ugt' cases to X86::COND_B 'icmp ult' to more optimally bind the carry flag output to a SBB instruction. Differential Revision: https://reviews.llvm.org/D57281 llvm-svn: 352289
-
Simon Pilgrim authored
We often generate X86ISD::SBB(X, 0) for carry flag arithmetic. I had tried to create test cases for the ADC equivalent (which often uses the same pattern) but haven't managed to find anything yet. Differential Revision: https://reviews.llvm.org/D57169 llvm-svn: 352288
-
Kristof Umann authored
Unfortunately, up until now, the fact that certain checkers depended on one another was known, but how these actually unfolded was hidden deep within the implementation. For example, many checkers (like RetainCount, Malloc or CString) modelled a certain functionality, and exposed certain reportable bug types to the user. For example, while MallocChecker models many many different types of memory handling, the actual "unix.MallocChecker" checker the user was exposed to was merely and option to this modeling part. Other than this being an ugly mess, this issue made resolving the checker naming issue almost impossible. (The checker naming issue being that if a checker registered more than one checker within its registry function, both checker object recieved the same name) Also, if the user explicitly disabled a checker that was a dependency of another that _was_ explicitly enabled, it implicitly, without "telling" the user, reenabled it. Clearly, changing this to a well structured, declarative form, where the handling of dependencies are done on a higher level is very much preferred. This patch, among the detailed things later, makes checkers declare their dependencies within the TableGen file Checkers.td, and exposes the same functionality to plugins and statically linked non-generated checkers through CheckerRegistry::addDependency. CheckerRegistry now resolves these dependencies, makes sure that checkers are added to CheckerManager in the correct order, and makes sure that if a dependency is disabled, so will be every checker that depends on it. In detail: * Add a new field to the Checker class in CheckerBase.td called Dependencies, which is a list of Checkers. * Move unix checkers before cplusplus, as there is no forward declaration in tblgen :/ * Add the following new checkers: - StackAddrEscapeBase - StackAddrEscapeBase - CStringModeling - DynamicMemoryModeling (base of the MallocChecker family) - IteratorModeling (base of the IteratorChecker family) - ValistBase - SecuritySyntaxChecker (base of bcmp, bcopy, etc...) - NSOrCFErrorDerefChecker (base of NSErrorChecker and CFErrorChecker) - IvarInvalidationModeling (base of IvarInvalidation checker family) - RetainCountBase (base of RetainCount and OSObjectRetainCount) * Clear up and registry functions in MallocChecker, happily remove old FIXMEs. * Add a new addDependency function to CheckerRegistry. * Neatly format RUN lines in files I looked at while debugging. Big thanks to Artem Degrachev for all the guidance through this project! Differential Revision: https://reviews.llvm.org/D54438 llvm-svn: 352287
-
Amaury Sechet authored
llvm-svn: 352285
-
Kristof Umann authored
My last patch, D56989, moved the validation of whether a checker exists into its constructor, but we do support statically linked (and non-plugin) checkers that were do not have an entry in Checkers.td. However, the handling of this happens after the creation of the CheckerRegistry object. This patch fixes this bug by moving even this functionality into CheckerRegistry's constructor. llvm-svn: 352284
-
Simon Pilgrim authored
llvm-svn: 352283
-
Kristof Umann authored
[analyzer][NFC] Keep track of whether enabling a checker was explictly specified in command line arguments I added a new enum to CheckerInfo, so we can easily track whether the check is explicitly enabled, explicitly disabled, or isn't specified in this regard. Checkers belonging in the latter category may be implicitly enabled through dependencies in the followup patch. I also made sure that this is done within CheckerRegisty's constructor, leading to very significant simplifications in its query-like methods. Differential Revision: https://reviews.llvm.org/D56989 llvm-svn: 352282
-
Simon Pilgrim authored
llvm-svn: 352281
-