History log of /external/llvm/lib/CodeGen/RegAllocPBQP.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
781f5b3953a6ffcf878cebecf1f121a237eff5ba 01-Jul-2013 Lang Hames <lhames@gmail.com> Make PBQP require/preserve MachineLoopInfo - the spiller requires it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185378 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
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/lib/CodeGen/RegAllocPBQP.cpp
604b3573f955d61ba87215c25ba2f52477c71ecc 15-Apr-2013 Andy Gibbs <andyg1001@hotmail.co.uk> Replace uses of the deprecated std::auto_ptr with OwningPtr.

This is a rework of the broken parts in r179373 which were subsequently reverted in r179374 due to incompatibility with C++98 compilers. This version should be ok under C++98.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179520 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
3389e10d675f7723d3ab24deda60dfba568b42c0 12-Apr-2013 Benjamin Kramer <benny.kra@googlemail.com> Revert broken pieces of r179373.

You can't copy an OwningPtr, and move semantics aren't available in C++98.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179374 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
200241e4de11981523b3d14f3acab6129efed701 12-Apr-2013 Andy Gibbs <andyg1001@hotmail.co.uk> Replace uses of the deprecated std::auto_ptr with OwningPtr.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179373 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
0b8c9a80f20772c3793201ab5b251d3520b9cea3 02-Jan-2013 Chandler Carruth <chandlerc@gmail.com> Move all of the header files which are involved in modelling the LLVM IR
into their new header subdirectory: include/llvm/IR. This matches the
directory structure of lib, and begins to correct a long standing point
of file layout clutter in LLVM.

There are still more header files to move here, but I wanted to handle
them in separate commits to make tracking what files make sense at each
layer easier.

The only really questionable files here are the target intrinsic
tablegen files. But that's a battle I'd rather not fight today.

I've updated both CMake and Makefile build systems (I think, and my
tests think, but I may have missed something).

I've also re-sorted the includes throughout the project. I'll be
committing updates to Clang, DragonEgg, and Polly momentarily.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171366 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
980bddfb1c26e2e9374d1645f9ae26c44742606f 04-Dec-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Use MRI::getSimpleHint() instead of getRegAllocPref() in remaining cases.

Targets can provide multiple hints now, so getRegAllocPref() doesn't
make sense any longer because it only returns one preferred register.
Replace it with getSimpleHint() in the remaining heuristics. This
function only

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169188 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
d04a8d4b33ff316ca4cf961e06c9e312eff8e64f 03-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Use the new script to sort the includes of every file under lib.

Sooooo many of these had incorrect or strange main module includes.
I have manually inspected all of these, and fixed the main module
include to be the nearest plausible thing I could find. If you own or
care about any of these source files, I encourage you to take some time
and check that these edits were sensible. I can't have broken anything
(I strictly added headers, and reordered them, never removed), but they
may not be the headers you'd really like to identify as containing the
API being implemented.

Many forward declarations and missing includes were added to a header
files to allow them to parse cleanly when included first. The main
module rule does in fact have its merits. =]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169131 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
1ead68d769f27f6d68d4aaeffe4199fa2cacbc95 28-Nov-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Make the LiveRegMatrix analysis available to targets.

No functional change, just moved header files.

Targets can inject custom passes between register allocation and
rewriting. This makes it possible to tweak the register allocation
before rewriting, using the full global interference checking available
from LiveRegMatrix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168806 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
18bb0545ff79b85ef424e95e2170e3a06f11b735 28-Nov-2012 Chad Rosier <mcrosier@apple.com> Revert r168630, r168631, and r168633 as these are causing nightly test failures.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168751 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
728aede2e9b436c7c3748379f01aa7ca42cd917e 27-Nov-2012 Chad Rosier <mcrosier@apple.com> Now that the X86 Maximal Stack Alignment Check pass has been removed (i.e.,
r168627), we no longer need to call the freezeReservedRegs() function a second
time. Previously, this pass was conservatively adding the FP to the set of
reserved registers, requiring the second update to the reserved registers.
rdar://12719844

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168631 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
8a5ec5d41590118c5d2d5a86213bef0a80255b2e 29-Oct-2012 Lang Hames <lhames@gmail.com> Remove unused typedef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166910 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
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/lib/CodeGen/RegAllocPBQP.cpp
fb9ebbf236974beac31705eaeb9f50ab585af6ab 15-Oct-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Switch most getReservedRegs() clients to the MRI equivalent.

