History log of /external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
2c3e0051c31c3f5b2328b447eadf1cf9c4427442 06-May-2015 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master LLVM for rebase to r235153

Change-Id: I9bf53792f9fc30570e81a8d80d296c681d005ea7
(cherry picked from commit 0c7f116bb6950ef819323d855415b2f2b0aad987)
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
ebe69fe11e48d322045d5949c83283927a0d790b 23-Mar-2015 Stephen Hines <srhines@google.com> Update aosp/master LLVM for rebase to r230699.

Change-Id: I2b5be30509658cb8266be782de0ab24f9099f9b9
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
37ed9c199ca639565f6ce88105f9e39e898d82d0 01-Dec-2014 Stephen Hines <srhines@google.com> Update aosp/master LLVM for rebase to r222494.

Change-Id: Ic787f5e0124df789bd26f3f24680f45e678eef2d
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
c6a4f5e819217e1e12c458aed8e7b122e23a3a58 21-Jul-2014 Stephen Hines <srhines@google.com> Update LLVM for rebase to r212749.

Includes a cherry-pick of:
r212948 - fixes a small issue with atomic calls

Change-Id: Ib97bd980b59f18142a69506400911a6009d9df18
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
dce4a407a24b04eebc6a376f8e62b41aaa7b071f 29-May-2014 Stephen Hines <srhines@google.com> Update LLVM for 3.5 rebase (r209712).

Change-Id: I149556c940fb7dc92d075273c87ff584f400941f
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
36b56886974eae4f9c5ebc96befd3e7bfe5de338 24-Apr-2014 Stephen Hines <srhines@google.com> Update to LLVM 3.5a.

Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
4f3b5e8c9232e43d1291aab8db5f5698d7ee0ea4 10-Oct-2013 Matthias Braun <matze@braunis.de> Represent RegUnit liveness with LiveRange instance

Previously LiveInterval has been used, but having a spill weight and
register number is unnecessary for a register unit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192397 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
e25dde550baec1f79caf2fc06edd74e7ae6ffa33 10-Oct-2013 Matthias Braun <matze@braunis.de> Work on LiveRange instead of LiveInterval where possible

Also change some pointer arguments to references at some places where
0-pointers are not allowed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192396 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
87a86058fa0726328de42ace85b5532d18775646 10-Oct-2013 Matthias Braun <matze@braunis.de> Refactor LiveInterval: introduce new LiveRange class

LiveRange just manages a list of segments and a list of value numbers
now as LiveInterval did previously, but without having details like spill
weight or a fixed register number.
LiveInterval is now a subclass of LiveRange and simply adds the spill weight
and the register number.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192393 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
331de11a0acc6a095b98914b5f05ff242c9d7819 10-Oct-2013 Matthias Braun <matze@braunis.de> Rename LiveRange to LiveInterval::Segment

The Segment struct contains a single interval; multiple instances of this struct
are used to construct a live range, but the struct is not a live range by
itself.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192392 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
e742d687369f79702894b6cf302e1f222c5d7432 15-Aug-2013 Mark Lacey <mark.lacey@apple.com> 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188437 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
4eed756153b84c211114a3e9186bf0cb55d4b394 17-Jun-2013 Benjamin Kramer <benny.kra@googlemail.com> Switch spill weights from a basic loop depth estimation to BlockFrequencyInfo.

The main advantages here are way better heuristics, taking into account not
just loop depth but also __builtin_expect and other static heuristics and will
eventually learn how to use profile info. Most of the work in this patch is
pushing the MachineBlockFrequencyInfo analysis into the right places.

This is good for a 5% speedup on zlib's deflate (x86_64), there were some very
unfortunate spilling decisions in its hottest loop in longest_match(). Other
benchmarks I tried were mostly neutral.

This changes register allocation in subtle ways, update the tests for it.
2012-02-20-MachineCPBug.ll was deleted as it's very fragile and the instruction
it looked for was gone already (but the FileCheck pattern picked up unrelated
stuff).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184105 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
f31034db8c12197d00b3e356e1d2a702c2339d49 19-Mar-2013 Jakub Staszak <kubastaszak@gmail.com> Move #include of BitVector from .h to .cpp file.
Also remove unneeded #include and forward declaration.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177357 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
fd0f93fa1da8cecdcfef5b12da367708ef55a343 20-Feb-2013 Cameron Zwarich <zwarich@apple.com> Fix a misunderstanding about how RegMaskBlocks works. This was caught by
assertions in the register allocator when running 'make check' without
LiveVariables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175599 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
680c98f6323dde0eae566710ea49497e16499653 17-Feb-2013 Cameron Zwarich <zwarich@apple.com> Remove use of reverse iterators in repairIntervalsInRange(). While they were
arguably better than forward iterators for this use case, they are confusing and
there are some implementation problems with reverse iterators and MI bundles.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175393 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
7324d4e593ee2611ee6b272c03b15541fe2df62e 17-Feb-2013 Cameron Zwarich <zwarich@apple.com> Use ArrayRef instead of a reference to a SmallVectorImpl.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175385 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
f0b2535344e8c9e2912da78010918a44c5a18cab 17-Feb-2013 Cameron Zwarich <zwarich@apple.com> Add support for updating the LiveIntervals of registers used by 'exotic'
terminators that actually have register uses when splitting critical edges.

This commit also introduces a method repairIntervalsInRange() on LiveIntervals,
which allows for repairing LiveIntervals in a small range after an arbitrary
target hook modifies, inserts, and removes instructions. It's pretty limited
right now, but I hope to extend it to support all of the things that are done
by the convertToThreeAddress() target hooks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175382 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
dd58fa4869f9bff909720aaa428487a20fab1391 12-Feb-2013 Cameron Zwarich <zwarich@apple.com> Add blocks to the LiveIntervalAnalysis RegMaskBlocks array when splitting
a critical edge.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174936 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
ec7b25d753867f43e2fbd00e58daf75e29783bd4 09-Feb-2013 Jakob Stoklund Olesen <stoklund@2pi.dk> Remove the old liveness algorithm.

This is part of the plan to delete LiveVariables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174783 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
f54f61538688eff25f392c2062b3a654394333aa 05-Dec-2012 Andrew Trick <atrick@apple.com> RegisterPressureTracker: unify virtual registers and physical regunits.

Now that live register units are tracked individually, the code can be simplified.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169426 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
255f89faee13dc491cb64fbeae3c763e7e2ea4e6 03-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Sort the #include lines for the include/... tree with the script.

AKA: Recompile *ALL* the source code!

This one went much better. No manual edits here. I spot-checked for
silliness and grep-checked for really broken edits and everything seemed
good. It all still compiles. Yell if you see something that looks goofy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169133 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
afac0478f41b0f0106a6470060ad22d2eec32e22 16-Oct-2012 Dmitri Gribenko <gribozavr@gmail.com> Fix function parameter spelling in comments. Caught by -Wdocumentation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166024 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
27c28cef11da5373d9a146060f9c10a3c6ab58e3 16-Oct-2012 Andrew Trick <atrick@apple.com> misched: Added handleMove support for updating all kill flags, not just for allocatable regs.

This is a medium term workaround until we have a more robust solution
in the form of a register liveness utility for postRA passes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166001 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
790047620a8f31cee1841c06c9e5e7688166ad93 16-Oct-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Remove LIS::isAllocatable() and isReserved() helpers.

All callers can simply use the corresponding MRI functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165985 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
87f7864c6d81ae134335b8271ac12c937c81dffc 18-Sep-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Merge into undefined lanes under -new-coalescer.

Add LIS::pruneValue() and extendToIndices(). These two functions are
used by the register coalescer when merging two live ranges requires
more than a trivial value mapping as supported by LiveInterval::join().

The pruneValue() function can remove the part of a value number that is
going to conflict in join(). Afterwards, extendToIndices can restore the
live range, using any new dominating value numbers and updating the SSA
form.

Use this complex value mapping to support merging a register into a
vector lane that has a conflicting value, but the clobbered lane is
undef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164074 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
e617ccb80da76821379bbff4a2fdcd09e8401e8b 06-Sep-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Handle overlapping regunit intervals in LiveIntervals::addKillFlags().

We will soon allow virtual register live ranges to overlap regunit live
ranges when the physreg is defined as a copy of the virtreg:

%EAX = COPY %vreg5
FOO %vreg5
BAR %EAX<kill>

There is no real interference since %vreg5 and %EAX have the same value
where they overlap.

This patch prevents addKillFlags from adding virtreg kill flags to FOO
where the assigned physreg is overlapping the virtual register live
range.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163335 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
0ab7103e06ee1da7bde5b196a68be77ab49a005d 03-Aug-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Make the hasPHIKills flag a computed property.

The VNInfo::HAS_PHI_KILL is only half supported. We precompute it in
LiveIntervalAnalysis, but it isn't properly updated by live range
splitting and functions like shrinkToUses().

It is only used in one place: RegisterCoalescer::removeCopyByCommutingDef().

This patch changes that function to use a new LiveIntervals::hasPHIKill()
function that computes the flag for a given value number.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161254 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
07dc609c37663ee0d4179c7de605a841517f4525 03-Aug-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Remove a dead prototype.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161250 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
c16bf79303ad8c84c5dd3c76e143cd2145539834 27-Jul-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Also compute register mask lists under -new-live-intervals.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160898 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
3dfa38a5bf431ec78272bb06c47d7c28616d276a 27-Jul-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Add a -new-live-intervals experimental option.

This option replaces the existing live interval computation with one
based on LiveRangeCalc.cpp. The new algorithm does not depend on
LiveVariables, and it can be run at any time, before or after leaving
SSA form.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160892 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
bfd752f310078561de07850ce66213c4579a0d7e 22-Jun-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Delete a boring statistic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159030 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
7fa6784296e6bc1aa4e8ec3664e58247893c21a2 22-Jun-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Store live intervals in an IndexedMap.

It is both smaller and faster than DenseMap.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159029 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
27b7669a6058235eec494ea30d0d62b7146e0eb4 22-Jun-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Stop computing physreg live ranges.

Everyone is using on-demand regunit ranges now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159018 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
241d0209a765c97c684b120527e185f17723f650 22-Jun-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Remove LiveIntervals::trackingRegUnits().

With regunit liveness permanently enabled, this function would always
return true.

