David Goodwin
8954ccb109
Remove some old experimental code that is no longer needed. Remove additional, speculative scheduling pass as its cost did not translate into significant performance improvement. Minor tweaks.
...
llvm-svn: 89471
2009-11-20 19:32:48 +00:00
David Goodwin
e1d06f2239
Allow target to specify regclass for which antideps will only be broken along the critical path.
...
llvm-svn: 88682
2009-11-13 19:52:48 +00:00
David Goodwin
805a319014
Rename registers to break output dependencies in addition to anti-dependencies.
...
llvm-svn: 87015
2009-11-12 19:08:21 +00:00
David Goodwin
93a4f29c67
Fixed to address code review. No functional changes.
...
llvm-svn: 86634
2009-11-10 00:48:55 +00:00
David Goodwin
538f9c25f8
Allow targets to specify register classes whose member registers should not be renamed to break anti-dependencies.
...
llvm-svn: 86628
2009-11-10 00:15:47 +00:00
David Goodwin
5ddf009b51
Break anti-dependencies using free registers in a round-robin manner to avoid introducing new anti-dependencies.
...
llvm-svn: 86098
2009-11-05 01:19:35 +00:00
David Goodwin
629a685f05
Do a scheduling pass ignoring anti-dependencies to identify candidate registers that should be renamed.
...
llvm-svn: 85939
2009-11-03 20:57:50 +00:00
Dan Gohman
a66239e39f
Make -print-machineinstrs more readable.
...
- Be consistent when referring to MachineBasicBlocks: BB#0.
- Be consistent when referring to virtual registers: %reg1024.
- Be consistent when referring to unknown physical registers: %physreg10.
- Be consistent when referring to known physical registers: %RAX
- Be consistent when referring to register 0: %reg0
- Be consistent when printing alignments: align=16
- Print jump table contents.
- Don't print host addresses, in general.
- and various other cleanups.
llvm-svn: 85682
2009-10-31 20:19:03 +00:00
David Goodwin
ae4f8e01b0
Make AntiDepReg.h internal.
...
llvm-svn: 85412
2009-10-28 18:29:54 +00:00
David Goodwin
0b5b62bfcf
Allow the aggressive anti-dep breaker to process the same region multiple times. This is necessary because new anti-dependencies are exposed when "current" ones are broken.
...
llvm-svn: 85166
2009-10-26 22:31:16 +00:00
David Goodwin
35fab8a585
Define virtual destructor in *.cpp file.
...
llvm-svn: 85146
2009-10-26 19:41:00 +00:00
David Goodwin
62dc7a4d93
Add aggressive anti-dependence breaker. Currently it is not the default for any target. Enable with -break-anti-dependencies=all.
...
llvm-svn: 85145
2009-10-26 19:32:42 +00:00
David Goodwin
f6199e95b0
Break anti-dependence breaking out into its own class.
...
llvm-svn: 85127
2009-10-26 16:59:04 +00:00
Nick Lewycky
2b8400628d
Remove includes of Support/Compiler.h that are no longer needed after the
...
VISIBILITY_HIDDEN removal.
llvm-svn: 85043
2009-10-25 06:57:41 +00:00
Nick Lewycky
711c726c97
Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.
...
Chris claims we should never have visibility_hidden inside any .cpp file but
that's still not true even after this commit.
llvm-svn: 85042
2009-10-25 06:33:48 +00:00
David Goodwin
82c1dd9754
Allow the target to select the level of anti-dependence breaking that should be performed by the post-RA scheduler. The default is none.
...
llvm-svn: 84911
2009-10-22 23:19:17 +00:00
Dan Gohman
c74da745a7
Revert r84658 and r84691. They were causing llvm-gcc bootstrap to fail.
...
llvm-svn: 84727
2009-10-21 01:44:44 +00:00
David Goodwin
90fcfc5f88
Respect src register allocation requirements when breaking anti-dependencies. Remove some dead code.
...
llvm-svn: 84691
2009-10-20 22:50:43 +00:00
David Goodwin
048b80a70a
Checkpoint more aggressive anti-dependency breaking for post-ra scheduler.
...
llvm-svn: 84658
2009-10-20 19:54:44 +00:00
Evan Cheng
e1fbdc5244
Change createPostRAScheduler so it can be turned off at llc -O1.
...
llvm-svn: 84273
2009-10-16 21:06:15 +00:00
Evan Cheng
dde3e4fe11
If post-alloc scheduler is not enabled, it should return false, not true.
...
llvm-svn: 84248
2009-10-16 06:10:34 +00:00
David Goodwin
d23db026b6
Add debugging output.
...
llvm-svn: 84011
2009-10-13 19:16:03 +00:00
Dan Gohman
b98d95f4f9
Fix a missing initialization of PostRAScheduler's AA member.
...
llvm-svn: 83695
2009-10-10 00:15:38 +00:00
Dan Gohman
5bfc2416fe
Factor out LiveIntervalAnalysis' code to determine whether an instruction
...
is trivially rematerializable and integrate it into
TargetInstrInfo::isTriviallyReMaterializable. This way, all places that
need to know whether an instruction is rematerializable will get the
same answer.
This enables the useful parts of the aggressive-remat option by
default -- using AliasAnalysis to determine whether a memory location
is invariant, and removes the questionable parts -- rematting operations
with virtual register inputs that may not be live everywhere.
llvm-svn: 83687
2009-10-09 23:27:56 +00:00
Benjamin Kramer
aa33886dd7
Fix a use-after-free in post-ra-scheduling.
...
MI->addOperand invalidates references to it's operands, avoid touching
the operand after a new one was added.
llvm-svn: 83249
2009-10-02 15:59:52 +00:00
David Goodwin
cb4a66977c
All callee-saved registers are live-out of a return block.
...
llvm-svn: 83223
2009-10-01 23:28:47 +00:00
David Goodwin
a4b73e486e
Remove neonfp attribute and instead set default based on CPU string. Add -arm-use-neon-fp to override the default.
...
llvm-svn: 83218
2009-10-01 22:19:57 +00:00
David Goodwin
d0edce4c0d
Restore the -post-RA-scheduler flag as an override for the target specification. Remove -mattr for setting PostRAScheduler enable and instead use CPU string.
...
llvm-svn: 83215
2009-10-01 21:46:35 +00:00
David Goodwin
0a7770b3e0
Use MachineFrameInfo.getPristineRegs() to determine which callee-saved registers are available for anti-dependency breaking. Some cleanup.
...
llvm-svn: 83208
2009-10-01 19:45:32 +00:00
Evan Cheng
68d79a17a0
Observe hasExtraSrcRegAllocReq and hasExtraDefRegAllocReq. Do not change
...
operands of instructions with these properties while breaking anti-dep.
llvm-svn: 83198
2009-10-01 08:26:23 +00:00
Reid Kleckner
ffe2b97d7a
Fix integer overflow in instruction scheduling. This can happen if we have
...
basic blocks that are so long that their size overflows a short.
Also assert that overflow does not happen in the future, as requested by Evan.
This fixes PR4401.
llvm-svn: 83159
2009-09-30 20:15:38 +00:00
David Goodwin
a282690f82
Remove -post-RA-schedule flag and add a TargetSubtarget method to enable post-register-allocation scheduling. By default it is off. For ARM, enable/disable with -mattr=+/-postrasched. Enable by default for cortex-a8.
...
llvm-svn: 83122
2009-09-30 00:10:16 +00:00
Jakob Stoklund Olesen
5be0f6cfb4
Use KILL instead of IMPLICIT_DEF in LowerSubregs pass.
...
llvm-svn: 83007
2009-09-28 20:32:46 +00:00
David Goodwin
7484864fc3
Fix bug in kill flag updating for post-register-allocation scheduling. When the kill flag of a superreg needs to be cleared because there are one or more subregs live, we instead add implicit-defs of those subregs and leave the kill flag on the superreg. This allows us to end the live-range of the superreg without ending the live-ranges of the subregs.
...
llvm-svn: 82629
2009-09-23 16:35:25 +00:00
Evan Cheng
7cb9c456e5
Enhance EmitInstrWithCustomInserter() so target can specify CFG changes that sdisel will use to properly complete phi nodes.
...
Not functionality change yet.
llvm-svn: 82273
2009-09-18 21:02:19 +00:00
Benjamin Kramer
7155f79983
It's a bool, so treat it like one. Fixes a MSVC warning.
...
llvm-svn: 81112
2009-09-06 12:10:17 +00:00
David Goodwin
79c36e5abd
Create our own block initializer for kill fixups as the scheduling one wasn't doing the right thing.
...
llvm-svn: 80958
2009-09-03 22:15:25 +00:00
David Goodwin
1b286bc320
Add hidden flags to allow binary search of post-RA scheduling errors.
...
llvm-svn: 80702
2009-09-01 18:34:03 +00:00
David Goodwin
0fc3764297
Don't mark a register live at an undef use.
...
llvm-svn: 80621
2009-08-31 20:47:02 +00:00
David Goodwin
db0cb257be
Another stab at fixing up register kill flags after post-RA scheduling.
...
llvm-svn: 80410
2009-08-29 00:11:13 +00:00
David Goodwin
047f69da86
Fixup register kills after scheduling.
...
llvm-svn: 80002
2009-08-25 17:03:05 +00:00
Chris Lattner
f536c93134
convert LoopInfo.h and GraphWriter.h to use raw_ostream
...
llvm-svn: 79836
2009-08-23 07:19:13 +00:00
David Goodwin
875c5b92a2
Fix counting of Post-RA scheduling stalls. Improve debug output.
...
llvm-svn: 78843
2009-08-12 21:47:46 +00:00
Dan Gohman
f6fa20e433
This logic was accidentally inverted in r78767.
...
llvm-svn: 78773
2009-08-12 01:44:20 +00:00
Dan Gohman
631bee4f61
Factor out the code for finding an available register for use
...
in breaking an anti-dependence into a separate function.
llvm-svn: 78767
2009-08-12 01:33:27 +00:00
David Goodwin
539e2b4d86
Use DEBUG macro for debug output.
...
llvm-svn: 78694
2009-08-11 17:56:42 +00:00
David Goodwin
2930c2c870
Add some debug output.
...
llvm-svn: 78687
2009-08-11 17:35:23 +00:00
David Goodwin
922f4878cd
Replace DOUT.
...
llvm-svn: 78634
2009-08-11 01:44:26 +00:00
David Goodwin
3245141543
Post RA scheduler changes. Introduce a hazard recognizer that uses the target schedule information to accurately model the pipeline. Update the scheduler to correctly handle multi-issue targets.
...
llvm-svn: 78563
2009-08-10 15:55:25 +00:00
Dan Gohman
4529d71681
Use setPreservesAll and setPreservesCFG in CodeGen passes.
...
llvm-svn: 77754
2009-07-31 23:37:33 +00:00