History log of /external/llvm/lib/CodeGen/MachineVerifier.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
dce4a407a24b04eebc6a376f8e62b41aaa7b071f 29-May-2014 Stephen Hines <srhines@google.com> Update LLVM for 3.5 rebase (r209712).

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

Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617
/external/llvm/lib/CodeGen/MachineVerifier.cpp
17d4ac8c461fb3c32483cf7a37bc52937caeb650 15-Nov-2013 Matt Arsenault <Matthew.Arsenault@amd.com> Fix confusing machine verifier error.

The error reported the number of explicit operands,
but that isn't what is checked. In my case, this
resulted in the confusing errors

"Too few operands." followed shortly by
"8 operands expected, but 8 given."

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194862 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
d900b1179535298510490030a5d2ecce93f79eb0 08-Nov-2013 Pedro Artigas <partigas@apple.com> increase the accuracy of register pressure computation in the presence of dead definitions by using live intervals, if available, to identify dead definitions and proceed accordingly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194286 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
03d9609c6154ed91daefb4e4f89b7298c11961f3 10-Oct-2013 Matthias Braun <matze@braunis.de> Print register in LiveInterval::print()

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192398 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
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/lib/CodeGen/MachineVerifier.cpp
a4aed9ae392b30147745bd27e5fea7b0cebc1702 10-Oct-2013 Matthias Braun <matze@braunis.de> Change MachineVerifier to work on LiveRange + LiveInterval

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192395 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
5649e25ce86b9d89d228ae7c392413571b0f8c19 10-Oct-2013 Matthias Braun <matze@braunis.de> Pass LiveQueryResult by value

This makes the API a bit more natural to use and makes it easier to make
LiveRanges implementation details private.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192394 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
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/lib/CodeGen/MachineVerifier.cpp
b38d9877f490e6bd65a38048d7e00877c0a670f0 04-Oct-2013 Matthias Braun <matze@braunis.de> Fix indentation

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191965 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
c1b49b56d4132efa2e06deb8f23508d0de4c8800 16-Jul-2013 Rafael Espindola <rafael.espindola@gmail.com> Add a wrapper for open.

This centralizes the handling of O_BINARY and opens the way for hiding more
differences (like how open behaves with directories).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186447 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
7310b75c8b6cc0f73d114dc0beccbb96a6942547 15-Jul-2013 Manman Ren <mren@apple.com> Machine Verifier: verify FrameSetup and FrameDestroy

1> on every path through the CFG, a FrameSetup <n> is always followed by a
FrameDestroy <n> and a FrameDestroy is always followed by a FrameSetup.
2> stack adjustments are identical on all CFG edges to a merge point.
3> frame is destroyed at end of a return block.

PR16393


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186350 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
62c320a755ac27ac2b7f64e927892249e0f486e0 23-May-2013 Chad Rosier <mcrosier@apple.com> Simplify logic now that r182490 is in place. No functional change intended.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182531 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
a58d67af29d38fa37c94f59af37db9df75f349be 19-Apr-2013 Jakob Stoklund Olesen <stoklund@2pi.dk> Add an MRI::verifyUseLists() function.

This checks the sanity of the register use lists in the MI intermediate
representation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179895 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.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/MachineVerifier.cpp
344df79cc073032cfc35cd00406907d67b537087 19-Dec-2012 Dmitri Gribenko <gribozavr@gmail.com> Add a missing 'else'. Found by grep '} if'

No testcase because it is apparently not so trivial to construct.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170595 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
9466bdebb7a239c0f469ae5c9aa1b94d2e2700f9 18-Dec-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Verify bundle flags for consistency in MachineVerifier.

The new bidirectional bundle flags are redundant, so inadvertent bundle
tearing can be detected in the machine code verifier.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170463 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.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/MachineVerifier.cpp
3d71688476951d56ac00a81b17c2f83fd781b208 30-Oct-2012 Chad Rosier <mcrosier@apple.com> [inline asm] Implement mayLoad and mayStore for inline assembly. In general,
the MachineInstr MayLoad/MayLoad flags are based on the tablegen implementation.
For inline assembly, however, we need to compute these based on the constraints.

Revert r166929 as this is no longer needed, but leave the test case in place.
rdar://12033048 and PR13504

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167040 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
feab72c20acc97f8942148189c06e443b29df841 16-Oct-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Remove unused BitVectors from getAllocatableSet().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165999 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.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/MachineVerifier.cpp
59324297650c12a8dccf1a7ad650a9e895fdc17e 06-Sep-2012 Roman Divacky <rdivacky@freebsd.org> Stop casting away const qualifier needlessly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163258 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
daddf07497af2849868105264bd5f95c362041e5 04-Sep-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Move tie checks into MachineVerifier::visitMachineOperand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163152 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
90a4f78d3b23576da92a60a731cb34767fd75db8 29-Aug-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Verify the consistency of inline asm operands.

The operands on an INLINEASM machine instruction are divided into groups
headed by immediate flag operands. Verify this structure.

Extract verifyTiedOperands(), and only call it for non-inlineasm
instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162849 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
ca71c5debe0467646ca1f359073948d5353393a0 29-Aug-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Verify the tied operand flags.

WHen running with -verify-machineinstrs, check that tied operands come
in matching use/def pairs, and that they are consistent with MCInstrDesc
when it applies.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162816 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.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/MachineVerifier.cpp
e7fdef420d0c8a825555d246da259342c48bd527 20-Aug-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Don't add CFG edges for redundant conditional branches.

IR that hasn't been through SimplifyCFG can look like this:

br i1 %b, label %r, label %r

Make sure we don't create duplicate Machine CFG edges in this case.

