1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 20:12:56 +02:00
Commit Graph

4294 Commits

Author SHA1 Message Date
Matthias Braun
c8c6a4ff0d remove unused argument from LiveRanges::join()
llvm-svn: 190169
2013-09-06 16:44:29 +00:00
Matthias Braun
15fb34e896 fix typo in comment
llvm-svn: 190165
2013-09-06 16:19:22 +00:00
Andrew Trick
c785e832b3 mi-sched: Suppress register pressure tracking when the scheduling window is too small.
If the instruction window is < NumRegs/2, pressure tracking is not
likely to be effective. The scheduler has to process a very large
number of tiny blocks. We want this to be fast.

llvm-svn: 189991
2013-09-04 21:00:11 +00:00
Andrew Trick
6c4257f01b mi-sched: bypass heuristic checks when regpressure tracking is disabled.
llvm-svn: 189988
2013-09-04 21:00:02 +00:00
Andrew Trick
cf575d4815 Added -misched-regpressure option.
Register pressure tracking is half the complexity of the
scheduler. It's useful to be able to turn it off for compile time and
performance comparisons.

llvm-svn: 189987
2013-09-04 20:59:59 +00:00
Matt Arsenault
88b7b3058d Fix grammar
llvm-svn: 189855
2013-09-03 21:05:51 +00:00
Benjamin Kramer
4921fdebc8 Free PressureDiffs instead of leaking.
Found by valgrind.

llvm-svn: 189725
2013-08-31 20:10:01 +00:00
Andrew Trick
0d5cff0ac7 Use LiveRangeQuery for instruction-level liveness queries.
Remove redundant or bug-prone LiveInterval APIs.

llvm-svn: 189685
2013-08-30 17:58:49 +00:00
Andrew Trick
eeff73274d mi-sched: update PressureDiffs on-the-fly for liveness.
This removes all expensive pressure tracking logic from the scheduling
critical path of node comparison.

llvm-svn: 189643
2013-08-30 04:36:57 +00:00
Andrew Trick
b4ac7bbefa Replace LiveInterval::killedAt with isKilledAtInstr.
Return true for LRGs that end at EarlyClobber or Register slots.

llvm-svn: 189642
2013-08-30 04:31:01 +00:00
Andrew Trick
447dd8fc9e mi-sched: improve the generic register pressure comparison.
Only compare pressure within the same set. When multiple sets are
affected, we prioritize the most constrained set.

llvm-svn: 189641
2013-08-30 04:27:29 +00:00
Andrew Trick
3c849ec211 mi-sched: Precompute a PressureDiff for each instruction, adjust for liveness later.
Created SUPressureDiffs array to hold the per node PDiff computed during DAG building.

Added a getUpwardPressureDelta API that will soon replace the old
one. Compute PressureDelta here from the precomputed PressureDiffs.

Updating for liveness will come next.

llvm-svn: 189640
2013-08-30 03:49:48 +00:00
Andrew Trick
4c02a97896 Comment and revise the cyclic critical path code.
This should be much more clear now. It's still disabled pending testing.

llvm-svn: 189597
2013-08-29 18:04:49 +00:00
Andrew Trick
7e77ff64a2 Add a convenient PSetIterator for visiting pressure sets affected by a register.
llvm-svn: 189121
2013-08-23 17:48:46 +00:00
Andrew Trick
d56a8b8df8 Adds cyclic critical path computation and heuristics, temporarily disabled.
Estimate the cyclic critical path within a single block loop. If the
acyclic critical path is longer, then the loop will exhaust OOO
resources after some number of iterations. If lag between the acyclic
critical path and cyclic critical path is longer the the time it takes
to issue those loop iterations, then aggressively schedule for
latency.

llvm-svn: 189120
2013-08-23 17:48:43 +00:00
Andrew Trick
79efb910b7 MI Sched: record local vreg uses.
This will be used to compute the cyclic critical path and to
update precomputed per-node pressure differences.
In the longer term, it could also be used to speed up LiveInterval
update by avoiding visiting all global vreg users.

llvm-svn: 189118
2013-08-23 17:48:39 +00:00
Andrew Trick
a44f3105fa Remove unused field.
llvm-svn: 189117
2013-08-23 17:48:36 +00:00
Andrew Trick
2656adf87e mi-sched: Don't call MBB.size() in initSUnits. The driver already has instr count.
This fixes a pathological compile time problem with very large blocks
and lots of scheduling boundaries.

