summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [analyzer] Teach the MallocChecker about about Glib APIAnna Zaks2017-03-092-7/+99
| | | | | | | | A patch by Leslie Zhai! Differential Revision: https://reviews.llvm.org/D28348 llvm-svn: 297323
* Defensively ensure that GetExternalDeclStmt protects itself from nested ↵David Blaikie2017-03-081-0/+3
| | | | | | deserialization llvm-svn: 297322
* [DebugInfo] Add address space when creating DIDerivedTypesKonstantin Zhuravlyov2017-03-084-6/+183
| | | | | | Differential Revision: https://reviews.llvm.org/D29671 llvm-svn: 297321
* [DebugInfo] Emit address space with DW_AT_address_class attribute for ↵Konstantin Zhuravlyov2017-03-0829-83/+411
| | | | | | | | pointer and reference types Differential Revision: https://reviews.llvm.org/D29670 llvm-svn: 297320
* [Outliner] Fix memory leak in suffix tree.Jessica Paquette2017-03-081-9/+9
| | | | | | | | This commit changes the BumpPtrAllocator for suffix tree nodes to a SpecificBumpPtrAllocator. Before, node construction was leaking memory because of the DenseMap in SuffixTreeNodes. Changing this to a SpecificBumpPtrAllocator allows this memory to properly be released. llvm-svn: 297319
* [DeadCodeElim] Put -polly-dce-precise-steps into the Polly category.Michael Kruse2017-03-081-1/+2
| | | | llvm-svn: 297318
* [ConstantFold] Fix defect in constant folding computation for GEPJaved Absar2017-03-082-1/+54
| | | | | | | | | | | | | | | | | When the array indexes are all determined by GVN to be constants, a call is made to constant-folding to optimize/simplify the address computation. The constant-folding, however, makes a mistake in that it sometimes reads back stale Idxs instead of NewIdxs, that it re-computed in previous iteration. This leads to incorrect addresses coming out of constant-folding to GEP. A test case is included. The error is only triggered when indexes have particular patterns that the stale/new index updates interplay matters. Reviewers: Daniel Berlin Differential Revision: https://reviews.llvm.org/D30642 llvm-svn: 297317
* Take into account C++17's noexcept function types during merging -- it shouldRichard Smith2017-03-084-2/+31
| | | | | | | be possible to merge a declaration with an unresolved function type against one with a resolved function type. llvm-svn: 297316
* Use correct function signature for strerror_r interceptorFrancis Ricci2017-03-081-16/+27
| | | | | | | | | | | | | | | There are two possible return values for strerror_r: On OS X, the return value is always `int`. On Linux, the return value can be either `char *` or `int`, depending on the value of: `(_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && ! _GNU_SOURCE` Because OS X interceptors require a matching function signature, split out the two cases into separate interceptors, using the above information to determine the correct signature for a given build. llvm-svn: 297315
* [Support] Add llvm::sys::fs::remove_directories.Zachary Turner2017-03-085-18/+138
| | | | | | | | | | | | | | | | | | | | | We already have a function create_directories() which can create an entire tree, and remove() which can remove an empty directory, but we do not have remove_directories() which can remove an entire tree. This patch adds such a function. Because removing a directory tree can have dangerous consequences when the tree contains a directory symlink, the patch here updates the existing directory_iterator construct to optionally not follow symlinks (previously it would always follow symlinks). The delete algorithm uses this flag so that for symlinks, only the links are removed, and not the targets. On Windows this is implemented with SHFileOperation, which also does not recurse into symbolic links or junctions. Differential Revision: https://reviews.llvm.org/D30676 llvm-svn: 297314
* Remove DefinedSynthetic.Rafael Espindola2017-03-0813-248/+209
| | | | | | | | | | | | | With this we have a single section hierarchy. It is a bit less code, but the main advantage will be in a future patch being able to handle foo = symbol_in_obj; in a linker script. Currently that fails since we try to find the output section of symbol_in_obj. With this we should be able to just return an InputSection from the expression. llvm-svn: 297313
* Driver/ToolChains: Mips -> MipsLinuxKonstantin Zhuravlyov2017-03-084-6/+6
| | | | | | | | | - Mips is architecture, not a toolchain - Might help eliminate the confusion in the future by not having header files with the same name Differential Revision: https://reviews.llvm.org/D30753 llvm-svn: 297312
* [clang-tidy] readability-function-size: remove default param count thresholdAlexander Kornienko2017-03-081-1/+1
| | | | llvm-svn: 297311
* Add red zones to BumpPtrAllocator under ASanJordan Rose2017-03-081-7/+26
| | | | | | | | | | | To help catch buffer overruns, this patch changes BumpPtrAllocator to insert an extra unused byte between allocations when building with ASan. SpecificBumpPtrAllocator opts out of this behavior, since it needs to destroy its items later by walking the allocated memory. Reviewed by Pete Cooper. llvm-svn: 297310
* [MemCpyOpt] clang-format + trim the legacy pass. NFC.George Burgess IV2017-03-081-39/+23
| | | | | | | None of the declarations below `// Helper functions` seem to have definitions anymore. llvm-svn: 297309
* [scan-build-py] move argument parsing into separate moduleLaszlo Nagy2017-03-081-0/+430
| | | | | | Forgot to add the new module. llvm-svn: 297308
* [scan-build-py] move argument parsing into separate moduleLaszlo Nagy2017-03-085-406/+55
| | | | | | Differential Revision: https://reviews.llvm.org/D30601 llvm-svn: 297307
* Fix PR32183 - Wrap GCC exception implementation in missing namespace stdEric Fiselier2017-03-082-1/+5
| | | | llvm-svn: 297306
* Use uint32_t for alignment in more places, NFC.Rafael Espindola2017-03-0811-31/+30
| | | | llvm-svn: 297305
* GlobalISel: correctly handle trivial fcmp predicates.Tim Northover2017-03-082-1/+15
| | | | | | | It makes sense to only do them once in IRTranslator rather than making everyone deal with them. llvm-svn: 297304
* [SLP] Visualize SLP trees with -view-slp-treeAdam Nemet2017-03-081-62/+167
| | | | | | | | | | | | | | | | | Analyzing larger trees is extremely difficult with the current debug output so this adds GraphTraits and DOTGraphTraits on top of the VectorizableTree data structure. We can now display the SLP trees with Graphviz as in https://reviews.llvm.org/F3132765. I decorated the graph where a value needs to be gathered for one reason or another. These are the red nodes. There are other improvement I am planning to make as I work through my case here. For example, I would also like to mark nodes that need to be extracted. Differential Revision: https://reviews.llvm.org/D30731 llvm-svn: 297303
* [LV] Select legal insert point when fixing first-order recurrencesMatthew Simpson2017-03-082-7/+31
| | | | | | | | | | Because IRBuilder performs constant-folding, it's not guaranteed that an instruction in the original loop map to an instruction in the vector loop. It could map to a constant vector instead. The handling of first-order recurrences was incorrectly making this assumption when setting the IRBuilder's insert point. llvm-svn: 297302
* [GlobalISel] Add default action for G_FNEGVolkan Keles2017-03-083-0/+84
| | | | | | | | | | | | | | Summary: rL297171 introduced G_FNEG for floating-point negation instruction and IRTranslator started to translate `FSUB -0.0, X` to `FNEG X`. This patch adds a default action for G_FNEG to avoid breaking existing targets. Reviewers: qcolombet, ab, kristof.beyls, t.p.northover, aditya_nandakumar, dsanders Reviewed By: qcolombet Subscribers: dberris, rovka, llvm-commits Differential Revision: https://reviews.llvm.org/D30721 llvm-svn: 297301
* Resubmit FileSystem changes.Zachary Turner2017-03-0842-303/+312
| | | | | | | | | | This was originall reverted due to some test failures in ModuleCache and TestCompDirSymlink. These issues have all been resolved and the code now passes all tests. Differential Revision: https://reviews.llvm.org/D30698 llvm-svn: 297300
* [ubsan] Detect UB loads from bitfieldsVedant Kumar2017-03-085-7/+82
| | | | | | | | | | | | | | | | | | | | It's possible to load out-of-range values from bitfields backed by a boolean or an enum. Check for UB loads from bitfields. This is the motivating example: struct S { BOOL b : 1; // Signed ObjC BOOL. }; S s; s.b = 1; // This is actually stored as -1. if (s.b == 1) // Evaluates to false, -1 != 1. ... Differential Revision: https://reviews.llvm.org/D30423 llvm-svn: 297298
* Revert r297008: [ELF] - Make Bss and BssRelRo sections to be synthetic (#2).Rui Ueyama2017-03-088-59/+78
| | | | | | | This reverts commit r297008 because it's reported that that change broke AArch64 bots. llvm-svn: 297297
* [x86] regenerate checks; NFCSanjay Patel2017-03-081-6/+72
| | | | | | | This test could be reduced? The check fails for a seemingly unrelated change, so I'm adding full checks to see what is happening. llvm-svn: 297296
* [LV] Make the test case for PR30183 less fragileMatthew Simpson2017-03-081-22/+31
| | | | | | | | This patch also renames the PR number the test points to. The previous reference was PR29559, but that bug was somehow deleted and recreated under PR30183. llvm-svn: 297295
* [LV] Add missing check labels to tests and reformatMatthew Simpson2017-03-081-115/+94
| | | | llvm-svn: 297294
* Remove unnecessary template.Rafael Espindola2017-03-084-13/+6
| | | | llvm-svn: 297293
* Remove unnecessary template. NFC.Rafael Espindola2017-03-084-27/+10
| | | | llvm-svn: 297292
* DARWF: silence some warnings about conversionsSaleem Abdulrasool2017-03-082-4/+7
| | | | | | | Add a check for an overflow and explicitly cast the value. We would have silently overflowed previously. llvm-svn: 297291
* Rename one of the getOffset methods.Rafael Espindola2017-03-084-6/+7
| | | | | | | It is sufficiently different in that it returns an offset in the input file, not the output section. llvm-svn: 297290
* Add missing implementation for AtomicChange::replace(...)Eric Liu2017-03-082-2/+25
| | | | | | | | | | | | | | Summary: Just realized the implementation is missing... Reviewers: klimek Reviewed By: klimek Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D30735 llvm-svn: 297289
* [Hexagon] Use correct offset when extracting from the high wordKrzysztof Parzyszek2017-03-082-0/+24
| | | | | | | | When extracting a bitfield from the high register in a register pair, the final offset should be relative to the high register (for 32-bit extracts). llvm-svn: 297288
* Remove unnecessary template. NFC.Rafael Espindola2017-03-089-23/+15
| | | | llvm-svn: 297287
* Convert a few more uses of uintX_t to uint64_t.Rafael Espindola2017-03-083-10/+7
| | | | llvm-svn: 297286
* [Sparc] Check register use with isPhysRegUsed() instead of reg_nodbg_empty()Daniel Cederman2017-03-082-7/+8
| | | | | | | | | | | | | | | | | | Summary: By using reg_nodbg_empty() to determine if a function can be treated as a leaf function or not, we miss the case when the register pair L0_L1 is used but not L0 by itself. This has the effect that use_all_i32_regs(), a test in reserved-regs.ll which tries to use all registers, gets treated as a leaf function. Reviewers: jyknight, venkatra Reviewed By: jyknight Subscribers: davide, RKSimon, sepavloff, llvm-commits Differential Revision: https://reviews.llvm.org/D27089 llvm-svn: 297285
* [JumpThread] Use AA in SimplifyPartiallyRedundantLoad()Jun Bum Lim2017-03-083-13/+134
| | | | | | | | | | | | | | Summary: Use AA when scanning to find an available load value. Reviewers: rengolin, mcrosier, hfinkel, trentxintong, dberlin Reviewed By: rengolin, dberlin Subscribers: aemerson, dberlin, llvm-commits Differential Revision: https://reviews.llvm.org/D30352 llvm-svn: 297284
* [analyzer] Clarify 'uninitialized function argument' messagesDaniel Marjamaki2017-03-0813-89/+103
| | | | | | Differential Revision: https://reviews.llvm.org/D30341 llvm-svn: 297283
* Convert a few uses of uintX_t to uint64_t.Rafael Espindola2017-03-084-8/+7
| | | | llvm-svn: 297282
* [ScopDetection] Only allow SCoP-wide available base pointers.Michael Kruse2017-03-085-24/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify ScopDetection::isInvariant(). Essentially deny everything that is defined within the SCoP and is not load-hoisted. The previous understanding of "invariant" has a few holes: - Expressions without side-effects with only invariant arguments, but are defined withing the SCoP's region with the exception of selects and PHIs. These should be part of the index expression derived by ScalarEvolution and not of the base pointer. - Function calls with that are !mayHaveSideEffects() (typically functions with "readnone nounwind" attributes). An example is given below. @C = external global i32 declare float* @getNextBasePtr(float*) readnone nounwind ... %ptr = call float* @getNextBasePtr(float* %A, float %B) The call might return: * %A, so %ptr aliases with it in the SCoP * %B, so %ptr aliases with it in the SCoP * @C, so %ptr aliases with it in the SCoP * a new pointer everytime it is called, such as malloc() * a pointer into the allocated block of one of the aforementioned * any of the above, at random at each call Hence and contrast to a comment in the base_pointer.ll regression test, %ptr is not necessarily the same all the time. It might also alias with anything and no AliasAnalysis can tell otherwise if the definition is external. It is hence not suitable in the role of a base pointer. The practical problem with base pointers defined in SCoP statements is that it is not available globally in the SCoP. The statement instance must be executed first before the base pointer can be used. This is no problem if the base pointer is transferred as a scalar value between statements. Uses of MemoryAccess::setNewAccessRelation may add a use of the base pointer anywhere in the array. setNewAccessRelation is used by JSONImporter, DeLICM and D28518. Indeed, BlockGenerator currently assumes that base pointers are available globally and generates invalid code for new access relation (referring to the base pointer of the original code) if not, even if the base pointer would be available in the statement. This could be fixed with some added complexity and restrictions. The ExprBuilder must lookup the local BBMap and code that call setNewAccessRelation must check whether the base pointer is available first. The code would still be incorrect in the presence of aliasing. There is the switch -polly-ignore-aliasing to explicitly allow this, but it is hardly a justification for the additional complexity. It would still be mostly useless because in most cases either getNextBasePtr() has external linkage in which case the readnone nounwind attributes cannot be derived in the translation unit itself, or is defined in the same translation unit and gets inlined. Reviewed By: grosser Differential Revision: https://reviews.llvm.org/D30695 llvm-svn: 297281
* [InstCombine] avoid crashing on shuffle shrinkage when input type is not ↵Sanjay Patel2017-03-082-1/+15
| | | | | | same as result type llvm-svn: 297280
* Android.rules: fix computation of gcc toolchain directory on armPavel Labath2017-03-081-11/+11
| | | | | | | | The toolchain directory for arm android targets was computed incorrectly. The architecture part should be arm, and the environment part androideabi. This fixes that. llvm-svn: 297279
* Remove redundant member of InputSectionBase. NFC.Rafael Espindola2017-03-084-6/+13
| | | | | | With this InputSectionBase is now 144 bytes. llvm-svn: 297278
* Finalize content of synthetic sections prior to Thunk CreationPeter Smith2017-03-085-27/+56
| | | | | | | | | | | | This change moves the calls to finalizeContent() for each synthetic section before createThunks(). This will allow us to assign addresses prior to calling createThunks(). As addition of thunks may add to the static symbol table and may affect the size of the mips got section we introduce a couple of additional member functions to update these values. Differential revision: https://reviews.llvm.org/D29983 llvm-svn: 297277
* Honor __unaligned in codegen for declarations and expressionsRoger Ferrer Ibanez2017-03-087-0/+268
| | | | | | | | | | | This patch honors the unaligned type qualifier (currently available through he keyword __unaligned and -fms-extensions) in CodeGen. In the current form the patch affects declarations and expressions. It does not affect fields of classes. Differential Revision: https://reviews.llvm.org/D30166 llvm-svn: 297276
* Add more examples to clang-format configurationSylvestre Ledru2017-03-082-2/+196
| | | | | | | | | | | | Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D30734 llvm-svn: 297275
* [clang-format] Look at NoLineBreak and NoLineBreakInOperand before ↵Krasimir Georgiev2017-03-082-3/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | breakProtrudingToken Summary: This patch makes ContinuationIndenter call breakProtrudingToken only if NoLineBreak and NoLineBreakInOperand is false. Previously, clang-format required two runs to converge on the following example with 24 columns: Note that the second operand shouldn't be splitted according to NoLineBreakInOperand, but the token breaker doesn't take that into account: ``` func(a, "long long long long", c); ``` After first run: ``` func(a, "long long " "long long", c); ``` After second run, where NoLineBreakInOperand is taken into account: ``` func(a, "long long " "long long", c); ``` With the patch, clang-format now obtains in one run: ``` func(a, "long long long" "long", c); ``` which is a better token split overall. Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D30575 llvm-svn: 297274
* [ARM] Split up lsl-zero test into two testsJohn Brawn2017-03-082-99/+105
| | | | | | | | On Windows stderr and stdout happen to get interleaved in a way that causes the test to fail, so split it up into a test that checks for errors and a test that doesn't. llvm-svn: 297273
OpenPOWER on IntegriCloud