Also remove now obsolete code for checking physreg interference.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159006 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
895fe245578830881744826b04da4788ff614853 21-Jun-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Remove LiveIntervals::iterator.

Live intervals for regunits and virtual registers are stored separately,
and physreg live intervals are going away.

To visit the live ranges of all virtual registers, use this pattern
instead:

for (unsigned i = 0, e = MRI->getNumVirtRegs(); i != e; ++i) {
unsigned Reg = TargetRegisterInfo::index2VirtReg(i);
if (MRI->reg_nodbg_empty(Reg))
continue;

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158879 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
7824152557cfe3a366963f504b2b956f853ebc3a 20-Jun-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Only update regunit live ranges that have been precomputed.

Regunit live ranges are computed on demand, so when mi-sched calls
handleMove, some regunits may not have live ranges yet.

That makes updating them easier: Just skip the non-existing ranges. They
will be computed correctly from the rescheduled machine code when they
are needed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158831 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
34c6f9803499c11ed2dc8479ec768d47370a2d3a 06-Jun-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Add experimental support for register unit liveness.

Instead of computing a live interval per physreg, LiveIntervals can
compute live intervals per register unit. This makes impossible the
confusing situation where aliasing registers could have overlapping live
intervals. It should also make fixed interferernce checking cheaper
since registers have fewer register units than aliases.

Live intervals for regunits are computed on demand, using MRI use-def
chains and the new LiveRangeCalc class. Only regunits live in to ABI
blocks are precomputed during LiveIntervals::runOnMachineFunction().

The regunit liveness computations don't depend on LiveVariables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158029 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
9a314da5812dc14bb37df47b89041f8059efc8b1 05-Jun-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Remove dead function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158005 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
afb32f7fb482d62532d575ea7b1ee8ab3919575c 05-Jun-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Remove the last remat-related code from LiveIntervalAnalysis.

Rematerialization is handled by LiveRangeEdit now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157974 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
3dfd59bdc3ab1135961a3798b4f23e191a7dc953 05-Jun-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Stop using LiveIntervals::isReMaterializable().

It is an old function that does a lot more than required by
CalcSpillWeights, which was the only remaining caller.

The isRematerializable() function never actually sets the isLoad
argument, so don't try to compute that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157973 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
84423c8778ed22877c123fe41f5e137cb5a30e90 05-Jun-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Delete dead code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157963 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
15f1d8c557c217b90a82599d5f0f849f8340a1e3 05-Jun-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Switch LiveIntervals member variable to LLVM naming standards.

No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157957 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
a0b0219a9e13ecd193eee604ab22ffc74b516b02 25-Apr-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Remove more dead code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155566 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
50e1d84ba8efc1973137c65e0b0e048ecf8cf5d6 25-Apr-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Simplify LiveIntervals::getApproximateInstructionCount().

This function is only used for a heuristic during -join-physregs. It
doesn't need floating point.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155554 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
a62efd82ccb979df9e7b8f99913c83d698a6994e 25-Apr-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Remove a dead function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155553 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
4586d257abf13b57d115d6bac9fb38ddc811acaf 21-Feb-2012 Lang Hames <lhames@gmail.com> Add API "handleMoveIntoBundl" for updating liveness when moving instructions into
bundles. This method takes a bundle start and an MI being bundled, and makes
the intervals for the MI's operands appear to start/end on the bundle start.

Also fixes some minor cosmetic issues (whitespace, naming convention) in the
HMEditor code.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151099 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
3dc7c5138d219048d69952bead22f75efb984fa3 17-Feb-2012 Lang Hames <lhames@gmail.com> Refactor 'handleMove' code in live intervals. Clients of LiveIntervals won't see
any changes.

Internally this adds a private inner class HMEditor, to LiveIntervals. HMEditor provides
an API for updating live intervals when code is moved or bundled.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150826 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
da7984fbbac967ddbe5de4e789f8f37c673a7d75 15-Feb-2012 Lang Hames <lhames@gmail.com> Disentangle moving a machine instr from updating LiveIntervals.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150552 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
342c64c90418a97ec26303c27d1829edd994d9a9 14-Feb-2012 Lang Hames <lhames@gmail.com> Tighten physical register invariants: Allocatable physical registers can
only be live in to a block if it is the function entry point or a landing pad.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150494 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
4465b6f6b2ebd061f4f321e666b47d540651f686 10-Feb-2012 Lang Hames <lhames@gmail.com> Remove unused 'isAlias' parameter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150224 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
34e85d0307e3c17e5061622dccf8a20e5457b099 10-Feb-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Cache basic block boundaries for faster RegMaskSlots access.

Provide API to get a list of register mask slots and bits in a basic
block.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150219 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
ebf2750a70df4261d3e66144ea6bcb49d41f6efb 10-Feb-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Optimize LiveIntervals::intervalIsInOneMBB().

No looping and binary searches necessary.

Return a pointer to the containing block instead of just a bool.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150218 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
3fd3a840c50fe4ede1b200be18990bc955c536fd 08-Feb-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Keep track of register masks in LiveIntervalAnalysis.

Build an ordered vector of register mask operands (i.e., calls) when
computing live intervals. Provide a checkRegMaskInterference() function
that computes a bit mask of usable registers for a live range.

This is a quick way of determining of a live range crosses any calls,
and restricting it to the callee saved registers if it does.
Previously, we had to discover call clobbers for each candidate register
independently.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150077 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
45f4f2cd0ce90bb83ac043aecb639dc19ffe14a1 06-Feb-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Remove some unused functions.

LiveIntervalAnalysis has a number of functions that simply forward to
SlotIndexes. Since SlotIndexes is a stand-alone analysis now, clients
should really refer to it directly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149921 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
3b1088a2cc15a39c7a7b8dd95a56143f1dda6863 04-Feb-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Don't store COPY pointers in VNInfo.

If a value is defined by a COPY, that instuction can easily and cheaply
be found by getInstructionFromIndex(VNI->def).

This reduces the size of VNInfo from 24 to 16 bytes, and improves
llc compile time by 3%.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149763 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
c4a2715a548cc150064db162bd18bee1f10cb300 04-Feb-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Drop ZeroIndex and InvalidIndex.

They are not used any more. Simply use SlotIndex() to get an invalid
index.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149727 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
d491da3f93a51d811b42f59f375e0b1883b06832 03-Feb-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Delete some dead code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149717 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
907cc8f38df212a87a6028682d91df01ba923f4f 27-Jan-2012 Lang Hames <lhames@gmail.com> Add a "moveInstr" method to LiveIntervals. This can be used to move instructions
around within a basic block while maintaining live-intervals.

Updated ScheduleTopDownLive in MachineScheduler.cpp to use the moveInstr API
when reordering MIs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149147 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
74c4f97a466513e45e66e04469973fdcd5865300 11-Jan-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Exclusively use SplitAnalysis::getLastSplitPoint().

Delete the alternative implementation in LiveIntervalAnalysis.

These functions computed the same thing, but SplitAnalysis caches the
result.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147911 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
f5eeaf221c0b8acdc1ffbd5cefe01b61474cb7e8 13-Nov-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Delete the old spilling framework from LiveIntervalAnalysis.

This is dead code, all register allocators use InlineSpiller.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144478 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
6a3dbd3b25bbc99bd1a233d6a74ddea3493ba6ac 17-Mar-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Dead code elimination may separate the live interval into multiple connected components.

I have convinced myself that it can only happen when a phi value dies. When it
happens, allocate new virtual registers for the components.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127827 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
38f6bd0fc8095ef79a89b3db15ff6dc734ac90e7 10-Mar-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Make SpillIs an optional pointer. Avoid creating a bunch of temporary SmallVectors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127388 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
0d8ccaa5c8db820b5b93f37e51563148c57ba6b8 08-Mar-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Let shrinkToUses optionally return a list of now dead machine instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127192 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
eb9f040f0d07e2fa9b3b5ef46d5ee32511d28811 15-Feb-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Move more fragments of spill weight calculation into CalcSpillWeights.h

Simplify the spill weight calculation a bit by bypassing
getApproximateInstructionCount() and using LiveInterval::getSize() directly.
This changes the computed spill weights, but only by a constant factor in each
function. It should not affect how spill weights compare against each other, and
so it shouldn't affect code generation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125530 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
f0ac26c51173a9a1d6e5b5794107dccc4c5b5792 09-Feb-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Move calcLiveBlockInfo() and the BlockInfo struct into SplitAnalysis.

No functional changes intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125231 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
8a61da8a689ee95874c833af4c7aa965fab5c0a9 08-Feb-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Add LiveIntervals::addKillFlags() to recompute kill flags after register allocation.

This is a lot easier than trying to get kill flags right during live range
splitting and rematerialization.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125113 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
11513e5d1e1b40e6113668e4b4357596f33fa6c6 08-Feb-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Add LiveIntervals::shrinkToUses().

After uses of a live range are removed, recompute the live range to only cover
the remaining uses. This is necessary after rematerializing the value before
some (but not all) uses.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125058 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
cb6404711b7fe6f583480adce8d7e9d5e4b99ae6 04-Feb-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Add LiveIntervals::getLastSplitPoint().

A live range cannot be split everywhere in a basic block. A split must go before
the first terminator, and if the variable is live into a landing pad, the split
must happen before the call that can throw.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124894 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
7fd747ba24c0eb20d505de16c4c7839ae3f43344 12-Jan-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Annotate VirtRegRewriter debug output with slot indexes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123333 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
f4baeaf8485f01beda46d29fd55753199dc68070 10-Nov-2010 Andrew Trick <atrick@apple.com> RABasic is nearly functionally complete. There are a few remaining
benchmarks hitting an assertion.
Adds LiveIntervalUnion::collectInterferingVRegs.
Fixes "late spilling" by checking for any unspillable live vregs among
all physReg aliases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118701 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
081c34b725980f995be9080eaec24cd3dfaaf065 19-Oct-2010 Owen Anderson <resistor@mac.com> Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which
must be called in the pass's constructor. This function uses static dependency declarations to recursively initialize
the pass's dependencies.

Clients that only create passes through the createFooPass() APIs will require no changes. Clients that want to use the
CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h
before parsing commandline arguments.

I have tested this with all standard configurations of clang and llvm-gcc on Darwin. It is possible that there are problems
with the static dependencies that will only be visible with non-standard options. If you encounter any crash in pass
registration/creation, please send the testcase to me directly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116820 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
1803b37bad85cca19a15c0040979719240f48626 25-Sep-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Terminator gaps were unused. Might as well delete them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114776 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
1b2932024f098a6968645ac78d5848951d877c19 12-Aug-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Remove trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110944 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
df30cf9e61e6586b45b74d1312bef1ee758ef94f 10-Aug-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Transpose the calculation of spill weights such that we are calculating one
register at a time. This turns out to be slightly faster than iterating over
instructions, but more importantly, it allows us to compute spill weights for
new registers created after the spill weight pass has run.

Also compute the allocation hint at the same time as the spill weight. This
allows us to use the spill weight as a cost metric for copies, and choose the
most profitable hint if there is more than one possibility.

The new hints provide a very small (< 0.1%) but universal code size improvement.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110631 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
90c579de5a383cee278acc3f7e7b9d0a656e6a35 06-Aug-2010 Owen Anderson <resistor@mac.com> Reapply r110396, with fixes to appease the Linux buildbot gods.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110460 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
1f74590e9d1b9cf0f1f81a156efea73f76546e05 06-Aug-2010 Owen Anderson <resistor@mac.com> Revert r110396 to fix buildbots.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110410 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
9ccaf53ada99c63737547c0235baeb8454b04e80 06-Aug-2010 Owen Anderson <resistor@mac.com> Don't use PassInfo* as a type identifier for passes. Instead, use the address of the static
ID member as the sole unique type identifier. Clean up APIs related to this change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110396 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
60f422f894ae9aff2f508f34733be36f5a0ed20a 17-Jul-2010 Lang Hames <lhames@gmail.com> LoopSplitter - intended to split live intervals over loop boundaries.
Still very much under development. Comments and fixes will be forthcoming.

(This commit includes some small tweaks to LiveIntervals & LoopInfo to support the splitter)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108615 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
023009fef8cc1b83e2ba4308ecd0888f77740e08 13-Jul-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Remove vestigial decl.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108278 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
3c7b3fecacee40df7b9a99d290638398b5a62173 24-Jun-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Remove the now unused LiveIntervals::getVNInfoSourceReg().

This method was always a bit too simplistic for the real world. It didn't really
deal with subregisters and such.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106781 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
54edf4f7da971cbb0c1546039db488a259480398 24-Jun-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Remove the -fast-spill option.

This code path has never really been used, and we are going to be handling
spilling through the Spiller interface in the future.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106777 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
a24986d8bfd941252f7d080943e02bbe6a0c2944 24-Jun-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Replace a big gob of old coalescer logic with the new CoalescerPair class.

CoalescerPair can determine if a copy can be coalesced, and which register gets
merged away. The old logic in SimpleRegisterCoalescing had evolved into
something a bit too convoluted.

This second attempt fixes some crashes that only occurred Linux.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106769 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
b8ac3b035ba14663ebe57fde17f6a9f25134e005 24-Jun-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Revert "Replace a big gob of old coalescer logic with the new CoalescerPair class."

Whiny buildbots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106710 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
e9c59711d3d1e8b133763393bea92af6e36b0031 24-Jun-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Replace a big gob of old coalescer logic with the new CoalescerPair class.

CoalescerPair can determine if a copy can be coalesced, and which register gets
merged away. The old logic in SimpleRegisterCoalescing had evolved into
something a bit too convoluted.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106701 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
3749943648772743c9c0e852553e50e6700a0c1b 05-May-2010 Evan Cheng <evan.cheng@apple.com> Teach liveintervalanalysis about virtual registers which are defined by reg_sequence instructions that are formed by registers defined by distinct instructions. e.g.
80 %reg1041:6<def> = VSHRNv4i16 %reg1034<kill>, 12, pred:14, pred:%reg0
. . .
120 %reg1041:5<def> = VSHRNv4i16 %reg1039<kill>, 12, pred:14, pred:%reg0


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103102 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
30fdb5c2ac35b8af818ee62bfd184357f20eca34 21-Apr-2010 Evan Cheng <evan.cheng@apple.com> - Clean up some crappy code which deals with coalescing of copies which look at
extract_subreg / insert_subreg, etc.
- Add support for more aggressive insert_subreg coalescing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101971 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
991de14dd62dcbab4b31357ae22dc5b053ba50a0 30-Mar-2010 Benjamin Kramer <benny.kra@googlemail.com> Introduce SpecificBumpPtrAllocator, a wrapper for BumpPtrAllocator which allows
only a single type of object to be allocated. Use it to make VNInfo destruction
typesafe.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99919 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
826cbac2a0cef418fd8949813761c2ed975f3df1 11-Mar-2010 Evan Cheng <evan.cheng@apple.com> The check for coalescing a virtual register to a physical register, e.g.
cl = EXTRACT_SUBREG reg1024, 1, is overly conservative. It should check
for overlaps of vr's live interval with the super registers of the
physical register (ECX in this case) and let JoinIntervals() handle checking
the coalescing feasibility against the physical register (cl in this case).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98251 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
e5d90416ee1a4f45eba80789a7a3cbc3d497a4cd 01-Mar-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Use methods to determine if a LiveInterval is spillable.

Don't accidentally produce unspillable intervals for deeply nested loops.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97496 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
352d352c023ed411d9e4357ea01f3ec468ff87dc 18-Feb-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Always normalize spill weights, also for intervals created by spilling.

Moderate the weight given to very small intervals.

The spill weight given to new intervals created when spilling was not
normalized in the same way as the original spill weights calculated by
CalcSpillWeights. That meant that restored registers would tend to hang around
because they had a much higher spill weight that unspilled registers.

This improves the runtime of a few tests by up to 10%, and there are no
significant regressions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96613 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
cf97036675340bc889cfe04295cda63afe9496e2 10-Dec-2009 Jakob Stoklund Olesen <stoklund@2pi.dk> Also attempt trivial coalescing for live intervals that end in a copy.

The coalescer is supposed to clean these up, but when setting up parameters
for a function call, there may be copies to physregs. If the defining
instruction has been LICM'ed far away, the coalescer won't touch it.

The register allocation hint does not always work - when the register
allocator is backtracking, it clears the hints.

This patch is more conservative than r90502, and does not break
483.xalancbmk/i686. It still breaks the PowerPC bootstrap, so it is disabled
by default, and can be enabled with the -trivial-coalesce-ends option.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91049 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
6194569d22003fddaf1a33acdbb84d5efe76e7d7 09-Dec-2009 Lang Hames <lhames@gmail.com> Added a new "splitting" spiller.

When a call is placed to spill an interval this spiller will first try to
break the interval up into its component values. Single value intervals and
intervals which have already been split (or are the result of previous splits)
are spilled by the default spiller.

Splitting intervals as described above may improve the performance of generated
code in some circumstances. This work is experimental however, and it still
miscompiles many benchmarks. It's not recommended for general use yet.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90951 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
dc492e037034e7671e3fb9ab3e041186cdc97508 05-Dec-2009 Bill Wendling <isanbard@gmail.com> Temporarily revert r90502. It was causing the llvm-gcc bootstrap on PPC to fail.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90653 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
6b74e505be1016223e090a6c806f7caa3165a146 04-Dec-2009 Jakob Stoklund Olesen <stoklund@2pi.dk> Also attempt trivial coalescing for live intervals that end in a copy.

The coalescer is supposed to clean these up, but when setting up parameters
for a function call, there may be copies to physregs. If the defining
instruction has been LICM'ed far away, the coalescer won't touch it.

The register allocation hint does not always work - when the register
allocator is backtracking, it clears the hints.

This patch takes care of a few more cases that r90163 missed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90502 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
1e78aa445c5b5b466cea4478f3f9034d4be7278e 18-Nov-2009 Jakob Stoklund Olesen <stoklund@2pi.dk> Remove the -early-coalescing option

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89240 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
b3661585c0f87b6045f0d65b5cac16921ae27086 14-Nov-2009 Lang Hames <lhames@gmail.com> Added an API to the SlotIndexes pass to allow new instructions to be inserted into the numbering.

PreAllocSplitting is now using this API to insert code.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88725 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
3de23e6f6cf337451a0934159da494d645b93133 07-Nov-2009 Jakob Stoklund Olesen <stoklund@2pi.dk> Fix inverted conflict test in -early-coalesce.

A non-identity copy cannot be coalesced when the phi join destination register
is live at the copy site.

Also verify the condition that the PHI join source register is only used in
the PHI join. Otherwise the coalescing is invalid.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86322 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
233a60ec40b41027ff429e2f2c27fa2be762f2e9 04-Nov-2009 Lang Hames <lhames@gmail.com> The Indexes Patch.

This introduces a new pass, SlotIndexes, which is responsible for numbering
instructions for register allocation (and other clients). SlotIndexes numbering
is designed to match the existing scheme, so this patch should not cause any
changes in the generated code.

For consistency, and to avoid naming confusion, LiveIndex has been renamed
SlotIndex.

The processImplicitDefs method of the LiveIntervals analysis has been moved
into its own pass so that it can be run prior to SlotIndexes. This was
necessary to match the existing numbering scheme.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85979 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
48bff92b60d3c657704aa97b47b2b104cb9d1550 09-Oct-2009 Evan Cheng <evan.cheng@apple.com> Indentation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83607 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
cc3b0650f1feec45d1a2890b20c05c4b325f1788 03-Oct-2009 Lang Hames <lhames@gmail.com> Renamed MachineInstrIndex to LiveIndex.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83254 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
db1c2c57ffe1b905c0ae71bc5c806b14f170903b 15-Sep-2009 Evan Cheng <evan.cheng@apple.com> Forgot this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81850 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
752195e3c662c6b5db042cf897c984624720f3b8 14-Sep-2009 Evan Cheng <evan.cheng@apple.com> Add early coalescing to liveintervals. This is work in progress and is known to miscompute some tests. Read it at your own rish, I have aged 10 year while writing this.

The gist of this is if source of some of the copies that feed into a phi join is defined by the phi join, we'd like to eliminate them. However, if any of the non-identity source overlaps the live interval of the phi join then the coalescer won't be able to coalesce them. The early coalescer's job is to eliminate the identity copies by partially-coalescing the two live intervals.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81796 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
4a39ba992677ce48c61cbdad02594d9737eabdf0 12-Sep-2009 Lang Hames <lhames@gmail.com> Whoops. Committed the headers for r81605 - 'Moved some more index operations over to LiveIntervals.'

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81609 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
9647994e097840d8ea7bd3ed7014934034f38763 09-Sep-2009 Lang Hames <lhames@gmail.com> Removed static qualifier from a few index related methods. These methods may require a LiveIntervals instance in future.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81374 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
8651125d2885f74546b6e2a556082111d5b75da3 04-Sep-2009 Lang Hames <lhames@gmail.com> Replaces uses of unsigned for indexes in LiveInterval and VNInfo with
a new class, MachineInstrIndex, which hides arithmetic details from
most clients. This is a step towards allowing the register allocator
to update/insert code during allocation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81040 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
45cfe545ec8177262dabc70580ce05feaa1c3880 23-Aug-2009 Chris Lattner <sabre@nondot.org> Change Pass::print to take a raw ostream instead of std::ostream,
update all code that this affects.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79830 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
c02497f5bae87e71fd5617db5751cb0b3a14bbed 23-Aug-2009 Chris Lattner <sabre@nondot.org> shoot a few more std::ostream print methods in the head.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79814 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
77942d4ee47e76626d574b027e4b9c5c90e2bbf4 23-Aug-2009 Chris Lattner <sabre@nondot.org> remove a dead class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79795 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
de0cc5a66085d460bade2780f63c3ea28fd58a90 19-Aug-2009 David Greene <greened@obbligato.org> Add missing header.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79463 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
b5257664795d49ada0d4669fe8ed1cd49c04fbf3 03-Aug-2009 David Greene <greened@obbligato.org> Re-apply LiveInterval index dumping patch, with fixes suggested by Bill
and others.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78003 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
340482dcc0060b10976b5ff13c44b6d4c8446b9b 22-Jul-2009 David Greene <greened@obbligato.org> Constify the key in Mi2IndexMap.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76801 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
3380d5c4aaafc3d78d32f583d685d64a67ae5224 21-Jul-2009 Chris Lattner <sabre@nondot.org> revert r76602, 76603, and r76615, pending design discussions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76646 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
a358c1db5c744f7c524b18f2860c2d48613adbd1 21-Jul-2009 David Greene <greened@obbligato.org> Prefix IR dumps with LiveInterval indices when possible. This turns
this:

%ESI<def> = MOV32rr %EDI<kill>
ADJCALLSTACKDOWN64 0, %RSP<imp-def>, %EFLAGS<imp-def,dead>, %RSP<imp-use>
%reg1027<def> = MOVZX64rr32 %ESI
%reg1027<def> = ADD64ri8 %reg1027, 15, %EFLAGS<imp-def,dead>
%reg1027<def> = AND64ri8 %reg1027, -16, %EFLAGS<imp-def,dead>
%RDI<def> = MOV64rr %RSP
%RDI<def> = SUB64rr %RDI, %reg1027<kill>, %EFLAGS<imp-def,dead>
%RSP<def> = MOV64rr %RDI

into this:

4 %reg1024<def> = MOV32rr %EDI<kill>
12 ADJCALLSTACKDOWN64 0, %RSP<imp-def>, %EFLAGS<imp-def,dead>, %RSP<imp-use>
20 %reg1025<def> = MOVZX64rr32 %reg1024
28 %reg1026<def> = MOV64rr %reg1025<kill>
36 %reg1026<def> = ADD64ri8 %reg1026, 15, %EFLAGS<imp-def,dead>
44 %reg1027<def> = MOV64rr %reg1026<kill>
52 %reg1027<def> = AND64ri8 %reg1027, -16, %EFLAGS<imp-def,dead>
60 %reg1028<def> = MOV64rr %RSP
68 %reg1029<def> = MOV64rr %reg1028<kill>
76 %reg1029<def> = SUB64rr %reg1029, %reg1027<kill>, %EFLAGS<imp-def,dead>
84 %RSP<def> = MOV64rr %reg1029

This helps greatly when debugging register allocation and coalescing
problems.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76615 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
ffd1326ff8dfc652a8026c3faebf55bbba7c32c7 09-Jul-2009 Lang Hames <lhames@gmail.com> Improved tracking of value number kills. VN kills are now represented
as an (index,bool) pair. The bool flag records whether the kill is a
PHI kill or not. This code will be used to enable splitting of live
intervals containing PHI-kills.

A slight change to live interval weights introduced an extra spill
into lsr-code-insertion (outside the critical sections). The test
condition has been updated to reflect this.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75097 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
2578ba26e72e36dde64be0f52a2788480aad3378 01-Jul-2009 Evan Cheng <evan.cheng@apple.com> Handle IMPLICIT_DEF with isUndef operand marker, part 2. This patch moves the code to annotate machineoperands to LiveIntervalAnalysis. It also add markers for implicit_def that define physical registers. The rest, is just a lot of details.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74580 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
f41538d1b54f55e8900394929b50f7ce3e61125f 02-Jun-2009 Lang Hames <lhames@gmail.com> Update to in-place spilling framework. Includes live interval scaling and trivial rewriter.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72729 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
c781a243a3d17e7e763515794168d8fa6043f565 03-May-2009 Evan Cheng <evan.cheng@apple.com> In some rare cases, the register allocator can spill registers but end up not utilizing registers at all. The fundamental problem is linearscan's backtracking can end up freeing more than one allocated registers. However, reloads and restores might be folded into uses / defs and freed registers might not be used at all.

VirtRegMap keeps track of allocations so it knows what's not used. As a horrible hack, the stack coloring can color spill slots with *free* registers. That is, it replace reload and spills with copies from and to the free register. It unfold instructions that load and store the spill slot and replace them with register using variants.

Not yet enabled. This is part 1. More coming.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70787 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
5b69ebac857104770b1a751bf7a463fda4330a62 22-Apr-2009 Evan Cheng <evan.cheng@apple.com> It has finally happened. Spiller is now using live interval info.

This fixes a very subtle bug. vr defined by an implicit_def is allowed overlap with any register since it doesn't actually modify anything. However, if it's used as a two-address use, its live range can be extended and it can be spilled. The spiller must take care not to emit a reload for the vn number that's defined by the implicit_def. This is both a correctness and performance issue.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69743 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
2824a655509577127d221eecd1425de196f80320 23-Mar-2009 Evan Cheng <evan.cheng@apple.com> Fix PR3391 and PR3864. Reg allocator infinite looping.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67544 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
0a1fcce09230e9b4bd30a8f07447aa075dce7470 08-Feb-2009 Evan Cheng <evan.cheng@apple.com> Fix PR3486. Fix a bug in code that manually patch physical register live interval after its sub-register is coalesced with a virtual register.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64082 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
0c2e7b9ab6d0b09a1eddf9ecaaf19af5602c8c88 13-Jan-2009 Owen Anderson <resistor@mac.com> Fix fallout from r62144. Evan, please double check this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62150 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
8f90b6eb2fd0125f5b779de80954944f9071fb87 07-Jan-2009 Evan Cheng <evan.cheng@apple.com> The coalescer does not coalesce a virtual register to a physical register if any of the physical register's sub-register live intervals overlaps with the virtual register. This is overly conservative. It prevents a extract_subreg from being coalesced away:

v1024 = EDI // not killed
=
= EDI

One possible solution is for the coalescer to examine the sub-register live intervals in the same manner as the physical register. Another possibility is to examine defs and uses (when needed) of sub-registers. Both solutions are too expensive. For now, look for "short virtual intervals" and scan instructions to look for conflict instead.

This is a small win on x86-64. e.g. It shaves 403.gcc by ~80 instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61847 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
d68a07650cdb2e18f18f362ba533459aa10e01b6 05-Jan-2009 Dan Gohman <gohman@apple.com> Tidy up #includes, deleting a bunch of unnecessary #includes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61715 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
d0e32c5d5c1bb03bc0cc8aeef52728724cab1c51 29-Oct-2008 Evan Cheng <evan.cheng@apple.com> - Rewrite code that update register live interval that's split.
- Create and update spill slot live intervals.
- Lots of bug fixes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58367 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
06587497dc1c39516f24784a2ac1d9323faae0a5 24-Oct-2008 Evan Cheng <evan.cheng@apple.com> Avoid splitting an interval multiple times; avoid splitting re-materializable val# (for now).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58068 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
f5cd4f0d70f2da83626cb1eeefe4ae10382c584d 23-Oct-2008 Evan Cheng <evan.cheng@apple.com> Committing a good chunk of the pre-register allocation live interval splitting pass. It's handling simple cases and appear to do good things. Next: avoid splitting an interval multiple times; renumber registers when possible; record stack slot live intervals for coloring; rematerialize defs when possible.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58044 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
f522068412218cd14b2c2df74a3437717d255381 16-Oct-2008 Dan Gohman <gohman@apple.com> Trim #includes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57649 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
dc37786595beedd0a68d8e2cbd91ae53ad58d133 30-Sep-2008 Evan Cheng <evan.cheng@apple.com> Re-apply 56835 along with header file changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56848 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
fa48f941304f29f967e0a7fc6807d7026ba99b7b 19-Sep-2008 Dale Johannesen <dalej@apple.com> Remove AsmThatEarlyClobber etc. from LiveIntervalAnalysis
and redo as linked list walk. Logic moved into RA.
Per review feedback.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56326 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
91aac1015e6714d959801dd8d60f55a72827dc4d 17-Sep-2008 Dale Johannesen <dalej@apple.com> Add a bit to mark operands of asm's that conflict
with an earlyclobber operand elsewhere. Propagate
this bit and the earlyclobber bit through SDISel.
Change linear-scan RA not to allocate regs in a way
that conflicts with an earlyclobber. See also comments.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56290 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
ae73dc1448d25b02cabc7c64c86c64371453dda8 04-Sep-2008 Dan Gohman <gohman@apple.com> Tidy up several unbeseeming casts from pointer to intptr_t.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55779 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
2dba6a1bdb7d78b4d1e5e69b81989816193e6b70 22-Aug-2008 Chris Lattner <sabre@nondot.org> consolidate DenseMapInfo implementations, and add one for std::pair.
Patch contributed by m-s.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55167 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
d6664311acbd05a8a710ccea8f9f5fdbfa35f834 18-Aug-2008 Owen Anderson <resistor@mac.com> Resurrect some ancient code to add spill ranges without attempting folding, remat, or splitting. This code has been updated to current APIs
in so far as it compiles and, in theory, works, but does not take advantage of recent advancements. For instance, it could be improved by using
MachineRegisterInfo::use_iterator.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54924 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
289983123ba4170c8a27e9638935818f8142bc89 14-Aug-2008 Owen Anderson <resistor@mac.com> Expunge the last uses of std::map from LiveIntervals.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54766 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
20e2839cb975a2d4ee931e1ea4c4660a36ef0177 14-Aug-2008 Owen Anderson <resistor@mac.com> Move r2iMap_ over to DenseMap from std::map.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54765 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
03857b29d8271a23943254579e6cf7b7df4b1bd3 13-Aug-2008 Owen Anderson <resistor@mac.com> Make the allocation of LiveIntervals explicit, rather than holding them in the r2iMap_ by value. This will prevent references to them from being invalidated
if the map is changed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54763 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
49bfdd63f481237fa7305525517ea0dc9e1bd23c 13-Aug-2008 Owen Anderson <resistor@mac.com> Switch this from std::map to DenseMap.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54761 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
b3e15c00086d8442f5ff6f00aeb1e2f5d8b68ee0 07-Aug-2008 Matthijs Kooijman <matthijs@stdin.nl> Silence a warning.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54462 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
ca425a2a98d7d476ccbb585a7ec63ec452210001 28-Jul-2008 Dan Gohman <gohman@apple.com> Reword a comment to be less ambiguous.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54135 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
6d69ba8a6901c69d78488cbc41f8dbf080618fde 25-Jul-2008 Dan Gohman <gohman@apple.com> Enable rematerialization of constants using AliasAnalysis::pointsToConstantMemory,
and knowledge of PseudoSourceValues. This unfortunately isn't sufficient to allow
constants to be rematerialized in PIC mode -- the extra indirection is a
complication.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54000 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
a1566f2e12ce87a5bca30bc0189a0cdbb40136a4 23-Jul-2008 Owen Anderson <resistor@mac.com> Change the heuristics used in the coalescer, register allocator, and within
live intervals itself to use an instruction count approximation that is
not affected by inserting empty indices.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53937 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
ef0732d25a9882c947984ae3f2afbef5463ba00f 10-Jul-2008 Evan Cheng <evan.cheng@apple.com> - Change the horrible N^2 isRegReDefinedByTwoAddr. Now callers must supply the operand index of def machineoperand and at most one full scan of non-implicit operands is needed.
- Change local register allocator to use the new isRegReDefinedByTwoAddr instead of reinventing the wheel.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53394 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
6b098dee286cc6fe5a5a476464d92dec5602e406 26-Jun-2008 Owen Anderson <resistor@mac.com> Remember which MachineOperand we were processing, so we don't have to scan the list to find it again later.
This speeds up live intervals from 0.37s to 0.30s on instcombine.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52745 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
f399235a03e5318804a6833580cd35cbbf9cd4db 24-Jun-2008 Owen Anderson <resistor@mac.com> Remove an incorrect comment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52660 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
a6fb5b54f3a35fdefbb03b9c7be4c6d6d53cdd35 24-Jun-2008 Owen Anderson <resistor@mac.com> Use InstrSlots::NUM rather than pre-dividing by four. Also, mark this const.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52659 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
72e04099c6f3d365b36b48834c8cd2f87efc00c2 24-Jun-2008 Owen Anderson <resistor@mac.com> Add getScaledIntervalSize, which gives a measure of the size of an interval that is independent of the scaling of
the function due to empty index slots. This is suitable for use in backend heuristics that need to reason about the density
of an interval.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52652 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
c3417609ae6e744a29be6962d4fb7811c0102d17 21-Jun-2008 Evan Cheng <evan.cheng@apple.com> Undo spill weight tweak. Need to investigate the performance regressions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52572 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
bdf34bc12bfc39de02c19fa250e83edb5924a6cf 19-Jun-2008 Evan Cheng <evan.cheng@apple.com> Minor spiller tweak to unfavor reload into load/store instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52477 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
9c3c2213647e3f1b71722d61875ebac01b65cb91 06-Jun-2008 Evan Cheng <evan.cheng@apple.com> Refine stack slot interval weight computation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52040 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
c4dc132c8a787fc41b6a162121251234aa618965 05-Jun-2008 Owen Anderson <resistor@mac.com> Add a helper for constructing new live ranges that ended from an instruction to the end of its MBB.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52012 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
15a17f548188726260c3a0eeb7a4588e2c1d6f2c 30-May-2008 Owen Anderson <resistor@mac.com> Forgot to commit this file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51786 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
80b3ce65e294a28b88c882d44a5e749a2924c9e3 28-May-2008 Owen Anderson <resistor@mac.com> Factor the numbering computation into a separate method, and add the slightest attempt at some renumbering logic, which is currently unused.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51652 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
34cd4a484e532cc463fd5a4bf59b88d13c5467c1 05-May-2008 Evan Cheng <evan.cheng@apple.com> Fix more -Wshorten-64-to-32 warnings.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50659 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
4cce6b4c7882ef0cc993d931b90bf33985c96110 11-Apr-2008 Evan Cheng <evan.cheng@apple.com> Use of implicit_def is not part of live interval. Create empty intervals for the uses when the live interval is being spilled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49542 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
419852ca8a01aecde4c0e20af6b7bd6450e70f87 03-Apr-2008 Evan Cheng <evan.cheng@apple.com> - Treat a live range defined by an implicit_def as a zero-sized one.
- Eliminate an implicit_def when it's being spilled.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49166 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
c9235d2e855c56e9aa157969f8132a05f9ba89d8 22-Mar-2008 Dan Gohman <gohman@apple.com> Don't include <map> in Pass.h, which doesn't need it. This requires
adding <map> to many files that actually do need it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48667 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
8131a50f44bd7ca5e78b08de6bea9671540d255e 14-Mar-2008 Dan Gohman <gohman@apple.com> Fix a typo in a comment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48345 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
676dd7c80b6f91178452535ac45ca58feb23cc42 11-Mar-2008 Evan Cheng <evan.cheng@apple.com> When the register allocator runs out of registers, spill a physical register around the def's and use's of the interval being allocated to make it possible for the interval to target a register and spill it right away and restore a register for uses. This likely generates terrible code but is before than aborting.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48218 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
e85fe660e4e99d30ca9292b706b8ffe6d0367dca 26-Feb-2008 Bill Wendling <isanbard@gmail.com> Detabify


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47597 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
79a0c1e46c4f7d8a2a06f4ef3e2c54d883c7fe25 25-Feb-2008 Evan Cheng <evan.cheng@apple.com> Correctly determine whether a argument load can be folded into its uses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47545 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
0cc83b6e851a16292a39d9529ba8aab9b07f0bf0 23-Feb-2008 Evan Cheng <evan.cheng@apple.com> Forgot this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47510 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
d70dbb5d627a0408eccf88033143efa62ee0e6c0 22-Feb-2008 Evan Cheng <evan.cheng@apple.com> Enable re-materialization of instructions which have virtual register operands if
the definition of the operand also reaches its uses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47475 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
8dd25288f9c79596e531b32c1b0bdfadcee7ffb9 18-Feb-2008 Roman Levenstein <romix.llvm@googlemail.com> New helper function getMBBFromIndex() that given an index in any instruction of an MBB returns a pointer the MBB. Reviewed by Evan.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47267 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
c8d044e4f779fdcfc5e7d592927740fd8f672a70 15-Feb-2008 Evan Cheng <evan.cheng@apple.com> - Removing the infamous r2rMap_ and rep() method. Now the coalescer will update
register defs and uses after each successful coalescing.
- Also removed a number of hacks and fixed some subtle kill information bugs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47167 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
b1f6f913938362b5181bbb0383d6b85f4a81c511 13-Feb-2008 Evan Cheng <evan.cheng@apple.com> Simplify.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47059 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
70071434ae6080c09ffdc8e069da92619381b930 13-Feb-2008 Evan Cheng <evan.cheng@apple.com> Initial support for copy elimination by commuting its definition MI.
PR1877.
A3 = op A2 B0<kill>
...
B1 = A3 <- this copy
...
= op A3 <- more uses

==>

B2 = op B0 A2<kill>
...
B1 = B2 <- now an identify copy
...
= op B2 <- more uses

This speeds up FreeBench/neural by 29%, Olden/bh by 12%, oopack_v1p8 by 53%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47046 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
6f0d024a534af18d9e60b3ea757376cd8a3a980e 10-Feb-2008 Dan Gohman <gohman@apple.com> Rename MRegisterInfo to TargetRegisterInfo.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46930 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
84bc5427d6883f73cfeae3da640acd011d35c006 31-Dec-2007 Chris Lattner <sabre@nondot.org> Rename SSARegMap -> MachineRegisterInfo in keeping with the idea
that "machine" classes are used to represent the current state of
the code being compiled. Given this expanded name, we can start
moving other stuff into it. For now, move the UsedPhysRegs and
LiveIn/LoveOuts vectors from MachineFunction into it.

Update all the clients to match.

This also reduces some needless #includes, such as MachineModuleInfo
from MachineFunction.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45467 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
7ed47a13356daed2a34cd2209a31f92552e3bdd8 29-Dec-2007 Chris Lattner <sabre@nondot.org> Don't attribute in file headers anymore. See llvmdev for the
discussion of this change. Boy are my fingers tired. ;-)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45411 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
22f07ffd27d1d721634d502c37267721d2e025cf 11-Dec-2007 Evan Cheng <evan.cheng@apple.com> Switch over to MachineLoopInfo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44838 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
5ef3a04b542c4e585276768fa9ca2af698ef5c87 06-Dec-2007 Evan Cheng <evan.cheng@apple.com> Fix for PR1831: if all defs of an interval are re-materializable, then it's a preferred spill candiate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44644 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
018f9b020bb12b731b0a7081578e5f82fb35092d 05-Dec-2007 Evan Cheng <evan.cheng@apple.com> - Mark last use of a split interval as kill instead of letting spiller track it.
This allows an important optimization to be re-enabled.
- If all uses / defs of a split interval can be folded, give the interval a
low spill weight so it would not be picked in case spilling is needed (avoid
pushing other intervals in the same BB to be spilled).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44601 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
d64b5c82b97ad1b74eb9fd2f23257a7899b0c307 05-Dec-2007 Evan Cheng <evan.cheng@apple.com> Add a argument to storeRegToStackSlot and storeRegToAddr to specify whether
the stored register is killed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44600 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
aee4af68ae2016afc5b4ec0c430e539c5810a766 02-Dec-2007 Evan Cheng <evan.cheng@apple.com> Remove redundant foldMemoryOperand variants and other code clean up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44517 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
e62f97c094dba44e4c259d20135167fa91912eea 01-Dec-2007 Evan Cheng <evan.cheng@apple.com> Allow some reloads to be folded in multi-use cases. Specifically testl r, r -> cmpl [mem], 0.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44479 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
cddbb83ea82e98658d9f530c50a7b9d23249afc2 30-Nov-2007 Evan Cheng <evan.cheng@apple.com> Do not fold reload into an instruction with multiple uses. It issues one extra load.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44467 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
1953d0cb7d6d27da3ad067468a7ad6dd7c4fa46e 29-Nov-2007 Evan Cheng <evan.cheng@apple.com> Fix a major performance issue with splitting. If there is a def (not def/use)
in the middle of a split basic block, create a new live interval starting at
the def. This avoid artifically extending the live interval over a number of
cycles where it is dead. e.g.

