summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [mips] Coding style clean up.Akira Hatanaka2013-10-071-14/+12
| | | | llvm-svn: 192125
* [mips] Make sure loads from lazy-binding entries do not get CSE'd or hoisted outAkira Hatanaka2013-09-281-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | of loops. Previously, two consecutive calls to function "func" would result in the following sequence of instructions: 1. load $16, %got(func)($gp) // load address of lazy-binding stub. 2. move $25, $16 3. jalr $25 // jump to lazy-binding stub. 4. nop 5. move $25, $16 6. jalr $25 // jump to lazy-binding stub again. With this patch, the second call directly jumps to func's address, bypassing the lazy-binding resolution routine: 1. load $25, %got(func)($gp) // load address of lazy-binding stub. 2. jalr $25 // jump to lazy-binding stub. 3. nop 4. load $25, %got(func)($gp) // load resolved address of func. 5. jalr $25 // directly jump to func. llvm-svn: 191591
* Use SmallVectorImpl::iterator/const_iterator instead of SmallVector to avoid ↵Craig Topper2013-07-031-2/+2
| | | | | | specifying the vector size. llvm-svn: 185540
* Don't cache the instruction and register info from the TargetMachine, becauseBill Wendling2013-06-071-2/+3
| | | | | | the internals of TargetMachine could change. llvm-svn: 183493
* Fix comment.Akira Hatanaka2013-03-251-3/+3
| | | | llvm-svn: 177899
* [mips] Remove unused option. Fix 80-column violations.Akira Hatanaka2013-03-011-16/+8
| | | | llvm-svn: 176330
* [mips] Add the capability to search delay slot filling instructions inAkira Hatanaka2013-03-011-32/+303
| | | | | | | | successor basic blocks. Currently this is off by default. llvm-svn: 176329
* [mips] Add options to disable searching backward and in successor blocks.Akira Hatanaka2013-03-011-0/+12
| | | | llvm-svn: 176321
* [mips] Add capability to search in the forward direction for instructions thatAkira Hatanaka2013-03-011-23/+92
| | | | | | | | can fill the delay slot. Currently, this is off by default. llvm-svn: 176320
* [mips] Define helper function searchRangeAkira Hatanaka2013-03-011-9/+29
| | | | | | No functionality change. llvm-svn: 176318
* [mips] Rename function findDelayInstr to searchBackward.Akira Hatanaka2013-03-011-3/+3
| | | | llvm-svn: 176317
* [mips] Define class MemDefsUses.Akira Hatanaka2013-03-011-23/+126
| | | | | | | This class tracks dependence between memory instructions using underlying objects of memory operands. llvm-svn: 176313
* [mips] Use class RegDefsUses to track register defs and uses.Akira Hatanaka2013-02-261-89/+82
| | | | | | No functionality change. llvm-svn: 176070
* [mips] Disallow moving load/store instructions past volatile instructions.Akira Hatanaka2013-02-141-1/+1
| | | | | | | Unfortunately, I wasn't able to create a test case that demonstrates the problem I was trying to fix with this patch. llvm-svn: 175226
* [mips] Replace usage of SmallSet with BitVector, which is used to keep track ofAkira Hatanaka2013-02-141-86/+83
| | | | | | | defined and used registers. Also add a few helper functions to simplify the code. llvm-svn: 175224
* [mips] Fix comments and coding style violations. Declare functions to be const.Akira Hatanaka2013-02-141-64/+47
| | | | llvm-svn: 175222
* [mips] Simplify code in function Filler::findDelayInstr.Akira Hatanaka2013-02-141-38/+29
| | | | | | | | 1. Define and use function terminateSearch. 2. Use MachineBasicBlock::iterator instead of MachineBasicBlock::instr_iterator. 3. Delete the line which checks whether an instruction is a pseudo. llvm-svn: 175219
* [mips] Make Filler a class and reduce indentation.Akira Hatanaka2013-02-071-34/+38
| | | | llvm-svn: 174666
* Use the new MIBundleBuilder class in the Mips target.Jakob Stoklund Olesen2012-12-071-4/+4
| | | | | | This is the preferred way of creating bundled machine instructions. llvm-svn: 169585
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-031-3/+3
| | | | | | | | | | | | | | | | | Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] llvm-svn: 169131
* [mips] Fix delay slot filler so that instructions with register operand $1 areAkira Hatanaka2012-11-161-17/+34
| | | | | | allowed in branch delay slot. llvm-svn: 168131
* Disable Mips' delay slot filler when optimization level is O0.Akira Hatanaka2012-08-241-1/+3
| | | | llvm-svn: 162589
* Add option disable-mips-delay-filler. Turn on mips' delay slot filler byAkira Hatanaka2012-08-221-4/+5
| | | | | | | | default. Patch by Carl Norum. llvm-svn: 162339
* Fix coding style violations. Remove white spaces and tabs.Akira Hatanaka2012-06-141-8/+8
| | | | llvm-svn: 158471
* Bundle jump/branch instructions with the instructions in the delay slot inAkira Hatanaka2012-06-131-16/+22
| | | | | | | | | delay slot filler pass of MIPS, per suggestion of Jakob Stoklund Olesen. This change, along with the fix in r158154, enables machine verification to be run after delay slot filling. llvm-svn: 158426
* Switch some getAliasSet clients to MCRegAliasIterator.Jakob Stoklund Olesen2012-06-011-7/+4
| | | | | | | MCRegAliasIterator can optionally visit the register itself, allowing for simpler code. llvm-svn: 157837
* Add a command line option to skip the delay slot filler pass entirely for Mips.Akira Hatanaka2012-05-141-0/+10
| | | | | | | | | | The purpose of this option is to silence error messages issued by machine verifier passes and enable them to run to the end. If this option is not provided, -verify-machineinstrs complains when it discovers there is a non-terminator instruction (an instruction that is in a delay slot) after the first terminator in a basic block. llvm-svn: 156790
* Use uint16_t to store register overlaps to reduce static data.Craig Topper2012-03-041-1/+1
| | | | llvm-svn: 152001
* remove blanks, and some code formatJia Liu2012-02-281-4/+4
| | | | llvm-svn: 151625
* remove Emacs-tag form .cpp files in Mips Backend, and fix some typo.Jia Liu2012-02-171-1/+1
| | | | llvm-svn: 150805
* add Emacs tag and fix some comment error in file headersJia Liu2012-02-171-1/+1
| | | | llvm-svn: 150775
* Tidy up. Simplify logic. No functional change intended.Akira Hatanaka2011-12-191-4/+2
| | | | llvm-svn: 146896
* Add bundle aware API for querying instruction properties and switch the codeEvan Cheng2011-12-071-9/+8
| | | | | | | | | | | | | | generator to it. For non-bundle instructions, these behave exactly the same as the MC layer API. For properties like mayLoad / mayStore, look into the bundle and if any of the bundled instructions has the property it would return true. For properties like isPredicable, only return true if *all* of the bundled instructions have the property. For properties like canFoldAsLoad, isCompare, conservatively return false for bundles. llvm-svn: 146026
* Fix assertion string.Akira Hatanaka2011-10-051-1/+1
| | | | llvm-svn: 141197
* Make sure candidate for delay slot filler is not a return instruction.Akira Hatanaka2011-10-051-3/+5
| | | | llvm-svn: 141196
* Add RA to the set of registers that are defined if instruction is a call.Akira Hatanaka2011-10-051-4/+4
| | | | llvm-svn: 141194
* MipsDelaySlotFiller.cpp: Appease msvc to specify llvm::next() explicitly.NAKAMURA Takumi2011-10-051-1/+1
| | | | llvm-svn: 141174
* Insert space.Akira Hatanaka2011-10-051-1/+1
| | | | llvm-svn: 141158
* Do not examine variadic or implicit operands if instruction is a return (jr).Akira Hatanaka2011-10-051-2/+3
| | | | llvm-svn: 141157
* Clean up function Filler::delayHasHazard. Akira Hatanaka2011-10-051-4/+6
| | | | llvm-svn: 141156
* Remove function Filler::insertCallUses.Akira Hatanaka2011-10-051-29/+14
| | | | | | Record the registers used and defined by a call in Filler::insertDefsUses. llvm-svn: 141154
* Clean up Filler::findDelayInstr.Akira Hatanaka2011-10-051-15/+10
| | | | llvm-svn: 141152
* Remove function Filler::isDelayFiller. Check if I is the same instruction thatAkira Hatanaka2011-10-051-11/+7
| | | | | | filled the last delay slot visited. llvm-svn: 141151
* Clean up Filler::runOnMachineBasicBlock. Change interface ofAkira Hatanaka2011-10-051-17/+20
| | | | | | Filler::findDelayInstr. llvm-svn: 141150
* Define a statistic for the number of slots that were filled with useful Akira Hatanaka2011-10-051-0/+2
| | | | | | instructions (instructions that are not NOP). llvm-svn: 141149
* Remove unnecessary check. isDelayFiller(MBB, I) will evaluate to true beforeAkira Hatanaka2011-10-051-1/+0
| | | | | | I->getDesc().hasDelaySlot() does. llvm-svn: 141148
* Add comments and move assignment statement. If sawStore is true, sawLoad doesAkira Hatanaka2011-10-051-1/+3
| | | | | | not have to be set. llvm-svn: 141147
* Correct description string of enable-mips-delay-filler.Akira Hatanaka2011-10-051-1/+1
| | | | llvm-svn: 141146
* Fill delay slot with useful instructions. Modified from Sparc's version of delayAkira Hatanaka2011-09-291-12/+201
| | | | | | | | slot filler. Patch by Reed Kotler at Mips Technologies. llvm-svn: 140825
* Drop support for Mips1 and Mips2.Akira Hatanaka2011-09-091-3/+1
| | | | llvm-svn: 139405
OpenPOWER on IntegriCloud