summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [codeview] Don't attempt a cross-section label diffReid Kleckner2016-02-042-5/+82
| | | | | | | | This only comes up when we're trying to find the next .cv_loc label. Fixes PR26467 llvm-svn: 259733
* [libFuzzer] hot fix a testKostya Serebryany2016-02-041-1/+1
| | | | llvm-svn: 259732
* [libFuzzer] don't write the test unit when a leak is detected (since we ↵Kostya Serebryany2016-02-044-0/+16
| | | | | | don't know which unit causes the leak) llvm-svn: 259731
* [SimplifyCFG] Fix for "endless" loop after dead code removal (Alternative toGerolf Hoflehner2016-02-032-2/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | D16251) Summary: This is a simpler fix to the problem than the dominator approach in http://reviews.llvm.org/D16251. It adds only values into the gather() while loop that have been seen before. The actual endless loop is in the constant compare gather() routine in Utils/SimplifyCFG.cpp. The same value ret.0.off0.i is pushed back into the queue: %.ret.0.off0.i = or i1 %.ret.0.off0.i, %cmp10.i Here is what happens at the IR level: for.cond.i: ; preds = %if.end6.i, %if.end.i54 %ix.0.i = phi i32 [ 0, %if.end.i54 ], [ %inc.i55, %if.end6.i ] %ret.0.off0.i = phi i1 [false, %if.end.i54], [%.ret.0.off0.i, %if.end6.i] <<< %cmp2.i = icmp ult i32 %ix.0.i, %11 br i1 %cmp2.i, label %for.body.i, label %LBJ_TmpSimpleNeedExt.exit if.end6.i: ; preds = %for.body.i %cmp10.i = icmp ugt i32 %conv.i, %add9.i %.ret.0.off0.i = or i1 %ret.0.off0.i, %cmp10.i <<< When if.end.i54 gets eliminated which removes the definition of ret.0.off0.i. The result is the expression %.ret.0.off0.i = or i1 %.ret.0.off0.i, %cmp10.i (Note the first ‘or’ operand is now %.ret.0.off0.i, and *NOT* %ret.0.off0.i). And now there is use of .ret.0.off0.i before a definition which triggers the “endless” loop in gather(): while(!DFT.empty()) { V = DFT.pop_back_val(); // V is .ret.0.off0.i if (Instruction *I = dyn_cast<Instruction>(V)) { // If it is a || (or && depending on isEQ), process the operands. if (I->getOpcode() == (isEQ ? Instruction::Or : Instruction::And)) { DFT.push_back(I->getOperand(1)); // This is now .ret.0.off0.i also DFT.push_back(I->getOperand(0)); continue; // “endless loop” for .ret.0.off0.i } Reviewers: reames, ahatanak Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D16839 llvm-svn: 259730
* Add support for -sdk_version cmdline option.Pete Cooper2016-02-036-1/+61
| | | | | | | | | | | | This option is emitted in the min_version load commands. Note, there's currently a difference in behaviour compared to ld64 in that we emit a warning if we generate a min_version load command and didn't give an sdk_version. We need to decide what the correct behaviour is here as its possible we want to emit an error and force clients to provide the option. llvm-svn: 259729
* Bump DiagnosticSemaKinds count; we're close to hitting it.Manman Ren2016-02-031-1/+1
| | | | | | | | | $ grep '= DIAG_START_SEMA' include/clang/Basic/DiagnosticIDs.h DIAG_START_ANALYSIS = DIAG_START_SEMA + 3000 $ grep 'def ' include/clang/Basic/DiagnosticSemaKinds.td | wc -l 2994 llvm-svn: 259728
* [InstrProfiling] Fix a comment (NFC)Vedant Kumar2016-02-031-1/+1
| | | | llvm-svn: 259727
* Unify the target opcode enum in TargetOpcodes.h and the FixedInstrs array inDavid L Kreitzer2016-02-033-142/+158
| | | | | | | | CodeGenTarget.cpp to avoid the ordering dependence. NFCI. Differential Revision: http://reviews.llvm.org/D16826 llvm-svn: 259726
* Minor code cleanups. NFC.Junmo Park2016-02-031-18/+18
| | | | llvm-svn: 259725
* Fix missing module qualification of subprocess.PIPE.Zachary Turner2016-02-031-1/+1
| | | | llvm-svn: 259724
* Print the OffsetStart field's relocationDavid Majnemer2016-02-031-8/+15
| | | | llvm-svn: 259723
* rangify; NFCISanjay Patel2016-02-031-159/+129
| | | | llvm-svn: 259722
* Reapply r259624, it is likely not the commit causing the bot failures.Quentin Colombet2016-02-0311-18/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original message: Make CF constant string decl visible to name lookup to fix module errors The return type of the __builtin___*StringMakeConstantString functions is a pointer to a struct, so we need that struct to be visible to name lookup so that we will correctly merge multiple declarations of that type if they come from different modules. Incidentally, to make this visible to name lookup we need to rename the type to __NSConstantString, since the real NSConstantString is an Objective-C interface type. This shouldn't affect anyone outside the compiler since users of the constant string builtins cast the result immediately to CFStringRef. Since this struct type is otherwise implicitly created by the AST context and cannot access namelookup, we make this a predefined type and initialize it in Sema. Note: this issue of builtins that refer to types not visible to name lookup technically also affects other builtins (e.g. objc_msgSendSuper), but in all other cases the builtin is a library builtin and the issue goes away if you include the library that defines the types it uses, unlike for these constant string builtins. rdar://problem/24425801 llvm-svn: 259721
* clean up; NFCSanjay Patel2016-02-031-15/+13
| | | | llvm-svn: 259720
* [llvm-readobj] Add support for dumping S_DEFRANGE symbolsDavid Majnemer2016-02-032-2/+138
| | | | llvm-svn: 259719
* Add generation of LC_VERSION_MIN load commands.Pete Cooper2016-02-037-2/+151
| | | | | | | | | | | | | If the command line contains something like -macosx_version_min and we don't explicitly disable generation with -no_version_load_command then we generate the LC_VERSION_MIN command in the output file. There's a couple of FIXME's in here. These will be handled soon with more tests but I didn't want to grow this patch any more than it already was. rdar://problem/24472630 llvm-svn: 259718
* [cfi] Safe handling of unaddressable vtable pointers (compiler-rt).Evgeniy Stepanov2016-02-036-27/+112
| | | | | | | | | | | Avoid crashing when printing diagnostics for vtable-related CFI errors. In diagnostic mode, the frontend does an additional check of the vtable pointer against the set of all known vtable addresses and lets the runtime handler know if it is safe to inspect the vtable. http://reviews.llvm.org/D16824 llvm-svn: 259717
* [cfi] Safe handling of unaddressable vtable pointers (clang).Evgeniy Stepanov2016-02-037-27/+96
| | | | | | | | | | | Avoid crashing when printing diagnostics for vtable-related CFI errors. In diagnostic mode, the frontend does an additional check of the vtable pointer against the set of all known vtable addresses and lets the runtime handler know if it is safe to inspect the vtable. http://reviews.llvm.org/D16823 llvm-svn: 259716
* Revert r259624 - Make CF constant string decl visible to name lookup to fix ↵Quentin Colombet2016-02-0311-54/+18
| | | | | | | | | module errors. This breaks some internal bots in stage2: clang seg fault. Looking with Ben to see what is going on. llvm-svn: 259715
* Pass socket scheme as part of debug server listen URL.Oleksiy Vyalov2016-02-031-0/+1
| | | | | | http://reviews.llvm.org/D16861 llvm-svn: 259714
* Replace static const int with enum to fix obnoxious linker errors about a ↵Reid Kleckner2016-02-031-1/+1
| | | | | | missing definition llvm-svn: 259712
* [unittests] Move TargetRegistry test from Support to MCReid Kleckner2016-02-033-3/+6
| | | | | | | This removes the dependency from SupportTests to all of the LLVM backends, and makes it link faster. llvm-svn: 259705
* Silence -Wsign-conversion issue in ProgramTest.cppReid Kleckner2016-02-032-3/+5
| | | | | | | | Unfortunately, ProgramInfo::ProcessId is signed on Unix and unsigned on Windows, breaking the standard fix of using '0U' in the gtest expectation. llvm-svn: 259704
* Fix pointers to go on the right hand side. NFC.Ana Pazos2016-02-031-15/+15
| | | | | | | | | | | | | Summary: Fixed pointers to go on the right hand side following coding guidelines. NFC. Patch by Mandeep Singh Grang. Reviewers: majnemer, arsenm, sanjoy Differential Revision: http://reviews.llvm.org/D16866 llvm-svn: 259703
* [LoopStrengthReduce] Don't rewrite PHIs with incoming values from CatchSwitchesDavid Majnemer2016-02-033-0/+48
| | | | | | | | | | Bail out if we have a PHI on an EHPad that gets a value from a CatchSwitchInst. Because the CatchSwitchInst cannot be split, there is no good place to stick any instructions. This fixes PR26373. llvm-svn: 259702
* [ScalarEvolutionExpander] Simplify findInsertPointAfterDavid Majnemer2016-02-031-8/+6
| | | | | | | No functional change is intended. The loop could only execute, at most, once. llvm-svn: 259701
* [codeview] Remove EmitLabelDiff in favor emitAbsoluteSymbolDiffReid Kleckner2016-02-031-18/+4
| | | | llvm-svn: 259700
* [codeview] Use the MCStreamer interface directly instead of AsmPrinterReid Kleckner2016-02-032-101/+100
| | | | | | | | | This is mostly about having shorter lines and standardizing on one interface, but it also avoids some needless indirection. No functional change. llvm-svn: 259697
* [DWARFDebug] Fix another case of overlapping rangesKeno Fischer2016-02-032-13/+144
| | | | | | | | | | | | | | | Summary: In r257979, I added code to ensure that we wouldn't merge DebugLocEntries if the pieces they describe overlap. Unfortunately, I failed to cover the case, where there may have multiple active Expressions in the entry, in which case we need to make sure that no two values overlap before we can perform the merge. This fixed PR26148. Reviewers: aprantl Differential Revision: http://reviews.llvm.org/D16742 llvm-svn: 259696
* Address NDEBUG-related linkage issues for Value::assertModuleIsMaterialized()Todd Fiala2016-02-032-5/+3
| | | | | | | | | | | | | | The IR/Value class had a linkage issue present when LLVM was built as a library, and the LLVM library build time had different settings for NDEBUG than the client of the LLVM library. Clients could get into a state where the LLVM lib expected Value::assertModuleIsMaterialized() to be inline-defined in the header but clients expected that method to be defined in the LLVM library. See this llvm-commits thread for more details: http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160201/329667.html llvm-svn: 259695
* test: make test case more robust against removal of unrelated instructionsTobias Grosser2016-02-031-1/+1
| | | | llvm-svn: 259693
* Fix addend computation for IRELATIVE relocations.Rafael Espindola2016-02-032-13/+36
| | | | llvm-svn: 259692
* [SelectionDAG] Fix CombineToPreIndexedLoadStore O(n^2) behaviorTim Shen2016-02-033-6/+34
| | | | | | | | | | | | | | | | | | | | This patch consists of two parts: a performance fix in DAGCombiner.cpp and a correctness fix in SelectionDAG.cpp. The test case tests the bug that's uncovered by the performance fix, and fixed by the correctness fix. The performance fix keeps the containers required by the hasPredecessorHelper (which is a lazy DFS) and reuse them. Since hasPredecessorHelper is called in a loop, the overall efficiency reduced from O(n^2) to O(n), where n is the number of SDNodes. The correctness fix keeps iterating the neighbor list even if it's time to early return. It will return after finishing adding all neighbors to Worklist, so that no neighbors are discarded due to the original early return. llvm-svn: 259691
* [CUDA] added declarations for device-side system callsArtem Belevich2016-02-031-8/+35
| | | | | | ...and std:: wrappers for free/malloc. llvm-svn: 259690
* Fix sign conversion warnings in LLDB Python unittestsReid Kleckner2016-02-031-19/+18
| | | | llvm-svn: 259689
* Ensure that we substitute into the declaration of a template parameter packRichard Smith2016-02-032-4/+54
| | | | | | | (that is not a pack expansion) during template argument deduction, even if we deduced that the pack would be empty. llvm-svn: 259688
* Refactor conversion of deduced template arguments to reduce repetition.Richard Smith2016-02-031-103/+49
| | | | llvm-svn: 259687
* [NetBSD] Remove dead code.Davide Italiano2016-02-031-7/+0
| | | | | PR: http://reviews.llvm.org/D16818 llvm-svn: 259686
* Remove a stray ;.Jim Ingham2016-02-031-1/+0
| | | | llvm-svn: 259685
* The SetStopInfo from a Mach Exception was setting the stopJim Ingham2016-02-033-2/+4
| | | | | | | | | | reason to None when we stop due to a trace, then noticed that we were on a breakpoint that was not valid for the current thread. That should actually have set it back to trace. This was pr26441 (<rdar://problem/24470203>) llvm-svn: 259684
* Minor performance tweaks to llvm-tblgen (and a few that might be a good idea)Reid Kleckner2016-02-033-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds a reserve call to an expensive function (`llvm::LoadIntrinsics`), and may fix a few other low hanging performance fruit (I've put them in comments for now, so we can discuss). **Motivation:** As I'm sure other developers do, when I build LLVM, I build the entire project with the same config (`Debug`, `MinSizeRel`, `Release`, or `RelWithDebInfo`). However, the `Debug` config also builds llvm-tblgen in `Debug` mode. Later build steps that run llvm-tblgen then can actually be the slowest steps in the entire build. Nobody likes slow builds. Reviewers: rnk, dblaikie Differential Revision: http://reviews.llvm.org/D16832 Patch by Alexander G. Riccio llvm-svn: 259683
* re.results.form: Format out-of-range subexpression references as nullDuncan P. N. Exon Smith2016-02-032-4/+56
| | | | | | | | | | Rather than crashing in match_results::format() when a reference to a marked subexpression is out of range, format the subexpression as empty (i.e., replace it with an empty string). Note that match_results::operator[]() has a range-check and returns a null match in this case, so this just re-uses that logic. llvm-svn: 259682
* [Sema debugger support] Require non-void types to be complete in ↵Douglas Gregor2016-02-032-0/+17
| | | | | | | | | | unknown-anytype casts. When performing a cast from an __unknown_anytype function call to a non-void type, we need to make sure that type is complete. Fixes rdar://problem/23959960. llvm-svn: 259681
* Move some android platform functions to lldbplatformutil.Zachary Turner2016-02-033-79/+80
| | | | | | | | | | | | | | | | | | | My eventual goal is to move all of the test decorators to their own module such as `decorators.py`. But some of the decorators use existing functions in `lldbtest.py` and conceptually the functions are probably more appropriately placed in lldbplatformutil. Moreover, lldbtest.py is a huge file with a ton of random utility functions scattered around, so this patch also workds toward the goal of reducing the footprint of this one module to a more reasonable size. So this patch moves some of them over to lldbplatformutil with the eventual goal of moving decorators over to their own module. Reviewed By: Tamas Berghammer, Pavel Labath Differential Revision: http://reviews.llvm.org/D16830 llvm-svn: 259680
* ELF: Remove dead code.Rui Ueyama2016-02-031-3/+0
| | | | | | | R_X86_64_DTPOFF64 relocs are for the dynamic linker. Static linkers create them but don't consume them. llvm-svn: 259679
* Added Anastasia Stulova as a code owner for OpenCLAnastasia Stulova2016-02-031-0/+4
| | | | | | | Reviewers: Chris Lattner Subscribers: cfe-dev llvm-svn: 259678
* Fix regression from r259622: the operand of an increment that is the operand ofRichard Smith2016-02-032-2/+3
| | | | | | | a cast expression is not the operand of a cast expression itself, so if it's parenthesized we need to form a ParenExpr not a ParenListExpr. llvm-svn: 259677
* ARM: support TLS for WoASaleem Abdulrasool2016-02-036-0/+205
| | | | | | | | | | | Add support for TLS access for Windows on ARM. This generates a similar access to MSVC for ARM. The changes to the tablegen data is needed to support loading an external symbol global that is not for a call. The adjustments to the DAG to DAG transforms are needed to preserve the 32-bit move. llvm-svn: 259676
* Revert r259662, which caused regressions on polly tests.Wei Mi2016-02-0312-205/+30
| | | | llvm-svn: 259675
* [InstCombine] Revert r238452: Fold IntToPtr and PtrToInt into preceding loads.Quentin Colombet2016-02-034-169/+7
| | | | | | | | | | | | | | | | | | | | | | | | | According to git bisect, this is the root cause of a miscompile for Regex in libLLVMSupport. I am still working on reducing a test case. The actual bug may be elsewhere and this commit just exposed it. Anyway, at the moment, to reproduce, follow these steps: 1. Build clang and libLTO in release mode. 2. Create a new build directory <stage2> and cd into it. 3. Use clang and libLTO from #1 to build llvm-extract in Release mode + asserts using -O2 -flto 4. Run llvm-extract -ralias '.*bar' -S test/Other/extract-alias.ll Result: program doesn't contain global named '.*bar'! Expected result: @a0a0bar = alias void ()* @bar @a0bar = alias void ()* @bar declare void @bar() Note: In step #3, if you don't use lto or asserts, the miscompile disappears. llvm-svn: 259674
OpenPOWER on IntegriCloud