Commit Graph

34487 Commits

Author SHA1 Message Date
Chris Lattner
dad451cb7c enhance NonLocalDepEntry to keep the per-block phi translated address
of the query.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90958 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-09 07:31:04 +00:00
Daniel Dunbar
022840e960 DeltaAlgorithm: Add a virtual destructor and home.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90957 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-09 07:19:48 +00:00
Chris Lattner
e18b97121c change NonLocalDepEntry from being a typedef for an std::pair to be its
own small class.  No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90956 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-09 07:08:01 +00:00
Lang Hames
6194569d22 Added a new "splitting" spiller.
When a call is placed to spill an interval this spiller will first try to
break the interval up into its component values. Single value intervals and
intervals which have already been split (or are the result of previous splits)
are spilled by the default spiller.

Splitting intervals as described above may improve the performance of generated
code in some circumstances. This work is experimental however, and it still
miscompiles many benchmarks. It's not recommended for general use yet.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90951 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-09 05:39:12 +00:00
Daniel Dunbar
164c7ba0ef Remove spurious extern.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90937 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-09 03:26:33 +00:00
Chris Lattner
b3f927f6dd add some aborts to #if 0's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90929 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-09 02:41:54 +00:00
Chris Lattner
05e15f8897 Switch GVN and memdep to use PHITransAddr, which correctly handles
phi translation of complex expressions like &A[i+1].  This has the
following benefits:

1. The phi translation logic is all contained in its own class with
   a strong interface and verification that it is self consistent.

2. The logic is more correct than before.  Previously, if intermediate
   expressions got PHI translated, we'd miss the update and scan for
   the wrong pointers in predecessor blocks.  @phi_trans2 is a testcase
   for this.

3. We have a lot less code in memdep.

We can handle phi translation across blocks of things like @phi_trans3,
which is pretty insane :).

This patch should fix the miscompiles of 255.vortex, and I tested it 
with a bootstrap of llvm-gcc, llvm-test and dejagnu of course.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90926 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-09 01:59:31 +00:00
Evan Cheng
7bd6478cd6 Teach InferPtrAlignment to infer GV+cst alignment and use it to simplify x86 isl lowering code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90925 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-09 01:53:58 +00:00
Evan Cheng
64fa4a9584 Move isConsecutiveLoad to SelectionDAG. It's not target dependent and it's primary used by selectdag passes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90922 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-09 01:36:00 +00:00
Chris Lattner
d632988eea fix a nasty variable that was shadowing the real CurBB but with the wrong value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90920 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-09 01:19:16 +00:00
Evan Cheng
de2ace1758 Infer alignment for non-fixed stack object.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90919 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-09 01:17:24 +00:00
Evan Cheng
7ced2e0b30 Add const qualifier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90918 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-09 01:10:37 +00:00
Evan Cheng
f2dc5c785d Refactor InferAlignment out of DAGCombine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90917 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-09 01:04:59 +00:00
Chris Lattner
6200e53f55 fix many input tracking bugs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90915 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-09 00:56:14 +00:00
Dan Gohman
686abbb1eb Fix a typo in a comment, and adjust SmallSet and SmallVector sizes,
that Chris noticed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90910 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-09 00:28:42 +00:00
Chris Lattner
e09e98c2de fix PHI translation to take the PHI out of the instinputs set and add
the translated value back to it if an instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90909 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-09 00:18:13 +00:00
Chris Lattner
af50315a29 instructions defined in CurBB may be intermediate nodes of the computation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90908 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-09 00:10:55 +00:00
Chris Lattner
7dedbf4ce3 add dumping and sanity checking support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90906 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-09 00:01:00 +00:00
Dan Gohman
8456d60bec Put a threshold on the number of users PointerMayBeCaptured
examines; fall back to a conservative answer if there are
more. This works around some several compile time problems
resulting from BasicAliasAnalysis calling PointerMayBeCaptured.

The value has been chosen arbitrarily.

