summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Handle a symbol being undefined.Rafael Espindola2015-01-142-1/+10
| | | | | | | | | | | | | This can happen if: * It is present in a comdat in one file. * It is not present in the comdat of the file that is kept. * Is is not used. This should fix the LTO boostrap. Thanks to Takumi NAKAMURA for setting up the bot! llvm-svn: 225983
* clang-format: Disable flag for Google's Java and Javascript styles.Daniel Jasper2015-01-141-0/+2
| | | | | | | Disable AlwaysBreakBeforeMultilineString, as the style guides don't really say to do so. llvm-svn: 225982
* [mips] Handle transparent unions correctly.Daniel Sanders2015-01-142-0/+29
| | | | | | | | | | | | | | | | | | | | | | Summary: This fixes MultiSource/Applications/lemon on big-endian N32 by correcting the handling of the argument to wait(). glibc defines it as a transparent union of void* and int*. Such unions are passed according to the rules of the first member so the argument must be passed as if it were a void* (sign extended from i32 to i64) and not as a union (shifted to the upper bits of an i64). wait() already behaves correctly on big-endian O32 and N64 since the union is already the same size as an argument slot. Reviewers: atanasyan Reviewed By: atanasyan Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6963 llvm-svn: 225981
* Add disassembler tests for mips32r2 platform. There are no functional changes.Vladimir Medic2015-01-143-0/+757
| | | | llvm-svn: 225980
* [cleanup] Re-sort *all* #include lines with llvm/utils/sort_includes.pyChandler Carruth2015-01-1445-69/+56
| | | | | | | | | | Sorry for the noise, I managed to miss a bunch of recent regressions of include orderings here. This should actually sort all the includes for Clang. Again, no functionality changed, this is just a mechanical cleanup that I try to run periodically to keep the #include lines as regular as possible across the project. llvm-svn: 225979
* [cleanup] Re-sort #include lines using llvm/utils/sort_includes.pyChandler Carruth2015-01-146-6/+2
| | | | | | | | This is just a mechanical cleanup, no functionality changed. This just fixes very minor inconsistencies with how #include lines were spaced and sorted in LLD. llvm-svn: 225978
* reapply: SLPVectorizer: Cache results from memory alias checking.Erik Eckstein2015-01-141-21/+71
| | | | | | | | | | This speeds up the dependency calculations for blocks with many load/store/call instructions. Beside the improved runtime, there is no functional change. Compared to the original commit, this re-applied commit contains a bug fix which ensures that there are no incorrect collisions in the alias cache. llvm-svn: 225977
* [cleanup] Re-sort the #include lines with llvm/utils/sort_includes.pyChandler Carruth2015-01-1417-28/+28
| | | | | | | No functionality changed, this is just a mechanical cleanup to keep the order of #include lines consistent across the project. llvm-svn: 225976
* [cleanup] Re-sort the #include lines using llvm/utils/sort_includes.pyChandler Carruth2015-01-1413-22/+19
| | | | | | | No functionality changed, this is a purely mechanical cleanup to ensure the #include order remains consistent across the project. llvm-svn: 225975
* [cleanup] Re-sort all the #include lines in LLVM usingChandler Carruth2015-01-14196-288/+233
| | | | | | | | | | | utils/sort_includes.py. I clearly haven't done this in a while, so more changed than usual. This even uncovered a missing include from the InstrProf library that I've added. No functionality changed here, just mechanical cleanup of the include order. llvm-svn: 225974
* clang-format: [Java] Support try blocks with resources.Daniel Jasper2015-01-143-1/+17
| | | | | | | | | | | | | | | Before: try (SomeResource rs = someFunction()) { Something(); } After: try (SomeResource rs = someFunction()) { Something(); } llvm-svn: 225973
* Correct POP handling for v7mJyoti Allur2015-01-142-9/+15
| | | | llvm-svn: 225972
* clang-format: [Java] Prefer not to break in parameter annotations.Daniel Jasper2015-01-142-0/+8
| | | | | | | | | | | | | | Before: boolean someFunction(@Param(aaaaaaaaaaaaaaaa) String aaaaa, String bbbbbbbbbbbbbbb) {} After: boolean someFunction( @Param(aaaaaaaaaaaaaaaa) String aaaaa, String bbbbbbbbbbbbbbb) {} llvm-svn: 225971
* [dom] Make the DominatorTreeBase not a dynamic class!Chandler Carruth2015-01-141-2/+2
| | | | | | | | Now that the passes are wrappers around this, we no longer need a vtable, virtual destructor, and other associated mess. This is particularly nice to me as this is a class template. =] llvm-svn: 225970
* [PM] Port domtree to the new pass manager (at last).Chandler Carruth2015-01-146-4/+90
| | | | | | | | | | | | This adds the domtree analysis to the new pass manager. The analysis returns the same DominatorTree result entity used by the old pass manager and essentially all of the code is shared. We just have different boilerplate for running and printing the analysis. I've converted one test to run in both modes just to make sure this is exercised while both are live in the tree. llvm-svn: 225969
* [mips] Refine octeon instructions seq/seqi/sne/sneiKai Nacke2015-01-142-2/+70
| | | | | | | | | | | | | | This commit refines the pattern for the octeon seq/seqi/sne/snei instructions. The target register is set to 0 or 1 according to the result of the comparison. In C, this is something like rd = (unsigned long)(rs == rt) This commit adds a zext to bring the result to i64. With this change the instruction is selected for this type of code. (gcc produces the same code for the above C code.) llvm-svn: 225968
* Add disassembler tests for mips32r2 platform. There are no functional changes.Vladimir Medic2015-01-143-0/+618
| | | | llvm-svn: 225967
* [PM] Make DominatorTrees (corectly) movable so that we can move themChandler Carruth2015-01-142-1/+58
| | | | | | | | | | | | | | | into the new pass manager's analysis cache which stores results by-value. Technically speaking, the dom trees were originally not movable but copyable! This, unsurprisingly, didn't work at all -- the copy was shallow and just resulted in rampant memory corruption. This change explicitly forbids copying (as it would need to be a deep copy) and makes them explicitly movable with the unsurprising boiler plate to member-wise move them because we can't rely on MSVC to generate this code for us. =/ llvm-svn: 225966
* clang-format: [Java] Understand "import static".Daniel Jasper2015-01-142-1/+4
| | | | llvm-svn: 225965
* clang-format: [Java] Don't let annotations confuse return type analysis.Daniel Jasper2015-01-142-0/+7
| | | | | | | | | | | | | | Before: @Test ReturnType doSomething(String aaaaaaaaaaaaa, String bbbbbbbbbbbbbbb) {} After: @Test ReturnType doSomething( String aaaaaaaaaaaaa, String bbbbbbbbbbbbbbb) {} llvm-svn: 225964
* clang-format: [Java] Don't line-wrap before annotations' l_parens.Daniel Jasper2015-01-142-1/+5
| | | | | | | | | | | | | | Before: @SomeAnnotation (aaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaa) int i; After: @SomeAnnotation( aaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaa) int i; llvm-svn: 225963
* clang-format: [Java] Don't get confused by leading annotations.Daniel Jasper2015-01-142-1/+5
| | | | | | | | | | | | | | Before: @Test(a) aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = aaaaaaaaaaaaaaaaaaaaaaaaaaaa( aaaaaaaaaaaaaaaaaaaaaaa); After: @Test(a) aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = aaaaaaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaa); llvm-svn: 225962
* The assembler is now enabled by default.Brad Smith2015-01-141-9/+0
| | | | llvm-svn: 225961
* Sema: It's cheaper to ask LookupResult::empty than to calculate linkageDavid Majnemer2015-01-141-1/+1
| | | | llvm-svn: 225960
* Reapply debug info changes now that more precise column information is ↵David Blaikie2015-01-142-2/+2
| | | | | | available. llvm-svn: 225959
* Use the integrated assembler by default on 32-bit PowerPC and SPARC.Brad Smith2015-01-145-35/+7
| | | | llvm-svn: 225958
* Use the integrated assembler by default on SPARC.Brad Smith2015-01-144-5/+4
| | | | llvm-svn: 225957
* Reapply r225000 (reverted in r225555): DebugInfo: Generalize debug info ↵David Blaikie2015-01-1419-221/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | location handling (and follow-up commits). Several pieces of code were relying on implicit debug location setting which usually lead to incorrect line information anyway. So I've fixed those (in r225955 and r225845) separately which should pave the way for this commit to be cleanly reapplied. The reason these implicit dependencies resulted in crashes with this patch is that the debug location would no longer implicitly leak from one place to another, but be set back to invalid. Once a call with no/invalid location was emitted, if that call was ever inlined it could produce invalid debugloc chains and assert during LLVM's codegen. There may be further cases of such bugs in this patch - they're hard to flush out with regression testing, so I'll keep an eye out for reports and investigate/fix them ASAP if they come up. Original commit message: Reapply "DebugInfo: Generalize debug info location handling" Originally committed in r224385 and reverted in r224441 due to concerns this change might've introduced a crash. Turns out this change fixes the crash introduced by one of my earlier more specific location handling changes (those specific fixes are reverted by this patch, in favor of the more general solution). Recommitted in r224941 and reverted in r224970 after it caused a crash when building compiler-rt. Looks to be due to this change zeroing out the debug location when emitting default arguments (which were meant to inherit their outer expression's location) thus creating call instructions without locations - these create problems for inlining and must not be created. That is fixed and tested in this version of the change. Original commit message: This is a more scalable (fixed in mostly one place, rather than many places that will need constant improvement/maintenance) solution to several commits I've made recently to increase source fidelity for subexpressions. This resetting had to be done at the DebugLoc level (not the SourceLocation level) to preserve scoping information (if the resetting was done with CGDebugInfo::EmitLocation, it would've caused the tail end of an expression's codegen to end up in a potentially different scope than the start, even though it was at the same source location). The drawback to this is that it might leave CGDebugInfo out of sync. Ideally CGDebugInfo shouldn't have a duplicate sense of the current SourceLocation, but for now it seems it does... - I don't think I'm going to tackle removing that just now. I expect this'll probably cause some more buildbot fallout & I'll investigate that as it comes up. Also these sort of improvements might be starting to show a weakness/bug in LLVM's line table handling: we don't correctly emit is_stmt for statements, we just put it on every line table entry. This means one statement split over multiple lines appears as multiple 'statements' and two statements on one line (without column info) are treated as one statement. I don't think we have any IR representation of statements that would help us distinguish these cases and identify the beginning of each statement - so that might be something we need to add (possibly to the lexical scope chain - a scope for each statement). This does cause some problems for GDB and possibly other DWARF consumers. llvm-svn: 225956
* DebugInof: Correct the location of exception cleanups in global ctors/dtors ↵David Blaikie2015-01-144-4/+48
| | | | | | | | | | | | | | | | | | | | | | | | and ObjC methods Without setting the CurEHLocation these cleanups would be attributed to whatever the last active debug line location was (the 'fn' call in the included test cases). By setting CurEHLocation correctly the line information is improved/corrected. This quality bug turned into a crasher with r225000 when, instead of allowing the last location to persist, it would be zero'd out. This could lead to a function call (such as the dtor) being made without a debug location - if that call was subsequently inlined (and the caller and callee had debug info, just not the call instruction) the inliner would violate important constraints about the debug location chains by not updating the inlined instructions to chain up to the callee locations. So, by fixing this bug, I am addressing the assertion failures introduced by r225000 and should be able to recommit that patch with impunity... llvm-svn: 225955
* Use the operand vector instead so inline assembly can be validated tooDavid Majnemer2015-01-141-5/+5
| | | | | | The buildbots got upset after r225941, this should hopefully fix things. llvm-svn: 225954
* SelectionDAG: add a -filter-view-dags option to llcMehdi Amini2015-01-142-11/+30
| | | | | | | | | This option takes the name of the basic block you want to visualize with -view-*-dags Differential Revision: http://reviews.llvm.org/D6948 llvm-svn: 225953
* DAG Combiner: Fold SelectCC When Cond is UNDEFMehdi Amini2015-01-141-4/+7
| | | | | | | | | In case folding a node end up with a NaN as operand for the select, the folding of the condition of the selectcc node returns "UNDEF". Differential Revision: http://reviews.llvm.org/D6889 llvm-svn: 225952
* Add assertions for out of bound index in ComputeLinearIndexMehdi Amini2015-01-141-2/+3
| | | | llvm-svn: 225951
* X86: only access operands if they are presentSaleem Abdulrasool2015-01-141-0/+2
| | | | | | | | If there is no associated immediate (MS style inline asm), do not try to access the operand, assume that it is valid. This should fix the buildbots after SVN r225941. llvm-svn: 225950
* Fold a loop for array processing in ComputeLinearIndexMehdi Amini2015-01-142-11/+27
| | | | | | | | | | When processing an array, every Elt has the same layout, it is useless to recursively call each ComputeLinearIndex on each element. Just do it once and multiply by the number of elements. Differential Revision: http://reviews.llvm.org/D6832 llvm-svn: 225949
* Revert "Insert random noops to increase security against ROP attacks (llvm)"JF Bastien2015-01-1417-432/+4
| | | | | | | This reverts commit: http://reviews.llvm.org/D3392 llvm-svn: 225948
* Revert "Insert random noops to increase security against ROP attacks (clang)"JF Bastien2015-01-146-19/+1
| | | | | | | This reverts commit: http://reviews.llvm.org/D3393 llvm-svn: 225947
* irgen: expose DisableUnusedImportCheck flagPeter Collingbourne2015-01-141-0/+5
| | | | | | Differential Revision: http://reviews.llvm.org/D6956 llvm-svn: 225946
* irgen: expose PackageCreated hookPeter Collingbourne2015-01-141-1/+7
| | | | | | Differential Revision: http://reviews.llvm.org/D6955 llvm-svn: 225945
* NVPTX: Use MapMetadata() instead of custom/stale/untested logicDuncan P. N. Exon Smith2015-01-141-41/+10
| | | | | | | | | Copy the `GVMap` over to a standard `ValueToValueMapTy` so that we can reuse the `MapMetadata()` logic. Unfortunately the `GVMap` can't just be replaced, since `MapMetadata()` likes to modify the map, but at least this will prevent NVPTX from bitrotting. llvm-svn: 225944
* NVPTX: Remove bogus remap logic for global variable address spacesDuncan P. N. Exon Smith2015-01-141-12/+1
| | | | | | | The comment is incorrect, and the code mangles debug info. Remove the bad logic, which wasn't tested anyway. llvm-svn: 225943
* Sema: Relax parsing of '#' in constraintsDavid Majnemer2015-01-142-5/+1
| | | | llvm-svn: 225942
* X86: validate 'int' instructionSaleem Abdulrasool2015-01-143-0/+37
| | | | | | | The int instruction takes as an operand an 8-bit immediate value. Validate that the input is valid rather than silently truncating the value. llvm-svn: 225941
* Disable a couple of tests, CodeGen/X86/noop-insert.ll and ↵NAKAMURA Takumi2015-01-142-0/+4
| | | | | | CodeGen/X86/noop-insert-percentage.ll, in r225908, to unbreak tests. llvm-svn: 225940
* [dom] Remove extraneous inline keywords. Template functions and inlineChandler Carruth2015-01-141-17/+12
| | | | | | | | | class members are implicitly "inline", no key word needed. Naturally, this could change how LLVM inlines these functions because <GRR>, but that's not an excuse to use the keyword. ;] llvm-svn: 225939
* [dom] The formatting of the generic domtree has bitrotted over the yearsChandler Carruth2015-01-141-103/+100
| | | | | | | | | | significantly. Clean it up with the help of clang-format. I've touched this up by hand in a couple of places that weren't quite right (IMO). I think most of these actually have bugs open about already. llvm-svn: 225938
* [dom] Clean up some comments in this header that were confusinglyChandler Carruth2015-01-141-9/+7
| | | | | | formatted or placed incorrectly. llvm-svn: 225937
* [dom] Add a basic dominator tree test.Chandler Carruth2015-01-141-0/+57
| | | | | | | | | | | | | | Correct, we have *zero* basic testing of the dominator tree in the regression test suite. There is a single test that even prints it out, and that test only checks a single line of the output. There are a handful of tests that check post dominators, but all of those are looking for bugs rather than just exercising the basic machinery. This test is super boring and unexciting. But hey, it's something. I needed there to be something so I could switch the basic test to run with both the old and new pass manager. llvm-svn: 225936
* Fix a wrong comment in LoopVectorize.Hao Liu2015-01-141-5/+5
| | | | | | | | I.E. more than two -> exactly two Fix a typo function name in LoopVectorize. I.E. collectStrideAcccess() -> collectStrideAccess() llvm-svn: 225935
* Sema: Check type compatibility with the most recent decl when mergingDavid Majnemer2015-01-142-3/+14
| | | | | | | | | | We would check the type information from the declaration found by lookup but we would neglect checking compatibility with the most recent declaration. This would make it possible for us to not correctly diagnose inconsistencies with declarations which were made in a different scope. llvm-svn: 225934
OpenPOWER on IntegriCloud