summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Mark dead physregdefs dead immediately. This helps MachineSink andDan Gohman2009-10-281-0/+2
| | | | | | MachineLICM and other things which run before LiveVariables is run. llvm-svn: 85360
* Allow constants of different types to share constant pool entriesDan Gohman2009-10-281-3/+47
| | | | | | if they have compatible encodings. llvm-svn: 85359
* rename indbr -> indirectbr to appease the residents of #llvm.Chris Lattner2009-10-282-3/+3
| | | | llvm-svn: 85351
* Record CodeGen optimization level in the BranchFolding pass so that we canBob Wilson2009-10-274-15/+24
| | | | | | | | | | | | | | | | use it to control tail merging when there is a tradeoff between performance and code size. When there is only 1 instruction in the common tail, we have been merging. That can be good for code size but is a definite loss for performance. Now we will avoid tail merging in that case when the optimization level is "Aggressive", i.e., "-O3". Radar 7338114. Since the IfConversion pass invokes BranchFolding, it too needs to know the optimization level. Note that I removed the RegisterPass instantiation for IfConversion because it required a default constructor. If someone wants to keep that for some reason, we can add a default constructor with a hard-wired optimization level. llvm-svn: 85346
* Fixed a bug in the coalescer where intervals were occasionally merged ↵Lang Hames2009-10-272-2/+22
| | | | | | despite a real interference. This fixes rdar://problem/7157961. llvm-svn: 85338
* Update the MachineBasicBlock CFG for an indirect branch.Dan Gohman2009-10-271-0/+4
| | | | llvm-svn: 85325
* Add CodeGen support for indirect branches.Dan Gohman2009-10-271-2/+3
| | | | llvm-svn: 85323
* Do not held on to DenseMap slot accross map insertion. The insertion may ↵Devang Patel2009-10-272-22/+26
| | | | | | | | cause the map to grow rending the slot invalid. Use this opportunity to use ValueMap instead of DenseMap. llvm-svn: 85298
* don't use stdioChris Lattner2009-10-271-1/+1
| | | | llvm-svn: 85296
* Do away with addLegalFPImmediate. Add a target hook isFPImmLegal which ↵Evan Cheng2009-10-272-10/+2
| | | | | | returns true if the fp immediate can be natively codegened by target. llvm-svn: 85281
* add enough support for indirect branch for the feature test to passChris Lattner2009-10-272-0/+7
| | | | | | | (assembler,asmprinter, bc reader+writer) and document it. Codegen currently aborts on it. llvm-svn: 85274
* pseudosourcevalue is also still using getGlobalContext(), so it isn'tChris Lattner2009-10-272-0/+2
| | | | | | thread safe either. llvm-svn: 85253
* Add objectsize intrinsic and hook it up through codegen. Doesn'tEric Christopher2009-10-271-0/+12
| | | | | | do anything than return "I don't know" at the moment. llvm-svn: 85189
* Remove FreeInst.Victor Hernandez2009-10-262-22/+0
| | | | | | | Remove LowerAllocations pass. Update some more passes to treate free calls just like they were treating FreeInst. llvm-svn: 85176
* Allow the aggressive anti-dep breaker to process the same region multiple ↵David Goodwin2009-10-264-149/+259
| | | | | | times. This is necessary because new anti-dependencies are exposed when "current" ones are broken. llvm-svn: 85166
* Define virtual destructor in *.cpp file.David Goodwin2009-10-261-0/+3
| | | | llvm-svn: 85146
* Add aggressive anti-dependence breaker. Currently it is not the default for ↵David Goodwin2009-10-264-3/+829
| | | | | | any target. Enable with -break-anti-dependencies=all. llvm-svn: 85145
* When checking whether a def of an aliased register is dead, ask theDan Gohman2009-10-261-1/+1
| | | | | | | | | | machineinstr whether the aliased register is dead, rather than the original register is dead. This allows it to get the correct answer when examining an instruction like this: CALLpcrel32 <ga:foo>, %AL<imp-def>, %EAX<imp-def,dead> where EAX is dead but a subregister of it is still live. This fixes PR5294. llvm-svn: 85135
* Break anti-dependence breaking out into its own class.David Goodwin2009-10-264-542/+678
| | | | llvm-svn: 85127
* - Revert some changes from 85044, 85045, and 85047 that broke x86_64 tests andEvan Cheng2009-10-263-26/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | bootstrapping. It's not safe to leave identity subreg_to_reg and insert_subreg around. - Relax register scavenging to allow use of partially "not-live" registers. It's common for targets to operate on registers where the top bits are undef. e.g. s0 = d0 = insert_subreg d0<undef>, s0, 1 ... = d0 When the insert_subreg is eliminated by the coalescer, the scavenger used to complain. The previous fix was to keep to insert_subreg around. But that's brittle and it's overly conservative when we want to use the scavenger to allocate registers. It's actually legal and desirable for other instructions to use the "undef" part of d0. e.g. s0 = d0 = insert_subreg d0<undef>, s0, 1 ... s1 = = s1 = d0 We probably need add a "partial-undef" marker on machine operand so the machine verifier would not complain. llvm-svn: 85091
* Move DataTypes.h to include/llvm/System, update all users. This breaks the lastChandler Carruth2009-10-261-1/+1
| | | | | | direct inclusion edge from System to Support. llvm-svn: 85086
* Use isIdentityCopy. Fix a bozo bug (flipped condition) in InvalidateRegDef.Evan Cheng2009-10-251-5/+5
| | | | llvm-svn: 85047
* Code clean up.Evan Cheng2009-10-251-33/+33
| | | | llvm-svn: 85046
* Do not delete identity insert_subreg even if dest is virtual. Let later ↵Evan Cheng2009-10-251-20/+27
| | | | | | passes delete them. This avoids register scavenger complain. llvm-svn: 85045
* Remove includes of Support/Compiler.h that are no longer needed after theNick Lewycky2009-10-2527-27/+0
| | | | | | VISIBILITY_HIDDEN removal. llvm-svn: 85043
* Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.Nick Lewycky2009-10-2532-51/+43
| | | | | | | Chris claims we should never have visibility_hidden inside any .cpp file but that's still not true even after this commit. llvm-svn: 85042
* When the scavenger is looking for a good candidate location to restore from aJim Grosbach2009-10-251-5/+27
| | | | | | spill, it should avoid doing so inside the live range of a virtual register. llvm-svn: 85026
* Rename isLoopExit to isLoopExiting, for consistency with the wordingDan Gohman2009-10-241-2/+2
| | | | | | | | used elsewhere - an exit block is a block outside the loop branched to from within the loop. An exiting block is a block inside the loop that branches out. llvm-svn: 85019
* Add some asserts to catch copyRegToReg() fails earlyAnton Korobeynikov2009-10-241-4/+9
| | | | llvm-svn: 84983
* Identity copies should not contribute to spill weight.Evan Cheng2009-10-231-2/+5
| | | | llvm-svn: 84978
* APInt-ify the gep scaling code, so that it correctly handles the case whereDan Gohman2009-10-231-4/+5
| | | | | | the scale overflows pointer-sized arithmetic. This fixes PR5281. llvm-svn: 84954
* Neuter stack protectors by only checking character arrays. This is what GCCBill Wendling2009-10-231-1/+6
| | | | | | does. llvm-svn: 84916
* Allow the target to select the level of anti-dependence breaking that should ↵David Goodwin2009-10-221-5/+16
| | | | | | be performed by the post-RA scheduler. The default is none. llvm-svn: 84911
* Tidying up some code and comments. No functionality change.Bill Wendling2009-10-221-24/+6
| | | | llvm-svn: 84894
* Fix null pointer dereference.Anton Korobeynikov2009-10-221-1/+1
| | | | llvm-svn: 84806
* Revert the main portion of r31856. It was causing BranchFoldingDan Gohman2009-10-221-5/+5
| | | | | | | | | | | | to break up CFG diamonds by banishing one of the blocks to the end of the function, which is bad for code density and branch size. This does pessimize MultiSource/Benchmarks/Ptrdist/yacr2, the benchmark cited as the reason for the change, however I've examined the code and it looks more like a case of gaming a particular branch than of being generally applicable. llvm-svn: 84803
* The spill restore needs to be resolved to the SP/FP just like the spillJim Grosbach2009-10-211-0/+2
| | | | llvm-svn: 84792
* Cleanup of frame index scavenging. Better code flow and more accuratelyJim Grosbach2009-10-211-35/+60
| | | | | | handles T2 and ARM use cases. llvm-svn: 84761
* Need a comma after imp-use.Evan Cheng2009-10-211-1/+3
| | | | llvm-svn: 84749
* Revert r84658 and r84691. They were causing llvm-gcc bootstrap to fail.Dan Gohman2009-10-211-489/+319
| | | | llvm-svn: 84727
* Respect src register allocation requirements when breaking ↵David Goodwin2009-10-201-17/+20
| | | | | | anti-dependencies. Remove some dead code. llvm-svn: 84691
* Fix invalid for vector types fneg(bitconvert(x)) => bitconvert(x ^ sign)Anton Korobeynikov2009-10-201-4/+6
| | | | | | transform. llvm-svn: 84683
* Oops. Backing out 84681 - needs to wait for the indexing patch.Lang Hames2009-10-201-54/+35
| | | | llvm-svn: 84682
* Added some debugging output to pre-alloc splitting.Lang Hames2009-10-201-35/+54
| | | | llvm-svn: 84681
* Checkpoint more aggressive anti-dependency breaking for post-ra scheduler.David Goodwin2009-10-201-310/+477
| | | | llvm-svn: 84658
* Better handle instructions that re-def a scratch registerJim Grosbach2009-10-201-9/+18
| | | | llvm-svn: 84657
* Register re-use for scavenged frame indices must check for re-deginitionJim Grosbach2009-10-201-0/+4
| | | | | | of the register in the instruction which kills the scavenged value. llvm-svn: 84641
* Re-apply r84295, with fixes to how the loop "top" and "bottom" blocks areDan Gohman2009-10-201-182/+343
| | | | | | | | | tracked. Instead of trying to manually keep track of these locations while doing complex modifications, just recompute them when they're needed. This fixes a bug in which the TopMBB and BotMBB were not correctly updated, leading to invalid transformations. llvm-svn: 84598
* Trim unnecessary includes.Evan Cheng2009-10-202-2/+0
| | | | llvm-svn: 84597
* Add getTopBlock and getBottomBlock member functions to MachineLoopInfo.Dan Gohman2009-10-201-0/+28
| | | | llvm-svn: 84596
OpenPOWER on IntegriCloud