summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
Commit message (Collapse)AuthorAgeFilesLines
* Add missing SDNP properties on the flushw node.Jakob Stoklund Olesen2012-08-241-1/+1
| | | | llvm-svn: 162515
* X86MemBarrier has unmodeled side effects.Jakob Stoklund Olesen2012-08-241-1/+1
| | | | llvm-svn: 162514
* Preserve operand flags in convertToThreeAddress() by copying operands.Jakob Stoklund Olesen2012-08-231-67/+52
| | | | | | No test case, this is a generalization of r160260. llvm-svn: 162485
* Favor FMA3 over FMA4 if both are enabled.Craig Topper2012-08-231-1/+2
| | | | llvm-svn: 162454
* Use a switch statement instead of a bunch of if-else checks and pull out the ↵Craig Topper2012-08-231-8/+10
| | | | | | common function call. llvm-svn: 162428
* Remove unused private field to silence build warning.Craig Topper2012-08-233-7/+4
| | | | llvm-svn: 162426
* Make function loadImmediate a member of MipsSEInstrInfo and change it to returnAkira Hatanaka2012-08-235-65/+54
| | | | | | | | | | the temporary register that was used to load the immediate. Currently, it always returns register $at, but this will change if, in the future, we decide to use another register. No changes in functionality. llvm-svn: 162417
* Add a member of type Mips16InstrInfo/MipsSEInstrInfo to classAkira Hatanaka2012-08-226-13/+15
| | | | | | | | Mips16RegisterInfo/MipsSERegisterInfo. No changes in functionality. llvm-svn: 162413
* [ms-inline asm] Avoid a false positive assertionChad Rosier2012-08-221-1/+3
| | | | | | | | | | | Assertion failed: (Start.isValid() == End.isValid() && "Start and end should either both be valid or both be invalid!") when parsing inline asm. SMLoc assumes that the first char * in the source is invalid. However, when parsing an inline asm the mnemonic is at this location. I don't want to change SMLoc, so use a trivial workaround. llvm-svn: 162381
* Reduce duplicated hash map lookups.Benjamin Kramer2012-08-221-3/+2
| | | | llvm-svn: 162362
* Add a getName function to MachineFunction. Use it in places that previously ↵Craig Topper2012-08-227-11/+7
| | | | | | did getFunction()->getName(). Remove includes of Function.h that are no longer needed. llvm-svn: 162347
* Don't cache the MBB in the class. Its only used by one function. Change a ↵Craig Topper2012-08-221-5/+3
| | | | | | for loop over operands to use unsigned instead of int. llvm-svn: 162344
* Mark a function as static since it doesn't use anything in the class.Craig Topper2012-08-221-1/+1
| | | | llvm-svn: 162342
* Add register Mips::GP to the list of reserved registers if target is bare-metalAkira Hatanaka2012-08-226-7/+22
| | | | | | | | to prevent it from being clobbered. mips uses $gp to access small data section. This bug was originally reported by Carl Norum. llvm-svn: 162340
* Add option disable-mips-delay-filler. Turn on mips' delay slot filler byAkira Hatanaka2012-08-221-4/+5
| | | | | | | | default. Patch by Carl Norum. llvm-svn: 162339
* For mips64 switch statements in subroutines could generate Jack Carter2012-08-221-1/+1
| | | | | | | | | | | | | within the codegen EK_GPRel64BlockAddress. This was not supported for direct object output and resulted in an assertion. This change adds support for EK_GPRel64BlockAddress for direct object. One fallout from this is to turn on rela relocations for mips64 to match gas. llvm-svn: 162334
* Add a few functions to TargetLibraryInfo as part of PR13574.Chad Rosier2012-08-211-0/+36
| | | | | | Patch by Weiming Zhao <weimingz@codeaurora.org>. llvm-svn: 162329
* Fix unaligned memory accesses when performing relocations in X86 JIT. There'sRichard Smith2012-08-211-4/+13
| | | | | | | no cost to using memcpy here: the fixed code is optimized by LLVM to perfect machine code. llvm-svn: 162311
* [ms-inline asm] Do not report a Parser error when matching inline assembly.Chad Rosier2012-08-211-14/+25
| | | | llvm-svn: 162306
* [ms-inline asm] Expose the ErrorInfo from the MatchInstructionImpl. In general,Chad Rosier2012-08-211-4/+6
| | | | | | | | | this is the index of the operand that failed to match. Note: This may cause a buildbot failure due to an API mismatch in clang. Should recover with my next commit to clang. llvm-svn: 162295
* Fix up indentation and remove a couple else's after returns.Craig Topper2012-08-211-11/+12
| | | | llvm-svn: 162270
* Use uint16_t for tables of opcodes.Craig Topper2012-08-211-2/+2
| | | | llvm-svn: 162267
* Fix up indentation. No functional change.Craig Topper2012-08-211-61/+61
| | | | llvm-svn: 162264
* Add a couple llvm_unreachables. Add a message to several others.Craig Topper2012-08-211-8/+6
| | | | llvm-svn: 162263
* Replace a break with llvm_unreachable in the default case of a nested ↵Craig Topper2012-08-211-50/+18
| | | | | | switch. Condense code a bit. No functional change. llvm-svn: 162261
* Cleanup the scalar FMA3 definitions. Add patterns to fold loads with scalar ↵Craig Topper2012-08-211-44/+49
| | | | | | forms. llvm-svn: 162260
* Merge FMA3 instructions with and without patterns into single classes using ↵Craig Topper2012-08-211-38/+21
| | | | | | null_frag. llvm-svn: 162257
* Add a missing def flag.Jakob Stoklund Olesen2012-08-211-4/+2
| | | | | | | | | | *** Bad machine code: Explicit definition marked as use *** - function: test_cos - basic block: BB#0 L.entry (0x7ff2a2024fd0) - instruction: VSETLNi32 %D11, %D11<undef>, %R0, 0, pred:14, pred:%noreg, %Q5<imp-use,kill>, %Q5<imp-def> - operand 0: %D11 llvm-svn: 162247
* Use a SmallPtrSet to dedup successors in EmitSjLjDispatchBlock.Jakob Stoklund Olesen2012-08-201-3/+2
| | | | | | | The test case ARM/2011-05-04-MultipleLandingPadSuccs.ll was creating duplicate successor list entries. llvm-svn: 162222
* fix HexagonSubtarget parsing of -mv flagSebastian Pop2012-08-201-17/+16
| | | | llvm-svn: 162217
* fix a case where all operands of BUILD_VECTOR are undefinedMichael Liao2012-08-201-0/+4
| | | | llvm-svn: 162214
* Fix coding style violations in 162135 and 162136.Akira Hatanaka2012-08-202-39/+39
| | | | | | Patch by Petar Jovanovic. llvm-svn: 162213
* Remove FMA3 intrinsic instructions in favor of patterns.Craig Topper2012-08-202-94/+146
| | | | llvm-svn: 162194
* Use correct intrinsic for 256-bit VFMSUBADDPS.Craig Topper2012-08-201-1/+1
| | | | llvm-svn: 162193
* Remove trailing white space and tab characters. No functional change.Craig Topper2012-08-191-33/+33
| | | | llvm-svn: 162192
* When unsafe math is used, we can use commutative FMAX and FMIN. In some casesNadav Rotem2012-08-194-3/+59
| | | | | | | | | | | | | | | | | | | this allows for better code generation. Added a new DAGCombine transformation to convert FMAX and FMIN to FMANC and FMINC, which are commutative. For example: movaps %xmm0, %xmm1 movsd LC(%rip), %xmm0 minsd %xmm1, %xmm0 becomes: minsd LC(%rip), %xmm0 llvm-svn: 162187
* Fabs folding is implemented.Benjamin Kramer2012-08-191-5/+0
| | | | llvm-svn: 162186
* Remove the CAND/COR/CXOR custom ISD nodes and their select code.Jakob Stoklund Olesen2012-08-183-174/+0
| | | | | | | These nodes are no longer needed because the peephole pass can fold CMOV+AND into ANDCC etc. llvm-svn: 162179
* Remove virtual from many methods. These methods replace methods in the base ↵Craig Topper2012-08-181-38/+40
| | | | | | class, but the base class methods aren't virtual so it just increased call overhead. llvm-svn: 162178
* Also combine zext/sext into selects for ARM.Jakob Stoklund Olesen2012-08-181-47/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This turns common i1 patterns into predicated instructions: (add (zext cc), x) -> (select cc (add x, 1), x) (add (sext cc), x) -> (select cc (add x, -1), x) For a function like: unsigned f(unsigned s, int x) { return s + (x>0); } We now produce: cmp r1, #0 it gt addgt.w r0, r0, #1 Instead of: movs r2, #0 cmp r1, #0 it gt movgt r2, #1 add r0, r2 llvm-svn: 162177
* Also pass logical ops to combineSelectAndUse.Jakob Stoklund Olesen2012-08-181-9/+42
| | | | | | | | | | | | | | | | Add these transformations to the existing add/sub ones: (and (select cc, -1, c), x) -> (select cc, x, (and, x, c)) (or (select cc, 0, c), x) -> (select cc, x, (or, x, c)) (xor (select cc, 0, c), x) -> (select cc, x, (xor, x, c)) The selects can then be transformed to a single predicated instruction by peephole. This transformation will make it possible to eliminate the ISD::CAND, COR, and CXOR custom DAG nodes. llvm-svn: 162176
* Reapply r162160 with a fix: Optimize Arith->Trunc->SETCC sequence to allow ↵Nadav Rotem2012-08-181-15/+60
| | | | | | better compare/branch code. llvm-svn: 162172
* fp16-to-fp32 conversion instructions are available in Thumb mode as well.Anton Korobeynikov2012-08-181-4/+4
| | | | | | Make sure the generic pattern is used. llvm-svn: 162170
* Refactor code a bit to reduce number of calls in the final compiled code. No ↵Craig Topper2012-08-181-134/+144
| | | | | | functional change intended. llvm-svn: 162166
* Reorder initialization list to silence -WreorderCraig Topper2012-08-181-2/+2
| | | | llvm-svn: 162165
* Revert r162160 because it made a few buildbots fail.Nadav Rotem2012-08-181-43/+6
| | | | llvm-svn: 162164
* The X86 backend has a number of optimizations for SETCC nodes which useNadav Rotem2012-08-181-6/+43
| | | | | | | | | | | | | | | | | | | | | arithmetic instructions. However, when small data types are used, a truncate node appears between the SETCC node and the arithmetic operation. This patch adds support for this pattern. Before: xorl %esi, %edi testb %dil, %dil setne %al ret After: xorb %dil, %sil setne %al ret rdar://12081007 llvm-svn: 162160
* Add MipsELFWriterInfo.{h,cpp}.Akira Hatanaka2012-08-172-0/+151
| | | | llvm-svn: 162136
* Correct MCJIT functionality for MIPS32 architecture.Akira Hatanaka2012-08-174-3/+13
| | | | | | | | | | No new tests are added. All tests in ExecutionEngine/MCJIT that have been failing pass after this patch is applied (when "make check" is done on a mips board). Patch by Petar Jovanovic. llvm-svn: 162135
* Avoid folding ADD instructions with FI operands.Jakob Stoklund Olesen2012-08-171-0/+3
| | | | | | | | | PEI can't handle the pseudo-instructions. This can be removed when the pseudo-instructions are replaced by normal predicated instructions. Fixes PR13628. llvm-svn: 162130
OpenPOWER on IntegriCloud