summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/TargetTransformImpl.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Use TargetTransformInfo to control switch-to-lookup table transformationHans Wennborg2012-10-301-1/+6
| | | | | | | | | | | | | | When the switch-to-lookup tables transform landed in SimplifyCFG, it was pointed out that this could be inappropriate for some targets. Since there was no way at the time for the pass to know anything about the target, an awkward reverse-transform was added in CodeGenPrepare that turned lookup tables back into switches for some targets. This patch uses the new TargetTransformInfo to determine if a switch should be transformed, and removes CodeGenPrepare::ConvertLoadToSwitch. llvm-svn: 167011
* Remove an invalid assert in TargetTransformImplHal Finkel2012-10-301-4/+13
| | | | | | | getCastInstrCost had an assert prohibiting scalar to vector casts. Such casts, however, are allowed. This should make the vectorizer buildbot happier. llvm-svn: 166998
* Minor style fixes for TargetTransformationInfo and TargetTransformImplHans Wennborg2012-10-291-3/+3
| | | | llvm-svn: 166936
* Calling TLI->getNumRegisters creates a circular dependency when building ↵Nadav Rotem2012-10-291-2/+4
| | | | | | | | | | LLVM using cmake. Get the number of registers by calling getTypeLegalizationCost. PR14199. llvm-svn: 166911
* Refactor the VectorTargetTransformInfo interface.Nadav Rotem2012-10-261-27/+125
| | | | | | | | | | Add getCostXXX calls for different families of opcodes, such as casts, arithmetic, cmp, etc. Port the LoopVectorizer to the new API. The LoopVectorizer now finds instructions which will remain uniform after vectorization. It uses this information when calculating the cost of these instructions. llvm-svn: 166836
* Better handling of OpcodeToISD using enum/switch.Renato Golin2012-10-261-67/+68
| | | | | | Patch by Pasi Parviainen <pasi.parviainen@iki.fi> llvm-svn: 166773
* Add VectorTargetTransform::getNumberOfParts.Hal Finkel2012-10-261-0/+8
| | | | | | | As discussed on IRC, add VectorTargetTransform::getNumberOfParts to provide a stable interface to the vector legalization splitting factor. llvm-svn: 166751
* Minor cleanups.Nadav Rotem2012-10-251-7/+7
| | | | llvm-svn: 166706
* Implement a basic cost model for vector and scalar instructions. Nadav Rotem2012-10-241-2/+127
| | | | llvm-svn: 166642
* Implement a basic VectorTargetTransformInfo interface to be used by the loop ↵Nadav Rotem2012-10-241-0/+30
| | | | | | and bb vectorizers for modeling the cost of instructions. llvm-svn: 166593
* Reapply the TargerTransformInfo changes, minus the changes to LSR and ↵Nadav Rotem2012-10-181-0/+43
| | | | | | Lowerinvoke. llvm-svn: 166248
* Temporarily revert the TargetTransform changes.Bob Wilson2012-10-181-43/+0
| | | | | | | | | | | The TargetTransform changes are breaking LTO bootstraps of clang. I am working with Nadav to figure out the problem, but I am reverting it for now to get our buildbots working. This reverts svn commits: 165665 165669 165670 165786 165787 165997 and I have also reverted clang svn 165741 llvm-svn: 166168
* Add a new interface to allow IR-level passes to access codegen-specific ↵Nadav Rotem2012-10-101-0/+43
information. llvm-svn: 165665
OpenPOWER on IntegriCloud