Using the cached bit vector in MRI avoids comstantly allocating and
recomputing the reserved register bit vector.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165983 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
8a8cf9617cdc735f0425e828bb7a6f401c0cf0f6 10-Oct-2012 Lang Hames <lhames@gmail.com> My earlier "fix" for PBQP (see r165201) was incorrect. The real issue was that
checkRegMaskInterference only initializes the bitmask on the first interference.

This fixes PR14027 and (re)fixes PR13945.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165608 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
442c59f0a2fc3e596d0ce1f13b4a6849b2f46cc4 04-Oct-2012 Lang Hames <lhames@gmail.com> Fix reg mask slot test, and preserve LiveIntervals and VirtRegMap in the PBQP
allocator. Fixes PR13945.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165201 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
15d0c81b2496a025af30a78e3a36fd7f05b165ef 05-Sep-2012 Roman Divacky <rdivacky@freebsd.org> Remove unused typedefs gcc4.8 warns about.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163225 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
96601ca332ab388754ca4673be8973396fea2ddd 22-Aug-2012 Craig Topper <craig.topper@gmail.com> Add a getName function to MachineFunction. Use it in places that previously did getFunction()->getName(). Remove includes of Function.h that are no longer needed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162347 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
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/lib/CodeGen/RegAllocPBQP.cpp
0f3c892cdecd6c0978341b7ca5e1abaeafd893ea 21-Jun-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Remove spurious typedefs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
312244747c329f1d98c05afe78e3c90593e2fcb2 21-Jun-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Remove the RenderMachineFunction HTML output pass.

I don't think anyone has been using this functionality for a while, and
it is getting in the way of refactoring now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158876 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
3b30bca16f7ab002bcd5058b3f3a044a267541e0 21-Jun-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Teach PBQPBuilder::build() about regunit interference.

Filter out physreg candidates with regunit interferrence.
Also compute regmask interference more efficiently.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158864 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
d67582e2767df96610ba8dc1835ad4bf99fc77e8 20-Jun-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Avoid iterating with LiveIntervals::iterator.

That is a DenseMap iterator keyed by pointers, so the iteration order is
nondeterministic.

I would like to replace the DenseMap with an IndexedMap which doesn't
allow iteration.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158856 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
fe17bdbb50efe2f7f68d0b99e55ae52bd9477978 09-Jun-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Also compute MBB live-in lists in the new rewriter pass.

This deduplicates some code from the optimizing register allocators, and
it means that it is now possible to change the register allocators'
solutions simply by editing the VirtRegMap between the register
allocator pass and the rewriter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158249 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
05ec712e7f75635abbdd84dced69f4a45fe0f541 09-Jun-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Reintroduce VirtRegRewriter.

OK, not really. We don't want to reintroduce the old rewriter hacks.

This patch extracts virtual register rewriting as a separate pass that
runs after the register allocator. This is possible now that
CodeGen/Passes.cpp can configure the full optimizing register allocator
pipeline.

The rewriter pass uses register assignments in VirtRegMap to rewrite
virtual registers to physical registers, and it inserts kill flags based
on live intervals.

These finalization steps are the same for the optimizing register
allocators: RABasic, RAGreedy, and PBQP.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158244 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
a7542d5f870c5d98960d1676e23ac1d1d975d7e5 06-Jun-2012 Benjamin Kramer <benny.kra@googlemail.com> Remove unused private fields found by clang's new -Wunused-private-field.