bb1:
= vr1204 (use / kill) <= new interval starts and ends here.
...
...
vr1204 = (new def) <= start a new interval here.
= vr1204 (use)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44436 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
0cbb1164b3227f25f5e5d3681800a8e50e6b9865 29-Nov-2007 Evan Cheng <evan.cheng@apple.com> Fixed various live interval splitting bugs / compile time issues.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44428 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
cada245d06959831b90f8c29f92e77beda4b71cb 28-Nov-2007 Evan Cheng <evan.cheng@apple.com> Recover compile time regression.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44386 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
81a038218171860ee4c382849c647d3dc841fe8b 17-Nov-2007 Evan Cheng <evan.cheng@apple.com> Live interval splitting:

When a live interval is being spilled, rather than creating short, non-spillable
intervals for every def / use, split the interval at BB boundaries. That is, for
every BB where the live interval is defined or used, create a new interval that
covers all the defs and uses in the BB.

This is designed to eliminate one common problem: multiple reloads of the same
value in a single basic block. Note, it does *not* decrease the number of spills
since no copies are inserted so the split intervals are *connected* through
spill and reloads (or rematerialization). The newly created intervals can be
spilled again, in that case, since it does not span multiple basic blocks, it's
spilled in the usual manner. However, it can reuse the same stack slot as the
previously split interval.