Fix the machine code verifier to accept conditional branches with a
single CFG edge.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162230 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
b254c6d77a042ac175e101f6e06aa667446e1b77 20-Aug-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Add CFG checks to MachineVerifier.

Verify that the predecessor and successor lists are consistent and free
of duplicates.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162223 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
11a4fa452305eeaeaaaf9c4fd83d043da081bd11 15-Aug-2012 Richard Smith <richard-llvm@metafoo.co.uk> Fix undefined behavior: don't perform array indexing through a potentially null
pointer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161919 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
804468916a93bb2914c28687829ccb065a97e1d9 02-Aug-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Verify regunit intervals along with virtreg intervals.

Don't cause regunit intervals to be computed just to verify them. Only
check the already cached intervals.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161183 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
79240f9539ab187f5e25cec44e0250a89dfe1d59 02-Aug-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Add report() functions that take a LiveInterval argument.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161178 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
e5c79a5c2542fa0d852df28b5ee9de8dfef694d8 02-Aug-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Extract some methods from verifyLiveIntervals.

No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161149 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
a62e1e8bc6df16174ae613914d876d335970ef4f 02-Aug-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Also verify RegUnit intervals at uses.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161147 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
eba2bbb58cafcb1ec0fa50d5e8a1c6a8cac2f780 25-Jul-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Verify two-address constraints more carefully.

Include <undef> operands and virtual registers after leaving SSA form.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160734 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
b97c57a8b7dc268958924b8bcc0e97f70437dff6 20-Jul-2012 Pete Cooper <peter_cooper@apple.com> Fix crash in machine verifier when trying to print the def of a register which has no def

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160531 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
96cb1128528a512f1ef9c28ae5e1b78a98dcc505 19-Jul-2012 Bill Wendling <isanbard@gmail.com> Remove tabs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160475 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
bb0721680c329625f47c090f48dcafb2fe14101c 29-Jun-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Check for extra kill flags on live-out virtual registers.

This would previously get reported as the misleading "Virtual register
def doesn't dominate all uses."

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159460 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
a4e6397fd9f2fbbd6affdfb0738813918cb21da0 25-Jun-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Enforce stricter liveness rules for PHIs.

Verify that all paths from the entry block to a virtual register read
pass through a def. Enable this check even when MRI->isSSA() is false.

Verify that the live range of a virtual register is live out of all
predecessor blocks, even for PHI-values.

This requires that PHIElimination sometimes inserts IMPLICIT_DEF
instruction in predecessor blocks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159150 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
f935e945c0fc0444324347882ac41104b12204c2 23-Jun-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Also verify the def index for early clobbers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159039 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
12a7be9ba4263a283ca14e277a90cb64fe0e6f62 21-Jun-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Fix some more LiveInterval enumerations.

Deterministically enumerate the virtual registers instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158872 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
6b0cd9b9c65dc8c91827ddd926e050738ea590fd 14-Jun-2012 Akira Hatanaka <ahatanaka@mips.com> Make machine verifier check the first instruction of the last bundle instead of
the last instruction of a basic block.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158468 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
83569cb062930a62e96ba87a47b002366e00124d 07-Jun-2012 Pete Cooper <peter_cooper@apple.com> Move terminator machine verification to check MachineBasicBlock::instr_iterator instead of MBB::iterator

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158154 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
1f9c3ec831cf63f7833680c38362c1e92c251aff 07-Jun-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Properly verify liveness with bundled machine instructions.

Bundles should be treated as one atomic transaction when checking
liveness. That is how the register allocator (and VLIW targets) treats
bundles.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158116 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.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/MachineVerifier.cpp
cac58aa80ea9450d5e5b0499ac598b646f419b51 29-May-2012 Evan Cheng <evan.cheng@apple.com> Optional def can be either a def or a use (of reg0).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157640 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
e3da8c62864da0ed0386075baf79d612746d849b 17-May-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Fix a verifier bug.

Make sure useless (def-only) intervals also get verified.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157000 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
397fc4874efe9c17e737d4c5c50bd19dc3bf27f5 08-May-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Add an MF argument to TRI::getPointerRegClass() and TII::getRegClass().

The getPointerRegClass() hook can return register classes that depend on
the calling convention of the current function (ptr_rc_tailcall).

So far, we have been able to infer the calling convention from the
subtarget alone, but as we add support for multiple calling conventions
per target, that no longer works.

Patch by Yiannis Tsiouris!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156328 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
78811669d5872b28c447ea9f7cfc3963c7f72841 29-Mar-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Enable machine code verification after PreSched2 passes.

The late scheduler depends on accurate liveness information if it is
breaking anti-dependencies, so we should be able to verify it.

Relax the terminator checking in the machine code verifier so it can
handle the basic blocks created by if conversion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153614 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
948a44458c2965e6c2924bbd47c4d41bda0d78f0 28-Mar-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Skip liveness verification when MRI->tracksLiveness() is false.

Extract the liveness verification into its own method.

This makes it possible to run the machine code verifier after liveness
information is no longer required to be valid.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153596 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
ff0275ea53842101645000d1d7fefe85e007fb03 10-Mar-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Report the defining instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152460 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
64ffa83c9bf5a1f0c064295de9b3eba7b0f09a99 10-Mar-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Add SSA verification to MachineVerifier.

Somehow we never verified SSA dominance before.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152458 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
1efd6b94a917449da5007fd332cd895692aa0319 10-Mar-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Use SmallPtrSet instead of DenseSet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152457 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
9ebfbf8b9fd5f982e0db9293808bd32168615ba9 05-Mar-2012 Craig Topper <craig.topper@gmail.com> Convert more GenRegisterInfo tables from unsigned to uint16_t to reduce static data size.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152016 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
30e98a03a3c524026e2da2607e04bb655b0b6350 29-Feb-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Move the operand iterator into MachineInstrBundle.h where it belongs.