There are some that I didn't remove this round because they looked like
obvious stubs. There are dead variables in gtest too, they should be
fixed upstream.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158090 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
396618b43a85e12d290a90b181c6af5d7c0c5f11 02-Jun-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Switch all register list clients to the new MC*Iterator interface.

No functional change intended.

Sorry for the churn. The iterator classes are supposed to help avoid
giant commits like this one in the future. The TableGen-produced
register lists are getting quite large, and it may be necessary to
change the table representation.

This makes it possible to do so without changing all clients (again).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157854 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
d76938788b4b682043a74befbb6320ce0077ddc9 23-May-2012 Patrik Hägglund <patrik.h.hagglund@ericsson.com> Small fix for the debug output from PBQP (PR12822).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157319 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
20942dcd8634ad75091fe89669868cfebf74e869 19-May-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Allow LiveRangeEdit to be created with a NULL parent.

The dead code elimination with callbacks is still useful.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157100 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
789d5d85ba6e9259a8e0f0bcfbd06a59ad164512 03-Apr-2012 Pete Cooper <peter_cooper@apple.com> Moved LiveRangeEdit.h so that it can be called from other parts of the backend, not just libCodeGen

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153906 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
8a06af96698537377275dd7848db69915638dd26 03-Apr-2012 Pete Cooper <peter_cooper@apple.com> Refactored the LiveRangeEdit interface so that MachineFunction, TargetInstrInfo, MachineRegisterInfo, LiveIntervals, and VirtRegMap are all passed into the constructor and stored as members instead of passed in to each method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153903 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
20df03ccd572aefadc3d68e4abc2e58c0bef9ff7 27-Mar-2012 Lang Hames <lhames@gmail.com> Add a debug option to dump PBQP graphs during register allocation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153483 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
f1113ef452871b88c086419fb2abf58da0088110 23-Mar-2012 Lang Hames <lhames@gmail.com> Add support for register masks to PBQP.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153341 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
e4fd907e72a599eddfa7a81eac4366b5b82523e3 04-Mar-2012 Craig Topper <craig.topper@gmail.com> Use uint16_t to store register overlaps to reduce static data.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152001 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
b6632ba380cf624e60fe16b03d6e21b05dd07724 04-Mar-2012 Craig Topper <craig.topper@gmail.com> Use uint16_t instead of unsigned to store registers in reg classes. Reduces static data size.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151998 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
19273aec441411b4d571fdb87c6daa0fbe7a33a0 21-Feb-2012 Andrew Trick <atrick@apple.com> Clear virtual registers after they are no longer referenced.

Passes after RegAlloc should be able to rely on MRI->getNumVirtRegs() == 0.
This makes sharing code for pre/postRA passes more robust.
Now, to check if a pass is running before the RA pipeline begins, use MRI->isSSA().
To check if a pass is running after the RA pipeline ends, use !MRI->getNumVirtRegs().

PEI resets virtual regs when it's done scavenging.

PTX will either have to provide its own PEI pass or assign physregs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151032 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
8dd26253f54247e77e5accfdd70e7b4bf27b39c2 10-Feb-2012 Andrew Trick <atrick@apple.com> RegAlloc superpass: includes phi elimination, coalescing, and scheduling.

Creates a configurable regalloc pipeline.

Ensure specific llc options do what they say and nothing more: -reglloc=... has no effect other than selecting the allocator pass itself. This patch introduces a new umbrella flag, "-optimize-regalloc", to enable/disable the optimizing regalloc "superpass". This allows for example testing coalscing and scheduling under -O0 or vice-versa.

When a CodeGen pass requires the MachineFunction to have a particular property, we need to explicitly define that property so it can be directly queried rather than naming a specific Pass. For example, to check for SSA, use MRI->isSSA, not addRequired<PHIElimination>.

