summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* ARM IAS: add support for the .pool directiveSaleem Abdulrasool2013-12-201-2/+2
| | | | | | | The .pool directive is an alias for the .ltorg directive used to create a literal pool. Simply treat .pool as if .ltorg was passed. llvm-svn: 197787
* R600: Allow ftruncTom Stellard2013-12-202-0/+5
| | | | | | | | | | | v2: Add ftrunc->TRUNC pattern instead of replacing int_AMDGPU_trunc v3: move ftrunc pattern next to TRUNC definition, it's available since R600 Patch By: Jan Vesely Reviewed-by: Tom Stellard <thomas.stellard@amd.com> Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 197783
* Ranges in the .debug_range section need to have begin and end labels,Eric Christopher2013-12-201-13/+8
| | | | | | assert that this is so. llvm-svn: 197780
* Add support for a CU to output a set of ranges for the CU. This is usefulEric Christopher2013-12-202-20/+74
| | | | | | | | when you want to have the full list of addresses for a particular CU or when you have multiple modules linked together and can't depend upon the ordering of a single CU for begin/end ranges. llvm-svn: 197776
* When parsing data layout string looking for endianness, use the correct defaultDmitri Gribenko2013-12-201-1/+1
| | | | llvm-svn: 197771
* Correctly apply the default pointer sizeDmitri Gribenko2013-12-201-1/+1
| | | | llvm-svn: 197770
* [x86] Rename In32BitMode predicate to Not64BitModeEric Christopher2013-12-2010-135/+135
| | | | | | | | | | | That's what it actually means, and with 16-bit support it's going to be a little more relevant since in a few corner cases we may actually want to distinguish between 16-bit and 32-bit mode (for example the bare 'push' aliases to pushw/pushl etc.) Patch by David Woodhouse llvm-svn: 197768
* Fix documentation typosAlp Toker2013-12-201-1/+1
| | | | llvm-svn: 197757
* Un-revert: the buildbot failure in LLVM on lld-x86_64-win7 had me withKevin Enderby2013-12-191-2/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this commit as the only one on the Blamelist so I quickly reverted this. However it was actually Nick's change who has since fixed that issue. Original commit message: Changed the X86 assembler for intel syntax to work with directional labels. The X86 assembler as a separate code to parser the intel assembly syntax in X86AsmParser::ParseIntelOperand(). This did not parse directional labels. And if something like 1f was used as a branch target it would get an "Unexpected token" error. The fix starts in X86AsmParser::ParseIntelExpression() in the case for AsmToken::Integer, it needs to grab the IntVal from the current token then look for a 'b' or 'f' following an Integer. Then it basically needs to do what is done in AsmParser::parsePrimaryExpr() for directional labels. It saves the MCExpr it creates in the IntelExprStateMachine in the Sym field. When it returns to X86AsmParser::ParseIntelOperand() it looks for a non-zero Sym field in the IntelExprStateMachine and if set it creates a memory operand not an immediate operand it would normally do for the Integer. rdar://14961158 llvm-svn: 197744
* Change getStringRepresentation to skip defaults.Rafael Espindola2013-12-191-17/+45
| | | | | | | | | | I have a pending change for clang to use getStringRepresentation to check that its DataLayout is in sync with llvm's. getStringRepresentation is not called from llvm itself, so far it is mostly a debugging aid, so the shorter strings are an independent improvement. llvm-svn: 197740
* Ensure deterministic when printing ARM assembler constant poolsDavid Peixotto2013-12-191-12/+24
| | | | | | | | | | | | | | | | We dump any non-empty assembler constant pools after a successful parse of an assembly file that uses the ldr pseudo opcode. These per-section constant pools should be output in a deterministic order to ensure that we always generate the same output when printing the output with an AsmStreamer. This patch changes the map data struture used to associate a section with its constant pool to a MapVector to ensure deterministic output. Because this map type does not support deletion, we now check that the constant pool is not empty before dumping its entries and clear the entries after emitting them with the streamer. llvm-svn: 197735
* Revert my change to the X86 assembler for intel syntax to work withKevin Enderby2013-12-191-34/+2
| | | | | | directional labels. Because it doesn't work for windows :) llvm-svn: 197731
* Changed the X86 assembler for intel syntax to work with directional labels.Kevin Enderby2013-12-191-2/+34
| | | | | | | | | | | | | | | | | | | | | | | The X86 assembler has a separate code to parser the intel assembly syntax in X86AsmParser::ParseIntelOperand(). This did not parse directional labels. And if something like 1f was used as a branch target it would get an "Unexpected token" error. The fix starts in X86AsmParser::ParseIntelExpression() in the case for AsmToken::Integer, it needs to grab the IntVal from the current token then look for a 'b' or 'f' following the Integer. Then it basically needs to do what is done in AsmParser::parsePrimaryExpr() for directional labels. It saves the MCExpr it creates in the IntelExprStateMachine in the Sym field. When it returns to X86AsmParser::ParseIntelOperand() it looks for a non-zero Sym field in the IntelExprStateMachine and if set it creates a memory operand not an immediate operand it would normally do for the Integer. rdar://14961158 llvm-svn: 197728
* Make sys::ThreadLocal<> zero-initialized on non-thread builds (PR18205)Hans Wennborg2013-12-192-2/+2
| | | | | | | | | | | | | According to the docs, ThreadLocal<>::get() should return NULL if no object has been set. This patch makes that the case also for non-thread builds and adds a very basic unit test to check it. (This was causing PR18205 because PrettyStackTraceHead didn't get zero- initialized and we'd crash trying to read past the end of that list. We didn't notice this so much on Linux since we'd crash after printing all the entries, but on Mac we print into a SmallString, and would crash before printing that.) llvm-svn: 197718
* Stay classy (and legal) LLVM. Remove links to 3rd party SMT solver whose ↵Kay Tiong Khoo2013-12-191-4/+2
| | | | | | links may not be permanent. llvm-svn: 197713
* [X86][fast-isel] Fix select lowering.Quentin Colombet2013-12-191-2/+7
| | | | | | | | | | The condition in selects is supposed to be i1. Make sure we are just reading the less significant bit of the 8 bits width value to match this constraint. <rdar://problem/15651765> llvm-svn: 197712
* Implement the .ltorg directive for ARM assemblyDavid Peixotto2013-12-191-0/+21
| | | | | | | | | | | | This directive will write out the assembler-maintained constant pool for the current section. These constant pools are created to support the ldr-pseudo instruction (e.g. ldr r0, =val). The directive can be used by the programmer to place the constant pool in a location that can be reached by a pc-relative offset in the ldr instruction. llvm-svn: 197711
* Implement the ldr-pseudo opcode for ARM assemblyDavid Peixotto2013-12-191-1/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ldr-pseudo opcode is a convenience for loading 32-bit constants. It is converted into a pc-relative load from a constant pool. For example, ldr r0, =0x10001 ldr r1, =bar will generate this output in the final assembly ldr r0, .Ltmp0 ldr r1, .Ltmp1 ... .Ltmp0: .long 0x10001 .Ltmp1: .long bar Sketch of the LDR pseudo implementation: Keep a map from Section => ConstantPool When parsing ldr r0, =val parse val as an MCExpr get ConstantPool for current Section Label = CreateTempSymbol() remember val in ConstantPool at next free slot add operand to ldr that is MCSymbolRef of Label On finishParse() callback Write out all non-empty constant pools for each Entry in ConstantPool Emit Entry.Label Emit Entry.Value Possible improvements to be added in a later patch: 1. Does not convert load of small constants to mov (e.g. ldr r0, =0x1 => mov r0, 0x1) 2. Does reuse constant pool entries for same constant The implementation was tested for ARM, Thumb1, and Thumb2 targets on linux and darwin. llvm-svn: 197708
* Add a finishParse() callback to the targer asm parserDavid Peixotto2013-12-191-0/+4
| | | | | | | | This callback is invoked when the parse has finished successfuly. It will be used to write out ARM constant pools to implement the ldr pseudo. llvm-svn: 197706
* Improved fix for PR17827 (instcombine of shift/and/compare).Kay Tiong Khoo2013-12-191-22/+32
| | | | | | | | | This change fixes the case of arithmetic shift right - do not attempt to fold that case. This change also relaxes the conditions when attempting to fold the logical shift right and shift left cases. No additional IR-level test cases included at this time. See http://llvm.org/bugs/show_bug.cgi?id=17827 for proofs that these are correct transformations. llvm-svn: 197705
* Small simplification, p0 is the same as p.Rafael Espindola2013-12-191-1/+1
| | | | llvm-svn: 197699
* Support for microMIPS control instructions.Zoran Jovanovic2013-12-194-25/+101
| | | | llvm-svn: 197696
* Long doubles are required to be aligned to 128 bits and svr4 32 bits.Rafael Espindola2013-12-191-4/+0
| | | | | | Clang was already getting this right. llvm-svn: 197694
* Add a disassembler to the PowerPC backendHal Finkel2013-12-1911-3/+361
| | | | | | | | | | | | | | | | | | | | | The tests for the disassembler were adapted from the encoder tests, and for the most part, the output from the disassembler matches that encoder-test inputs. There are some places where more-informative mnemonics could be produced (notably for the branch instructions), and those cases are noted in the tests with FIXMEs. Future work includes: - Generating more-informative mnemonics when possible (this may also be done in the printer). - Remove the dependence on positional "numbered" operand-to-variable mapping (for both encoding and decoding). - Internally using 64-bit instruction variants in 64-bit mode (if this turns out to matter). llvm-svn: 197693
* Support for microMIPS LL and SC instructions.Zoran Jovanovic2013-12-195-4/+41
| | | | llvm-svn: 197692
* Support for microMIPS TLS relocations.Zoran Jovanovic2013-12-195-2/+20
| | | | llvm-svn: 197685
* [dfsan] Simplify code after r197677.Evgeniy Stepanov2013-12-191-19/+14
| | | | llvm-svn: 197679
* Add an explicit insert point argument to SplitBlockAndInsertIfThen.Evgeniy Stepanov2013-12-194-30/+25
| | | | | | | | Currently SplitBlockAndInsertIfThen requires that branch condition is an Instruction itself, which is very inconvenient, because it is sometimes an Operator, or even a Constant. llvm-svn: 197677
* GCOV.cpp: Fix format strings, %lf. Don't use %lf to double.NAKAMURA Takumi2013-12-191-3/+3
| | | | llvm-svn: 197663
* R600/SI: Make private pointers be 32-bit.Matt Arsenault2013-12-194-16/+12
| | | | | | | | Different sized address spaces should theoretically work most of the time now, and since 64-bit add is currently disabled, using more 32-bit pointers fixes some cases. llvm-svn: 197659
* ARM IAS: support .inst directiveSaleem Abdulrasool2013-12-192-0/+132
| | | | | | | | | This adds support for the .inst directive. This is an ARM specific directive to indicate an instruction encoded as a constant expression. The major difference between .word, .short, or .byte and .inst is that the latter will be disassembled as an instruction since it does not get flagged as data. llvm-svn: 197657
* [stackprotector] Use analysis from the StackProtector pass for stack layout ↵Josh Magee2013-12-1914-36/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | in PEI a nd LocalStackSlot passes. This changes the MachineFrameInfo API to use the new SSPLayoutKind information produced by the StackProtector pass (instead of a boolean flag) and updates a few pass dependencies (to preserve the SSP analysis). The stack layout follows the same approach used prior to this change - i.e., only LargeArray stack objects will be placed near the canary and everything else will be laid out normally. After this change, structures containing large arrays will also be placed near the canary - a case previously missed by the old implementation. Out of tree targets will need to update their usage of MachineFrameInfo::CreateStackObject to remove the MayNeedSP argument. The next patch will implement the rules for sspstrong and sspreq. The end goal is to support ssp-strong stack layout rules. WIP. Differential Revision: http://llvm-reviews.chandlerc.com/D2158 llvm-svn: 197653
* Add stack alignment information for Sparc.Rafael Espindola2013-12-191-0/+5
| | | | | | | | | | | | | | | | | This matches the data in clang which was added by Jakob Stoklund Olesen in r179596. Thanks for erikjv on irc for pointing me to the relevant documents: http://sparc.com/standards/64.psabi.1.35.ps.Z page 25: Every stack frame must be 16-byte aligned. http://sparc.com/standards/psABI3rd.pdf page 3-10: Although the architecture requires only word alignment, software convention and the operating system require every stack frame to be doubleword aligned. I tried to add a test, but it looks like sparc doesn't implement dynamic stack realignment. This will be tested in clang shortly. llvm-svn: 197646
* Begin adding docs and IR-level support for the inalloca attributeReid Kleckner2013-12-199-26/+76
| | | | | | | | | | | | | | | | | | | The inalloca attribute is designed to support passing C++ objects by value in the Microsoft C++ ABI. It behaves the same as byval, except that it always implies that the argument is in memory and that the bytes are never copied. This attribute allows the caller to take the address of an outgoing argument's memory and execute arbitrary code to store into it. This patch adds basic IR support, docs, and verification. It does not attempt to implement any lowering or fix any possibly broken transforms. When this patch lands, a complete description of this feature should appear at http://llvm.org/docs/InAlloca.html . Differential Revision: http://llvm-reviews.chandlerc.com/D2173 llvm-svn: 197645
* Synchronize the NaCl DataLayout strings with the ones in clang.Rafael Espindola2013-12-193-5/+12
| | | | | | Patch by Derek Schuff. llvm-svn: 197640
* Make cosmetic changes as part of Mips internal post commit review ofReed Kotler2013-12-191-4/+4
| | | | | | patch r196331. llvm-svn: 197638
* llvm-cov: Added -f option for function summaries.Yuchen Wu2013-12-191-15/+81
| | | | | | | | | | | Similar to the file summaries, the function summaries output line, branching and call statistics. The file summaries have been moved outside the initial loop so that all of the function summaries can be outputted before file summaries. Also updated test cases. llvm-svn: 197633
* Fix a problem with mips16 stubs when calls are transformed duringReed Kotler2013-12-181-0/+18
| | | | | | | | | tail call optimization. Some more work may be needed for indirect calls but this patch fixes the current regression in Prolangc++/trees. S2 optimization as part of the general cleanup and optimization of prolog and epilog was not saving S2 in this case and needed to. llvm-svn: 197630
* [aarch32] fix bug 18268: Incorrect condition of vselWeiming Zhao2013-12-181-1/+1
| | | | | | | | Given vsel_cc, op1, op2, since vsel has no LE/LT, to generate vsel for such selection, it needs to inverse cc and swap op1 and op2. To inverse cc, both L/G and E bits should be flipped. llvm-svn: 197615
* Debug info: Implement (rvalue) reference qualifiers for C++11 non-staticAdrian Prantl2013-12-183-2/+36
| | | | | | | | member functions. Paired commit with CFE. rdar://problem/15356637 llvm-svn: 197613
* Pull in a couple of new constants from the upcoming DWARF 5 standard.Adrian Prantl2013-12-181-0/+21
| | | | llvm-svn: 197611
* Correctly handle the degenerated triple "thumb".Rafael Espindola2013-12-181-6/+3
| | | | | | | Fixes a crash in llc where some parts think the target is thumb and others think it is ARM. llvm-svn: 197607
* llvm-cov: Print coverage summary to STDOUT.Yuchen Wu2013-12-181-3/+38
| | | | | | | | | | | | File summaries will now be optionally outputted which will give line, branching and call coverage info. Unfortunately, clang's current instrumentation does not give enough information to deduce function calls, something that gcc is able to do. Thus, no calls are always outputted to be consistent with gcov output. Also updated tests. llvm-svn: 197606
* llvm-cov: s/(.*)Executed/\1Exec/Yuchen Wu2013-12-181-3/+3
| | | | llvm-svn: 197595
* llvm-cov: Added -c option for branch counts.Yuchen Wu2013-12-181-11/+30
| | | | | | | | | This will cause llvm-cov to output branch counts instead of branch probabilities. -b must be enabled. Also updated tests. llvm-svn: 197594
* [arm] Rename Tag_VFP_arch to Tag_FP_arch.Logan Chien2013-12-182-10/+10
| | | | | | | | According to "Addenda to ABI for ARM architecture", Tag_FP_arch is the new name for the equivalent Tag_VFP_arch. This commit renames Tag_VFP_arch to Tag_FP_arch. llvm-svn: 197587
* Fix f64 and f128 for ppc-darwin.Rafael Espindola2013-12-181-1/+3
| | | | | | | | | | This patch adds -f64:32:64 to 32 bit ppc darwin since a f64 inside a structure are only 32 bit aligned. The patch also drop -f128:64:128 from all ppc darwin, since f128 is 128 bit aligned. llvm-svn: 197574
* One ppc32-darwin, a i64 inside a structure can have 32 bit alignment.Rafael Espindola2013-12-181-1/+2
| | | | | | | | Thanks for Iain Sandoe for testing this with the original gcc. Clang was already getting this right. llvm-svn: 197572
* ARM: update comment to match realityTim Northover2013-12-181-1/+2
| | | | llvm-svn: 197570
* DiagnosticInfo: Add missing namespaceTobias Grosser2013-12-181-1/+1
| | | | llvm-svn: 197556
OpenPOWER on IntegriCloud