summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* InferAddressSpaces: Use reference arguments instead of pointersMatt Arsenault2017-04-241-15/+15
| | | | llvm-svn: 301276
* [Object] Fix some Clang-tidy modernize and Include What You Use warnings; ↵Eugene Zelenko2017-04-2412-189/+287
| | | | | | other minor fixes (NFC). llvm-svn: 301275
* Revert r301089 "[builtins] Implement emulated TLS on Windows."Hans Wennborg2017-04-242-222/+67
| | | | | | | | | | | | | | | | | | | | | This broke the self-host build on Windows (PR32777). Original commit message: > [builtins] Implement emulated TLS on Windows. > > Summary: > LLVM JIT needs to be able to use emulated TLS on all platforms, and this provides a reference one can compile to enable emutls for Linux/Mac/Windows. > > Reviewers: chh, howard.hinnant > > Reviewed By: chh > > Subscribers: mgorny, llvm-commits > > Differential Revision: https://reviews.llvm.org/D30787 llvm-svn: 301274
* [Expression parser] Return both types and variablesSean Callanan2017-04-248-258/+347
| | | | | | | | | | | | | | | | | | | | | Many times a user wants to access a type when there's a variable of the same name, or a variable when there's a type of the same name. Depending on the precise context, currently the expression parser can fail to resolve one or the other. This is because ClangExpressionDeclMap has logic to limit the amount of information it searches, and that logic sometimes cuts down the search prematurely. This patch removes some of those early exits. In that sense, this patch trades performance (early exit is faster) for correctness. I've also included two new test cases showing examples of this behavior – as well as modifying an existing test case that gets it wrong. llvm-svn: 301273
* [asan] Fix Windows global dead stripping testsReid Kleckner2017-04-242-4/+4
| | | | | | | Pass /Gw to clang-cl which is equivalent to -fdata-sections. This is now necessary. llvm-svn: 301272
* [modules ts] Diagnose 'export' declarations outside of a module interface.Richard Smith2017-04-249-13/+66
| | | | llvm-svn: 301271
* InferAddressSpaces: Remove redundant assertMatt Arsenault2017-04-241-1/+0
| | | | | | | This is just asserting all the operations are handled in the switch, which the unreachable already handles. llvm-svn: 301270
* [ARM, x86] add more vector tests for bool math; NFCSanjay Patel2017-04-242-0/+64
| | | | | | | | I'm proposing a fold for increment-of-sexted-bool in: https://reviews.llvm.org/D31944 ...so we need to know what happens in more cases like these. llvm-svn: 301269
* [git-llvm] Remove CR from middle of svn propget outputReid Kleckner2017-04-241-0/+2
| | | | llvm-svn: 301268
* Make getSlotAttributes return an AttributeSet instead of a wrapper listReid Kleckner2017-04-245-34/+20
| | | | | | | | Remove the temporary, poorly named getSlotSet method which did the same thing. Also remove getSlotNode, which is a hold-over from when we were dealing with AttributeSetNode* instead of AttributeSet. llvm-svn: 301267
* [Polly] [DependenceInfo] change WAR generation, Read will not block ReadSiddharth Bhat2017-04-244-30/+104
| | | | | | | | | | | | | | | | | | | | | Earlier, the call to buildFlow was: WAR = buildFlow(Write, Read, MustWrite, Schedule). This meant that Read could block another Read, since must-sources can block each other. Fixed the call to buildFlow to correctly compute Read. The resulting code needs to do some ISL juggling to get the output we want. Bug report: https://bugs.llvm.org/show_bug.cgi?id=32623 Reviewers: Meinersbur Tags: #polly Differential Revision: https://reviews.llvm.org/D32011 llvm-svn: 301266
* Mark a test as requiring a shell.Rafael Espindola2017-04-241-0/+1
| | | | llvm-svn: 301265
* Handle _LINK_ env string as command line parameters.Rui Ueyama2017-04-243-13/+16
| | | | | | | | | "_LINK_" environment varaible should be appended to the command line. https://msdn.microsoft.com/en-us/library/6y6t9esh.aspx Fixes https://bugs.llvm.org/show_bug.cgi?id=32756 llvm-svn: 301264
* [DWARF] Fix lookup in the abstract origins of inlined blocks/functionsSean Callanan2017-04-244-2/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LLDB uses clang::DeclContexts for lookups, and variables get put into the DeclContext for their abstract origin. (The abstract origin is a DWARF pointer that indicates the unique definition of inlined code.) When the expression parser is looking for variables, it locates the DeclContext for the current context. This needs to be done carefully, though, e.g.: __attribute__ ((always_inline)) void f(int a) { { int b = a * 2; } } void g() { f(3); } Here, if we're stopped in the inlined copy of f, we have to find the DeclContext corresponding to the definition of f – its abstract origin. Clang doesn't allow multiple functions with the same name and arguments to exist. It also means that any variables we see must be placed in the appropriate DeclContext. [Bug 1]: When stopped in an inline block, the function GetDeclContextDIEContainingDIE for that block doesn't properly construct a DeclContext for the abstract origin for inlined subroutines. That means we get duplicated function DeclContexts, but function arguments only get put in the abstract origin's DeclContext, and as a result when we try to look for them in nested contexts they aren't found. [Bug 2]: When stopped in an inline block, the DWARF (for space reasons) doesn't explicitly point to the abstract origin for that block. This means that the function GetClangDeclContextForDIE returns a different DeclContext for each place the block is inlined. However, any variables defined in the block have abstract origins, so they will only get placed in the DeclContext for their abstract origin. In this fix, I've introduced a test covering both of these issues, and fixed them. Bug 1 could be resolved simply by making sure we look up the abstract origin for inlined functions when looking up their DeclContexts on behalf of nested blocks. For Bug 2, I've implemented an algorithm that makes the DeclContext for a block be the containing DeclContext for the closest entity we would find during lookup that has an abstract origin pointer. That means that in the following situation: { // block 1 int a; { // block 2 int b; } } if we looked up the DeclContext for block 2, we'd find the block containing the abstract origin of b, and lookup would proceed correctly because we'd see b and a. However, in the situation { // block 1 int a; { // block 2 } } since there isn't anything to look up in block 2, we can't determine its abstract origin (and there is no such pointer in the DWARF for blocks). However, we can walk up the parent chain and find a, and its abstract origin lives in the abstract origin of block 1. So we simply say that the DeclContext for block 2 is the same as the DeclContext for block 1, which contains a. Lookups will return the same results. Thanks to Jim Ingham for review and suggestions. Differential revision: https://reviews.llvm.org/D32375 llvm-svn: 301263
* [git-llvm] Make `push` work on CRLF files with svn:eol-style=nativeReid Kleckner2017-04-241-7/+60
| | | | | | | | | | | | | | | | | | | | | | Summary: `git apply` on Windows doesn't work for files that SVN checks out as CRLF. There is no way to force SVN to check everything out with Unix line endings on Windows. Files with svn:eol-style=native will always come out with CRLF, breaking `git apply`, which wants Unix line endings. My workaround is to list all files with this property set in the change, and run `dos2unix` on them. SVN doesn't commit a massive line ending change because the svn:eol-style property indicates that these are text files. Tested on r301245. Reviewers: zturner, jlebar Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D32452 llvm-svn: 301262
* [Modules] Fix test to wipe out the cache before using itBruno Cardoso Lopes2017-04-241-1/+1
| | | | | | | | | This should appease bots: http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-incremental_check/35914 rdar://problem/31796737 llvm-svn: 301261
* [InstSimplify] use ConstantRange to simplify more and-of-icmpsSanjay Patel2017-04-245-302/+95
| | | | | | | | | | | | | We can simplify (and (icmp X, C1), (icmp X, C2)) to one of the icmps in many cases. I had to check some of these with Alive to prove to myself it's right, but everything seems to check out. Eg, the code in instcombine was completely ignoring predicates with mismatched signedness. Handling or-of-icmps would be a follow-up step. Differential Revision: https://reviews.llvm.org/D32143 llvm-svn: 301260
* Remove DefaultSoName.Rafael Espindola2017-04-245-31/+35
| | | | | | | | We can just use the existing SoName member variable. It now initially contains what was in DefaultSoName and is modified if the .so has an actual soname. llvm-svn: 301259
* [DAGCombiner] Use APInt::intersects to avoid tmp variable. NFCI.Simon Pilgrim2017-04-241-1/+3
| | | | llvm-svn: 301258
* [cfi] Fix wrong CMake condition for WIN32.Evgeniy Stepanov2017-04-241-1/+1
| | | | llvm-svn: 301257
* [asan] Remove asanwrapper from Android test harness.Evgeniy Stepanov2017-04-241-3/+2
| | | | | | It is only necessary for pre-L and creates problems on newer builds. llvm-svn: 301256
* AMDGPU: Slightly simplify prolog reserved register handlingMatt Arsenault2017-04-241-25/+27
| | | | | | | | | | | | | | Rely on MachineRegisterInfo's knowledge of used physical registers. Move flat_scratch initialization earlier, so the uses are visible when making these decisions. This will make it easier to add another reserved register at the end for the stack pointer rather than handling another special case. llvm-svn: 301254
* Cosmetic change.Galina Kistanova2017-04-241-0/+1
| | | | llvm-svn: 301253
* ProfileData: clean up some stale declarations (NFC)Saleem Abdulrasool2017-04-241-8/+0
| | | | | | These were removed in SVN r300381. Remove the declarations. llvm-svn: 301252
* [analyzer] Improve subscripting null arrays for catching null dereferences.Artem Dergachev2017-04-243-18/+23
| | | | | | | | | | | | | Array-to-pointer cast now works correctly when the pointer to the array is concrete, eg. null, which allows further symbolic calculations involving such values. Inlined defensive checks are now detected correctly when the resulting null symbol is being array-subscripted before dereference. Differential Revision: https://reviews.llvm.org/D32291 llvm-svn: 301251
* Remove a dead field. NFC.Vedant Kumar2017-04-242-8/+2
| | | | | | Suggested by Adam Folwarczny! llvm-svn: 301250
* [Coverage] Avoid null deref in skipRegionMappingForDecl (fixes PR32761)Vedant Kumar2017-04-242-0/+14
| | | | | | | | Patch by Adam Folwarczny! Differential Revision: https://reviews.llvm.org/D32406 llvm-svn: 301249
* Small addition on how to add a builder.Galina Kistanova2017-04-241-0/+1
| | | | llvm-svn: 301248
* [AMDGPU][mc][tests][NFC] Bulk ISA tests: update for Gfx7/Gfx8, add for Gfx9.Artem Tamazov2017-04-244-58050/+128900
| | | | llvm-svn: 301247
* Specify a target explicitly in libfuzzer driver flag testGeorge Karpenkov2017-04-241-1/+1
| | | | llvm-svn: 301246
* [Bitcode] Refactor attribute group writing to avoid getSlotAttributesReid Kleckner2017-04-245-56/+67
| | | | | | | | | | | | | | | | | Summary: That API creates a temporary AttributeList to carry an index and a single AttributeSet. We need to carry the index in addition to the set, because that is how attribute groups are currently encoded. NFC Reviewers: pcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D32262 llvm-svn: 301245
* Update profile during memory instrinsic optimizationTeresa Johnson2017-04-242-6/+19
| | | | | | | | | | | | | | | | Summary: Ensure that the new merge BB (which contains the rest of the original BB after the mem op being optimized) gets a profile frequency, in case there are additional mem ops later in the BB. Otherwise they get skipped as the merge BB looks cold. Reviewers: davidxl, xur Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D32447 llvm-svn: 301244
* [asan] Use posix strerror_r interceptor on android.Evgeniy Stepanov2017-04-241-1/+1
| | | | | | This fixes a regression in r297315. llvm-svn: 301243
* Revert "StructurizeCFG: Directly invert cmp instructions"Matt Arsenault2017-04-248-184/+112
| | | | | | | | This reverts commit r300732. This breaks a few tests. I think the problem is related to adding more uses of the condition that don't yet exist at this point. llvm-svn: 301242
* [LoopUnroll] Remove spurious newline.Davide Italiano2017-04-241-1/+0
| | | | | | | Eli pointed out in the review, but I didn't squash the two commits correctly. Pointy-hat to me. llvm-svn: 301241
* Revert "Refactor DynamicLibrary so searching for a symbol will have a ↵Frederich Munch2017-04-2411-576/+285
| | | | | | | | | | defined order" The i686-mingw32-RA-on-linux bot is still having errors. This reverts commit r301236. llvm-svn: 301240
* [LoopUnroll] Don't try to unroll non canonical loops.Davide Italiano2017-04-242-0/+41
| | | | | | | | | | | | The current Loop Unroll implementation works with loops having a single latch that contains a conditional branch to a block outside the loop (the other successor is, by defition of latch, the header). If this precondition doesn't hold, avoid unrolling the loop as the code is not ready to handle such circumstances. Differential Revision: https://reviews.llvm.org/D32261 llvm-svn: 301239
* [LIR] Obey non-integral pointer semanticsSanjoy Das2017-04-242-0/+53
| | | | | | | | | | | | | | Summary: See http://llvm.org/docs/LangRef.html#non-integral-pointer-type Reviewers: haicheng Reviewed By: haicheng Subscribers: mcrosier, mzolotukhin, llvm-commits Differential Revision: https://reviews.llvm.org/D32196 llvm-svn: 301238
* Avoid unnecessary copies in some for loopsSaleem Abdulrasool2017-04-243-6/+6
| | | | | | | | Use constant references rather than `const auto` which will cause the copy constructor. These particular cases cause issues for the swift compiler. llvm-svn: 301237
* Refactor DynamicLibrary so searching for a symbol will have a defined order andFrederich Munch2017-04-2411-285/+576
| | | | | | | | | | | | | | | | | | | | | | | | | | | libraries are properly unloaded when llvm_shutdown is called. Summary: This was mostly affecting usage of the JIT, where storing the library handles in a set made iteration unordered/undefined. This lead to disagreement between the JIT and native code as to what the address and implementation of particularly on Windows with stdlib functions: JIT: putenv_s("TEST", "VALUE") // called msvcrt.dll, putenv_s JIT: getenv("TEST") -> "VALUE" // called msvcrt.dll, getenv Native: getenv("TEST") -> NULL // called ucrt.dll, getenv Also fixed is the issue of DynamicLibrary::getPermanentLibrary(0,0) on Windows not giving priority to the process' symbols as it did on Unix. Reviewers: chapuni, v.g.vassilev, lhames Reviewed By: lhames Subscribers: danalbert, srhines, mgorny, vsk, llvm-commits Differential Revision: https://reviews.llvm.org/D30107 llvm-svn: 301236
* [cfi] Disable ThinLTO + CFI tests on Windows.Evgeniy Stepanov2017-04-241-1/+2
| | | | | | PR32770. llvm-svn: 301235
* Move value type list from TargetRegisterClass to TargetRegisterInfoKrzysztof Parzyszek2017-04-2416-70/+85
| | | | | | Differential Revision: https://reviews.llvm.org/D31937 llvm-svn: 301234
* Revert r301223Carlo Bertolli2017-04-2411-4706/+123
| | | | llvm-svn: 301233
* Revert r301231: Accidentally committed stale filesKrzysztof Parzyszek2017-04-2416-77/+68
| | | | | | I forgot to commit local changes before commit. llvm-svn: 301232
* Move value type list from TargetRegisterClass to TargetRegisterInfoKrzysztof Parzyszek2017-04-2416-68/+77
| | | | | | Differential Revision: https://reviews.llvm.org/D31937 llvm-svn: 301231
* AMDGPU: Select scratch mubuf offsets when pointer is a constantMatt Arsenault2017-04-245-47/+242
| | | | | | | | In call sequence setups, there may not be a frame index base and the pointer is a constant offset from the frame pointer / scratch wave offset register. llvm-svn: 301230
* AMDGPU: Set StackGrowsUp in MCAsmInfoMatt Arsenault2017-04-241-0/+1
| | | | | | Not sure what this does though. llvm-svn: 301229
* [AMDGPU] Merge M0 initializationsStanislav Mekhanoshin2017-04-244-19/+323
| | | | | | | | | | Merges equivalent initializations of M0 and hoists them into a common dominator block. Technically the same code can be used with any register, physical or virtual. Differential Revision: https://reviews.llvm.org/D32279 llvm-svn: 301228
* Handle invariant.group.barrier in BasicAAPiotr Padlewski2017-04-245-13/+56
| | | | | | | | | | | | | | | | | | | | | Summary: llvm.invariant.group.barrier returns pointer that mustalias pointer it takes. It can't be marked with `returned` attribute, because it would be remove easily. The other reason is that only Alias Analysis can know about this, because if any other pass would know it, then the result would be replaced with it's argument, which would be invalid. We can think about returned pointer as something that mustalias, but it doesn't have to be bitwise the same as the argument. Reviewers: dberlin, chandlerc, hfinkel, sanjoy Subscribers: reames, nlewycky, rsmith, anna, amharc Differential Revision: https://reviews.llvm.org/D31585 llvm-svn: 301227
* [asan] Let the frontend disable gc-sections optimization for asan globals.Evgeniy Stepanov2017-04-243-17/+86
| | | | | | Also extend -asan-globals-live-support flag to all binary formats. llvm-svn: 301226
OpenPOWER on IntegriCloud