This fixes rdar://7438917 and may partially address PR5708.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90905 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 23:59:12 +00:00
Chris Lattner
43678f41a3 make sure that PHITransAddr keeps its 'InstInputs' list up to
date when instsimplify kicks in.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90901 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 23:42:51 +00:00
Devang Patel
0000fadb00 Revert 90858 90875 and 90805 for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90898 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 23:21:45 +00:00
Evan Cheng
d831cda3e7 - Support inline asm 'w' constraint for 128-bit vector types.
- Also support the 'q' NEON registers asm code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90894 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 23:06:22 +00:00
Bob Wilson
65ab34f3f2 Some superficial cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90866 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 18:27:03 +00:00
Bob Wilson
78c50b8cd6 Clean up dead operands left around after SROA replaces a mem intrinsic.
I'm not aware that this does anything significant on its own, but it's
needed for another patch that I'm working on.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90864 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 18:22:03 +00:00
Devang Patel
a3a60c6c49 Cleanup.
There is no need to supply ModuleCU to addType() as a parameter.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90858 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 15:31:31 +00:00
Devang Patel
018b66038c Do not try to push dead variable's debug info into namespace info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90857 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 15:01:35 +00:00
Benjamin Kramer
69cee6151d Remove useless calls to c_str().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90855 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 13:07:38 +00:00
Duncan Sands
7a154cf228 Teach GlobalOpt to delete aliases with internal linkage (after
forwarding any uses).  GlobalDCE can also do this, but is only
run at -O3.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90850 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 10:10:20 +00:00
Chris Lattner
34f849098b fix a typo (and -> add) and fix GetAvailablePHITranslatedSubExpr to not
side-effect the current object.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90837 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 06:06:26 +00:00
Nick Lewycky
87f8e49027 Remove unnecessary #include "llvm/LLVMContext.h".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90836 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 05:45:41 +00:00
Chris Lattner
399ac530d6 whitespace cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90834 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 05:31:46 +00:00
Anton Korobeynikov
9aa1ec87b0 Reduce (cmp 0, and_su (foo, bar)) into (bit foo, bar). This saves extra instruction. Patch inspired by Brian Lucas!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90819 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 01:03:04 +00:00
Evan Cheng
3a41ddb1b9 Watch out for duplicated PHI instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90816 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 23:11:03 +00:00
Evan Cheng
d8f079c25e Follow up to 90488. Turn a check into an assertion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90815 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 23:10:34 +00:00
Jeffrey Yasskin
13027640e8 Fix the OProfileJITEventListener for StringRef being returned from debug info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90813 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 22:32:38 +00:00
Victor Hernandez
c59b33562c Rename DIFactory::InsertValue() as DIFactory::InsertDbgValueIntrinsic()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90807 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 21:54:43 +00:00
Devang Patel
4063f6bcc7 Add support to emit debug info for c++ style namespaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90805 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 21:41:32 +00:00
Evan Cheng
80564f761a Delete code accidentally left behind.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90804 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 21:19:33 +00:00
Chris Lattner
6045417fcc fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90793 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 19:52:57 +00:00
Chris Lattner
e05a188cd6 add accessor, improve comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90792 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 19:45:30 +00:00
Victor Hernandez
2f9dac721d Introduce the "@llvm.dbg.value" debug intrinsic.
The semantics of llvm.dbg.value are that starting from where it is executed, an offset into the specified user source variable is specified to get a new value.

An example:
  call void @llvm.dbg.value(metadata !{ i32 7 }, i64 0, metadata !2)
Here the user source variable associated with metadata #2 gets the value "i32 7" at offset 0.
 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90788 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 19:36:34 +00:00
Chris Lattner
6fcca1cc87 add support for phi translation and incorpation of new expression.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90782 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 19:04:49 +00:00
Dan Gohman
d84ea47b89 Don't enable the post-RA scheduler on x86 except at -O3. In its
current form, it is too expensive in compile time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90781 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 19:04:31 +00:00
Chris Lattner
9a8641201b checkpoint of the new PHITransAddr code, still not done and not used by
anything.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90779 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 18:36:53 +00:00
Evan Cheng
75eb535843 Pre-regalloc tale duplication. Work in progress.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90759 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 10:15:19 +00:00
Oscar Fuentes
bcc2e45840 Fixes the Atomic implementation if compiled by MSVC compiler.
sys::cas_flag should be long on this platform, InterlockedAdd() is
defined only for the Itanium architecture (according to MSDN).

