summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* Teach DAGCombine to fold constant offsets into GlobalAddress nodes,Dan Gohman2008-10-1821-85/+179
| | | | | | | | | | | | | | | | | | | | | | and add a TargetLowering hook for it to use to determine when this is legal (i.e. not in PIC mode, etc.) This allows instruction selection to emit folded constant offsets in more cases, such as the included testcase, eliminating the need for explicit arithmetic instructions. This eliminates the need for the C++ code in X86ISelDAGToDAG.cpp that attempted to achieve the same effect, but wasn't as effective. Also, fix handling of offsets in GlobalAddressSDNodes in several places, including changing GlobalAddressSDNode's offset from int to int64_t. The Mips, Alpha, Sparc, and CellSPU targets appear to be unaware of GlobalAddress offsets currently, so set the hook to false on those targets. llvm-svn: 57748
* Revert r57699. It's causing regressions inDan Gohman2008-10-182-54/+15
| | | | | | | test/CodeGen/X86/2008-09-17-inline-asm-1.ll and a few others, and it breaks the llvm-gcc build. llvm-svn: 57747
* Use the opcode predicates, instead of duplicating the code.Dan Gohman2008-10-171-3/+3
| | | | llvm-svn: 57735
* This is now partly done.Dan Gohman2008-10-171-1/+1
| | | | llvm-svn: 57734
* This is done.Dan Gohman2008-10-171-10/+0
| | | | llvm-svn: 57733
* Factor out the code for mapping LLVM IR condition opcodes toDan Gohman2008-10-172-34/+47
| | | | | | ISD condition opcodes into helper functions. llvm-svn: 57726
* Add implicit defs of XMM8 to XMM15 on 32-bit call instructions. While this ↵Evan Cheng2008-10-171-1/+2
| | | | | | is not technically true, it tells tblgen that these instructions "clobber" the entire XMM register file. llvm-svn: 57723
* Add RCBarriers to TargetInstrDesc. It's a list of register classes the given ↵Evan Cheng2008-10-173-6/+79
| | | | | | | | instruction can "clobber". For example, on x86 the call instruction can modify all of the XMM and fp stack registers. TableGen has been taught to generate the lists from instruction definitions. llvm-svn: 57722
* Fix PR2898. Spiller delete a store for reuse before it knows for sure the ↵Evan Cheng2008-10-172-11/+155
| | | | | | | | reuse happened. Patch by Lang Hames! llvm-svn: 57720
* add support for 128 bit aggregates.Chris Lattner2008-10-171-0/+1
| | | | llvm-svn: 57715
* The Dwarf writer was comparing mangled and unmangled names for C++ code when weBill Wendling2008-10-172-1/+62
| | | | | | | | | have an unreachable block in a function. This was triggering the assert. This is a horrid hack to cover this up. Oh! for a good debug info architecture! llvm-svn: 57714
* Added MemIntrinsicNode which is useful to represent target intrinsics thatMon P Wang2008-10-173-8/+121
| | | | | | touches memory and need an associated MemOperand llvm-svn: 57712
* Factor out the code for mapping LLVM IR condition opcodes toDan Gohman2008-10-171-126/+61
| | | | | | ISD condition opcodes into helper functions. llvm-svn: 57710
* add support for 128 bit inputs on both x86-64 and x86-32.Chris Lattner2008-10-171-9/+6
| | | | llvm-svn: 57709
* Fix a bug where the x86 backend would reject 64-bit r constraints whenChris Lattner2008-10-172-1/+10
| | | | | | | in 32-bit mode instead of assigning a register pair. This has nothing to do with PR2356, but I happened to notice it while working on it. llvm-svn: 57704
* Fix PR2356 on PowerPC: if we have an input and output that are tied togetherChris Lattner2008-10-172-15/+54
| | | | | | | that have different sizes (e.g. i32 and i64) make sure to reserve registers for the bigger operand. llvm-svn: 57699
* remove an xfailed test.Chris Lattner2008-10-171-26/+0
| | | | llvm-svn: 57695
* remove this test: it is xfailed anyway, and is failing for a reasonChris Lattner2008-10-171-18/+0
| | | | | | other than why it was xfailed. llvm-svn: 57694
* Fix lfence and mfence encoding. These look like MRM5r and MRM6r instructions ↵Evan Cheng2008-10-172-5/+17
| | | | | | except they do not have any operands. The RegModRM byte is encoded with register number 0. llvm-svn: 57692
* getX86RegNum has long been moved to X86RegisterInfo.Evan Cheng2008-10-171-1/+0
| | | | llvm-svn: 57691
* refactor some code into a helper method, no functionality change.Chris Lattner2008-10-171-25/+40
| | | | llvm-svn: 57690
* Keep track of *which* input constraint matches an outputChris Lattner2008-10-175-14/+25
| | | | | | | constraint. Reject asms where an output has multiple input constraints tied to it. llvm-svn: 57687
* add an assert so that PR2356 explodes instead of running off anChris Lattner2008-10-173-6/+34
| | | | | | | array. Improve some minor comments, refactor some helpers in AsmOperandInfo. No functionality change for valid code. llvm-svn: 57686
* remove spurious space in linkGabor Greif2008-10-171-2/+2
| | | | llvm-svn: 57677
* Add comment on how tagged pointers areGabor Greif2008-10-171-1/+8
| | | | | | | | | | distinguished from normal (untagged) ones as per review comment. I am sufficiently unaquainted with doxygen to defer the markup to someone with more experience. llvm-svn: 57676
* Fix a very subtle spiller bug: UpdateKills should not forget to track defs ↵Evan Cheng2008-10-172-8/+169
| | | | | | of aliases. llvm-svn: 57673
* add some simple hacky long double support for the CBE. ThisChris Lattner2008-10-171-5/+15
| | | | | | | should work for intel long double, but ppc long double aborts in convert. llvm-svn: 57672
* Use INT64_C to emit constant values, to avoid problems withDan Gohman2008-10-171-2/+3
| | | | | | | | constants that don't fit in an int. This fixes "this decimal constant is unsigned only in ISO C90" warnings. llvm-svn: 57668
* Fun x86 encoding tricks: when adding an immediate value of 128,Dan Gohman2008-10-1714-37/+95
| | | | | | | | | | | | | use a SUB instruction instead of an ADD, because -128 can be encoded in an 8-bit signed immediate field, while +128 can't be. This avoids the need for a 32-bit immediate field in this case. A similar optimization applies to 64-bit adds with 0x80000000, with the 32-bit signed immediate field. To support this, teach tablegen how to handle 64-bit constants. llvm-svn: 57663
* Define patterns for shld and shrd that match immediateDan Gohman2008-10-177-25/+364
| | | | | | | | | | | | | | | | | | shift counts, and patterns that match dynamic shift counts when the subtract is obscured by a truncate node. Add DAGCombiner support for recognizing rotate patterns when the shift counts are defined by truncate nodes. Fix and simplify the code for commuting shld and shrd instructions to work even when the given instruction doesn't have a parent, and when the caller needs a new instruction. These changes allow LLVM to use the shld, shrd, rol, and ror instructions on x86 to replace equivalent code using two shifts and an or in many more cases. llvm-svn: 57662
* Use 0 instead of false to return a null pointer.Dan Gohman2008-10-171-1/+1
| | | | llvm-svn: 57660
* Fix this test so it actually runs the grep lines.Dan Gohman2008-10-161-3/+3
| | | | llvm-svn: 57653
* Trim #includes.Dan Gohman2008-10-1616-33/+4
| | | | llvm-svn: 57649
* fix typo noticed by sdtChris Lattner2008-10-161-1/+1
| | | | llvm-svn: 57644
* Introduce a typing refinenement on tagged dataGabor Greif2008-10-162-10/+8
| | | | | | | | | | | | using the 'volatile' qualifier. This should not have any operational consequences on code, because tags should always be stripped off (giving a non-volatile pointer) before dereferencing. The new qualification is there to catch some attempts to use tagged pointers in a context where an untagged pointer is appropriate. Notably this approach does not catch dereferencing of tagged pointers, but helps in separating the two concepts a bit. llvm-svn: 57641
* Re-apply Makefile changes. Fix build with srcdir != objdir.Mikhail Glushenkov2008-10-1610-13/+60
| | | | llvm-svn: 57636
* Fix warnings about mb/me being potentially usedDuncan Sands2008-10-161-2/+2
| | | | | | uninitialized in these functions with gcc-4.3. llvm-svn: 57635
* Fix "large integer implicitly truncated to unsigned type"Duncan Sands2008-10-161-3/+3
| | | | | | warning on x86-64 with gcc-4.3. llvm-svn: 57634
* Testcase for PR2762.Duncan Sands2008-10-161-0/+8
| | | | llvm-svn: 57633
* add some notesChris Lattner2008-10-161-1/+1
| | | | llvm-svn: 57631
* add some notes and a file to collect unimplemented features in theChris Lattner2008-10-161-0/+14
| | | | | | | x86 backend. These will all be answered with "patches welcome", so a PR doesn't help drive them along. llvm-svn: 57630
* mark some targets as experimental. Andrew, if you think that Alpha isChris Lattner2008-10-164-4/+5
| | | | | | | basically working, feel free to remove the tag. The other targets have really basic things that break them. llvm-svn: 57628
* Verify prefetch arguments, PR2576.Chris Lattner2008-10-161-0/+8
| | | | llvm-svn: 57626
* apply Eli's patch for PR2165 and provide a testcase.Chris Lattner2008-10-162-0/+14
| | | | llvm-svn: 57625
* Const-ify several TargetInstrInfo methods.Dan Gohman2008-10-1616-54/+57
| | | | llvm-svn: 57622
* Remove an unused variable.Dan Gohman2008-10-161-1/+0
| | | | llvm-svn: 57621
* Fix Instruction::isIdenticalTo and isSameOperationAs to recognizeDan Gohman2008-10-161-6/+57
| | | | | | | additional information in Loads, Stores, Calls, Invokes, InsertValueInsts, and ExtractValueInsts. llvm-svn: 57620
* Fix a calculation error in comments.Zhongxing Xu2008-10-161-1/+1
| | | | llvm-svn: 57619
* Rename AliasSet to SubRegs, to reflect changes in the surrounding code.Dan Gohman2008-10-161-3/+3
| | | | llvm-svn: 57618
* Move the include of MachineLocation.h into MachineModuleInfo.hDan Gohman2008-10-162-2/+1
| | | | | | | | because it declares a std::vector<MachineMove>, and strict concept checking requires the definition of MachineMove to be available. llvm-svn: 57617
OpenPOWER on IntegriCloud