This is currently controlled by -split-intervals-at-bb.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44198 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
ffb15de60e839635d8628b0f4543638239bee39a 14-Nov-2007 Hartmut Kaiser <hartmut.kaiser@gmail.com> Fixed a compilation error.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44083 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
f2fbca68f868122d6df0bfc9952b4e4c3dfb60b7 12-Nov-2007 Evan Cheng <evan.cheng@apple.com> Refactor some code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44010 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
c92da3882ee4e18153bb36fcdf33af393aba8259 03-Nov-2007 Evan Cheng <evan.cheng@apple.com> There are times when the coalescer would not coalesce away a copy but the copy
can be eliminated by the allocator is the destination and source targets the
same register. The most common case is when the source and destination registers
are in different class. For example, on x86 mov32to32_ targets GR32_ which
contains a subset of the registers in GR32.

The allocator can do 2 things:
1. Set the preferred allocation for the destination of a copy to that of its source.
2. After allocation is done, change the allocation of a copy destination (if
legal) so the copy can be eliminated.

This eliminates 443 extra moves from 403.gcc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43662 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
cf1d7256d0bb1e9e3101bf201e4d60529b30b6ff 18-Oct-2007 Evan Cheng <evan.cheng@apple.com> Remove unnecessary include.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43117 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
a5bfc97da713ec9e185226d44e6adb4d3087b304 17-Oct-2007 Evan Cheng <evan.cheng@apple.com> Apply Chris' suggestions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43069 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
4ca980e7f9ce7b78955307c2d07001a24d3b6bef 17-Oct-2007 Evan Cheng <evan.cheng@apple.com> Clean up code that calculate MBB live-in's.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43060 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
32dfbeada7292167bb488f36a71a5a6a519ddaff 12-Oct-2007 Evan Cheng <evan.cheng@apple.com> EXTRACT_SUBREG coalescing support. The coalescer now treats EXTRACT_SUBREG like
(almost) a register copy. However, it always coalesced to the register of the
RHS (the super-register). All uses of the result of a EXTRACT_SUBREG are sub-
register uses which adds subtle complications to load folding, spiller rewrite,
etc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42899 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
f3bb2e65d12857f83b273f4ecab013680310bbbc 05-Sep-2007 Evan Cheng <evan.cheng@apple.com> Use pool allocator for all the VNInfo's to improve memory access locality. This reduces coalescing time on siod Mac OS X PPC by 35%. Also remove the back ptr from VNInfo to LiveInterval and other tweaks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41729 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
35b35c5c320a71e4611fe2101452da685f8eeda0 30-Aug-2007 Evan Cheng <evan.cheng@apple.com> Add a variant of foldMemoryOperand to fold any load / store, not just load / store from / to stack slots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41597 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
7ecb38be0a533e7b9c7d3b8e9b5c8a6fa5f6b349 29-Aug-2007 Evan Cheng <evan.cheng@apple.com> Change LiveRange so it keeps a pointer to the VNInfo rather than an index.
Changes related modules so VNInfo's are not copied. This decrease
copy coalescing time by 45% and overall compilation time by 10% on siod.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41579 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
549f27d3070195d6647b796841a5291b4549e8e0 14-Aug-2007 Evan Cheng <evan.cheng@apple.com> Re-implement trivial rematerialization. This allows def MIs whose live intervals that are coalesced to be rematerialized.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41060 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
2513330de8f8020d15d5bc96640a0957b7c733b9 08-Jun-2007 David Greene <greened@obbligato.org> Factor live variable analysis so it does not do register coalescing
simultaneously. Move that pass to SimpleRegisterCoalescing.