Patch by Michael Beck!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90748 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 05:29:59 +00:00
Evan Cheng
7e572eb37f If BB is empty, insert PHI before end() instead of front().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90744 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 03:07:01 +00:00
Anton Korobeynikov
6bfcba7e13 Some pretty-printing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90742 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 02:28:41 +00:00
Anton Korobeynikov
1c3436a67a Truncate the arguments of llvm.frameaddress / llvm.returnaddress intrinsics from i32 to platform's largest native type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90741 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 02:28:26 +00:00
Anton Korobeynikov
06ccca5f70 Add lowering of returnaddr and frameaddr intrinsics. Shamelessly stolen from x86 :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90740 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 02:28:10 +00:00
Anton Korobeynikov
e662f7a8b2 Initial codegen support for MSP430 ISRs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90739 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 02:27:53 +00:00
Anton Korobeynikov
211a14e476 Add MSP430 interrupt calling conv. No functionality change yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90738 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 02:27:35 +00:00
Anton Korobeynikov
b2de1ea29b Add ability to select hw multiplier mode and select appropriate libcalls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90737 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 02:27:08 +00:00
Anton Korobeynikov
7cca606aaa Dynamic stack realignment use of sp register as source/dest register
in "bic sp, sp, #15" leads to unpredicatble behaviour in Thumb2 mode.
Emit the following code instead:
mov r4, sp
bic r4, r4, #15
mov sp, r4

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90724 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-06 22:39:50 +00:00
Chris Lattner
08bc2701a2 fix PR5698
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90708 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-06 17:17:23 +00:00
Chris Lattner
bc9a28dd54 constant fold loads from memcpy's from global constants. This is important
because clang lowers nontrivial automatic struct/array inits to memcpy from
a global array.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90698 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-06 05:29:56 +00:00
Chris Lattner
cb9cbc4949 add support for forwarding mem intrinsic values to non-local loads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90697 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-06 04:54:31 +00:00
Chris Lattner
faf815b938 Handle forwarding local memsets to loads. For example, we optimize this:
short x(short *A) {
  memset(A, 1, sizeof(*A)*100);
  return A[42];
}

