summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86FastISel.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Move global variables in TargetMachine into new TargetOptions class. As an APINick Lewycky2011-12-021-3/+3
| | | | | | | | | | | | change, now you need a TargetOptions object to create a TargetMachine. Clang patch to follow. One small functionality change in PTX. PTX had commented out the machine verifier parts in their copy of printAndVerify. That now calls the version in LLVMTargetMachine. Users of PTX who need verification disabled should rely on not passing the command-line flag to enable it. llvm-svn: 145714
* Make X86::FsFLD0SS / FsFLD0SD real pseudo-instructions.Jakob Stoklund Olesen2011-11-291-2/+2
| | | | | | | | | Like V_SET0, these instructions are expanded by ExpandPostRA to xorps / vxorps so they can participate in execution domain swizzling. This also makes the AVX variants redundant. llvm-svn: 145440
* Teach fast isel about vector stores, and make DoSelectCall return false when ↵Lang Hames2011-10-181-3/+24
| | | | | | it fails to emit a store. This fixes <rdar://problem/10215997>. llvm-svn: 142432
* Fix indent in comment.Nick Lewycky2011-10-121-1/+1
| | | | llvm-svn: 141749
* PR10991: make fast-isel correctly check whether accessing a global through ↵Eli Friedman2011-09-221-1/+11
| | | | | | an alias involves thread-local storage. (I'm not entirely sure how this is supposed to work, but this patch makes fast-isel consistent with the normal isel path.) llvm-svn: 140355
* Teach X86FastISel to use AVX versions of instructions when possibleBruno Cardoso Lopes2011-09-031-18/+26
| | | | llvm-svn: 139062
* Don't fast-isel for atomic load/store; some cases require extra handling ↵Eli Friedman2011-09-021-0/+8
| | | | | | missing from fast-isel. llvm-svn: 139044
* Bail from FastISel when we encounter a volatile memset intrinsic. Patch by IvanNick Lewycky2011-08-021-0/+3
| | | | | | Krasin! llvm-svn: 136663
* Teach PreprocessISelDAG to be aware of vector types and to not process them.Bruno Cardoso Lopes2011-08-011-2/+2
| | | | llvm-svn: 136653
* land David Blaikie's patch to de-constify Type, with a few tweaks.Chris Lattner2011-07-181-10/+10
| | | | llvm-svn: 135375
* Fix a problem with fast-isel return values introduced in r134018.Jakob Stoklund Olesen2011-06-301-2/+3
| | | | | | | | | We would put the return value from long double functions in the wrong register. This fixes gcc.c-torture/execute/conversion.c llvm-svn: 134205
* Move CallFrameSetupOpcode and CallFrameDestroyOpcode to TargetInstrInfo.Evan Cheng2011-06-281-2/+2
| | | | llvm-svn: 134030
* - Rename TargetInstrDesc, TargetOperandInfo to MCInstrDesc and MCOperandInfo andEvan Cheng2011-06-281-1/+1
| | | | | | | | sink them into MC layer. - Added MCInstrInfo, which captures the tablegen generated static data. Chang TargetInstrInfo so it's based off MCInstrInfo. llvm-svn: 134021
* Clean up the handling of the x87 fp stack to make it more robust.Jakob Stoklund Olesen2011-06-281-7/+9
| | | | | | | | | | | | | | | | | | | | Drop the FpMov instructions, use plain COPY instead. Drop the FpSET/GET instruction for accessing fixed stack positions. Instead use normal COPY to/from ST registers around inline assembly, and provide a single new FpPOP_RETVAL instruction that can access the return value(s) from a call. This is still necessary since you cannot tell from the CALL instruction alone if it returns anything on the FP stack. Teach fast isel to use this. This provides a much more robust way of handling fixed stack registers - we can tolerate arbitrary FP stack instructions inserted around calls and inline assembly. Live range splitting could sometimes break x87 code by inserting spill code in unfortunate places. As a bonus we handle floating point inline assembly correctly now. llvm-svn: 134018
* Remove TargetOptions.h dependency from X86Subtarget.Evan Cheng2011-06-231-1/+3
| | | | llvm-svn: 133726
* Make sure to pass OpFlags into MachineInstrBuilder::addExternalSymbol; theEli Friedman2011-06-111-1/+1
| | | | | | | memcpy/memset symbol doesn't get marked up correctly in PIC modes otherwise. Should fix llvm-x86_64-linux-checks buildbot. Followup to r132864. llvm-svn: 132869
* Add full x86 fast-isel support for memcpy and memset.Eli Friedman2011-06-101-9/+50
| | | | | | rdar://9431466 llvm-svn: 132864
* Add a parameter to CCState so that it can access the MachineFunction.Eric Christopher2011-06-081-17/+21
| | | | | | | | No functional change. Part of PR6965 llvm-svn: 132763
* Rewrite fast-isel integer cast handling to handle more cases, and to be ↵Eli Friedman2011-05-251-25/+43
| | | | | | | | | | simpler and more consistent. The practical effects here are that x86-64 fast-isel can now handle trunc from i8 to i1, and ARM fast-isel can handle many more constructs involving integers narrower than 32 bits (including loads, stores, and many integer casts). rdar://9437928 . llvm-svn: 132099
* Add fast-isel support for byval calls on x86.Eli Friedman2011-05-201-17/+51
| | | | llvm-svn: 131764
* Add fast-isel support for zeroext and signext ret instructions on x86.Eli Friedman2011-05-191-5/+25
| | | | llvm-svn: 131689
* Revert unintentional commit.Eli Friedman2011-05-181-26/+5
| | | | llvm-svn: 131597
* More instcombine simplifications towards better debug locations.Eli Friedman2011-05-181-5/+26
| | | | llvm-svn: 131596
* Add x86 fast-isel for calls returning first-class aggregates. rdar://9435872.Eli Friedman2011-05-171-46/+51
| | | | | | This is r131438 with a couple small fixes. llvm-svn: 131474
* Back out r131444 and r131438; they're breaking nightly tests. I'll look intoEli Friedman2011-05-171-43/+48
| | | | | | it more tomorrow. llvm-svn: 131451
* Add x86 fast-isel for calls returning first-class aggregates. rdar://9435872.Eli Friedman2011-05-171-48/+43
| | | | llvm-svn: 131438
* Make fast-isel work correctly s/uadd.with.overflow intrinsics.Eli Friedman2011-05-161-76/+7
| | | | llvm-svn: 131420
* Fix a FIXME by moving the fast-isel implementation of the objectsize ↵Eli Friedman2011-05-141-23/+0
| | | | | | intrinsic from the x86 code to the generic code. llvm-svn: 131332
* Zap useless code; this hasn't done anything useful since fast-isel switched ↵Eli Friedman2011-05-141-29/+0
| | | | | | to being bottom-up (a very long time ago). llvm-svn: 131329
* fast-isel sret calls, try 2. We actually do need to do something on x86-32. ↵Eli Friedman2011-04-281-2/+4
| | | | | | rdar://problem/9303592 . llvm-svn: 130429
* Revert r130348; causing buildbot issues on x86-32.Eli Friedman2011-04-281-0/+1
| | | | llvm-svn: 130412
* fast-isel sret. We actually don't need to do anything special on x86. :) ↵Eli Friedman2011-04-271-1/+0
| | | | | | rdar://problem/9303592 . llvm-svn: 130348
* Make the fast-isel code for literal 0.0 a bit shorter/faster, since 0.0 is ↵Eli Friedman2011-04-271-0/+41
| | | | | | common. rdar://problem/9303592 . llvm-svn: 130338
* Refactor out code to fast-isel a memcpy operation with a small constantEli Friedman2011-04-271-32/+40
| | | | | | length. (I'm planning to use this to implement byval.) llvm-svn: 130274
* Fix an edge case involving branches in fast-isel on x86.Eli Friedman2011-04-271-2/+4
| | | | | | rdar://problem/9303306 . llvm-svn: 130272
* ADT/Triple: Renambe isOSX... methods to isMacOSX for consistency with the OSDaniel Dunbar2011-04-201-2/+2
| | | | | | triple component. llvm-svn: 129838
* Target/X86: Eliminate uses of getDarwinVers().Daniel Dunbar2011-04-191-1/+2
| | | | llvm-svn: 129813
* Add support for FastISel'ing varargs calls.Eli Friedman2011-04-191-4/+21
| | | | llvm-svn: 129765
* Implement support for x86 fastisel of small fixed-sized memcpys, which are ↵Chris Lattner2011-04-191-5/+50
| | | | | | | | | generated en-mass for C++ PODs. On my c++ test file, this cuts the fast isel rejects by 10x and shrinks the generated .s file by 5% llvm-svn: 129755
* tidy upChris Lattner2011-04-191-3/+5
| | | | llvm-svn: 129753
* Implement support for fast isel of calls of i1 arguments, even though they ↵Chris Lattner2011-04-191-10/+23
| | | | | | | | | | | | are illegal, when they are a truncate from something else. This eliminates fully half of all the fastisel rejections on a test c++ file I'm working with, which should make a substantial improvement for -O0 compile of c++ code. This fixed rdar://9297003 - fast isel bails out on all functions taking bools llvm-svn: 129752
* Handle i1/i8/i16 constant integer arguments to calls by prepromoting them.Chris Lattner2011-04-191-9/+22
| | | | | | | | | | | | | | | | | | | | | | | | | Before we would bail out on i1 arguments all together, now we just bail on non-constant ones. Also, we used to emit extraneous code. e.g. test12 was: movb $0, %al movzbl %al, %edi callq _test12 and test13 was: movb $0, %al xorl %edi, %edi movb %al, 7(%rsp) callq _test13f Now we get: movl $0, %edi callq _test12 and: movl $0, %edi callq _test13f llvm-svn: 129751
* be layout aware, to produce:Chris Lattner2011-04-191-1/+8
| | | | | | | | | | | | | | | | | | | testb $1, %al je LBB0_2 ## BB#1: ## %if.then movb $0, %al instead of: testb $1, %al jne LBB0_1 jmp LBB0_2 LBB0_1: ## %if.then movb $0, %al how 'bout that. llvm-svn: 129749
* fix rdar://9297006 - fast isel bails out on trunc to i1 -> bools cry,Chris Lattner2011-04-191-6/+29
| | | | | | a common cause of fast isel rejects on c++ code. llvm-svn: 129748
* 1. merge fast-isel-shift-imm.ll into fast-isel-x86-64.llChris Lattner2011-04-171-22/+13
| | | | | | | | | | 2. implement rdar://9289501 - fast isel should fold trivial multiplies to shifts 3. teach tblgen to handle shift immediates that are different sizes than the shifted operands, eliminating some code from the X86 fast isel backend. 4. Have FastISel::SelectBinaryOp use (the poorly named) FastEmit_ri_ function instead of FastEmit_ri to simplify code. llvm-svn: 129666
* fix an x86 fast isel issue where we'd completely give up on folding an addressChris Lattner2011-04-171-71/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when we have a global variable base an an index. Instead, just give up on folding the global variable. Before we'd geenrate: _test: ## @test ## BB#0: movq _rtx_length@GOTPCREL(%rip), %rax leaq (%rax), %rax addq %rdi, %rax movzbl (%rax), %eax ret now we generate: _test: ## @test ## BB#0: movq _rtx_length@GOTPCREL(%rip), %rax movzbl (%rax,%rdi), %eax ret The difference is even more significant when there is a scale involved. This fixes rdar://9289558 - total fail with addr mode formation at -O0/x86-64 llvm-svn: 129664
* fix an oversight which caused us to compile the testcase (and otherChris Lattner2011-04-171-4/+7
| | | | | | | | | | | | | | | | | | | less trivial things) into a dummy lea. Before we generated: _test: ## @test movq _G@GOTPCREL(%rip), %rax leaq (%rax), %rax ret now we produce: _test: ## @test movq _G@GOTPCREL(%rip), %rax ret This is part of rdar://9289558 llvm-svn: 129662
* tidy up and reduce indentation.Chris Lattner2011-04-171-37/+39
| | | | llvm-svn: 129661
* Don't include Operator.h from InstrTypes.h.Jay Foad2011-04-111-0/+1
| | | | llvm-svn: 129271
* Fix fast-isel address mode folding to avoid folding instructionsDan Gohman2011-03-221-16/+22
| | | | | | outside of the current basic block. This fixes PR9500, rdar://9156159. llvm-svn: 128041
OpenPOWER on IntegriCloud