This makes it easier to implement alternative register allocation and
coalescing strategies while maintaining reuse of the existing live
interval analysis.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37520 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
2f6cb2b14c5811b154b06163355b3c8bc8b73231 14-May-2007 Evan Cheng <evan.cheng@apple.com> Fix for PR1406:

v1 =
r2 = move v1
= op r2<kill>
...
r2 = move v1
= op r2<kill>

Clear the first r2 kill if v1 and r2 are joined.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37050 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
ecd94c804a563f2a86572dcf1d2e81f397e19daa 06-May-2007 Nick Lewycky <nicholas@mxc.ca> Fix typo in comment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36873 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
1997473cf72957d0e70322e2fe6fe2ab141c58a6 03-May-2007 Devang Patel <dpatel@apple.com> Drop 'const'


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36662 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
3e15bf33e024b9df9e89351a165acfdb1dde51ed 02-May-2007 Devang Patel <dpatel@apple.com> Use 'static const char' instead of 'static const int'.
Due to darwin gcc bug, one version of darwin linker coalesces
static const int, which defauts PassID based pass identification.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36652 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
794fd75c67a2cdc128d67342c6d88a504d186896 01-May-2007 Devang Patel <dpatel@apple.com> Do not use typeinfo to identify pass in pass manager.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36632 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
24a3cc4c83e5edb25fadf7b8979a26b4451795c6 25-Apr-2007 Evan Cheng <evan.cheng@apple.com> Fix for PR1306.
- A register def / use now implicitly affects sub-register liveness but does
not affect liveness information of super-registers.
- Def of a larger register (if followed by a use later) is treated as
read/mod/write of a smaller register.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36434 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
faf05bbaea5893488dac4eee58700912ddfe28cc 18-Apr-2007 Evan Cheng <evan.cheng@apple.com> Don't populate TryAgainList when coalescing only physical registers with virtual registers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36240 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
20b0abc24fb3fa15098b7cb12c7762fb0770e133 17-Apr-2007 Evan Cheng <evan.cheng@apple.com> Copy coalescing change to prevent a physical register from being pin to a
long live interval that has low usage density.
1. Change order of coalescing to join physical registers with virtual
registers first before virtual register intervals become too long.
2. Check size and usage density to determine if it's worthwhile to join.
3. If joining is aborted, assign virtual register live interval allocation
preference field to the physical register.
4. Register allocator should try to allocate to the preferred register
first (if available) to create identify moves that can be eliminated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36218 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
bcfd4665b5597ed1ba679584a69080396d68bcf9 02-Apr-2007 Evan Cheng <evan.cheng@apple.com> Ugh. Copy coalescer does not update register numbers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35600 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
88d1f587d2205b4275dc4c0319a5f2d4d1e6fd42 01-Mar-2007 Evan Cheng <evan.cheng@apple.com> Track all joined registers and eliminate unneeded kills after all joining are done.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34767 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
edeffb37dc41591b3d3943a5c02c04e55d348524 26-Feb-2007 Evan Cheng <evan.cheng@apple.com> Joining an interval with a dead copy instruction. Shorten the live range to the last use.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34645 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
7d35c0e2b987a631019feb746ea577346abb1fee 23-Feb-2007 Evan Cheng <evan.cheng@apple.com> Copy and paste silliness.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34507 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
30cac02a925c9d56613711b0e77099cb7252bc9b 23-Feb-2007 Evan Cheng <evan.cheng@apple.com> Remove unnecessary isKill properties if a live range has been lengthened due to coalescing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34503 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
9b25b8ca24d6df2e097741dcc15016772ee4eda7 21-Feb-2007 Jim Laskey <jlaskey@mac.com> Allow for live in registers for eh landing pads.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34475 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
b371f457b0ea4a652a9f526ba4375c80ae542252 19-Feb-2007 Evan Cheng <evan.cheng@apple.com> Re-apply my liveintervalanalysis changes. Now with PR1207 fixes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34428 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
a284cbf667e11660840dc7bae3ee9eeaa3c7cbd2 19-Feb-2007 Reid Spencer <rspencer@reidspencer.com> For PR1207:
Revert patches that caused the problem. Evan, please investigate and reapply
when you've discovered the problem.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34399 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
aa7976199c0dfe45f52f327b74fc547ad2c5fffd 17-Feb-2007 Evan Cheng <evan.cheng@apple.com> - Changes how function livein's are handled, they now have a start index of 0.
- When coalescing a copy MI, if its destination is "dead", propagate the
property to the source MI's destination if there are no intervening uses.
- Detect dead function live-in's and remove them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34383 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
61de82d8853a02fe39c47302432abb70a586704f 15-Feb-2007 Evan Cheng <evan.cheng@apple.com> Use BitVector instead of vector<bool> which can be extremely slow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34302 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
94c002a190cd2e3a52b1510bc997e53d63af0b3b 01-Feb-2007 Chris Lattner <sabre@nondot.org> rename DenseMap to IndexedMap.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33749 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
5c7e326585f3a543388ba871c3425f7664cd9143 17-Dec-2006 Bill Wendling <isanbard@gmail.com> Added an automatic cast to "std::ostream*" etc. from OStream. We then can
rework the hacks that had us passing OStream in. We pass in std::ostream*
instead, check for null, and then dispatch to the correct print() method.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32636 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
01352aa1875ee08ae847cce398322042830d92ed 16-Nov-2006 Bill Wendling <isanbard@gmail.com> Added a new method "CreateNewLiveInterval" which, given a list of
LiveRanges, creates a new LiveInterval from them. The LiveRanges should
have existed already in another LiveInterval, but removed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31780 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
428b92eb83b457b71d29d1d4b7900d36a0ce9a53 15-Sep-2006 Chris Lattner <sabre@nondot.org> Keep track of the start of MBB's in a separate map from instructions. This
is faster and is needed for future improvements.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30383 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
c7695eb5047d7a9ad75e46f178f6e7f066a94283 14-Sep-2006 Chris Lattner <sabre@nondot.org> revert accidentally committed file


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30323 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
2540813e5d583fdc40458a53badb323ae5d83a07 14-Sep-2006 Chris Lattner <sabre@nondot.org> Remove dead methods, add getNumBlockIDs() method


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30322 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
6b128bdc58a496e9f08e4d09416330320761baff 03-Sep-2006 Chris Lattner <sabre@nondot.org> Avoid beating on the mi2i map when we know the answer already.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30066 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
0f592b388f6ea6bf9cd925de791d933f7a27b248 03-Sep-2006 Chris Lattner <sabre@nondot.org> Fix a typo pointed out by Gabor


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30058 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
1acb17cb8392dce33079fe45f383944ec6616757 02-Sep-2006 Chris Lattner <sabre@nondot.org> Iteration is required for some cases, even if they don't occur in crafty.
Restore it, which re-fixes X86/2006-08-21-ExtraMovInst.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30050 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
6bda49fd9fbc356eb5cf8a8547bd03acb4fa7036 02-Sep-2006 Chris Lattner <sabre@nondot.org> new method


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30048 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
a2a8f0919d6d000e894f31b8cb416b4fbe17bb07 01-Sep-2006 Chris Lattner <sabre@nondot.org> Iterative coallescing doesn't buy us anything (we get identical results on
crafty with and without it). Removing it speeds up live intervals 6%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30010 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
91725b75852443923b419fd23215194cfc65dd88 31-Aug-2006 Chris Lattner <sabre@nondot.org> avoid calling the virtual isMoveInstr method endlessly by caching its results.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29994 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
6d8fbef015ff836bcb8f64f52c49805e43f8ea9f 30-Aug-2006 Chris Lattner <sabre@nondot.org> Teach the coallescer to coallesce live intervals joined by an arbitrary
number of copies, potentially defining live ranges that appear to have
differing value numbers that become identical when coallsced. Among other
things, this fixes CodeGen/X86/shift-coalesce.ll and PR687.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29968 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
f7da2c7b0c6293c268881628fc351bed7763f1f4 25-Aug-2006 Chris Lattner <sabre@nondot.org> Take advantage of the recent improvements to the liveintervals set (tracking
instructions which define each value#) to simplify and improve the coallescer.
In particular, this patch:

1. Implements iterative coallescing.
2. Reverts an unsafe hack from handlePhysRegDef, superceeding it with a
better solution.
3. Implements PR865, "coallescing" away the second copy in code like:

A = B
...
B = A

This also includes changes to symbolically print registers in intervals
when possible.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29862 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
647c15e58ed4c3fda81041d401ca7547639958dc 12-May-2006 Evan Cheng <evan.cheng@apple.com> Backing out fix for PR770. Need to re-apply it after live range splitting is possible


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28236 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
e73701df947d23c65e96abc71a3be40ad77058ee 09-May-2006 Evan Cheng <evan.cheng@apple.com> PR 770 - permit coallescing of registers in subset register classes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28197 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
410354fe0c052141dadeca939395743f8dd58e38 22-Feb-2006 Chris Lattner <sabre@nondot.org> Make the LLVM headers "-ansi -pedantic -Wno-long-long" clean.

Patch by Martin Partel!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26313 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
f38a05d67b42df78199b6dfbbde27b05621e0d2d 29-Jan-2006 Chris Lattner <sabre@nondot.org> revert an accidental commit


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25781 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
ac0d7238258defe72b1aad53d7f48201b91df795 29-Jan-2006 Chris Lattner <sabre@nondot.org> Make ConstantFP legalize into TargetConstantFP like other leaf nodes do. Allow
targets to register custom legalizers for ConstantFP in case there isn't a
fixed list of constants that can be generated. On some architectures (ia64?)
all fp immediates are legal.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25769 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
09d3b75af68304672f478bb06c671b7dcbf61bb0 21-Oct-2005 Chris Lattner <sabre@nondot.org> add missing prototype


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23867 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
779a6513fe92865818dd0ff6ed9a0646a095774b 21-Sep-2005 Chris Lattner <sabre@nondot.org> move the live interval headers out of lib/CodeGen/


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23399 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
5ab6f5fe666d0e3403d9b777324d1a1999118153 02-Sep-2005 Chris Lattner <sabre@nondot.org> Teach live intervals to not crash on dead livein regs


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23206 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
f768bba43f5c036039851d2fcca8212edca18467 10-Mar-2005 Chris Lattner <sabre@nondot.org> Allow the live interval analysis pass to be a bit more aggressive about
numbering values in live ranges for physical registers.

The alpha backend currently generates code that looks like this:

vreg = preg
...
preg = vreg
use preg
...
preg = vreg
use preg

etc. Because vreg contains the value of preg coming in, each of the
copies back into preg contain that initial value as well.

In the case of the Alpha, this allows this testcase:

void "foo"(int %blah) {
store int 5, int *%MyVar
store int 12, int* %MyVar2
ret void
}

to compile to:

foo:
ldgp $29, 0($27)
ldiq $0,5
stl $0,MyVar
ldiq $0,12
stl $0,MyVar2
ret $31,($26),1

instead of:

foo:
ldgp $29, 0($27)
bis $29,$29,$0
ldiq $1,5
bis $0,$0,$29
stl $1,MyVar
ldiq $1,12
bis $0,$0,$29
stl $1,MyVar2
ret $31,($26),1

This does not seem to have any noticable effect on X86 code.

This fixes PR535.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
ce9653ce449f1409815547e1bf60abcd1332d2c9 07-Dec-2004 Reid Spencer <rspencer@reidspencer.com> For PR387:\
Make only one print method to avoid overloaded virtual warnings when \
compiled with -Woverloaded-virtual


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18589 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
70ca358b7d540b6061236ddf757085042873c12c 30-Sep-2004 Chris Lattner <sabre@nondot.org> * Wrap some comments to 80 cols
* Add const_iterator stuff
* Add a print method, which means that I can now call dump() from the
debugger.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16612 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
5d0d1e350a30772fd70798b5733bb060febd7b0d 08-Sep-2004 Alkis Evlogimenos <alkis@evlogimenos.com> Use a DenseMap for mapping reg->reg. This improves the LiveInterval
analysis running time from 2.7869secs to 2.5226secs on 176.gcc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16244 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
5327801fb87e3eda52a33f82e6211181030ecb93 27-Aug-2004 Alkis Evlogimenos <alkis@evlogimenos.com> Use newly added API in MRegisterInfo.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16060 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
706515727c6d024015fffded2b3109a4f0ac5299 04-Aug-2004 Alkis Evlogimenos <alkis@evlogimenos.com> Clean up whitespace.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15490 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
1a8ea01f01b30e28e4e3ac0e3a344c4a4d579270 04-Aug-2004 Alkis Evlogimenos <alkis@evlogimenos.com> Convert indentation to 2 spaces.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15489 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
a1613db62fec94845aa8306232fb665273615bad 24-Jul-2004 Alkis Evlogimenos <alkis@evlogimenos.com> Change std::map<unsigned, LiveInterval*> into a std::map<unsigned,
LiveInterval>. This saves some space and removes the pointer
indirection caused by following the pointer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15167 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
4df98e546dd0cca214df661ae1072e1a3f6eff98 24-Jul-2004 Chris Lattner <sabre@nondot.org> Completely eliminate the intervals_ list. instead, the r2iMap_ maintains
ownership of the intervals.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15155 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
0f4c076140cbd9360650f75a896c88dcfacc526e 24-Jul-2004 Chris Lattner <sabre@nondot.org> Add a new differingRegisterClasses method
make overlapsAliases take pointers instead of references
fix indentation


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15153 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
f35fef7060c465dd7b578bf6339a18e8a8911888 23-Jul-2004 Chris Lattner <sabre@nondot.org> More minor changes:
* Inline some functions
* Eliminate some comparisons from the release build

This is good for another .3 on gcc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15144 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
4dc54ae0d950764443ee6a475cc9212d37074747 23-Jul-2004 Chris Lattner <sabre@nondot.org> Speedup debug builds a bit


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15137 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
a3b8b5c0e0a1d0942288568b2012592184ca67c5 23-Jul-2004 Chris Lattner <sabre@nondot.org> Rename LiveIntervals.(cpp|h) -> LiveIntervalAnalysis.(cpp|h)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15135 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
fb449b9ea5a37fb411aee7d42f6a76119602288d 23-Jul-2004 Chris Lattner <sabre@nondot.org> Pull the LiveRange and LiveInterval classes out of LiveIntervals.h (which
will soon be renamed) into their own file. The new file should not emit
DEBUG output or have other side effects. The LiveInterval class also now
doesn't know whether its working on registers or some other thing.

In the future we will want to use the LiveInterval class and friends to do
stack packing. In addition to a code simplification, this will allow us to
do it more easily.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15134 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
ec2bc645053e9051ada01fac6a555df17a85c91d 23-Jul-2004 Chris Lattner <sabre@nondot.org> Improve comments a bit

Use an explicit LiveRange class to represent ranges instead of an std::pair.
This is a minor cleanup, but is really intended to make a future patch simpler
and less invasive.

Alkis, could you please take a look at LiveInterval::liveAt? I suspect that
you can add an operator<(unsigned) to LiveRange, allowing us to speed up the
upper_bound call by quite a bit (this would also apply to other callers of
upper/lower_bound). I would do it myself, but I still don't understand that
crazy liveAt function, despite the comment. :)