Extract a base class and provide four specific sub-classes for iterating
over const/non-const bundles/instructions.

This eliminates the mystery bool constructor argument.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151684 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
9ca12d2e2f14b0b59c839943e58d8aa5d1a271cb 28-Feb-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Handle regmasks in the machine code verifier.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151607 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
121b179edf28040b8fa4c99e0835e4560cf3a5d4 27-Feb-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Update machine code verifier.

After the SlotIndex slot names were updated, it is possible to apply
stricter checks to live intervals.

Also treat bundles as bags of operands when checking live intervals.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151531 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
03698deb25215bf3b4aa2e3ff731ea38923a928c 14-Feb-2012 Lang Hames <lhames@gmail.com> Update MachineVerifier to check the new physreg live-in rules.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150496 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
ddfd1377d2e4154d44dc3ad217735adc15af2e3f 14-Dec-2011 Evan Cheng <evan.cheng@apple.com> - Add MachineInstrBundle.h and MachineInstrBundle.cpp. This includes a function
to finalize MI bundles (i.e. add BUNDLE instruction and computing register def
and use lists of the BUNDLE instruction) and a pass to unpack bundles.
- Teach more of MachineBasic and MachineInstr methods to be bundle aware.
- Switch Thumb2 IT block to MI bundles and delete the hazard recognizer hack to
prevent IT blocks from being broken apart.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146542 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
5a96b3dad2f634c9081c8b2b6c2575441dc5a2bd 07-Dec-2011 Evan Cheng <evan.cheng@apple.com> Add bundle aware API for querying instruction properties and switch the code
generator to it. For non-bundle instructions, these behave exactly the same
as the MC layer API.

For properties like mayLoad / mayStore, look into the bundle and if any of the
bundled instructions has the property it would return true.
For properties like isPredicable, only return true if *all* of the bundled
instructions have the property.
For properties like canFoldAsLoad, isCompare, conservatively return false for
bundles.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146026 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
a7b0cb759433c715065440ee2a963a04db7f2b0b 15-Nov-2011 Benjamin Kramer <benny.kra@googlemail.com> Remove all remaining uses of Value::getNameStr().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144648 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
194eb71a11a77c7fb576780783a77e64924dfb10 14-Nov-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Use getVNInfoBefore() when it makes sense.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144517 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
2debd48ca790ac01be6e12e094fdf4fdcadc8364 13-Nov-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Rename SlotIndexes to match how they are used.

The old naming scheme (load/use/def/store) can be traced back to an old
linear scan article, but the names don't match how slots are actually
used.

The load and store slots are not needed after the deferred spill code
insertion framework was deleted.

The use and def slots don't make any sense because we are using
half-open intervals as is customary in C code, but the names suggest
closed intervals. In reality, these slots were used to distinguish
early-clobber defs from normal defs.

The new naming scheme also has 4 slots, but the names match how the
slots are really used. This is a purely mechanical renaming, but some
of the code makes a lot more sense now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144503 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
b4a0221e85eeb4015a37f30738099dc680ac32d7 06-Oct-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Fix sub-register operand verification.

PhysReg operands are not allowed to have sub-register indices at all.

For virtual registers with sub-reg indices, check that all registers in
the register class support the sub-reg index.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141220 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
5adc07ebe80688a4b4b96dc088341a7d87eb614f 24-Sep-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Verify that terminators follow non-terminators.

This exposes a -segmented-stacks bug.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140429 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
3be654f8082dcbdff011a6716a7c90486e28fc9e 21-Sep-2011 Andrew Trick <atrick@apple.com> Lower ARM adds/subs to add/sub after adding optional CPSR operand.

This is still a hack until we can teach tblgen to generate the
optional CPSR operand rather than an implicit CPSR def. But the
strangeness is now limited to the selection DAG. ADD/SUB MI's no
longer have implicit CPSR defs, nor do we allow flag setting variants
of these opcodes in machine code. There are several corner cases to
consider, and getting one wrong would previously lead to nasty
miscompilation. It's not the first time I've debugged one, so this
time I added enough verification to ensure it won't happen again.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140228 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
df8412c4c1a3a798c5a849ebc3f56904568d40c4 15-Sep-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Stop verifying hasPHIKill() flags.

There is only one legitimate use remaining, in addIntervalsForSpills().
All other calls to hasPHIKill() are only used to update PHIKill flags.

The addIntervalsForSpills() function is part of the old spilling
framework, only used by linearscan.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139783 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
4af0f5fecb42563ff3ca5bd7fddb2f4f111e2fef 30-Jul-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Revert "Don't check liveness of unallocatable registers."

The ARM target depends on CPSR liveness being tracked after register
allocation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136548 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
eeb57c7701ded683d660ed616966cfe7b1750337 30-Jul-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Don't check liveness of unallocatable registers.

This includes registers like EFLAGS and ST0-ST7. We don't check for
liveness issues in the verifier and scavenger because registers will
never be allocated from these classes.

