- Apr 20, 2012
-
-
Jakob Stoklund Olesen authored
The <undef> flag on a def operand only applies to partial register redefinitions. Only print the flag when relevant, and print it as <def,read-undef> to make it clearer what it means. llvm-svn: 155239
-
- Mar 31, 2012
-
-
Rafael Espindola authored
This is the CodeGen equivalent of r153747. I tested that there is not noticeable performance difference with any combination of -O0/-O2 /-g when compiling gcc as a single compilation unit. llvm-svn: 153817
-
- Mar 17, 2012
-
-
Benjamin Kramer authored
This is particularly helpful as both arguments tend to be constants. llvm-svn: 152991
-
- Mar 16, 2012
-
-
Benjamin Kramer authored
Saves one machine word on MachineInstr (88->80 bytes on x86_64, 48->44 on i386). llvm-svn: 152930
-
- Mar 08, 2012
-
-
Craig Topper authored
llvm-svn: 152301
-
- Mar 07, 2012
-
-
Chandler Carruth authored
llvm-svn: 152221
-
Chandler Carruth authored
This one is particularly annoying because the hashing algorithm is highly specialized, with a strange "equivalence" definition that subsets the fields involved. Still, this looks at the exact same set of data as the old code, but without bitwise or-ing over parts of it and other mixing badness. No functionality changed here. I've left a substantial fixme about the fact that there is a cleaner and more principled way to do this, but it requires making the equality definition actual stable for particular types... llvm-svn: 152218
-
- Mar 04, 2012
-
-
Craig Topper authored
llvm-svn: 152001
-
- Mar 01, 2012
-
-
Jakob Stoklund Olesen authored
This allows the function to be inlined, and makes it suitable for use in getInstructionIndex(). Also provide a const version. C++ is great for touch typing practice. llvm-svn: 151782
-
- Feb 17, 2012
-
-
Lang Hames authored
llvm-svn: 150778
-
- Feb 16, 2012
-
-
Lang Hames authored
llvm-svn: 150630
-
- Feb 15, 2012
-
-
Jakob Stoklund Olesen authored
Only accept register masks when looking for an 'overlapping' def. When Overlap is not set, the function searches for a proper definition of Reg. This means MI->modifiesRegister() considers register masks, but MI->definesRegister() doesn't. llvm-svn: 150529
-
- Feb 10, 2012
-
-
Benjamin Kramer authored
Put instruction names into an indexed string table on the side, removing a pointer from MCInstrDesc. Make them accessible through MCInstrInfo. They are only used for debugging purposes so this doesn't have an impact on performance. X86MCTargetDesc.o goes from 630K to 461K on x86_64. llvm-svn: 150245
-
- Feb 08, 2012
-
-
Andrew Trick authored
llvm-svn: 150044
-
- Feb 03, 2012
-
-
Jakob Stoklund Olesen authored
Calls that use register mask operands don't have implicit defs for returned values. The register mask operand handles the call clobber, but it always behaves like a set of dead defs. Add live implicit defs for any implicitly defined physregs that are actually used. llvm-svn: 149715
-
Jakob Stoklund Olesen authored
llvm-svn: 149709
-
Jakob Stoklund Olesen authored
SelectionDAG has 4 different ways of passing physreg defs to users. Collect all of the uses at the same time, and pass all of them to MI->setPhysRegsDeadExcept() to mark the remaining defs dead. The setPhysRegsDeadExcept() function will soon add the required implicit-defs to instructions with register mask operands. llvm-svn: 149708
-
Jakob Stoklund Olesen authored
It doesn't seem worthwhile to give meaning to a NULL register mask pointer. It complicates all the code using register mask operands. llvm-svn: 149646
-
- Jan 26, 2012
-
-
Jakob Stoklund Olesen authored
The live range of the source register may be extended when a redundant copy is eliminated. Make sure any kill flags between the two copies are cleared. This fixes PR11765. llvm-svn: 149069
-
- Jan 16, 2012
-
-
Jakob Stoklund Olesen authored
Register masks will be used as a compact representation of large clobber lists. Currently, an x86 call instruction has some 40 operands representing call-clobbered registers. That's more than 1kB of useless operands per call site. A register mask operand references a bit mask of call-preserved registers, everything else is clobbered. The bit mask will typically come from TargetRegisterInfo::getCallPreservedMask(). By abandoning ImplicitDefs for call-clobbered registers, it also becomes possible to share call instruction descriptions between calling conventions, and we can get rid of the WINCALL* instructions. This patch introduces the new operand kind. Future patches will add RegMask support to target-independent passes before finally the fixed clobber lists can be removed from call instruction descriptions. llvm-svn: 148250
-
- Jan 10, 2012
-
-
Chandler Carruth authored
of several newly un-defaulted switches. This also helps optimizers (including LLVM's) recognize that every case is covered, and we should assume as much. llvm-svn: 147861
-
David Blaikie authored
llvm-svn: 147855
-
- Dec 14, 2011
-
-
Evan Cheng authored
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
-
- Dec 08, 2011
-
-
Evan Cheng authored
clients to decide whether to look inside bundled instructions and whether the query should return true if any / all bundled instructions have the queried property. llvm-svn: 146168
-
- Dec 07, 2011
-
-
Evan Cheng authored
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
-
Jakob Stoklund Olesen authored
llvm-svn: 146004
-
Jakob Stoklund Olesen authored
This flag is used when bundling machine instructions. It indicates whether the operand reads a value defined inside or outside its bundle. llvm-svn: 145997
-
- Dec 06, 2011
-
-
Evan Cheng authored
1. Added opcode BUNDLE 2. Taught MachineInstr class to deal with bundled MIs 3. Changed MachineBasicBlock iterator to skip over bundled MIs; added an iterator to walk all the MIs 4. Taught MachineBasicBlock methods about bundled MIs llvm-svn: 145975
-
- Nov 08, 2011
-
-
Pete Cooper authored
When this field is true it means that the load is from constant (runt-time or compile-time) and so can be hoisted from loops or moved around other memory accesses llvm-svn: 144100
-
- Nov 03, 2011
-
-
Pete Cooper authored
llvm-svn: 143646
-
Pete Cooper authored
Treat objc selector reference globals as invariant so that MachineLICM can hoist them out of loops. Fixes <rdar://problem/6027699> llvm-svn: 143600
-
- Oct 13, 2011
-
-
Nick Lewycky authored
llvm-svn: 141842
-
Jakob Stoklund Olesen authored
Most instructions have some requirements for their register operands. Usually, this is expressed as register class constraints in the MCInstrDesc, but for inline assembly the constraints are encoded in the flag words. llvm-svn: 141835
-
Jakob Stoklund Olesen authored
llvm-svn: 141834
-
Jakob Stoklund Olesen authored
The inline asm operand constraint is initially encoded in the virtual register for the operand, but that register class may change during coalescing, and the original constraint is lost. Encode the original register class as part of the flag word for each inline asm operand. This makes it possible to recover the actual constraint required by inline asm, just like we can for normal instructions. llvm-svn: 141833
-
- Sep 29, 2011
-
-
Jakob Stoklund Olesen authored
llvm-svn: 140767
-
Jakob Stoklund Olesen authored
The function needs to scan the implicit operands anyway, so no performance is won by caching the number of implicit operands added to an instruction. This also fixes a bug when adding operands after an implicit operand has been added manually. The NumImplicitOps count wasn't kept up to date. MachineInstr::addOperand() will now consistently place all explicit operands before all the implicit operands, regardless of the order they are added. It is possible to change an MI opcode and add additional explicit operands. They will be inserted before any existing implicit operands. The only exception is inline asm instructions where operands are never reordered. This is because of a hack that marks explicit clobber regs on inline asm as <implicit-def> to please the fast register allocator. This hack can go away when InstrEmitter and FastIsel can add exact <dead> flags to physreg defs. llvm-svn: 140744
-
- Aug 30, 2011
-
-
Jim Grosbach authored
llvm-svn: 138773
-
- Aug 24, 2011
-
-
Jim Grosbach authored
llvm-svn: 138437
-
- Aug 19, 2011
-
-
Jakob Stoklund Olesen authored
Normally, a partial register def is treated as reading the super-register unless it also defines the full register like this: %vreg110:sub_32bit<def> = COPY %vreg77:sub_32bit, %vreg110<imp-def> This patch also uses the <undef> flag on partial defs to recognize non-reading operands: %vreg110:sub_32bit<def,undef> = COPY %vreg77:sub_32bit This fixes a subtle bug in RegisterCoalescer where LIS->shrinkToUses would treat a coalesced copy as still reading the register, extending the live range artificially. My test case only works when I disable DCE so a dead copy is left for RegisterCoalescer, so I am not including it. <rdar://problem/9967101> llvm-svn: 138018
-