summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86CallFrameOptimization.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* MachineInstr: Change return value of getOpcode() to unsigned.Matthias Braun2015-05-181-4/+4
| | | | | | | | | This was previously returning int. However there are no negative opcode numbers and more importantly this was needlessly different from MCInstrDesc::getOpcode() (which even is the value returned here) and SDValue::getOpcode()/SDNode::getOpcode(). llvm-svn: 237611
* Use the cached subtarget from the MachineFunction rather thanEric Christopher2015-02-201-2/+2
| | | | | | doing a lookup on the TargetMachine. llvm-svn: 229995
* X86: Canonicalize access to function attributes, NFCDuncan P. N. Exon Smith2015-02-141-4/+2
| | | | | | | | | | | | Canonicalize access to function attributes to use the simpler API. getAttributes().getAttribute(AttributeSet::FunctionIndex, Kind) => getFnAttribute(Kind) getAttributes().hasAttribute(AttributeSet::FunctionIndex, Kind) => hasFnAttribute(Kind) llvm-svn: 229214
* [X86] Call frame optimization - allow stack-relative movs to be folded into ↵Michael Kuperstein2015-02-121-6/+0
| | | | | | | | a push Since we track esp precisely, there's no reason not to allow this. llvm-svn: 228924
* [X86] A heuristic to estimate the size impact for converting stack-relative ↵Michael Kuperstein2015-02-121-25/+71
| | | | | | | | | | | | | parameter movs to pushes This gives a rough estimate of whether using pushes instead of movs is profitable, in terms of size. We go over all calls in the MachineFunction and compute: a) For each callsite that can not use pushes, the penalty of not having a reserved call frame. b) For each callsite that can use pushes, the gain of actually replacing the movs with pushes (and the potential penalty of having to readjust the stack). Differential Revision: http://reviews.llvm.org/D7561 llvm-svn: 228915
* [X86] Split information collection from actual transformation in call frame ↵Michael Kuperstein2015-02-111-59/+100
| | | | | | | | | | | optimization This splits collecting information from actually performing the transformation, so that we can add a heuristic in between the two. NFC. Differential Revision: http://reviews.llvm.org/D7497 llvm-svn: 228817
* Make helper functions/classes/globals static. NFC.Benjamin Kramer2015-02-061-3/+4
| | | | llvm-svn: 228410
* [X86] Convert esp-relative movs of function arguments to pushes, step 2Michael Kuperstein2015-02-011-0/+400
| | | | | | | | | | | | | | This moves the transformation introduced in r223757 into a separate MI pass. This allows it to cover many more cases (not only cases where there must be a reserved call frame), and perform rudimentary call folding. It still doesn't have a heuristic, so it is enabled only for optsize/minsize, with stack alignment <= 8, where it ought to be a fairly clear win. (Re-commit of r227728) Differential Revision: http://reviews.llvm.org/D6789 llvm-svn: 227752
* Revert r227728 due to bad line endings.Michael Kuperstein2015-02-011-400/+0
| | | | llvm-svn: 227746
* [X86] Convert esp-relative movs of function arguments to pushes, step 2Michael Kuperstein2015-02-011-0/+400
This moves the transformation introduced in r223757 into a separate MI pass. This allows it to cover many more cases (not only cases where there must be a reserved call frame), and perform rudimentary call folding. It still doesn't have a heuristic, so it is enabled only for optsize/minsize, with stack alignment <= 8, where it ought to be a fairly clear win. Differential Revision: http://reviews.llvm.org/D6789 llvm-svn: 227728
OpenPOWER on IntegriCloud