While in SSA form, we do care about the liveness of unallocatable
unreserved registers. Liveness of EFLAGS and ST0 neds to be correct for
MachineDCE and MachineSinking.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136541 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
93e6f02759a9d98c0c0621540382074219aa374a 30-Jul-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Check for multiple defs in the machine code verifier.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136535 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
e837dead3c8dc3445ef6a0e2322179c57e264a13 28-Jun-2011 Evan Cheng <evan.cheng@apple.com> - Rename TargetInstrDesc, TargetOperandInfo to MCInstrDesc and MCOperandInfo and
sink them into MC layer.
- Added MCInstrInfo, which captures the tablegen generated static data. Chang
TargetInstrInfo so it's based off MCInstrInfo.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134021 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
15993f83a419950f06d2879d6701530ae6449317 27-Jun-2011 Evan Cheng <evan.cheng@apple.com> More refactoring. Move getRegClass from TargetOperandInfo to TargetInstrInfo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133944 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
fa226bccaa90c520cac154df74069bbabb976eab 02-Jun-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Use TRI::has{Sub,Super}ClassEq() where possible.

No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132455 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
6fcb6e454b08c5e5aaed125860b01bc08dc6cc49 19-May-2011 Cameron Zwarich <zwarich@apple.com> Revert r128961 because it didn't include a test and causes the verifier to fail
on CodeGen/X86/2007-05-07-InvokeSRet.ll. There is probably a bug here that was
fixed by r128961, but since there is no test or reference to a source file I have
to revert it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131618 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
d29052bf26fec78a35665b6ccd563b62d2d1cf14 05-May-2011 Bill Wendling <isanbard@gmail.com> SjLj EH could produce a machine basic block that legitimately has more than one
landing pad as its successor.

SjLj exception handling jumps to the correct landing pad via a switch statement
that's generated right before code-gen. Loosen the constraint in the machine
instruction verifier to allow for this. Note, this isn't the most rigorous check
since we cannot determine where that switch statement came from. But it's
marginally better than turning this check off when SjLj exceptions are used.
<rdar://problem/9187612>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130881 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
3e22897fa9f07fc641b07d2e12101d21f84da668 06-Apr-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Permit blocks to branch directly to a landing pad.

Treat the landing pad as a normal successor when that happens.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128961 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
02ae9f2f273d53fa5c5de4134ffd22ff2cedb115 31-Mar-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Allow kill flags on two-address instructions. They are harmless.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128643 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
8e53aca51a141c99209ced69c9a51f52f6a8370b 31-Mar-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Mark all uses as <undef> when joining a copy.

This way, shrinkToUses() will ignore the instruction that is about to be
deleted, and we avoid leaving invalid live ranges that SplitKit doesn't like.

Fix a misunderstanding in MachineVerifier about <def,undef> operands. The
<undef> flag is valid on def operands where it has the same meaning as <undef>
on a use operand. It only applies to sub-register defines which also read the
full register.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128642 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
a7b586ba7410dd2dddbfa82a6a57485985747f2c 04-Feb-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Verify kill flags conservatively.

Allow a live range to end with a kill flag, but don't allow a kill flag that
doesn't end the live range.

This makes the machine code verifier more useful during register allocation when
kill flag computation is deferred.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124838 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
fc69c370e165958d7d9a6d756a32479674d83888 12-Jan-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Verify slot index ordering.

The slot indexes must be monotonically increasing through the function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123324 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
7bd46dae9c0e7e93df27186a4885293f8295b093 12-Jan-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Verify that machine instruction parent pointers are consistent.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123322 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
4314268128be6d54c9a7f0709680e5a5b40f3ab3 09-Jan-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Replace TargetRegisterInfo::printReg with a PrintReg class that also works without a TRI instance.

Print virtual registers numbered from 0 instead of the arbitrary
FirstVirtualRegister. The first virtual register is printed as %vreg0.
TRI::NoRegister is printed as %noreg.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123107 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
98c54760704878cf5290a9a3b23876b7550c5560 09-Jan-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Fix a MachineVerifier loop that probably didn't mean to skip the last two
virtual registers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123100 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
cb584d08c0734d64f95b0f762aa31ea8ce3de2d9 29-Dec-2010 Cameron Zwarich <zwarich@apple.com> Simplify some code in MachineVerifier that was doing the correct thing, but not
in the most obvious way.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122610 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
4eee42cb282753ad43e929b0955d7d44c1580905 27-Dec-2010 Cameron Zwarich <zwarich@apple.com> Add knowledge of phi-def and phi-kill valnos to MachineVerifier's predecessor
valno verification. The "Different value live out of predecessor" check is
incorrect in the case of phi-def valnos, so just skip that check for phi-def
valnos and instead check that all of the valnos for predecessors have phi-kill.
Fixes PR8863.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122581 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
2100d21f39a9471254564e359ab8c5901c7aecff 20-Dec-2010 Cameron Zwarich <zwarich@apple.com> MachineVerifier should count landing pad successors as basic blocks rather than
out-edges. Fixes PR8824.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122228 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
0b13d7db281d1c64194269822713ae30a1f921d5 20-Dec-2010 Cameron Zwarich <zwarich@apple.com> Teach MachineVerifier that early clobber defs begin at USE slots and other defs
begin at DEF slots. Fixes the second half of PR8813.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122225 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
5e61f9916eb1e97cf4d696cdc416ad1314ad7138 20-Dec-2010 Cameron Zwarich <zwarich@apple.com> Add a missing check from r122218.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122224 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
636f15ff04c9188ea3bf91477fda1cc29f2c4a61 20-Dec-2010 Cameron Zwarich <zwarich@apple.com> Don't assume that an instruction ending a register's live range always reads
the register; it may be a dead def instead. Fixes PR8820.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122218 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
8ec88ba58866a840a27ab5172fd2b954780b52f3 20-Dec-2010 Cameron Zwarich <zwarich@apple.com> Ignore debug values when performing MachineVerifier liveness checks. Fixes
PR8822.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122207 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
1b031ddedec2901ef01f103512b1d79f63a1bb85 20-Dec-2010 Cameron Zwarich <zwarich@apple.com> Early clobber operands are allowed to be defined at use indices. This fixes one
half of PR8813.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122205 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
22d67cf6ac84c06867681a2fe72f78d5d2b9444d 19-Dec-2010 Cameron Zwarich <zwarich@apple.com> Fix PR8811 by teaching MachineVerifier about optional defs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122199 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
89cab93fe999f6d81b4b99a71ac797b7ecfec277 18-Dec-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Pass a Banner argument to the machine code verifier both from
createMachineVerifierPass and MachineFunction::verify.

