- Nov 20, 2018
-
-
Max Kazantsev authored
The initial version of patch lacked Phi nodes updates in destinations of removed edges. This version contains this update and tests on this situation. Differential Revision: https://reviews.llvm.org/D54021 llvm-svn: 347289
-
Nemanja Ivanovic authored
Turns out that there was no check for a store that truncates down to a single byte when combining a (store (bswap...)) into a byte-swapping store. This patch just adds that check. Fixes https://bugs.llvm.org/show_bug.cgi?id=39478. llvm-svn: 347288
-
Craig Topper authored
[SelectionDAG] Compute known bits and num sign bits for live out vector registers. Use it to add AssertZExt/AssertSExt in the live in basic blocks Summary: We already support this for scalars, but it was explicitly disabled for vectors. In the updated test cases this allows us to see the upper bits are zero to use less multiply instructions to emulate a 64 bit multiply. This should help with this ispc issue that a coworker pointed me to https://github.com/ispc/ispc/issues/1362 Reviewers: spatel, efriedma, RKSimon, arsenm Reviewed By: spatel Subscribers: wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D54725 llvm-svn: 347287
-
Dean Michael Berris authored
Use a more representative test of allocating small chunks for oddly-sized (small) objects from an allocator that has a page's worth of memory. llvm-svn: 347286
-
Matthew Voss authored
llvm-svn: 347284
-
Jonas Devlieghere authored
Skip this test because Windows deals differently with shared libraries. llvm-svn: 347283
-
Peter Collingbourne authored
Because SCS relies on system-provided runtime support, we can use it together with any other sanitizer simply by linking the runtime for the other sanitizer. Differential Revision: https://reviews.llvm.org/D54735 llvm-svn: 347282
-
Lang Hames authored
If args is empty then accesing element 0 is illegal. https://reviews.llvm.org/D53556 Patch by Eugene Sharygin. Thanks Eugene! llvm-svn: 347281
-
Dean Michael Berris authored
Summary: This change addresses an issue which shows up with the synchronised race between threads writing into a buffer, and another thread reading the buffer. In a lot of cases, we cannot guarantee that threads will always see the signal to finalise their buffers in time despite the grace periods and state machine maintained through atomic variables. This change addresses it by ensuring that the same instance being updated to indicate how much of the buffer is "used" by the writing thread is the same instance being read by the thread processing the buffer to be written out to disk or handled through the iterators. To do this, we ensure that all the "extents" instances live in their own the backing store, in a different contiguous page from the buffer-specific backing store. We also take precautions to ensure that the atomic variables are cache-line-sized to prevent false-sharing from unnecessarily causing cache contention on unrelated writes/reads. It's feasible that we may in the future be able to move the storage of the extents objects into the single backing store, slightly changing the way to compute the size(s) of the buffers, but in the meantime we'll settle for the isolation afforded by having a different backing store for the extents instances. Reviewers: mboerger Subscribers: jfb, llvm-commits Differential Revision: https://reviews.llvm.org/D54684 llvm-svn: 347280
-
Petr Hosek authored
This change is part of the soft-transition to the new synchronization primitives which implement priority inheritance. Differential Revision: https://reviews.llvm.org/D54727 llvm-svn: 347279
-
Sanjay Patel authored
llvm-svn: 347278
-
Heejin Ahn authored
Reviewers: sbc100 Subscribers: dschuff, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D54734 llvm-svn: 347277
-
Zachary Turner authored
PointerAttributes is a bitwise-or of several other fields, each of which is already printed on its own line with a better explanation. So this doesn't really help much. llvm-svn: 347275
-
Stanislav Mekhanoshin authored
Differential Revision: https://reviews.llvm.org/D54728 llvm-svn: 347274
-
Heejin Ahn authored
Reviewers: sbc100 Subscribers: dschuff, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D54688 llvm-svn: 347273
-
Heejin Ahn authored
Summary: At the beginning of `assignIndexes() function, when `FunctionIndex` and `GlobalIndex` variables are created, `InputFunctions` and `InputGlobals` vectors are guaranteed to be empty, because those vectors are only populated in `assignIndexes()` function. Current code looks like they are nonempty, so this patch deletes them for better readability. Reviewers: sbc100 Subscribers: dschuff, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D54687 llvm-svn: 347272
-
Paul Robinson authored
llvm-svn: 347271
-
Kamil Rytarowski authored
Summary: setvbuf(3) is a routine to setup stream buffering. Enable the interceptor for NetBSD. Add dedicated tests for setvbuf(3) and functions on top of this interface: setbuf, setbuffer, setlinebuf. Based on original work by Yang Zheng. Reviewers: joerg, vitalybuka Reviewed By: vitalybuka Subscribers: devnexen, tomsun.0.7, kubamracek, llvm-commits, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54548 llvm-svn: 347270
-
Reid Kleckner authored
Put 'static' on three functions in an anonymous namespace as per our coding style. Remove the 'namespace llvm {}' around the .cpp file and explicitly declare the free function 'llvm::optimizeGlobalCtorsList' in 'llvm::'. I prefer this style for free functions because the compiler will error out if the .h and .cpp files don't agree on the function name or prototype. llvm-svn: 347269 -
Craig Topper authored
Now that we no longer have target specific vector extend nodes let's make the function name match the nodes we do use. llvm-svn: 347268
-
Louis Dionne authored
llvm-svn: 347267
-
Craig Topper authored
[X86] Add test case to show missed opportunity to use a single pmuludq to implement a multiply when a zext lives in another basic block. This can occur when one of the inputs to the multiply is loop invariant. Though my test cases just use two basic blocks with an unconditional jump which we won't merge until after isel in the codegen pipeline. For scalars, I believe SelectionDAGBuilder can add an AssertZExt to pass knowledge across basic blocks but its explicitly disabled for vectors. llvm-svn: 347266
-
Konstantin Zhuravlyov authored
GFX9 should select opsel version. Differential Revision: https://reviews.llvm.org/D54545 llvm-svn: 347265
-
Louis Dionne authored
The XFAIL started passing since we're only testing for trivial-copyability of reference_wrapper in C++14 and above. This commit constrains the XFAIL to gcc-4.9 with C++14 (it would also fail on C++17 and above, but those standards are not available with GCC 4.9). llvm-svn: 347264
-
Louis Dionne authored
N4151 is not an extension anymore, it was standardized in C++14. llvm-svn: 347263
-
Vedant Kumar authored
popRegions used to assume that the start location of a region can't be nested deeper than the end location, which is not always true. Patch by Orivej Desh! Differential Revision: https://reviews.llvm.org/D53244 llvm-svn: 347262
-
Vedant Kumar authored
If PerformConstructorInitialization of a direct initializer list constructor is called while instantiating a template, it has brace locations in its BraceLoc arguments but not in the Kind argument. This reverts the hunk https://reviews.llvm.org/D41921#inline-468844. Patch by Orivej Desh! Differential Revision: https://reviews.llvm.org/D53231 llvm-svn: 347261
-
Benjamin Kramer authored
This reverts commits r347183 & r347184. Crashes while building libxml. llvm-svn: 347260
-
Stanislav Mekhanoshin authored
This works if DAG combiner is enabled, but without combining we cannot select scalar_to_vector of <2 x half> and <2 x i16>. Differential Revision: https://reviews.llvm.org/D54718 llvm-svn: 347259
-
Roman Lebedev authored
Summary: As reported by @regehr (thanks!) on twitter (https://twitter.com/johnregehr/status/1057681496255815686), we (me) has completely forgot about the binary assignment operator. In AST, it isn't represented as separate `ImplicitCastExpr`'s, but as a single `CompoundAssignOperator`, that does all the casts internally. Which means, out of these two, only the first one is diagnosed: ``` auto foo() { unsigned char c = 255; c = c + 1; return c; } auto bar() { unsigned char c = 255; c += 1; return c; } ``` https://godbolt.org/z/JNyVc4 This patch does handle the `CompoundAssignOperator`: ``` int main() { unsigned char c = 255; c += 1; return c; } ``` ``` $ ./bin/clang -g -fsanitize=integer /tmp/test.c && ./a.out /tmp/test.c:3:5: runtime error: implicit conversion from type 'int' of value 256 (32-bit, signed) to type 'unsigned char' changed the value to 0 (8-bit, unsigned) #0 0x2392b8 in main /tmp/test.c:3:5 #1 0x7fec4a612b16 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x22b16) #2 0x214029 in _start (/build/llvm-build-GCC-release/a.out+0x214029) ``` However, the pre/post increment/decrement is still not handled. Reviewers: rsmith, regehr, vsk, rjmccall, #sanitizers Reviewed By: rjmccall Subscribers: mclow.lists, cfe-commits, regehr Tags: #clang, #sanitizers Differential Revision: https://reviews.llvm.org/D53949 llvm-svn: 347258
-
Vedant Kumar authored
Assigning a merged debug location to the `mergeStoreIntoSuccessor` phi improves backtrace quality. Fixes llvm.org/PR38083. llvm-svn: 347257
-
Vedant Kumar authored
Add methods to BasicBlock which make it easier to efficiently check whether a block has N (or more) predecessors. This can be more efficient than using pred_size(), which is a linear time operation. We might consider adding similar methods for successors. I haven't done so in this patch because succ_size() is already O(1). With this patch applied, I measured a 0.065% compile-time reduction in user time for running `opt -O3` on the sqlite3 amalgamation (30 trials). The change in mergeStoreIntoSuccessor alone saves 45 million linked list iterations in a stage2 Release build of llc. See llvm.org/PR39702 for a harder but more general way of achieving similar results. Differential Revision: https://reviews.llvm.org/D54686 llvm-svn: 347256
-
Simon Pilgrim authored
Consistently use (!LegalOperations || isOperationLegalOrCustom) for all node pairs. Differential Revision: https://reviews.llvm.org/D53478 llvm-svn: 347255
-
Reid Kleckner authored
Otherwise, the clang analyzer tests fail on Windows when attempting to unpickle AnalyzerTest objects in the worker processes. The pattern of, add to path, import, remove from path, serialize, deserialize, doesn't work. Once something gets added to the path, if we want to move it across the wire for multiprocessing, we need to keep the module on sys.path. llvm-svn: 347254
-
Simon Pilgrim authored
llvm-svn: 347253
-
Simon Pilgrim authored
llvm-svn: 347252
-
Simon Pilgrim authored
As discussed on D53794, for float types with ranges smaller than the destination integer type, then we should be able to just use a regular FP_TO_SINT opcode. I thought we'd need to provide MSA test cases for very small integer types as well (fp16 -> i8 etc.), but it turns out that promotion will kick in so they're unnecessary. Differential Revision: https://reviews.llvm.org/D54703 llvm-svn: 347251
-
Roman Lebedev authored
/build/llvm/include/llvm/IR/DebugInfoMetadata.h: In static member function ‘static llvm::DISubprogram::DISPFlags llvm::DISubprogram::toSPFlags(bool, bool, bool, unsigned int)’: /build/llvm/include/llvm/IR/DebugInfoMetadata.h:1636:50: warning: enumeral and non-enumeral type in conditional expression [-Wextra] (IsLocalToUnit ? SPFlagLocalToUnit : 0) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ /build/llvm/include/llvm/IR/DebugInfoMetadata.h:1637:49: warning: enumeral and non-enumeral type in conditional expression [-Wextra] (IsDefinition ? SPFlagDefinition : 0) | ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /build/llvm/include/llvm/IR/DebugInfoMetadata.h:1638:48: warning: enumeral and non-enumeral type in conditional expression [-Wextra] (IsOptimized ? SPFlagOptimized : 0)); ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ llvm-svn: 347250 -
Simon Pilgrim authored
llvm-svn: 347249
-
Craig Topper authored
We're seeing some issues internally where we sent some intrinsics into the cost model that the getTypeLegalizationCost call fails on, but X86 specific tables don't care about. Our base class implementation takes care of them. We'd just like X86 backend to ignore them. This patch makes sure the switch returned something X86 cares about and skips the table lookups and type legalization call if not. Probably more efficient too since we don't go scanning the tables for every intrinsic we could possibly see. Differential Revision: https://reviews.llvm.org/D54711 llvm-svn: 347248
-