CodeGen transformation passes are never "required" as an analysis

ProcessImplicitDefs does not require LiveVariables.

We have a plan to massively simplify some of the early passes within the regalloc superpass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150226 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
16f72dd68653bd4984363483cfc15ce91fa613d4 10-Feb-2012 Andrew Trick <atrick@apple.com> whitespace

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150225 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
5e25ee8a1fcf8288d00d731b0f7ab7976f33b123 05-Feb-2012 Craig Topper <craig.topper@gmail.com> Convert assert(0) to llvm_unreachable

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149816 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
d9e5c764bfea339fc5082bf17e558db959fd6d28 05-Jan-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Freeze reserved registers before starting register allocation.

The register allocators don't currently support adding reserved
registers while they are running. Extend the MRI API to keep track of
the set of reserved registers when register allocation started.

Target hooks like hasFP() and needsStackRealignment() can look at this
set to avoid reserving more registers during register allocation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147577 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
bae56b4c216ac8b4573fb90e7d1a63acace6f53d 06-Dec-2011 Lang Hames <lhames@gmail.com> Kill off the LoopSplitter. It's not being used or maintained.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145897 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
9ad7e07a0fb565a8935ceaa2d266bd6e505203af 06-Dec-2011 Lang Hames <lhames@gmail.com> Update PBQP's analysis usage to reflect the requirements of the inline spiller.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145893 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
c3f2722615c600ac2cca9ac7aad6b7e05b840c97 13-Nov-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Switch PBQP to VRM's trivial rewriter.

The very complicated VirtRegRewriter is going away.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144479 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
cfa81014099254bd42f246a4d434dc2ca1463c6c 13-Nov-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Switch PBQP to the modern InlineSpiller framework.

It is worth noting that the old spiller would split live ranges around
basic blocks. The new spiller doesn't do that.

PBQP should do its own live range splitting with
SplitEditor::splitSingleBlock() if desired. See
RAGreedy::tryBlockSplit().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144476 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
27215676c7114132a0374f7b5c9ea73d9354d329 09-Aug-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Refer to the RegisterCoalescer pass by ID.

A public interface is no longer needed since RegisterCoalescer is not an
analysis any more.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137082 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
5b220213bfe9c37c2bb41a7ae0804e06a14f1007 27-Jun-2011 Rafael Espindola <rafael.espindola@gmail.com> There is only one register coalescer. Merge it into the base class and
remove the analysis group.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133899 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
fdf16ca44f130afe80c57481d0c08130aa08cc09 26-Jun-2011 Rafael Espindola <rafael.espindola@gmail.com> Move RegisterCoalescer.h to lib/CodeGen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133895 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
8d857660ce194f05eca3e21d149e8cf3101da9e4 17-Jun-2011 Lang Hames <lhames@gmail.com> Add a hook for PBQP clients to run a custom pre-alloc pass to run prior to PBQP allocation. Patch by Arnaud Allard de Grandmaison.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133249 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
714c0eb811340a41a602509b70ca83cd4b2f2868 16-Jun-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Move PBQP off allocation_order_begin. No functional change intended.

I think PBQP could use RegisterClassInfo, but it didn't fit neatly with
the external interfaces that PBQP uses, so I'll leave that to Lang.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133186 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
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/lib/CodeGen/RegAllocPBQP.cpp
5e77f4b1d239a61dbdb37026bfc92d83d82ceb70 12-Nov-2010 Lang Hames <lhames@gmail.com> Fix some style issues in PBQP. Patch by David Blaikie.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118883 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
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/lib/CodeGen/RegAllocPBQP.cpp
ab62b7e8618bda8063b49afab181bc7ed5546104 04-Oct-2010 Lang Hames <lhames@gmail.com> Removed the older style (in-allocator) problem construction system from the PBQP allocator. Problem construction is now done exclusively with the new builders.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115502 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
6e2968c85c1e162ee5bc813769eab223e3df0f15 25-Sep-2010 Lang Hames <lhames@gmail.com> Removed VNInfo::isDefAccurate(). Def "accuracy" can be checked by testing whether LiveIntervals::getInstructionFromIndex(def) returns NULL.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114791 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
f70e7cc7a2871d498dbecbec2d1c3beb3da2af33 23-Sep-2010 Lang Hames <lhames@gmail.com> Moved the PBQP allocator class out of the header and back in to the cpp file to hide the gory details.
Allocator instances can now be created by calling createPBQPRegisterAllocator.