to 'return 257' instead of doing the load.  



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90695 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-06 01:57:02 +00:00
Dan Gohman
87bad707ed Remove old DBG_LABEL code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90669 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-05 17:56:26 +00:00
Dan Gohman
714efc63d4 Remove the unused DisableLegalizeTypes option and related code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90668 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-05 17:51:33 +00:00
Bill Wendling
740266269b Calling InvalidateEntry during the refinement was breaking the bootstrap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90656 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-05 07:59:04 +00:00
Bill Wendling
32bc2362a1 Final cleanups:
- Privatize a typedef.
- Call the InvalidateEntry when refining a type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90655 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-05 07:46:49 +00:00
Bill Wendling
dc492e0370 Temporarily revert r90502. It was causing the llvm-gcc bootstrap on PPC to fail.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90653 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-05 07:30:23 +00:00
Nick Lewycky
93d3311d1f Fix indentation in switch statement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90650 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-05 06:37:24 +00:00
Nick Lewycky
83e8ec73e1 Generalize this optimization to work on equality comparisons between any two
integers that are constant except for a single bit (the same n-th bit in each).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90646 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-05 05:00:00 +00:00
Dan Gohman
b3b9821cde Don't print a space before the : between the file name and line number.
And separate the directory and file name with a '/'.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90641 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-05 02:00:34 +00:00
Bill Wendling
688da28687 Inline methods which are called only once.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90640 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-05 01:46:01 +00:00
Bill Wendling
5681689795 Refactor some code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90639 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-05 01:43:33 +00:00
Dan Gohman
eecb9919a4 Print newlines after printing labels for debug info, so that the output
isn't cluttered with things like "Llabel47:Llabel48:  movq  (%rsi), %xmm3"


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90638 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-05 01:42:34 +00:00
Dan Gohman
381ca5572e Don't blindly set the debug location for PHI node copies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90637 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-05 01:29:04 +00:00
Dan Gohman
6e3ff37547 Make TargetSelectInstruction protected and called from FastISel.cpp
instead of SelectionDAGISel.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90636 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-05 01:27:58 +00:00
Dan Gohman
864e2efce2 Remove the target hook TargetInstrInfo::BlockHasNoFallThrough in favor of
MachineBasicBlock::canFallThrough(), which is target-independent and more
thorough.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90634 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-05 00:44:40 +00:00
Dan Gohman
735985fbbe Simplify this code: don't call AnalyzeBranch before doing simpler checks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90633 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-05 00:32:59 +00:00
Dan Gohman
07f111e7b7 The debug information for an LLVM Instruction applies to that Instruction
and that Instruction only. Implement this by setting the "current debug position"
back to Unknown after processing each instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90632 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-05 00:27:08 +00:00
Dan Gohman
3b9bc04eda Fix this code to use DIScope instead of DICompileUnit, as in r90181.
Don't print "SrcLine"; just print the filename and line number, which
is obvious enough and more informative.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90631 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-05 00:23:29 +00:00
Dan Gohman
4b808b014b Don't print the debug directory; it's often long and uninteresting. Omit
the column number if it is not known. Handle the case of a missing filename
better.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90630 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-05 00:20:51 +00:00
David Greene
adbc23cae1 Remove an unneeded include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90625 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 23:55:07 +00:00
Dan Gohman
fcafe44f56 Print a space between the comment character and the text.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90621 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 23:19:55 +00:00
Devang Patel
d55224c25e In TAG_subrange_type, uppder bound is zero indexed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90617 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 23:10:24 +00:00
David Greene
f7ea2a534b Use new interfaces to print spill size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90611 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 22:46:04 +00:00
David Greene
29dbf50b18 Have hasLoad/StoreFrom/ToStackSlot return the relevant MachineMemOperand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90608 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 22:38:46 +00:00
Bob Wilson
39fdd6947c Fix up some comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90603 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 21:57:37 +00:00
Bob Wilson
d614a1f0a8 Fix 80-column violations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90601 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 21:51:35 +00:00
Bill Wendling
1500c4f49a Some code cleanup. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90588 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 21:03:02 +00:00
Victor Hernandez
ff7707e983 Avoid creating a metadata slot for all metadata that contains an instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90581 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 20:07:10 +00:00
Evan Cheng
11572babb1 Handle recursive PHI's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90575 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 19:09:10 +00:00
Victor Hernandez
954c80e99d Fix crasher when N->getElement(n) is NULL
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90572 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 18:29:23 +00:00
Evan Cheng
79fc6f44b6 Add a pre-regalloc tail duplication pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90567 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 09:42:45 +00:00
Evan Cheng
9d0f8bba17 Don't try to be cute with undef optimization here. Let ProcessImplicitDefs handle it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90566 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 09:23:37 +00:00
Duncan Sands
36236b76a4 Add note about a subtle bug in this code. Does not effect the main
architectures that LLVM targets, because they don't use this code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90564 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 08:42:17 +00:00
Daniel Dunbar
83563b24ce Fix typo and add missing include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90557 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 08:17:07 +00:00
Andreas Neustifter
1f6ae81725 Added debug output for inherited passes that are invalidated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90553 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 06:58:24 +00:00
Chris Lattner
44a7a380aa Fix PR5551 by not ignoring the top level constantexpr when
folding a load from constant.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90545 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 06:29:29 +00:00
Chris Lattner
bbf9a5845a add to cmake
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90539 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 04:15:36 +00:00
Chris Lattner
210e45af3a add the start of a class used to handle phi translation in memdep and
gvn (this is just a skeleton so far).  This will ultimately be used
to fix a nasty miscompilation with GVN.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90518 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 02:10:16 +00:00
Victor Hernandez
97e2450de2 Teach AsmWriter to write inline (not via a global metadata slot) metadata that contains an instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90512 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 01:35:02 +00:00
Bob Wilson
eb35699e64 Fix a comment typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90511 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 01:33:04 +00:00
Chris Lattner
45305d4ff6 add an assert to make it really clear what this is doing. Return singularval as
a compile time perf optimization to avoid a load.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90507 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 01:03:32 +00:00
Jakob Stoklund Olesen
6b74e505be Also attempt trivial coalescing for live intervals that end in a copy.
The coalescer is supposed to clean these up, but when setting up parameters
for a function call, there may be copies to physregs. If the defining
instruction has been LICM'ed far away, the coalescer won't touch it.

The register allocation hint does not always work - when the register
allocator is backtracking, it clears the hints.

