Commit Graph

9934 Commits

Author SHA1 Message Date
Stuart Hastings
8ffc42f8ea Revert 104841, 104842, 104876 due to buildbot failures. Radar 7424645.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104953 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-28 16:41:07 +00:00
Dan Gohman
f75a7d3fbf Eliminate the restriction that the array size in an alloca must be i32.
This will help reduce the amount of casting required on 64-bit targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104911 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-28 01:14:11 +00:00
Jakob Stoklund Olesen
700bfada63 Add a -regalloc=default option that chooses a register allocator based on the -O
optimization level.

This only really affects llc for now because both the llvm-gcc and clang front
ends override the default register allocator. I intend to remove that code later.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104904 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-27 23:57:25 +00:00
Jim Grosbach
0798eddd07 Update the saved stack pointer in the sjlj function context following either
an alloca() or an llvm.stackrestore(). rdar://8031573



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104900 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-27 23:49:24 +00:00
Jim Grosbach
a65850230a back out 104862/104869. Can reuse stacksave after all. Very cool.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104897 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-27 23:11:57 +00:00
Devang Patel
d8720f4ba3 Do not drop location info for inlined function args.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104884 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-27 20:25:04 +00:00
Jim Grosbach
084fb0ea32 hook ISD::STACKADDR to an intrinsic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104869 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-27 18:52:11 +00:00
Devang Patel
55e9717e59 inlined function's arguments need a label to mark the start point because they are not directly attached to current function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104848 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-27 16:47:30 +00:00
Stuart Hastings
aa66d2f48a Support for nested functions/classes in debug output. Radar 7424645.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104841 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-27 16:16:54 +00:00
Devang Patel
80250686d5 Simplify. Eliminate unneeded debug_loc entry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104785 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-26 23:55:23 +00:00
Bill Wendling
804a231dd5 Add FIXME comment to remove this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104749 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-26 21:53:50 +00:00
Daniel Dunbar
cb8326dc09 MC: Add TargetMachine support for setting the value of MCRelaxAll with
-filetype=obj.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104747 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-26 21:48:55 +00:00
Devang Patel
77051f58e9 There is no need to force an line number entry (using previous location) for a temp label at unknown location.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104740 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-26 21:23:46 +00:00
Bill Wendling
8d717c7d99 Add "setjmp_syscall", "savectx", "qsetjmp", "vfork", "getcontext" to the list of
usual suspects that could "return twice".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104737 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-26 20:39:00 +00:00
Jim Grosbach
23ff7cff52 Adjust eh.sjlj.setjmp to properly have a chain and to have an opcode entry in
ISD::. No functional change.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104734 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-26 20:22:18 +00:00
Devang Patel
394427b014 Update debug info when live-in reg is copied into a vreg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104732 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-26 20:18:50 +00:00
Bill Wendling
9af7e9a1b5 Move the check for "calls setjmp" to SelectionDAGISel so that it can be used by
more than just the stack slot coloring algorithm.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104722 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-26 19:46:12 +00:00
Devang Patel
b2b31a6f93 Identify instructions, that needs a label to mark debug info entity, in advance. This simplifies beginScope().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104720 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-26 19:37:24 +00:00
Dan Gohman
93d3433579 Eliminate the use of PriorityQueue and just use a std::vector,
implementing pop with a linear search for a "best" element. The priority
queue was a neat idea, but in practice the comparison functions depend
on dynamic information.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104718 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-26 18:52:00 +00:00
Dan Gohman
d89c258051 Delete an unused function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104716 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-26 18:34:12 +00:00
Devang Patel
b21a758bc2 Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104706 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-26 17:42:50 +00:00
Devang Patel
e2df84254d Do not construct location list backword!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104705 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-26 17:29:32 +00:00
Eric Christopher
174e597d46 Temporarily revert r104655 as it's breaking the bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104664 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-26 01:59:55 +00:00
Dan Gohman
a4e4ffd389 Change push_all to a non-virtual function and implement it in the
base class, since all the implementations are the same.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104659 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-26 01:10:55 +00:00
Dan Gohman
5eabaa2d7c Trim #include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104657 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-26 00:55:59 +00:00
Bill Wendling
be22683202 Dale and Evan suggested putting the "check for setjmp" much earlier in the
machine code generation. That's a good idea, so I made it so.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104655 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-26 00:32:40 +00:00
Devang Patel
c3f5f783a2 First cut at supporting .debug_loc section.
This is used to track variable information.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104649 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-25 23:40:22 +00:00
Bill Wendling
f10bc81b4e Constify function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104646 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-25 22:02:22 +00:00
Dan Gohman
eddc114a66 Do one map lookup instead of two.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104645 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-25 21:59:42 +00:00
Eric Christopher
04386ca726 Move the verbose asm output up a bit so it can be used in the special cases
as well.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104642 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-25 21:49:43 +00:00
Bill Wendling
5edfbdc963 Okay, bear with me here...
If you have a setjmp/longjmp situation, it's possible for stack slot coloring to
reuse a stack slot before it's really dead. For instance, if we have something
like this:

1:  y = g;
    x = sigsetjmp(env, 0);
    switch (x) {
    case 1:
      /* ... */
      goto run;  
    case 0:
  run:
      do_run(); /* marked as "no return" */
      break;
    case 3:
      if (...) {
        /* ... */
        goto run;
      }
      /* ... */
      break;
    }

2:  g = y;

"y" may be put onto the stack, so the expression "g = y" is relying upon the
fact that the stack slot containing "y" isn't modified between (1) and (2). But
it can be, because of the "no return" calls in there. A longjmp might come back
with 3, modify the stack slot, and then go to case 0. And it's perfectly
acceptable to reuse the stack slot there because there's no CFG flow from case 3
to (2).

The fix is to disable certain optimizations in these situations. Ideally, we'd
disable them for all "returns twice" functions. But we don't support that
attribute. Check for "setjmp" and "sigsetjmp" instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104640 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-25 21:44:26 +00:00
Eric Christopher
02b46bc942 Add support for initialized global data for darwin tls. Update comments
and testcases accordingly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104635 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-25 21:28:50 +00:00
Jakob Stoklund Olesen
1fc8e759a7 Print symbolic SubRegIndex names on machine operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104628 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-25 19:49:38 +00:00
Dale Johannesen
86234c30a7 Fix another variant of PR 7191. Also add a testcase
Mon Ping provided; unfortunately bugpoint failed to
reduce it, but I think it's important to have a test for
this in the suite.  8023512.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104624 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-25 18:47:23 +00:00
Dale Johannesen
61734eb117 Fix PR 7191. I have been unable to create a .ll file that fails, sorry.
(oye, a word which should be better known to people writing tree
traversals, means grandchild.)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104619 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-25 17:50:03 +00:00
Jakob Stoklund Olesen
b7a3170917 Disable invalid coalescer assertion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104574 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-25 00:15:18 +00:00
Bill Wendling
ef473bfc44 Print out the name of the function during SSC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104572 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-24 23:16:04 +00:00
Evan Cheng
3946043a80 Avoid adding duplicate function live-in's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104560 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-24 21:33:37 +00:00
Devang Patel
295cdf8b82 Do not emit line number entries for unknown debug values.
This fixes recent regression in store.exp from gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104524 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-24 18:26:49 +00:00
Nicolas Geoffray
3816c25fdc Encode the Caml frametable by following what the comment says: the number of descriptors
is first emitted, and StackOffsets are emitted in 16 bits.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104488 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-24 12:24:11 +00:00
Daniel Dunbar
fdb5a86179 MC: Add an MCLoggingStreamer, for use in debugging integrated-as mismatches.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104463 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-23 17:44:06 +00:00
Evan Cheng
2457f2c661 Implement @llvm.returnaddress. rdar://8015977.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104421 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-22 01:47:14 +00:00
Jim Grosbach
5eb1951539 Implement eh.sjlj.longjmp for ARM. Clean up the intrinsic a bit.
Followups: docs patch for the builtin and eh.sjlj.setjmp cleanup to match
longjmp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104419 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-22 01:06:18 +00:00
Eric Christopher
8116ca5134 Add full bss data support for darwin tls variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104414 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-22 00:10:22 +00:00
Devang Patel
65eb482e8f Collect variable information during endFunction() instead of beginFunction().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104412 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-22 00:04:14 +00:00
Bob Wilson
70fe6643d6 Clean up extra whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104410 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-21 23:53:55 +00:00
Eric Christopher
e81d010589 Make this LookAheadLimit, not the uninitialized LookAheadLeft.
Evan please verify!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104408 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-21 23:40:03 +00:00
Evan Cheng
835810bbf8 Allow machine cse to cse instructions which define physical registers. Controlled by option -machine-cse-phys-defs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104385 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-21 21:22:19 +00:00
Bob Wilson
78f006acdf Change CodeGen/ARM/2009-11-02-NegativeLane.ll to use 16-bit vector elements
so that it will continue to test what it was meant to test when I commit a
separate change for better support of BUILD_VECTOR and VECTOR_SHUFFLE for Neon.
Fix a DAG combiner crash exposed by this test change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104380 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-21 21:05:32 +00:00
Evan Cheng
1015ba7018 - Change MachineInstr::findRegisterDefOperandIdx so it can also look for defs
that are aliases of the specified register.
- Rename modifiesRegister to definesRegister since it's looking a def of the
specific register or one of its super-registers. It's not looking for def of a
sub-register or alias that could change the specified register.
- Added modifiesRegister to look for defs of aliases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104377 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-21 20:53:24 +00:00