Tidied up use of CoalescerPair as per Jakob's suggestions.

Made the new PBQPBuilder based construction process the default. The internal construction process
remains in-place and available via -pbqp-builder=false for now. It will be removed shortly if the new
process doesn't cause any regressions.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114626 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
08982914902a3e164bdfca3157b296a38c7324ad 21-Sep-2010 Lang Hames <lhames@gmail.com> Fixed ambiguous call.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114431 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
e9c935662d77b8c5a3a26f5622dc2a3ed22d75c8 21-Sep-2010 Lang Hames <lhames@gmail.com> Added an additional PBQP problem builder which adds coalescing costs (both between pairs of virtuals, and between virtuals and physicals).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114429 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
9e8d1f97e9f32c87aac1189edbc3263a1f4a81f3 18-Sep-2010 Benjamin Kramer <benny.kra@googlemail.com> Unbreak msvc build.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114284 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
481630dee5f221c04bb26fe12f0887b4f25f8455 18-Sep-2010 Lang Hames <lhames@gmail.com> Fixed non-const iterator error.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114273 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
eb6c8f53b4df1488f3d07c11af8f754cc4620f3a 18-Sep-2010 Lang Hames <lhames@gmail.com> Added a separate class (PBQPBuilder) for PBQP Problem construction. This class can be extended to support custom constraints.

For now the allocator still uses the old (internal) construction mechanism by default. This will be phased out soon assuming
no issues with the builder system come up.

To invoke the new construction mechanism just pass '-regalloc=pbqp -pbqp-builder' to llc. To provide custom constraints a
Target just needs to extend PBQPBuilder and pass an instance of their derived builder to the RegAllocPBQP constructor.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114272 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
33198391d6d30127643c0d1f4ae9ed1ef85ed7f0 02-Sep-2010 Lang Hames <lhames@gmail.com> Added support for register allocators to record which intervals are spill intervals, and where the uses and defs of the original intervals were in the original code.

Spill intervals can be hidden using the "-rmf-intervals=virt-nospills*" option.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112811 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
269354e57024ab815bdb74f06cc6309a879d1f9f 01-Sep-2010 Jim Grosbach <grosbach@apple.com> The register allocator shouldn't consider allocating reserved registers. PBQP version.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112742 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
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/lib/CodeGen/RegAllocPBQP.cpp
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/lib/CodeGen/RegAllocPBQP.cpp
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/lib/CodeGen/RegAllocPBQP.cpp
c4bcc778a8dcc385b129852c9aa1c712d042ad63 20-Jul-2010 Lang Hames <lhames@gmail.com> Switched to rendering after allocation (but before rewriting) in PBQP.

Updated renderer to use allocation information from VirtRegMap (if
available) to render spilled intervals differently.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108815 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
54cc2efb4e6ba3022ec297746b14a129d97fc07b 19-Jul-2010 Lang Hames <lhames@gmail.com> Render MachineFunctions to HTML pages, with options to render register
pressure estimates and liveness alongside.

Still experimental.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108698 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
12f35c52a533da0c2c4c3e0a04f83355514992f9 18-Jul-2010 Lang Hames <lhames@gmail.com> Added -pbqp-pre-coalescing flag to PBQP. If enabled this will cause PBQP to require
LoopSplitter be run prior to register allocation.

