summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86InstrBuilder.h
Commit message (Collapse)AuthorAgeFilesLines
* Canonicalize header guards into a common format.Benjamin Kramer2014-08-131-2/+2
| | | | | | | | | | Add header guards to files that were missing guards. Remove #endif comments as they don't seem common in LLVM (we can easily add them back if we decide they're useful) Changes made by clang-tidy with minor tweaks. llvm-svn: 215558
* [C++] Use 'nullptr'.Craig Topper2014-04-281-1/+2
| | | | llvm-svn: 207394
* Whitespace.Chad Rosier2012-06-221-8/+8
| | | | llvm-svn: 159035
* Remove some unnecessary includes of PseudoSourceValue.h.Jay Foad2011-11-151-1/+0
| | | | llvm-svn: 144631
* - Rename TargetInstrDesc, TargetOperandInfo to MCInstrDesc and MCOperandInfo andEvan Cheng2011-06-281-3/+3
| | | | | | | | sink them into MC layer. - Added MCInstrInfo, which captures the tablegen generated static data. Chang TargetInstrInfo so it's based off MCInstrInfo. llvm-svn: 134021
* it's more elegant to put the "getConstantPool" andChris Lattner2010-09-211-2/+1
| | | | | | | | "getFixedStack" on the MachinePointerInfo class. While this isn't the problem I'm setting out to solve, it is the right way to eliminate PseudoSourceValue, so lets go with it. llvm-svn: 114406
* convert targets to the new MF.getMachineMemOperand interface.Chris Lattner2010-09-211-3/+3
| | | | llvm-svn: 114391
* implement rdar://6653118 - fastisel should fold loads where possible.Chris Lattner2010-09-051-3/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since mem2reg isn't run at -O0, we get a ton of reloads from the stack, for example, before, this code: int foo(int x, int y, int z) { return x+y+z; } used to compile into: _foo: ## @foo subq $12, %rsp movl %edi, 8(%rsp) movl %esi, 4(%rsp) movl %edx, (%rsp) movl 8(%rsp), %edx movl 4(%rsp), %esi addl %edx, %esi movl (%rsp), %edx addl %esi, %edx movl %edx, %eax addq $12, %rsp ret Now we produce: _foo: ## @foo subq $12, %rsp movl %edi, 8(%rsp) movl %esi, 4(%rsp) movl %edx, (%rsp) movl 8(%rsp), %edx addl 4(%rsp), %edx ## Folded load addl (%rsp), %edx ## Folded load movl %edx, %eax addq $12, %rsp ret Fewer instructions and less register use = faster compiles. llvm-svn: 113102
* Change LEA to have 5 operands for its memory operand, justChris Lattner2010-07-081-26/+13
| | | | | | | | | | | like all other instructions, even though a segment is not allowed. This resolves a bunch of gross hacks in the encoder and makes LEA more consistent with the rest of the instruction set. No functionality change. llvm-svn: 107934
* Add const qualifiers to CodeGen's use of LLVM IR constructs.Dan Gohman2010-04-151-1/+1
| | | | llvm-svn: 101334
* -Revert parts of 84326 and 84411. Distinquishing between fixed and non-fixedEvan Cheng2009-10-181-4/+1
| | | | | | | | | | | stack slots and giving them different PseudoSourceValue's did not fix the problem of post-alloc scheduling miscompiling llvm itself. - Apply Dan's conservative workaround by assuming any non fixed stack slots can alias other memory locations. This means a load from spill slot #1 cannot move above a store of spill slot #2. - Enable post-alloc scheduling for x86 at optimization leverl Default and above. llvm-svn: 84424
* Distinquish stack slots from other stack objects. They (and fixed objects) ↵Evan Cheng2009-10-171-1/+4
| | | | | | get FixedStack PseudoSourceValues. llvm-svn: 84326
* Revert 84315 for now. Re-thinking the patch.Evan Cheng2009-10-171-1/+1
| | | | llvm-svn: 84321
* Rename getFixedStack to getStackObject. The stack objects represented are notEvan Cheng2009-10-171-1/+1
| | | | | | necessarily fixed. Only those will negative frame indices are "fixed." llvm-svn: 84315
* Improve MachineMemOperand handling.Dan Gohman2009-09-251-5/+6
| | | | | | | | | | | | | | | | | | | | | - Allocate MachineMemOperands and MachineMemOperand lists in MachineFunctions. This eliminates MachineInstr's std::list member and allows the data to be created by isel and live for the remainder of codegen, avoiding a lot of copying and unnecessary translation. This also shrinks MemSDNode. - Delete MemOperandSDNode. Introduce MachineSDNode which has dedicated fields for MachineMemOperands. - Change MemSDNode to have a MachineMemOperand member instead of its own fields with the same information. This introduces some redundancy, but it's more consistent with what MachineInstr will eventually want. - Ignore alignment when searching for redundant loads for CSE, but remember the greatest alignment. Target-specific code which previously used MemOperandSDNodes with generic SDNodes now use MemIntrinsicSDNodes, with opcodes in a designated range so that the SelectionDAG framework knows that MachineMemOperand information is available. llvm-svn: 82794
* Fix the offset values for these memoperands. For frame objects, theDan Gohman2009-09-211-1/+1
| | | | | | | PseudoSourceValue already effectively represents the offset from the frame base, so the actual offset should not be added to it. llvm-svn: 82465
* fix PR4984 by ensuring that fastisel adds properly sign extended GEP ↵Chris Lattner2009-09-151-1/+1
| | | | | | | | displacement values to machineinstrs. llvm-svn: 81886
* Do not put bunch of target-specific stuff into common namespaceAnton Korobeynikov2009-07-161-19/+20
| | | | llvm-svn: 75971
* Fix some fast-isel problems selecting global variable addressing inChris Lattner2009-07-011-2/+4
| | | | | | pic mode. llvm-svn: 74582
* Fix PR4466 by making fastisel set operand flags correctly.Chris Lattner2009-06-271-2/+2
| | | | llvm-svn: 74366
* Change MachineInstrBuilder::addReg() to take a flag instead of a list ofBill Wendling2009-05-131-4/+4
| | | | | | | | | | | | booleans. This gives a better indication of what the "addReg()" is doing. Remembering what all of those booleans mean isn't easy, especially if you aren't spending all of your time in that code. I took Jakob's suggestion and made it illegal to pass in "true" for the flag. This should hopefully prevent any unintended misuse of this (by reverting to the old way of using addReg()). llvm-svn: 71722
* Re-apply 68552.Rafael Espindola2009-04-081-6/+27
| | | | | | Tested by bootstrapping llvm-gcc and using that to build llvm. llvm-svn: 68645
* Temporarily revert r68552. This was causing a failure in the self-hosting LLVMBill Wendling2009-04-071-24/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | builds. --- Reverse-merging (from foreign repository) r68552 into '.': U test/CodeGen/X86/tls8.ll U test/CodeGen/X86/tls10.ll U test/CodeGen/X86/tls2.ll U test/CodeGen/X86/tls6.ll U lib/Target/X86/X86Instr64bit.td U lib/Target/X86/X86InstrSSE.td U lib/Target/X86/X86InstrInfo.td U lib/Target/X86/X86RegisterInfo.cpp U lib/Target/X86/X86ISelLowering.cpp U lib/Target/X86/X86CodeEmitter.cpp U lib/Target/X86/X86FastISel.cpp U lib/Target/X86/X86InstrInfo.h U lib/Target/X86/X86ISelDAGToDAG.cpp U lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp U lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp U lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.h U lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.h U lib/Target/X86/X86ISelLowering.h U lib/Target/X86/X86InstrInfo.cpp U lib/Target/X86/X86InstrBuilder.h U lib/Target/X86/X86RegisterInfo.td llvm-svn: 68560
* Reduce code duplication on the TLS implementation.Rafael Espindola2009-04-071-5/+24
| | | | | | | | | | This introduces a small regression on the generated code quality in the case we are just computing addresses, not loading values. Will work on it and on X86-64 support. llvm-svn: 68552
* Extend X86's addFrameReference to add a MachineMemOperand forDan Gohman2008-12-031-1/+18
| | | | | | | the frame reference. This will help post-RA scheduling determine that spills to distinct stack slots are independent. llvm-svn: 60486
* Fix X86FastISel's output for x86-32 PIC constant pool addresses.Dan Gohman2008-09-301-5/+7
| | | | llvm-svn: 56829
* Fix constant pool loads, and remove broken versions of addConstantPoolReference.Owen Anderson2008-09-061-3/+1
| | | | llvm-svn: 55868
* Fix the X86 addConstantPoolReference, which had the operands in the wrong order.Owen Anderson2008-09-061-1/+2
| | | | llvm-svn: 55867
* - Remove calls to copyKillDeadInfo which is an N^2 function. Instead, ↵Evan Cheng2008-07-031-4/+8
| | | | | | | | propagate kill / dead markers as new instructions are constructed in foldMemoryOperand, convertToThressAddress, etc. - Also remove LiveVariables::instructionChanged, etc. Replace all calls with cheaper calls which update VarInfo kill list. llvm-svn: 53097
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* Patches to make the LLVM sources more -pedantic clean. Patch providedChris Lattner2006-05-241-1/+1
| | | | | | by Anton Korobeynikov! This is a step towards closing PR786. llvm-svn: 28447
* Remove and simplify some more machineinstr/machineoperand stuff.Chris Lattner2006-05-041-6/+6
| | | | llvm-svn: 28105
* There shalt be only one "immediate" operand type!Chris Lattner2006-05-041-6/+6
| | | | llvm-svn: 28099
* Remove a bunch more SparcV9 specific stuffChris Lattner2006-05-041-1/+1
| | | | llvm-svn: 28093
* * Remove trailing whitespaceMisha Brukman2005-04-211-5/+5
| | | | | | * Convert tabs to spaces llvm-svn: 21426
* Fix indentation.Chris Lattner2005-01-171-19/+18
| | | | llvm-svn: 19649
* Add a new method.Chris Lattner2005-01-021-1/+10
| | | | llvm-svn: 19249
* Remove unused enum valueChris Lattner2004-12-171-2/+2
| | | | llvm-svn: 19024
* Allow X86 addressing modes to represent globals with offsets. Patch contributedChris Lattner2004-10-151-5/+10
| | | | | | by Jeff Cohen! llvm-svn: 17008
* Reduce the number of arguments in the instruction builder and make someReid Spencer2004-08-301-6/+33
| | | | | | | | | improvements on instruction selection that account for register and frame index bases. Patch contributed by Jeff Cohen. Thanks Jeff! llvm-svn: 16110
* Add assertion for scale verification.Alkis Evlogimenos2004-03-041-0/+1
| | | | llvm-svn: 12120
* Add a helper to create an addressing mode given all of the pieces.Chris Lattner2004-02-251-0/+8
| | | | llvm-svn: 11818
* Put all LLVM code into the llvm namespace, as per bug 109.Brian Gaeke2003-11-111-0/+4
| | | | llvm-svn: 9903
* Converted tabs to spaces.Misha Brukman2003-10-221-1/+1
| | | | llvm-svn: 9360
* Added LLVM copyright header.John Criswell2003-10-211-0/+7
| | | | llvm-svn: 9321
* X86 backend should never use addMRegChris Lattner2003-01-151-4/+4
| | | | llvm-svn: 5288
* Add support for frame and constant pool referencesChris Lattner2003-01-131-4/+16
| | | | llvm-svn: 5228
* New addFrameReference functionChris Lattner2002-12-281-6/+18
| | | | llvm-svn: 5182
* lib/Target/X86/InstSelectSimple.cpp: Start counting arguments with 2,Brian Gaeke2002-12-131-6/+10
| | | | | | | | | | | | | | | | because arguments start two stack slots off of EBP. Break out of the for loop once the argument is found. Increment the counter at the end of the loop instead of the beginning. Use addRegOffset and compute the scale * index part at compile time instead of using the fancy load instruction. Just because an instruction set has wacky addressing modes doesn't mean we ought to use them (at least, if you believe Dave Patterson). lib/Target/X86/X86InstrBuilder.h: Add some comments. test/Regression/Jello/test-loadstore.ll: Let main return int 0. llvm-svn: 4999
* Add a simple way to add memory locations of format [reg+offset]Misha Brukman2002-11-221-0/+9
| | | | llvm-svn: 4825
OpenPOWER on IntegriCloud