summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
Commit message (Collapse)AuthorAgeFilesLines
* Hide the stub created for MO_ExternalSymbol too.Rafael Espindola2013-12-051-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | given declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) declare void @foo() define void @bar() { call void @foo() call void @llvm.memset.p0i8.i32(i8* null, i8 0, i32 188, i32 1, i1 false) ret void } We used to produce L_foo$stub: .indirect_symbol _foo .ascii "\364\364\364\364\364" _memset$stub: .indirect_symbol _memset .ascii "\364\364\364\364\364" We not produce a private stub for memset too. Stubs are not needed with recent linkers, but we still produce them for darwin8. Thanks to David Fang for confirming that gcc used to do this too. llvm-svn: 196468
* R600/SI: Add comments for number of used registers.Matt Arsenault2013-12-052-14/+56
| | | | llvm-svn: 196467
* For AArch64, add missing register cost calculation for big value types like ↵Jiangning Liu2013-12-052-1/+28
| | | | | | v4i64 and v8i64. llvm-svn: 196456
* Add AVX512 patterns for v16i32 broadcast and v2i64 zero extend load.Cameron McInally2013-12-051-0/+4
| | | | | | Patch by Aleksey Bader. llvm-svn: 196435
* Fix a bug in darwin's 32-bit X86 handling of evaluating fixups. Kevin Enderby2013-12-041-1/+4
| | | | | | | | | | | | | | | Where it would use a scattered relocation entry but falls back to a normal relocation entry because the FixupOffset is more than 24-bits. The bug is in the X86MachObjectWriter::RecordScatteredRelocation() where it changes reference parameter FixedValue but then returns false to indicate it did not create a scattered relocation entry. The fix is simply to save the original value of the parameter FixedValue at the start of the method and restore it if we are returning false in that case. rdar://15526046 llvm-svn: 196432
* Add support for parsing ARM symbol variants on ELF targetsDavid Peixotto2013-12-044-14/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ARM symbol variants are written with parens instead of @ like this: .word __GLOBAL_I_a(target1) This commit adds support for parsing these symbol variants in expressions. We introduce a new flag to MCAsmInfo that indicates the parser should use parens to parse the symbol variant. The expression parser is modified to look for symbol variants using parens instead of @ when the corresponding MCAsmInfo flag is true. The MCAsmInfo parens flag is enabled only for ARM on ELF. By adding this flag to MCAsmInfo, we are able to get rid of redundant ARM-specific symbol variants and use the generic variants instead (e.g. VK_GOT instead of VK_ARM_GOT). We use the new UseParensForSymbolVariant attribute in MCAsmInfo to correctly print the symbol variants for arm. To achive this we need to keep a handle to the MCAsmInfo in the MCSymbolRefExpr class that we can check when printing the symbol variant. Updated Tests: Changed case of symbol variant to match the generic kind. test/CodeGen/ARM/tls-models.ll test/CodeGen/ARM/tls1.ll test/CodeGen/ARM/tls2.ll test/CodeGen/Thumb2/tls1.ll test/CodeGen/Thumb2/tls2.ll PR18080 llvm-svn: 196424
* Fix assembly syntax for AVX512 vector blend instructions.Cameron McInally2013-12-041-2/+2
| | | | llvm-svn: 196393
* [X86] Check YMM31/ZMM31 as wellMichael Liao2013-12-041-4/+4
| | | | | | - No test case as there's no calling convention preserve YMM31/ZMM31 only llvm-svn: 196391
* Update the UseFusedMAC definition to directly specify its dependence on havingChad Rosier2013-12-041-1/+2
| | | | | | | VFP4. Patch by Daniel Stewart! llvm-svn: 196390
* Suppress '(x < y) ? a : 0 -> (x < y) & a' transform on X86 architectures ↵Cameron McInally2013-12-041-7/+8
| | | | | | | | with dedicated mask registers. Patch by Aleksey Bader. llvm-svn: 196386
* [AArch64 Neon] Add ACLE intrinsic vceqz_f64.Kevin Qin2013-12-041-5/+7
| | | | llvm-svn: 196362
* [AArch64 NEON] Add missing compare intrinsics.Kevin Qin2013-12-041-0/+23
| | | | llvm-svn: 196360
* [Stackmap] Emit multi-byte nops for X86.Juergen Ributzka2013-12-041-22/+70
| | | | llvm-svn: 196334
* final patch for very long conditional branches for mips16 constant islands.Reed Kotler2013-12-031-5/+18
| | | | | | | | | this completes the basic port of ARM constant islands to Mips16. More testing, code review, cleanup is in order but basically everything seems to be working. A bug in gas is preventing some of the runtime testing but I hope to resolve this soon. llvm-svn: 196331
* Fix mingw32 thiscall + sret.Rafael Espindola2013-12-031-5/+21
| | | | | | | | | | Unlike msvc, when handling a thiscall + sret gcc will * Put the sret in %ecx * Put the this pointer is (%esp) This fixes, for example, calling stringstream::str. llvm-svn: 196312
* Addrspacecasts are no-ops on ARM.James Molloy2013-12-031-0/+6
| | | | | | Testcase added. llvm-svn: 196269
* [SystemZ] Fix choice of known-zero mask in insertion optimizationRichard Sandiford2013-12-031-4/+4
| | | | | | | | | | | | | | The backend converts 64-bit ORs into subreg moves if the upper 32 bits of one operand and the low 32 bits of the other are known to be zero. It then tries to peel away redundant ANDs from the upper 32 bits. Since AND masks are canonicalized to exclude known-zero bits, the test ORs the mask and the known-zero bits together before checking for redundancy. The problem was that it was using the wrong node when checking for known-zero bits, so could drop ANDs that were still needed. llvm-svn: 196267
* Enhance the fix of PR17631Michael Liao2013-12-031-8/+27
| | | | | | | | | | | | | | - The fix to PR17631 fixes part of the cases where 'vzeroupper' should not be issued before 'call' insn. There're other cases where helper calls will be inserted not limited to epilog. These helper calls do not follow the standard calling convention and won't clobber any YMM registers. (So far, all call conventions will clobber any or part of YMM registers.) This patch enhances the previous fix to cover more cases 'vzerosupper' should not be inserted by checking if that function call won't clobber any YMM registers and skipping it if so. llvm-svn: 196261
* [AArch64]Add missing floating point convert, round and misc intrinsics.Hao Liu2013-12-032-2/+59
| | | | | | E.g. int64x1_t vcvt_s64_f64(float64x1_t a) -> FCVTZS Dd, Dn llvm-svn: 196210
* AArch64: add missing ACLE intrinsics mapping to general arithmetic operation ↵Hao Liu2013-12-031-0/+31
| | | | | | | | from VFP instructions. E.g. float64x1_t vadd_f64(float64x1_t a, float64x1_t b) -> FADD Dd, Dn, Dm. llvm-svn: 196208
* Whitespace.NAKAMURA Takumi2013-12-031-178/+177
| | | | llvm-svn: 196203
* AArch64: Add missing scalar pair intrinsics.Hao Liu2013-12-031-0/+22
| | | | | | E.g. "float32_t vaddv_f32(float32x2_t a)" to be matched into "faddp s0, v1.2s". llvm-svn: 196198
* Add some missing pattern matches for AArch64 Neon intrinsics like vuqadd_s64 ↵Jiangning Liu2013-12-031-0/+21
| | | | | | and friends. llvm-svn: 196192
* Add some missing pattern matches for AArch64 Neon intrinsics like ↵Jiangning Liu2013-12-032-604/+691
| | | | | | vmull_high_n_s16 and friends. llvm-svn: 196190
* Don't set PrivateGlobalPrefix for NVPTX and R600.Rafael Espindola2013-12-032-2/+0
| | | | | | These targets have special asm printers that don't use these. llvm-svn: 196187
* Remove PPCScoreboardHazardRecognizerHal Finkel2013-12-023-41/+2
| | | | | | | | | | PPCScoreboardHazardRecognizer was a subclass of ScoreboardHazardRecognizer which did only one thing: filtered out nodes in EmitInstruction for which DAG->getInstrDesc(SU) returned NULL. This used to be the case for PPC pseudo instructions. As far as I can tell, this is no longer true, and so we can use ScoreboardHazardRecognizer directly. llvm-svn: 196171
* Refactor the setting of PrivateGlobalPrefix.Rafael Espindola2013-12-029-12/+1
| | | | | | No functionality change. llvm-svn: 196170
* Don't set PrivateGlobalPrefix twice in the same function.Rafael Espindola2013-12-021-2/+0
| | | | llvm-svn: 196169
* Convert two char* that are only ever used as booleans to bool.Rafael Espindola2013-12-021-2/+0
| | | | llvm-svn: 196168
* [AArch64] Implemented vcopy_lane patterns using scalar DUP instruction.Chad Rosier2013-12-021-28/+97
| | | | | | Patch by Ana Pazos! llvm-svn: 196151
* R600: Workaround for cayman loop bugVincent Lejeune2013-12-022-0/+14
| | | | llvm-svn: 196121
* Move getSymbolWithGlobalValueBase to TargetLoweringObjectFile.Rafael Espindola2013-12-024-9/+16
| | | | | | This allows it to be used in TargetLoweringObjectFileImpl.cpp. llvm-svn: 196117
* Introduce poor man's consumeToken() in X86AsmParserAlp Toker2013-12-021-18/+13
| | | | | | | | This makes the code a little more idiomatic. No change in behaviour. llvm-svn: 196113
* Remove dead code.Rafael Espindola2013-12-028-83/+0
| | | | | | | | | MO_JumpTableIndex and MO_ExternalSymbol don't show up on inline asm. Keeping parts of the old asm printer just to print inline asm to a string that we then parse back looks like a hack. llvm-svn: 196111
* ARM: decide whether to use movw/movt based on "minsize" attribute.Tim Northover2013-12-028-14/+23
| | | | llvm-svn: 196102
* XCoreFrameLowering.cpp: Use [in,out] instead of [in] [out]. [-Wdocumentation]NAKAMURA Takumi2013-12-021-2/+2
| | | | llvm-svn: 196094
* XCore target: Make handling of large frames not dependent upon an FP.Robert Lytton2013-12-026-151/+237
| | | | | | | | | | | | eliminateFrameIndex() has been reworked to handle both small & large frames with either a FP or SP. An additional Slot is required for Scavenging spills when not using FP for large frames. Reworked the handling of Register Scavenging. Whether we are using an FP or not, whether it is a large frame or not, and whether we are using a large code model or not are now independent. llvm-svn: 196091
* ARM: add pseudo-instructions for lit-pool global materialisationTim Northover2013-12-026-69/+109
| | | | | | | | | | | | These are used by MachO only at the moment, and (much like the existing MOVW/MOVT set) work around the fact that the labels used in the actual instructions often contain PC-dependent components, which means that repeatedly materialising the same global can't be CSEed. With small modifications, it could be adapted to how ELF finds the address of _GLOBAL_OFFSET_TABLE_, which would give similar benefits in PIC mode there. llvm-svn: 196090
* XCore: Unbreak C++11 build.Benjamin Kramer2013-12-021-3/+3
| | | | llvm-svn: 196089
* XCore target: fix large code model 'select' indirect address handling.Robert Lytton2013-12-021-0/+3
| | | | llvm-svn: 196088
* XCore target: Add large code modelRobert Lytton2013-12-025-28/+175
| | | | | | | | | | | | | | | | When using large code model: Global objects larger than 'CodeModelLargeSize' bytes are placed in sections named with a trailing ".large" The folded global address of such objects are lowered into the const pool. During inspection it was noted that LowerConstantPool() was using a default offset of zero. A fix was made, but due to only offsets of zero being generated, testing only verifies the change is not detrimental. Correct the flags emitted for explicitly specified sections. We assume the size of the object queried by getSectionForConstant() is never greater than CodeModelLargeSize. To handle greater than CodeModelLargeSize, changes to AsmPrinter would be required. llvm-svn: 196087
* XCore target: Fix eliminateFrameIndex() to handle large framesRobert Lytton2013-12-021-7/+18
| | | | | | | | Large frame offsets are loaded from the ConstantPool. Where possible, offsets are encoded using the smaller MKMSK instruction. Large frame offsets can only be used when there is a frame-pointer. llvm-svn: 196085
* XCore target: Enable frames larger than 65535 to be loweredRobert Lytton2013-12-021-138/+177
| | | | llvm-svn: 196084
* Remove leftovers from a non-MC asm printer.Rafael Espindola2013-12-022-168/+0
| | | | llvm-svn: 196068
* Remove #if 0 declarations.Rafael Espindola2013-12-021-8/+0
| | | | llvm-svn: 196067
* Change the default of AsmWriterClassName and isMCAsmWriter.Rafael Espindola2013-12-0212-86/+8
| | | | llvm-svn: 196065
* Remove dead declarations.Rafael Espindola2013-12-022-8/+0
| | | | llvm-svn: 196063
* Refactor for clarity and efficiency.Rafael Espindola2013-12-021-23/+22
| | | | | | | The PPC GetSymbolFromOperand already prefixed stubs of MO_ExternalSymbol, so this should be a nop. llvm-svn: 196059
* ARM: fix bug in -Oz stack adjustment foldingTim Northover2013-12-014-21/+26
| | | | | | | | | | | Previously, we clobbered callee-saved registers when folding an "add sp, #N" into a "pop {rD, ...}" instruction. This change checks whether a register we're going to add to the "pop" could actually be live outside the function before doing so and should fix the issue. This should fix PR18081. llvm-svn: 196046
* Revamp error checking in the ms inline asm parser.Benjamin Kramer2013-12-011-46/+47
| | | | | | | | | - Actually abort when an error occurred. - Check that the frontend lookup worked when parsing length/size/type operators. Tested by a clang test. PR18096. llvm-svn: 196044
OpenPOWER on IntegriCloud