Entirely for testing purposes at the moment.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108634 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
d0f6f017319bbc32b57c2e574d774ac91fe20f18 17-Jul-2010 Lang Hames <lhames@gmail.com> Iterating over sets of pointers in a heuristic was a bad idea. Switching
any command line paramater changed the register allocation produced by
PBQP.

Turns out variety is not the spice of life.

Fixed some comparators, added others. All good now.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108613 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
04c528a0c86ddf3d6a70681f72e1b2ec07b0b53a 16-Jul-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Remove many calls to TII::isMoveInstr. Targets should be producing COPY anyway.

TII::isMoveInstr is going tobe completely removed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108507 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
cbeb3db8fd502a21f07592f75712d59691ce471f 12-Jul-2010 Rafael Espindola <rafael.espindola@gmail.com> Don't use getPhysicalRegisterRegClass in PBQP. The existing checks that the
physical register can be allocated in the class of the virtual are sufficient.

I think that the test for virtual registers is more strict than it needs to be,
it should be possible to coalesce two virtual registers the class of one
is a subclass of the other.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108118 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
87565c1d779a1903d10ddd11d886c0f79ee430b5 15-May-2010 Chris Lattner <sabre@nondot.org> improve portability to systems that don't have powf/modf (e.g. solaris 9)
patch by Evzen Muller!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103876 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
1aecd15bd1b54f33bfd928e082a3798f0edf33aa 18-Feb-2010 Duncan Sands <baldrick@free.fr> Remove terminating dot in description. Inconsistency pointed
out by Russell Wallace.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96579 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
a6b80dd031a122a80683414db4f3858b85d89e49 17-Feb-2010 Lang Hames <lhames@gmail.com> Removed an early out which was causing the PBQP allocator to not compute live-in sets or run the rewriter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96450 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
0b23dc0cc8fb2967dc08574910536cc074863bcb 09-Feb-2010 Lang Hames <lhames@gmail.com> Fixed a bug in the PBQP allocator's findCoalesces method.

Previously spill registers, whose def indexes are not defined, would sometimes be improperly marked as coalescable with conflicting registers. The new findCoalesces routine conservatively assumes that any register with at least one undefined def is not coalescable with any register it interferes with.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95636 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
030c4bfbc9885444b8a5ad0b5f1e50045a351d17 26-Jan-2010 Lang Hames <lhames@gmail.com> New PBQP solver.