This patch takes care of a few more cases that r90163 missed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90502 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 00:16:04 +00:00
Evan Cheng
2e65c29ac6 - If the reaching definition is an undef and the use is a PHI, add the implicit_def to the end of the source block.
- When reaching value is replaced with another, update the cache as well.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90501 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 00:09:05 +00:00
Devang Patel
b3235d22e9 Insert composite type DIE into the map before processing type fields. This allows fields to find their context DIE from the map.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90498 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 23:46:57 +00:00
Victor Hernandez
1971556cc2 Add ParseInlineMetadata() which can parses metadata that refers to an instruction. Extend ParseParameterList() to use this new function so that calls to llvm.dbg.declare can pass inline metadata
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90497 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 23:40:58 +00:00
Jim Grosbach
4dc4a61c0c remove out of date FIXME.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90490 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 21:55:01 +00:00
Evan Cheng
01306cad01 Handle undef values properly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90489 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 21:51:55 +00:00
Evan Cheng
9aed9396a6 Watch out for PHI instruction with no source operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90488 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 21:50:58 +00:00
Bob Wilson
4a8ee23a81 Fix a comment typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90487 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 21:47:07 +00:00
Duncan Sands
9993b88f06 Fix ExpandShiftWithUnknownAmountBit, which was completely bogus.
Pointed out by Javier Martinez (who also provided a patch).  Since
this logic is not used on (for example) x86, I guess nobody noticed.
Tested by generating SHL, SRL, SRA on various choices of i64 for all
possible shift amounts, and comparing with gcc.  Since I did this on
x86-32, I had to force the use of ExpandShiftWithUnknownAmountBit.
What I'm saying here is that I don't have a testcase I can add to the
repository.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90482 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 21:37:32 +00:00
Jakob Stoklund Olesen
f4811a9694 Clean up some loop logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90481 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 20:49:10 +00:00
Devang Patel
5d11eb0ed5 Add support to emit debug info for virtual functions and virtual base classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90474 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 19:11:07 +00:00
Dan Gohman
018402d30c Print a newline after the Args: line so that unrelated errs() output doesn't
end up on the same line.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90473 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 19:03:18 +00:00
Benjamin Kramer
88a91b579b Fix MSVC build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90454 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 13:23:03 +00:00
Andreas Neustifter
8c30abec6d Convert ProfileVerifier to template so it can be used for different types of ProfileInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90451 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 12:55:57 +00:00
Andreas Neustifter
1640f7e033 Do not create negative edge weights in ProfileEstimator.
Use integer values for weights to prevent rounding errors.
Make ProfileEstimator more robust in general CFGs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90449 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 12:41:14 +00:00
Daniel Dunbar
a6d5e40e25 Add an implementation of the delta debugging algorithm.
- This is a pretty slow / memory intensive implementation, and I will likely
   change it to an iterative model, but it works.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90447 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 11:12:42 +00:00
