summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix a few memory leaks in CodeGenRegBank.Craig Topper2014-11-282-0/+7
| | | | llvm-svn: 222930
* Use unique_ptr to simplify deletion.Craig Topper2014-11-282-7/+5
| | | | llvm-svn: 222929
* InstCombine: FoldOrOfICmps harderDavid Majnemer2014-11-282-2/+35
| | | | | | | | | | | | We may be in a situation where the icmps might not be near each other in a tree of or instructions. Try to dig out related compare instructions and see if they combine. N.B. This won't fire on deep trees of compares because rewritting the tree might end up creating a net increase of IR. We may have to resort to something more sophisticated if this is a real problem. llvm-svn: 222928
* [LICM] Store sink and indirectbr instructionsBruno Cardoso Lopes2014-11-282-0/+51
| | | | | | | | | | | | | | Loop simplify skips exit-block insertion when exits contain indirectbr instructions. This leads to an assertion in LICM when trying to sink stores out of non-dedicated loop exits containing indirectbr instructions. This patch fix this issue by re-checking for dedicated exits in LICM prior to store sink attempts. Differential Revision: http://reviews.llvm.org/D6414 rdar://problem/18943047 llvm-svn: 222927
* [SwitchLowering] Handle multiple destinations on condensed case stmtsBruno Cardoso Lopes2014-11-282-14/+61
| | | | | | | | | | | | | | Switch cases statements with sequential values that branch to the same destination BB may often be handled together in a single new source BB. In this scenario we need to remove remaining incoming values from PHI instructions in the destination BB, as to match the number of source branches. Differential Revision: http://reviews.llvm.org/D6415 rdar://problem/19040894 llvm-svn: 222926
* Enable FeatureFastUAMem for btver2Sanjay Patel2014-11-282-20/+31
| | | | | | | | | | | | | Allow unaligned 16-byte memop codegen for btver2. No functional changes for any other subtargets. Replace the existing supposed small memcpy test with an actual test of a small memcpy. The previous test wasn't using FileCheck either. This patch should allow us to close PR21541 ( http://llvm.org/bugs/show_bug.cgi?id=21541 ). Differential Revision: http://reviews.llvm.org/D6360 llvm-svn: 222925
* [clang-tidy] More tests for the google-explicit-constructor checkAlexander Kornienko2014-11-281-5/+26
| | | | llvm-svn: 222924
* Add back r222727 with a fix.Rafael Espindola2014-11-283-3/+35
| | | | | | | | | | | | | | | | | | | | | The original patch would fail when: * A dst opaque type (%A) is matched with a src type (%A). * A src opaque (%E) type is then speculatively matched with %A and the speculation fails afterward. * When rolling back the speculation we would cancel the source %A to dest %A mapping. The fix is to keep an explicit list of which resolutions are speculative. Original message: Fix overly aggressive type merging. If we find out that two types are *not* isomorphic, we learn nothing about opaque sub types in both the source and destination. llvm-svn: 222923
* Add an assert and use a range loop. NFC.Rafael Espindola2014-11-281-2/+4
| | | | llvm-svn: 222922
* Add a testcase reduced from clang lto bootstrap on OS X.Rafael Espindola2014-11-282-0/+34
| | | | llvm-svn: 222921
* Fix wrong encoding of MRSBanked.Charlie Turner2014-11-283-67/+67
| | | | | | | Patch by Matthew Wahab. Change-Id: Ia2a001ca2760028ea360fe77b56f203a219eefbc llvm-svn: 222920
* [Msan] Generalize mapping facilities to add FreeBSD supportViktor Kutuzov2014-11-284-58/+169
| | | | | | Differential Revision: http://reviews.llvm.org/D6387 llvm-svn: 222919
* [msan] Fix origin propagation for select of floats.Evgeniy Stepanov2014-11-283-3/+42
| | | | | | | | | | MSan does not assign origin for instrumentation temps (i.e. the ones that do not come from the application code), but "select" instrumentation erroneously tried to use one of those. https://code.google.com/p/memory-sanitizer/issues/detail?id=78 llvm-svn: 222918
* Test all <build attribute, value> pairs.Charlie Turner2014-11-2822-287/+1148
| | | | | | | | | | Add more tests to make sure the encoding/decoding of build attributes works correctly for all permissible values of build attributes. For cases where there are an infinite number of such values, a representative subset has been settled for. Change-Id: I2643c9624c211b2d56405306e16eec2d487bc5d6 llvm-svn: 222917
* Removed extra line from a comment to test first commit. NFC.Ankur Garg2014-11-281-1/+0
| | | | llvm-svn: 222916
* [asan] Remove the local copy of Android ucontext.h.Evgeniy Stepanov2014-11-286-207/+1
| | | | | | This header is present in the r10c release of the NDK. llvm-svn: 222915
* [OPENMP] Additional processing of 'omp atomic write' directive.Alexey Bataev2014-11-284-16/+128
| | | | | | According to OpenMP standard, Section 2.12.6, atomic Construct, '#pragma omp atomic write' is allowed to be used only for expression statements of form 'x = expr;', where x is a lvalue expression and expr is an expression with scalar type. Patch adds checks for it. llvm-svn: 222913
* Fix another memory leak in TableGen AsmMatcher by deleting CodeGenInstAliases.Craig Topper2014-11-281-0/+5
| | | | llvm-svn: 222912
* Add missing 'override' keyword.Craig Topper2014-11-281-1/+1
| | | | llvm-svn: 222911
* Add support for UNWIND_X86_64_MODE_STACK_IND entries.Jason Molenda2014-11-281-37/+58
| | | | | | | Correct the function offset computations in UNWIND_SECOND_LEVEL_REGULAR tables. A few other small fixes. llvm-svn: 222910
* Use unique_ptr to fix some memory leaks in Tablegen AsmMatcherEmitter.Craig Topper2014-11-281-37/+44
| | | | llvm-svn: 222909
* Use range-based for loops and const-correct a few things.Craig Topper2014-11-281-59/+40
| | | | llvm-svn: 222908
* Do not incorrectly set the inverted flag.Hongbin Zheng2014-11-282-1/+49
| | | | | | | | | | | | | | | | | | In TempScopInfo::buildCondition we extract the conditions to guard the BB *in addition of* loop bounds. This means we should only consider the conditions in the paths (in CFG) that do not contain cycles (loops). At the same time, we set the invert flag if the FalseBB of the current branch dominates our target BB to indicate that we reach the target BB with an inverted condition from the current branch. In this case, the path from the FalseBB contains a cycle if the FalseBB is the target of a backedge. The conditions implied by such a path should not be consider. We can identify such a case by checking if the TrueBB also dominates our target BB, which means we can also reach our target BB from the TrueBB, without going through the backedge. llvm-svn: 222907
* Create a new 'flag_enum' attribute.Alexis Hunt2014-11-2812-80/+286
| | | | | | | | | | | This attribute serves as a hint to improve warnings about the ranges of enumerators used as flag types. It currently has no working C++ implementation due to different semantics for enums in C++. For more explanation, see the docs and testcases. Reviewed by Aaron Ballman. llvm-svn: 222906
* Stop using ArrayRef of a const type.Tim Northover2014-11-273-4/+3
| | | | | | I *think* this is what the GCC bots are complaining about. llvm-svn: 222905
* AArch64: simplify PCS mapping.Tim Northover2014-11-276-175/+57
| | | | | | | | | | | | Now that LLVM can count the registers needed to implement AAPCS rules, we don't need to duplicate that logic here. This means we can drop the explicit padding and also use more natural types in many cases (e.g. "struct { float arr[3]; }" used to end up as "[2 x double]" to avoid holes on the stack. The one wrinkle is that AAPCS va_arg was also using the register counting machinery. But the local replacement isn't too bad. llvm-svn: 222904
* AArch64: treat [N x Ty] as a block during procedure calls.Tim Northover2014-11-2710-9/+257
| | | | | | | | | | | | | | The AAPCS treats small structs and homogeneous floating (or vector) aggregates specially, and guarantees they either get passed as a contiguous block of registers, or prevent any future use of those registers and get passed on the stack. This concept can fit quite neatly into LLVM's own type system, mapping an HFA to [N x float] and so on, and small structs to [N x i64]. Doing so allows front-ends to emit AAPCS compliant code without having to duplicate the register counting logic. llvm-svn: 222903
* Make LLGS to open a named pipe and write a listening port to it only when a ↵Oleksiy Vyalov2014-11-271-14/+31
| | | | | | proper port value is received. llvm-svn: 222902
* [mips][microMIPS] Implement SWM16 and LWM16 instructionsZoran Jovanovic2014-11-279-0/+162
| | | | | | Differential Revision: http://reviews.llvm.org/D5579 llvm-svn: 222901
* [mips][microMIPS] Implement BREAK16 and SDBBP16 instructionsJozef Kolek2014-11-273-0/+23
| | | | | | | | Patch by Radovan Obradovic. Differential Revision: http://reviews.llvm.org/D5048 llvm-svn: 222900
* [mips] Add synci instruction.Daniel Sanders2014-11-278-3/+63
| | | | | | | | | | | | | | Patch by Amaury Pouly Reviewers: dsanders Reviewed By: dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6421 llvm-svn: 222899
* Widen ELFYAML relocation type to 32 bitsWill Newton2014-11-272-2/+10
| | | | | | | The current 8 bits is sufficient for ELF32 targets but ELF64 requires 32 bits. Add a test for AArch64 that exposes the issue. llvm-svn: 222898
* Commit back the correct bits of r222760 (was r222538).Rafael Espindola2014-11-272-0/+33
| | | | | | | | | | | | | | | | | I also added a test. Original message: Allow FDE references outside the +/-2GB range supported by PC relative offsets for code models other than small/medium. For JIT application, memory layout is less controlled and can result in truncations otherwise. Patch from Akos Kiss. Differential Revision: http://reviews.llvm.org/D6079 llvm-svn: 222897
* Revert "Reapply 222538 and update tests to explicitly request small code ↵Rafael Espindola2014-11-2721-71/+20
| | | | | | | | | | | | | | | | model and PIC:" This reverts commit r222760. It changed our behaviour on PIC so we don't match gas anymore. It also included lots of unnecessary changes to tests. If those changes are desirable, there should be an independent discussion as they are out of scope for that patch. I will recommit the other bits. llvm-svn: 222896
* Revert "Fix overly aggressive type merging."Duncan P. N. Exon Smith2014-11-273-41/+8
| | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit r222727, which causes LTO bootstrap failures. Last passing @ r222698: http://lab.llvm.org:8080/green/job/clang-Rlto_master_build/532/ First failing @ r222843: http://lab.llvm.org:8080/green/job/clang-Rlto_master_build/533/ Internal bootstraps pointed at a much narrower range: r222725 is passing, and r222731 is failing. LTO crashes while handling libclang.dylib: http://lab.llvm.org:8080/green/job/clang-Rlto_master_build/533/consoleFull#-158682280549ba4694-19c4-4d7e-bec5-911270d8a58c GEP is not of right type for indices! %InfoObj.i.i = getelementptr inbounds %"class.llvm::OnDiskIterableChainedHashTable"* %.lcssa, i64 0, i32 0, i32 4, !dbg !123627 %"class.clang::serialization::reader::ASTIdentifierLookupTrait" = type { %"class.clang::ASTReader.31859"*, %"class.clang::serialization::ModuleFile.31870"*, %"class.clang::IdentifierInfo"* }LLVM ERROR: Broken function found, compilation aborted! clang: error: linker command failed with exit code 1 (use -v to see invocation) Looks like the new algorithm doesn't merge types aggressively enough. llvm-svn: 222895
* Sphinx does not have a lexer for OpenCL, so falling back to C for the ↵Aaron Ballman2014-11-271-8/+8
| | | | | | language on the code block. Also fixing an indentation warning. NFC to the content of the documentation itself. llvm-svn: 222894
* clang-format: [JS] Contract fewer functions to a single line.Daniel Jasper2014-11-272-2/+8
| | | | | | | | | | | | | Before: var someVariable = function(x) { return x.zIsTooLongForOneLineWithTheDeclarationLine(); }; After: var someVariable = function(x) { return x.zIsTooLongForOneLineWithTheDeclarationLine(); }; llvm-svn: 222893
* clang-format: [JS] Try not to break in container literals.Daniel Jasper2014-11-272-0/+7
| | | | | | | | | | | | | | | | | Before: var obj = { fooooooooo: function(x) { return x.zIsTooLongForOneLineWithTheDeclarationLine(); } }; After: var obj = { fooooooooo: function(x) { return x.zIsTooLongForOneLineWithTheDeclarationLine(); } }; llvm-svn: 222892
* reinstate r222872: Peephole optimization in switch table lookup: reuse the ↵Erik Eckstein2014-11-272-7/+227
| | | | | | | | | | | | | | | | | | | | | | | | | | | guarding table comparison if possible. Fixed missing dominance check. Original commit message: This optimization tries to reuse the generated compare instruction, if there is a comparison against the default value after the switch. Example: if (idx < tablesize) r = table[idx]; // table does not contain default_value else r = default_value; if (r != default_value) ... Is optimized to: cond = idx < tablesize; if (cond) r = table[idx]; else r = default_value; if (cond) ... Jump threading will then eliminate the second if(cond). llvm-svn: 222891
* clang-format: [JS] new and delete are valid function names.Daniel Jasper2014-11-272-3/+4
| | | | | | | | | | | | Before: someObject.new (); someObject.delete (); After: someObject.new(); someObject.delete(); llvm-svn: 222890
* [msan] Remove indirect call wrapping code.Evgeniy Stepanov2014-11-273-170/+1
| | | | | | This functionality was only used in MSanDR, which is deprecated. llvm-svn: 222889
* clang-format: [JS] Make Closure module detection more narrow.Daniel Jasper2014-11-272-1/+7
| | | | | | | | | | | Before: var MyLongClassName = goog.module.get('my.long.module.name.followedBy.MyLongClassName'); After: var MyLongClassName = goog.module.get('my.long.module.name.followedBy.MyLongClassName'); llvm-svn: 222888
* [mips][microMIPS] Implement disassembler support for 16-bit instructions ↵Jozef Kolek2014-11-274-3/+105
| | | | | | | | LI16, ADDIUR1SP, ADDIUR2 and ADDIUS5 Differential Revision: http://reviews.llvm.org/D6419 llvm-svn: 222887
* clang-format: Don't use column layout with AlignAfterOpenBrackets.Daniel Jasper2014-11-272-0/+11
| | | | | | This fixes llvm.org/PR21676. llvm-svn: 222886
* [Msan] Fix some interceptors to pass initialization on FreeBSDViktor Kutuzov2014-11-271-0/+6
| | | | | | Differential Revision: http://reviews.llvm.org/D6417 llvm-svn: 222885
* A little more work on the compact unwind dumper.Jason Molenda2014-11-271-25/+55
| | | | | | | | | | | | | UNWIND_X86_64_MODE_STACK_IND mode is almost correct; extra stack space allocated before the reg saves isn't handled right. Still a little wobbily on the file addresses of functions. Finally understand how the 6 registers that may be saved are ordered in just 10 its of space -- the Lehmer code for the registers is derived and then the sequence is encoded in a variable base number. Added some comments with references to what the code is doing so it'll be easier for others to track down. llvm-svn: 222884
* Stop uppercasing build attribute data.Charlie Turner2014-11-278-17/+16
| | | | | | | | | | | | | | | | | | | | | | | | The string data for string-valued build attributes were being unconditionally uppercased. There is no mention in the ARM ABI addenda about case conventions, so it's technically implementation defined as to whether the data are capitialised in some way or not. However, there are good reasons not to captialise the data. * It's less work. * Some vendors may legitimately have case-sensitive checks for these attributes which would fail on LLVM generated object files. * There could be locale issues with uppercasing. The original reasons for uppercasing appear to have stemmed from an old codesourcery toolchain behaviour, see http://comments.gmane.org/gmane.comp.compilers.llvm.cvs/87133 This patch makes the object file emitted no longer captialise string data, it encodes as seen in the assembly source. Change-Id: Ibe20dd6e60d2773d57ff72a78470839033aa5538 llvm-svn: 222882
* Use FileCheck instead of grep. Change by Ankur Garg.Suyog Sarda2014-11-272-5/+14
| | | | | | Differential Revision: http://reviews.llvm.org/D6430 llvm-svn: 222879
* [clang-tidy] Support initializer_list in google-explicit-constructor checkAlexander Kornienko2014-11-278-30/+117
| | | | | | | | | | | | | | | | | | | Summary: According to the Google C++ Style Guide, constructors taking a single std::initializer_list<> should not be marked explicit. This change also changes the messages according to conventions used in Clang diagnostics: no capitalization of the first letter, no trailing dot. Reviewers: djasper Reviewed By: djasper Subscribers: curdeius, cfe-commits Differential Revision: http://reviews.llvm.org/D6427 llvm-svn: 222878
* Revert "Peephole optimization in switch table lookup: reuse the guarding ↵Erik Eckstein2014-11-272-183/+7
| | | | | | | | table comparison if possible." It is breaking the clang bootstrag. llvm-svn: 222877
OpenPOWER on IntegriCloud