The banner is printed before the machine code dump, just like the printer pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122113 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
2f3a4aa550f8f196a546f7957b2df944e04404a2 17-Dec-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Allow missing kill flags on an untied operand of a two-address instruction when
the operand uses the same register as a tied operand:

%r1 = add %r1, %r1

If add were a three-address instruction, kill flags would be required on at
least one of the uses. Since it is a two-address instruction, the tied use
operand must not have a kill flag.

This change makes the kill flag on the untied use operand optional.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122082 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
113a06cff443f5d73c4f1f89bd31b0efb4222227 17-Nov-2010 Eric Christopher <echristo@apple.com> Only avoid the check if we're the last operand before the variable
operands in a variadic instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119446 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
800e57313e19a30749ca59ed03f33583ffff4a3a 16-Nov-2010 Eric Christopher <echristo@apple.com> Make the verifier a little quieter on instructions that it's probably
(and likely) wrong about anyhow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119320 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
962c71089d5c725784135146177736c43d550813 02-Nov-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Be more precise about verifying missing kill flags.

It is legal for an instruction to have two operands using the same register,
only one a kill. This is interpreted as a kill.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117981 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
1c163d2a06e94375b811f807b1667d419f5cb258 01-Nov-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Add kill flag verification.

At least X86FloatingPoint requires correct kill flags after register allocation,
and targets using register scavenging benefit. Conservative kill flags are not
enough.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117960 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
e8f0823a68cfc0201fffb100c7e4a1a2940cf9a9 01-Nov-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Add basic LiveStacks verification.

When an instruction refers to a spill slot with a LiveStacks entry, check that
the spill slot is live at the instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117944 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
ab56647e6b2a7b376f0c245a0bc92cd632107edb 30-Oct-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Disable more of physical register live intervals verification.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117762 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
cb367778c0fb3200292df4f3982f54167444d1f6 29-Oct-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Print out the connected components in the verifier after complaining about their
multiplicity.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117630 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
8c4564287d5231421d5358d71d23f46cd0be18c7 28-Oct-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> One day, physical register live ranges will be sensible.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117602 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
8c593f9173bb3b4474c8de964478f213e90764b9 27-Oct-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Physical registers trivially have multiple connected components all the time.
Only virtuals should be requires to be connected.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117422 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
501dc4224586d3cee61101ed6cd0ccc8ba74c43c 27-Oct-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Verify that live intervals are connected. If there are multiple connected
components, each should get its own virtual register.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117407 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
f4a1e1a69f0727762a73ef0d551e3bbd16b7c04e 26-Oct-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Teach MachineBasicBlock::print() to annotate instructions and blocks with
SlotIndexes when available.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117392 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
dbcc2e119d57dba1e2f013d304ebfbe894c98106 26-Oct-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Remmeber to print full live interval on verification error.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117391 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
e459d55f2832b52a3cfe0350d791c88a0a45fad8 26-Oct-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Don't verify physical registers going into landing pads.
Magic is happening that we don't understand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117370 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
7871687604944d68455a777c3047ff2a6ca5985f 23-Oct-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Verify LiveIntervals against the CFG, ensuring that live-in values are live-out
of all predecessors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117191 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
3bf7cf9f0e5a34ade5e44c47f39e3f46c8ae2c76 23-Oct-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Add more verification of LiveIntervals.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117170 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
0a7bbcb0cc3c6f1905cd26697c5baf4859ac6443 21-Oct-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Permit landing pad successor blocks when verifying basic blocks that end in an
unconditional branch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117041 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.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/MachineVerifier.cpp
ce665bd2e2b581ab0858d1afe359192bac96b868 08-Oct-2010 Owen Anderson <resistor@mac.com> Now with fewer extraneous semicolons!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115996 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
893ab5d7014dd112fb111a67504bd556be9bd393 07-Oct-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Skip unused registers when verifying LiveIntervals.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115874 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
ed8263553ab80e99704554c6f34d7d5a27bf45f0 02-Oct-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Stop using LiveRange in MachineVerifier.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115408 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
02dd53e1c5b941ca5f60fca1b95ebcaf9ccd1dfc 23-Aug-2010 Owen Anderson <resistor@mac.com> Now that PassInfo and Pass::ID have been separated, move the rest of the passes over to the new registration API.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111815 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
5567bb0c5fed4f769d51970b73465c82fe903162 19-Aug-2010 Bill Wendling <isanbard@gmail.com> Correct header.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111540 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.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/MachineVerifier.cpp
58e1248dd2b3d76bbc78a9cb84cd022a35e83955 06-Aug-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Add more verification of LiveIntervals.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110454 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
775aa22da28c0ded619308fa71a9be2b16bcd19b 06-Aug-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Don't try to verify LiveIntervals for physical registers.

When a physical register is in use, some alias of that register has a live
interval with a relevant live range. That is the sad state of intervals after
physreg coalescing of subregs, and it is good enough for correct register
allocation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110452 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.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/MachineVerifier.cpp
c910c8d2fa6e73e8f9875e871a2f3a44574a0b01 06-Aug-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Don't verify LiveVariables if LiveIntervals is available.

