summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Remove DwarfDebug::FirstCU as it has no useDavid Blaikie2014-10-242-17/+5
| | | | | | | It was only being used as a flag to identify the lack of debug info from within endModule - use the section labels for that instead. llvm-svn: 220575
* Use rsqrt (X86) to speed up reciprocal square root calcsSanjay Patel2014-10-248-43/+128
| | | | | | | | | | | | | | | | | | | | | This is a first step for generating SSE rsqrt instructions for reciprocal square root calcs when fast-math is allowed. For now, be conservative and only enable this for AMD btver2 where performance improves significantly - for example, 29% on llvm/projects/test-suite/SingleSource/Benchmarks/BenchmarkGame/n-body.c (if we convert the data type to single-precision float). This patch adds a two constant version of the Newton-Raphson refinement algorithm to DAGCombiner that can be selected by any target via a parameter returned by getRsqrtEstimate().. See PR20900 for more details: http://llvm.org/bugs/show_bug.cgi?id=20900 Differential Revision: http://reviews.llvm.org/D5658 llvm-svn: 220570
* [mips] Replace MipsABIEnum with a MipsABIInfo class.Daniel Sanders2014-10-247-32/+70
| | | | | | | | | | | | | | | | | | | | | Summary: No functional change yet, it's just an object replacement for an enum. It will allow us to gather ABI information in a single place so that we can start testing for properties of the ABI's instead of the ABI itself. For example we will eventually be able to use: ABI.MinStackAlignmentInBytes() instead of: (isABI_N32() || isABI_N64()) ? 16 : 8 which is clearer and more maintainable. Reviewers: matheusalmeida Reviewed By: matheusalmeida Differential Revision: http://reviews.llvm.org/D3341 llvm-svn: 220568
* [Object] Fix MachO's getUuid to return a pointer into the object instead of ↵Benjamin Kramer2014-10-241-2/+3
| | | | | | | | | a dangling ArrayRef. This works because uuid's are always little endian so it's not swapped. Fixes use-after-return reported by asan. llvm-svn: 220567
* [mips] Fix >80-column lineDaniel Sanders2014-10-241-1/+2
| | | | llvm-svn: 220564
* [mips] Remove redundant code in RetCC_MipsN. NFC.Daniel Sanders2014-10-241-3/+0
| | | | | | | | | | | | | | | | Summary: i32 is always promoted to i64 so it no longer makes sense to assign i32 to registers. Reviewers: vmedic Reviewed By: vmedic Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5964 llvm-svn: 220561
* [mips] For N32/N64, structs must be passed in the upper bits of a register.Daniel Sanders2014-10-241-2/+2
| | | | | | | | | | | | | | | | | | Summary: Most structs were fixed by r218451 but those of between >32-bits and <64-bits remained broken since they were not marked with [ASZ]ExtUpper. This patch fixes the remaining cases by using CCPromoteToUpperBitsInType<i64> on i64's in addition to i32 and smaller. Reviewers: vmedic Reviewed By: vmedic Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5963 llvm-svn: 220556
* [AArch64] Fix fast-isel of cbz of i1, i8, i16Oliver Stannard2014-10-241-0/+6
| | | | | | | | | | This fixes a miscompilation in the AArch64 fast-isel which was triggered when a branch is based on an icmp with condition eq or ne, and type i1, i8 or i16. The cbz instruction compares the whole 32-bit register, so values with the bottom 1, 8 or 16 bits clear would cause the wrong branch to be taken. llvm-svn: 220553
* Added reset of LexicalScope in LiveDebugVariables reset function.Marcello Maggioni2014-10-241-0/+1
| | | | llvm-svn: 220545
* Fix PR21189 -- Emit symbol subsection required to debug LLVM-built binaries ↵Timur Iskhodzhanov2014-10-241-9/+47
| | | | | | | | with VS2012+ Reviewed at http://reviews.llvm.org/D5772 llvm-svn: 220544
* DebugInfo: Remove DwarfDebug::addScopeVariable now that it's just a trivial ↵David Blaikie2014-10-244-13/+6
| | | | | | wrapper llvm-svn: 220542
* [AVX512] FMA support for the 231 variantsAdam Nemet2014-10-241-13/+17
| | | | | | | | | | | | | | | | | This is asm/diasm-only support, similar to AVX. For ISeling the register variant, they are no different from 213 other than whether the multiplication or the addition operand is destructed. For ISeling the memory variant, i.e. to fold a load, they are no different than the 132 variant. The addition operand (op3) in both cases can come from memory. Again the ony difference is which operand is destructed. There could be a post-RA pass that would convert a 213 or 132 into a 231. Part of <rdar://problem/17082571> llvm-svn: 220540
* [AVX512] Introduce fma3p_forms from AVXAdam Nemet2014-10-241-38/+36
| | | | | | | | | | | | | This multiclass generates the different forms: 213, 231, 132 in AVX. 132 in AVX512 is a separate class but I am planning to use this same multiclass to generate 231 relying on the nice the null_frag trick from AVX to disable codegen pattern for 231. No functionality change, no change in X86.td.expanded except for the different instruction definition names. llvm-svn: 220539
* If requested, apply function merging at -O0 too. It's useful there to reduce ↵Nick Lewycky2014-10-231-6/+10
| | | | | | the time to compile. llvm-svn: 220537
* Make getDISubprogram(const Function *F) available in LLVMTimur Iskhodzhanov2014-10-232-24/+19
| | | | | | Reviewed at http://reviews.llvm.org/D5950 llvm-svn: 220536
* [SelectionDAG] Teach the vector scalarizer about FP conversions.Ahmed Bougacha2014-10-231-0/+4
| | | | | | | | | | | | | | | | | This adds support for legalization of instructions of the form: [fp_conv] <1 x i1> %op to <1 x double> where fp_conv is one of fpto[us]i, [us]itofp. This used to assert because they were simply missing from the vector operand scalarizer. A similar problem arose in r190830, with trunc instead. Fixes PR20778. Differential Revision: http://reviews.llvm.org/D5810 llvm-svn: 220533
* Update comment and fix typos in assert message. (NFC)Ahmed Bougacha2014-10-231-3/+3
| | | | llvm-svn: 220531
* ScheduleDAG: record PhysReg dependencies represented by CopyFromReg nodesTim Northover2014-10-233-19/+36
| | | | | | | | | | | | | | | x86's CMPXCHG -> EFLAGS consumer wasn't being recorded as a real EFLAGS dependency because it was represented by a pair of CopyFromReg(EFLAGS) -> CopyToReg(EFLAGS) nodes. ScheduleDAG was expecting the source to be an implicit-def on the instruction, where the result numbers in the DAG and the Uses list in TableGen matched up precisely. The Copy notation seems much more robust, so this patch extends ScheduleDAG rather than refactoring x86. Should fix PR20376. llvm-svn: 220529
* DebugInfo: Remove DwarfDebug::CurrentFnArguments since we have to handle ↵David Blaikie2014-10-235-51/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | argument ordering of other arguments (abstract arguments) in the same way and already have code for that too. While refactoring this code I was confused by both the name I had introduced (addNonArgumentVariable... but it has all this logic to handle argument numbering and keep things in order?) and by the redundancy. Seems when I fixed the misordered inlined argument handling, I didn't realize it was mostly redundant with the argument ordering code (which I may've also written, I'm not sure). So let's just rely on the more general case. The only oddity in output this produces is that it means when we emit all the variables for the current function, we don't track when we've finished the argument variables and are about to start the local variables and insert DW_AT_unspecified_parameters (for varargs functions) there. Instead it ends up after the local variables, scopes, etc. But this isn't invalid and doesn't cause DWARF consumers problems that I know of... so we'll just go with that because it makes the code nice & simple. (though, let's see what the buildbots have to say about this - *crosses fingers*) There will be some cleanup commits to follow to remove the now trivial wrappers, etc. llvm-svn: 220527
* DebugInfo: Sink DwarfDebug::addNonArgumentScopeVariable into DwarfFile.David Blaikie2014-10-234-35/+35
| | | | llvm-svn: 220520
* [X86] Improve mul w/ overflow codegen, to MUL8+SETO.Ahmed Bougacha2014-10-233-4/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, @llvm.smul.with.overflow.i8 expands to 9 instructions, where 3 are really needed. This adds X86ISD::UMUL8/SMUL8 SD nodes, and custom lowers them to MUL8/IMUL8 + SETO. i8 is a special case because there is no two/three operand variants of (I)MUL8, so the first operand and return value need to go in AL/AX. Also, we can't write patterns for these instructions: TableGen refuses patterns where output operands don't match SDNode results. In this case, instructions where the output operand is an implicitly defined register. A related special case (and FIXME) exists for MUL8 (X86InstrArith.td): // FIXME: Used for 8-bit mul, ignore result upper 8 bits. // This probably ought to be moved to a def : Pat<> if the // syntax can be accepted. [(set AL, (mul AL, GR8:$src)), (implicit EFLAGS)] Ideally, these go away with UMUL8, but we still need to improve TableGen support of implicit operands in patterns. Before this change: movsbl %sil, %eax movsbl %dil, %ecx imull %eax, %ecx movb %cl, %al sarb $7, %al movzbl %al, %eax movzbl %ch, %esi cmpl %eax, %esi setne %al After: movb %dil, %al imulb %sil seto %al Also, remove a made-redundant testcase for PR19858, and enable more FastISel ALU-overflow tests for SelectionDAG too. Differential Revision: http://reviews.llvm.org/D5809 llvm-svn: 220516
* DebugInfo: Remove DwarfDebug::addCurrentFnArgument declaration now that it's ↵David Blaikie2014-10-231-4/+0
| | | | | | moved to DwarfFile. llvm-svn: 220515
* Handle sqrt() shrinking in SimplifyLibCalls like any other callSanjay Patel2014-10-232-41/+14
| | | | | | | | | | | | | | | | | This patch removes a chunk of special case logic for folding (float)sqrt((double)x) -> sqrtf(x) in InstCombineCasts and handles it in the mainstream path of SimplifyLibCalls. No functional change intended, but I loosened the restriction on the existing sqrt testcases to allow for this optimization even without unsafe-fp-math because that's the existing behavior. I also added a missing test case for not shrinking the llvm.sqrt.f64 intrinsic in case the result is used as a double. Differential Revision: http://reviews.llvm.org/D5919 llvm-svn: 220514
* Update llvm-objdump’s Mach-O symbolizer code for Objective-C references.Kevin Enderby2014-10-231-2/+38
| | | | | | | This prints disassembly comments for Objective-C references to CFStrings, Selectors, Classes and method calls. llvm-svn: 220500
* DebugInfo: Simplify/tidy/correct global variable decl/def emission handling.David Blaikie2014-10-231-51/+26
| | | | | | | | | | | | | | | | | | | | | | | This fixes a bug (introduced by fixing the IR emitted from Clang where the definition of a static member would be scoped within the class, rather than within its lexical decl context) where the definition of a static variable would be placed inside a class. It also improves source fidelity by scoping static class member definitions inside the lexical decl context in which tehy are written (eg: namespace n { class foo { static int i; } int foo::i; } - the definition of 'i' will be within the namespace 'n' in the DWARF output now). Lastly, and the original goal, this reduces debug info size slightly (and makes debug info easier to read, etc) by placing the definitions of non-member global variables within their namespace, rather than using a separate namespace-scoped declaration along with a definition at global scope. Based on patches and discussion with Frédéric. llvm-svn: 220497
* Revert "Don't count inreg params when mangling fastcall functions"Reid Kleckner2014-10-231-3/+0
| | | | | | | | | | This reverts commit r214981. I'm not sure what I was thinking when I wrote this. Testing with MSVC shows that this function is mangled to '@f@8': int __fastcall f(int a, int b); llvm-svn: 220492
* Remove explicit (void) use of DwarfFile::DD that was accidentally left in ↵David Blaikie2014-10-231-3/+1
| | | | | | | | r220452. Caught in post-commit review by Frédéric. llvm-svn: 220487
* Do not emit intermediate register for zero FP immediateRenato Golin2014-10-231-0/+12
| | | | | | | | | | | | | | | | | This updates check for double precision zero floating point constant to allow use of instruction with immediate value rather than temporary register. Currently "a == 0.0", where "a" is of "double" type generates: vmov.i32 d16, #0x0 vcmpe.f64 d0, d16 With this change it becomes: vcmpe.f64 d0, #0 Patch by Sergey Dmitrouk. llvm-svn: 220486
* clang-format two code snippets to make the next patch easy to read.Rafael Espindola2014-10-232-5/+6
| | | | llvm-svn: 220484
* Hexagon/Disassembler/LLVMBuild.txt: Update libdeps.NAKAMURA Takumi2014-10-231-1/+1
| | | | llvm-svn: 220482
* Hexagon/LLVMBuild.txt: Prune CRLF.NAKAMURA Takumi2014-10-232-30/+30
| | | | llvm-svn: 220481
* [CMake] Prune CRLF in CMakeLists.txt(s).NAKAMURA Takumi2014-10-232-14/+13
| | | | llvm-svn: 220480
* Revert r220427, "[Hexagon] Adding encoding bits for add opcode."NAKAMURA Takumi2014-10-2310-225/+177
| | | | | | It brought cyclic dependecy between HexagonAsmPrinter and HexagonDesc. llvm-svn: 220478
* [mips][microMIPS] Implement ADDIUR1SP instructionZoran Jovanovic2014-10-235-0/+49
| | | | | | Differential Revision: http://reviews.llvm.org/D5153 llvm-svn: 220477
* ps][microMIPS] Implement ADDIUR2 instructionZoran Jovanovic2014-10-235-0/+53
| | | | | | Differential Revision: http://reviews.llvm.org/D5151 llvm-svn: 220476
* ps][microMIPS] Implement LI16 instructionZoran Jovanovic2014-10-233-0/+31
| | | | | | Differential Revision: http://reviews.llvm.org/D5149 llvm-svn: 220475
* [mips][microMIPS] Implement CodeGen support for SLL16 and SRL16 instructionsZoran Jovanovic2014-10-235-0/+54
| | | | | | Differential Revision: http://reviews.llvm.org/D5774 llvm-svn: 220474
* [Thumb2] Improve disassembly of memory hintsOliver Stannard2014-10-231-7/+57
| | | | | | | | | Currently, the ARM disassembler will disassemble the Thumb2 memory hint instructions (PLD, PLDW and PLI), even for targets which do not have these instructions. This patch adds the required checks to the disassmebler. llvm-svn: 220472
* [ARM, stack protector] If supported, use armv7 instructions.Akira Hatanaka2014-10-231-4/+39
| | | | | | | | | | | | | | | | | This commit enables using movt/movw to load the stack guard address: movw r0, :lower16:(L_g3$non_lazy_ptr-(LPC0_0+8)) movt r0, :upper16:(L_g3$non_lazy_ptr-(LPC0_0+8)) ldr r0, [pc, r0] Previously a pc-relative load was emitted: ldr r0, LCPI0_0 ldr r0, [pc, r0] rdar://problem/18740489 llvm-svn: 220470
* Assert that ValueHandleBase::ValueIsRAUWd doesn't change the tracked Value type.Frederic Riss2014-10-232-3/+11
| | | | | | | | | | | This invariant is enforced in Value::replaceAllUsesWith, thus it seems logical to apply it also to ValueHandles. This commit fixes InstCombine to not trigger the assertion during the removal of constant bitcasts in call instructions. Differential Revision: http://reviews.llvm.org/D5828 llvm-svn: 220468
* Modernize doxygen comments in Support/Dwarf.hFrederic Riss2014-10-231-45/+0
| | | | | | | | | | In post-commit review of r219442, Rafael pointed out that the comment style of the newly introduced helper didn't follow LLVM's coding standard. Modernize the whole file to the new standards. Differential Revision: http://reviews.llvm.org/D5918 llvm-svn: 220467
* [dwarfdump] Dump DW_AT_ranges values inline in the debug_info dump.Frederic Riss2014-10-231-1/+19
| | | | | | | | | | | The output looks like that: DW_AT_ranges [FORM_data4] (0x00000000 [0x00000001000024a0 - 0x00000001000024c2) [0x0000000100002505 - 0x000000010000268b)) Differential Revision: http://reviews.llvm.org/D5712 llvm-svn: 220466
* [msan] Emit checks for constant shadow values under an experimental flag.Evgeniy Stepanov2014-10-231-3/+12
| | | | | | Does not change the default behavior. llvm-svn: 220457
* [DebugInfo] Sink DwarfDebug::addCurrentFnArgument down into DwarfFile.David Blaikie2014-10-233-24/+28
| | | | | | | | Variable handling will be sunk into DwarfFile so that abstract variables and the like can be shared across multiple CUs (to handle cross-CU inlining, for example). llvm-svn: 220453
* [DebugInfo] Add DwarfDebug& to DwarfFile.David Blaikie2014-10-233-10/+17
| | | | | | | | Use the DwarfDebug in one function that previously took it as a parameter, and lay the foundation for use this for other operations coming soon. llvm-svn: 220452
* [DebugInfo] Remove LexicalScopes::isCurrentFunctionScope and CSE a use of ↵David Blaikie2014-10-232-13/+19
| | | | | | | | | | LexicalScopes::getCurrentFunctionScope Now that we're sure the only root (non-abstract) scope is the current function scope, there's no need for isCurrentFunctionScope, the property can be tested directly instead. llvm-svn: 220451
* [MCJIT] Make repeat calls to MCJIT::getPointerToFunction for declarations safe.Lang Hames2014-10-221-1/+1
| | | | | | | | | | | | | | MCJIT::getPointerForFunction adds the resulting address to the global mapping. This should be done via updateGlobalMapping rather than addGlobalMapping, since the latter asserts if a mapping already exists. MCJIT::getPointerToFunction is actually deprecated - hopefully we can remove it (or more likely re-task it) entirely soon. In the mean time it should at least work as advertised. <rdar://problem/18727946> llvm-svn: 220444
* Attempt to fix the build after r220439David Majnemer2014-10-221-1/+1
| | | | llvm-svn: 220440
* [MC] Attach labels to existing fragments instead of using a separate fragmentDerek Schuff2014-10-221-9/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Currently when emitting a label, a new data fragment is created for it if the current fragment isn't a data fragment. This change instead enqueues the label and attaches it to the next fragment (e.g. created for the next instruction) if possible. When bundle alignment is not enabled, this has no functionality change (it just results in fewer extra fragments being created). For bundle alignment, previously labels would point to the beginning of the bundle padding instead of the beginning of the emitted instruction. This was not only less efficient (e.g. jumping to the nops instead of past them) but also led to miscalculation of the address of the GOT (since MC uses a label difference rather than emitting a "." symbol). Fixes https://code.google.com/p/nativeclient/issues/detail?id=3982 Test Plan: regression test attached Reviewers: jvoung, eliben Subscribers: jfb, llvm-commits Differential Revision: http://reviews.llvm.org/D5915 llvm-svn: 220439
* [Hexagon] Adding encoding bits for add opcode.Colin LeMahieu2014-10-2210-177/+225
| | | | | | | | | Adding llvm-mc tests. Removing unit tests. http://reviews.llvm.org/D5624 llvm-svn: 220427
OpenPOWER on IntegriCloud