summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86RegisterInfo.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix the Red Zone calculation for functions with frame pointers.Dan Gohman2009-01-271-7/+10
| | | | | | | | Don't use the Red Zone when dynamic stack realignment is needed. This could be implemented, but most x86-64 ABIs don't require dynamic stack realignment so it isn't urgent. llvm-svn: 63074
* Implement Red Zone utilization on x86-64. This is currentlyDan Gohman2009-01-261-0/+12
| | | | | | | disabled by default; I'll enable it when I hook it up with the llvm-gcc flag which controls it. llvm-svn: 63056
* Fix a compiler-abort on a testcase where the stack-pointer is added toDan Gohman2008-12-241-6/+13
| | | | | | | a symbolic constant. This is unlikely to be intentional, but it shouldn't crash the compiler. llvm-svn: 61408
* Silence unused variable warnings.Devang Patel2008-12-231-0/+2
| | | | llvm-svn: 61392
* When emitting instructions that define EFLAGS and the EFLAGS value isn'tDan Gohman2008-12-181-7/+23
| | | | | | used, mark the defs as dead. llvm-svn: 61215
* When setting up the frame pointer, add it as a live-in register to allDan Gohman2008-12-181-0/+5
| | | | | | non-entry blocks, so that it doesn't appear use-before-def anywhere. llvm-svn: 61214
* Mark the x86 fp stack registers as "reserved". This tells LiveVariablesDan Gohman2008-12-181-0/+14
| | | | | | | | and the RegisterScavenger not to expect traditional liveness techniques are applicable to these registers, since we don't fully modify the effects of push and pop after stackification. llvm-svn: 61179
* Fish kill flag annotations in PUSH instructions.Dan Gohman2008-11-261-2/+3
| | | | llvm-svn: 60095
* Revert r58489. It isn't correct for all cases.Bill Wendling2008-10-311-1/+2
| | | | llvm-svn: 58523
* Don't skip over all "terminator" instructions when determining where to put theBill Wendling2008-10-311-2/+1
| | | | | | | callee-saved restore code. It could skip over conditional jumps accidentally. Instead, just skip the "return" instructions. llvm-svn: 58489
* Switch the MachineOperand accessors back to the short names likeDan Gohman2008-10-031-3/+3
| | | | | | isReg, etc., from isRegister, etc. llvm-svn: 57006
* Split x86's ADJCALLSTACK instructions into 32-bit and 64-bit forms.Dan Gohman2008-10-011-4/+9
| | | | | | | | | | | This allows the 64-bit forms to use+def RSP instead of ESP. This doesn't fix any real bugs today, but it is more precise and it makes the debug dumps on x86-64 look more consistent. Also, add some comments describing the CALL instructions' physreg operand uses and defs. llvm-svn: 56925
* Re-apply 56683 with fixes.Evan Cheng2008-09-271-0/+1
| | | | llvm-svn: 56748
* Temporarily reverting r56683. This is causing a failure during the build of ↵Bill Wendling2008-09-261-1/+0
| | | | | | | | | | | | | | | | | llvm-gcc: /Volumes/Gir/devel/llvm/clean/llvm-gcc.obj/./gcc/xgcc -B/Volumes/Gir/devel/llvm/clean/llvm-gcc.obj/./gcc/ -B/Volumes/Gir/devel/llvm/clean/llvm-gcc.install/i386-apple-darwin9.5.0/bin/ -B/Volumes/Gir/devel/llvm/clean/llvm-gcc.install/i386-apple-darwin9.5.0/lib/ -isystem /Volumes/Gir/devel/llvm/clean/llvm-gcc.install/i386-apple-darwin9.5.0/include -isystem /Volumes/Gir/devel/llvm/clean/llvm-gcc.install/i386-apple-darwin9.5.0/sys-include -mmacosx-version-min=10.4 -O2 -O2 -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -pipe -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I. -I../../llvm-gcc.src/gcc -I../../llvm-gcc.src/gcc/. -I../../llvm-gcc.src/gcc/../include -I./../intl -I../../llvm-gcc.src/gcc/../libcpp/include -I../../llvm-gcc.src/gcc/../libdecnumber -I../libdecnumber -I/Volumes/Gir/devel/llvm/clean/llvm.obj/include -I/Volumes/Gir/devel/llvm/clean/llvm.src/include -fexceptions -fvisibility=hidden -DHIDE_EXPORTS -c ../../llvm-gcc.src/gcc/unwind-dw2-fde-darwin.c -o libgcc/./unwind-dw2-fde-darwin.o Assertion failed: (TargetRegisterInfo::isVirtualRegister(regA) && TargetRegisterInfo::isVirtualRegister(regB) && "cannot update physical register live information"), function runOnMachineFunction, file /Volumes/Gir/devel/llvm/clean/llvm.src/lib/CodeGen/TwoAddressInstructionPass.cpp, line 311. ../../llvm-gcc.src/gcc/unwind-dw2.c:1527: internal compiler error: Abort trap Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://developer.apple.com/bugreporter> for instructions. {standard input}:3521:non-relocatable subtraction expression, "_dwarf_reg_size_table" minus "L20$pb" {standard input}:3521:symbol: "_dwarf_reg_size_table" can't be undefined in a subtraction expression {standard input}:3520:non-relocatable subtraction expression, "_dwarf_reg_size_table" minus "L20$pb" ... llvm-svn: 56703
* Fix @llvm.frameaddress codegen. FP elimination optimization should be ↵Evan Cheng2008-09-261-0/+1
| | | | | | disabled when frame address is desired. Also add support for depth > 0. llvm-svn: 56683
* X86 address displacement field must be interpreted as a 32-bit value.Evan Cheng2008-09-261-3/+4
| | | | llvm-svn: 56665
* XMM6-XMM15 are callee-saved on Win64. Patch by Nicolas Capens!Anton Korobeynikov2008-09-241-6/+14
| | | | llvm-svn: 56568
* Reapply 55899: First draft of EH support on x86/64-linuxAnton Korobeynikov2008-09-081-20/+38
| | | | | | | Now with fix, which prevents subtle codegen bug to trigger on darwin. No fix for bug though, it's still there. llvm-svn: 55955
* Reverting r55898 to r55909. One of these patches was causing an ICE during ↵Bill Wendling2008-09-081-38/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the full bootstrap on Darwin: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/xgcc -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/ -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.4.0/bin/ -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.4.0/lib/ -isystem /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.4.0/include -isystem /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.4.0/sys-include -O2 -O2 -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -pipe -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I. -I../../llvm-gcc.src/gcc -I../../llvm-gcc.src/gcc/. -I../../llvm-gcc.src/gcc/../include -I./../intl -I../../llvm-gcc.src/gcc/../libcpp/include -I../../llvm-gcc.src/gcc/../libdecnumber -I../libdecnumber -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/include -DSHARED -m64 -DL_negdi2 -c ../../llvm-gcc.src/gcc/libgcc2.c -o libgcc/x86_64/_negdi2_s.o Assertion failed: (TargetRegisterInfo::isVirtualRegister(regA) && TargetRegisterInfo::isVirtualRegister(regB) && "cannot update physical register live information"), function runOnMachineFunction, file /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/lib/CodeGen/TwoAddressInstructionPass.cpp, line 311. /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/xgcc -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/ -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.4.0/bin/ -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.4.0/lib/ -isystem /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.4.0/include -isystem /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.4.0/sys-include -O2 -O2 -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -pipe -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I. -I../../llvm-gcc.src/gcc -I../../llvm-gcc.src/gcc/. -I../../llvm-gcc.src/gcc/../include -I./../intl -I../../llvm-gcc.src/gcc/../libcpp/include -I../../llvm-gcc.src/gcc/../libdecnumber -I../libdecnumber -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/include -DSHARED -m64 -DL_lshrdi3 -c ../../llvm-gcc.src/gcc/libgcc2.c -o libgcc/x86_64/_lshrdi3_s.o ../../llvm-gcc.src/gcc/unwind-dw2.c:1527: internal compiler error: Abort trap Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://developer.apple.com/bugreporter> for instructions. {standard input}:unknown:Undefined local symbol LBB21_11 {standard input}:unknown:Undefined local symbol LBB21_12 {standard input}:unknown:Undefined local symbol LBB21_13 {standard input}:unknown:Undefined local symbol LBB21_8 llvm-svn: 55928
* First draft of EH support on x86/64-linuxAnton Korobeynikov2008-09-081-20/+38
| | | | llvm-svn: 55899
* Tidy up several unbeseeming casts from pointer to intptr_t.Dan Gohman2008-09-041-1/+1
| | | | llvm-svn: 55779
* 80 col. violations.Evan Cheng2008-08-251-3/+4
| | | | llvm-svn: 55341
* Fit in 80 colsNate Begeman2008-07-251-2/+2
| | | | llvm-svn: 54029
* Pool-allocation for MachineInstrs, MachineBasicBlocks, andDan Gohman2008-07-071-12/+12
| | | | | | | | | | | MachineMemOperands. The pools are owned by MachineFunctions. This drastically reduces the number of calls to malloc/free made during the "Emit" phase of scheduling, as well as later phases in CodeGen. Combined with other changes, this speeds up the "instruction selection" phase of CodeGen by 10% in some cases. llvm-svn: 53212
* - Remove calls to copyKillDeadInfo which is an N^2 function. Instead, ↵Evan Cheng2008-07-031-2/+2
| | | | | | | | 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
* Prune a few dependencies on MachineFunction.h.Dan Gohman2008-07-011-0/+1
| | | | llvm-svn: 52976
* Split ISD::LABEL into ISD::DBG_LABEL and ISD::EH_LABEL, eliminatingDan Gohman2008-07-011-2/+2
| | | | | | | | | | | | | | | | the need for a flavor operand, and add a new SDNode subclass, LabelSDNode, for use with them to eliminate the need for a label id operand. Change instruction selection to let these label nodes through unmodified instead of creating copies of them. Teach the MachineInstr emitter how to emit a MachineInstr directly from an ISD label node. This avoids the need for allocating SDNodes for the label id and flavor value, as well as SDNodes for each of the post-isel label, label id, and label flavor. llvm-svn: 52943
* Fixes the last x86-64 test failure in compat.exp:Dale Johannesen2008-06-261-5/+3
| | | | | | | | | | | | | <16 x float> is 64-byte aligned (for some reason), which gets us into the stack realignment code. The computation changing FP-relative offsets to SP-relative was broken, assiging a spill temp to a location also used for parameter passing. This fixes it by rounding up the stack frame to a multiple of the largest alignment (I concluded it wasn't fixable without doing this, but I'm not very sure.) llvm-svn: 52750
* Wrap MVT::ValueType in a struct to get type safetyDuncan Sands2008-06-061-2/+2
| | | | | | | | | | | | | | | | and better control the abstraction. Rename the type to MVT. To update out-of-tree patches, the main thing to do is to rename MVT::ValueType to MVT, and rewrite expressions like MVT::getSizeInBits(VT) in the form VT.getSizeInBits(). Use VT.getSimpleVT() to extract a MVT::SimpleValueType for use in switch statements (you will get an assert failure if VT is an extended value type - these shouldn't exist after type legalization). This results in a small speedup of codegen and no new testsuite failures (x86-64 linux). llvm-svn: 52044
* Fix typoAnton Korobeynikov2008-04-231-1/+1
| | | | llvm-svn: 50169
* Only allow increase of max alignment valueAnton Korobeynikov2008-04-231-1/+2
| | | | llvm-svn: 50168
* Be over-conservative: scan for all used virtual registers and calculate ↵Anton Korobeynikov2008-04-231-2/+9
| | | | | | maximal stack alignment in assumption, that there will be spill of vector register. llvm-svn: 50167
* Add X86 Maximal Stack Alignment Calculator Pass before RAAnton Korobeynikov2008-04-231-8/+31
| | | | llvm-svn: 50166
* Do proper book-keeping of offsets and prologue/epilogue code for stack ↵Anton Korobeynikov2008-04-231-44/+81
| | | | | | realignment llvm-svn: 50163
* If stack realignment is used - incoming args will use EBP as base register ↵Anton Korobeynikov2008-04-231-9/+28
| | | | | | and locals - ESP llvm-svn: 50162
* Eastimate required stack alignment early, so we can decide, whether we will ↵Anton Korobeynikov2008-04-231-0/+19
| | | | | | need frame pointer or not llvm-svn: 50161
* CleanupAnton Korobeynikov2008-04-231-1/+3
| | | | llvm-svn: 50159
* SimplifyAnton Korobeynikov2008-04-231-26/+16
| | | | llvm-svn: 50158
* Make stack alignment options global for all targetsAnton Korobeynikov2008-04-231-5/+0
| | | | llvm-svn: 50157
* Provide option for enabling-disabling stack realignmentAnton Korobeynikov2008-04-231-2/+8
| | | | llvm-svn: 50156
* Disable stack realignment for functions with dynamic-sized alloca'sAnton Korobeynikov2008-04-231-1/+4
| | | | llvm-svn: 50155
* Provide convenient helpers for some operationsAnton Korobeynikov2008-04-231-64/+83
| | | | llvm-svn: 50153
* Whitespace cleanupAnton Korobeynikov2008-04-231-28/+26
| | | | llvm-svn: 50152
* Infrastructure for getting the machine code size of a function and an ↵Nicolas Geoffray2008-04-161-1/+1
| | | | | | instruction. X86, PowerPC and ARM are implemented llvm-svn: 49809
* Reverse sense of unwind-tables option. This meansDale Johannesen2008-04-141-1/+1
| | | | | | | stack tracebacks on Darwin x86-64 won't work by default; nevertheless, everybody but me thinks this is a good idea. llvm-svn: 49663
* Implement new llc flag -disable-required-unwind-tables.Dale Johannesen2008-04-081-1/+3
| | | | | | Corresponds to -fno-unwind-tables (usually default in gcc). llvm-svn: 49361
* Cosmetic changes per EH patch review feedback.Dale Johannesen2008-04-021-4/+4
| | | | llvm-svn: 49096
* Recommitting EH patch; this should answer most of theDale Johannesen2008-04-021-3/+4
| | | | | | | | | | | | | | | review feedback. -enable-eh is still accepted but doesn't do anything. EH intrinsics use Dwarf EH if the target supports that, and are handled by LowerInvoke otherwise. The separation of the EH table and frame move data is, I think, logically figured out, but either one still causes full EH info to be generated (not sure how to split the metadata correctly). MachineModuleInfo::needsFrameInfo is no longer used and is removed. llvm-svn: 49064
* Revert 49006 for the moment.Dale Johannesen2008-04-011-5/+3
| | | | llvm-svn: 49046
* Emit exception handling info for functions which areDale Johannesen2008-03-311-3/+5
| | | | | | | | | | | not marked nounwind, or for all functions when -enable-eh is set, provided the target supports Dwarf EH. llvm-gcc generates nounwind in the right places; other FEs will need to do so also. Given such a FE, -enable-eh should no longer be needed. llvm-svn: 49006
OpenPOWER on IntegriCloud