summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/FloatingPoint.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Renamed files to have the `X86' prefix for uniqueness purposes.Misha Brukman2004-07-261-721/+0
| | | | | | All CVS history was renamed, the *,v were copied over. No worries. llvm-svn: 15238
* Made a fix so that you can print out MachineInstrs that belong to a ↵Tanya Lattner2004-06-251-2/+2
| | | | | | MachineBasicBlock that is not yet attached to a MachineFunction. This change includes changing the third operand (TargetMachine) to a pointer for the MachineInstr::print function. llvm-svn: 14389
* Fix bug in previous checkinChris Lattner2004-06-111-0/+3
| | | | llvm-svn: 14146
* Now that compare instructions aren't lumped in with the other twoargfp ↵Chris Lattner2004-06-111-8/+2
| | | | | | | | | instructions, we can get rid of the FpUCOM/FpUCOMi pseudo instructions, which makes stuff simpler and faster. llvm-svn: 14144
* Introduce a new FP instruction type to separate the compare cases from theChris Lattner2004-06-111-6/+2
| | | | | | twoarg cases. llvm-svn: 14143
* Split compare instruction handling OUT of handleTwoArgFP into handleCompareFP.Chris Lattner2004-06-111-43/+49
| | | | | | | | | | | | This makes the code much simpler, and the two cases really do belong apart. Once we do it, it's pretty obvious how flawed the logic was for A != A case, so I fixed it (fixing PR369). This also uses freeStackSlotAfter instead of inserting an fxchg then popStackAfter'ing in the case where there is a dead result (unlikely, but possible), producing better code. llvm-svn: 14139
* Convert to the new TargetMachine interface.Chris Lattner2004-06-021-1/+1
| | | | llvm-svn: 13952
* Iterate over the Machine CFG that Brian added instead of the LLVM CFG.Chris Lattner2004-05-011-21/+4
| | | | | | Look at all of the pretty minuses. :) llvm-svn: 13303
* This is the real fix for Codegen/X86/2004-04-13-FPCMOV-Crash.llx which worksChris Lattner2004-04-141-7/+8
| | | | | | | | | | | | | | | | | even when the "optimization" I added before is turned off. It generates this extremely pointless code: test: fld QWORD PTR [%ESP + 4] mov %AL, 0 test %AL, %AL fcmove %ST(0), %ST(0) ret Good thing the optimizer will have removed this before code generation anyway. :) llvm-svn: 12939
* Fix issues that the local allocator has dealing with instructions that ↵Chris Lattner2004-04-121-5/+5
| | | | | | implicitly use ST(0) llvm-svn: 12855
* Add support for the FUCOMIr instructionChris Lattner2004-04-121-27/+34
| | | | llvm-svn: 12851
* Relax assertion to make this function work with a broader class of instructionsChris Lattner2004-04-111-2/+8
| | | | llvm-svn: 12836
* Simplify code by using the more powerful BuildMI forms.Chris Lattner2004-04-011-34/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement a small optimization. In test/Regression/CodeGen/X86/select.ll, we now generate this for foldSel3: foldSel3: mov %AL, BYTE PTR [%ESP + 4] fld DWORD PTR [%ESP + 8] fld DWORD PTR [%ESP + 12] mov %EAX, DWORD PTR [%ESP + 16] mov %ECX, DWORD PTR [%ESP + 20] cmp %EAX, %ECX fxch %ST(1) fcmovae %ST(0), %ST(1) *** fstp %ST(1) ret Instead of: foldSel3: mov %AL, BYTE PTR [%ESP + 4] fld DWORD PTR [%ESP + 8] fld DWORD PTR [%ESP + 12] mov %EAX, DWORD PTR [%ESP + 16] mov %ECX, DWORD PTR [%ESP + 20] cmp %EAX, %ECX fxch %ST(1) fcmovae %ST(0), %ST(1) *** fxch %ST(1) *** fstp %ST(0) ret In practice, this only effects code size: performance should be basically unaffected. llvm-svn: 12588
* Add support for floating point conditional move instructionsChris Lattner2004-03-311-5/+37
| | | | llvm-svn: 12576
* A big X86 instruction rename. The instructions are renamed to makeAlkis Evlogimenos2004-02-291-8/+8
| | | | | | | | | | | | | | | | their names more decriptive. A name consists of the base name, a default operand size followed by a character per operand with an optional special size. For example: ADD8rr -> add, 8-bit register, 8-bit register IMUL16rmi -> imul, 16-bit register, 16-bit memory, 16-bit immediate IMUL16rmi8 -> imul, 16-bit register, 16-bit memory, 8-bit immediate MOVSX32rm16 -> movsx, 32-bit register, 16-bit memory llvm-svn: 11995
* Floating point loads/stores act on memory operands. Rename them toAlkis Evlogimenos2004-02-281-7/+7
| | | | | | denote this fact. llvm-svn: 11971
* Fix problem in DEBUG code. I could be pointing past the end andAlkis Evlogimenos2004-02-151-14/+14
| | | | | | dereferencing it causes an assertion error. llvm-svn: 11458
* Use newly added next() and prior() utility functions.Alkis Evlogimenos2004-02-141-5/+3
| | | | llvm-svn: 11430
* Change MachineBasicBlock's vector of MachineInstr pointers into anAlkis Evlogimenos2004-02-121-21/+29
| | | | | | | | | ilist of MachineInstr objects. This allows constant time removal and insertion of MachineInstr instances from anywhere in each MachineBasicBlock. It also allows for constant time splicing of MachineInstrs into or out of MachineBasicBlocks. llvm-svn: 11340
* Don't use MachineOperator::is(Phys|Virt)RegisterChris Lattner2004-02-101-1/+1
| | | | llvm-svn: 11276
* Add support for one argument OneArgFP instructionsChris Lattner2004-02-031-3/+4
| | | | llvm-svn: 11094
* Add support for OneArgFPRW instructions, fix a couple of typeosChris Lattner2004-02-021-12/+43
| | | | llvm-svn: 11077
* Add some comments sketching out how this is to work eventually.Chris Lattner2004-01-301-6/+49
| | | | llvm-svn: 11026
* Remove floating point killer pass. This is now implemented in theAlkis Evlogimenos2003-12-201-52/+0
| | | | | | | | | | instruction selector by adding a new pseudo-instruction FP_REG_KILL. This instruction implicitly defines all x86 fp registers and is a terminator so that passes which add machine code at the end of basic blocks (like phi elimination) do not add instructions between it and the branch or return instruction. llvm-svn: 10562
* Fix memory leak in the stackifier, due to the machinebasicblocks not holdingChris Lattner2003-12-201-0/+1
| | | | | | instructions on an ilist llvm-svn: 10556
* Finegrainify namespacificationChris Lattner2003-12-201-21/+20
| | | | | | Minor cleanups to killer pass llvm-svn: 10555
* Change preserve all claim to just preserve live variables and phielimination.Alkis Evlogimenos2003-12-141-1/+2
| | | | llvm-svn: 10460
* Add a floating point killer pass. This pass runs before registerAlkis Evlogimenos2003-12-131-0/+52
| | | | | | | | | | allocaton on the X86 to add information to the machine code denoting that our floating point stackifier cannot handle virtual point register that are alive across basic blocks. This pass adds an implicit def of all virtual floating point register at the end of each basic block. llvm-svn: 10446
* Put all LLVM code into the llvm namespace, as per bug 109.Brian Gaeke2003-11-111-1/+5
| | | | llvm-svn: 9903
* Added LLVM project notice to the top of every C++ source file.John Criswell2003-10-201-0/+7
| | | | | | Header files will be on the way. llvm-svn: 9298
* Fix spelling.Misha Brukman2003-10-101-1/+1
| | | | llvm-svn: 9027
* Spell `necessary' correctly.Misha Brukman2003-08-181-1/+1
| | | | llvm-svn: 7944
* Factory methods for FunctionPasses now return type FunctionPass *.Brian Gaeke2003-08-131-1/+1
| | | | llvm-svn: 7823
* Resort tablesChris Lattner2003-08-031-16/+20
| | | | llvm-svn: 7541
* Set debug typesChris Lattner2003-08-031-0/+1
| | | | llvm-svn: 7532
* Move DEBUG to Debug.hChris Lattner2003-08-011-0/+1
| | | | llvm-svn: 7497
* Nice tasty llc fixes. These should fix LLC for x86 for everything inBrian Gaeke2003-06-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SingleSource except oopack and Oscar. (Sorry, Oscar.) include/llvm/Target/TargetInstrInfo.h: Remove virtual print method. Add accessors for ImplicitUses/Defs. lib/Target/TargetInstrInfo.cpp: Remove virtual print method. If you really wanted this, just use MI->print(O, TM); instead... lib/Target/X86: FloatingPoint.cpp: ...like this. X86InstrInfo.h: Remove virtual print method. Define the PrintImplUses target-specific flag bit. X86InstrInfo.def: Add the PrintImplUses flag to all the instructions which implicitly use CL, because the assembler needs to see the CL in order to generate the right instruction. Printer.cpp: Ditch fnIndex at Chris's request. Now we use CurrentFnName to name constants in the constant pool for each function instead. This avoids keeping state between runOnMachineFunction() invocations, which is a no-no. Having MangledGlobals be global is a bogon I'd like to get rid of too, but making it a static member of Printer causes link errors (why???). Make NumberForBB into a member of Printer instead of a global, too. Make printOp and printMemReference into methods of Printer. X86InstrInfo::print is now Printer::printMachineInstruction, because TargetInstrInfo::print is history. (Because of this, we have to qualify the names of some TargetInstrInfo methods we call.) Print out the ImplicitUses field of any instruction we print that has the PrintImplUses bit set. llvm-svn: 6924
* Rename MachineInstrInfo -> TargetInstrInfoChris Lattner2003-01-141-1/+1
| | | | llvm-svn: 5272
* New filesChris Lattner2003-01-131-0/+587
llvm-svn: 5260
OpenPOWER on IntegriCloud