Basically I would like to see this:
LiveRange dummy(index, index+1);
Ranges::const_iterator r = std::upper_bound(ranges.begin(),
ranges.end(),
dummy);

Turn into:
Ranges::const_iterator r = std::upper_bound(ranges.begin(),
ranges.end(),
index);


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15130 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
fe1630b43ef3e9506fde9780108c2af0431393e9 23-Jul-2004 Chris Lattner <sabre@nondot.org> Force coallescing of live ranges that have a single definition, even if they
interfere. Because these intervals have a single definition, and one of them
is a copy instruction, they are always safe to merge even if their lifetimes
interfere. This slightly reduces the amount of spill code, for example on
252.eon, from:

12837 spiller - Number of loads added
7604 spiller - Number of stores added
5842 spiller - Number of register spills
18155 liveintervals - Number of identity moves eliminated after coalescing

to:

12754 spiller - Number of loads added
7585 spiller - Number of stores added
5803 spiller - Number of register spills
18262 liveintervals - Number of identity moves eliminated after coalescing

The much much bigger win would be to merge intervals with multiple definitions
(aka phi nodes) but this is not that day.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15124 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
1c5c0444f1326b58cf05015651f36f2b04ca322d 19-Jul-2004 Chris Lattner <sabre@nondot.org> Split joinIntervals into two methods


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15003 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
6b929060107fe9bd04931436a5d959c13eb39584 19-Jul-2004 Chris Lattner <sabre@nondot.org> fill comment to 80 cols

