Commit Graph

23 Commits

Author SHA1 Message Date
Chris Lattner a48f44d9ee improve portability to avoid conflicting with std::next in c++'0x.
Patch by Howard Hinnant!

llvm-svn: 90365
2009-12-03 00:50:42 +00:00
David Greene 1fbe054450 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
Jim Grosbach fa14dd430c Add register-reuse to frame-index register scavenging. When a target uses
a virtual register to eliminate a frame index, it can return that register
and the constant stored there to PEI to track. When scavenging to allocate
for those registers, PEI then tracks the last-used register and value, and
if it is still available and matches the value for the next index, reuses
the existing value rather and removes the re-materialization instructions.
Fancier tracking and adjustment of scavenger allocations to keep more
values live for longer is possible, but not yet implemented and would likely
be better done via a different, less special-purpose, approach to the
problem.

eliminateFrameIndex() is modified so the target implementations can return
the registers they wish to be tracked for reuse.

ARM Thumb1 implements and utilizes the new mechanism. All other targets are
simply modified to adjust for the changed eliminateFrameIndex() prototype.

llvm-svn: 83467
2009-10-07 17:12:56 +00:00
Duncan Sands 2fbeaf084f Remove some unused variables and methods warned about by
icc (#177, partial).  Patch by Erick Tryzelaar.

llvm-svn: 81106
2009-09-06 08:33:48 +00:00
Anton Korobeynikov 271cdda8e1 Provide dynamic_stackalloc lowering for MSP430.
This fixes PR4769

llvm-svn: 80001
2009-08-25 17:00:23 +00:00
Chris Lattner ee68a483ec Give getPointerRegClass() a "kind" value so that targets can
support multiple different pointer register classes.

llvm-svn: 77501
2009-07-29 20:31:52 +00:00
Torok Edwin fbcc663cbf llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.
This adds location info for all llvm_unreachable calls (which is a macro now) in
!NDEBUG builds.
In NDEBUG builds location info and the message is off (it only prints
"UREACHABLE executed").

llvm-svn: 75640
2009-07-14 16:55:14 +00:00
Torok Edwin 56d0659726 assert(0) -> LLVM_UNREACHABLE.
Make llvm_unreachable take an optional string, thus moving the cerr<< out of
line.
LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for
NDEBUG builds.

llvm-svn: 75379
2009-07-11 20:10:48 +00:00
Duncan Sands 075276e9ce Silence warning when building without assertions.
llvm-svn: 74777
2009-07-03 16:06:07 +00:00
Bill Wendling f7b83c7ae7 Change MachineInstrBuilder::addReg() to take a flag instead of a list of
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
2009-05-13 21:33:08 +00:00
Anton Korobeynikov f2b50994ca Add prologue/epilogue emission. Fix frame pointer handling.
llvm-svn: 70740
2009-05-03 13:11:20 +00:00
Anton Korobeynikov b85f4ec819 Two more hooks for RA and FP registers
llvm-svn: 70738
2009-05-03 13:10:40 +00:00
Anton Korobeynikov 7784ae9a6f Proper handle loading of effective address of stack slot stuff
llvm-svn: 70737
2009-05-03 13:10:26 +00:00
Anton Korobeynikov f6af822c76 First draft of stack slot loads / stores lowering
llvm-svn: 70735
2009-05-03 13:09:57 +00:00
Anton Korobeynikov ec3f0b3f9d Add call frame setup instruction elimination and lowerid for bunch of call-related stuff.
llvm-svn: 70728
2009-05-03 13:07:54 +00:00
Anton Korobeynikov b900245e13 Add 8-bit regclass and pattern for sext_inreg
llvm-svn: 70721
2009-05-03 13:05:22 +00:00
Anton Korobeynikov d7afd69e3b Add code enough for emission of reg-reg and reg-imm moves. This allows us to compile "ret i16 0" properly!
llvm-svn: 70710
2009-05-03 13:02:04 +00:00
Anton Korobeynikov a9b7df98e6 Make emit{Prologue,Epilogue}() noop for now
llvm-svn: 70707
2009-05-03 13:01:04 +00:00
Anton Korobeynikov 69f51f0b41 Add callee-saved regs & reg classes getter hooks
llvm-svn: 70706
2009-05-03 13:00:46 +00:00
Anton Korobeynikov efcd5aa381 Add simple FP indicator for given function hook
llvm-svn: 70705
2009-05-03 13:00:28 +00:00
Anton Korobeynikov c10f98ace3 Provide set of reserved registers
llvm-svn: 70704
2009-05-03 13:00:11 +00:00
Anton Korobeynikov 77e5a11ec2 Fix register names, fix register allocation order, handle frame pointer.
llvm-svn: 70701
2009-05-03 12:59:16 +00:00
Anton Korobeynikov 101380015c Dummy MSP430 backend
llvm-svn: 70694
2009-05-03 12:57:15 +00:00