summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86
Commit message (Collapse)AuthorAgeFilesLines
* - It's not safe to promote rotates (at least not trivially).Evan Cheng2010-04-221-5/+1
| | | | | | - Some code refactoring. llvm-svn: 102111
* Implement -disable-non-leaf-fp-elim which disable frame pointer eliminationEvan Cheng2010-04-211-1/+1
| | | | | | | optimization for non-leaf functions. This will be hooked up to gcc's -momit-leaf-frame-pointer option. rdar://7886181 llvm-svn: 101984
* isel (i32 anyext i16) as insert_subreg when 16-bit ops are being promoted.Evan Cheng2010-04-215-13/+30
| | | | llvm-svn: 101979
* Trim include.Evan Cheng2010-04-211-1/+0
| | | | llvm-svn: 101978
* Handle a displacement location in 64-bit as an RIP-relative displacement. ItBill Wendling2010-04-211-1/+11
| | | | | | | | | | | | | | | | | | fixes a bug (<rdar://problem/7880900>) in the JIT. This code wouldn't work: target triple = "x86_64-apple-darwin" define double @func(double %a) { %tmp1 = fmul double %a, 5.000000e-01 ; <double> [#uses=1] ret double %tmp1 } define i32 @main() nounwind { %1 = call double @func(double 4.770000e-04) ; <i64> [#uses=0] ret i32 0 } llvm-svn: 101965
* teach the x86 address matching stuff to handleChris Lattner2010-04-201-7/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (shl (or x,c), 3) the same as (shl (add x, c), 3) when x doesn't have any bits from c set. This finishes off PR1135. Before we compiled the block to: to: LBB0_3: ## %bb cmpb $4, %dl sete %dl addb %dl, %cl movb %cl, %dl shlb $2, %dl addb %r8b, %dl shlb $2, %dl movzbl %dl, %edx movl %esi, (%rdi,%rdx,4) leaq 2(%rdx), %r9 movl %esi, (%rdi,%r9,4) leaq 1(%rdx), %r9 movl %esi, (%rdi,%r9,4) addq $3, %rdx movl %esi, (%rdi,%rdx,4) incb %r8b decb %al movb %r8b, %dl jne LBB0_1 Now we produce: LBB0_3: ## %bb cmpb $4, %dl sete %dl addb %dl, %cl movb %cl, %dl shlb $2, %dl addb %r8b, %dl shlb $2, %dl movzbl %dl, %edx movl %esi, (%rdi,%rdx,4) movl %esi, 8(%rdi,%rdx,4) movl %esi, 4(%rdi,%rdx,4) movl %esi, 12(%rdi,%rdx,4) incb %r8b decb %al movb %r8b, %dl jne LBB0_1 llvm-svn: 101958
* Because of the EMMS problem, right now we have to supportDale Johannesen2010-04-201-5/+5
| | | | | | | | | | | user-defined operations that use MMX register types, but the compiler shouldn't generate them on its own. This adds a Synthesizable abstraction to represent this, and changes the vector widening computation so it won't produce MMX types. (The motivation is to remove noise from the ABI compatibility part of the gcc test suite, which has some breakage right now.) llvm-svn: 101951
* disable optimizations in this directory for MSVC9. This avoidsChris Lattner2010-04-201-0/+7
| | | | | | an optimizer infinite loop on the file, PR6866. llvm-svn: 101854
* Remove the palignr intrinsics now that we lower them to vector shuffles,Eric Christopher2010-04-201-18/+2
| | | | | | | | shifts and null vectors. Autoupgrade these to what we'd lower them to. Add a testcase to exercise this. llvm-svn: 101851
* More progress on promoting i16 operations to i32 for x86. Work in progress.Evan Cheng2010-04-191-8/+35
| | | | llvm-svn: 101808
* teach the x86 asm parser how to handle segment prefixesChris Lattner2010-04-171-12/+17
| | | | | | in memory operands. rdar://7874844 llvm-svn: 101661
* remove a dead variable, PR6856Chris Lattner2010-04-171-1/+0
| | | | llvm-svn: 101648
* Add const qualifiers to TargetLoweringObjectFile usage.Dan Gohman2010-04-171-4/+4
| | | | llvm-svn: 101640
* Use const_cast instead of a C-style cast to cast away const.Dan Gohman2010-04-171-1/+1
| | | | llvm-svn: 101639
* Use const qualifiers with TargetLowering. This eliminates severalDan Gohman2010-04-175-158/+179
| | | | | | | | | | | | | const_casts, and it reinforces the design of the Target classes being immutable. SelectionDAGISel::IsLegalToFold is now a static member function, because PIC16 uses it in an unconventional way. There is more room for API cleanup here. And PIC16's AsmPrinter no longer uses TargetLowering. llvm-svn: 101635
* Move per-function state out of TargetLowering subclasses and intoDan Gohman2010-04-173-38/+73
| | | | | | MachineFunctionInfo subclasses. llvm-svn: 101634
* a bunch of ssse3 instructions are misencoded to think they have an Chris Lattner2010-04-171-0/+3
| | | | | | i8 field when they really do not. This fixes rdar://7840289 llvm-svn: 101629
* More work to allow dag combiner to promote 16-bit ops to 32-bit.Evan Cheng2010-04-173-8/+65
| | | | llvm-svn: 101621
* Revert 101465, it broke internal OpenGL testing.Eric Christopher2010-04-162-8/+8
| | | | | | | Probably the best way to know that all getOperand() calls have been handled is to replace that API instead of updating. llvm-svn: 101579
* Add skeleton target-specific SelectionDAGInfo files.Dan Gohman2010-04-163-0/+52
| | | | llvm-svn: 101564
* add a missing break back, patch by Nico Schmidt!Chris Lattner2010-04-161-0/+1
| | | | llvm-svn: 101538
* Eliminate an unnecessary SelectionDAG dependency in getOptimalMemOpType.Dan Gohman2010-04-162-7/+7
| | | | llvm-svn: 101531
* reapply r101434Gabor Greif2010-04-162-8/+8
| | | | | | | | | | | | | with a fix for self-hosting rotate CallInst operands, i.e. move callee to the back of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary llvm-svn: 101465
* Adding support for dag combiner to promote operations for profit. This ↵Evan Cheng2010-04-162-0/+43
| | | | | | | | | | requires target specific queries. For example, x86 should promote i16 to i32 when it does not impact load folding. x86 support is off by default. It can be enabled with -promote-16bit. Work in progress. llvm-svn: 101448
* back out r101423 and r101397, they break llvm-gcc self-host on darwin10Gabor Greif2010-04-162-8/+8
| | | | llvm-svn: 101434
* reapply r101364, which has been backed out in r101368Gabor Greif2010-04-152-8/+8
| | | | | | | | | | | | | with a fix rotate CallInst operands, i.e. move callee to the back of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary llvm-svn: 101397
* back out r101364, as it trips the linux nightlybot on some clang C++ testsGabor Greif2010-04-152-8/+8
| | | | llvm-svn: 101368
* rotate CallInst operands, i.e. move callee to the backGabor Greif2010-04-152-8/+8
| | | | | | | | | | of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary llvm-svn: 101364
* Add const qualifiers to CodeGen's use of LLVM IR constructs.Dan Gohman2010-04-157-97/+101
| | | | llvm-svn: 101334
* Allow lowering for palignr instructions for mmx sized vectors. AddEric Christopher2010-04-152-3/+23
| | | | | | patterns to handle the lowering. llvm-svn: 101331
* Delete unneeeded arguments.Dan Gohman2010-04-141-5/+5
| | | | llvm-svn: 101276
* Factor out EH landing pad code into a separate function, and constifyDan Gohman2010-04-143-5/+5
| | | | | | a bunch of stuff to support it. llvm-svn: 101273
* Unbreak CMake build by improving the EnhancedDisassembly makefile aDouglas Gregor2010-04-131-0/+1
| | | | | | | bit (we're not trying to build a shared library yet) and generating the X86GenEDInfo.inc and ARMGenEDInfo.inc files as necessary. llvm-svn: 101188
* Fixed a nasty layering violation in the edis sourceSean Callanan2010-04-132-0/+11
| | | | | | | | | | | | | | | code. It used to #include the enhanced disassembly information for the targets it supported straight out of lib/Target/{X86,ARM,...} but now it uses a new interface provided by MCDisassembler, and (so far) implemented by X86 and ARM. Also removed hacky #define-controlled initialization of targets in edis. If clients only want edis to initialize a limited set of targets, they can set --enable-targets on the configure command line. llvm-svn: 101179
* Re-apply 101075 and fix it properly. Just reuse the debug info of the branch ↵Evan Cheng2010-04-131-1/+44
| | | | | | instruction being optimized. There is no need to --I which can deref off start of the BB. llvm-svn: 101162
* Temporarily revert r101075, it's causing invalid iterator assertionsEric Christopher2010-04-131-46/+1
| | | | | | in a nightly tester. llvm-svn: 101158
* Eliminate MachineBasicBlock::const_livein_iterator and makeDan Gohman2010-04-131-1/+1
| | | | | | | | MachineBasicBlock::livein_iterator a const_iterator, because clients shouldn't ever be using the iterator interface to mutate the livein set. llvm-svn: 101147
* Use .set expression for x86 pic jump table reference to reduce assembly ↵Evan Cheng2010-04-121-0/+9
| | | | | | relocation. rdar://7738756 llvm-svn: 101085
* Micro-optimization:Bill Wendling2010-04-121-1/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we have this situation: jCC L1 jmp L2 L1: ... L2: ... We can get a small performance boost by emitting this instead: jnCC L2 L1: ... L2: ... This testcase shows an example of this: float func(float x, float y) { double product = (double)x * y; if (product == 0.0) return product; return product - 1.0; } llvm-svn: 101075
* move elf section uniquing to MCContext. Along the wayChris Lattner2010-04-082-4/+6
| | | | | | merge XCore's section into MCSectionELF llvm-svn: 100812
* remove the TargetLoweringObjectFileMachO::getMachoSectionChris Lattner2010-04-081-11/+8
| | | | | | api and update clients to use MCContext instead. llvm-svn: 100808
* Avoid using f64 to lower memcpy from constant string. It's cheaper to use ↵Evan Cheng2010-04-082-16/+25
| | | | | | i32 store of immediates. llvm-svn: 100751
* mpsadbw is not commutative.Eric Christopher2010-04-081-1/+1
| | | | | | Fixes PR3440. llvm-svn: 100736
* rename llvm::llvm_report_error -> llvm::report_fatal_errorChris Lattner2010-04-075-7/+7
| | | | llvm-svn: 100709
* Fixed a bug where the disassembler would allow an immediateSean Callanan2010-04-072-0/+4
| | | | | | | | | argument that had to be between 0 and 7 to have any value, firing an assert later in the AsmPrinter. Now, the disassembler rejects instructions with out-of-range values for that immediate. llvm-svn: 100694
* Educate GetInstrSizeInBytes implementations thatDale Johannesen2010-04-071-0/+1
| | | | | | DBG_VALUE does not generate code. llvm-svn: 100681
* Clean up some signedness oddities in this code noticed by clang.John McCall2010-04-071-5/+6
| | | | llvm-svn: 100599
* Move printing of target-indepedent DEBUG_VALUE commentsDale Johannesen2010-04-071-48/+10
| | | | | | | into AsmPrinter. Target-dependent form is still generated by FastISel and still handled in X86 code. llvm-svn: 100596
* Fix a number of clang -Wsign-compare warnings that didn't have an obviousJohn McCall2010-04-062-2/+2
| | | | | | | solution. The only reason these don't fire with gcc-4.2 is that gcc turns off part of -Wsign-compare in C++ on accident. llvm-svn: 100581
* Revert 100573, it's causing some testsuite problems.Dale Johannesen2010-04-061-1/+67
| | | | llvm-svn: 100578
OpenPOWER on IntegriCloud