summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineVerifier.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Verify bundle flags for consistency in MachineVerifier.Jakob Stoklund Olesen2012-12-181-0/+17
| | | | | | | The new bidirectional bundle flags are redundant, so inadvertent bundle tearing can be detected in the machine code verifier. llvm-svn: 170463
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-031-12/+12
| | | | | | | | | | | | | | | | | 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
* [inline asm] Implement mayLoad and mayStore for inline assembly. In general,Chad Rosier2012-10-301-2/+3
| | | | | | | | | | 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
* Remove unused BitVectors from getAllocatableSet().Jakob Stoklund Olesen2012-10-161-4/+1
| | | | llvm-svn: 165999
* Switch most getReservedRegs() clients to the MRI equivalent.Jakob Stoklund Olesen2012-10-151-1/+1
| | | | | | | Using the cached bit vector in MRI avoids comstantly allocating and recomputing the reserved register bit vector. llvm-svn: 165983
* Stop casting away const qualifier needlessly.Roman Divacky2012-09-051-1/+1
| | | | llvm-svn: 163258
* Move tie checks into MachineVerifier::visitMachineOperand.Jakob Stoklund Olesen2012-09-041-36/+26
| | | | llvm-svn: 163152
* Verify the consistency of inline asm operands.Jakob Stoklund Olesen2012-08-291-16/+72
| | | | | | | | | | 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
* Verify the tied operand flags.Jakob Stoklund Olesen2012-08-291-0/+37
| | | | | | | | 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
* Add a getName function to MachineFunction. Use it in places that previously ↵Craig Topper2012-08-221-2/+2
| | | | | | did getFunction()->getName(). Remove includes of Function.h that are no longer needed. llvm-svn: 162347
* Don't add CFG edges for redundant conditional branches.Jakob Stoklund Olesen2012-08-201-2/+18
| | | | | | | | | | | | | 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
* Add CFG checks to MachineVerifier.Jakob Stoklund Olesen2012-08-201-0/+40
| | | | | | | Verify that the predecessor and successor lists are consistent and free of duplicates. llvm-svn: 162223
* Fix undefined behavior: don't perform array indexing through a potentially nullRichard Smith2012-08-151-1/+2
| | | | | | pointer. llvm-svn: 161919
* Verify regunit intervals along with virtreg intervals.Jakob Stoklund Olesen2012-08-021-2/+12
| | | | | | | Don't cause regunit intervals to be computed just to verify them. Only check the already cached intervals. llvm-svn: 161183
* Add report() functions that take a LiveInterval argument.Jakob Stoklund Olesen2012-08-021-60/+67
| | | | llvm-svn: 161178
* Extract some methods from verifyLiveIntervals.Jakob Stoklund Olesen2012-08-021-245/+259
| | | | | | No functional change. llvm-svn: 161149
* Also verify RegUnit intervals at uses.Jakob Stoklund Olesen2012-08-011-15/+36
| | | | llvm-svn: 161147
* Verify two-address constraints more carefully.Jakob Stoklund Olesen2012-07-251-14/+7
| | | | | | Include <undef> operands and virtual registers after leaving SSA form. llvm-svn: 160734
* Fix crash in machine verifier when trying to print the def of a register ↵Pete Cooper2012-07-191-0/+2
| | | | | | which has no def llvm-svn: 160531
* Remove tabs.Bill Wendling2012-07-191-2/+2
| | | | llvm-svn: 160475
* Check for extra kill flags on live-out virtual registers.Jakob Stoklund Olesen2012-06-291-0/+14
| | | | | | | This would previously get reported as the misleading "Virtual register def doesn't dominate all uses." llvm-svn: 159460
* Enforce stricter liveness rules for PHIs.Jakob Stoklund Olesen2012-06-251-6/+11
| | | | | | | | | | | | | 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
* Also verify the def index for early clobbers.Jakob Stoklund Olesen2012-06-221-2/+3
| | | | llvm-svn: 159039
* Fix some more LiveInterval enumerations.Jakob Stoklund Olesen2012-06-201-8/+9
| | | | | | Deterministically enumerate the virtual registers instead. llvm-svn: 158872
* Make machine verifier check the first instruction of the last bundle instead ofAkira Hatanaka2012-06-141-8/+8
| | | | | | the last instruction of a basic block. llvm-svn: 158468
* Move terminator machine verification to check ↵Pete Cooper2012-06-071-11/+11
| | | | | | MachineBasicBlock::instr_iterator instead of MBB::iterator llvm-svn: 158154
* Properly verify liveness with bundled machine instructions.Jakob Stoklund Olesen2012-06-061-13/+34
| | | | | | | | 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
* Switch all register list clients to the new MC*Iterator interface.Jakob Stoklund Olesen2012-06-011-9/+9
| | | | | | | | | | | | | 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
* Optional def can be either a def or a use (of reg0).Evan Cheng2012-05-291-1/+1
| | | | llvm-svn: 157640
* Fix a verifier bug.Jakob Stoklund Olesen2012-05-171-1/+1
| | | | | | Make sure useless (def-only) intervals also get verified. llvm-svn: 157000
* Add an MF argument to TRI::getPointerRegClass() and TII::getRegClass().Jakob Stoklund Olesen2012-05-071-3/+4
| | | | | | | | | | | | | 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
* Enable machine code verification after PreSched2 passes.Jakob Stoklund Olesen2012-03-281-1/+3
| | | | | | | | | | 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
* Skip liveness verification when MRI->tracksLiveness() is false.Jakob Stoklund Olesen2012-03-281-105/+112
| | | | | | | | | 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
* Report the defining instruction.Jakob Stoklund Olesen2012-03-101-4/+3
| | | | llvm-svn: 152460
* Add SSA verification to MachineVerifier.Jakob Stoklund Olesen2012-03-101-2/+12
| | | | | | Somehow we never verified SSA dominance before. llvm-svn: 152458
* Use SmallPtrSet instead of DenseSet.Jakob Stoklund Olesen2012-03-101-3/+4
| | | | llvm-svn: 152457
* Convert more GenRegisterInfo tables from unsigned to uint16_t to reduce ↵Craig Topper2012-03-051-4/+4
| | | | | | static data size. llvm-svn: 152016
* Move the operand iterator into MachineInstrBundle.h where it belongs.Jakob Stoklund Olesen2012-02-291-4/+5
| | | | | | | | | 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
* Handle regmasks in the machine code verifier.Jakob Stoklund Olesen2012-02-281-0/+15
| | | | llvm-svn: 151607
* Update machine code verifier.Jakob Stoklund Olesen2012-02-271-35/+91
| | | | | | | | | 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. llvm-svn: 151531
* Update MachineVerifier to check the new physreg live-in rules.Lang Hames2012-02-141-0/+22
| | | | llvm-svn: 150496
* - Add MachineInstrBundle.h and MachineInstrBundle.cpp. This includes a functionEvan Cheng2011-12-141-2/+6
| | | | | | | | | | 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. llvm-svn: 146542
* Add bundle aware API for querying instruction properties and switch the codeEvan Cheng2011-12-071-14/+14
| | | | | | | | | | | | | | 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. llvm-svn: 146026
* Remove all remaining uses of Value::getNameStr().Benjamin Kramer2011-11-151-1/+1
| | | | llvm-svn: 144648
* Use getVNInfoBefore() when it makes sense.Jakob Stoklund Olesen2011-11-141-3/+3
| | | | llvm-svn: 144517
* Rename SlotIndexes to match how they are used.Jakob Stoklund Olesen2011-11-131-9/+10
| | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 144503
* Fix sub-register operand verification.Jakob Stoklund Olesen2011-10-051-12/+25
| | | | | | | | | 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. llvm-svn: 141220
* Verify that terminators follow non-terminators.Jakob Stoklund Olesen2011-09-231-0/+13
| | | | | | This exposes a -segmented-stacks bug. llvm-svn: 140429
* Lower ARM adds/subs to add/sub after adding optional CPSR operand.Andrew Trick2011-09-211-0/+3
| | | | | | | | | | | | | 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. llvm-svn: 140228
* Stop verifying hasPHIKill() flags.Jakob Stoklund Olesen2011-09-151-11/+1
| | | | | | | | | | 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. llvm-svn: 139783
OpenPOWER on IntegriCloud