LiveVariables becomes horribly wrong while the coalescer is running, but the
analysis is not zapped until after the coalescer pass has run. This causes tons
of false reports when calling verify form the coalescer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110402 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.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/MachineVerifier.cpp
1fe9c34d3f55399dee2c41617d8af4f09e5509e7 06-Aug-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Add basic verification of LiveIntervals.

We verify that the LiveInterval is live at uses and defs, and that all
instructions have a SlotIndex.

Stuff we don't check yet:

- Is the LiveInterval minimal?
- Do all defs correspond to instructions or phis?
- Do all defs dominate all their live ranges?
- Are all live ranges continually reachable from their def?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110386 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
73cf709a08d480c4315dc4aa9f644cf86494c4cf 05-Aug-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Remove double-def checking from MachineVerifier, so a register does not have to
be killed before being redefined.

These checks are usually disabled, and usually fail when enabled. We de facto
allow live registers to be redefined without a kill, the corresponding
assertions in RegScavenger were removed long ago.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110362 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
86050dc8cc0aaea8c9dfeb89de02cafbd7f48d92 19-Jun-2010 Evan Cheng <evan.cheng@apple.com> Allow ARM if-converter to be run after post allocation scheduling.
- This fixed a number of bugs in if-converter, tail merging, and post-allocation
scheduler. If-converter now runs branch folding / tail merging first to
maximize if-conversion opportunities.
- Also changed the t2IT instruction slightly. It now defines the ITSTATE
register which is read by instructions in the IT block.
- Added Thumb2 specific hazard recognizer to ensure the scheduler doesn't
change the instruction ordering in the IT block (since IT mask has been
finalized). It also ensures no other instructions can be scheduled between
instructions in the IT block.

This is not yet enabled.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106344 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
6a8d2c6119aeb32ac914c3dd9b1263ebd0baa51f 18-May-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Teach the machine code verifier to use getSubRegisterRegClass().

The old approach was wrong. It had an off-by-one error.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104034 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
1b2c761a9cc9a57b417c676f4bd97d11b6ba1869 14-May-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> When verifying two-address instructions, check the following:

- Kill is implicit when use and def registers are identical.
- Only virtual registers can differ.

Add a -verify-fast-regalloc to run the verifier before the fast allocator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103797 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
b35798347ea87b8b6d36155b211016a7769f01ab 15-Apr-2010 Dan Gohman <gohman@apple.com> Fix a bunch of namespace polution.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101376 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
81bf03eb5cd68243eabb52505105aa5f4a831bf3 13-Apr-2010 Dan Gohman <gohman@apple.com> Eliminate MachineBasicBlock::const_livein_iterator and make
MachineBasicBlock::livein_iterator a const_iterator, because
clients shouldn't ever be using the iterator interface to
mutate the livein set.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101147 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
75361b69f3f327842b9dad69fa7f28ae3b688412 08-Apr-2010 Chris Lattner <sabre@nondot.org> rename llvm::llvm_report_error -> llvm::report_fatal_error



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100709 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
518bb53485df640d7b7e3f6b0544099020c42aa7 09-Feb-2010 Chris Lattner <sabre@nondot.org> move target-independent opcodes out of TargetInstrInfo
into TargetOpcodes.h. #include the new TargetOpcodes.h
into MachineInstr. Add new inline accessors (like isPHI())
to MachineInstr, and start using them throughout the
codebase.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95687 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
b31defe94caac68561344f78696be3a048413ec9 05-Jan-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Remove livein checks from machine code verifier.

A phi operand that is implicitly defined in a predecessor becomes an undefined
register after phi elimination. This causes a lot of false positives when the
verifier is checking if live-in registers are live-out from all predecessors.

Removing the verifier checks seems like a better solution than insisting on
IMPLICIT_DEF instructions in predecessor blocks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92769 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
18ea3a1551214f1ff3f123f2d67443d5f19baea5 22-Dec-2009 Jakob Stoklund Olesen <stoklund@2pi.dk> Remove minimal CFG sanity checks from verifier.

These checks would often trigger on unreachable statements inserted by
bugpoint, leading it astray.

It would be nice if we could distinguish unreachable blocks from errors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91923 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
5711564b091c39188775aee2768ad36a9b9a99b2 22-Dec-2009 Jakob Stoklund Olesen <stoklund@2pi.dk> Allow explicit %reg0 operands beyond what the .td file describes.

ARM uses these to indicate predicates.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91922 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
864e2efce2cb5d02e376933933d96074723fe77c 05-Dec-2009 Dan Gohman <gohman@apple.com> Remove the target hook TargetInstrInfo::BlockHasNoFallThrough in favor of
MachineBasicBlock::canFallThrough(), which is target-independent and more
thorough.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90634 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
324da7647cfc3025e0c987176f0a300f9f780e6f 20-Nov-2009 Jakob Stoklund Olesen <stoklund@2pi.dk> Add MachineBasicBlock::getName, and use it in place of getBasicBlock()->getName.

Fix debug code that assumes getBasicBlock never returns NULL.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89428 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
8f16e02fc95c9b197d38bcd681f2612d36ed5c11 18-Nov-2009 Jakob Stoklund Olesen <stoklund@2pi.dk> Allow the machine verifier to be run outside the PassManager.

