summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/TargetTransformImpl.cpp
Commit message (Collapse)AuthorAgeFilesLines
* LoopVectorize: support vectorizing intrinsic callsPaul Redmond2012-12-091-0/+19
| | | | | | | | | - added function to VectorTargetTransformInfo to query cost of intrinsics - vectorize trivially vectorizable intrinsic calls such as sin, cos, log, etc. Reviewed by: Nadav llvm-svn: 169711
* Cost Model: change the default cost of control flow instructions (br / ret / ↵Nadav Rotem2012-12-051-1/+1
| | | | | | ...) to zero. llvm-svn: 169423
* Use the isTruncFree and isZExtFree API to figure out of these operations are ↵Nadav Rotem2012-11-111-2/+10
| | | | | | free. Thanks Andy! llvm-svn: 167685
* Refactor the getTypeLegalizationCost interface. No functionality change.Nadav Rotem2012-11-051-18/+14
| | | | llvm-svn: 167422
* Code Model: Improve the accuracy of the zext/sext/trunc vector cost estimation.Nadav Rotem2012-11-051-3/+10
| | | | llvm-svn: 167412
* Cost Model: teach the cost model about expanding integers.Nadav Rotem2012-11-051-2/+3
| | | | llvm-svn: 167401
* Implement the cost of abnormal x86 instruction lowering as a table.Nadav Rotem2012-11-051-9/+9
| | | | llvm-svn: 167395
* Scalar Bitcasts and Truncs are usually freeNadav Rotem2012-11-021-0/+5
| | | | llvm-svn: 167323
* Fix a bug in the cost calculation of vector casts. Detect situations where ↵Nadav Rotem2012-10-311-26/+41
| | | | | | bitcasts cost zero. llvm-svn: 167170
* 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