Andreas Neustifter
44299c9507 Use ProfileInfo-API in ProfileInfo Loader and do more assertions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90446 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 11:00:37 +00:00
Andreas Neustifter
e2baf6b455 Converted ProfileInfo to template, added more API for ProfileInfo-preserving.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90445 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 09:30:12 +00:00
Evan Cheng
111e7629cc Teach tail duplication to update SSA form. Work in progress.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90432 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 08:43:53 +00:00
Chris Lattner
89742c2c3f expand note.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90429 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 07:43:46 +00:00
Chris Lattner
053321731c add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90428 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 07:41:54 +00:00
Nate Begeman
93e0ed31c5 Don't pull vector sext through both hands of a logical operation, since doing so prevents the fusion of vector sext and setcc into vsetcc.
Add a testcase for the above transformation.
Fix a bogus use of APInt noticed while tracking this down.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90423 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 07:11:29 +00:00
Chris Lattner
56856b1f46 fix a build problem with VC++, PR5664, patch by Alp Toker!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90419 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 06:58:32 +00:00
Bob Wilson
324f4f1633 Recognize canonical forms of vector shuffles where the same vector is used for
both source operands.  In the canonical form, the 2nd operand is changed to an
undef and the shuffle mask is adjusted to only reference elements from the 1st
operand.  Radar 7434842.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90417 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 06:40:55 +00:00
Jakob Stoklund Olesen
9f0d4e631d Don't call getValueType() on a null SDValue
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90415 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 05:15:35 +00:00
Owen Anderson
c9f2027adb Fix this crasher, and add a FIXME for a missed optimization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90408 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 03:43:29 +00:00
Evan Cheng
229694f0ee Fill out codegen SSA updater. It's not yet tested.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90395 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 02:31:43 +00:00
Bill Wendling
cb06403145 Revert r90371. It was causing build failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90383 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 01:54:07 +00:00
Jakob Stoklund Olesen
15d75d9f11 Don't hang on to pointers or references after vector::push_back.
The MO reference to a MachineOperand can be invalidated by
MachineInstr::addOperand. Don't even use it for debugging.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90381 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 01:49:56 +00:00
Devang Patel
1d5cc1db59 Emit method definition DIE at module level (even for methods with inlined functino body at soure level) so that the debugger can invoke it. This fixes many test failures in gdb test suite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90375 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 01:25:38 +00:00
Bill Wendling
b8e675c3c1 Further improvements: refactoring code that does the same thing into one
function, converting "dyn_cast" to "cast", asserting the correct things, and
other general cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90371 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 01:15:46 +00:00
Chris Lattner
bf108bdee5 yay for case insensitive file systems (?)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90370 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 01:10:05 +00:00
Chris Lattner
e568fa2d29 fix PR5673 by being more careful about pointers to functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90369 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 01:05:45 +00:00
Chris Lattner
35e86af8e5 remove some dead std::ostream using code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90366 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 00:55:04 +00:00
Chris Lattner
7896c9f436 improve portability to avoid conflicting with std::next in c++'0x.
Patch by Howard Hinnant!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90365 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 00:50:42 +00:00
Bill Wendling
dd5eb02304 This initial code is meant to convert TargetData to use an AbstractTypesUser so
that it doesn't have dangling pointers when abstract types are resolved. This
modifies it somewhat to address comments: making the "StructLayoutMap" an
anonymous structure, calling "removeAbstractTypeUser" when appropriate, and
adding asserts where helpful.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90362 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 00:17:12 +00:00
Douglas Gregor
e731fa2957 Fix CMake makefiles
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90354 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-02 22:19:31 +00:00
Evan Cheng
651ea5376c Skeleton for MachineInstr level SSA updater.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90353 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-02 22:02:52 +00:00
Jim Grosbach
b51d3f9c8d Add MaxStackAlignment.cpp to CMake
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90337 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-02 19:31:07 +00:00
Jim Grosbach
e27d205d5d Factor the stack alignment calculations out into a target independent pass.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90336 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-02 19:30:24 +00:00
Bob Wilson
f1e01dcc94 Don't count PHI instructions toward the limit for tail duplicating a block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90326 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-02 17:15:24 +00:00
Jim Grosbach
43a8241b65 Move EliminateDuplicatePHINodes() from SimplifyCFG.cpp to Local.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90324 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-02 17:06:45 +00:00
Andreas Neustifter
059a983531 Cheap, mostly strict, stable sorting.
This is necessary for tests so the results are comparable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90320 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-02 15:57:15 +00:00
Benjamin Kramer
0fea11a805 Silence compiler warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90319 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-02 15:33:44 +00:00
Devang Patel
69f57b1f41 Clarify that DIEString does not keep a copy of the string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90318 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-02 15:25:16 +00:00
Owen Anderson
9ff5a23186 Cleanup/remove some parts of the lifetime region handling code in memdep and GVN,
per Chris' comments.  Adjust testcases to match.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90304 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-02 07:35:19 +00:00
Chris Lattner
720e790480 factor some code better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90299 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-02 06:44:58 +00:00
Chris Lattner
65a9ab4f8f formatting cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90298 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-02 06:35:55 +00:00
Chris Lattner
bf796323b2 tidy up, remove dependence on order of evaluation of function args from EmitMemCpy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90297 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-02 06:05:42 +00:00
Mon P Wang
69a008075b Fixed an assertion failure for tracking sext of a vector of integers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90290 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-02 04:59:58 +00:00
Devang Patel
e3a18de4f6 Add utility routine to create subprogram definition entry from subprogram declaration entry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90282 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 23:09:02 +00:00
Devang Patel
7d0750a10f Reuse existing subprogram DIE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90281 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 23:07:59 +00:00
Chris Lattner
6e1f16d522 return more useful error messages by using strerror to format errno
instead of returning an ambiguous reason.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90275 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 22:51:41 +00:00
Evan Cheng
9836a26da3 Fix PR5391: support early clobber physical register def tied with a use (ewwww)
- A valno should be set HasRedefByEC if there is an early clobber def in the middle of its live ranges. It should not be set if the def of the valno is defined by an early clobber.
- If a physical register def is tied to an use and it's an early clobber, it just means the HasRedefByEC is set since it's still one continuous live range.
- Add a couple of missing checks for HasRedefByEC in the coalescer. In general, it should not coalesce a vr with a physical register if the physical register has a early clobber def somewhere. This is overly conservative but that's the price for using such a nasty inline asm "feature".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90269 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 22:25:00 +00:00
Chris Lattner
1e8de49fe7 rename some variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90258 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 21:16:01 +00:00
Chris Lattner
1ffb70f21d tidy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90257 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 21:15:15 +00:00
Dan Gohman
5b69fe767c Add edge source labels to SelectionDAG graphs, now that the graph printing
framework omits differentiated edge sources in the case where the labels
are empty strings.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90254 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 19:20:00 +00:00
Dan Gohman
0baf2a302f Minor cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90253 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 19:16:15 +00:00
Dan Gohman
241c595786 Trim an unnecessary #include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90252 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 19:13:27 +00:00
Devang Patel
c09ddc1c79 Clear function specific containers while processing end of a function, even if DW_TAG_subprogram for current function is not found.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90247 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 18:13:48 +00:00
Jim Grosbach
d122874996 Thumb1 exception handling setjmp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90246 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 18:10:36 +00:00
Johnny Chen
b731e87649 For VLDM/VSTM (Advanced SIMD), set encoding bits Inst{11-8} to 0b1011.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90243 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 17:37:06 +00:00
Jakob Stoklund Olesen
8f72235a77 Move PHIElimination::isLiveOut method to LiveVariables.
We want LiveVariables clients to use methods rather than accessing the
getVarInfo data structure directly. That way it will be possible to change the
LiveVariables representation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90240 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 17:13:31 +00:00
Chris Lattner
855d9da596 fix 255.vortex again, third time's the charm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90217 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 07:33:32 +00:00
Chris Lattner
46875c0bfb fix PR5640 by tracking whether a block is the header of a loop more
precisely, which prevents us from infinitely peeling the loop.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90211 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 06:04:43 +00:00
Jakob Stoklund Olesen
579d6d9fe3 Use CFG connectedness as a secondary sort key when deciding the order of copy coalescing.
This means that well connected blocks are copy coalesced before the less connected blocks. Connected blocks are more difficult to
coalesce because intervals are more complicated, so handling them first gives a greater chance of success.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90194 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 03:03:00 +00:00
Dan Gohman
261a7d983d Devang pointed out that this code should use DIScope instead of
DICompileUnit. This code now prints debug filenames successfully.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90181 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 00:45:56 +00:00
Evan Cheng
a4025df42d Fix PR5614: parts of a physical register def may be killed the rest.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90180 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 00:44:45 +00:00
Johnny Chen
208d76cad9 For VMOV (immediate), make some of the encoding bits (cmode and op) unspecified.
For VMOVv*i[16,32], op bit is don't care, and some cmode bits vary depending on
the immediate values.