Verify LiveVariables information when present.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89241 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
ce727d0da006ca59bbd8c9ddc86e2fa71217d293 13-Nov-2009 Jakob Stoklund Olesen <stoklund@2pi.dk> Add MachineFunction::verify() to call the machine code verifier directly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88706 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
1dc0fcbaed01ed6510f067bc408f8bd2efd8ac68 13-Nov-2009 Jakob Stoklund Olesen <stoklund@2pi.dk> Fix polarity of a CFG check in machine verifier.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88704 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
0ba90f3e34b826b039bdfece1415ef032c4ad3f5 31-Oct-2009 Dan Gohman <gohman@apple.com> Make -print-machineinstrs more readable.
- Be consistent when referring to MachineBasicBlocks: BB#0.
- Be consistent when referring to virtual registers: %reg1024.
- Be consistent when referring to unknown physical registers: %physreg10.
- Be consistent when referring to known physical registers: %RAX
- Be consistent when referring to register 0: %reg0
- Be consistent when printing alignments: align=16
- Print jump table contents.
- Don't print host addresses, in general.
- and various other cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85682 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
f5a86f45e75ec744c203270ffa03659eb0a220c1 25-Oct-2009 Nick Lewycky <nicholas@mxc.ca> Remove includes of Support/Compiler.h that are no longer needed after the
VISIBILITY_HIDDEN removal.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85043 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.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/MachineVerifier.cpp
2dbc4c84f6de55deeea6631201c5df943d5327c0 07-Oct-2009 Dan Gohman <gohman@apple.com> Add a few simple MachineVerifier checks for MachineMemOperands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83474 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
b44fad7f95b9c0c65d5c772f6ed5084cf46283e9 04-Oct-2009 Jakob Stoklund Olesen <stoklund@2pi.dk> Whitespace and formatting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83285 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
39523e2cfb625d90aa122252b041e2311a9a8ca5 23-Sep-2009 Jakob Stoklund Olesen <stoklund@2pi.dk> Fix verification of explicit operands.

The machine code verifier did not check for explicit operands correctly. It
used MachineInstr::getNumExplicitOperands, but that method may cheat and use
the declared count in the TargetInstrDesc.

Now we check the explicit operands one at a time in visitMachineOperand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82652 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
a5ba07c3d14ffdf288af2513d4ab39464fb7e20d 21-Sep-2009 Jakob Stoklund Olesen <stoklund@2pi.dk> Verify that phi instructions refer to MBBs in the CFG.

The machine code verifier no longer tolerates phi instructions with noop
operands. All MBBs on a phi instruction must be in the CFG.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82448 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
a01a80fa6c0c6e9c92ecfa951e974b98c3ba1783 27-Aug-2009 Dan Gohman <gohman@apple.com> Adjust the MachineBasicBlock verifier rules to be more
tolerant of blocks that end with "unreachable".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80270 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
27920594b940d824038d16b13846aa76cac493cf 27-Aug-2009 Dan Gohman <gohman@apple.com> Add some checks for MachineCFG consistency. Use AnalyzeBranch and
do extra checking when it succeeds, as those are cases where
CodeGen will be doing particularly interesting CFG modifications.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80196 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
705e07f578e2b3af47ddab610feb4e7f2d3063a5 23-Aug-2009 Chris Lattner <sabre@nondot.org> remove various std::ostream version of printing methods from
MachineInstr and MachineOperand. This required eliminating a
bunch of stuff that was using DOUT, I hope that bill doesn't
mind me stealing his fun. ;-)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79813 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
cf143a4d917699f8f4202f331fa9e184070471fb 23-Aug-2009 Chris Lattner <sabre@nondot.org> remove std::ostream versions of printing stuff for MBB and MF,
upgrading a few things to use raw_ostream


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79811 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
17e9edc4a7bbeadf756494cf39fcacc9eff72202 23-Aug-2009 Chris Lattner <sabre@nondot.org> Change raw_fd_ostream to take flags as an optional bitmask
instead of as two bools. Use this to add a F_Append flag
which has the obvious behavior.

Other unrelated changes conflated into this patch:

1. REmove EH stuff from llvm-dis and llvm-as, the try blocks
are dead.
2. Simplify the filename inference code in llvm-as/llvm-dis,
because raw_fd_ostream does the right thing with '-'.
3. Switch machine verifier to use raw_ostream instead of ostream
(Which is the thing that needed append in the first place).




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79807 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
372fefe8d24e40df2390fffeea0dc2dec611f88b 23-Aug-2009 Chris Lattner <sabre@nondot.org> remove some dead print method variants.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79801 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
a6b677d209013d82b03fa8da937296b6faae7de0 13-Aug-2009 Jakob Stoklund Olesen <stoklund@2pi.dk> Use pristine register info in machine code verifier.

So far these registers are simply tracked as if they were live-in.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78912 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
6349668fca491cfe1bf7c754fa0d7eb4255023b1 08-Aug-2009 Jakob Stoklund Olesen <stoklund@2pi.dk> Clean out per-function data after the machine code verifier is done with it.

Also don't dereference old pointers after they have been deleted causing
random crashes when enabling the machine code verifier.

Ahem...

I have not included a test case for the crash. It hapened when enabling the
verifier on CodeGen/X86/2009-08-06-branchfolder-crash.ll.

The crash depends on an MBB being allocated at the same address as a
previously deleted MBB. I don't think that can be reproduced reliably.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78472 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
710b13b2c2257d65779fd6380e27b823b06a74a9 08-Aug-2009 Jakob Stoklund Olesen <stoklund@2pi.dk> Update the machine code verifier to keep up with the scavenger.

* Cleaner handling of <undef>.
* <def> takes precedence over <def,dead>.
* Implement the OK-to-redefine-a-register-that-was-
live-in-but-has-not-been-used-before rule.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78467 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
d37bc5a27b2d40b05614587d61bbecb4017bdf23 04-Aug-2009 Jakob Stoklund Olesen <stoklund@2pi.dk> Enforce stricter rules in machine code verifier.

