summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Add missing #include, found by modules build.Richard Smith2015-06-121-0/+1
| | | | llvm-svn: 239587
* [SanitizerCoverage] Use llvm::getDISubprogram() to get location of the entry ↵Alexey Samsonov2015-06-121-3/+9
| | | | | | | | | | | basic block. DebugLoc::getFnDebugLoc() should soon be removed. Also, getDISubprogram() might become more effective soon and wouldn't need to scan debug locations at all, if function-level metadata would be emitted by Clang. llvm-svn: 239586
* [GVN] Use a simpler form of IRBuilder constructor.Alexey Samsonov2015-06-122-13/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: A side effect of this change is that it IRBuilder now automatically created debug info locations for new instructions, which is the same as debug location of insertion point. This is fine for the functions in questions (GetStoreValueForLoad and GetMemInstValueForLoad), as they are used in two situations: * GVN::processLoad, which tries to eliminate a load. In this case new instructions would have the same debug location as the load they eventually replace; * MaterializeAdjustedValue, which adds new instructions to the end of the basic blocks, which could later be used to replace the load definition. In this case we don't yet know the way the load would be eventually replaced (either by assembling the precomputed values via PHI, or by using them directly), so just using the basic block strategy seems to be reasonable. There is also a special case in the code that *would* adjust the location of the last instruction replacing the load definition to the location of the load. Test Plan: regression test suite Reviewers: echristo, dberlin, dblaikie Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10405 llvm-svn: 239585
* [GVN] Use IRBuilder more actively instead of creating instructions manually.Alexey Samsonov2015-06-121-20/+21
| | | | llvm-svn: 239584
* Add a warning for unsupported elements of the target attribute.Eric Christopher2015-06-124-5/+19
| | | | | | | | | Since we're ignoring the tune= and fpmath= attributes go ahead and add a warning alerting people to the fact that we're going to ignore that part of it during code generation and tie it to the attribute warning set. llvm-svn: 239583
* Handle fpmath= in the target attribute.Eric Christopher2015-06-122-0/+8
| | | | | | | | | | Right now we're ignoring the fpmath attribute since there's no backend support for a feature like this and to do so would require checking the validity of the strings and doing general subtarget feature parsing of valid and invalid features with the target attribute feature. llvm-svn: 239582
* Handle -mno-<feature> in target attribute strings by replacing theEric Christopher2015-06-122-2/+8
| | | | | | | -mno- with a -<feature> to match how we handle this in the rest of the frontend. llvm-svn: 239581
* Add support for tune= to the target attribute support by ignoring it.Eric Christopher2015-06-122-0/+7
| | | | | | | We don't currently support the -mtune option in any useful way so ignoring the annotation is fine. llvm-svn: 239580
* Add support for the the target attribute.Eric Christopher2015-06-125-11/+84
| | | | | | | | | | | | | | | Modeled after the gcc attribute of the same name, this feature allows source level annotations to correspond to backend code generation. In llvm particular parlance, this allows the adding of subtarget features and changing the cpu for a particular function based on source level hints. This has been added into the existing support for function level attributes without particular verification for any target outside of whether or not the backend will support the features/cpu given (similar to section, etc). llvm-svn: 239579
* [modules] Apply name visibility rules to names found by ADL.Richard Smith2015-06-123-2/+11
| | | | llvm-svn: 239578
* Fix PR23293 - Do not unlock shared state before notifying consumers.Eric Fiselier2015-06-123-9/+67
| | | | | | | | Within the shared state methods do not unlock the lock guards manually. This could cause a race condition where the shared state is destroyed before the method is complete. llvm-svn: 239577
* [IRGen] Fix the MSVC2013 buildDavid Majnemer2015-06-121-1/+2
| | | | llvm-svn: 239576
* [modules] Fix crash with multiple levels of default template argument merging.Richard Smith2015-06-113-1/+8
| | | | llvm-svn: 239575
* [WinEH] Put finally pointers in the handler scope table fieldReid Kleckner2015-06-115-38/+71
| | | | | | | | | | We were putting them in the filter field, which is correct for 64-bit but wrong for 32-bit. Also switch the order of scope table entry emission so outermost entries are emitted first, and fix an obvious state assignment bug. llvm-svn: 239574
* [cleanup] Remove some unused #ifdef'sSean Silva2015-06-112-19/+0
| | | | | | | This is all going through the VFS layer now, so there's nothing platform-specific here. llvm-svn: 239573
* Add assume_safety option for pragma loop vectorize and interleave.Tyler Nowicki2015-06-1110-18/+139
| | | | | | | | Specifying #pragma clang loop vectorize(assume_safety) on a loop adds the mem.parallel_loop_access metadata to each load/store operation in the loop. This metadata tells loop access analysis (LAA) to skip memory dependency checking. llvm-svn: 239572
* MC: Prune \return corresponding to r239552. [-Wdocumentation]NAKAMURA Takumi2015-06-112-2/+0
| | | | llvm-svn: 239571
* [Orc] Attempted fix for GCC ICE on Polly builder.Lang Hames2015-06-111-1/+1
| | | | | | Along the same lines as the fix in r228568. llvm-svn: 239570
* [modules] Fix assert/crash when parsing and merging a definition of a class ↵Richard Smith2015-06-114-11/+26
| | | | | | with a base-specifier inside a namespace. llvm-svn: 239569
* [Stackmaps][X86] Remove EFLAGS and IP registers from the live-out mask.Juergen Ributzka2015-06-112-0/+18
| | | | | | | | | | | | | Remove the EFLAGS from the stackmap live-out mask. The EFLAGS register is not supposed to be part of that set, because the X86 calling conventions mark the register as NOT preserved. Also remove the IP registers, since spilling and restoring those doesn't really make any sense. Related to rdar://problem/21019635. llvm-svn: 239568
* [WinEH] Create an llvm.x86.seh.exceptioninfo intrinsicReid Kleckner2015-06-1110-105/+176
| | | | | | | | | | | | | | This intrinsic is like framerecover plus a load. It recovers the EH registration stack allocation from the parent frame and loads the exception information field out of it, giving back a pointer to an EXCEPTION_POINTERS struct. It's designed for clang to use in SEH filter expressions instead of accessing the EXCEPTION_POINTERS parameter that is available on x64. This required a minor change to MC to allow defining a label variable to another absolute framerecover label variable. llvm-svn: 239567
* [Support] Fix a race initializing a static local in MSVCReid Kleckner2015-06-111-1/+9
| | | | | | | | | static local initialization isn't thread safe with MSVC and a race was reported in PR23817. We can't use std::atomic because it's not trivially constructible, so instead do some lame volatile global integer manipulation. llvm-svn: 239566
* Update stale comment before analyzeLoopUnrollCost. NFC.Michael Zolotukhin2015-06-111-7/+9
| | | | llvm-svn: 239565
* [Orc] Remove some unnecesary includes and whitespace that slipped in to r239561.Lang Hames2015-06-112-5/+1
| | | | | | NFC. llvm-svn: 239564
* COFF: Symbol resolution for common and comdat symbols defined in bitcode.Peter Collingbourne2015-06-117-3/+214
| | | | | | | | | | | | | | | | | | | | | | | | | In the case where either a bitcode file and a regular file or two bitcode files export a common or comdat symbol with the same name, the linker needs to pick one of them following COFF semantics. This patch implements a design for resolving such symbols that pushes most of the work onto either LLD's regular mechanism for resolving common or comdat symbols or the IR linker's mechanism for doing the same. We modify SymbolBody::compare to always prefer non-bitcode symbols, so that during the initial phase of symbol resolution, the symbol table always contains a regular symbol in any case where we need to choose between a regular and a bitcode symbol. In SymbolTable::addCombinedLTOObject, we force export any bitcode symbols that were initially pre-empted by a regular symbol, and later use SymbolBody::compare to choose between the regular symbol in the symbol table and the regular symbol from the combined LTO object file. This design seems to be sound, so long as the resolution mechanism is defined to be commutative and associative modulo arbitrary choices between symbols (which seems to be the case for COFF). Differential Revision: http://reviews.llvm.org/D10329 llvm-svn: 239563
* Change #ifdefs in test to UNSUPPORTED. No functionality change in the testsMarshall Clow2015-06-119-48/+10
| | | | llvm-svn: 239562
* [Orc] Make partition identification in the CompileOnDemand layer lazy.Lang Hames2015-06-113-384/+288
| | | | | | This also breaks out the logical dylib symbol resolution logic. llvm-svn: 239561
* Object: Prepend __imp_ when mangling a dllimport symbol in IRObjectFile.Peter Collingbourne2015-06-113-0/+24
| | | | | | | | | | | | | | | | | We cannot prepend __imp_ in the IR mangler because a function reference may be emitted unmangled in a constant initializer. The linker is expected to resolve such references to thunks. This is covered by the new test case. Strictly speaking we ought to emit two undefined symbols, one with __imp_ and one without, as we cannot know which symbol the final object file will refer to. However, this would require rather intrusive changes to IRObjectFile, and lld works fine without it for now. This reimplements r239437, which was reverted in r239502. Differential Revision: http://reviews.llvm.org/D10400 llvm-svn: 239560
* LTO: expose LTO_SYMBOL_COMDAT flag, which indicates that the definition is ↵Peter Collingbourne2015-06-112-1/+5
| | | | | | | | | | | | part of a comdat group. Reviewers: rafael Subscribers: llvm-commits, ruiu Differential Revision: http://reviews.llvm.org/D10330 llvm-svn: 239559
* [ms] Do lookup in dependent base classes also when overload resolution fails ↵Hans Wennborg2015-06-112-22/+44
| | | | | | | | | | | | | | | | | | | (PR23810) This patch does two things in order to enable compilation of the problematic code in PR23810: 1. In Sema::buildOverloadedCallSet, it postpones lookup for MS mode when no viable candidate is found in the overload set. Previously, lookup would only be postponed here if the overload set was empty. 2. Make BuildRecoveryCallExpr call Sema::DiagnoseEmptyLookup under more circumstances. There is a comment in DiagnoseTwoPhaseLookup that says "Don't diagnose names we find in classes; we get much better diagnostics for these from DiagnoseEmptyLookup." The problem was that DiagnoseEmptyLookup might not get called later, and we failed to recover. Differential Revision: http://reviews.llvm.org/D10369 llvm-svn: 239558
* Fix English usage in command line flag help string.Douglas Katzman2015-06-111-1/+1
| | | | llvm-svn: 239556
* [ELF] Introduce getValue() for ELF Symbols.Davide Italiano2015-06-111-0/+2
| | | | | | | Differential Revision: http://reviews.llvm.org/D10328 Reviewed by: rafael llvm-svn: 239555
* Replace string GNU Triples with llvm::Triple in TargetMachine. NFC.Daniel Sanders2015-06-1131-193/+190
| | | | | | | | | | | | | | | | | | Summary: For the moment, TargetMachine::getTargetTriple() still returns a StringRef. This continues the patch series to eliminate StringRef forms of GNU triples from the internals of LLVM that began in r239036. Reviewers: rengolin Reviewed By: rengolin Subscribers: ted, llvm-commits, rengolin, jholewinski Differential Revision: http://reviews.llvm.org/D10362 llvm-svn: 239554
* [CodeGen] ArrayRef'ize cond/pred in various TII APIs. NFC.Ahmed Bougacha2015-06-1130-126/+94
| | | | llvm-svn: 239553
* Generalize emitAbsoluteSymbolDiff.Rafael Espindola2015-06-115-34/+30
| | | | | | | | | | This makes emitAbsoluteSymbolDiff always succeed and moves logic from the asm printer to it. The object one now also works on ELF. If two symbols are in the same fragment, we will never move them apart. llvm-svn: 239552
* Set proper debug location for branch added in BasicBlock::splitBasicBlock().Alexey Samsonov2015-06-112-13/+37
| | | | | | | | | | | | | | | | This improves debug locations in passes that do a lot of basic block transformations. Important case is LoopUnroll pass, the test for correct debug locations accompanies this change. Test Plan: regression test suite Reviewers: dblaikie, sanjoy Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10367 llvm-svn: 239551
* [LoopUnroll] Use IRBuilder to create branch instructions.Alexey Samsonov2015-06-111-10/+9
| | | | | | | | | | | | | | | | | | Use IRBuilder::Create(Cond)?Br instead of constructing instructions manually with BranchInst::Create(). It's consistent with other uses of IRBuilder in this pass, and has an additional important benefit: Using IRBuilder will ensure that new branch instruction will get the same debug location as original terminator instruction it will eventually replace. For now I'm not adding a testcase, as currently original terminator instruction also lack debug location due to missing debug location propagation in BasicBlock::splitBasicBlock. That is, the testcase will accompany the fix for the latter I'm going to mail soon. llvm-svn: 239550
* [CodeGen] Emit Constants for immediate inlineasm arguments.Ahmed Bougacha2015-06-112-0/+35
| | | | | | | | | | | | | | | | | For inline assembly immediate constraints, we currently always use EmitScalarExpr, instead of directly emitting the constant. When the overflow sanitizer is enabled, this generates overflow intrinsics instead of constants. Instead, emit a constant for constraints that either require an immediate (e.g. 'I' on X86), or only accepts constants (immediate or symbolic; i.e., don't accept registers or memory). Fixes PR19763. Differential Revision: http://reviews.llvm.org/D10255 llvm-svn: 239549
* clang-cl: Add an alias for /wd4910Hans Wennborg2015-06-112-1/+4
| | | | llvm-svn: 239548
* Spell -Wdllexport-explicit-instantiation-decl correctly.Hans Wennborg2015-06-111-1/+1
| | | | llvm-svn: 239547
* Remove unused variables '__kmp_build_check_*' for non assert builds.Jonathan Peyton2015-06-113-4/+15
| | | | | | | | | | | | Add new LIBOMP_ENABLE_ASSERTIONS macro which can be set in a standalone build or takes the value of LLVM_ENABLE_ASSERTIONS when inside llvm/projects. This change also defines the KMP_BUILD_ASSERT() macro to do nothing when ENABLE_ASSERTIONS is off. This means the __kmp_build_check_* types won't be defined and thus, no warnings. http://lists.cs.uiuc.edu/pipermail/openmp-dev/2015-June/000719.html Patch by Jack Howarth and Jonathan Peyton llvm-svn: 239546
* Replace an instance of custom atomics with standard ones.Benjamin Kramer2015-06-111-3/+3
| | | | | | | Eventually I want to get rid of them entirely, but Statistic.h is still blocked on MSVC bugs. No functionality change. llvm-svn: 239545
* This reverts commit r239529 and r239514.Rafael Espindola2015-06-117-616/+0
| | | | | | | | | Revert "[AArch64] Match interleaved memory accesses into ldN/stN instructions." Revert "Fixing MSVC 2013 build error." The test/CodeGen/AArch64/aarch64-interleaved-accesses.ll test was failing on OS X. llvm-svn: 239544
* Revert "Fix merges of non-zero vector stores"Reid Kleckner2015-06-113-30/+8
| | | | | | | | This reverts commit r239539. It was causing SDAG assertions while building freetype. llvm-svn: 239543
* Implement recursive CMake.Jonathan Peyton2015-06-113-365/+359
| | | | | | | | | | | | | | Most CMake build systems put CMakeLists.txt files inside source directories where items need to get built. This change follows that convention by adding a new runtime/src/CMakeLists.txt file. An additional benefit is this helps logically seperate configuring with building as well. This change is mostly just copying and pasting the bottom half of runtime/CMakeLists.txt into runtime/src/CMakeLists.txt, but a few changes had to be made to get it to work. Most of those changes were to directory prefixes. Differential Revision: http://reviews.llvm.org/D10344 llvm-svn: 239542
* Fix comment typos.Douglas Katzman2015-06-111-2/+2
| | | | llvm-svn: 239541
* SLSR: Pass address space to isLegalAddressingModeMatt Arsenault2015-06-113-1/+112
| | | | | | | | | This only updates one of the uses. The other is used in cases that may never touch memory, so I'm not sure why this is even calling it. Perhaps there should be a new, similar hook for such cases or pass -1 for unknown address space. llvm-svn: 239540
* Fix merges of non-zero vector storesMatt Arsenault2015-06-113-8/+30
| | | | | | | | | | Now actually stores the non-zero constant instead of 0. I somehow forgot to include this part of r238108. The test change was just an independent instruction order swap, so just add another check line to satisfy CHECK-NEXT. llvm-svn: 239539
* Replace string GNU Triples with llvm::Triple in computeDataLayout(). NFC.Daniel Sanders2015-06-115-27/+24
| | | | | | | | | | | | | | | | Summary: This continues the patch series to eliminate StringRef forms of GNU triples from the internals of LLVM that began in r239036. Reviewers: rengolin Reviewed By: rengolin Subscribers: llvm-commits, jfb, rengolin Differential Revision: http://reviews.llvm.org/D10361 llvm-svn: 239538
* Add comments to PrintActions1 and Driver::PrintActions.Douglas Katzman2015-06-111-1/+6
| | | | | | Differential Revision: http://reviews.llvm.org/D10214 llvm-svn: 239537
OpenPOWER on IntegriCloud