summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86
Commit message (Collapse)AuthorAgeFilesLines
...
* add a note Chris Lattner2008-12-061-0/+15
| | | | llvm-svn: 60632
* Forgot a file.Dale Johannesen2008-12-051-0/+6
| | | | llvm-svn: 60609
* Make LoopStrengthReduce smarter about hoisting things out ofDale Johannesen2008-12-052-1/+21
| | | | | | | | | | | loops when they can be subsumed into addressing modes. Change X86 addressing mode check to realize that some PIC references need an extra register. (I believe this is correct for Linux, if not, I'm sure someone will tell me.) llvm-svn: 60608
* Reason #3 from 60595 doesn't hold true. If we can fold a PIC load from ↵Evan Cheng2008-12-051-2/+0
| | | | | | constpool into a use, the rewrite happens at time of spill (not in VirtRegMap). Later on, if the GlobalBaseReg is spilled, the spiller can see the use uses GlobalBaseReg and do the right thing. llvm-svn: 60596
* Effectively undo 60461 in PIC mode which simply transform V_SET0 / ↵Evan Cheng2008-12-051-1/+7
| | | | | | | | | | V_SETALLONES into a load from constpool in order to fold into restores. This is not safe to do when PIC base is being used for a number of reasons: 1. GlobalBaseReg may have been spilled. 2. It may not be live at the use. 3. Spiller doesn't know this is happening so it won't prevent GlobalBaseReg from being spilled later (That by itself is a nasty hack. It's needed because we don't insert the reload until later). llvm-svn: 60595
* Re-did 60519. It turns out Darwin's handling of hidden visibility symbols ↵Evan Cheng2008-12-053-7/+35
| | | | | | are a bit more complicate than I expected. Both declarations and weak definitions still need a stub indirection. However, the stubs are in data section and they contain the addresses of the actual symbols. llvm-svn: 60571
* Temporarily revert r60519. It was causing a bootstrap failure:Bill Wendling2008-12-042-5/+0
| | | | | | | | | | | | | | | | /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/xgcc -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/ -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.5.0/bin/ -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.5.0/lib/ -isystem /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.5.0/include -isystem /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.5.0/sys-include -DHAVE_CONFIG_H -I. -I../../../llvm-gcc.src/libgomp -I. -I../../../llvm-gcc.src/libgomp/config/posix -I../../../llvm-gcc.src/libgomp -Wall -pthread -Werror -O2 -g -O2 -MT barrier.lo -MD -MP -MF .deps/barrier.Tpo -c ../../../llvm-gcc.src/libgomp/barrier.c -fno-common -DPIC -o .libs/barrier.o checking for sys/file.h... /var/folders/zG/zGE-ZJOGFiGjv0B5cs5oYE+++TM/-Tmp-//cc34Jg5P.s:13:non-relocatable subtraction expression, "_gomp_tls_key" minus "L1$pb" /var/folders/zG/zGE-ZJOGFiGjv0B5cs5oYE+++TM/-Tmp-//cc34Jg5P.s:13:symbol: "_gomp_tls_key" can't be undefined in a subtraction expression make[4]: *** [barrier.lo] Error 1 make[4]: *** Waiting for unfinished jobs.... /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/xgcc -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/ -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.5.0/bin/ -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.5.0/lib/ -isystem /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.5.0/include -isystem /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.5.0/sys-include -DHAVE_CONFIG_H -I. -I../../../llvm-gcc.src/libgomp -I. -I../../../llvm-gcc.src/libgomp/config/posix -I../../../llvm-gcc.src/libgomp -Wall -pthread -Werror -O2 -g -O2 -MT alloc.lo -MD -MP -MF .deps/alloc.Tpo -c ../../../llvm-gcc.src/libgomp/alloc.c -o alloc.o >/dev/null 2>&1 yes checking for sys/param.h... make[3]: *** [all-recursive] Error 1 make[2]: *** [all] Error 2 make[1]: *** [all-target-libgomp] Error 2 make[1]: *** Waiting for unfinished jobs.... llvm-svn: 60527
* Visibility hidden GVs do not require extra load of symbol address from the ↵Evan Cheng2008-12-042-0/+5
| | | | | | GOT or non-lazy-ptr. llvm-svn: 60519
* Use mmx (punpckldq VR64, (mmx_v_set0)) to clear high 32-bits of a VR64 register.Evan Cheng2008-12-031-3/+13
| | | | llvm-svn: 60499
* Split foldMemoryOperand into public non-virtual and protected virtualDan Gohman2008-12-032-25/+25
| | | | | | | parts, and add target-independent code to add/preserve MachineMemOperands. llvm-svn: 60488
* Rename isSimpleLoad to canFoldAsLoad, to better reflect its meaning.Dan Gohman2008-12-035-22/+22
| | | | llvm-svn: 60487
* Extend X86's addFrameReference to add a MachineMemOperand forDan Gohman2008-12-031-1/+18
| | | | | | | the frame reference. This will help post-RA scheduling determine that spills to distinct stack slots are independent. llvm-svn: 60486
* Fix bug 3140.Rafael Espindola2008-12-031-0/+3
| | | | | | Print a single parameter .file directive if we have an ELF target. llvm-svn: 60480
* Refactor code. No functionality change.Evan Cheng2008-12-031-72/+75
| | | | llvm-svn: 60478
* CC should only be a ConstantSDNode at this point. Just use 'cast' instead of ↵Bill Wendling2008-12-031-9/+9
| | | | | | 'dyn_cast'. llvm-svn: 60477
* Mark x86's V_SET0 and V_SETALLONES with isSimpleLoad, and teach X86'sDan Gohman2008-12-032-5/+37
| | | | | | | | | | | | foldMemoryOperand how to "fold" them, by converting them into constant-pool loads. When they aren't folded, they use xorps/cmpeqd, but for example when register pressure is high, they may now be folded as memory operands, which reduces register pressure. Also, mark V_SET0 isAsCheapAsAMove so that two-address-elimination will remat it instead of copying zeros around (V_SETALLONES was already marked). llvm-svn: 60461
* Fix this comment to reflect that it applies to types otherDan Gohman2008-12-031-1/+1
| | | | | | than just i32. llvm-svn: 60455
* Fix byval arguments in the fastcc calling convention. The fastcc conventionDan Gohman2008-12-031-0/+5
| | | | | | | | | delegates to the regular x86-32 convention which handles byval, but only after it handles a few cases, and it's necessary to handle byval before handling those cases. This fixes PR3122 (and rdar://6400815), llvm-gcc miscompiling LLVM. llvm-svn: 60453
* Second stab at target-dependent lowering of everyone's favorite nodes: [SU]ADDOBill Wendling2008-12-022-27/+36
| | | | | | | | | | | - LowerXADDO lowers [SU]ADDO into an ADD with an implicit EFLAGS define. The EFLAGS are fed into a SETCC node which has the conditional COND_O or COND_C, depending on the type of ADDO requested. - LowerBRCOND now recognizes if it's coming from a SETCC node with COND_O or COND_C set. llvm-svn: 60388
* Reapply r60382. This time, don't mark "ADC" nodes with "implicit EFLAGS".Bill Wendling2008-12-023-29/+110
| | | | llvm-svn: 60385
* Temporarily revert r60382. It caused CodeGen/X86/i2k.ll and others to fail.Bill Wendling2008-12-013-135/+40
| | | | llvm-svn: 60383
* - Have "ADD" instructions return an implicit EFLAGS.Bill Wendling2008-12-013-40/+135
| | | | | | - Add support for seto, setno, setc, and setnc instructions. llvm-svn: 60382
* There are no longer any places that require aDuncan Sands2008-12-011-4/+4
| | | | | | | | MERGE_VALUES node with only one operand, so get rid of special code that only existed to handle that possibility. llvm-svn: 60349
* Change the interface to the type legalization methodDuncan Sands2008-12-012-142/+133
| | | | | | | | | | | ReplaceNodeResults: rather than returning a node which must have the same number of results as the original node (which means mucking around with MERGE_VALUES, and which is also easy to get wrong since SelectionDAG folding may mean you don't get the node you expect), return the results in a vector. llvm-svn: 60348
* A couple small cleanups, plus a new potential optimization.Eli Friedman2008-11-301-3/+29
| | | | llvm-svn: 60286
* Fix build with gcc-4.4: it doesn't like PICStyleDuncan Sands2008-11-283-15/+15
| | | | | | being both a namespace and a variable name. llvm-svn: 60208
* Comment out code that isn't entirely correct.Bill Wendling2008-11-271-1/+3
| | | | llvm-svn: 60156
* On x86 favors folding short immediate into some arithmetic operations (e.g. ↵Evan Cheng2008-11-271-5/+40
| | | | | | | | | | | | | | | add, and, xor, etc.) because materializing an immediate in a register is expensive in turns of code size. e.g. movl 4(%esp), %eax addl $4, %eax is 2 bytes shorter than movl $4, %eax addl 4(%esp), %eax llvm-svn: 60139
* Generate something sensible for an [SU]ADDO op when the overflow/carry flag isBill Wendling2008-11-264-6/+40
| | | | | | | | | | | | | | | the conditional for the BRCOND statement. For instance, it will generate: addl %eax, %ecx jo LOF instead of addl %eax, %ecx ; About 10 instructions to compare the signs of LHS, RHS, and sum. jl LOF llvm-svn: 60123
* Fish kill flag annotations in PUSH instructions.Dan Gohman2008-11-262-3/+5
| | | | llvm-svn: 60095
* - Make lowering of "add with overflow" customizable by back-ends.Bill Wendling2008-11-242-0/+15
| | | | | | | - Mark "add with overflow" as having a custom lowering for X86. Give it a null lowering representation for now. llvm-svn: 59971
* Move target independent td files from lib/Target/ to include/llvm/Target so ↵Evan Cheng2008-11-241-1/+1
| | | | | | they can be distributed along with the header files. llvm-svn: 59953
* Added missing description for -disable-mmx option.Mon P Wang2008-11-241-1/+1
| | | | llvm-svn: 59929
* Rename SetCCResultContents to BooleanContents. InDuncan Sands2008-11-231-1/+1
| | | | | | | practice these booleans are mostly produced by SetCC, however the concept is more general. llvm-svn: 59911
* Added -disable-mmx using a patch from Preston Gurd.Mon P Wang2008-11-231-1/+5
| | | | llvm-svn: 59901
* Make a convenient helper for printing offsets.Anton Korobeynikov2008-11-222-20/+4
| | | | llvm-svn: 59872
* Allow XMM2 and XMM3 to be used for non ABI compliant code.Mon P Wang2008-11-201-3/+4
| | | | llvm-svn: 59720
* Eliminate a compile time warning.Evan Cheng2008-11-191-4/+6
| | | | llvm-svn: 59677
* <rdar://problem/6351057>Stuart Hastings2008-11-191-10/+12
| | | | | | | Discourage (allocate last) use of x86_64 R12 and R13 due to their longer instruction encodings. llvm-svn: 59644
* Don't set neverHasSideEffects on x86's divide instructions, sinceDan Gohman2008-11-182-3/+1
| | | | | | | they trap on divide-by-zero, and this side effect is otherwise unmodeled. llvm-svn: 59551
* Add more const qualifiers. This fixes build breakage from r59540.Dan Gohman2008-11-182-6/+6
| | | | llvm-svn: 59542
* Adds extern "C" ints to the .cpp files that use RegisterTarget, asOscar Fuentes2008-11-151-0/+3
| | | | | | | | | | | well as 2 files that use "Registrator"s. These are to be used by the MSVC builds, as the Win32 linker does not include libs that are otherwise unreferenced, even if global constructors in the lib have side-effects. Patch by Scott Graham! llvm-svn: 59378
* Remove unneeded stuff from GRAD register class.Dale Johannesen2008-11-141-19/+1
| | | | llvm-svn: 59311
* Extend InlineAsm::C_Register to allow multiple specific registersDale Johannesen2008-11-132-5/+27
| | | | | | | | (actually, code already all worked, only the comment changed). Use this to implement 'A' constraint on x86. Fixes PR 1779. llvm-svn: 59266
* Move the code that inserts X87 FP_REG_KILL instructions from aDan Gohman2008-11-125-80/+148
| | | | | | | | special-purpose hook to a new pass. Also, add check to see if any x87 virtual registers are used, to avoid doing any work in the common case that no x87 code is needed. llvm-svn: 59190
* Add a README entry.Evan Cheng2008-11-111-0/+17
| | | | llvm-svn: 59052
* The 32-bit displacement field in an x86 address is signed. Arrange for itDan Gohman2008-11-111-10/+13
| | | | | | | | | | | | to be sign-extended when it is promoted to 64 bits for intermediate offset calculations. The offset calculations are done as uint64_t so that overflow conditions are well defined. This fixes a problem which is currently hidden by the x86 AsmPrinter but which was exposed by r58917 (which is temporarily reverted). See PR3027 for details. llvm-svn: 59044
* Fix indentation.Dan Gohman2008-11-101-1/+1
| | | | llvm-svn: 59004
* Rename isGVNonLazyPtr to isIndirectSym to reflect how it will be used.Evan Cheng2008-11-103-20/+20
| | | | llvm-svn: 58949
* Temporary revert my last commit: it seems it's triggering some subtle bug in ↵Anton Korobeynikov2008-11-082-4/+20
| | | | | | | | backend and breaks llvm-gcc llvm-svn: 58926
OpenPOWER on IntegriCloud