* Fixed a reduction bug which occasionally led to infinite-cost (invalid)
register allocation solutions despite the existence finite-cost solutions.
* Significantly reduced memory usage (>50% reduction).
* Simplified a lot of the solver code.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94514 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
309315420669ff5bde9b0ae1213171a88216fad7 05-Jan-2010 David Greene <greened@obbligato.org> Change errs() to dbgs().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92586 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
a937f220e14826266a8f05b58a541aad669c8912 14-Dec-2009 Lang Hames <lhames@gmail.com> Moved spill weight calculation out of SimpleRegisterCoalescing and into its own pass: CalculateSpillWeights.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91273 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
e98b4b0695f727dda44c366f5de906edf06cf7e9 15-Nov-2009 Lang Hames <lhames@gmail.com> Added an assert to the PBQP allocator to catch infinite cost solutions which might otherwise lead to miscompilations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88829 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
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/lib/CodeGen/RegAllocPBQP.cpp
6726b6d75a8b679068a58cb954ba97cf9d1690ba 25-Oct-2009 Nick Lewycky <nicholas@mxc.ca> Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.
Chris claims we should never have visibility_hidden inside any .cpp file but
that's still not true even after this commit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85042 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
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/lib/CodeGen/RegAllocPBQP.cpp
a279bc3da55691784064cb47200a1c584408b8ab 20-Sep-2009 Daniel Dunbar <daniel@zuster.org> Tabs -> spaces, and remove trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82355 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
c2d98bc0d682419f09659d94afefd6a6266dd6ee 06-Sep-2009 Duncan Sands <baldrick@free.fr> Remove some not-really-used variables, as warned
about by icc (#593, partial). Patch by Erick Tryzelaar.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81115 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
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/lib/CodeGen/RegAllocPBQP.cpp
3f2f3f5341374c85955cfaffa71886724999762d 03-Sep-2009 Lang Hames <lhames@gmail.com> Fixed a test that ensures the LocalRewriter does not attempt to
avoid reloads by reusing clobbered registers.

This was causing issues in 256.bzip2 when compiled with PIC for
a while (starting at r78217), though the problem has since been masked.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80872 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
bc84ad95b7a4e453f6dd91f535abd7ef9ddc1773 20-Aug-2009 Daniel Dunbar <daniel@zuster.org> Suppress build warning in -Asserts


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79564 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
8481e3b368444386d5be5b74cd1e0ba6f858d983 19-Aug-2009 Lang Hames <lhames@gmail.com> Added an option to have the PBQP allocator attempt coalescing during allocation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79397 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
233fd9cea04468d71ae44031df3f2c8d1c3299a7 19-Aug-2009 Lang Hames <lhames@gmail.com> Changes DOUT references in the PBQP allocator to use DEBUG(errs() ...)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79378 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
f7c553e993dccd7e71d1a5a45ca87f02626a17b6 12-Aug-2009 Lang Hames <lhames@gmail.com> Added RegisterCoalescer to required passes for PBQP.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78840 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
00b0a243bdf2d9675bafbdb44ac3b2df768878b3 11-Aug-2009 Dan Gohman <gohman@apple.com> Remove unnecessary throw() specifications; LLVM doesn't use exceptions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78667 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
1b2d0b83977a37cb22391dc5a7bf09de76caf0b2 11-Aug-2009 Dan Gohman <gohman@apple.com> Remove unnecessary casts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78664 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
52c1afcaea61440950a11a4ccadac4354420d727 11-Aug-2009 Lang Hames <lhames@gmail.com> Modified VNInfo. The "copy" member is now a union which holds the copy for a register interval, or the defining register for a stack interval. Access is via getCopy/setCopy and getReg/setReg.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78620 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
4600d179fdf132534af887f94d82d1afdbb1398a 10-Aug-2009 Owen Anderson <resistor@mac.com> Remove a bunch of debugging code that was slowing PBQP down by 25% or so.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78601 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
8a1871d10b3c8cdbac9b8378eebd95461790d1e6 08-Aug-2009 Daniel Dunbar <daniel@zuster.org> Fix some -Asserts unused variable warnings.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78447 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
6699fb27091927528f9f6059c3034d566dbed623 07-Aug-2009 Lang Hames <lhames@gmail.com> New C++ PBQP solver. Currently about as fast (read _slow_) as the old C based solver, but I'll be working to improve that. The PBQP allocator has been updated to use the new solver.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78354 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
845012e6d31799c7fbd1193fa1af8ee2d12e9231 01-Aug-2009 Dan Gohman <gohman@apple.com> Use setPreservesAll and setPreservesCFG in CodeGen passes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77754 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
ce63ffb52f249b62cdf2d250c128007b13f27e71 25-Jul-2009 Daniel Dunbar <daniel@zuster.org> More migration to raw_ostream, the water has dried up around the iostream hole.
- Some clients which used DOUT have moved to DEBUG. We are deprecating the
"magic" DOUT behavior which avoided calling printing functions when the
statement was disabled. In addition to being unnecessary magic, it had the
downside of leaving code in -Asserts builds, and of hiding potentially
unnecessary computations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77019 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
857c4e01f85601cf2084adb860616256ee47c177 17-Jun-2009 Lang Hames <lhames@gmail.com> VNInfo cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73634 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
90f95f88c6ce09c6744777dc9d140c3c77203b92 14-Jun-2009 Evan Cheng <evan.cheng@apple.com> Move register allocation preference (or hint) from LiveInterval to MachineRegisterInfo. This allows more passes to set them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
51b16f473759c1546acbf308a5d3f3e7bf3ea23c 30-May-2009 Bill Wendling <isanbard@gmail.com> Untabification.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72604 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
b0e519f2bf201d96d304cb9fd330a5e1b38536fe 18-May-2009 Lang Hames <lhames@gmail.com> Prevented reg0 from being added to MBB live-in set, which was causing issues
for PostRAScheduler.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71991 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
87e3bcab736e5af501b1cfbf880563d3d2244497 06-May-2009 Lang Hames <lhames@gmail.com> Renamed Spiller classes (plus uses and related files) to VirtRegRewriter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71057 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
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/lib/CodeGen/RegAllocPBQP.cpp
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/lib/CodeGen/RegAllocPBQP.cpp
12a9dc8c14301ae199f2c2d6ab55cc5c995101cd 17-Mar-2009 Sanjiv Gupta <sanjiv.gupta@microchip.com> r66870 missed this out.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67082 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
49c8aa0d8b2824c70d178c5d55cda64d6613c0d8 13-Mar-2009 Owen Anderson <resistor@mac.com> Convert VirtRegMap to a MachineFunctionPass.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66870 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
1ed5b714f1c98b370145fdebb6c21bbc7caa52d5 11-Mar-2009 Owen Anderson <resistor@mac.com> Reorganization: Move the Spiller out of VirtRegMap.cpp into its own files. No (intended) functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66720 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
04ee5a1d9267e5e6fab8f088095fcb83c3c5cbd1 20-Jan-2009 Evan Cheng <evan.cheng@apple.com> Change TargetInstrInfo::isMoveInstr to return source and destination sub-register indices as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62600 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
ce07e99dd6fafc51805c21d53286ae5765d1cffc 08-Jan-2009 Misha Brukman <brukman+llvm@gmail.com> * Moved author attribution to CREDITS.TXT
* Removed trailing whitespace


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61927 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
2a835f947a114142071456d7586118a0949499a0 08-Jan-2009 Misha Brukman <brukman+llvm@gmail.com> * Alphabetized #includes
* Removed trailing whitespace


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61926 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
3713c0ba62113419a5c57ec3e5d034d1dd581b55 19-Nov-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix compilation error on MSVC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59629 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
27601ef8325f85b9677b55e3e2ca1a1368d8eee5 16-Nov-2008 Lang Hames <lhames@gmail.com> Big PBQP allocator update. Adds coalescing support, stack slot coloring, several bug-fixes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59414 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
56c523c63b2b5d95ed61c79e1efe9de5465a7d25 14-Nov-2008 Lang Hames <lhames@gmail.com> Test commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59293 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
b8cab9227a0f6ffbdaae33e3c64268e265008a6a 14-Oct-2008 Dan Gohman <gohman@apple.com> Fix command-line option printing to print two spaces where needed,
instead of requiring all "short description" strings to begin with
two spaces. This makes these strings less mysterious, and it fixes
some cases where short description strings mistakenly did not
begin with two spaces.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57521 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
17a82eaeb6339b184acb2f8bf0f314d69ad2e1d3 03-Oct-2008 Evan Cheng <evan.cheng@apple.com> Fix typos pointed out by Duncan. Also untabify these files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57018 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
d735b8019b0f297d7c14b55adcd887af24d8e602 03-Oct-2008 Dan Gohman <gohman@apple.com> Switch the MachineOperand accessors back to the short names like
isReg, etc., from isRegister, etc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57006 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp
b1290a6cc40f7caa0351450ce7021a0d48b5f2c0 02-Oct-2008 Evan Cheng <evan.cheng@apple.com> A Partitioned Boolean Quadratic Programming (PBQP) based register allocator.

Contributed by Lang Hames.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56959 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/RegAllocPBQP.cpp