Implicit operands no longer get a free pass: Imp-use requires a live register
and imp-def requires a dead register.

There is also no special rule allowing redefinition of a sub-register when the
super-register is live. The super register must have imp-kill+imp-def operands
instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78090 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
bcdbcb9f95ce02cdc25048938fc461325b6e94a6 02-Aug-2009 Jakob Stoklund Olesen <stoklund@2pi.dk> Handle <undef> flag in machine code verifier.

Use of an <undef> register is treated like an <imp-use>. It is not an error to use a dead <undef> register.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77890 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
ad2afc2a421a0e41603d5eee412d4d8c77e9bc1c 31-Jul-2009 Dan Gohman <gohman@apple.com> Reapply r77654 with a fix: MachineFunctionPass's getAnalysisUsage
shouldn't do AU.setPreservesCFG(), because even though CodeGen passes
don't modify the LLVM IR CFG, they may modify the MachineFunction CFG,
and passes like MachineLoop are registered with isCFGOnly set to true.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77691 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
c5b19b21d84814d19692a6bbea11fbd135f4b094 31-Jul-2009 Daniel Dunbar <daniel@zuster.org> Revert r77654, it appears to be causing llvm-gcc bootstrap failures, and many
failures when building assorted projects with clang.

--- Reverse-merging r77654 into '.':
U include/llvm/CodeGen/Passes.h
U include/llvm/CodeGen/MachineFunctionPass.h
U include/llvm/CodeGen/MachineFunction.h
U include/llvm/CodeGen/LazyLiveness.h
U include/llvm/CodeGen/SelectionDAGISel.h
D include/llvm/CodeGen/MachineFunctionAnalysis.h
U include/llvm/Function.h
U lib/Target/CellSPU/SPUISelDAGToDAG.cpp
U lib/Target/PowerPC/PPCISelDAGToDAG.cpp
U lib/CodeGen/LLVMTargetMachine.cpp
U lib/CodeGen/MachineVerifier.cpp
U lib/CodeGen/MachineFunction.cpp
U lib/CodeGen/PrologEpilogInserter.cpp
U lib/CodeGen/MachineLoopInfo.cpp
U lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
D lib/CodeGen/MachineFunctionAnalysis.cpp
D lib/CodeGen/MachineFunctionPass.cpp
U lib/CodeGen/LiveVariables.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77661 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
933c762371fe8cc6e2ef5d00d6866f4924852fed 31-Jul-2009 Dan Gohman <gohman@apple.com> Manage MachineFunctions with an analysis Pass instead of the Annotable
mechanism. To support this, make MachineFunctionPass a little more
complete.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77654 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
cb778a8634454c70d88955b3732f330a6cbe5b07 29-Jul-2009 Chris Lattner <sabre@nondot.org> 1. Introduce a new TargetOperandInfo::getRegClass() helper method
and convert code to using it, instead of having lots of things
poke the isLookupPtrRegClass() method directly.

2. Make PointerLikeRegClass contain a 'kind' int, and store it in
the existing regclass field of TargetOperandInfo when the
isLookupPtrRegClass() predicate is set. Make getRegClass pass
this into TargetRegisterInfo::getPointerRegClass(), allowing
targets to have multiple ptr_rc things.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77504 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.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/MachineVerifier.cpp
f7d3e696a5f6e1f467ff107b6db75175887f4916 16-Jul-2009 Jakob Stoklund Olesen <stoklund@2pi.dk> Verify that there is no kill flag on tied operands on two-address instructions.
This extra check is not trigged when runnning "make check" on top-of-tree.

Change error message to better match llvm_unreachable() grammar.

Don't call llvm_unreachable() when writing error messages to a file, but keep going.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75860 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
7d696d80409aad20bb5da0fc4eccab941dd371d4 11-Jul-2009 Torok Edwin <edwintorok@gmail.com> Convert more assert(0)+abort() -> LLVM_UNREACHABLE,
and abort()/exit() -> llvm_report_error().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75363 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
de67a51b66964e95df05cd2192c05c77dccfa4c9 17-May-2009 Jakob Stoklund Olesen <stoklund@2pi.dk> Rename MachineVerifier pass to avoid command line collision.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71987 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
44b27e5c7522e0e2e1a48efefceab8508db711b9 16-May-2009 Jakob Stoklund Olesen <stoklund@2pi.dk> Verify that explicit definitions in the TargetInstrDesc are matched by
explicit register define operands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71933 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
d6fb97761e65fd0db19cd48e22dd05d211822d47 16-May-2009 Jakob Stoklund Olesen <stoklund@2pi.dk> Allow redefinition of reserved registers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71932 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
e556720ea8d60581c95d3ca3f9175a3688150d95 16-May-2009 Duncan Sands <baldrick@free.fr> Pacify gcc-4.3, which suggests explicit braces here
to avoid an ambiguous else.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71924 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineVerifier.cpp
48872e0d84b47769be6c13ae98bf88468b59d921 16-May-2009 Jakob Stoklund Olesen <stoklund@2pi.dk> Pass to verify generated machine code.

The following is checked:

* Operand counts: All explicit operands must be present.

* Register classes: All physical and virtual register operands must be
compatible with the register class required by the instruction descriptor.

* Register live intervals: Registers must be defined only once, and must be
defined before use.

The machine code verifier is enabled with the command-line option
'-verify-machineinstrs', or by defining the environment variable
LLVM_VERIFY_MACHINEINSTRS to the name of a file that will receive all the
verifier errors.

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