summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/LowerExpectIntrinsic.cpp
Commit message (Collapse)AuthorAgeFilesLines
* fix typo; NFCSanjay Patel2015-08-241-1/+1
| | | | llvm-svn: 245869
* Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC)Alexander Kornienko2015-06-231-1/+1
| | | | | | Apparently, the style needs to be agreed upon first. llvm-svn: 240390
* Fixed/added namespace ending comments using clang-tidy. NFCAlexander Kornienko2015-06-191-1/+1
| | | | | | | | | | | | | The patch is generated using this command: tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \ -checks=-*,llvm-namespace-comment -header-filter='llvm/.*|clang/.*' \ llvm/lib/ Thanks to Eugene Kosov for the original patch! llvm-svn: 240137
* [PM] Port LowerExpectIntrinsic to the new pass manager.Chandler Carruth2015-01-241-20/+28
| | | | | | | | | | | | This just lifts the logic into a static helper function, sinks the legacy pass to be a trivial wrapper of that helper fuction, and adds a trivial wrapper for the new PM as well. Not much to see here. I switched a test case to run in both modes, but we have to strip the dead prototypes separately as that pass isn't in the new pass manager (yet). llvm-svn: 226999
* [PM] Change LowerExpectIntrinsic to actually return true when it hasChandler Carruth2015-01-241-1/+4
| | | | | | | | changed the IR. This is particularly easy as we can just look for the existence of any expect intrinsic at all to know whether we've changed the IR. llvm-svn: 226998
* [PM] Use a more appropriate name for the statistics variable inChandler Carruth2015-01-241-3/+4
| | | | | | | lower-expect, as we don't have 'if's in the IR and we use it for switches as well. llvm-svn: 226997
* [PM] Switch tihs code to use a range based for loop over the function.Chandler Carruth2015-01-241-6/+4
| | | | | | | We can't switch the loop over the instructions because it needs to early-increment the iterator. llvm-svn: 226996
* [PM] Use a SmallVector instead of std::vector to avoid heap allocationsChandler Carruth2015-01-241-7/+6
| | | | | | | | | | | | for small switches, and avoid using a complex loop to set up the weights. We know what the baseline weights will be so we can just resize the vector to contain all that value and clobber the one slot that is likely. This seems much more direct than the previous code that tested at every iteration, and started off by zeroing the vector. llvm-svn: 226995
* [PM] Pull the two helpers for this pass into static functions. There areChandler Carruth2015-01-241-21/+16
| | | | | | | | | no members for them to use. Also, make them accept references as there is no possibility of a null pointer. llvm-svn: 226994
* [PM] Add a basic doxygen comment for this pass.Chandler Carruth2015-01-241-0/+6
| | | | llvm-svn: 226993
* [PM] Clean up the formatting of the LowerExpectIntrinsic pass prior toChandler Carruth2015-01-241-23/+17
| | | | | | refactoring its code. llvm-svn: 226992
* [PM] Move the LowerExpectIntrinsic pass to the Scalar library.Chandler Carruth2015-01-241-0/+188
It was already in the Scalar header and referenced extensively as being in this library, the source file was just in the utils directory for some reason. No actual functionality changed. I noticed as it didn't make sense to add a pass header to the utils headers. llvm-svn: 226991
OpenPOWER on IntegriCloud