Jim Grosbach
1ebe0e2667
Add 'const' to getter function.
...
llvm-svn: 112984
2010-09-03 18:17:16 +00:00
Eric Christopher
67801775eb
Fix a couple of typos.
...
Patch by Cameron Esfahani!
llvm-svn: 112297
2010-08-27 21:38:11 +00:00
Jim Grosbach
33f85d977a
Remove the MFI storage of the local allocation block size. It's not needed.
...
llvm-svn: 111847
2010-08-23 21:29:29 +00:00
Jim Grosbach
079599c699
Add explicit initializer for UseLocalStackAllocationBlock in MFI constructor
...
llvm-svn: 111655
2010-08-20 17:34:22 +00:00
Jim Grosbach
d6e0ffd95b
Update local stack block allocation to let PEI do the allocs if no additional
...
base registers were required. This will allow for slightly better packing
of the locals when alignment padding is necessary after callee saved registers.
llvm-svn: 111508
2010-08-19 02:47:08 +00:00
Jim Grosbach
ea414d3999
Better handle alignment requirements for local objects in pre-regalloc frame
...
mapping. Have the local block track its alignment requirement, and then
apply that when the block itself is allocated. Previously, offsets could
get adjusted in PEI to be different, relative to one another, than the
block allocation thought they would be, which defeats the point of doing
the allocation this way. Continuing rdar://8277890
llvm-svn: 111197
2010-08-16 22:30:41 +00:00
Jim Grosbach
33f86ffe9f
track local frame size in MFI, not local to the pass, since PEI needs it.
...
llvm-svn: 111164
2010-08-16 18:06:15 +00:00
Jim Grosbach
a4d3174cba
Add a local stack object block allocation pass. This is still an
...
experimental pass that allocates locals relative to one another before
register allocation and then assigns them to actual stack slots as a block
later in PEI. This will eventually allow targets with limited index offset
range to allocate additional base registers (not just FP and SP) to
more efficiently reference locals, as well as handle situations where
locals cannot be referenced via SP or FP at all (dynamic stack realignment
together with variable sized objects, for example). It's currently
incomplete and almost certainly buggy. Work in progress.
Disabled by default and gated via the -enable-local-stack-alloc command
line option.
rdar://8277890
llvm-svn: 111059
2010-08-14 00:15:52 +00:00
Jim Grosbach
b1e8749e37
tidy up comments
...
llvm-svn: 111040
2010-08-13 20:32:35 +00:00
Jim Grosbach
e76c0d6dee
tidy up 80 column and whitespace
...
llvm-svn: 111033
2010-08-13 20:08:59 +00:00
Bill Wendling
bb2398331b
It's better to have the arrays, which would trigger the creation of stack
...
protectors, to be near the stack protectors on the stack. Accomplish this by
tagging the stack object with a predicate that indicates that it would trigger
this. In the prolog-epilog inserter, assign these objects to the stack after the
stack protector but before the other objects.
llvm-svn: 109481
2010-07-27 01:55:19 +00:00
Eric Christopher
3ae12eb078
Formatting.
...
llvm-svn: 108926
2010-07-20 21:05:58 +00:00
Eric Christopher
b397b001b9
Propagate alloca alignment information via variable size object frame
...
information.
No functional change yet.
llvm-svn: 108583
2010-07-17 00:28:22 +00:00
Evan Cheng
47f3a2db40
Remove isSS argument from CreateFixedObject. Fixed objects cannot be spill slots so it's always false.
...
llvm-svn: 107550
2010-07-03 00:40:23 +00:00
Dan Gohman
b220af45eb
Add explicit keywords.
...
llvm-svn: 106300
2010-06-18 19:04:37 +00:00
Rafael Espindola
f7170870cf
Remove the TargetRegisterClass member from CalleeSavedInfo
...
llvm-svn: 105344
2010-06-02 20:02:30 +00:00
Evan Cheng
241d2c434e
Implement @llvm.returnaddress. rdar://8015977.
...
llvm-svn: 104421
2010-05-22 01:47:14 +00:00
Bill Wendling
e346a38ed4
Rename "HasCalls" in MachineFrameInfo to "AdjustsStack" to better describe what
...
the variable actually tracks.
N.B., several back-ends are using "HasCalls" as being synonymous for something
that adjusts the stack. This isn't 100% correct and should be looked into.
llvm-svn: 103802
2010-05-14 21:14:32 +00:00
Chris Lattner
cfca39ef59
remove the MMI pointer from MachineFrameInfo.
...
llvm-svn: 100415
2010-04-05 05:57:52 +00:00
Chris Lattner
4a201bab8f
prune #includes.
...
llvm-svn: 100411
2010-04-05 05:43:16 +00:00
Chris Lattner
248e65ec05
trim some spurious references to DwarfWriter. SDIsel really doesn't
...
need it anymore, so don't addRequire it.
llvm-svn: 100400
2010-04-05 04:09:20 +00:00
Evan Cheng
6eb7ff5bbf
Teach MachineFrameInfo to track maximum alignment while stack objects are being
...
created. This ensures it's updated at all time. It means targets which perform
dynamic stack alignment would know whether it is required and whether frame
pointer register cannot be made available register allocation.
This is a fix for rdar://7625239. Sorry, I can't create a reasonably sized test
case.
llvm-svn: 96069
2010-02-13 01:56:41 +00:00
Jim Grosbach
0e1230b23b
Factor the stack alignment calculations out into a target independent pass.
...
No functionality change.
llvm-svn: 90336
2009-12-02 19:30:24 +00:00
David Greene
7eb9716603
Remove duplicate APIs and state WRT spill objects.
...
llvm-svn: 87106
2009-11-13 14:42:06 +00:00
David Greene
58e7c6145b
Add a bool flag to StackObjects telling whether they reference spill
...
slots. The AsmPrinter will use this information to determine whether to
print a spill/reload comment.
Remove default argument values. It's too easy to pass a wrong argument
value when multiple arguments have default values. Make everything
explicit to trap bugs early.
Update all targets to adhere to the new interfaces..
llvm-svn: 87022
2009-11-12 20:49:22 +00:00
Chandler Carruth
766362c707
Move DataTypes.h to include/llvm/System, update all users. This breaks the last
...
direct inclusion edge from System to Support.
llvm-svn: 85086
2009-10-26 01:35:46 +00:00
Evan Cheng
5ab1ccfaee
Distinquish stack slots from other stack objects. They (and fixed objects) get FixedStack PseudoSourceValues.
...
llvm-svn: 84326
2009-10-17 09:20:14 +00:00
Evan Cheng
6a4b23e001
Re-arrange some fields.
...
llvm-svn: 84324
2009-10-17 08:57:09 +00:00
Bob Wilson
841f543880
Update the description of MachineFrameInfo's OffsetAdjustment. The value of
...
this adjustment does not change the direction or the signs of the object
offsets, and the details of the offset calculations can be target-specific.
Also mention that for most targets this value is only used to generate debug
info.
llvm-svn: 82750
2009-09-25 05:30:55 +00:00
Chris Lattner
ed9a239afa
convert some stuff to work on raw_ostreams instead of std::ostream.
...
llvm-svn: 79803
2009-08-23 01:12:47 +00:00
David Greene
e9ea0cbe04
Add missing includes.
...
llvm-svn: 79469
2009-08-19 21:22:18 +00:00
Jakob Stoklund Olesen
96890fb0cf
Add MachineFrameInfo::getPristineRegisters(MBB) method.
...
llvm-svn: 78911
2009-08-13 16:19:33 +00:00
Daniel Dunbar
9bbadad09d
Fix some comments referring to std::cerr.
...
llvm-svn: 77931
2009-08-03 01:02:24 +00:00
Dan Gohman
51d4e8db6a
Fix a bunch of Doxygen syntax issues. Escape special characters,
...
and put @file directives on their own comment line.
llvm-svn: 65920
2009-03-03 02:55:14 +00:00
Dan Gohman
fc05cdda64
Extend X86's addFrameReference to add a MachineMemOperand for
...
the frame reference. This will help post-RA scheduling determine
that spills to distinct stack slots are independent.
llvm-svn: 60486
2008-12-03 18:11:40 +00:00
Dan Gohman
4560e0ae94
Add an explicit keyword.
...
llvm-svn: 60457
2008-12-03 01:55:47 +00:00
Bill Wendling
b6e2d60e7a
- Rename stackprotector_{prologue,epilogue} to stackprotector_{create,check}.
...
- Get rid of "HasStackProtector" in MachineFrameInfo.
- Modify intrinsics to tell which are doing what with memory.
llvm-svn: 58799
2008-11-06 07:23:03 +00:00
Bill Wendling
08905ed703
Implement the stack protector stack accesses via intrinsics:
...
- stackprotector_prologue creates a stack object and stores the guard there.
- stackprotector_epilogue reads the stack guard from the stack position created
by stackprotector_prologue.
- The PrologEpilogInserter was changed to make sure that the stack guard is
first on the stack frame.
llvm-svn: 58791
2008-11-06 02:29:10 +00:00
Chris Lattner
d9f28870cf
more comment cleanups.
...
llvm-svn: 58316
2008-10-28 05:32:08 +00:00
Chris Lattner
b2d576facf
comment cleanups.
...
llvm-svn: 58315
2008-10-28 05:31:31 +00:00
Evan Cheng
28d9b3a8ad
Re-apply 56683 with fixes.
...
llvm-svn: 56748
2008-09-27 01:56:22 +00:00
Bill Wendling
7273078850
Temporarily reverting r56683. This is causing a failure during the build of 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
2008-09-26 22:10:44 +00:00
Evan Cheng
9946443460
Fix @llvm.frameaddress codegen. FP elimination optimization should be disabled when frame address is desired. Also add support for depth > 0.
...
llvm-svn: 56683
2008-09-26 19:48:35 +00:00
Duncan Sands
46a694af35
Fix error: ‘std::ostream’ has not been declared
...
when compiling with gcc 4.3.
llvm-svn: 54041
2008-07-25 19:29:14 +00:00
Dan Gohman
1c8549fd7f
Add a #include for the uses of uint64_t.
...
llvm-svn: 54016
2008-07-25 15:39:12 +00:00
Dan Gohman
3ede9e57a2
Add a #include <cassert>, since this file use assert.
...
llvm-svn: 54003
2008-07-25 00:44:19 +00:00
Dan Gohman
b379840cf7
Stack objects have nonnegative indices, not just positive indices.
...
llvm-svn: 53418
2008-07-10 19:57:25 +00:00
Evan Cheng
2fc7954878
Add a stack slot coloring pass. Not yet enabled.
...
llvm-svn: 51934
2008-06-04 09:18:41 +00:00
Evan Cheng
73dadf21ce
Fix typos and comments.
...
llvm-svn: 51165
2008-05-15 22:13:02 +00:00
Evan Cheng
778a5e27b0
Make use of vector load and store operations to implement memcpy, memmove, and memset. Currently only X86 target is taking advantage of these.
...
llvm-svn: 51140
2008-05-15 08:39:06 +00:00