summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Mips/MipsConstantIslandPass.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* [C++11] Replace llvm::next and llvm::prior with std::next and std::prev.Benjamin Kramer2014-03-021-12/+11
| | | | | | Remove the old functions. llvm-svn: 202636
* Adjust offsets for max load instruction offsets. This is more pessimisticReed Kotler2014-01-161-2/+2
| | | | | | | | | than it needs to be by 1 bit but I need to finish some other things so that all the boundary cases will work in that situation. constpool.c in test-suite will fail to assemble under our new internal test-suite sync without this change. llvm-svn: 199343
* Re-sort all of the includes with ./utils/sort_includes.py so thatChandler Carruth2014-01-071-1/+1
| | | | | | | | | | subsequent changes are easier to review. About to fix some layering issues, and wanted to separate out the necessary churn. Also comment and sink the include of "Windows.h" in three .inc files to match the usage in Memory.inc. llvm-svn: 198685
* Make cosmetic changes as part of Mips internal post commit review ofReed Kotler2013-12-191-4/+4
| | | | | | patch r196331. llvm-svn: 197638
* Correct word hyphenationsAlp Toker2013-12-051-1/+1
| | | | | | | This patch tries to avoid unrelated changes other than fixing a few hyphen-related ambiguities and contractions in nearby lines. llvm-svn: 196471
* final patch for very long conditional branches for mips16 constant islands.Reed Kotler2013-12-031-5/+18
| | | | | | | | | this completes the basic port of ARM constant islands to Mips16. More testing, code review, cleanup is in order but basically everything seems to be working. A bug in gas is preventing some of the runtime testing but I hope to resolve this soon. llvm-svn: 196331
* Part 1 of 3 patches that completes very long conditional branchesReed Kotler2013-11-291-16/+29
| | | | | | | | | | | | in constant islands for Mips16. We introdcuce JalB16 as a synomnym for Jal16. It makes it easier to read and is also necessary because Jal16 is a call instruction but JalB16 is being used as a branch. Various parts of LLVM will not work properly even in this late stage of the backend if we use what was declared as a call instruction to function as a branch. For one, basic block labels may not get emitted in some situations. llvm-svn: 195968
* Check in conditional branches for constant islands. Still need to finishReed Kotler2013-11-281-2/+154
| | | | | | | | | | | | conditional branches for very large targets. That will be the next small patch. Everything now should in principle work as good (functionality wise) as without constant islands so we decided at Mips/Imagination to make constant islands the default for Mips16 now so that it will get excercised a lot and this port is still experimentatl though hopefully soon we will change the status. Some more cleanup and code review is in order but things are converging fast. llvm-svn: 195902
* Make sure that for C++ emitting LwConstant32 pseudos, that it correspondsReed Kotler2013-11-241-1/+1
| | | | | | | | | | to what is needed for constant islands. The prescan method for Mips16 constant islands will eventually go away. It is only temporary and should be done earlier when the instructions are first created or from the DAG. If we keep it here we need to handle better the situation where constant islands is called multiple times since don't want to prescan more than once. llvm-svn: 195569
* Fix a funny bug I introduced during conversion of ARM constant islands to Mips.Reed Kotler2013-11-241-3/+5
| | | | | | | | | | | | I had to move some code and I moved a declaration forward past it's first use in the function but by nutty coincidence there was another variable of the same name and type and with completely unrelated function that was declared globally in the class so no compilation error ensued. It required some unusual conditions for it to even matter. Caused test case casts.c in test-suite to fail during compilation with a duplicate symbol error. I would have noticed it during final code review for this port. llvm-svn: 195565
* Add, to constant islands, long jumps similar to ARM far branch.Reed Kotler2013-11-211-2/+22
| | | | llvm-svn: 195312
* Take care of long short branch immediate instructions for mips16 inReed Kotler2013-11-131-5/+10
| | | | | | constant islands. llvm-svn: 194630
* Allow the code which returns the length for inline assembler to knowReed Kotler2013-11-131-2/+3
| | | | | | | | | specifically about the .space directive. This allows us to force large blocks of code to appear in test cases for things like constant islands without having to make giant test cases to force things like long branches to take effect. llvm-svn: 194555
* Change the default branch instruction to be the 16 bit variety for mips16.Reed Kotler2013-11-121-3/+5
| | | | | | | | | | | This has no material effect at this time since we don't have a direct object emitter for mips16 and the assembler can't tell them apart. I place a comment "16 bit inst" for those so that I can tell them apart in the output. The constant island pass has only been minimally changed to allow this. More complete branch work is forthcoming but this is the first step. llvm-svn: 194442
* Mostly finish up constant islands port for Mips for load constants.Reed Kotler2013-11-101-3/+20
| | | | | | | Still need to finish the branch part. Still lots more review of the code, clean up and testing. llvm-svn: 194337
* Disable some code that is causing some warnings. It's in the processReed Kotler2013-11-071-3/+2
| | | | | | | | of being converted and this path is not relevant to anything at this time so I have just disabled it for a few days while I'm at the LLVM conference and don't have time to complete it or properly fix it. llvm-svn: 194201
* Fix definition for Mips16 pc relative load word instructions.Reed Kotler2013-11-061-5/+3
| | | | llvm-svn: 194126
* Get rid of current calculation function and adjustment schemeReed Kotler2013-11-051-76/+13
| | | | | | from MipsConstantIslands. llvm-svn: 194108
* Get rid of all references to soimm in MipsConstantIslands pass becauseReed Kotler2013-11-051-12/+7
| | | | | | | | | | | we don't have such an operand. Suprisingly enough, this is never actually accounted for in the ARM version when determining offset ranges. In both places there is the comment: - // FIXME: Make use full range of soimm values. (soimm = shift operand immediate). llvm-svn: 194101
* Cleanup getUserOffset. Issues related to inline assembler length andReed Kotler2013-11-051-16/+1
| | | | | | alignment will be handled differently than in ARM constant islands. llvm-svn: 194096
* Remove the word "thumb" from comments. Remove also an incorrectReed Kotler2013-11-051-24/+6
| | | | | | command regarding the porting from the ARM version (was an old comment). llvm-svn: 194066
* Fix r194019 as requested by Eric Christopher.Reed Kotler2013-11-051-12/+1371
| | | | | | | | | | | | | | | | | | | | | Submit the basic port of the rest of ARM constant islands code to Mips. Two test cases are added which reflect the next level of functionality: constants getting moved to water areas that are out of range from the initial placement at the end of the function and basic blocks being split to create water when none exists that can be used. There is a bunch of this code that is not complete and has been marked with IN_PROGRESS. I will finish cleaning this all up during the next week or two and submit the rest of the test cases. I have elminated some code for dealing with inline assembly because to me it unecessarily complicates things and some of the newer features of llvm like function attributies and builtin assembler give me better tools to solve the alignment issues created there. Also, for Mips16 I even have the option of not doing constant islands in the present of inline assembler if I chose. When everything has been completed I will summarize the port and notify people that are knowledgable regarding the ARM Constant Islands code so they can review it in it's entirety if they wish. llvm-svn: 194053
* Revert r194019 to r194021, "Submit the basic port of the rest of ARM ↵NAKAMURA Takumi2013-11-041-1490/+11
| | | | | | | | constant islands code to Mips." It broke -Asserts build. llvm-svn: 194026
* Make sure we don't get a warning from this variable that is only usedReed Kotler2013-11-041-0/+1
| | | | | | when compiling with DEBUG. llvm-svn: 194021
* Submit the basic port of the rest of ARM constant islands code to Mips. Reed Kotler2013-11-041-11/+1489
| | | | | | | | | | | | | | | | | Two test cases are added which reflect the next level of functionality: constants getting moved to water areas that are out of range from the initial placement at the end of the function and basic blocks being split to create water when none exists that can be used. There is a bunch of this code that is not complete and has been marked with IN_PROGRESS. I will finish cleaning this all up during the next week or two and submit the rest of the test cases. I have elminated some code for dealing with inline assembly because to me it unecessarily complicates things and some of the newer features of llvm like function attributies and builtin assembler give me better tools to solve the alignment issues created there. Also, for Mips16 I even have the option of not doing constant islands in the present of inline assembler if I chose. llvm-svn: 194019
* Make first substantial checkin of my port of ARM constant islands code to Mips.Reed Kotler2013-10-271-8/+177
| | | | | | | | | | | | Before I just ported the shell of the pass. I've tried to keep everything nearly identical to the ARM version. I think it will be very easy to eventually merge these two and create a new more general pass that other targets can use. I have some improvements I would like to make to allow pools to be shared across functions and some other things. When I'm all done we can think about making a more general pass. More to be ported but the basic mechanism works now almost as good as gcc mips16. llvm-svn: 193509
* Don't cache the instruction and register info from the TargetMachine, becauseBill Wendling2013-06-071-5/+0
| | | | | | the internals of TargetMachine could change. llvm-svn: 183493
* This patch enables llvm to switch between compiling for mips32/mips64 Reed Kotler2013-04-091-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and mips16 on a per function basis. Because this patch is somewhat involved I have provide an overview of the key pieces of it. The patch is written so as to not change the behavior of the non mixed mode. We have tested this a lot but it is something new to switch subtargets so we don't want any chance of regression in the mainline compiler until we have more confidence in this. Mips32/64 are very different from Mip16 as is the case of ARM vs Thumb1. For that reason there are derived versions of the register info, frame info, instruction info and instruction selection classes. Now we register three separate passes for instruction selection. One which is used to switch subtargets (MipsModuleISelDAGToDAG.cpp) and then one for each of the current subtargets (Mips16ISelDAGToDAG.cpp and MipsSEISelDAGToDAG.cpp). When the ModuleISel pass runs, it determines if there is a need to switch subtargets and if so, the owning pointers in MipsTargetMachine are appropriately changed. When 16Isel or SEIsel is run, they will return immediately without doing any work if the current subtarget mode does not apply to them. In addition, MipsAsmPrinter needs to be reset on a function basis. The pass BasicTargetTransformInfo is substituted with a null pass since the pass is immutable and really needs to be a function pass for it to be used with changing subtargets. This will be fixed in a follow on patch. llvm-svn: 179118
* Fix cut/paste error in a comment.Reed Kotler2013-02-271-1/+1
| | | | llvm-svn: 176165
* Add the skeleton for the Mips constant island pass.Reed Kotler2013-02-271-0/+85
It will only be used for Mips 16 at this time. llvm-svn: 176161
OpenPOWER on IntegriCloud