remove map that is not needed


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14988 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
418da55c89c9ba355b51dceecb16f4388ef35119 21-Jun-2004 Chris Lattner <sabre@nondot.org> Rename Interval class to LiveInterval to avoid conflicting with the already
existing llvm::Interval class.

Patch contributed by Vladimir Prus!
http://mail.cs.uiuc.edu/pipermail/llvmbugs/2004-June/000710.html


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14281 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
6924063bf2fdcc455bcb87807ab452ab7fc69773 30-May-2004 Alkis Evlogimenos <alkis@evlogimenos.com> Pull Interval class out of LiveIntervals.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13910 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
26f5a69e52b64e035d26c135979a39b39fd6ba3e 30-May-2004 Alkis Evlogimenos <alkis@evlogimenos.com> When spilling an register, introduce a new temporary for each of its
spills. This allows for more flexibility when allocating registers for
spill code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13907 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
f717a0569886be297903078bcd779e84254d0010 29-May-2004 Alkis Evlogimenos <alkis@evlogimenos.com> Remove defs vector from live intervals.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13892 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
9a8b490735d216435862a3d52e669357f165550f 09-Apr-2004 Alkis Evlogimenos <alkis@evlogimenos.com> Add definition list to each live interval.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12791 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
5f37502bfbadfa65de087627bd67fd58bb03725c 01-Mar-2004 Alkis Evlogimenos <alkis@evlogimenos.com> Add the long awaited memory operand folding support for linear scan


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12058 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
7200c6b82acb8401048a2bc8a423f23b48db6731 22-Feb-2004 Alkis Evlogimenos <alkis@evlogimenos.com> Abstract merging of ranges away from number of slots per instruction.

