summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* IntelJITEventListener updates to fix breaks by recent changes to ↵Elena Demikhovsky2014-08-213-5/+4
| | | | | | | | EngineBuilder and DIContext. By Arch Robison. llvm-svn: 216159
* Repace SmallPtrSet with SmallPtrSetImpl in function arguments to avoid ↵Craig Topper2014-08-2149-120/+118
| | | | | | needing to mention the size. llvm-svn: 216158
* InstCombine: Fold ((A | B) & C1) ^ (B & C2) -> (A & C1) ^ B if C1^C2=-1David Majnemer2014-08-213-0/+54
| | | | | | Adapted from a patch by Richard Smith, test-case written by me. llvm-svn: 216157
* Remove custom implementations of max/min in StringRef that was originally ↵Craig Topper2014-08-212-22/+16
| | | | | | added to work an old gcc bug. I believe its been fixed by now. llvm-svn: 216156
* add self to creditsEric Fiselier2014-08-211-0/+4
| | | | llvm-svn: 216155
* Add self to creditsEric Fiselier2014-08-211-0/+4
| | | | llvm-svn: 216154
* [PECOFF] Don't use default argument.Rui Ueyama2014-08-212-3/+3
| | | | | | | I'm adding new parameters to the function, and the existing parameter with a default argument is found confusing. llvm-svn: 216153
* Remove dead code.Rui Ueyama2014-08-213-58/+0
| | | | llvm-svn: 216152
* Mark some localization time tests as XFAIL on linux.Eric Fiselier2014-08-212-0/+9
| | | | | | | | This marks some of the localization test XFAIL on linux. There has been some discussion on D4861 about doing this. Please let me know if any of these tests for you on linux. llvm-svn: 216151
* Mark some localization monetary tests as XFAIL on linux.Eric Fiselier2014-08-213-2/+17
| | | | | | | | This marks some of the localization test XFAIL on linux. There has been some discussion on D4861 about doing this. Please let me know if any of these tests for you on linux. llvm-svn: 216150
* Fix a bug around truncating vector in const prop.Jiangning Liu2014-08-212-0/+12
| | | | | | In constant folding stage, "TRUNC" can't handle vector data type. llvm-svn: 216149
* Mark localization ctype tests as XFAIL on linux.Eric Fiselier2014-08-216-0/+8
| | | | | | | | This marks some of the localization test XFAIL on linux. There has been some discussion on D4861 about doing this. Please let me know if any of these tests for you on linux. llvm-svn: 216148
* Revert r216066, "Optimize ZERO_EXTEND and SIGN_EXTEND in both SelectionDAG ↵Jiangning Liu2014-08-214-314/+15
| | | | | | Builder and type". llvm-svn: 216147
* [mach-o] Add support for -exported_symbols_list and -keep_private_externsNick Kledzik2014-08-2110-37/+486
| | | | | | | | | | | | | | Both options control the final scope of atoms. When -exported_symbols_list <file> is used, the file is parsed into one symbol per line in the file. Only those symbols will be exported (global) in the final linked image. The -keep_private_externs option is only used with -r mode. Normally, -r mode reduces private extern (scopeLinkageUnit) symbols to non-external. But add the -keep_private_externs option keeps them private external. llvm-svn: 216146
* MS ABI: Don't always instantiate all members of dllexported class templates ↵Hans Wennborg2014-08-213-5/+57
| | | | | | | | | | | | | | | | (PR20163) Normally we mark all members of exported classes referenced to get them emitted. However, MSVC doesn't do this for class templates that are implicitly specialized or just have an explicit instantiation declaration. For such specializations, the members are emitted when referenced. The exception is the case when the dllexport attribute is propagated from a base class to a base class template that doesn't have an explicit attribute: in this case all methods of the base class template do get instantiated. llvm-svn: 216145
* [PeepholeOptimizer] Take advantage of the isInsertSubreg property in theQuentin Colombet2014-08-212-37/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | advanced copy optimization. This is the final step patch toward transforming: udiv r0, r0, r2 udiv r1, r1, r3 vmov.32 d16[0], r0 vmov.32 d16[1], r1 vmov r0, r1, d16 bx lr into: udiv r0, r0, r2 udiv r1, r1, r3 bx lr Indeed, thanks to this patch, this optimization is able to look through vmov.32 d16[0], r0 vmov.32 d16[1], r1 and is able to rewrite the following sequence: vmov.32 d16[0], r0 vmov.32 d16[1], r1 vmov r0, r1, d16 into simple generic GPR copies that the coalescer managed to remove. <rdar://problem/12702965> llvm-svn: 216144
* [ARM] Mark VSETLNi32 with the InsertSubreg property and implement the relatedQuentin Colombet2014-08-213-0/+43
| | | | | | | | | | | | | target hook. This patch teaches the compiler that: dX = VSETLNi32 dY, rZ, imm is the same as: dX = INSERT_SUBREG dY, rZ, translateImmToSubIdx(imm) <rdar://problem/12702965> llvm-svn: 216143
* test/CodeGenCXX/dllexport.cpp: don't instantiate templates in USEMEMFUNC macroHans Wennborg2014-08-211-11/+11
| | | | | | | Use the derived class in the macro instead, to make it unambigous where the template is being instantiated. llvm-svn: 216142
* [LoopVectorize] Up the maximum unroll factor to 4 for AArch64James Molloy2014-08-211-1/+7
| | | | | | Only for Cortex-A57 and Cyclone for now, where it has shown wins. llvm-svn: 216141
* [LoopVectorizer] Limit unroll factor in the presence of nested reductions.James Molloy2014-08-201-0/+17
| | | | | | If we have a scalar reduction, we can increase the critical path length if the loop we're unrolling is inside another loop. Limit, by default to 2, so the critical path only gets increased by one reduction operation. llvm-svn: 216140
* Add isInsertSubreg property.Quentin Colombet2014-08-208-1/+99
| | | | | | | | | | | | | This patch adds a new property: isInsertSubreg and the related target hooks: TargetIntrInfo::getInsertSubregInputs and TargetInstrInfo::getInsertSubregLikeInputs to specify that a target specific instruction is a (kind of) INSERT_SUBREG. The approach is similar to r215394. <rdar://problem/12702965> llvm-svn: 216139
* Lower thumbv4t & thumbv5 lo->lo copies through a push-pop sequenceJonathan Roelofs2014-08-203-4/+66
| | | | | | | | | | | On pre-v6 hardware, 'MOV lo, lo' gives undefined results, so such copies need to be avoided. This patch trades simplicity for implementation time at the expense of performance... As they say: correctness first, then performance. See http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-August/075998.html for a few ideas on how to make this better. llvm-svn: 216138
* Mention the right target hook in the comment on isExtractSubreg property.Quentin Colombet2014-08-201-1/+1
| | | | llvm-svn: 216137
* [PeepholeOptimizer] Take advantage of the isExtractSubreg property in theQuentin Colombet2014-08-201-24/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | advanced copy optimization. This patch is a step toward transforming: udiv r0, r0, r2 udiv r1, r1, r3 vmov.32 d16[0], r0 vmov.32 d16[1], r1 vmov r0, r1, d16 bx lr into: udiv r0, r0, r2 udiv r1, r1, r3 bx lr Indeed, thanks to this patch, this optimization is able to look through vmov r0, r1, d16 but it does not understand yet vmov.32 d16[0], r0 vmov.32 d16[1], r1 Comming patches will fix that and update the related test case. <rdar://problem/12702965> llvm-svn: 216136
* New InstCombine pattern: (icmp ult/ule (A + C1), C3) | (icmp ult/ule (A + ↵Yi Jiang2014-08-202-0/+81
| | | | | | C2), C3) to (icmp ult/ule ((A & ~(C1 ^ C2)) + max(C1, C2)), C3) under certain condition llvm-svn: 216135
* Don't allow MCStreamer::EmitIntValue to output 0-byte integers.Alexey Samsonov2014-08-202-2/+3
| | | | | | | | It makes no sense and can hide bugs. In particular, it lead to left shift by 64 bits, which is an undefined behavior, properly reported by UBSan. llvm-svn: 216134
* [test] Turn off warnings for test/Analysis/identical-expressions.cpp.Jordan Rose2014-08-201-3/+3
| | | | | | | Also, make it slightly clearer what's being tested by only differentiating integer literals based on their suffix, rather than using a very large constant. llvm-svn: 216133
* [ARM] Mark VMOVRRD with the ExtractSubreg property and implement the relatedQuentin Colombet2014-08-203-0/+39
| | | | | | | | | | | | | | target hook. This patch teaches the compiler that: rX, rY = VMOVRRD dZ is the same as: rX = EXTRACT_SUBREG dZ, ssub_0 rY = EXTRACT_SUBREG dZ, ssub_1 <rdar://problem/12702965> llvm-svn: 216132
* Fix undefined behavior (left shift of negative value) in SystemZ backend.Alexey Samsonov2014-08-202-7/+3
| | | | | | This bug is reported by UBSan. llvm-svn: 216131
* Add isExtractSubreg property.Quentin Colombet2014-08-208-1/+93
| | | | | | | | | | | | | This patch adds a new property: isExtractSubreg and the related target hooks: TargetIntrInfo::getExtractSubregInputs and TargetInstrInfo::getExtractSubregLikeInputs to specify that a target specific instruction is a (kind of) EXTRACT_SUBREG. The approach is similar to r215394. <rdar://problem/12702965> llvm-svn: 216130
* Fix null reference creation in SelectionDAG constructor.Alexey Samsonov2014-08-202-12/+9
| | | | | | | | | | Store TargetSelectionDAGInfo as a pointer instead of a reference: getSelectionDAGInfo() may not be implemented for certain backends (e.g. it's not currently implemented for R600). This bug is reported by UBSan. llvm-svn: 216129
* Add missing file from r216127Tom Stellard2014-08-201-0/+204
| | | | llvm-svn: 216128
* Implement prefetch builtinTom Stellard2014-08-206-0/+18
| | | | | | | The default implementation is a no-op. Targets should override this with their own implementations. llvm-svn: 216127
* R600: Add aliases for hainan and mullinsTom Stellard2014-08-201-1/+1
| | | | llvm-svn: 216126
* Fix undefined behavior (left shift of negative value) in Hexagon backend.Alexey Samsonov2014-08-202-6/+6
| | | | | | This bug is reported by UBSan. llvm-svn: 216125
* Cleanup: Delete seemingly unused reference to MachineDominatorTree from ↵Alexey Samsonov2014-08-208-39/+28
| | | | | | ScheduleDAGInstrs. llvm-svn: 216124
* Revert "Avoid global contstructors and place static variablesZachary Turner2014-08-202-19/+26
| | | | | | | | | | | | | | | | | inside classes as static local variables and remove the static ivars. Subclasses should use the accessor functions." This change moved global statics to function local statics, but forgot to make the locals static in the function, breaking all platforms. Furthermore, MSVC doesn't support thread-safe function local statics, so any use of a function local static on non primitive types is undefined behavior on MSVC. Reverting due to the fact that it's broken on all platforms, but would like to have a discussion about the thread-safety issue before it goes back in. llvm-svn: 216123
* Add notifier hooks to symbol table.Nick Kledzik2014-08-202-0/+18
| | | | | | | | | | This is the one interesting aspect from: http://reviews.llvm.org/D4965 These hooks are useful for flavor specific processing, such as recording that a DefinedAtom replaced a weak SharedLibraryAtom. llvm-svn: 216122
* Don't prevent a vselect of constants from becoming a single load (PR20648).Sanjay Patel2014-08-202-0/+23
| | | | | | | | | | | | | | | Fix for PR20648 - http://llvm.org/bugs/show_bug.cgi?id=20648 This patch checks the operands of a vselect to see if all values are constants. If yes, bail out of any further attempts to create a blend or shuffle because SelectionDAGLegalize knows how to turn this kind of vselect into a single load. This already happens for machines without SSE4.1, so the added checks just send more targets down that path. Differential Revision: http://reviews.llvm.org/D4934 llvm-svn: 216121
* X86: Add missing triples from r216119Duncan P. N. Exon Smith2014-08-201-2/+2
| | | | llvm-svn: 216120
* X86: Align the stack on word boundaries in LowerFormalArguments()Duncan P. N. Exon Smith2014-08-203-2/+38
| | | | | | | | | | | | | | | The goal of the patch is to implement section 3.2.3 of the AMD64 ABI correctly. The controlling sentence is, "The size of each argument gets rounded up to eightbytes. Therefore the stack will always be eightbyte aligned." The equivalent sentence in the i386 ABI page 37 says, "At all times, the stack pointer should point to a word-aligned area." For both architectures, the stack pointer is not being rounded up to the nearest eightbyte or word between the last normal argument and the first variadic argument. Patch by Thomas Jablin! llvm-svn: 216119
* Fix null reference creation in ScheduleDAGInstrs constructor call.Alexey Samsonov2014-08-206-10/+10
| | | | | | | | | Both MachineLoopInfo and MachineDominatorTree may be null in ScheduleDAGMI constructor call. It is undefined behavior to take references to these values. This bug is reported by UBSan. llvm-svn: 216118
* Do not insert a tail call when returning multiple values on X86Keno Fischer2014-08-202-0/+23
| | | | | | | | | | | | | | | | | | | | | Summary: This fixes http://llvm.org/bugs/show_bug.cgi?id=19530. The problem is that X86ISelLowering erroneously thought the third call was eligible for tail call elimination. It would have been if it's return value was actually the one returned by the calling function, but here that is not the case and additional values are being returned. Test Plan: Test case from the original bug report is included. Reviewers: rafael Reviewed By: rafael Subscribers: rafael, llvm-commits Differential Revision: http://reviews.llvm.org/D4968 llvm-svn: 216117
* Fix undefined behavior (left shift by 64 bits) in ScaledNumber::toString().Alexey Samsonov2014-08-201-0/+3
| | | | | | This bug is reported by UBSan. llvm-svn: 216116
* If an executable file is specified with no architecture and it contains more ↵Greg Clayton2014-08-201-26/+98
| | | | | | | | | | than one architecture select a compatible platform if all architectures match the same platform. This helps us "do the right thing" when loading a file without having to specify an architecture. <rdar://problem/18021558> llvm-svn: 216115
* critical-anti-dependency breaker: don't use reg def info from kill insts ↵Sanjay Patel2014-08-202-2/+45
| | | | | | | | | | | | | | | | | | (PR20308) In PR20308 ( http://llvm.org/bugs/show_bug.cgi?id=20308 ), the critical-anti-dependency breaker caused a miscompile because it broke a WAR hazard using a register that it thinks is available based on info from a kill inst. Until PR18663 is solved, we shouldn't use any def/use info from a kill because they are really just nops. This patch adds guard checks for kills around calls to ScanInstruction() where the DefIndices array is set. For good measure, add an assert in ScanInstruction() so we don't hit this bug again. The test case is a reduced version of the code from the bug report. Differential Revision: http://reviews.llvm.org/D4977 llvm-svn: 216114
* [PeepholeOptimizer] Refactor the advanced copy optimization to take advantage ofQuentin Colombet2014-08-203-169/+649
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the isRegSequence property. This is a follow-up of r215394 and r215404, which respectively introduces the isRegSequence property and uses it for ARM. Thanks to the property introduced by the previous commits, this patch is able to optimize the following sequence: vmov d0, r2, r3 vmov d1, r0, r1 vmov r0, s0 vmov r1, s2 udiv r0, r1, r0 vmov r1, s1 vmov r2, s3 udiv r1, r2, r1 vmov.32 d16[0], r0 vmov.32 d16[1], r1 vmov r0, r1, d16 bx lr into: udiv r0, r0, r2 udiv r1, r1, r3 vmov.32 d16[0], r0 vmov.32 d16[1], r1 vmov r0, r1, d16 bx lr This patch refactors how the copy optimizations are done in the peephole optimizer. Prior to this patch, we had one copy-related optimization that replaced a copy or bitcast by a generic, more suitable (in terms of register file), copy. With this patch, the peephole optimizer features two copy-related optimizations: 1. One for rewriting generic copies to generic copies: PeepholeOptimizer::optimizeCoalescableCopy. 2. One for replacing non-generic copies with generic copies: PeepholeOptimizer::optimizeUncoalescableCopy. The goals of these two optimizations are slightly different: one rewrite the operand of the instruction (#1), the other kills off the non-generic instruction and replace it by a (sequence of) generic instruction(s). Both optimizations rely on the ValueTracker introduced in r212100. The ValueTracker has been refactored to use the information from the TargetInstrInfo for non-generic instruction. As part of the refactoring, we switched the tracking from the index of the definition to the actual register (virtual or physical). This one change is to provide better consistency with register related APIs and to ease the use of the TargetInstrInfo. Moreover, this patch introduces a new helper class CopyRewriter used to ease the rewriting of generic copies (i.e., #1). Finally, this patch adds a dead code elimination pass right after the peephole optimizer to get rid of dead code that may appear after rewriting. This is related to <rdar://problem/12702965>. Review: http://reviews.llvm.org/D4874 llvm-svn: 216088
* Tweak CFGPrinter to wrap very long names.Andrew Trick2014-08-201-7/+7
| | | | | | | | | I added wrapping to the CFGPrinter a while back so the -view-cfg output is actually viewable. I've since enountered very long mangled names with the same problem, so I'm slightly tweaking this code to work in that case. llvm-svn: 216087
* Remove unused field.Rafael Espindola2014-08-201-3/+1
| | | | llvm-svn: 216086
* Test: CoverageMapping: use "RUN: FileCheck" command instead of "RUN: cat | ↵Alex Lorenz2014-08-203-9/+9
| | | | | | | | | | Filecheck". Change the lit RUN commands for 3 tests to use the following pattern "FileCheck -input-file ..." instead of "cat ... | FileCheck ..." as suggested by Justin Bogner. llvm-svn: 216085
OpenPOWER on IntegriCloud