Ref: Table A7-15 Modified immediate values for Advanced SIMD instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90173 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 00:02:02 +00:00
Devang Patel
deea564e53 If pointer type has a name then do not ignore the name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90172 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 23:56:56 +00:00
Dan Gohman
39a1fab856 Minor whitespace fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90166 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 23:33:53 +00:00
Dan Gohman
22f6526081 Fix a minor inconsistency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90165 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 23:33:37 +00:00
Jakob Stoklund Olesen
ce7a663140 New virtual registers created for spill intervals should inherit allocation hints from the original register.
This helps us avoid silly copies when rematting values that are copied to a physical register:

leaq	_.str44(%rip), %rcx
movq	%rcx, %rsi
call	_strcmp

becomes:

leaq	_.str44(%rip), %rsi
call	_strcmp

The coalescer will not touch the movq because that would tie down the physical register.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90163 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 22:55:54 +00:00
Bob Wilson
3858225afc Reprioritize tests for tail duplication to be aggressive about indirect
branches even when optimizing for code size.  Unless we find evidence to the
contrary in the future, the special treatment for indirect branches does not
have a significant effect on code size, and performance still matters with -Os.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90147 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 18:56:45 +00:00
Bob Wilson
15217e63bc Remove isProfitableToDuplicateIndirectBranch target hook. It is profitable
for all the processors where I have tried it, and even when it might not help
performance, the cost is quite low.  The opportunities for duplicating
indirect branches are limited by other factors so code size does not change
much due to tail duplicating indirect branches aggressively.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90144 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 18:35:03 +00:00
Bob Wilson
afa1df467b Fix some more ARM unified syntax warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90141 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 17:47:19 +00:00
Tobias Grosser
ab01069fcd Fix last DOTGraphTraits problems in CompilationGraph.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90136 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 13:34:51 +00:00
Tobias Grosser
b5eedf2c1c Remove forgotten ShortNames in Trie and CompilationGraph
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90135 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 13:14:13 +00:00
Tobias Grosser
56f4ef3232 Remove ShortNames from getNodeLabel in DOTGraphTraits
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90134 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 12:38:47 +00:00
Tobias Grosser
a10d598602 Instantiate DefaultDOTGraphTraits
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90133 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 12:38:13 +00:00
Tobias Grosser
2833fac273 Small PostDominatorTree improvements
* Do not SEGFAULT if tree entryNode() is NULL
 * Print function names in dotty printer

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90130 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 12:06:37 +00:00
Nick Lewycky
f58e86d762 Revert r90107, fixing test/Transforms/GVN/2009-11-29-ReverseMap.ll and the
llvm-gcc build.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90113 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 07:05:51 +00:00
Mon P Wang
cd6e725f21 Added support to allow clients to custom widen. For X86, custom widen vectors for
divide/remainder since these operations can trap by unroll them and adding undefs
for the resulting vector.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90108 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 02:42:02 +00:00
Chris Lattner
366429b400 reapply r90093 with an addition of keeping the forward
and reverse nonlocal memdep maps in synch, this should
fix 255.vortex.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90107 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 02:26:29 +00:00
Nick Lewycky
fac554a131 Teach ConstantFolding to do a better job when folding gep(bitcast).
This permits the devirtualization of llvm.org/PR3100#c9 when compiled by clang.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90099 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 21:40:55 +00:00
Benjamin Kramer
e6f329476c Revert r90089 for now, it's breaking selfhost.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90097 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 21:17:48 +00:00
Chris Lattner
ae3d24880d revert this patch for now, it causes failures of:
LLVM::Transforms/GVN/2009-02-17-LoadPRECrash.ll
    LLVM::Transforms/GVN/2009-06-17-InvalidPRE.ll



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90096 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 21:14:59 +00:00
Chris Lattner
1903d97c2c Fix a really nasty caching bug I introduced in memdep. An entry
was being added to the Result vector, but not being put in the
cache.  This means that if the cache was reused wholesale for a
later query that it would be missing this entry and we'd do an
incorrect load elimination.