llvm-svn: 189116
2013-08-23 17:48:33 +00:00
Michael Gottesman
d2ede9d0a0 [stackprotector] Refactor out the end of isInTailCallPosition into the function returnTypeIsEligibleForTailCall.
This allows me to use returnTypeIsEligibleForTailCall in the stack protector pass.

rdar://13935163

llvm-svn: 188765
2013-08-20 08:36:50 +00:00
Daniel Dunbar
657fb30f68 [typo] An LLVM.
llvm-svn: 188589
2013-08-16 23:30:19 +00:00
Bill Wendling
4aae224206 Make a few more things const.
llvm-svn: 188484
2013-08-15 20:25:44 +00:00
Joey Gouly
fda6af9c71 Drive-by fix for a doxygen comment in MachineInstr.h.
llvm-svn: 188467
2013-08-15 16:02:44 +00:00
Mark Lacey
681f92310a Auto-compute live intervals on demand.
When new virtual registers are created during splitting/spilling, defer
creation of the live interval until we need to use the live interval.

Along with the recent commits to notify LiveRangeEdit when new virtual
registers are created, this makes it possible for functions like
TargetInstrInfo::loadRegFromStackSlot() and
TargetInstrInfo::storeRegToStackSlot() to create multiple virtual
registers as part of the process of generating loads/stores for
different register classes, and then have the live intervals for those
new registers computed when they are needed.

llvm-svn: 188437
2013-08-14 23:50:16 +00:00
Mark Lacey
85f8607a10 Add the MachineInstrSpan class.
MachineInstrSpan is initialized with a MachineBasicBlock::iterator,
and is intended to track which instructions are inserted before/after
that instruction from the time the MachineInstrSpan is created.

It provides a begin()/end() interface to walk the range of
instructions inserted around the initial instruction (including that
initial instruction).

It also provides a getInitial() interface to return the initial
iterator.

llvm-svn: 188436
2013-08-14 23:50:11 +00:00
Mark Lacey
97c418e9a9 Notify LiveRangeEdit of new virtual registers.
Add a delegate class to MachineRegisterInfo with a single virtual
function, MRI_NoteNewVirtualRegister(). Update LiveRangeEdit to inherit
from this delegate class and override the definition of the callback
with an implementation that tracks the newly created virtual registers.

llvm-svn: 188435
2013-08-14 23:50:09 +00:00
Mark Lacey
6097c89b5a Track new virtual registers by register number.
Track new virtual registers by register number, rather than by the live
interval created for them. This is the first step in separating the
creation of new virtual registers and new live intervals.  Eventually
live intervals will be created and populated on demand after the virtual
registers have been created and used in instructions.

llvm-svn: 188434
2013-08-14 23:50:04 +00:00
Jakob Stoklund Olesen
18768bf820 Remove unnecessary parameter to RenumberValues.
Patch by Matthias Braun!

llvm-svn: 188393
2013-08-14 17:28:52 +00:00
Jakob Stoklund Olesen
ccf996bba7 Remove unused function.
Patch by Matthias Braun!

llvm-svn: 188392
2013-08-14 17:28:49 +00:00
Jakob Stoklund Olesen
6df1a2eeae Remove unused struct/enum
Patch by Matthias Braun!

llvm-svn: 188388
2013-08-14 17:28:39 +00:00
Jack Carter
15a173ab4f [Mips][msa] Value types for MSA support.
Added v8f16 to ValueTypes.h, ValueTypes.cpp, ValueTypes.td, 
and CodeGenTarget.cpp

Patch by Daniel Sanders

llvm-svn: 188326
2013-08-13 22:34:26 +00:00
Carlo Kok
d10cf40934 For COFF only: dwarf debug info output a label reference as a section relative item only when it's one of dw_from strp, sec_offset, ref_addr or op_call_ref instead of going by size.
llvm-svn: 188296
2013-08-13 17:45:53 +00:00
Michael Gottesman
4f8bae7094 Add editor C++ filetype declaration no functionality change.
llvm-svn: 188205
2013-08-12 21:10:23 +00:00
Michael Gottesman
defd024179 [stackprotector] Add in the stackprotector libcall.
We support this libcall on all platforms except for OpenBSD (See
lib/Codegen/StackProtector.cpp).

