summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* ARM: Remove a (false) dependency on the memoryoperand's value as we do not useQuentin Colombet2013-06-201-1/+2
| | | | | | | | | | it at the moment. This allows to form more paired loads even when stack coloring pass destroys the memoryoperand's value. <rdar://problem/13978317> llvm-svn: 184492
* [PowerPC] Clean up VK_PPC_TOC... namesUlrich Weigand2013-06-203-13/+13
| | | | | | | | | | | | This is another minor cleanup; to bring enum names in line with the corresponding @modifier names, this renames: VK_PPC_TOC -> VK_PPC_TOCBASE VK_PPC_TOC_ENTRY -> VK_PPC_TOC16 No code change intended. llvm-svn: 184491
* Update the X86 disassembler to use xacquire and xrelease when appropriate.Kevin Enderby2013-06-203-0/+32
| | | | | | | | | | | | | | | | | This is a bit tricky as the xacquire and xrelease hints use the same bytes, 0xf2 and 0xf3, as the repne and rep prefixes. Fortunately llvm has different llvm MCInst Opcode enums for rep/xrelease and repne/xacquire. So to make this work a boolean was added the InternalInstruction struct as part of the Prefix state which is set with the added logic in readPrefixes() when decoding an instruction to determine if these prefix bytes are to be disassembled as xacquire or xrelease. Then we let the matcher pick the normal prefix instructionID and we change the Opcode after that when it is set into the MCInst being created. rdar://11019859 llvm-svn: 184490
* Add another fixme.Rafael Espindola2013-06-201-0/+1
| | | | llvm-svn: 184488
* [PowerPC] Minor cleanup in PPCELFObjectWriter::getRelocTypeInnerUlrich Weigand2013-06-201-24/+24
| | | | | | | | | This just re-sorts the big switch statement in PPCELFObjectWriter::getRelocTypeInner to follow the (numerical) order of the reloc types, and fixes a couple of whitespace issues. llvm-svn: 184485
* Remove last use of PathV1.h from Archive.cpp.Rafael Espindola2013-06-201-0/+2
| | | | llvm-svn: 184484
* R600/SI: Expand sub for v2i32 and v4i32 for SITom Stellard2013-06-201-0/+3
| | | | | | | | | | Also add a v2i32 test to the existing v4i32 test. Patch by: Aaron Watry Reviewed-by: Tom Stellard <thomas.stellard@amd.com> Signed-off-by: Aaron Watry<awatry@gmail.com> llvm-svn: 184482
* R600/SI: Expand add for v2i32 and v4i32Tom Stellard2013-06-201-0/+2
| | | | | | | | | | | Also add SI tests to existing file and a v2i32 test for both R600 and SI. Patch by: Aaron Watry Reviewed-by: Tom Stellard <thomas.stellard@amd.com> Signed-off-by: Aaron Watry <awatry@gmail.com> llvm-svn: 184481
* R600: Expand v2i32 load/store instead of custom loweringTom Stellard2013-06-201-2/+2
| | | | | | | | | | | | | The custom lowering causes llc to crash with a segfault. Ideally, the custom lowering can be fixed, but this allows programs which load/store v2i32 to work without crashing. Patch by: Aaron Watry Reviewed-by: Tom Stellard <thomas.stellard@amd.com> Signed-off-by: Aaron Watry<awatry@gmail.com> llvm-svn: 184480
* make getLastModificationTime const. Move it with the other getters.Rafael Espindola2013-06-202-2/+2
| | | | llvm-svn: 184478
* [yaml2obj][ELF] Add support for st_value and st_size.Sean Silva2013-06-201-0/+2
| | | | | | | | | After this patch, the ELF file produced by `yaml2obj-elf-symbol-basic.yaml`, when linked and executed on x86_64 (under SysV ABI, obviously; I tested on Linux), produces a working executable that goes into an infinite loop! llvm-svn: 184469
* [yaml2obj][ELF] Allow symbols to reference sections.Sean Silva2013-06-201-0/+1
| | | | llvm-svn: 184468
* Add a setLastModificationAndAccessTime to PathV2.Rafael Espindola2013-06-202-0/+21
| | | | | | With this we can remove the last use of PathV1 from llvm-ar.cpp. llvm-svn: 184464
* Remove the simplify-libcalls pass (finally)Meador Inge2013-06-205-255/+52
| | | | | | | | | | | This commit completely removes what is left of the simplify-libcalls pass. All of the functionality has now been migrated to the instcombine and functionattrs passes. The following C API functions are now NOPs: 1. LLVMAddSimplifyLibCallsPass 2. LLVMPassManagerBuilderSetDisableSimplifyLibCalls llvm-svn: 184459
* Add support for getting the last modification time from a file_status.Rafael Espindola2013-06-202-0/+17
| | | | | | Use that in llvm-ar.cpp to replace a use of sys::PathWithStatus. llvm-svn: 184450
* Clang-format the SLP vectorizer. No functionality change.Nadav Rotem2013-06-203-202/+259
| | | | llvm-svn: 184446
* This reverts r155000.Joey Gouly2013-06-201-6/+1
| | | | | | | | | The cdp2 instruction should have the same restrictions as cdp on the co-processor registers. VFP instructions on v8/AArch32 share the same encoding space as cdp2. llvm-svn: 184445
* SLPVectorization: Add a basic support for cross-basic block slp vectorization.Nadav Rotem2013-06-203-13/+80
| | | | | | | We collect gather sequences when we vectorize basic blocks. Gather sequences are excellent hints for vectorization of other basic blocks. llvm-svn: 184444
* [PowerPC] Remove unused parameterUlrich Weigand2013-06-203-14/+14
| | | | | | | The isDarwin parameter to the llvm::LowerPPCMachineInstrToMCInst routine is now no longer needed; remove it. llvm-svn: 184441
* Change the debug type to match the debug type that is used by vecutils.cpp.Nadav Rotem2013-06-201-1/+1
| | | | | | This change makes it easier to filter debug messages. llvm-svn: 184440
* [PowerPC] Add missing build dependencyUlrich Weigand2013-06-201-1/+1
| | | | | | | This (hopefully) fixes build failures resulting from r184436; the PowerPC asm parser now depends on PowerPC target expresssions. llvm-svn: 184439
* [MC] Support @ variants with directional labelsUlrich Weigand2013-06-201-2/+12
| | | | | | | | | | | The assembler parser common code supports recognizing symbol variants using the @ modifer. On PowerPC, it should also be possible to use (some of) those modifiers with directional labels, like "1f@l". This patch adds support for accepting symbol variants on directional labels as well. llvm-svn: 184437
* [PowerPC] Optimize @ha/@l constructsUlrich Weigand2013-06-204-46/+144
| | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for having the assembler optimize fixups to constructs like "symbol@ha" or "symbol@l" if "symbol" can be resolved at assembler time. This optimization is already present in the PPCMCExpr.cpp code for handling PPC_HA16/PPC_LO16 target expressions. However, those target expression were used only on Darwin targets. This patch changes target expression code so that they are usable also with the GNU assembler (using the @ha / @l syntax instead of the ha16() / lo16() syntax), and changes the MCInst lowering code to generate those target expressions where appropriate. It also changes the asm parser to generate HA16/LO16 target expressions when parsing assembler source that uses the @ha / @l modifiers. The effect is that now the above- mentioned optimization automatically becomes available for those situations too. llvm-svn: 184436
* [PowerPC] Support compare mnemonics with implied CR0Ulrich Weigand2013-06-201-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just like for branch mnemonics (where support was recently added), the assembler is supposed to support extended mnemonics for the compare instructions where no condition register is specified explicitly (and CR0 is assumed implicitly). This patch adds support for those extended compare mnemonics. Index: llvm-head/test/MC/PowerPC/ppc64-encoding-ext.s =================================================================== --- llvm-head.orig/test/MC/PowerPC/ppc64-encoding-ext.s +++ llvm-head/test/MC/PowerPC/ppc64-encoding-ext.s @@ -449,21 +449,37 @@ # CHECK: cmpdi 2, 3, 128 # encoding: [0x2d,0x23,0x00,0x80] cmpdi 2, 3, 128 +# CHECK: cmpdi 0, 3, 128 # encoding: [0x2c,0x23,0x00,0x80] + cmpdi 3, 128 # CHECK: cmpd 2, 3, 4 # encoding: [0x7d,0x23,0x20,0x00] cmpd 2, 3, 4 +# CHECK: cmpd 0, 3, 4 # encoding: [0x7c,0x23,0x20,0x00] + cmpd 3, 4 # CHECK: cmpldi 2, 3, 128 # encoding: [0x29,0x23,0x00,0x80] cmpldi 2, 3, 128 +# CHECK: cmpldi 0, 3, 128 # encoding: [0x28,0x23,0x00,0x80] + cmpldi 3, 128 # CHECK: cmpld 2, 3, 4 # encoding: [0x7d,0x23,0x20,0x40] cmpld 2, 3, 4 +# CHECK: cmpld 0, 3, 4 # encoding: [0x7c,0x23,0x20,0x40] + cmpld 3, 4 # CHECK: cmpwi 2, 3, 128 # encoding: [0x2d,0x03,0x00,0x80] cmpwi 2, 3, 128 +# CHECK: cmpwi 0, 3, 128 # encoding: [0x2c,0x03,0x00,0x80] + cmpwi 3, 128 # CHECK: cmpw 2, 3, 4 # encoding: [0x7d,0x03,0x20,0x00] cmpw 2, 3, 4 +# CHECK: cmpw 0, 3, 4 # encoding: [0x7c,0x03,0x20,0x00] + cmpw 3, 4 # CHECK: cmplwi 2, 3, 128 # encoding: [0x29,0x03,0x00,0x80] cmplwi 2, 3, 128 +# CHECK: cmplwi 0, 3, 128 # encoding: [0x28,0x03,0x00,0x80] + cmplwi 3, 128 # CHECK: cmplw 2, 3, 4 # encoding: [0x7d,0x03,0x20,0x40] cmplw 2, 3, 4 +# CHECK: cmplw 0, 3, 4 # encoding: [0x7c,0x03,0x20,0x40] + cmplw 3, 4 # FIXME: Trap mnemonics Index: llvm-head/lib/Target/PowerPC/PPCInstrInfo.td =================================================================== --- llvm-head.orig/lib/Target/PowerPC/PPCInstrInfo.td +++ llvm-head/lib/Target/PowerPC/PPCInstrInfo.td @@ -2201,3 +2201,12 @@ defm : BranchExtendedMnemonic<"ne", 68>; defm : BranchExtendedMnemonic<"nu", 100>; defm : BranchExtendedMnemonic<"ns", 100>; +def : InstAlias<"cmpwi $rA, $imm", (CMPWI CR0, gprc:$rA, s16imm:$imm)>; +def : InstAlias<"cmpw $rA, $rB", (CMPW CR0, gprc:$rA, gprc:$rB)>; +def : InstAlias<"cmplwi $rA, $imm", (CMPLWI CR0, gprc:$rA, u16imm:$imm)>; +def : InstAlias<"cmplw $rA, $rB", (CMPLW CR0, gprc:$rA, gprc:$rB)>; +def : InstAlias<"cmpdi $rA, $imm", (CMPDI CR0, g8rc:$rA, s16imm:$imm)>; +def : InstAlias<"cmpd $rA, $rB", (CMPD CR0, g8rc:$rA, g8rc:$rB)>; +def : InstAlias<"cmpldi $rA, $imm", (CMPLDI CR0, g8rc:$rA, u16imm:$imm)>; +def : InstAlias<"cmpld $rA, $rB", (CMPLD CR0, g8rc:$rA, g8rc:$rB)>; + llvm-svn: 184435
* Fix get_magic() handling of short reads.Evgeniy Stepanov2013-06-201-2/+2
| | | | | | PR16389 llvm-svn: 184434
* Rename fs::GetUniqueID to fs::getUniqueID to match the style guide.Rafael Espindola2013-06-202-2/+2
| | | | llvm-svn: 184431
* Remove MSan hack that is no longer needed.Evgeniy Stepanov2013-06-201-2/+0
| | | | llvm-svn: 184428
* Optimize register parsing for MipsAsmParser. Allow symbolic aliases for FPU ↵Vladimir Medic2013-06-201-48/+58
| | | | | | registers. llvm-svn: 184411
* DebugInfo: don't use location lists when the location covers the whole ↵David Blaikie2013-06-203-9/+12
| | | | | | | | | | | | | function anyway Fix up three tests - one that was relying on abbreviation number, another relying on a location list in this case (& testing raw asm, changed that to use dwarfdump on the debug_info now that that's where the location is), and another which was added in r184368 - exposing a bug in that fix that is exposed when we emit the location inline rather than through a location list. Fix that bug while I'm here. llvm-svn: 184387
* [Support/CrashRecoveryContext] Make sure CrashRecoveryContext does not clear ↵Argyrios Kyrtzidis2013-06-191-2/+11
| | | | | | | | | | | | | | | | | the thread-local "CurrentContext" in the "parent" thread, when we are using CrashRecoveryContext::RunSafelyOnThread. When using CrashRecoveryContext::RunSafelyOnThread, we would set a CrashRecoveryContextImpl* to a thread-local variable for the "child" thread, but CrashRecoveryContext would erroneously clear it in the "parent" thread. The result was that if CrashRecoveryContext::RunSafelyOnThread was called again in the "child" thread it would mess up crash-recovery for its parent. A test for this will be added in the clang repository. rdar://14204560 llvm-svn: 184380
* This is now a duplicate.Bill Wendling2013-06-191-26/+0
| | | | llvm-svn: 184376
* Make the comparison operators non-member functions.Bill Wendling2013-06-191-2/+2
| | | | llvm-svn: 184373
* Don't pass in the TargetInstrInfo into the register info object. It doesn't ↵Bill Wendling2013-06-193-4/+3
| | | | | | use it. llvm-svn: 184369
* DebugInfo: PR14763/r183329 correct the location of indirect parametersDavid Blaikie2013-06-194-11/+16
| | | | | | | | | | | | | | | | We had been papering over a problem with location info for non-trivial types passed by value by emitting their type as references (this caused the debugger to interpret the location information correctly, but broke the type of the function). r183329 corrected the type information but lead to the debugger interpreting the pointer parameter as the value - the debug info describing the location needed an extra dereference. Use a new flag in DIVariable to add the extra indirection (either by promoting an existing DW_OP_reg (parameter passed in a register) to DW_OP_breg + 0 or by adding DW_OP_deref to an existing DW_OP_breg + n (parameter passed on the stack). llvm-svn: 184368
* Spell correct (s/begining/beginning/)David Blaikie2013-06-191-3/+3
| | | | llvm-svn: 184362
* llvm-dwarfdump: Add support for dumping the .debug_loc sectionDavid Blaikie2013-06-196-1/+170
| | | | | | | | | This is a basic implementation - we still don't have any support (that I know of) for dumping DWARF expressions in a meaningful way, so the location information itself is just printed as a sequence of bytes as we do elsewhere. llvm-svn: 184361
* Access the TargetLoweringInfo from the TargetMachine object instead of ↵Bill Wendling2013-06-1919-295/+367
| | | | | | caching it. The TLI may change between functions. No functionality change. llvm-svn: 184360
* [MC/DWARF] Generate multiple .debug_line entries for adjacent .loc directivesUlrich Weigand2013-06-191-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | The compiler occasionally generates multiple .loc directives in a row (at the same instruction address). These need to be transformed into multple actual .debug_line table entries, since they are used to signal certain information to the debugger (e.g. if the opening brace of a function body is on the same line as the declaration). The MCAsmStreamer version of EmitDwarfLocDirective handles this correctly by emitting a .loc directive every time it is called. However, the MCObjectStream version simply defaults to recording the information and emitting only a single table entry later, e.g. when EmitInstruction is called. This patch introduces a MCAsmStreamer::EmitDwarfLocDirective version that emits a line table entry for a .loc directive that may already be pending before recording the new directive. (This is similar to how this is handled in GNU as.) With this patch (and the code alignment factor patch) applied, I'm now getting identical DWARF .debug sections for all test-suite object files on PowerPC for the internal and the external assembler. llvm-svn: 184357
* [APFloat] Converted all references to APFloat::isNormal => ↵Michael Gottesman2013-06-194-14/+14
| | | | | | | | APFloat::isFiniteNonZero. Turns out all the references were in llvm and not in clang. llvm-svn: 184356
* Access the TargetLoweringInfo from the TargetMachine object instead of ↵Bill Wendling2013-06-195-25/+25
| | | | | | caching it. The TLI may change between functions. No functionality change. llvm-svn: 184352
* Modified the implementation of fs::GetUniqueID on Windows such that it ↵Aaron Ballman2013-06-191-9/+14
| | | | | | actually finds a unique identifier for a file. Also adds unit tests for GetUniqueID. llvm-svn: 184351
* Access the TargetLoweringInfo from the TargetMachine object instead of ↵Bill Wendling2013-06-199-42/+52
| | | | | | caching it. The TLI may change between functions. No functionality change. llvm-svn: 184349
* Don't cache the TLI object since we have access to it through TargetMachine ↵Bill Wendling2013-06-191-6/+8
| | | | | | already. llvm-svn: 184346
* Allow creation of single-byte MCAtoms.Ahmed Bougacha2013-06-192-2/+2
| | | | llvm-svn: 184344
* Move StructurizeCFG out of R600 to generic Transforms.Matt Arsenault2013-06-195-70/+54
| | | | | | Register it with PassManager llvm-svn: 184343
* LSR: Fix the parameters used to compute the scaling factor cost.Quentin Colombet2013-06-191-5/+13
| | | | | | | | | | | | | Prior to this change, the considered addressing modes may be invalid since the maximum and minimum offsets were not taking into account. This was causing an assertion failure. The added test case exercices that behavior. <rdar://problem/14199725> Assertion failed: (CurScaleCost >= 0 && "Legal addressing mode has an illegal cost!") llvm-svn: 184341
* SLPVectorizer: handle scalars that are extracted from vectors (using ↵Nadav Rotem2013-06-191-0/+44
| | | | | | ExtractElementInst). llvm-svn: 184325
* SLPVectorizer: start constructing chains at stores that are not power of two.Nadav Rotem2013-06-191-3/+17
| | | | | | | | The type <3 x i8> is a common in graphics and we want to be able to vectorize it. This changes accelerates bullet by 12% and 471_omnetpp by 5%. llvm-svn: 184317
* Remove Path::getDirectoryContents.Rafael Espindola2013-06-192-78/+0
| | | | llvm-svn: 184311
* Remove Path::isObjectFile.Rafael Espindola2013-06-191-8/+0
| | | | llvm-svn: 184305
OpenPOWER on IntegriCloud