Also make it less aggressive as the current implementation breaks in
some cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11696 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
39a0d5c1123cfe4ddf826690b6744cc7248e3149 20-Feb-2004 Alkis Evlogimenos <alkis@evlogimenos.com> Too many changes in one commit:

1. LiveIntervals now implement a 4 slot per instruction model. Load,
Use, Def and a Store slot. This is required in order to correctly
represent caller saved register clobbering on function calls,
register reuse in the same instruction (def resues last use) and
also spill code added later by the allocator. The previous
representation (2 slots per instruction) was insufficient and as a
result was causing subtle bugs.

2. Fixes in spill code generation. This was the major cause of
failures in the test suite.

3. Linear scan now has core support for folding memory operands. This
is untested and not enabled (the live interval update function does
not attempt to fold loads/stores in instructions).

4. Lots of improvements in the debugging output of both live intervals
and linear scan. Give it a try... it is beautiful :-)

In summary the above fixes all the issues with the recent reserved
register elimination changes and get the allocator very close to the
next big step: folding memory operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11654 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
52f8f56ef4efaceee7535d804bf0a844cf530c57 19-Feb-2004 Alkis Evlogimenos <alkis@evlogimenos.com> Move unused typedefs in private section. Add method to return interval
given a register.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11608 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
7093d37304cd9f4b8208e50a0f68a0a507a18ac2 17-Feb-2004 Alkis Evlogimenos <alkis@evlogimenos.com> Add LiveIntervals::Interval::empty() member function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11520 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
843b160a2040b3ec4d3452678450afa11704c473 15-Feb-2004 Alkis Evlogimenos <alkis@evlogimenos.com> Eliminate the use of spill (reserved) registers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11476 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
08cec00588ec1a8fa85b208555f006d7396ae7a4 31-Jan-2004 Alkis Evlogimenos <alkis@evlogimenos.com> Merge safe parts from last night's buggy commit. These do not break
any test cases :-)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11032 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
4d46e1e521c0df1990ea50f8146d22bd77ea71a6 31-Jan-2004 Alkis Evlogimenos <alkis@evlogimenos.com> Revert last night's changes as they broke some tests. Will remerge parts of the patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11029 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
32bdd4ea65f58e3227176b9a5a43013fb13f06a5 31-Jan-2004 Alkis Evlogimenos <alkis@evlogimenos.com> Several performance enhancements and cleanups from Chris.

Simplification of LiveIntervals::Interval::overlaps() and addition of
examples to overlaps() and liveAt() to make them clearer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11028 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
79b0c3f0b9d91bbda354a2c6f22b6578655a5143 23-Jan-2004 Alkis Evlogimenos <alkis@evlogimenos.com> Fix failing test cases with joined live intervals. It turns out that
when joining we need to check if we overlap with the second interval
or any of its aliases.

Also make joining intervals the default.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10973 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
e88280a4224730dcf8076e0d9a20973c5761fd06 23-Jan-2004 Alkis Evlogimenos <alkis@evlogimenos.com> Add option to join live intervals. Two intervals are joined if there
is a move between two registers, at least one of the registers is
virtual and the two live intervals do not overlap.

This results in about 40% reduction in intervals, 30% decrease in the
register allocators running time and a 20% increase in peephole
optimizations (mainly move eliminations).

The option can be enabled by passing -join-liveintervals where
appropriate.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10965 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
3b02cbe75224d91899e91a7688cac3052be4e516 16-Jan-2004 Alkis Evlogimenos <alkis@evlogimenos.com> Fold open interval ends handling into
LiveIntervals::Interval::expiredAt() and simplify regalloc code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10894 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
f5f1689ed28025cef601034052ef9c214797e8af 16-Jan-2004 Alkis Evlogimenos <alkis@evlogimenos.com> Use a list instead of a vector to store intervals. This will be needed
when we join intervals and one of the two will need to be removed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10892 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
1a119e24106810310825f44c7bfd232d3272e639 13-Jan-2004 Alkis Evlogimenos <alkis@evlogimenos.com> Remove allocatable registers vector. It is already provided by
LiveVariables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10830 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
26bfc08b80c904c71487ac1ab49a8b3a15a8d3e9 28-Dec-2003 Alkis Evlogimenos <alkis@evlogimenos.com> Add coalescing to register allocator. A hint is added to each interval
which denotes the register we would like to be assigned to (virtual or
physical). In register allocation, if this hint exists and we can map
it to a physical register (it is either a physical register or it is a
virtual register that already got assigned to a physical one) we use
that register if it is available instead of a random one in the free
pool.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10634 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
6b4edbaaf9021e0434f0ce0c3724eb43ed41b770 21-Dec-2003 Alkis Evlogimenos <alkis@evlogimenos.com> Change weight into a float so that we can take into account the
nesting level when computing it. Right now the allocator uses:

w = sum_over_defs_uses( 10 ^ nesting level );


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10569 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
169cfd01964fc03828a7f2cad5d710890fbb08d8 21-Dec-2003 Alkis Evlogimenos <alkis@evlogimenos.com> Add support for inactive intervals. This effectively reuses registers
for live ranges that fall into assigned registers' holes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10566 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
485ec3c21efcb6388911f654a187c49ad04e86e6 18-Dec-2003 Alkis Evlogimenos <alkis@evlogimenos.com> Rename LiveIntervals::expired() to LiveIntervals::expiredAt().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10511 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
dd2cc65f34f9b7bfda1cd0c42becedfc361d46f8 18-Dec-2003 Alkis Evlogimenos <alkis@evlogimenos.com> Handle multiple virtual register definitions gracefully.

Move some of the longer LiveIntervals::Interval method out of the
header and add debug information to them. Fix bug and simplify range
merging code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10509 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
b27ef248f579b354aab434f63c417ab1103e47e2 05-Dec-2003 Alkis Evlogimenos <alkis@evlogimenos.com> Move operator<<(std::ostream&, const LiveInterval&) out of the header file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10290 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
ff0cbe175df40e0d2b36e59c6fb72f211f1cba4c 20-Nov-2003 Alkis Evlogimenos <alkis@evlogimenos.com> Merging the linear scan register allocator in trunk. It currently passes most tests under test/Programs/SingleSource/Benchmarks/Shootout so development will continue on trunk. The allocator is not enabled by default. You will need to pass -regallo=linearscan to lli or llc to use it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10103 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h