|
Revision tags: llvmorg-3.7.1, llvmorg-3.7.1-rc2, llvmorg-3.7.1-rc1, llvmorg-3.7.0, llvmorg-3.7.0-rc4, llvmorg-3.7.0-rc3 |
|
| #
fa9746dc |
| 10-Aug-2015 |
JF Bastien <[email protected]> |
x86: Emit LAHF/SAHF instead of PUSHF/POPF
NaCl's sandbox doesn't allow PUSHF/POPF out of security concerns (priviledged emulators have forgotten to mask system bits in the past, and EFLAGS's DF bit
x86: Emit LAHF/SAHF instead of PUSHF/POPF
NaCl's sandbox doesn't allow PUSHF/POPF out of security concerns (priviledged emulators have forgotten to mask system bits in the past, and EFLAGS's DF bit is a constant source of hilarity). Commit r220529 fixed PR20376 by saving cmpxchg's flags result using EFLAGS, this commit now generated LAHF/SAHF instead, for all of x86 (not just NaCl) because it leads to an overall performance gain over PUSHF/POPF.
As with the previous patch this code generation is pretty bad because it occurs very later, after register allocation, and in many cases it rematerializes flags which were already available (e.g. already in a register through SETE). Fortunately it's somewhat rare that this code needs to fire.
I did [[ https://github.com/jfbastien/benchmark-x86-flags | a bit of benchmarking ]], the results on an Intel Haswell E5-2690 CPU at 2.9GHz are:
| Time per call (ms) | Runtime (ms) | Benchmark | | 0.000012514 | 6257 | sete.i386 | | 0.000012810 | 6405 | sete.i386-fast | | 0.000010456 | 5228 | sete.x86-64 | | 0.000010496 | 5248 | sete.x86-64-fast | | 0.000012906 | 6453 | lahf-sahf.i386 | | 0.000013236 | 6618 | lahf-sahf.i386-fast | | 0.000010580 | 5290 | lahf-sahf.x86-64 | | 0.000010304 | 5152 | lahf-sahf.x86-64-fast | | 0.000028056 | 14028 | pushf-popf.i386 | | 0.000027160 | 13580 | pushf-popf.i386-fast | | 0.000023810 | 11905 | pushf-popf.x86-64 | | 0.000026468 | 13234 | pushf-popf.x86-64-fast |
Clearly `PUSHF`/`POPF` are suboptimal. It doesn't really seems to be worth teaching LLVM about individual flags, at least not for this purpose.
Reviewers: rnk, jvoung, t.p.northover
Subscribers: llvm-commits
Differential revision: http://reviews.llvm.org/D6629
llvm-svn: 244503
show more ...
|
| #
7c4218f4 |
| 05-Aug-2015 |
JF Bastien <[email protected]> |
Revert "Fix MO's analyzePhysReg, it was confusing sub- and super-registers. Problem pointed out by Michael Hordijk."
I mistakenly committed the patch for D6629, and was trying to commit another. Rev
Revert "Fix MO's analyzePhysReg, it was confusing sub- and super-registers. Problem pointed out by Michael Hordijk."
I mistakenly committed the patch for D6629, and was trying to commit another. Reverting until it gets proper signoff.
llvm-svn: 244121
show more ...
|
| #
ce5256f5 |
| 05-Aug-2015 |
JF Bastien <[email protected]> |
Fix MO's analyzePhysReg, it was confusing sub- and super-registers. Problem pointed out by Michael Hordijk.
llvm-svn: 244120
|
|
Revision tags: llvmorg-3.7.0-rc2, llvmorg-3.7.0-rc1, llvmorg-3.6.2, llvmorg-3.6.2-rc1 |
|
| #
4a61619f |
| 08-Jun-2015 |
Akira Hatanaka <[email protected]> |
[ARM] Pass a callback to FunctionPass constructors to enable skipping execution on a per-function basis.
Previously some of the passes were conditionally added to ARM's pass pipeline based on the ta
[ARM] Pass a callback to FunctionPass constructors to enable skipping execution on a per-function basis.
Previously some of the passes were conditionally added to ARM's pass pipeline based on the target machine's subtarget. This patch makes changes to add those passes unconditionally and execute them conditonally based on the predicate functor passed to the pass constructors. This enables running different sets of passes for different functions in the module.
rdar://problem/20542263
Differential Revision: http://reviews.llvm.org/D8717
llvm-svn: 239325
show more ...
|
|
Revision tags: llvmorg-3.6.1, llvmorg-3.6.1-rc1, llvmorg-3.5.2, llvmorg-3.5.2-rc1, llvmorg-3.6.0, llvmorg-3.6.0-rc4, llvmorg-3.6.0-rc3, llvmorg-3.6.0-rc2, llvmorg-3.6.0-rc1, llvmorg-3.5.1, llvmorg-3.5.1-rc2, llvmorg-3.5.1-rc1 |
|
| #
70573dcd |
| 19-Nov-2014 |
David Blaikie <[email protected]> |
Update SetVector to rely on the underlying set's insert to return a pair<iterator, bool>
This is to be consistent with StringSet and ultimately with the standard library's associative container inse
Update SetVector to rely on the underlying set's insert to return a pair<iterator, bool>
This is to be consistent with StringSet and ultimately with the standard library's associative container insert function.
This lead to updating SmallSet::insert to return pair<iterator, bool>, and then to update SmallPtrSet::insert to return pair<iterator, bool>, and then to update all the existing users of those functions...
llvm-svn: 222334
show more ...
|
| #
20c98938 |
| 14-Oct-2014 |
Eric Christopher <[email protected]> |
Have MachineInstrBundle use the MachineFunction for subtarget access rather than the TargetMachine.
llvm-svn: 219662
|
|
Revision tags: llvmorg-3.5.0, llvmorg-3.5.0-rc4, llvmorg-3.5.0-rc3, llvmorg-3.5.0-rc2 |
|
| #
d913448b |
| 04-Aug-2014 |
Eric Christopher <[email protected]> |
Remove the TargetMachine forwards for TargetSubtargetInfo based information and update all callers. No functional change.
llvm-svn: 214781
|
|
Revision tags: llvmorg-3.5.0-rc1, llvmorg-3.4.2, llvmorg-3.4.2-rc1, llvmorg-3.4.1, llvmorg-3.4.1-rc2, llvmorg-3.4.1-rc1 |
|
| #
4584cd54 |
| 07-Mar-2014 |
Craig Topper <[email protected]> |
[C++11] Add 'override' keyword to virtual methods that override their base class.
llvm-svn: 203220
|
| #
b6d0bd48 |
| 02-Mar-2014 |
Benjamin Kramer <[email protected]> |
[C++11] Replace llvm::next and llvm::prior with std::next and std::prev.
Remove the old functions.
llvm-svn: 202636
|
|
Revision tags: llvmorg-3.4.0, llvmorg-3.4.0-rc3, llvmorg-3.4.0-rc2, llvmorg-3.4.0-rc1, llvmorg-3.3.1-rc1, llvmorg-3.3.0, llvmorg-3.3.0-rc3, llvmorg-3.3.0-rc2, llvmorg-3.3.0-rc1 |
|
| #
7f92b7ad |
| 04-Jan-2013 |
Jakob Stoklund Olesen <[email protected]> |
Move an assertion so it doesn't dereference end().
The R600 target has test cases that exercises this code.
llvm-svn: 171538
|
|
Revision tags: llvmorg-3.2.0 |
|
| #
7bb2f97a |
| 13-Dec-2012 |
Jakob Stoklund Olesen <[email protected]> |
Use the new MI bundling API in MachineInstrBundle itself.
The new API is higher level than just manipulating the bundle flags directly, and the setIsInsideBundle() function will disappear soon.
llv
Use the new MI bundling API in MachineInstrBundle itself.
The new API is higher level than just manipulating the bundle flags directly, and the setIsInsideBundle() function will disappear soon.
llvm-svn: 170159
show more ...
|
|
Revision tags: llvmorg-3.2.0-rc3 |
|
| #
ed0881b2 |
| 03-Dec-2012 |
Chandler Carruth <[email protected]> |
Use the new script to sort the includes of every file under lib.
Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module
Use the new script to sort the includes of every file under lib.
Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented.
Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =]
llvm-svn: 169131
show more ...
|
|
Revision tags: llvmorg-3.2.0-rc2 |
|
| #
dd219d06 |
| 20-Nov-2012 |
Tim Northover <[email protected]> |
Fix physical register liveness calculations:
+ Take account of clobbers + Give outputs priority over inputs since they happen later.
llvm-svn: 168360
|
|
Revision tags: llvmorg-3.2.0-rc1 |
|
| #
4f0e00a5 |
| 17-Sep-2012 |
Michael Ilseman <[email protected]> |
Increase the static sizes of some SmallSets. finalizeBundle() is very frequently called for some backends, and growing into an std::set is overkill for these numbers.
llvm-svn: 164044
|
| #
3a833637 |
| 17-Sep-2012 |
Michael Ilseman <[email protected]> |
whitespace
llvm-svn: 164043
|
| #
381fab93 |
| 12-Sep-2012 |
James Molloy <[email protected]> |
Add an analyzePhysReg() function to MachineOperandIteratorBase that analyses an instruction's use of a physical register, analogous to analyzeVirtReg.
Rename RegInfo to VirtRegInfo so as not to be c
Add an analyzePhysReg() function to MachineOperandIteratorBase that analyses an instruction's use of a physical register, analogous to analyzeVirtReg.
Rename RegInfo to VirtRegInfo so as not to be confused with the new PhysRegInfo.
llvm-svn: 163694
show more ...
|
| #
54038d79 |
| 01-Jun-2012 |
Jakob Stoklund Olesen <[email protected]> |
Switch all register list clients to the new MC*Iterator interface.
No functional change intended.
Sorry for the churn. The iterator classes are supposed to help avoid giant commits like this one in
Switch all register list clients to the new MC*Iterator interface.
No functional change intended.
Sorry for the churn. The iterator classes are supposed to help avoid giant commits like this one in the future. The TableGen-produced register lists are getting quite large, and it may be necessary to change the table representation.
This makes it possible to do so without changing all clients (again).
llvm-svn: 157854
show more ...
|
|
Revision tags: llvmorg-3.1.0, llvmorg-3.1.0-rc3, llvmorg-3.1.0-rc2, llvmorg-3.1.0-rc1 |
|
| #
217a704a |
| 06-Mar-2012 |
Evan Cheng <[email protected]> |
Avoid finalizeBundles infinite looping.
llvm-svn: 152089
|
| #
4b02a29e |
| 05-Mar-2012 |
Craig Topper <[email protected]> |
Convert more GenRegisterInfo tables from unsigned to uint16_t to reduce static data size.
llvm-svn: 152016
|
| #
9e821456 |
| 29-Feb-2012 |
Jakob Stoklund Olesen <[email protected]> |
Add an analyzeVirtReg() function.
This function does more or less the same as MI::readsWritesVirtualRegister(), but it supports bundles as well.
It also determines if any constraint requires readin
Add an analyzeVirtReg() function.
This function does more or less the same as MI::readsWritesVirtualRegister(), but it supports bundles as well.
It also determines if any constraint requires reading and writing operands to use the same register. Most clients want to know.
Use the more modern MO.readsReg() instead of trying to sort out undefs and partial redefines. Stop supporting the extra full <imp-def> operand as an alternative to <def,undef> sub-register defines.
llvm-svn: 151690
show more ...
|
| #
1fa5bcbe |
| 08-Feb-2012 |
Andrew Trick <[email protected]> |
Codegen pass definition cleanup. No functionality.
Moving toward a uniform style of pass definition to allow easier target configuration. Globally declare Pass ID. Globally declare pass initializer.
Codegen pass definition cleanup. No functionality.
Moving toward a uniform style of pass definition to allow easier target configuration. Globally declare Pass ID. Globally declare pass initializer. Use INITIALIZE_PASS consistently. Add a call to the initializer from CodeGen.cpp. Remove redundant "createPass" functions and "getPassName" methods.
While cleaning up declarations, cleaned up comments (sorry for large diff).
llvm-svn: 150100
show more ...
|
| #
c2679b29 |
| 19-Jan-2012 |
Evan Cheng <[email protected]> |
More bundle related API additions.
llvm-svn: 148465
|
| #
6ca22721 |
| 19-Jan-2012 |
Evan Cheng <[email protected]> |
Enhance finalizeBundle to return end of bundle iterator because it makes sense.
llvm-svn: 148462
|
| #
2879467d |
| 19-Jan-2012 |
Evan Cheng <[email protected]> |
- Slight change to finalizeBundle() interface. LastMI is not exclusive (pointing to instruction right after the last instruction in the bundle. - Add a finalizeBundle() variant that doesn't specify
- Slight change to finalizeBundle() interface. LastMI is not exclusive (pointing to instruction right after the last instruction in the bundle. - Add a finalizeBundle() variant that doesn't specify LastMI. Instead, the code will find the last instruction in the bundle by following the 'InsideBundle' marker. This is useful in case bundles are formed early (i.e. during MI scheduling) but finalized later (i.e. after register allocator has finished rewriting virtual registers with physical registers).
llvm-svn: 148444
show more ...
|
| #
1eb2bb22 |
| 19-Jan-2012 |
Evan Cheng <[email protected]> |
Rename Finalizebundle to finalizeBundle to conform to coding guideline.
llvm-svn: 148440
|