Unfortunately, it's not really possible to write a useful 
testcase for this, but this unbreaks 255.vortex.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90093 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 21:09:36 +00:00
Benjamin Kramer
4aac07e898 Fix two FIXMEs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90089 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 20:29:30 +00:00
Nick Lewycky
2eac9493fc Detabify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90085 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 18:10:39 +00:00
Benjamin Kramer
18eaefd25e Remove dead returns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90083 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 17:42:58 +00:00
Kovarththanan Rajaratnam
d614673bb8 This patch ensures that Path::GetMainExecutable is able to handle the
case where realpath() fails. When this occurs we segfault trying to
create a std::string from a NULL pointer.

Fixes PR5635.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90082 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 17:19:48 +00:00
Chris Lattner
cd188e9665 add testcases for the foo_with_overflow op xforms added recently and
fix bugs exposed by the tests.  Testcases from Alastair Lynn!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90056 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 02:57:29 +00:00
Chris Lattner
d4137f40da update and consolidate the load pre notes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90050 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 02:19:52 +00:00
Chris Lattner
3f40e23392 Implement PR5634.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90046 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 00:51:17 +00:00
Nick Lewycky
d801c10de6 Teach memdep to look for memory use intrinsics during dependency queries. Fixes
PR5574.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90045 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-28 21:27:49 +00:00
Chris Lattner
0c264b16b0 reenable load address insertion in load pre. This allows us to
handle cases like this:
void test(int N, double* G) {
  long j;
  for (j = 1; j < N - 1; j++)
      G[j+1] = G[j] + G[j+1];
}

where G[1] isn't live into the loop.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90041 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-28 16:08:18 +00:00
Chris Lattner
dd696052f0 Enhance InsertPHITranslatedPointer to be able to return a list of newly
inserted instructions.  No functionality change until someone starts using it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90039 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-28 15:39:14 +00:00
Chris Lattner
ab9530ee5d implement a FIXME: limit the depth that DecomposeGEPExpression goes the same
way that getUnderlyingObject does it. 

This fixes the 'DecomposeGEPExpression and getUnderlyingObject disagree!' 
assertion on sqlite3.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90038 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-28 15:12:41 +00:00
Chris Lattner
af7a28939e enable code to handle un-phi-translatable cases more aggressively:
if we don't have an address expression available in a predecessor,
then model this as the value being clobbered at the end of the pred
block instead of being modeled as a complete phi translation failure.
This is important for PRE of loads because we want to see that the
load is available in all but this predecessor, and complete phi
translation failure results in not getting any information about
predecessors.

This doesn't do anything until I renable code insertion since PRE
now sees that it is available in all but one predecessors, but can't
insert the addressing in the predecessor that is missing it to 
eliminate the redundancy.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90037 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-28 14:54:10 +00:00
Chris Lattner
971fd57f7d disable value insertion for now, I need to figure out how
to inform GVN about the newly inserted values.  This fixes 
PR5631.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90022 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-27 22:50:07 +00:00
Chris Lattner
6f7b210b25 Rework InsertPHITranslatedPointer to handle the recursive case, this
fixes PR5630 and sets the stage for the next phase of goodness (testcase
pending).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90019 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-27 22:05:15 +00:00