llvm-svn: 188193
2013-08-12 18:45:38 +00:00
Hal Finkel
bdc7aa32c1 Add ISD::FROUND for libm round()
All libm floating-point rounding functions, except for round(), had their own
ISD nodes. Recent PowerPC cores have an instruction for round(), and so here I'm
adding ISD::FROUND so that round() can be custom lowered as well.

For the most part, this is straightforward. I've added an intrinsic
and a matching ISD node just like those for nearbyint() and friends. The
SelectionDAG pattern I've named frnd (because ISD::FP_ROUND has already claimed
fround).

This will be used by the PowerPC backend in a follow-up commit.

llvm-svn: 187926
2013-08-07 22:49:12 +00:00
Craig Topper
8ee8f7ec58 Put an llvm_unreachable at the end of getSplatIndex as its loop should never find all undef elements.
llvm-svn: 187775
2013-08-06 05:41:22 +00:00
Craig Topper
e1c2f3da6c Check against >= 0 instead of != -1 in getSplatIndex because it generally compiles to better code and is equivalent for shuffle indices.
llvm-svn: 187774
2013-08-06 05:07:37 +00:00
Craig Topper
936da35b0d Remove trailing whitespace and fix an 80-column violation. No functional change.
llvm-svn: 187773
2013-08-06 05:01:21 +00:00
Benjamin Kramer
8730825a6d Don't leak passes if added outside of the area determined by Started/Stopped flags.
llvm-svn: 187722
2013-08-05 11:11:11 +00:00
Bill Wendling
e7b7059f1d Use function attributes to indicate that we don't want to realign the stack.
Function attributes are the future! So just query whether we want to realign the
stack directly from the function instead of through a random target options
structure.

llvm-svn: 187618
2013-08-01 21:42:05 +00:00
Andrew Trick
412a9a4e32 Down-scale slot index distance to save bits.
llvm-svn: 187438
2013-07-30 19:59:19 +00:00
Andrew Trick
05b1db7761 whitespace
llvm-svn: 187437
2013-07-30 19:59:15 +00:00
Andrew Trick
bdb01cf4bd MI Sched: Track live-thru registers.
When registers must be live throughout the scheduling region, increase
the limit for the register class. Once we exceed the original limit,
they will be spilled, and there's no point further reducing pressure.

This isn't a perfect heuristics but avoids a situation where the
scheduler could become trapped by trying to achieve the impossible.

llvm-svn: 187436
2013-07-30 19:59:12 +00:00
Elena Demikhovsky
505373db43 Added encoding prefixes for KNL instructions (EVEX).
Added 512-bit operands printing.
Added instruction formats for KNL instructions.

llvm-svn: 187324
2013-07-28 08:28:38 +00:00
Andrew Trick
f3a0221ce0 MI Sched: Register pressure heuristics.
Consider which set is being increased or decreased before comparing.

llvm-svn: 187110
2013-07-25 07:26:35 +00:00
Bill Wendling
a61c3eb016 Replace the "NoFramePointerElimNonLeaf" target option with a function attribute.
There's no need to specify a flag to omit frame pointer elimination on non-leaf
nodes...(Honestly, I can't parse that option out.) Use the function attribute
stuff instead.

llvm-svn: 187093
2013-07-25 00:34:29 +00:00
Bill Wendling
63482ebdd5 Recommit r186217 with testcase fix:
Use the function attributes to pass along the stack protector buffer size.

 Now that we have robust function attributes, don't use a command line option to
 specify the stack protecto buffer size.

llvm-svn: 186863
2013-07-22 20:15:21 +00:00
Craig Topper
58fa7a9b4a Use SmallVectorImpl& instead of SmallVector to avoid repeating small vector size.
llvm-svn: 186274
2013-07-14 04:42:23 +00:00
Chandler Carruth
c0b3faf509 Revert commit r186217 -- this is breaking bots:
http://lab.llvm.org:8013/builders/clang-x86_64-darwin11-nobootstrap-RAincremental/builds/4328

Original commit log:
  Use the function attributes to pass along the stack protector buffer
  size.

llvm-svn: 186234
2013-07-13 01:00:17 +00:00
Bill Wendling
c4d489b5ee Use the function attributes to pass along the stack protector buffer size.
Now that we have robust function attributes, don't use a command line option to
specify the stack protecto buffer size.

llvm-svn: 186217
2013-07-12 22:25:20 +00:00
Craig Topper
74e16da8dc Use SmallVectorImpl& instead of SmallVector to avoid repeating small vector size.
llvm-svn: 186098
2013-07-11 16:22:38 +00:00