summaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineVerifier.cpp
AgeCommit message (Collapse)Author
2013-10-10Represent RegUnit liveness with LiveRange instanceMatthias Braun
Previously LiveInterval has been used, but having a spill weight and register number is unnecessary for a register unit. llvm-svn: 192397
2013-10-10Change MachineVerifier to work on LiveRange + LiveIntervalMatthias Braun
llvm-svn: 192395
2013-10-10Pass LiveQueryResult by valueMatthias Braun
This makes the API a bit more natural to use and makes it easier to make LiveRanges implementation details private. llvm-svn: 192394
2013-10-10Rename LiveRange to LiveInterval::SegmentMatthias Braun
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. llvm-svn: 192392
2013-10-04Fix indentationMatthias Braun
llvm-svn: 191965
2013-07-16Add a wrapper for open.Rafael Espindola
This centralizes the handling of O_BINARY and opens the way for hiding more differences (like how open behaves with directories). llvm-svn: 186447
2013-07-15Machine Verifier: verify FrameSetup and FrameDestroyManman Ren
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 llvm-svn: 186350
2013-05-22Simplify logic now that r182490 is in place. No functional change intended.Chad Rosier
llvm-svn: 182531
2013-04-19Add an MRI::verifyUseLists() function.Jakob Stoklund Olesen
This checks the sanity of the register use lists in the MI intermediate representation. llvm-svn: 179895
2013-01-02Move all of the header files which are involved in modelling the LLVM IRChandler Carruth
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. llvm-svn: 171366
2012-12-19Add a missing 'else'. Found by grep '} if'Dmitri Gribenko
No testcase because it is apparently not so trivial to construct. llvm-svn: 170595
2012-12-18Verify bundle flags for consistency in MachineVerifier.Jakob Stoklund Olesen
The new bidirectional bundle flags are redundant, so inadvertent bundle tearing can be detected in the machine code verifier. llvm-svn: 170463
2012-12-03Use the new script to sort the includes of every file under lib.Chandler Carruth
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. =] llvm-svn: 169131
2012-10-30[inline asm] Implement mayLoad and mayStore for inline assembly. In general,Chad Rosier
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 llvm-svn: 167040
2012-10-16Remove unused BitVectors from getAllocatableSet().Jakob Stoklund Olesen
llvm-svn: 165999
2012-10-15Switch most getReservedRegs() clients to the MRI equivalent.Jakob Stoklund Olesen
Using the cached bit vector in MRI avoids comstantly allocating and recomputing the reserved register bit vector. llvm-svn: 165983
2012-09-05Stop casting away const qualifier needlessly.Roman Divacky
llvm-svn: 163258
2012-09-04Move tie checks into MachineVerifier::visitMachineOperand.Jakob Stoklund Olesen
llvm-svn: 163152
2012-08-29Verify the consistency of inline asm operands.Jakob Stoklund Olesen
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. llvm-svn: 162849
2012-08-29Verify the tied operand flags.Jakob Stoklund Olesen
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. llvm-svn: 162816
2012-08-22Add a getName function to MachineFunction. Use it in places that previously ↵Craig Topper
did getFunction()->getName(). Remove includes of Function.h that are no longer needed. llvm-svn: 162347
2012-08-20Don't add CFG edges for redundant conditional branches.Jakob Stoklund Olesen
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. llvm-svn: 162230
2012-08-20Add CFG checks to MachineVerifier.Jakob Stoklund Olesen
Verify that the predecessor and successor lists are consistent and free of duplicates. llvm-svn: 162223
2012-08-15Fix undefined behavior: don't perform array indexing through a potentially nullRichard Smith
pointer. llvm-svn: 161919
2012-08-02Verify regunit intervals along with virtreg intervals.Jakob Stoklund Olesen
Don't cause regunit intervals to be computed just to verify them. Only check the already cached intervals. llvm-svn: 161183
2012-08-02Add report() functions that take a LiveInterval argument.Jakob Stoklund Olesen
llvm-svn: 161178
2012-08-02Extract some methods from verifyLiveIntervals.Jakob Stoklund Olesen
No functional change. llvm-svn: 161149
2012-08-01Also verify RegUnit intervals at uses.Jakob Stoklund Olesen
llvm-svn: 161147
2012-07-25Verify two-address constraints more carefully.Jakob Stoklund Olesen
Include <undef> operands and virtual registers after leaving SSA form. llvm-svn: 160734
2012-07-19Fix crash in machine verifier when trying to print the def of a register ↵Pete Cooper
which has no def llvm-svn: 160531
2012-07-19Remove tabs.Bill Wendling
llvm-svn: 160475
2012-06-29Check for extra kill flags on live-out virtual registers.Jakob Stoklund Olesen
This would previously get reported as the misleading "Virtual register def doesn't dominate all uses." llvm-svn: 159460
2012-06-25Enforce stricter liveness rules for PHIs.Jakob Stoklund Olesen
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. llvm-svn: 159150
2012-06-22Also verify the def index for early clobbers.Jakob Stoklund Olesen
llvm-svn: 159039
2012-06-20Fix some more LiveInterval enumerations.Jakob Stoklund Olesen
Deterministically enumerate the virtual registers instead. llvm-svn: 158872
2012-06-14Make machine verifier check the first instruction of the last bundle instead ofAkira Hatanaka
the last instruction of a basic block. llvm-svn: 158468
2012-06-07Move terminator machine verification to check ↵Pete Cooper
MachineBasicBlock::instr_iterator instead of MBB::iterator llvm-svn: 158154
2012-06-06Properly verify liveness with bundled machine instructions.Jakob Stoklund Olesen
Bundles should be treated as one atomic transaction when checking liveness. That is how the register allocator (and VLIW targets) treats bundles. llvm-svn: 158116
2012-06-01Switch all register list clients to the new MC*Iterator interface.Jakob Stoklund Olesen
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). llvm-svn: 157854
2012-05-29Optional def can be either a def or a use (of reg0).Evan Cheng
llvm-svn: 157640
2012-05-17Fix a verifier bug.Jakob Stoklund Olesen
Make sure useless (def-only) intervals also get verified. llvm-svn: 157000
2012-05-07Add an MF argument to TRI::getPointerRegClass() and TII::getRegClass().Jakob Stoklund Olesen
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! llvm-svn: 156328
2012-03-28Enable machine code verification after PreSched2 passes.Jakob Stoklund Olesen
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. llvm-svn: 153614
2012-03-28Skip liveness verification when MRI->tracksLiveness() is false.Jakob Stoklund Olesen
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. llvm-svn: 153596
2012-03-10Report the defining instruction.Jakob Stoklund Olesen
llvm-svn: 152460
2012-03-10Add SSA verification to MachineVerifier.Jakob Stoklund Olesen
Somehow we never verified SSA dominance before. llvm-svn: 152458
2012-03-10Use SmallPtrSet instead of DenseSet.Jakob Stoklund Olesen
llvm-svn: 152457
2012-03-05Convert more GenRegisterInfo tables from unsigned to uint16_t to reduce ↵Craig Topper
static data size. llvm-svn: 152016
2012-02-29Move the operand iterator into MachineInstrBundle.h where it belongs.Jakob Stoklund Olesen
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. llvm-svn: 151684
2012-02-28Handle regmasks in the machine code verifier.Jakob Stoklund Olesen
llvm-svn: 151607